[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,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 { BaseApi } from './base.api';
/**
* About service.
*/
export class AboutApi extends BaseApi {
/**
* Get server type and version
* Provides information about the running Alfresco Process Services Suite. The response payload object has the properties type, majorVersion, minorVersion, revisionVersion and edition.
*
* @return Promise<{ [key: string]: string; }>
*/
getAppVersion(): Promise<{ [key: string]: string }> {
return this.get({
path: '/api/enterprise/app-version'
});
}
}

View 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 { ResultListDataRepresentationAccountRepresentation } from '../model';
import { BaseApi } from './base.api';
/**
* AccountIntegrationApi service.
*/
export class AccountIntegrationApi extends BaseApi {
/**
* Retrieve external account information
* Accounts are used to integrate with third party apps and clients
*
* @return Promise<ResultListDataRepresentationAccountRepresentation>
*/
getAccounts(): Promise<ResultListDataRepresentationAccountRepresentation> {
return this.get({
path: '/api/enterprise/account/integration'
});
}
}

View File

@@ -0,0 +1,251 @@
/*!
* @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 { CreateEndpointBasicAuthRepresentation, EndpointBasicAuthRepresentation, EndpointConfigurationRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* AdminEndpointsApi service.
*/
export class AdminEndpointsApi extends BaseApi {
/**
* Add an endpoint authorization
*
* @param createRepresentation createRepresentation
* @return Promise<EndpointBasicAuthRepresentation>
*/
createBasicAuthConfiguration(createRepresentation: CreateEndpointBasicAuthRepresentation): Promise<EndpointBasicAuthRepresentation> {
throwIfNotDefined(createRepresentation, 'createRepresentation');
return this.post({
path: '/api/enterprise/admin/basic-auths',
bodyParam: createRepresentation,
returnType: EndpointBasicAuthRepresentation
});
}
/**
* Create an endpoint
*
* @param representation representation
* @return Promise<EndpointConfigurationRepresentation>
*/
createEndpointConfiguration(representation: EndpointConfigurationRepresentation): Promise<EndpointConfigurationRepresentation> {
throwIfNotDefined(representation, 'representation');
return this.post({
path: '/api/enterprise/admin/endpoints',
bodyParam: representation
});
}
/**
* Get an endpoint authorization
*
* @param basicAuthId basicAuthId
* @param tenantId tenantId
* @return Promise<EndpointBasicAuthRepresentation>
*/
getBasicAuthConfiguration(basicAuthId: number, tenantId: number): Promise<EndpointBasicAuthRepresentation> {
throwIfNotDefined(basicAuthId, 'basicAuthId');
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
basicAuthId
};
const queryParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/basic-auths/{basicAuthId}',
pathParams,
queryParams,
returnType: EndpointBasicAuthRepresentation
});
}
/**
* List endpoint authorizations
*
* @param tenantId tenantId
* @return Promise<EndpointBasicAuthRepresentation>
*/
getBasicAuthConfigurations(tenantId: number): Promise<EndpointBasicAuthRepresentation> {
throwIfNotDefined(tenantId, 'tenantId');
const queryParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/basic-auths',
queryParams,
returnType: EndpointBasicAuthRepresentation
});
}
/**
* Get an endpoint
*
* @param endpointConfigurationId endpointConfigurationId
* @param tenantId tenantId
* @return Promise<EndpointConfigurationRepresentation>
*/
getEndpointConfiguration(endpointConfigurationId: number, tenantId: number): Promise<EndpointConfigurationRepresentation> {
throwIfNotDefined(endpointConfigurationId, 'endpointConfigurationId');
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
endpointConfigurationId
};
const queryParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/endpoints/{endpointConfigurationId}',
pathParams,
queryParams
});
}
/**
* List endpoints
*
* @param tenantId tenantId
* @return Promise<EndpointConfigurationRepresentation>
*/
getEndpointConfigurations(tenantId: number): Promise<EndpointConfigurationRepresentation> {
throwIfNotDefined(tenantId, 'tenantId');
const queryParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/endpoints',
queryParams
});
}
/**
* Delete an endpoint authorization
*
* @param basicAuthId basicAuthId
* @param tenantId tenantId
* @return Promise<{}>
*/
removeBasicAuthConfiguration(basicAuthId: number, tenantId: number): Promise<void> {
throwIfNotDefined(basicAuthId, 'basicAuthId');
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
basicAuthId
};
const queryParams = {
tenantId
};
return this.delete({
path: '/api/enterprise/admin/basic-auths/{basicAuthId}',
pathParams,
queryParams
});
}
/**
* Delete an endpoint
*
* @param endpointConfigurationId endpointConfigurationId
* @param tenantId tenantId
* @return Promise<{}>
*/
removeEndpointConfiguration(endpointConfigurationId: number, tenantId: number): Promise<void> {
throwIfNotDefined(endpointConfigurationId, 'endpointConfigurationId');
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
endpointConfigurationId
};
const queryParams = {
tenantId
};
return this.delete({
path: '/api/enterprise/admin/endpoints/{endpointConfigurationId}',
pathParams,
queryParams
});
}
/**
* Update an endpoint authorization
*
* @param basicAuthId basicAuthId
* @param createRepresentation createRepresentation
* @return Promise<EndpointBasicAuthRepresentation>
*/
updateBasicAuthConfiguration(
basicAuthId: number,
createRepresentation: CreateEndpointBasicAuthRepresentation
): Promise<EndpointBasicAuthRepresentation> {
throwIfNotDefined(basicAuthId, 'basicAuthId');
throwIfNotDefined(createRepresentation, 'createRepresentation');
const pathParams = {
basicAuthId
};
return this.put({
path: '/api/enterprise/admin/basic-auths/{basicAuthId}',
pathParams,
bodyParam: createRepresentation,
returnType: EndpointBasicAuthRepresentation
});
}
/**
* Update an endpoint
*
* @param endpointConfigurationId endpointConfigurationId
* @param representation representation
* @return Promise<EndpointConfigurationRepresentation>
*/
updateEndpointConfiguration(
endpointConfigurationId: number,
representation: EndpointConfigurationRepresentation
): Promise<EndpointConfigurationRepresentation> {
throwIfNotDefined(endpointConfigurationId, 'endpointConfigurationId');
throwIfNotDefined(representation, 'representation');
const pathParams = {
endpointConfigurationId
};
return this.put({
path: '/api/enterprise/admin/endpoints/{endpointConfigurationId}',
pathParams,
bodyParam: representation
});
}
}

View File

@@ -0,0 +1,362 @@
/*!
* @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 {
AbstractGroupRepresentation,
AddGroupCapabilitiesRepresentation,
GroupRepresentation,
LightGroupRepresentation,
ResultListDataRepresentationLightUserRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* AdminGroupsApi service.
*/
export class AdminGroupsApi extends BaseApi {
/**
* Activate a group
*
* @param groupId groupId
* @return Promise<{}>
*/
activate(groupId: number): Promise<any> {
throwIfNotDefined(groupId, 'groupId');
const pathParams = {
groupId
};
return this.post({
path: '/api/enterprise/admin/groups/{groupId}/action/activate',
pathParams
});
}
/**
* Add users to a group
*
* @param groupId groupId
* @return Promise<{}>
*/
addAllUsersToGroup(groupId: number): Promise<any> {
throwIfNotDefined(groupId, 'groupId');
const pathParams = {
groupId
};
return this.post({
path: '/api/enterprise/admin/groups/{groupId}/add-all-users',
pathParams
});
}
/**
* Add capabilities to a group
*
* @param groupId groupId
* @param addGroupCapabilitiesRepresentation addGroupCapabilitiesRepresentation
* @return Promise<{}>
*/
addGroupCapabilities(groupId: number, addGroupCapabilitiesRepresentation: AddGroupCapabilitiesRepresentation): Promise<any> {
throwIfNotDefined(groupId, 'groupId');
throwIfNotDefined(addGroupCapabilitiesRepresentation, 'addGroupCapabilitiesRepresentation');
const pathParams = {
groupId
};
return this.post({
path: '/api/enterprise/admin/groups/{groupId}/capabilities',
pathParams,
bodyParam: addGroupCapabilitiesRepresentation
});
}
/**
* Add a user to a group
*
* @param groupId groupId
* @param userId userId
* @return Promise<{}>
*/
addGroupMember(groupId: number, userId: number): Promise<any> {
throwIfNotDefined(groupId, 'groupId');
throwIfNotDefined(userId, 'userId');
const pathParams = {
groupId,
userId
};
return this.post({
path: '/api/enterprise/admin/groups/{groupId}/members/{userId}',
pathParams
});
}
/**
* Get a related group
*
* @param groupId groupId
* @param relatedGroupId relatedGroupId
* @param type type
* @return Promise<{}>
*/
addRelatedGroup(groupId: number, relatedGroupId: number, type: string): Promise<any> {
throwIfNotDefined(groupId, 'groupId');
throwIfNotDefined(relatedGroupId, 'relatedGroupId');
throwIfNotDefined(type, 'type');
const pathParams = {
groupId,
relatedGroupId
};
const queryParams = {
type
};
return this.post({
path: '/api/enterprise/admin/groups/{groupId}/related-groups/{relatedGroupId}',
pathParams,
queryParams
});
}
/**
* Create a group
*
* @param groupRepresentation groupRepresentation
* @return Promise<GroupRepresentation>
*/
createNewGroup(groupRepresentation: GroupRepresentation): Promise<GroupRepresentation> {
throwIfNotDefined(groupRepresentation, 'groupRepresentation');
return this.post({
path: '/api/enterprise/admin/groups',
bodyParam: groupRepresentation,
returnType: GroupRepresentation
});
}
/**
* Remove a capability from a group
*
* @param groupId groupId
* @param groupCapabilityId groupCapabilityId
* @return Promise<{}>
*/
deleteGroupCapability(groupId: number, groupCapabilityId: number): Promise<void> {
throwIfNotDefined(groupId, 'groupId');
throwIfNotDefined(groupCapabilityId, 'groupCapabilityId');
const pathParams = {
groupId,
groupCapabilityId
};
return this.delete({
path: '/api/enterprise/admin/groups/{groupId}/capabilities/{groupCapabilityId}',
pathParams
});
}
/**
* Delete a member from a group
*
* @param groupId groupId
* @param userId userId
* @return Promise<{}>
*/
deleteGroupMember(groupId: number, userId: number): Promise<void> {
throwIfNotDefined(groupId, 'groupId');
throwIfNotDefined(userId, 'userId');
const pathParams = {
groupId,
userId
};
return this.delete({
path: '/api/enterprise/admin/groups/{groupId}/members/{userId}',
pathParams
});
}
/**
* Delete a group
*
* @param groupId groupId
* @return Promise<{}>
*/
deleteGroup(groupId: number): Promise<void> {
throwIfNotDefined(groupId, 'groupId');
const pathParams = {
groupId
};
return this.delete({
path: '/api/enterprise/admin/groups/{groupId}',
pathParams
});
}
/**
* Delete a related group
*
* @param groupId groupId
* @param relatedGroupId relatedGroupId
* @return Promise<{}>
*/
deleteRelatedGroup(groupId: number, relatedGroupId: number): Promise<void> {
throwIfNotDefined(groupId, 'groupId');
throwIfNotDefined(relatedGroupId, 'relatedGroupId');
const pathParams = {
groupId,
relatedGroupId
};
return this.delete({
path: '/api/enterprise/admin/groups/{groupId}/related-groups/{relatedGroupId}',
pathParams
});
}
/**
* List group capabilities
*
* @param groupId groupId
* @return Promise<string>
*/
getCapabilities(groupId: number): Promise<string> {
throwIfNotDefined(groupId, 'groupId');
const pathParams = {
groupId
};
return this.get({
path: '/api/enterprise/admin/groups/{groupId}/potential-capabilities',
pathParams
});
}
/**
* Get group members
*
* @param groupId groupId
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationLightUserRepresentation>
*/
getGroupUsers(
groupId: number,
opts?: { filter?: string; page?: number; pageSize?: number }
): Promise<ResultListDataRepresentationLightUserRepresentation> {
throwIfNotDefined(groupId, 'groupId');
const pathParams = {
groupId
};
return this.get({
path: '/api/enterprise/admin/groups/{groupId}/users',
pathParams,
queryParams: opts
});
}
/**
* Get a group
*
* @param groupId groupId
* @param opts Optional parameters
* @return Promise<AbstractGroupRepresentation>
*/
getGroup(groupId: number, opts?: { includeAllUsers?: boolean; summary?: boolean }): Promise<AbstractGroupRepresentation> {
throwIfNotDefined(groupId, 'groupId');
const pathParams = {
groupId
};
return this.get({
path: '/api/enterprise/admin/groups/{groupId}',
pathParams,
queryParams: opts
});
}
/**
* Query groups
*
* @param opts Optional parameters
* @return Promise<LightGroupRepresentation>
*/
getGroups(opts?: { tenantId?: number; functional?: boolean; summary?: boolean }): Promise<LightGroupRepresentation> {
return this.get({
path: '/api/enterprise/admin/groups',
queryParams: opts
});
}
/**
* Get related groups
*
* @param groupId groupId
* @return Promise<LightGroupRepresentation>
*/
getRelatedGroups(groupId: number): Promise<LightGroupRepresentation> {
throwIfNotDefined(groupId, 'groupId');
const pathParams = {
groupId
};
return this.get({
path: '/api/enterprise/admin/groups/{groupId}/related-groups',
pathParams
});
}
/**
* Update a group
*
* @param groupId groupId
* @param groupRepresentation groupRepresentation
* @return Promise<GroupRepresentation>
*/
updateGroup(groupId: number, groupRepresentation: GroupRepresentation): Promise<GroupRepresentation> {
throwIfNotDefined(groupId, 'groupId');
throwIfNotDefined(groupRepresentation, 'groupRepresentation');
const pathParams = {
groupId
};
return this.put({
path: '/api/enterprise/admin/groups/{groupId}',
pathParams,
bodyParam: groupRepresentation,
returnType: GroupRepresentation
});
}
}

View File

@@ -0,0 +1,182 @@
/*!
* @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 { CreateTenantRepresentation, ImageUploadRepresentation, LightTenantRepresentation, TenantEvent, TenantRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* AdminTenantsApi service.
*/
export class AdminTenantsApi extends BaseApi {
/**
* Create a tenant
* Only a tenant manager may access this endpoint
*
* @param createTenantRepresentation createTenantRepresentation
* @return Promise<LightTenantRepresentation>
*/
createTenant(createTenantRepresentation: CreateTenantRepresentation): Promise<LightTenantRepresentation> {
throwIfNotDefined(createTenantRepresentation, 'groupId');
return this.post({
path: '/api/enterprise/admin/tenants',
bodyParam: createTenantRepresentation
});
}
/**
* Delete a tenant
*
* @param tenantId tenantId
* @return Promise<{}>
*/
deleteTenant(tenantId: number): Promise<void> {
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
tenantId
};
return this.delete({
path: '/api/enterprise/admin/tenants/{tenantId}',
pathParams
});
}
/**
* Get tenant events
*
* @param tenantId tenantId
* @return Promise<TenantEvent>
*/
getTenantEvents(tenantId: number): Promise<TenantEvent> {
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/tenants/{tenantId}/events',
pathParams,
returnType: TenantEvent
});
}
/**
* Get a tenant's logo
*
* @param tenantId tenantId
* @return Promise<{}>
*/
getTenantLogo(tenantId: number): Promise<any> {
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/tenants/{tenantId}/logo',
pathParams
});
}
/**
* Get a tenant
*
* @param tenantId tenantId
* @return Promise<TenantRepresentation>
*/
getTenant(tenantId: number): Promise<TenantRepresentation> {
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/tenants/{tenantId}',
pathParams,
returnType: TenantRepresentation
});
}
/**
* List tenants
* Only a tenant manager may access this endpoint
*
* @return Promise<LightTenantRepresentation>
*/
getTenants(): Promise<LightTenantRepresentation> {
return this.get({
path: '/api/enterprise/admin/tenants'
});
}
/**
* Update a tenant
*
* @param tenantId tenantId
* @param createTenantRepresentation createTenantRepresentation
* @return Promise<TenantRepresentation>
*/
update(tenantId: number, createTenantRepresentation: CreateTenantRepresentation): Promise<TenantRepresentation> {
throwIfNotDefined(tenantId, 'tenantId');
throwIfNotDefined(createTenantRepresentation, 'createTenantRepresentation');
const pathParams = {
tenantId
};
return this.put({
path: '/api/enterprise/admin/tenants/{tenantId}',
pathParams,
bodyParam: createTenantRepresentation,
returnType: TenantRepresentation
});
}
/**
* Update a tenant's logo
*
* @param tenantId tenantId
* @param file file
* @return Promise<ImageUploadRepresentation>
*/
uploadTenantLogo(tenantId: number, file: any): Promise<ImageUploadRepresentation> {
throwIfNotDefined(tenantId, 'tenantId');
throwIfNotDefined(file, 'file');
const pathParams = {
tenantId
};
const formParams = {
file
};
return this.post({
path: '/api/enterprise/admin/tenants/{tenantId}/logo',
pathParams,
formParams,
contentTypes: ['multipart/form-data'],
returnType: ImageUploadRepresentation
});
}
}

View File

@@ -0,0 +1,131 @@
/*!
* @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 {
AbstractUserRepresentation,
BulkUserUpdateRepresentation,
ResultListDataRepresentationAbstractUserRepresentation,
UserRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
export interface GetUsersOpts {
filter?: string;
status?: string;
accountType?: string;
sort?: string;
company?: string;
start?: number;
page?: number;
size?: number;
groupId?: number;
tenantId?: number;
summary?: boolean;
}
/**
* AdminUsersApi service.
*/
export class AdminUsersApi extends BaseApi {
/**
* Bulk update a list of users
*
* @param update update
* @return Promise<{}>
*/
bulkUpdateUsers(update: BulkUserUpdateRepresentation): Promise<any> {
throwIfNotDefined(update, 'update');
return this.put({
path: '/api/enterprise/admin/users',
bodyParam: update
});
}
/**
* Create a user
*
* @param userRepresentation userRepresentation
* @return Promise<UserRepresentation>
*/
createNewUser(userRepresentation: UserRepresentation): Promise<UserRepresentation> {
throwIfNotDefined(userRepresentation, 'userRepresentation');
return this.post({
path: '/api/enterprise/admin/users',
bodyParam: userRepresentation,
returnType: UserRepresentation
});
}
/**
* Get a user
*
* @param userId userId
* @param opts Optional parameters
* @return Promise<AbstractUserRepresentation>
*/
getUser(userId: number, opts?: { summary?: boolean }): Promise<AbstractUserRepresentation> {
throwIfNotDefined(userId, 'userId');
const pathParams = {
userId
};
return this.get({
path: '/api/enterprise/admin/users/{userId}',
pathParams,
queryParams: opts
});
}
/**
* Query users
*
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationAbstractUserRepresentation>
*/
getUsers(opts?: GetUsersOpts): Promise<ResultListDataRepresentationAbstractUserRepresentation> {
return this.get({
path: '/api/enterprise/admin/users',
queryParams: opts
});
}
/**
* Update a user
*
* @param userId userId
* @param userRepresentation userRepresentation
* @return Promise<{}>
*/
updateUserDetails(userId: number, userRepresentation: UserRepresentation): Promise<any> {
throwIfNotDefined(userId, 'userId');
throwIfNotDefined(userRepresentation, 'userRepresentation');
const pathParams = {
userId
};
return this.put({
path: '/api/enterprise/admin/users/{userId}',
pathParams,
bodyParam: userRepresentation
});
}
}

View File

@@ -0,0 +1,207 @@
/*!
* @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 {
AppDefinitionPublishRepresentation,
AppDefinitionRepresentation,
AppDefinitionSaveRepresentation,
AppDefinitionUpdateResultRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* AppDefinitionsApi service.
*/
export class AppDefinitionsApi extends BaseApi {
/**
* deleteAppDefinition
*
* @param appDefinitionId appDefinitionId
* @return Promise<{}>
*/
deleteAppDefinition(appDefinitionId: number): Promise<void> {
throwIfNotDefined(appDefinitionId, 'appDefinitionId');
const pathParams = {
appDefinitionId
};
return this.delete({
path: '/api/enterprise/app-definitions/{appDefinitionId}',
pathParams
});
}
/**
* Export an app definition
*
* This will return a zip file containing the app definition model and all related models (process definitions and forms).
*
* @param modelId modelId from a runtime app or the id of an app definition model
* @return Promise<{}>
*/
exportAppDefinition(modelId: number): Promise<any> {
throwIfNotDefined(modelId, 'modelId');
const pathParams = {
modelId
};
const contentTypes = ['application/json'];
const accepts = ['application/json', 'application/zip'];
return this.get({
path: '/api/enterprise/app-definitions/{modelId}/export',
pathParams,
contentTypes,
accepts
});
}
/**
* Get an app definition
*
* @param modelId Application definition ID
* @return Promise<AppDefinitionRepresentation>
*/
getAppDefinition(modelId: number): Promise<AppDefinitionRepresentation> {
throwIfNotDefined(modelId, 'modelId');
const pathParams = {
modelId
};
return this.get({
path: '/api/enterprise/app-definitions/{modelId}',
pathParams
});
}
/**
* importAndPublishApp
*
* @param file file
* @param opts options
* @return Promise<AppDefinitionUpdateResultRepresentation>
*/
importAndPublishApp(file: any, opts?: { renewIdmEntries?: boolean }): Promise<AppDefinitionUpdateResultRepresentation> {
throwIfNotDefined(file, 'file');
const formParams = {
file
};
const queryParams = {
renewIdmEntries: opts?.renewIdmEntries
};
return this.post({
path: '/api/enterprise/app-definitions/publish-app',
formParams,
queryParams,
contentTypes: ['multipart/form-data']
});
}
/**
* Import a new app definition
*
* Allows a zip file to be uploaded containing an app definition and any number of included models.
* <p>This is useful to bootstrap an environment (for users or continuous integration).<p>
* Before using any processes included in the import the app must be published and deployed.
*
* @param file file
* @param opts Optional parameters
* @param opts.renewIdmEntries Whether to renew user and group identifiers (default to false)
* @return Promise<AppDefinitionRepresentation>
*/
importAppDefinition(file: any, opts?: { renewIdmEntries?: string }): Promise<AppDefinitionRepresentation> {
throwIfNotDefined(file, 'file');
const formParams = {
file
};
return this.post({
path: '/api/enterprise/app-definitions/import',
queryParams: opts,
formParams,
contentTypes: ['multipart/form-data']
});
}
/**
* Publish an app definition
*
* Publishing an app definition makes it available for use. The application must not have any validation errors or an error will be returned.<p>Before an app definition can be used by other users, it must also be deployed for their use
*
* @param modelId modelId
* @param publishModel publishModel
* @return Promise<AppDefinitionUpdateResultRepresentation>
*/
publishAppDefinition(modelId: number, publishModel: AppDefinitionPublishRepresentation): Promise<AppDefinitionUpdateResultRepresentation> {
throwIfNotDefined(modelId, 'modelId');
throwIfNotDefined(publishModel, 'publishModel');
const pathParams = {
modelId
};
return this.post({
path: '/api/enterprise/app-definitions/{modelId}/publish',
pathParams,
bodyParam: publishModel
});
}
/**
* Update an app definition
*
* @param modelId Application definition ID
* @param updatedModel updatedModel |
* @return Promise<AppDefinitionUpdateResultRepresentation>
*/
updateAppDefinition(modelId: number, updatedModel: AppDefinitionSaveRepresentation | any): Promise<any> {
throwIfNotDefined(modelId, 'modelId');
throwIfNotDefined(updatedModel, 'updatedModel');
const pathParams = {
modelId
};
if (!updatedModel['appDefinition']) {
const formParams = {
file: updatedModel
};
return this.post({
path: '/api/enterprise/app-definitions/{modelId}/import',
pathParams,
formParams,
bodyParam: updatedModel,
contentTypes: ['multipart/form-data']
});
} else {
return this.put({
path: '/api/enterprise/app-definitions/{modelId}',
pathParams,
bodyParam: updatedModel
});
}
}
}

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.processClient;
}
}

View File

@@ -0,0 +1,92 @@
/*!
* @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 { ChecklistOrderRepresentation } from '../model/checklistOrderRepresentation';
import { ResultListDataRepresentationTaskRepresentation } from '../model/resultListDataRepresentationTaskRepresentation';
import { TaskRepresentation } from '../model/taskRepresentation';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* Checklists service.
*/
export class ChecklistsApi extends BaseApi {
/**
* Create a task checklist
*
* @param taskId taskId
* @param taskRepresentation taskRepresentation
* @return Promise<TaskRepresentation>
*/
addSubtask(taskId: string, taskRepresentation: TaskRepresentation): Promise<TaskRepresentation> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(taskRepresentation, 'taskRepresentation');
const pathParams = {
taskId
};
return this.post({
path: '/api/enterprise/tasks/{taskId}/checklist',
pathParams,
bodyParam: taskRepresentation,
returnType: TaskRepresentation
});
}
/**
* Get checklist for a task
*
* @param taskId taskId
* @return Promise<ResultListDataRepresentationTaskRepresentation>
*/
getChecklist(taskId: string): Promise<ResultListDataRepresentationTaskRepresentation> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/tasks/{taskId}/checklist',
pathParams,
returnType: ResultListDataRepresentationTaskRepresentation
});
}
/**
* Change the order of items on a checklist
*
* @param taskId taskId
* @param orderRepresentation orderRepresentation
* @return Promise<{}>
*/
orderChecklist(taskId: string, orderRepresentation: ChecklistOrderRepresentation): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(orderRepresentation, 'orderRepresentation');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/checklist',
bodyParam: orderRepresentation,
pathParams
});
}
}

View File

@@ -0,0 +1,119 @@
/*!
* @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 { CommentRepresentation } from '../model/commentRepresentation';
import { ResultListDataRepresentationCommentRepresentation } from '../model/resultListDataRepresentationCommentRepresentation';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* Comments service.
*/
export class ActivitiCommentsApi extends BaseApi {
/**
* Add a comment to a process instance
*
* @param commentRequest commentRequest
* @param processInstanceId processInstanceId
* @return Promise<CommentRepresentation>
*/
addProcessInstanceComment(commentRequest: CommentRepresentation, processInstanceId: string): Promise<CommentRepresentation> {
throwIfNotDefined(commentRequest, 'commentRequest');
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.post({
path: '/api/enterprise/process-instances/{processInstanceId}/comments',
pathParams,
bodyParam: commentRequest,
returnType: CommentRepresentation
});
}
/**
* Add a comment to a task
*
* @param commentRequest commentRequest
* @param taskId taskId
* @return Promise<CommentRepresentation>
*/
addTaskComment(commentRequest: CommentRepresentation, taskId: string): Promise<CommentRepresentation> {
throwIfNotDefined(commentRequest, 'commentRequest');
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.post({
path: '/api/enterprise/tasks/{taskId}/comments',
pathParams,
bodyParam: commentRequest,
returnType: CommentRepresentation
});
}
/**
* Get comments for a process
*
* @param processInstanceId processInstanceId
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationCommentRepresentation>
*/
getProcessInstanceComments(
processInstanceId: string,
opts?: { latestFirst?: boolean }
): Promise<ResultListDataRepresentationCommentRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/comments',
pathParams,
queryParams: opts,
returnType: ResultListDataRepresentationCommentRepresentation
});
}
/**
* Get comments for a task
*
* @param taskId taskId
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationCommentRepresentation>
*/
getTaskComments(taskId: string, opts?: { latestFirst?: boolean }): Promise<ResultListDataRepresentationCommentRepresentation> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/tasks/{taskId}/comments',
pathParams,
queryParams: opts,
returnType: ResultListDataRepresentationCommentRepresentation
});
}
}

View File

@@ -0,0 +1,321 @@
/*!
* @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 {
RelatedContentRepresentation,
ResultListDataRepresentationRelatedContentRepresentation,
ResultListDataRepresentationRelatedProcessTask
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* Content service.
*/
export class ContentApi extends BaseApi {
/**
* Attach existing content to a process instance
*
* @param processInstanceId processInstanceId
* @param relatedContent relatedContent
* @param opts Optional parameters
* @return Promise<RelatedContentRepresentation>
*/
createRelatedContentOnProcessInstance(
processInstanceId: string,
relatedContent: RelatedContentRepresentation | any,
opts?: { isRelatedContent?: boolean }
): Promise<RelatedContentRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
throwIfNotDefined(relatedContent, 'relatedContent');
opts = opts || {};
const pathParams = {
processInstanceId
};
if (relatedContent instanceof RelatedContentRepresentation) {
return this.post({
path: '/api/enterprise/process-instances/{processInstanceId}/content',
pathParams,
queryParams: opts,
bodyParam: relatedContent,
returnType: RelatedContentRepresentation
});
} else {
const formParams = {
file: relatedContent
};
return this.post({
path: '/api/enterprise/process-instances/{processInstanceId}/raw-content',
pathParams,
formParams,
queryParams: opts,
contentTypes: ['multipart/form-data'],
returnType: RelatedContentRepresentation
});
}
}
/**
* Attach existing content to a task
*
* @param taskId taskId
* @param relatedContent relatedContent
* @param opts Optional parameters
* @return Promise<RelatedContentRepresentation>
*/
createRelatedContentOnTask(
taskId: string,
relatedContent: RelatedContentRepresentation | any,
opts?: { isRelatedContent?: boolean }
): Promise<RelatedContentRepresentation> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(relatedContent, 'relatedContent');
const pathParams = {
taskId
};
if (relatedContent instanceof RelatedContentRepresentation) {
return this.post({
path: '/api/enterprise/tasks/{taskId}/content',
pathParams,
queryParams: opts,
bodyParam: relatedContent,
returnType: RelatedContentRepresentation
});
} else {
const formParams = {
file: relatedContent
};
return this.post({
path: '/api/enterprise/tasks/{taskId}/raw-content',
pathParams,
queryParams: opts,
formParams,
contentTypes: ['multipart/form-data'],
returnType: RelatedContentRepresentation
});
}
}
/**
* Upload content and create a local representation
*
* @param file file
* @return Promise<RelatedContentRepresentation>
*/
createTemporaryRawRelatedContent(file: any): Promise<RelatedContentRepresentation> {
throwIfNotDefined(file, 'file');
const formParams = {
file
};
return this.post({
path: '/api/enterprise/content/raw',
formParams,
contentTypes: ['multipart/form-data'],
returnType: RelatedContentRepresentation
});
}
/**
* Create a local representation of content from a remote repository
*
* @param relatedContent relatedContent
* @return Promise<RelatedContentRepresentation>
*/
createTemporaryRelatedContent(relatedContent: RelatedContentRepresentation): Promise<RelatedContentRepresentation> {
throwIfNotDefined(relatedContent, 'relatedContent');
return this.post({
path: '/api/enterprise/content',
bodyParam: relatedContent,
returnType: RelatedContentRepresentation
});
}
/**
* Remove a local content representation
*
* @param contentId contentId
* @return Promise<{}>
*/
deleteContent(contentId: number): Promise<void> {
throwIfNotDefined(contentId, 'contentId');
const pathParams = {
contentId
};
return this.delete({
path: '/api/enterprise/content/{contentId}',
pathParams
});
}
/**
* Get a local content representation
*
* @param contentId contentId
* @return Promise<RelatedContentRepresentation>
*/
getContent(contentId: number): Promise<RelatedContentRepresentation> {
throwIfNotDefined(contentId, 'contentId');
const pathParams = {
contentId
};
return this.get({
path: '/api/enterprise/content/{contentId}',
pathParams,
returnType: RelatedContentRepresentation
});
}
/**
* Get content Raw URL for the given contentId
*
* @param contentId contentId
*/
getRawContentUrl(contentId: number): string {
return `${this.apiClient.basePath}/api/enterprise/content/${contentId}/raw`;
}
/**
* Stream content rendition
*
* @param contentId contentId
* @param renditionType renditionType
* @return Promise<{}>
*/
getRawContent(contentId: number, renditionType?: string): Promise<any> {
throwIfNotDefined(contentId, 'contentId');
if (renditionType) {
const pathParams = {
contentId,
renditionType
};
return this.get({
path: '/api/enterprise/content/{contentId}/rendition/{renditionType}',
pathParams,
returnType: 'blob',
responseType: 'blob'
});
} else {
const pathParams = {
contentId
};
return this.get({
path: '/api/enterprise/content/{contentId}/raw',
pathParams,
returnType: 'blob',
responseType: 'blob'
});
}
}
/**
* List content attached to a process instance
*
* @param processInstanceId processInstanceId
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationRelatedContentRepresentation>
*/
getRelatedContentForProcessInstance(
processInstanceId: string,
opts?: { isRelatedContent?: boolean }
): Promise<ResultListDataRepresentationRelatedContentRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
opts = opts || {};
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/content',
pathParams,
queryParams: opts,
returnType: ResultListDataRepresentationRelatedContentRepresentation
});
}
/**
* List content attached to a task
*
* @param taskId taskId
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationRelatedContentRepresentation>
*/
getRelatedContentForTask(
taskId: string,
opts?: { isRelatedContent?: boolean }
): Promise<ResultListDataRepresentationRelatedContentRepresentation> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/tasks/{taskId}/content',
pathParams,
queryParams: opts,
returnType: ResultListDataRepresentationRelatedContentRepresentation
});
}
/**
* Lists processes and tasks on workflow started with provided document
*
* @param sourceId - id of the document that workflow or task has been started with
* @param source - source of the document that workflow or task has been started with
* @param size - size of the entries to get
* @param page - page number
* @return Promise<ResultListDataRepresentationRelatedProcessTask>
*/
getProcessesAndTasksOnContent(
sourceId: string,
source: string,
size?: number,
page?: number
): Promise<ResultListDataRepresentationRelatedProcessTask> {
throwIfNotDefined(sourceId, 'sourceId');
throwIfNotDefined(source, 'source');
return this.get({
path: '/api/enterprise/document-runtime',
queryParams: {
sourceId,
source,
size,
page
}
});
}
}

View 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 { ResultListDataRepresentationDataSourceRepresentation } from '../model';
import { BaseApi } from './base.api';
/**
* DataSourcesApi service.
*/
export class DataSourcesApi extends BaseApi {
/**
* Get data sources
*
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationDataSourceRepresentation>
*/
getDataSources(opts?: { tenantId?: number }): Promise<ResultListDataRepresentationDataSourceRepresentation> {
return this.get({
path: '/api/enterprise/editor/data-sources',
queryParams: opts
});
}
}

View File

@@ -0,0 +1,69 @@
/*!
* @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 { DecisionAuditRepresentation } from '../model/decisionAuditRepresentation';
import { ResultListDataRepresentationDecisionAuditRepresentation } from '../model/resultListDataRepresentationDecisionAuditRepresentation';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* DecisionAuditsApi service.
*/
export class DecisionAuditsApi extends BaseApi {
/**
* Get an audit trail
*
* @param auditTrailId auditTrailId
* @return Promise<DecisionAuditRepresentation>
*/
getAuditTrail(auditTrailId: number): Promise<DecisionAuditRepresentation> {
throwIfNotDefined(auditTrailId, 'taskId');
const pathParams = {
auditTrailId
};
return this.get({
path: '/api/enterprise/decisions/audits/{auditTrailId}',
pathParams,
returnType: DecisionAuditRepresentation
});
}
/**
* Query decision table audit trails
*
* @param decisionKey decisionKey
* @param dmnDeploymentId dmnDeploymentId
* @return Promise<ResultListDataRepresentationDecisionAuditRepresentation>
*/
getAuditTrails(decisionKey: string, dmnDeploymentId: number): Promise<ResultListDataRepresentationDecisionAuditRepresentation> {
throwIfNotDefined(decisionKey, 'decisionKey');
throwIfNotDefined(dmnDeploymentId, 'dmnDeploymentId');
const queryParams = {
decisionKey,
dmnDeploymentId
};
return this.get({
path: '/api/enterprise/decisions/audits',
queryParams,
returnType: ResultListDataRepresentationDecisionAuditRepresentation
});
}
}

View File

@@ -0,0 +1,87 @@
/*!
* @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 { JsonNode, ResultListDataRepresentationRuntimeDecisionTableRepresentation, RuntimeDecisionTableRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
export interface GetDecisionTablesOpts {
nameLike?: string;
keyLike?: string;
tenantIdLike?: string;
deploymentId?: number;
sort?: string;
order?: string;
start?: number;
size?: number;
}
/**
* DecisionTablesApi service.
*/
export class DecisionTablesApi extends BaseApi {
/**
* Get definition for a decision table
*
* @param decisionTableId decisionTableId
* @return Promise<JsonNode>
*/
getDecisionTableEditorJson(decisionTableId: number): Promise<JsonNode> {
throwIfNotDefined(decisionTableId, 'decisionTableId');
const pathParams = {
decisionTableId
};
return this.get({
path: '/api/enterprise/decisions/decision-tables/{decisionTableId}/editorJson',
pathParams
});
}
/**
* Get a decision table
*
* @param decisionTableId decisionTableId
* @return Promise<RuntimeDecisionTableRepresentation>
*/
getDecisionTable(decisionTableId: number): Promise<RuntimeDecisionTableRepresentation> {
throwIfNotDefined(decisionTableId, 'decisionTableId');
const pathParams = {
decisionTableId
};
return this.get({
path: '/api/enterprise/decisions/decision-tables/{decisionTableId}',
pathParams
});
}
/**
* Query decision tables
*
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationRuntimeDecisionTableRepresentation>
*/
getDecisionTables(opts?: GetDecisionTablesOpts): Promise<ResultListDataRepresentationRuntimeDecisionTableRepresentation> {
return this.get({
path: '/api/enterprise/decisions/decision-tables',
queryParams: opts
});
}
}

View File

@@ -0,0 +1,55 @@
/*!
* @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 { EndpointConfigurationRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* Endpoints service.
*/
export class EndpointsApi extends BaseApi {
/**
* Get an endpoint configuration
*
* @param endpointConfigurationId endpointConfigurationId
* @return Promise<EndpointConfigurationRepresentation>
*/
getEndpointConfiguration(endpointConfigurationId: number): Promise<EndpointConfigurationRepresentation> {
throwIfNotDefined(endpointConfigurationId, 'endpointConfigurationId');
const pathParams = {
endpointConfigurationId
};
return this.get({
path: '/api/enterprise/editor/endpoints/{endpointConfigurationId}',
pathParams
});
}
/**
* List endpoint configurations
*
* @return Promise<EndpointConfigurationRepresentation>
*/
getEndpointConfigurations(): Promise<EndpointConfigurationRepresentation> {
return this.get({
path: '/api/enterprise/editor/endpoints'
});
}
}

View File

@@ -0,0 +1,184 @@
/*!
* @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 {
FormDefinitionRepresentation,
FormRepresentation,
FormSaveRepresentation,
ResultListDataRepresentationFormRepresentation,
ResultListDataRepresentationRuntimeFormRepresentation,
ValidationErrorRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { buildCollectionParam } from '../../../alfrescoApiClient';
import { throwIfNotDefined } from '../../../assert';
export interface GetFormsOpts {
nameLike?: string;
appId?: number;
tenantId?: number;
start?: number;
sort?: string;
order?: string;
size?: number;
}
/**
* FormModelsApi service.
*/
export class FormModelsApi extends BaseApi {
/**
* Get form content
*
* @param formId formId
* @return Promise<FormDefinitionRepresentation>
*/
getFormEditorJson(formId: number): Promise<FormDefinitionRepresentation> {
throwIfNotDefined(formId, 'formId');
const pathParams = {
formId
};
return this.get({
path: '/api/enterprise/forms/{formId}/editorJson',
pathParams
});
}
/**
* Get form history
*
* @param formId formId
* @param formHistoryId formHistoryId
* @return Promise<FormRepresentation>
*/
getFormHistory(formId: number, formHistoryId: number): Promise<FormRepresentation> {
throwIfNotDefined(formId, 'formId');
throwIfNotDefined(formHistoryId, 'formHistoryId');
const pathParams = {
formId,
formHistoryId
};
return this.get({
path: '/api/enterprise/editor/form-models/{formId}/history/{formHistoryId}',
pathParams,
returnType: FormRepresentation
});
}
/**
* Get a form model
*
* @param formId {number} formId
* @return Promise<FormRepresentation>
*/
getForm(formId: number): Promise<FormRepresentation> {
throwIfNotDefined(formId, 'formId');
const pathParams = {
formId
};
return this.get({
path: '/api/enterprise/editor/form-models/{formId}',
pathParams,
returnType: FormRepresentation
});
}
/**
* Get forms
*
* @param input input
* @return Promise<FormRepresentation>
*/
getForms(
input: string[] | GetFormsOpts
): Promise<FormRepresentation | ResultListDataRepresentationRuntimeFormRepresentation | ResultListDataRepresentationFormRepresentation> {
if (typeof input === 'string') {
const queryParams = {
formId: buildCollectionParam(input, 'multi')
};
return this.get({
path: '/api/enterprise/editor/form-models/values',
queryParams,
returnType: FormRepresentation
});
} else if (typeof input === 'object') {
return this.get({
path: '/api/enterprise/forms',
queryParams: input
});
} else {
return this.get({
path: '/api/enterprise/editor/form-models',
returnType: ResultListDataRepresentationFormRepresentation
});
}
}
/**
* Update form model content
*
* @param formId ID of the form to update
* @param saveRepresentation saveRepresentation
* @return Promise<FormRepresentation>
*/
saveForm(formId: number, saveRepresentation: FormSaveRepresentation): Promise<FormRepresentation> {
throwIfNotDefined(formId, 'formId');
throwIfNotDefined(saveRepresentation, 'saveRepresentation');
const pathParams = {
formId
};
return this.put({
path: '/api/enterprise/editor/form-models/{formId}',
pathParams,
bodyParam: saveRepresentation,
returnType: FormRepresentation
});
}
/**
* Validate form model content
*
* The model content to be validated must be specified in the POST body
*
* @param formId formId
* @param saveRepresentation saveRepresentation
* @return Promise<ValidationErrorRepresentation>
*/
validateModel(formId: number, saveRepresentation: FormSaveRepresentation): Promise<ValidationErrorRepresentation> {
throwIfNotDefined(formId, 'formId');
throwIfNotDefined(saveRepresentation, 'saveRepresentation');
const pathParams = {
formId
};
return this.get({
path: '/api/enterprise/editor/form-models/{formId}/validate',
pathParams,
bodyParam: saveRepresentation
});
}
}

View File

@@ -0,0 +1,65 @@
/*!
* @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 { ResultListDataRepresentationLightGroupRepresentation, ResultListDataRepresentationLightUserRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
export interface GetGroupsOpts {
filter?: string;
groupId?: number;
externalId?: string;
externalIdCaseInsensitive?: string;
tenantId?: string;
}
/**
* Groups service.
*/
export class ActivitiGroupsApi extends BaseApi {
/**
* Query groups
*
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationLightGroupRepresentation>
*/
getGroups(opts?: GetGroupsOpts): Promise<ResultListDataRepresentationLightGroupRepresentation> {
return this.get({
path: '/api/enterprise/groups',
queryParams: opts
});
}
/**
* List members of a group
*
* @param groupId groupId
* @return Promise<ResultListDataRepresentationLightUserRepresentation>
*/
getUsersForGroup(groupId: number): Promise<ResultListDataRepresentationLightUserRepresentation> {
throwIfNotDefined(groupId, 'formId');
const pathParams = {
groupId
};
return this.get({
path: '/api/enterprise/groups/{groupId}/users',
pathParams
});
}
}

View File

@@ -0,0 +1,62 @@
/*!
* @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 { SyncLogEntryRepresentation } from '../model/syncLogEntryRepresentation';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* IDMSyncApi service.
*/
export class IDMSyncApi extends BaseApi {
/**
* Get log file for a sync log entry
*
* @param syncLogEntryId syncLogEntryId
* @return Promise<{}>
*/
getLogFile(syncLogEntryId: number): Promise<any> {
throwIfNotDefined(syncLogEntryId, 'syncLogEntryId');
const pathParams = {
syncLogEntryId
};
return this.get({
path: '/api/enterprise/idm-sync-log-entries/{syncLogEntryId}/logfile',
pathParams
});
}
/**
* List sync log entries
*
* @param opts Optional parameters
* @param opts.tenantId {number} tenantId
* @param opts.page {number} page
* @param opts.start {number} start
* @param opts.size {number} size
* @return Promise<SyncLogEntryRepresentation>
*/
getSyncLogEntries(opts?: { tenantId?: number; page?: number; start?: number; size?: number }): Promise<SyncLogEntryRepresentation> {
return this.get({
path: '/api/enterprise/idm-sync-log-entries',
queryParams: opts,
returnType: SyncLogEntryRepresentation
});
}
}

View File

@@ -0,0 +1,62 @@
/*!
* @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 './about.api';
export * from './accountIntegration.api';
export * from './adminEndpoints.api';
export * from './adminGroups.api';
export * from './adminTenants.api';
export * from './adminUsers.api';
export * from './appDefinitions.api';
export * from './checklists.api';
export * from './comments.api';
import { ContentApi as ActivitiContentApi } from './content.api';
export { ActivitiContentApi };
export * from './dataSources.api';
export * from './decisionAudits.api';
export * from './decisionTables.api';
export * from './endpoints.api';
export * from './formModels.api';
export * from './groups.api';
export * from './iDMSync.api';
export * from './integrationAlfrescoCloud.api';
export * from './integrationAlfrescoOnPremise.api';
export * from './integrationBox.api';
export * from './integrationDrive.api';
export * from './models.api';
export * from './modelsBpmn.api';
export * from './modelsHistory.api';
export * from './processDefinitions.api';
export * from './processInstances.api';
export * from './processInstanceVariables.api';
export * from './processScopes.api';
export * from './runtimeAppDefinitions.api';
export * from './runtimeAppDeployments.api';
export * from './scriptFiles.api';
export * from './submittedForms.api';
export * from './systemProperties.api';
export * from './taskActions.api';
export * from './taskForms.api';
export * from './tasks.api';
export * from './taskVariables.api';
export * from './userFilters.api';
export * from './userProfile.api';
export * from './users.api';
export * from './report.api';
export * from './modelJsonBpmn.api';
export * from './temporary.api';
export * from './types';

View File

@@ -0,0 +1,151 @@
/*!
* @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 {
ResultListDataRepresentationAlfrescoContentRepresentation,
ResultListDataRepresentationAlfrescoNetworkRepresenation,
ResultListDataRepresentationAlfrescoSiteRepresenation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* IntegrationAlfrescoCloudApi service.
*/
export class IntegrationAlfrescoCloudApi extends BaseApi {
/**
* Alfresco Cloud Authorization
* Returns Alfresco OAuth HTML Page
*
* @param code code
* @return Promise<{}>
*/
confirmAuthorisation(code: string): Promise<any> {
throwIfNotDefined(code, 'code');
const queryParams = {
code
};
return this.get({
path: '/api/enterprise/integration/alfresco-cloud/confirm-auth-request',
queryParams,
accepts: ['text/html']
});
}
/**
* List Alfresco networks
*
* @return Promise<ResultListDataRepresentationAlfrescoNetworkRepresenation>
*/
getAllNetworks(): Promise<ResultListDataRepresentationAlfrescoNetworkRepresenation> {
return this.get({
path: '/api/enterprise/integration/alfresco-cloud/networks'
});
}
/**
* List Alfresco sites
* Returns ALL Sites
*
* @param networkId networkId
* @return Promise<ResultListDataRepresentationAlfrescoSiteRepresenation>
*/
getAllSites(networkId: string): Promise<ResultListDataRepresentationAlfrescoSiteRepresenation> {
throwIfNotDefined(networkId, 'networkId');
const pathParams = {
networkId
};
return this.get({
path: '/api/enterprise/integration/alfresco-cloud/networks/{networkId}/sites',
pathParams
});
}
/**
* List files and folders inside a specific folder identified by path
*
* @param networkId networkId
* @param opts Optional parameters
* @param opts.siteId {string} siteId
* @param opts.path {string} path
* @return Promise<ResultListDataRepresentationAlfrescoContentRepresentation>
*/
getContentInFolderPath(
networkId: string,
opts?: { siteId?: string; path?: string }
): Promise<ResultListDataRepresentationAlfrescoContentRepresentation> {
throwIfNotDefined(networkId, 'networkId');
const pathParams = {
networkId
};
return this.get({
path: '/api/enterprise/integration/alfresco-cloud/networks/{networkId}/sites/{siteId}/folderpath/{folderPath}/content',
pathParams,
queryParams: opts
});
}
/**
* List files and folders inside a specific folder
*
* @param networkId networkId
* @param folderId folderId
* @return Promise<ResultListDataRepresentationAlfrescoContentRepresentation>
*/
getContentInFolder(networkId: string, folderId: string): Promise<ResultListDataRepresentationAlfrescoContentRepresentation> {
throwIfNotDefined(networkId, 'networkId');
throwIfNotDefined(folderId, 'folderId');
const pathParams = {
networkId,
folderId
};
return this.get({
path: '/api/enterprise/integration/alfresco-cloud/networks/{networkId}/folders/{folderId}/content',
pathParams
});
}
/**
* List files and folders inside a specific site
*
* @param networkId networkId
* @param siteId siteId
* @return Promise<ResultListDataRepresentationAlfrescoContentRepresentation>
*/
getContentInSite(networkId: string, siteId: string): Promise<ResultListDataRepresentationAlfrescoContentRepresentation> {
throwIfNotDefined(networkId, 'networkId');
throwIfNotDefined(siteId, 'siteId');
const pathParams = {
networkId,
siteId
};
return this.get({
path: '/api/enterprise/integration/alfresco-cloud/networks/{networkId}/sites/{siteId}/content',
pathParams
});
}
}

View File

@@ -0,0 +1,140 @@
/*!
* @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 {
ResultListDataRepresentationAlfrescoContentRepresentation,
ResultListDataRepresentationAlfrescoEndpointRepresentation,
ResultListDataRepresentationAlfrescoSiteRepresenation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* IntegrationAlfrescoOnPremiseApi service.
*/
export class IntegrationAlfrescoOnPremiseApi extends BaseApi {
/**
* List Alfresco sites
* Returns ALL Sites
*
* @param repositoryId repositoryId
* @return Promise<ResultListDataRepresentationAlfrescoSiteRepresenation>
*/
getAllSites(repositoryId: string): Promise<ResultListDataRepresentationAlfrescoSiteRepresenation> {
throwIfNotDefined(repositoryId, 'networkId');
const pathParams = {
repositoryId
};
return this.get({
path: '/api/enterprise/integration/alfresco/{repositoryId}/sites',
pathParams
});
}
/**
* List files and folders inside a specific folder identified by folder path
*
* @param repositoryId repositoryId
* @param siteId siteId
* @param folderPath folderPath
* @return Promise<ResultListDataRepresentationAlfrescoContentRepresentation>
*/
getContentInFolderPath(
repositoryId: string,
siteId: string,
folderPath: string
): Promise<ResultListDataRepresentationAlfrescoContentRepresentation> {
throwIfNotDefined(repositoryId, 'networkId');
throwIfNotDefined(siteId, 'siteId');
throwIfNotDefined(folderPath, 'folderPath');
const pathParams = {
repositoryId,
siteId,
folderPath
};
return this.get({
path: '/api/enterprise/rest/integration/alfresco/{repositoryId}/sites/{siteId}/folderpath/{folderPath}/content',
pathParams
});
}
/**
* List files and folders inside a specific folder
*
* @param repositoryId repositoryId
* @param folderId folderId
* @return Promise<ResultListDataRepresentationAlfrescoContentRepresentation>
*/
getContentInFolder(repositoryId: string, folderId: string): Promise<ResultListDataRepresentationAlfrescoContentRepresentation> {
throwIfNotDefined(repositoryId, 'networkId');
throwIfNotDefined(folderId, 'folderId');
const pathParams = {
repositoryId,
folderId
};
return this.get({
path: '/api/enterprise/integration/alfresco/{repositoryId}/folders/{folderId}/content',
pathParams
});
}
/**
* List files and folders inside a specific site
*
* @param repositoryId repositoryId
* @param siteId siteId
* @return Promise<ResultListDataRepresentationAlfrescoContentRepresentation>
*/
getContentInSite(repositoryId: string, siteId: string): Promise<ResultListDataRepresentationAlfrescoContentRepresentation> {
throwIfNotDefined(repositoryId, 'networkId');
throwIfNotDefined(siteId, 'siteId');
const pathParams = {
repositoryId,
siteId
};
return this.get({
path: '/api/enterprise/integration/alfresco/{repositoryId}/sites/{siteId}/content',
pathParams
});
}
/**
* List Alfresco repositories
*
* A tenant administrator can configure one or more Alfresco repositories to use when working with content.
*
* @param opts Optional parameters
* @param opts.tenantId {string} tenantId
* @param opts.includeAccounts {boolean} includeAccounts (default to true)
* @return Promise<ResultListDataRepresentationAlfrescoEndpointRepresentation>
*/
getRepositories(opts?: { tenantId?: string; includeAccounts?: boolean }): Promise<ResultListDataRepresentationAlfrescoEndpointRepresentation> {
return this.get({
path: '/api/enterprise/profile/accounts/alfresco',
queryParams: opts,
returnType: ResultListDataRepresentationAlfrescoEndpointRepresentation
});
}
}

View File

@@ -0,0 +1,155 @@
/*!
* @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 { ResultListDataRepresentationBoxContent, UserAccountCredentialsRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* IntegrationBoxApi service.
*/
export class IntegrationBoxApi extends BaseApi {
/**
* Box Authorization
* Returns Box OAuth HTML Page
*
* @return Promise<{}>
*/
confirmAuthorisation(): Promise<any> {
return this.get({
path: '/api/enterprise/integration/box/confirm-auth-request',
accepts: ['text/html']
});
}
/**
* Add Box account
*
* @param userId userId
* @param credentials credentials
* @return Promise<{}>
*/
createRepositoryAccount(userId: number, credentials: UserAccountCredentialsRepresentation): Promise<any> {
throwIfNotDefined(userId, 'userId');
throwIfNotDefined(credentials, 'credentials');
const pathParams = {
userId
};
return this.post({
path: '/api/enterprise/integration/box/{userId}/account',
pathParams,
bodyParam: credentials
});
}
/**
* Delete account information
*
* @param userId userId
* @return Promise<{}>
*/
deleteRepositoryAccount(userId: number): Promise<void> {
throwIfNotDefined(userId, 'userId');
const pathParams = {
userId
};
const accepts = ['*/*'];
return this.delete({
path: '/api/enterprise/integration/box/{userId}/account',
pathParams,
accepts
});
}
/**
* Get status information
*
* @return Promise<boolean>
*/
getBoxPluginStatus(): Promise<boolean> {
return this.get({
path: '/api/enterprise/integration/box/status',
accepts: ['*/*']
});
}
/**
* List file and folders
*
* @param opts Optional parameters
* @param opts.filter filter
* @param opts.parent parent
* @return Promise<ResultListDataRepresentationBoxContent>
*/
getFiles(opts?: { filter?: string; parent?: string }): Promise<ResultListDataRepresentationBoxContent> {
opts = opts || {};
return this.get({
path: '/api/enterprise/integration/box/files',
queryParams: opts,
accepts: ['*/*']
});
}
/**
* Get account information
*
* @param userId userId
* @return Promise<{}>
*/
getRepositoryAccount(userId: number): Promise<any> {
throwIfNotDefined(userId, 'userId');
const pathParams = {
userId
};
return this.get({
path: '/api/enterprise/integration/box/{userId}/account',
pathParams,
accepts: ['*/*']
});
}
/**
* Update account information
*
* @param userId userId
* @param credentials credentials
* @return Promise<{}>
*/
updateRepositoryAccount(userId: number, credentials: UserAccountCredentialsRepresentation): Promise<any> {
throwIfNotDefined(userId, 'userId');
throwIfNotDefined(credentials, 'credentials');
const pathParams = {
userId
};
return this.put({
path: '/api/enterprise/integration/box/{userId}/account',
pathParams,
bodyParam: credentials,
accepts: ['*/*']
});
}
}

View File

@@ -0,0 +1,53 @@
/*!
* @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 { ResultListDataRepresentationGoogleDriveContent } from '../model';
import { BaseApi } from './base.api';
/**
* IntegrationDriveApi service.
*/
export class IntegrationDriveApi extends BaseApi {
/**
* Drive Authorization
* Returns Drive OAuth HTML Page
*
* @return Promise<{}>
*/
confirmAuthorisation(): Promise<any> {
return this.get({
path: '/api/enterprise/integration/google-drive/confirm-auth-request',
accepts: ['text/html']
});
}
/**
* List files and folders
*
* @param opts Optional parameters
* @param opts.filter {string} filter
* @param opts.parent {string} parent
* @param opts.currentFolderOnly {boolean} currentFolderOnly
* @return Promise<ResultListDataRepresentationGoogleDriveContent>
*/
getFiles(opts?: { filter?: string; parent?: string; currentFolderOnly?: boolean }): Promise<ResultListDataRepresentationGoogleDriveContent> {
return this.get({
path: '/api/enterprise/integration/google-drive/files',
queryParams: opts
});
}
}

View File

@@ -0,0 +1,96 @@
/*!
* @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 { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
export class ModelJsonBpmnApi extends BaseApi {
/**
* Export a previous process definition model to a JSON
*
* @param processModelId processModelId
* @param processModelHistoryId processModelHistoryId
*/
getHistoricEditorDisplayJsonClient(processModelId: number, processModelHistoryId: number) {
throwIfNotDefined(processModelId, 'processModelId');
throwIfNotDefined(processModelHistoryId, 'processModelHistoryId');
const pathParams = {
processModelId,
processModelHistoryId
};
return this.get({
path: '/app/rest/models/{processModelId}/history/{processModelHistoryId}/model-json',
pathParams
});
}
/**
* Export a process definition model to a JSON
*
* @param processModelId processModelId
*/
getEditorDisplayJsonClient(processModelId: number) {
throwIfNotDefined(processModelId, 'processModelId');
const pathParams = {
processModelId
};
return this.get({
path: '/app/rest/models/{processModelId}/model-json',
pathParams
});
}
/**
* Function to receive the result of the getModelJSONForProcessDefinition operation.
*
* @param processDefinitionId processDefinitionId
*/
getModelJSON(processDefinitionId: string) {
throwIfNotDefined(processDefinitionId, 'processDefinitionId');
const pathParams = {
processDefinitionId
};
return this.get({
path: '/app/rest/process-definitions/{processDefinitionId}/model-json',
pathParams
});
}
/**
* Function to receive the result of the getModelHistoryJSON operation.
*
* @param processInstanceId processInstanceId
*/
getModelJSONForProcessDefinition(processInstanceId: string) {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/app/rest/process-instances/{processInstanceId}/model-json',
pathParams
});
}
}

View File

@@ -0,0 +1,314 @@
/*!
* @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 { ModelRepresentation, ObjectNode, ResultListDataRepresentationModelRepresentation, ValidationErrorRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
export interface GetModelsQuery {
filter?: string;
sort?: string;
modelType?: number;
referenceId?: number;
}
/**
* Models service.
*/
export class ModelsApi extends BaseApi {
/**
* Create a new model
*
* @param modelRepresentation modelRepresentation
* @return Promise<ModelRepresentation>
*/
createModel(modelRepresentation: ModelRepresentation): Promise<ModelRepresentation> {
throwIfNotDefined(modelRepresentation, 'modelRepresentation');
return this.post({
path: '/api/enterprise/models',
bodyParam: modelRepresentation,
returnType: ModelRepresentation
});
}
/**
* Delete a model
*
* @param modelId modelId
* @param opts Optional parameters
* @param opts.cascade cascade
* @param opts.deleteRuntimeApp deleteRuntimeApp
* @return Promise<{}>
*/
deleteModel(modelId: number, opts?: { cascade?: boolean; deleteRuntimeApp?: boolean }): Promise<any> {
throwIfNotDefined(modelId, 'modelId');
const pathParams = {
modelId
};
const queryParams = {
cascade: opts?.cascade,
deleteRuntimeApp: opts?.deleteRuntimeApp
};
return this.delete({
path: '/api/enterprise/models/{modelId}',
pathParams,
queryParams
});
}
/**
* Duplicate an existing model
*
* @param modelId modelId
* @param modelRepresentation modelRepresentation
* @return Promise<ModelRepresentation>
*/
duplicateModel(modelId: number, modelRepresentation: ModelRepresentation): Promise<ModelRepresentation> {
throwIfNotDefined(modelId, 'modelId');
throwIfNotDefined(modelRepresentation, 'modelRepresentation');
const pathParams = {
modelId
};
return this.post({
path: '/api/enterprise/models/{modelId}/clone',
pathParams,
bodyParam: modelRepresentation,
returnType: ModelRepresentation
});
}
/**
* Get model content
*
* @param modelId modelId
* @return Promise<ObjectNode>
*/
getModelJSON(modelId: number): Promise<ObjectNode> {
throwIfNotDefined(modelId, 'modelId');
const pathParams = {
modelId
};
return this.get({
path: '/api/enterprise/models/{modelId}/editor/json',
pathParams
});
}
/**
* Get a model's thumbnail image
*
* @param modelId modelId
* @return Promise<string>
*/
getModelThumbnail(modelId: number): Promise<string> {
throwIfNotDefined(modelId, 'modelId');
const pathParams = {
modelId
};
return this.get({
path: '/api/enterprise/models/{modelId}/thumbnail',
pathParams,
accepts: ['image/png']
});
}
/**
* Get a model
*
* Models act as containers for process, form, decision table and app definitions
*
* @param modelId modelId
* @param opts Optional parameters
* @return Promise<ModelRepresentation>
*/
getModel(modelId: number, opts?: { includePermissions?: boolean }): Promise<ModelRepresentation> {
throwIfNotDefined(modelId, 'modelId');
const pathParams = {
modelId
};
const queryParams = {
includePermissions: opts?.includePermissions
};
return this.get({
path: '/api/enterprise/models/{modelId}',
pathParams,
queryParams,
returnType: ModelRepresentation
});
}
/**
* List process definition models shared with the current user
*
* @return Promise<ResultListDataRepresentationModelRepresentation>
*/
getModelsToIncludeInAppDefinition(): Promise<ResultListDataRepresentationModelRepresentation> {
return this.get({
path: '/api/enterprise/models-for-app-definition',
returnType: ResultListDataRepresentationModelRepresentation
});
}
/**
* List models (process, form, decision rule or app)
*
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationModelRepresentation>
*/
getModels(opts?: GetModelsQuery): Promise<ResultListDataRepresentationModelRepresentation> {
return this.get({
path: '/api/enterprise/models',
queryParams: opts,
returnType: ResultListDataRepresentationModelRepresentation
});
}
/**
* Create a new version of a model
*
* @param modelId modelId
* @param file file
* @return Promise<ModelRepresentation>
*/
importNewVersion(modelId: number, file: any): Promise<ModelRepresentation> {
throwIfNotDefined(modelId, 'modelId');
throwIfNotDefined(file, 'file');
const pathParams = {
modelId
};
const formParams = {
file
};
return this.post({
path: '/api/enterprise/models/{modelId}/newversion',
pathParams,
formParams,
contentTypes: ['multipart/form-data'],
returnType: ModelRepresentation
});
}
/**
* Import a BPMN 2.0 XML file
*
* @param file file
* @return Promise<ModelRepresentation>
*/
importProcessModel(file: any): Promise<ModelRepresentation> {
throwIfNotDefined(file, 'file');
const formParams = {
file
};
return this.post({
path: '/api/enterprise/process-models/import',
contentTypes: ['multipart/form-data'],
formParams,
returnType: ModelRepresentation
});
}
/**
* Update model content
*
* @param modelId modelId
* @param values values
* @return Promise<ModelRepresentation>
*/
saveModel(modelId: number, values: any): Promise<ModelRepresentation> {
throwIfNotDefined(modelId, 'modelId');
throwIfNotDefined(values, 'values');
const pathParams = {
modelId
};
return this.post({
path: '/api/enterprise/models/{modelId}/editor/json',
pathParams,
bodyParam: values,
returnType: ModelRepresentation
});
}
/**
* Update a model
*
* This method allows you to update the metadata of a model. In order to update the content of the model you will need to call the specific endpoint for that model type.
*
* @param modelId modelId
* @param updatedModel updatedModel
* @return Promise<ModelRepresentation>
*/
updateModel(modelId: number, updatedModel: ModelRepresentation): Promise<ModelRepresentation> {
throwIfNotDefined(modelId, 'modelId');
throwIfNotDefined(updatedModel, 'updatedModel');
const pathParams = {
modelId
};
return this.put({
path: '/api/enterprise/models/{modelId}',
pathParams,
bodyParam: updatedModel,
returnType: ModelRepresentation
});
}
/**
* Validate model content
*
* @param modelId modelId
* @param opts Optional parameters
* @param opts.values values
* @return Promise<ValidationErrorRepresentation>
*/
validateModel(modelId: number, opts?: { values?: any }): Promise<ValidationErrorRepresentation> {
throwIfNotDefined(modelId, 'modelId');
const postBody = opts?.values;
const pathParams = {
modelId
};
return this.post({
path: '/api/enterprise/models/{modelId}/editor/validate',
pathParams,
bodyParam: postBody,
contentTypes: ['application/x-www-form-urlencoded']
});
}
}

View File

@@ -0,0 +1,71 @@
/*!
* @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 { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* ModelsBpmnApi service.
*/
export class ModelsBpmnApi extends BaseApi {
/**
* Export a historic version of a process definition as BPMN 2.0 XML
*
* @param processModelId processModelId
* @param processModelHistoryId processModelHistoryId
* @return Promise<{}>
*/
getHistoricProcessModelBpmn20Xml(processModelId: number, processModelHistoryId: number): Promise<any> {
throwIfNotDefined(processModelId, 'processModelId');
throwIfNotDefined(processModelHistoryId, 'processModelHistoryId');
const pathParams = {
processModelId,
processModelHistoryId
};
const accepts = ['application/xml'];
return this.get({
path: '/api/enterprise/models/{processModelId}/history/{processModelHistoryId}/bpmn20',
pathParams,
accepts
});
}
/**
* Export a process definition as BPMN 2.0 XML
*
* @param processModelId processModelId
* @return Promise<{}>
*/
getProcessModelBpmn20Xml(processModelId: number): Promise<any> {
throwIfNotDefined(processModelId, 'processModelId');
const pathParams = {
processModelId
};
const accepts = ['application/xml'];
return this.get({
path: '/api/enterprise/models/{processModelId}/bpmn20',
pathParams,
accepts
});
}
}

View File

@@ -0,0 +1,76 @@
/*!
* @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 { ModelRepresentation } from '../model/modelRepresentation';
import { ResultListDataRepresentationModelRepresentation } from '../model/resultListDataRepresentationModelRepresentation';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* ModelsHistoryApi service.
*/
export class ModelsHistoryApi extends BaseApi {
/**
* List a model's historic versions
*
* @param modelId modelId
* @param opts Optional parameters
* @param opts.includeLatestVersion includeLatestVersion
* @return Promise<ResultListDataRepresentationModelRepresentation>
*/
getModelHistoryCollection(modelId: number, opts?: { includeLatestVersion?: boolean }): Promise<ResultListDataRepresentationModelRepresentation> {
throwIfNotDefined(modelId, 'modelId');
const pathParams = {
modelId
};
const queryParams = {
includeLatestVersion: opts?.includeLatestVersion
};
return this.get({
path: '/api/enterprise/models/{modelId}/history',
pathParams,
queryParams,
returnType: ResultListDataRepresentationModelRepresentation
});
}
/**
* Get a historic version of a model
*
* @param modelId modelId
* @param modelHistoryId modelHistoryId
* @return Promise<ModelRepresentation>
*/
getProcessModelHistory(modelId: number, modelHistoryId: number): Promise<ModelRepresentation> {
throwIfNotDefined(modelId, 'modelId');
throwIfNotDefined(modelHistoryId, 'modelHistoryId');
const pathParams = {
modelId,
modelHistoryId
};
return this.get({
path: '/api/enterprise/models/{modelId}/history/{modelHistoryId}',
pathParams,
returnType: ModelRepresentation
});
}
}

View File

@@ -0,0 +1,259 @@
/*!
* @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 {
FormDefinitionRepresentation,
FormValueRepresentation,
IdentityLinkRepresentation,
ResultListDataRepresentationProcessDefinitionRepresentation,
ResultListDataRepresentationRuntimeDecisionTableRepresentation,
ResultListDataRepresentationRuntimeFormRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* ProcessDefinitionsApi service.
*/
export class ProcessDefinitionsApi extends BaseApi {
/**
* Add a user or group involvement to a process definition
*
* @param processDefinitionId processDefinitionId
* @param identityLinkRepresentation identityLinkRepresentation
* @return Promise<IdentityLinkRepresentation>
*/
createIdentityLink(processDefinitionId: string, identityLinkRepresentation: IdentityLinkRepresentation): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(processDefinitionId, 'processDefinitionId');
throwIfNotDefined(identityLinkRepresentation, 'identityLinkRepresentation');
const pathParams = {
processDefinitionId
};
return this.post({
path: '/api/enterprise/process-definitions/{processDefinitionId}/identitylinks',
pathParams,
bodyParam: identityLinkRepresentation
});
}
/**
* Remove a user or group involvement from a process definition
*
* @param processDefinitionId Process definition ID
* @param family Identity type
* @param identityId User or group ID
* @return Promise<{}>
*/
deleteIdentityLink(processDefinitionId: string, family: string, identityId: string): Promise<void> {
throwIfNotDefined(processDefinitionId, 'processDefinitionId');
throwIfNotDefined(family, 'family');
throwIfNotDefined(identityId, 'identityId');
const pathParams = {
processDefinitionId,
family,
identityId
};
return this.delete({
path: '/api/enterprise/process-definitions/{processDefinitionId}/identitylinks/{family}/{identityId}',
pathParams
});
}
/**
* Get a user or group involvement with a process definition
*
* @param processDefinitionId Process definition ID
* @param family Identity type
* @param identityId User or group ID
* @return Promise<IdentityLinkRepresentation>
*/
getIdentityLinkType(processDefinitionId: string, family: string, identityId: string): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(processDefinitionId, 'processDefinitionId');
throwIfNotDefined(family, 'family');
throwIfNotDefined(identityId, 'identityId');
const pathParams = {
processDefinitionId,
family,
identityId
};
return this.get({
path: '/api/enterprise/process-definitions/{processDefinitionId}/identitylinks/{family}/{identityId}',
pathParams
});
}
/**
* List either the users or groups involved with a process definition
*
* @param processDefinitionId processDefinitionId
* @param family Identity type
* @return Promise<IdentityLinkRepresentation>
*/
getIdentityLinksForFamily(processDefinitionId: string, family: string): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(processDefinitionId, 'processDefinitionId');
throwIfNotDefined(family, 'family');
const pathParams = {
processDefinitionId,
family
};
return this.get({
path: '/api/enterprise/process-definitions/{processDefinitionId}/identitylinks/{family}',
pathParams
});
}
/**
* List the users and groups involved with a process definition
*
* @param processDefinitionId processDefinitionId
* @return Promise<IdentityLinkRepresentation>
*/
getIdentityLinks(processDefinitionId: string): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(processDefinitionId, 'processDefinitionId');
const pathParams = {
processDefinitionId
};
return this.get({
path: '/api/enterprise/process-definitions/{processDefinitionId}/identitylinks',
pathParams
});
}
/**
* List the decision tables associated with a process definition
*
* @param processDefinitionId processDefinitionId
* @return Promise<ResultListDataRepresentationRuntimeDecisionTableRepresentation>
*/
getProcessDefinitionDecisionTables(processDefinitionId: string): Promise<ResultListDataRepresentationRuntimeDecisionTableRepresentation> {
throwIfNotDefined(processDefinitionId, 'processDefinitionId');
const pathParams = {
processDefinitionId
};
return this.get({
path: '/api/enterprise/process-definitions/{processDefinitionId}/decision-tables',
pathParams
});
}
/**
* List the forms associated with a process definition
*
* @param processDefinitionId processDefinitionId
* @return Promise<ResultListDataRepresentationRuntimeFormRepresentation>
*/
getProcessDefinitionForms(processDefinitionId: string): Promise<ResultListDataRepresentationRuntimeFormRepresentation> {
throwIfNotDefined(processDefinitionId, 'processDefinitionId');
const pathParams = {
processDefinitionId
};
return this.get({
path: '/api/enterprise/process-definitions/{processDefinitionId}/forms',
pathParams
});
}
/**
* Retrieve the start form for a process definition
*
* @param processDefinitionId processDefinitionId
* @return Promise<FormDefinitionRepresentation>
*/
getProcessDefinitionStartForm(processDefinitionId: string): Promise<FormDefinitionRepresentation> {
const pathParams = {
processDefinitionId
};
return this.get({
path: '/api/enterprise/process-definitions/{processDefinitionId}/start-form',
pathParams
});
}
/**
* Retrieve a list of process definitions
*
* Get a list of process definitions (visible within the tenant of the user)
*
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationProcessDefinitionRepresentation>
*/
getProcessDefinitions(opts?: {
latest?: boolean;
appDefinitionId?: number;
deploymentId?: string;
}): Promise<ResultListDataRepresentationProcessDefinitionRepresentation> {
return this.get({
path: '/api/enterprise/process-definitions',
queryParams: opts
});
}
/**
* Retrieve field values (e.g. the typeahead field)
*
* @param processDefinitionId processDefinitionId
* @param field field
* @return Promise<FormValueRepresentation[]>
*/
getRestFieldValues(processDefinitionId: string, field: string): Promise<FormValueRepresentation[]> {
const pathParams = {
processDefinitionId,
field
};
return this.get({
path: '/api/enterprise/process-definitions/{processDefinitionId}/start-form-values/{field}',
pathParams
});
}
/**
* Retrieve field values (eg. the table field)
*
* @param processDefinitionId processDefinitionId
* @param field field
* @param column column
* @return Promise<FormValueRepresentation []>
*/
getRestTableFieldValues(processDefinitionId: string, field: string, column: string): Promise<FormValueRepresentation[]> {
const pathParams = {
processDefinitionId,
field,
column
};
return this.get({
path: '/api/enterprise/process-definitions/{processDefinitionId}/start-form-values/{field}/{column}',
pathParams
});
}
}

View File

@@ -0,0 +1,135 @@
/*!
* @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 { RestVariable } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* ProcessInstanceVariablesApi service.
*/
export class ProcessInstanceVariablesApi extends BaseApi {
/**
* Create or update variables
*
* @param processInstanceId Process instance ID
* @param restVariables restVariables
* @return Promise<RestVariable>
*/
createOrUpdateProcessInstanceVariables(processInstanceId: string, restVariables: RestVariable[]): Promise<RestVariable[]> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
throwIfNotDefined(restVariables, 'restVariables');
const pathParams = {
processInstanceId
};
return this.put({
path: '/api/enterprise/process-instances/{processInstanceId}/variables',
pathParams,
bodyParam: restVariables
});
}
/**
* Delete a variable
*
* @param processInstanceId processInstanceId
* @param variableName variableName
* @return Promise<{}>
*/
deleteProcessInstanceVariable(processInstanceId: string, variableName: string): Promise<void> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
throwIfNotDefined(variableName, 'variableName');
const pathParams = {
processInstanceId,
variableName
};
return this.delete({
path: '/api/enterprise/process-instances/{processInstanceId}/variables/{variableName}',
pathParams
});
}
/**
* Get a variable
*
* @param processInstanceId processInstanceId
* @param variableName variableName
* @return Promise<RestVariable>
*/
getProcessInstanceVariable(processInstanceId: string, variableName: string): Promise<RestVariable> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
throwIfNotDefined(variableName, 'variableName');
const pathParams = {
processInstanceId,
variableName
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/variables/{variableName}',
pathParams
});
}
/**
* List variables
*
* @param processInstanceId Process instance ID
* @return Promise<RestVariable>
*/
getProcessInstanceVariables(processInstanceId: string): Promise<RestVariable[]> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/variables',
pathParams
});
}
/**
* Update a variable
*
* @param processInstanceId processInstanceId
* @param variableName variableName
* @param restVariable restVariable
* @return Promise<RestVariable>
*/
updateProcessInstanceVariable(processInstanceId: string, variableName: string, restVariable: RestVariable): Promise<RestVariable> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
throwIfNotDefined(variableName, 'variableName');
throwIfNotDefined(restVariable, 'restVariable');
const pathParams = {
processInstanceId,
variableName
};
return this.put({
path: '/api/enterprise/process-instances/{processInstanceId}/variables/{variableName}',
pathParams,
bodyParam: restVariable
});
}
}

View File

@@ -0,0 +1,453 @@
/*!
* @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 {
CreateProcessInstanceRepresentation,
FormDefinitionRepresentation,
HistoricProcessInstanceQueryRepresentation,
IdentityLinkRepresentation,
ProcessInstanceAuditInfoRepresentation,
ProcessInstanceFilterRequestRepresentation,
ProcessInstanceQueryRepresentation,
ProcessInstanceRepresentation,
ProcessInstanceVariableRepresentation,
ResultListDataRepresentationDecisionTaskRepresentation,
ResultListDataRepresentationProcessContentRepresentation,
ResultListDataRepresentationProcessInstanceRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* Process Instances service.
*/
export class ProcessInstancesApi extends BaseApi {
/**
* Activate a process instance
*
* @param processInstanceId processInstanceId
* @return Promise<ProcessInstanceRepresentation>
*/
activateProcessInstance(processInstanceId: string): Promise<ProcessInstanceRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.put({
path: '/api/enterprise/process-instances/{processInstanceId}/activate',
pathParams,
returnType: ProcessInstanceRepresentation
});
}
/**
* Add a user or group involvement to a process instance
*
* @param processInstanceId processInstanceId
* @param identityLinkRepresentation identityLinkRepresentation
* @return Promise<IdentityLinkRepresentation>
*/
createIdentityLink(processInstanceId: string, identityLinkRepresentation: IdentityLinkRepresentation): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
throwIfNotDefined(identityLinkRepresentation, 'identityLinkRepresentation');
const pathParams = {
processInstanceId
};
return this.post({
path: '/api/enterprise/process-instances/{processInstanceId}/identitylinks',
pathParams,
bodyParam: identityLinkRepresentation
});
}
/**
* Remove a user or group involvement from a process instance
*
* @param processInstanceId processInstanceId
* @param family family
* @param identityId identityId
* @param type type
* @return Promise<{}>
*/
deleteIdentityLink(processInstanceId: string, family: string, identityId: string, type: string): Promise<void> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
throwIfNotDefined(family, 'family');
throwIfNotDefined(identityId, 'identityId');
throwIfNotDefined(type, 'type');
const pathParams = {
processInstanceId,
family,
identityId,
type
};
return this.delete({
path: '/api/enterprise/process-instances/{processInstanceId}/identitylinks/{family}/{identityId}/{type}',
pathParams
});
}
/**
* Cancel or remove a process instance
*
* If the process instance has not yet been completed, it will be cancelled. If it has already finished or been cancelled then the process instance will be removed and will no longer appear in queries.
*
* @param processInstanceId processInstanceId
* @return Promise<{}>
*/
deleteProcessInstance(processInstanceId: string): Promise<void> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.delete({
path: '/api/enterprise/process-instances/{processInstanceId}',
pathParams
});
}
/**
* List process instances using a filter
*
* The request body provided must define either a valid filterId value or filter object
*
* @param filterRequest filterRequest
* @return Promise<ResultListDataRepresentationProcessInstanceRepresentation>
*/
filterProcessInstances(
filterRequest: ProcessInstanceFilterRequestRepresentation
): Promise<ResultListDataRepresentationProcessInstanceRepresentation> {
throwIfNotDefined(filterRequest, 'filterRequest');
return this.post({
path: '/api/enterprise/process-instances/filter',
bodyParam: filterRequest,
returnType: ResultListDataRepresentationProcessInstanceRepresentation
});
}
/**
* Get decision tasks in a process instance
*
* @param processInstanceId processInstanceId
* @return Promise<ResultListDataRepresentationDecisionTaskRepresentation>
*/
getHistoricProcessInstanceDecisionTasks(processInstanceId: string): Promise<ResultListDataRepresentationDecisionTaskRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/decision-tasks',
pathParams,
returnType: ResultListDataRepresentationDecisionTaskRepresentation
});
}
/**
* Get historic variables for a process instance
*
* @param processInstanceId processInstanceId
* @return Promise<ProcessInstanceVariableRepresentation>
*/
getHistoricProcessInstanceVariables(processInstanceId: string): Promise<ProcessInstanceVariableRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/historic-variables',
pathParams
});
}
/**
* Query historic process instances
*
* @param queryRequest queryRequest
* @return Promise<ResultListDataRepresentationProcessInstanceRepresentation>
*/
getHistoricProcessInstances(
queryRequest: HistoricProcessInstanceQueryRepresentation
): Promise<ResultListDataRepresentationProcessInstanceRepresentation> {
throwIfNotDefined(queryRequest, 'queryRequest');
return this.post({
path: '/api/enterprise/historic-process-instances/query',
bodyParam: queryRequest,
returnType: ResultListDataRepresentationProcessInstanceRepresentation
});
}
/**
* Get a user or group involvement with a process instance
*
* @param processInstanceId processInstanceId
* @param family family
* @param identityId identityId
* @param type type
* @return Promise<IdentityLinkRepresentation>
*/
getIdentityLinkType(processInstanceId: string, family: string, identityId: string, type: string): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
throwIfNotDefined(family, 'family');
throwIfNotDefined(identityId, 'identityId');
throwIfNotDefined(type, 'type');
const pathParams = {
processInstanceId,
family,
identityId,
type
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/identitylinks/{family}/{identityId}/{type}',
pathParams
});
}
/**
* List either the users or groups involved with a process instance
*
* @param processInstanceId processInstanceId
* @param family family
* @return Promise<IdentityLinkRepresentation>
*/
getIdentityLinksForFamily(processInstanceId: string, family: string): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
throwIfNotDefined(family, 'family');
const pathParams = {
processInstanceId,
family
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/identitylinks/{family}',
pathParams
});
}
/**
* List the users and groups involved with a process instance
*
* @param processInstanceId processInstanceId
* @return Promise<IdentityLinkRepresentation>
*/
getIdentityLinks(processInstanceId: string): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/identitylinks',
pathParams
});
}
/**
* List content attached to process instance fields
*
* @param processInstanceId processInstanceId
* @return Promise<ResultListDataRepresentationProcessContentRepresentation>
*/
getProcessInstanceContent(processInstanceId: string): Promise<ResultListDataRepresentationProcessContentRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/field-content',
pathParams,
returnType: ResultListDataRepresentationProcessContentRepresentation
});
}
/**
* Get the process diagram for the process instance
*
* @param processInstanceId processInstanceId
* @return Promise<string>
*/
getProcessInstanceDiagram(processInstanceId: string): Promise<string> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
const accepts = ['image/png'];
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/diagram',
pathParams,
accepts
});
}
/**
* Get a process instance start form
*
* The start form for a process instance can be retrieved when the process definition has a start form defined (hasStartForm = true on the process instance)
*
* @param processInstanceId processInstanceId
* @return Promise<FormDefinitionRepresentation>
*/
getProcessInstanceStartForm(processInstanceId: string): Promise<FormDefinitionRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/start-form',
pathParams
});
}
/**
* Get a process instance
*
* @param processInstanceId processInstanceId
* @return Promise<ProcessInstanceRepresentation>
*/
getProcessInstance(processInstanceId: string): Promise<ProcessInstanceRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}',
pathParams,
returnType: ProcessInstanceRepresentation
});
}
/**
* Query process instances
*
* @param processInstancesQuery processInstancesQuery
* @return Promise<ResultListDataRepresentationProcessInstanceRepresentation>
*/
getProcessInstances(
processInstancesQuery: ProcessInstanceQueryRepresentation
): Promise<ResultListDataRepresentationProcessInstanceRepresentation> {
throwIfNotDefined(processInstancesQuery, 'processInstancesQuery');
return this.post({
path: '/api/enterprise/process-instances/query',
bodyParam: processInstancesQuery,
returnType: ResultListDataRepresentationProcessInstanceRepresentation
});
}
/**
* Get the audit log for a process instance
*
* @param processInstanceId processInstanceId
* @return Promise<ProcessInstanceAuditInfoRepresentation>
*/
getTaskAuditLog(processInstanceId: string): Promise<ProcessInstanceAuditInfoRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.get({
path: '/api/enterprise/process-instances/{processInstanceId}/audit-log',
pathParams
});
}
/**
* Retrieve the process audit in the PDF format
*
* @param processInstanceId processId
* @returns process audit
*/
getProcessAuditPdf(processInstanceId: string): Promise<Blob> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
const responseType = 'blob';
return this.get({
path: '/app/rest/process-instances/{processInstanceId}/audit',
pathParams,
responseType
});
}
/**
* Start a process instance
*
* @param startRequest startRequest
* @return Promise<ProcessInstanceRepresentation>
*/
startNewProcessInstance(startRequest: CreateProcessInstanceRepresentation): Promise<ProcessInstanceRepresentation> {
throwIfNotDefined(startRequest, 'startRequest');
return this.post({
path: '/api/enterprise/process-instances',
bodyParam: startRequest,
returnType: ProcessInstanceRepresentation
});
}
/**
* Suspend a process instance
*
* @param processInstanceId processInstanceId
* @return Promise<ProcessInstanceRepresentation>
*/
suspendProcessInstance(processInstanceId: string): Promise<ProcessInstanceRepresentation> {
throwIfNotDefined(processInstanceId, 'processInstanceId');
const pathParams = {
processInstanceId
};
return this.put({
path: '/api/enterprise/process-instances/{processInstanceId}/suspend',
pathParams,
returnType: ProcessInstanceRepresentation
});
}
}

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 { ProcessScopeRepresentation, ProcessScopesRequestRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* ProcessScopesApi service.
*/
export class ProcessScopesApi extends BaseApi {
/**
* List runtime process scopes
*
* @param processScopesRequest processScopesRequest
* @return Promise<ProcessScopeRepresentation>
*/
getRuntimeProcessScopes(processScopesRequest: ProcessScopesRequestRepresentation): Promise<ProcessScopeRepresentation> {
throwIfNotDefined(processScopesRequest, 'processScopesRequest');
return this.post({
path: '/api/enterprise/process-scopes',
bodyParam: processScopesRequest
});
}
}

View File

@@ -0,0 +1,172 @@
/*!
* @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 { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
export class ReportApi extends BaseApi {
/**
* Create the default reports
*/
createDefaultReports() {
return this.post({
path: '/app/rest/reporting/default-reports'
});
}
getTasksByProcessDefinitionId(reportId: string, processDefinitionId: string) {
throwIfNotDefined(reportId, 'reportId');
throwIfNotDefined(processDefinitionId, 'processDefinitionId');
const pathParams = {
reportId
};
const queryParams = {
processDefinitionId
};
return this.get({
path: '/app/rest/reporting/report-params/{reportId}/tasks',
pathParams,
queryParams
});
}
getReportsByParams(reportId: string, bodyParam: any) {
throwIfNotDefined(reportId, 'reportId');
const pathParams = {
reportId
};
return this.post({
path: '/app/rest/reporting/report-params/{reportId}',
pathParams,
bodyParam
});
}
getProcessDefinitions() {
return this.get({
path: '/app/rest/reporting/process-definitions'
});
}
getReportParams(reportId: string) {
throwIfNotDefined(reportId, 'reportId');
const pathParams = {
reportId
};
return this.get({
path: '/app/rest/reporting/report-params/{reportId}',
pathParams
});
}
getReportList() {
return this.get({
path: '/app/rest/reporting/reports'
});
}
updateReport(reportId: string, name: string) {
throwIfNotDefined(reportId, 'reportId');
const postBody = {
name
};
const pathParams = {
reportId
};
return this.put({
path: '/app/rest/reporting/reports/{reportId}',
pathParams,
bodyParam: postBody
});
}
/**
* Export a report
*
* @param reportId report id
* @param bodyParam body parameters
*/
exportToCsv(reportId: string, bodyParam: { reportName?: string }) {
throwIfNotDefined(reportId, 'reportId');
throwIfNotDefined(bodyParam, 'bodyParam');
throwIfNotDefined(bodyParam.reportName, 'reportName');
const pathParams = {
reportId
};
return this.post({
path: '/app/rest/reporting/reports/{reportId}/export-to-csv',
pathParams,
bodyParam
});
}
/**
* Save a report
*
* @param reportId report id
* @param opts Optional parameters
*/
saveReport(reportId: string, opts: { reportName?: string }) {
throwIfNotDefined(reportId, 'reportId');
throwIfNotDefined(opts, 'opts');
throwIfNotDefined(opts.reportName, 'reportName');
const bodyParam = {
reportName: opts.reportName,
__reportName: opts.reportName
};
const pathParams = {
reportId
};
return this.post({
path: '/app/rest/reporting/reports/{reportId}',
pathParams,
bodyParam
});
}
/**
* Delete a report
*
* @param reportId report id
*/
deleteReport(reportId: string) {
throwIfNotDefined(reportId, 'reportId');
const pathParams = {
reportId
};
return this.delete({
path: '/app/rest/reporting/reports/{reportId}',
pathParams
});
}
}

View File

@@ -0,0 +1,78 @@
/*!
* @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 {
AppDefinitionRepresentation,
ResultListDataRepresentationAppDefinitionRepresentation,
RuntimeAppDefinitionSaveRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* RuntimeAppDefinitionsApi service.
*/
export class RuntimeAppDefinitionsApi extends BaseApi {
/**
* Deploy a published app
*
* Deploying an app allows the user to see it on his/her landing page. Apps must be published before they can be deployed.
*
* @param saveObject saveObject
* @return Promise<{}>
*/
deployAppDefinitions(saveObject: RuntimeAppDefinitionSaveRepresentation): Promise<any> {
throwIfNotDefined(saveObject, 'saveObject');
return this.post({
path: '/api/enterprise/runtime-app-definitions',
bodyParam: saveObject
});
}
/**
* Get a runtime app
*
* @param appDefinitionId appDefinitionId
* @return Promise<AppDefinitionRepresentation>
*/
getAppDefinition(appDefinitionId: number): Promise<AppDefinitionRepresentation> {
throwIfNotDefined(appDefinitionId, 'appDefinitionId');
const pathParams = {
appDefinitionId
};
return this.get({
path: '/api/enterprise/runtime-app-definitions/{appDefinitionId}',
pathParams
});
}
/**
* List runtime apps
*
* When a user logs in into Alfresco Process Services Suite, a landing page is displayed containing all the apps that the user is allowed to see and use. These are referred to as runtime apps.
*
* @return Promise<ResultListDataRepresentationAppDefinitionRepresentation>
*/
getAppDefinitions(): Promise<ResultListDataRepresentationAppDefinitionRepresentation> {
return this.get({
path: '/api/enterprise/runtime-app-definitions'
});
}
}

View File

@@ -0,0 +1,124 @@
/*!
* @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 { AppDeploymentRepresentation } from '../model/appDeploymentRepresentation';
import { ResultListDataRepresentationAppDeploymentRepresentation } from '../model/resultListDataRepresentationAppDeploymentRepresentation';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* RuntimeAppDeploymentsApi service.
*/
export class RuntimeAppDeploymentsApi extends BaseApi {
/**
* Remove an app deployment
*
* @param appDeploymentId appDeploymentId
* @return Promise<{}>
*/
deleteAppDeployment(appDeploymentId: number): Promise<any> {
throwIfNotDefined(appDeploymentId, 'appDeploymentId');
const pathParams = {
appDeploymentId
};
return this.delete({
path: '/api/enterprise/runtime-app-deployments/{appDeploymentId}',
pathParams
});
}
/**
* Export the app archive for a deployment
*
* @param deploymentId deploymentId
* @return Promise<{}>
*/
exportAppDefinition(deploymentId: string): Promise<any> {
throwIfNotDefined(deploymentId, 'deploymentId');
const pathParams = {
deploymentId
};
const accepts = ['application/zip'];
return this.get({
path: '/api/enterprise/export-app-deployment/{deploymentId}',
pathParams,
accepts
});
}
/**
* Query app deployments
*
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationAppDeploymentRepresentation>
*/
getAppDefinitions(opts?: {
nameLike?: string;
tenantId?: number;
latest?: boolean;
start?: number;
sort?: string;
order?: string;
size?: number;
}): Promise<ResultListDataRepresentationAppDeploymentRepresentation> {
return this.get({
path: '/api/enterprise/runtime-app-deployments',
queryParams: opts,
returnType: ResultListDataRepresentationAppDeploymentRepresentation
});
}
/**
* Get an app deployment
*
* @param appDeploymentId appDeploymentId
* @return Promise<AppDeploymentRepresentation>
*/
getAppDeployment(appDeploymentId: number): Promise<AppDeploymentRepresentation> {
throwIfNotDefined(appDeploymentId, 'appDeploymentId');
const pathParams = {
appDeploymentId
};
return this.get({
path: '/api/enterprise/runtime-app-deployments/{appDeploymentId}',
pathParams,
returnType: AppDeploymentRepresentation
});
}
/**
* Get an app by deployment ID or DMN deployment ID
* Either a deploymentId or a dmnDeploymentId must be provided
*
* @param opts Optional parameters
* @return Promise<AppDeploymentRepresentation>
*/
getRuntimeAppDeploymentByDeployment(opts?: { deploymentId?: string; dmnDeploymentId?: number }): Promise<AppDeploymentRepresentation> {
return this.get({
path: '/api/enterprise/runtime-app-deployment',
queryParams: opts,
returnType: AppDeploymentRepresentation
});
}
}

View File

@@ -0,0 +1,51 @@
/*!
* @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 { BaseApi } from './base.api';
/**
* ScriptFilesApi service.
*/
export class ScriptFilesApi extends BaseApi {
/**
* getControllers
*
* @returns Promise<string>
*/
getControllers(): Promise<string> {
const accepts = ['text/html'];
return this.get({
path: '/api/enterprise/script-files/controllers',
accepts
});
}
/**
* getLibraries
*
* @returns Promise<string>
*/
getLibraries(): Promise<string> {
const accepts = ['text/html'];
return this.get({
path: '/api/enterprise/script-files/libraries',
accepts
});
}
}

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 { ResultListDataRepresentationSubmittedFormRepresentation } from '../model/resultListDataRepresentationSubmittedFormRepresentation';
import { SubmittedFormRepresentation } from '../model/submittedFormRepresentation';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* SubmittedFormsApi service.
*/
export class SubmittedFormsApi extends BaseApi {
/**
* List submissions for a form
*
* @param formId formId
* @param opts Optional parameters
* @return Promise<ResultListDataRepresentationSubmittedFormRepresentation>
*/
getFormSubmittedForms(
formId: number,
opts?: { submittedBy?: number; start?: number; size?: number }
): Promise<ResultListDataRepresentationSubmittedFormRepresentation> {
throwIfNotDefined(formId, 'formId');
const pathParams = {
formId
};
return this.get({
path: '/api/enterprise/form-submitted-forms/{formId}',
pathParams,
queryParams: opts,
returnType: ResultListDataRepresentationSubmittedFormRepresentation
});
}
/**
* List submissions for a process instance
*
* @param processId processId
* @return Promise<ResultListDataRepresentationSubmittedFormRepresentation>
*/
getProcessSubmittedForms(processId: string): Promise<ResultListDataRepresentationSubmittedFormRepresentation> {
throwIfNotDefined(processId, 'processId');
const pathParams = {
processId
};
return this.get({
path: '/api/enterprise/process-submitted-forms/{processId}',
pathParams,
returnType: ResultListDataRepresentationSubmittedFormRepresentation
});
}
/**
* Get a form submission
*
* @param submittedFormId submittedFormId
* @return Promise<SubmittedFormRepresentation>
*/
getSubmittedFrom(submittedFormId: number): Promise<SubmittedFormRepresentation> {
throwIfNotDefined(submittedFormId, 'submittedFormId');
const pathParams = {
submittedFormId
};
return this.get({
path: '/api/enterprise/submitted-forms/{submittedFormId}',
pathParams,
returnType: SubmittedFormRepresentation
});
}
/**
* Get the submitted form for a task
*
* @param taskId taskId
* @return Promise<SubmittedFormRepresentation>
*/
getTaskSubmittedForms(taskId: string): Promise<SubmittedFormRepresentation> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/task-submitted-form/{taskId}',
pathParams,
returnType: SubmittedFormRepresentation
});
}
}

View File

@@ -0,0 +1,95 @@
/*!
* @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 { GlobalDateFormatRepresentation, PasswordValidationConstraints, SystemPropertiesRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* SystemPropertiesApi service.
*/
export class SystemPropertiesApi extends BaseApi {
/**
* Get global date format
*
* @param tenantId tenantId
* @return Promise<GlobalDateFormatRepresentation>
*/
getGlobalDateFormat(tenantId: number): Promise<GlobalDateFormatRepresentation> {
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
tenantId
};
return this.get({
path: '/api/enterprise/system/properties/global-date-format/{tenantId}',
pathParams
});
}
/**
* Get password validation constraints
*
* @param tenantId tenantId
* @return Promise<PasswordValidationConstraints>
*/
getPasswordValidationConstraints(tenantId: number): Promise<PasswordValidationConstraints> {
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
tenantId
};
return this.get({
path: '/api/enterprise/system/properties/password-validation-constraints/{tenantId}',
pathParams
});
}
/**
* Retrieve system properties
*
* Typical value is AllowInvolveByEmail
*
* @return Promise<SystemPropertiesRepresentation>
*/
getProperties(): Promise<SystemPropertiesRepresentation> {
return this.get({
path: '/api/enterprise/system/properties'
});
}
/**
* Get involved users who can edit forms
*
* @param tenantId tenantId
* @return Promise<boolean>
*/
involvedUsersCanEditForms(tenantId: number): Promise<boolean> {
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
tenantId
};
return this.get({
path: '/api/enterprise/system/properties/involved-users-can-edit-forms/{tenantId}',
pathParams
});
}
}

View File

@@ -0,0 +1,269 @@
/*!
* @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 { AssigneeIdentifierRepresentation, FormIdentifierRepresentation, TaskRepresentation, UserIdentifierRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* TaskActionsApi service.
*/
export class TaskActionsApi extends BaseApi {
/**
* Assign a task to a user
*
* @param taskId taskId
* @param userIdentifier userIdentifier
* @return Promise<TaskRepresentation>
*/
assignTask(taskId: string, userIdentifier: AssigneeIdentifierRepresentation): Promise<TaskRepresentation> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(userIdentifier, 'userIdentifier');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/action/assign',
pathParams,
bodyParam: userIdentifier,
returnType: TaskRepresentation
});
}
/**
* Attach a form to a task
*
* @param taskId taskId
* @param formIdentifier formIdentifier
* @return Promise<{}>
*/
attachForm(taskId: string, formIdentifier: FormIdentifierRepresentation): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(formIdentifier, 'formIdentifier');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/action/attach-form',
pathParams,
bodyParam: formIdentifier
});
}
/**
* Claim a task
*
* To claim a task (in case the task is assigned to a group)
*
* @param taskId taskId
* @return Promise<{}>
*/
claimTask(taskId: string): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/action/claim',
pathParams
});
}
/**
* Complete a task
*
* Use this endpoint to complete a standalone task or task without a form
*
* @param taskId taskId
* @return Promise<{}>
*/
completeTask(taskId: string): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/action/complete',
pathParams
});
}
/**
* Delegate a task
*
* @param taskId taskId
* @param userIdentifier userIdentifier
* @return Promise<{}>
*/
delegateTask(taskId: string, userIdentifier: UserIdentifierRepresentation): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(userIdentifier, 'userIdentifier');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/action/delegate',
pathParams,
bodyParam: userIdentifier
});
}
/**
* Involve a group with a task
*
* @param taskId taskId
* @param groupId groupId
* @return Promise<{}>
*/
involveGroup(taskId: string, groupId: string): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(groupId, 'groupId');
const pathParams = {
taskId,
groupId
};
return this.post({
path: '/api/enterprise/tasks/{taskId}/groups/{groupId}',
pathParams
});
}
/**
* Involve a user with a task
*
* @param taskId taskId
* @param userIdentifier userIdentifier
* @return Promise<{}>
*/
involveUser(taskId: string, userIdentifier: UserIdentifierRepresentation): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(userIdentifier, 'userIdentifier');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/action/involve',
pathParams,
bodyParam: userIdentifier
});
}
/**
* Remove a form from a task
*
* @param taskId taskId
* @return Promise<{}>
*/
removeForm(taskId: string): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.delete({
path: '/api/enterprise/tasks/{taskId}/action/remove-form',
pathParams
});
}
/**
* Remove an involved group from a task
*
* @param taskId taskId
* @param identifier identifier
* @return Promise<{}>
*/
removeInvolvedUser(taskId: string, identifier: string | UserIdentifierRepresentation): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(identifier, 'identifier');
const pathParams = {
taskId,
identifier
};
if (identifier instanceof String) {
return this.delete({
path: '/api/enterprise/tasks/{taskId}/groups/{groupId}',
pathParams
});
} else {
return this.put({
path: '/api/enterprise/tasks/{taskId}/action/remove-involved',
pathParams,
bodyParam: identifier
});
}
}
/**
* Resolve a task
*
*
*
* @param taskId taskId
* @return Promise<{}>
*/
resolveTask(taskId: string): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/action/resolve',
pathParams
});
}
/**
* Unclaim a task
*
* To unclaim a task (in case the task was assigned to a group)
*
* @param taskId taskId
* @return Promise<{}>
*/
unclaimTask(taskId: string): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/action/unclaim',
pathParams
});
}
}

View File

@@ -0,0 +1,194 @@
/*!
* @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 {
CompleteFormRepresentation,
FormDefinitionRepresentation,
FormValueRepresentation,
ProcessInstanceVariableRepresentation,
SaveFormRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* TaskFormsApi service.
*/
export class TaskFormsApi extends BaseApi {
/**
* Complete a task form
*
* @param taskId taskId
* @param completeTaskFormRepresentation completeTaskFormRepresentation
* @return Promise<{}>
*/
completeTaskForm(taskId: string, completeTaskFormRepresentation: CompleteFormRepresentation): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(completeTaskFormRepresentation, 'completeTaskFormRepresentation');
const pathParams = {
taskId
};
return this.post({
path: '/api/enterprise/task-forms/{taskId}',
pathParams,
bodyParam: completeTaskFormRepresentation
});
}
/**
* Get task variables
*
* @param taskId taskId
* @return Promise<ProcessInstanceVariableRepresentation>
*/
getProcessInstanceVariables(taskId: string): Promise<ProcessInstanceVariableRepresentation> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/task-forms/{taskId}/variables',
pathParams
});
}
/**
* Retrieve Column Field Values
* Specific case to retrieve information on a specific column
*
* @param taskId taskId
* @param field field
* @param column column
*/
getRestFieldColumnValues(taskId: string, field: string, column: string) {
// verify the required parameter 'taskId' is set
if (taskId === undefined || taskId === null) {
throw new Error(`Missing param 'taskId' in getRestFieldValues`);
}
// verify the required parameter 'field' is set
if (field === undefined || field === null) {
throw new Error(`Missing param 'field' in getRestFieldValues`);
}
// verify the required parameter 'column' is set
if (column === undefined || column === null) {
throw new Error(`Missing param 'column' in getRestFieldValues`);
}
const pathParams = {
taskId,
field,
column
};
return this.get({
path: '/api/enterprise/task-forms/{taskId}/form-values/{field}/{column}',
pathParams
});
}
/**
* Retrieve populated field values
*
* Form field values that are populated through a REST backend, can be retrieved via this service
*
* @param taskId taskId
* @param field field
* @return Promise<FormValueRepresentation []>
*/
getRestFieldValues(taskId: string, field: string): Promise<FormValueRepresentation[]> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(field, 'field');
const pathParams = {
taskId,
field
};
return this.get({
path: '/api/enterprise/task-forms/{taskId}/form-values/{field}',
pathParams
});
}
/**
* Get a task form
*
* @param taskId taskId
* @returns Promise<FormDefinitionRepresentation>
*/
getTaskForm(taskId: string): Promise<FormDefinitionRepresentation> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/task-forms/{taskId}',
pathParams
});
}
/**
* Save a task form
*
* @param taskId taskId
* @param saveTaskFormRepresentation saveTaskFormRepresentation
* @return Promise<{}>
*/
saveTaskForm(taskId: string, saveTaskFormRepresentation: SaveFormRepresentation): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(saveTaskFormRepresentation, 'saveTaskFormRepresentation');
const pathParams = {
taskId
};
return this.post({
path: '/api/enterprise/task-forms/{taskId}/save-form',
pathParams,
bodyParam: saveTaskFormRepresentation
});
}
/**
* Retrieve Task Form Variables
*
* @param taskId taskId
*/
getTaskFormVariables(taskId: string) {
// verify the required parameter 'taskId' is set
if (taskId === undefined || taskId === null) {
throw new Error(`Missing param 'taskId' in getTaskFormVariables`);
}
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/task-forms/{taskId}/variables',
pathParams
});
}
}

View File

@@ -0,0 +1,160 @@
/*!
* @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 { RestVariable } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
import { ScopeQuery } from './types';
/**
* TaskVariablesApi service.
*/
export class TaskVariablesApi extends BaseApi {
/**
* Create variables
*
* @param taskId taskId
* @param restVariables restVariables
* @return Promise<RestVariable>
*/
createTaskVariable(taskId: string, restVariables: RestVariable): Promise<RestVariable> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(restVariables, 'restVariables');
const pathParams = {
taskId
};
return this.post({
path: '/api/enterprise/tasks/{taskId}/variables',
pathParams,
bodyParam: restVariables
});
}
/**
* Create or update variables
*
* @param taskId taskId
* @return Promise<{}>
*/
deleteAllLocalTaskVariables(taskId: string): Promise<void> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.delete({
path: '/api/enterprise/tasks/{taskId}/variables',
pathParams
});
}
/**
* Delete a variable
*
* @param taskId taskId
* @param variableName variableName
* @param opts Optional parameters
* @return Promise<{}>
*/
deleteVariable(taskId: string, variableName: string, opts?: ScopeQuery): Promise<void> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(variableName, 'variableName');
const pathParams = {
taskId,
variableName
};
return this.delete({
path: '/api/enterprise/tasks/{taskId}/variables/{variableName}',
pathParams,
queryParams: opts
});
}
/**
* Get a variable
*
* @param taskId taskId
* @param variableName variableName
* @param opts Optional parameters
* @return Promise<RestVariable>
*/
getVariable(taskId: string, variableName: string, opts?: ScopeQuery): Promise<RestVariable> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(variableName, 'variableName');
const pathParams = {
taskId,
variableName
};
return this.get({
path: '/api/enterprise/tasks/{taskId}/variables/{variableName}',
pathParams,
queryParams: opts
});
}
/**
* List variables
*
* @param taskId taskId
* @param opts Optional parameters
* @return Promise<RestVariable>
*/
getVariables(taskId: string, opts?: ScopeQuery): Promise<RestVariable> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/tasks/{taskId}/variables',
pathParams,
queryParams: opts
});
}
/**
* Update a variable
*
* @param taskId taskId
* @param variableName variableName
* @param restVariable restVariable
* @return Promise<RestVariable>
*/
updateVariable(taskId: string, variableName: string, restVariable: RestVariable): Promise<RestVariable> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(variableName, 'variableName');
throwIfNotDefined(restVariable, 'restVariable');
const pathParams = {
taskId,
variableName
};
return this.put({
path: '/api/enterprise/tasks/{taskId}/variables/{variableName}',
pathParams,
bodyParam: restVariable
});
}
}

View File

@@ -0,0 +1,323 @@
/*!
* @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 {
HistoricTaskInstanceQueryRepresentation,
IdentityLinkRepresentation,
ResultListDataRepresentationTaskRepresentation,
TaskAuditInfoRepresentation,
TaskFilterRequestRepresentation,
TaskQueryRepresentation,
TaskRepresentation,
TaskUpdateRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* Tasks service.
*/
export class TasksApi extends BaseApi {
/**
* List the users and groups involved with a task
*
* @param taskId taskId
* @param identityLinkRepresentation identityLinkRepresentation
* @returns Promise<IdentityLinkRepresentation>
*/
createIdentityLink(taskId: string, identityLinkRepresentation: IdentityLinkRepresentation): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(identityLinkRepresentation, 'identityLinkRepresentation');
const pathParams = {
taskId
};
return this.post({
path: '/api/enterprise/tasks/{taskId}/identitylinks',
pathParams,
bodyParam: identityLinkRepresentation
});
}
/**
* Create a standalone task
*
* A standalone task is one which is not associated with any process instance.
*
* @param taskRepresentation taskRepresentation
* @returns Promise<TaskRepresentation>
*/
createNewTask(taskRepresentation: TaskRepresentation): Promise<TaskRepresentation> {
throwIfNotDefined(taskRepresentation, 'taskRepresentation');
return this.post({
path: '/api/enterprise/tasks',
bodyParam: taskRepresentation,
returnType: TaskRepresentation
});
}
/**
* Remove a user or group involvement from a task
*
* @param taskId taskId
* @param family family
* @param identityId identityId
* @param type type
* @returns Promise<{}>
*/
deleteIdentityLink(taskId: string, family: string, identityId: string, type: string): Promise<any> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(family, 'family');
throwIfNotDefined(identityId, 'identityId');
throwIfNotDefined(type, 'type');
const pathParams = {
taskId,
family,
identityId,
type
};
return this.delete({
path: '/api/enterprise/tasks/{taskId}/identitylinks/{family}/{identityId}/{type}',
pathParams
});
}
/**
* Delete a task
*
* @param taskId taskId
* @returns Promise<{}>
*/
deleteTask(taskId: string): Promise<void> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.delete({
path: '/api/enterprise/tasks/{taskId}',
pathParams
});
}
/**
* Filter a list of tasks
*
* @param tasksFilter tasksFilter
* @returns Promise<ResultListDataRepresentationTaskRepresentation>
*/
filterTasks(tasksFilter: TaskFilterRequestRepresentation): Promise<ResultListDataRepresentationTaskRepresentation> {
throwIfNotDefined(tasksFilter, 'tasksFilter');
return this.post({
path: '/api/enterprise/tasks/filter',
bodyParam: tasksFilter,
returnType: ResultListDataRepresentationTaskRepresentation
});
}
/**
* Get a user or group involvement with a task
*
* @param taskId taskId
* @param family family
* @param identityId identityId
* @param type type
* @returns Promise<IdentityLinkRepresentation>
*/
getIdentityLinkType(taskId: string, family: string, identityId: string, type: string): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(family, 'family');
throwIfNotDefined(identityId, 'identityId');
throwIfNotDefined(type, 'type');
const pathParams = {
taskId,
family,
identityId,
type
};
return this.get({
path: '/api/enterprise/tasks/{taskId}/identitylinks/{family}/{identityId}/{type}',
pathParams
});
}
/**
* List either the users or groups involved with a process instance
*
* @param taskId taskId
* @param family family
* @returns Promise<IdentityLinkRepresentation>
*/
getIdentityLinksForFamily(taskId: string, family: string): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(family, 'family');
const pathParams = {
taskId,
family
};
return this.get({
path: '/api/enterprise/tasks/{taskId}/identitylinks/{family}',
pathParams
});
}
/**
* getIdentityLinks
*
* @param taskId taskId
* @returns Promise<IdentityLinkRepresentation>
*/
getIdentityLinks(taskId: string): Promise<IdentityLinkRepresentation> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/tasks/{taskId}/identitylinks',
pathParams
});
}
/**
* Get the audit log for a task
*
* @param taskId taskId
* @returns Promise<TaskAuditInfoRepresentation>
*/
getTaskAuditLog(taskId: string): Promise<TaskAuditInfoRepresentation> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/tasks/{taskId}/audit',
pathParams
});
}
/**
* Get the audit log for a task
*
* @param taskId taskId
* @returns Promise<Blob> task audit in blob
*/
getTaskAuditPdf(taskId: string): Promise<Blob> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
// Todo: update url once ACTIVITI-4191 fixed
path: 'app/rest/tasks/{taskId}/audit',
pathParams,
returnType: 'blob'
});
}
/**
* Get a task
*
* @param taskId taskId
* @returns Promise<TaskRepresentation>
*/
getTask(taskId: string): Promise<TaskRepresentation> {
throwIfNotDefined(taskId, 'taskId');
const pathParams = {
taskId
};
return this.get({
path: '/api/enterprise/tasks/{taskId}',
pathParams,
returnType: TaskRepresentation
});
}
/**
* Query historic tasks
*
* @param queryRequest queryRequest
* @returns Promise<ResultListDataRepresentationTaskRepresentation>
*/
listHistoricTasks(queryRequest: HistoricTaskInstanceQueryRepresentation): Promise<ResultListDataRepresentationTaskRepresentation> {
throwIfNotDefined(queryRequest, 'queryRequest');
return this.post({
path: '/api/enterprise/historic-tasks/query',
bodyParam: queryRequest,
returnType: ResultListDataRepresentationTaskRepresentation
});
}
/**
* List tasks
*
* @param tasksQuery tasksQuery
* @returns Promise<ResultListDataRepresentationTaskRepresentation>
*/
listTasks(tasksQuery: TaskQueryRepresentation): Promise<ResultListDataRepresentationTaskRepresentation> {
throwIfNotDefined(tasksQuery, 'tasksQuery');
return this.post({
path: '/api/enterprise/tasks/query',
bodyParam: tasksQuery,
returnType: ResultListDataRepresentationTaskRepresentation
});
}
/**
* Update a task
*
* You can edit only name, description and dueDate (ISO 8601 string).
*
* @param taskId taskId
* @param updated updated
* @returns Promise<TaskRepresentation>
*/
updateTask(taskId: string, updated: TaskUpdateRepresentation): Promise<TaskRepresentation> {
throwIfNotDefined(taskId, 'taskId');
throwIfNotDefined(updated, 'updated');
const pathParams = {
taskId
};
return this.put({
path: '/api/enterprise/tasks/{taskId}',
pathParams,
bodyParam: updated,
returnType: TaskRepresentation
});
}
}

View File

@@ -0,0 +1,97 @@
/*!
* @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 { BaseApi } from './base.api';
/**
* Temporary service.
*/
export class TemporaryApi extends BaseApi {
/**
* completeTasks
*
* @param userId userId
* @param processDefinitionKey processDefinitionKey
*/
completeTasks(userId: number, processDefinitionKey: string) {
// verify the required parameter 'userId' is set
if (userId === undefined || userId === null) {
throw new Error(`Missing param 'userId' in completeTasks`);
}
// verify the required parameter 'processDefinitionKey' is set
if (processDefinitionKey === undefined || processDefinitionKey === null) {
throw new Error(`Missing param 'processDefinitionKey' in completeTasks`);
}
const queryParams = {
userId,
processDefinitionKey
};
return this.get({
path: '/api/enterprise/temporary/generate-report-data/complete-tasks',
queryParams
});
}
/**
* generateData
*
* @param userId userId
* @param processDefinitionKey processDefinitionKey
*/
generateData(userId: number, processDefinitionKey: string) {
// verify the required parameter 'userId' is set
if (userId === undefined || userId === null) {
throw new Error(`Missing param 'userId' in generateData`);
}
// verify the required parameter 'processDefinitionKey' is set
if (processDefinitionKey === undefined || processDefinitionKey === null) {
throw new Error(`Missing param 'processDefinitionKey' in generateData`);
}
const queryParams = {
userId,
processDefinitionKey
};
return this.get({
path: '/api/enterprise/temporary/generate-report-data/start-process',
queryParams
});
}
/**
* Function to receive the result of the getHeaders operation.
*/
getHeaders() {
return this.get({
path: '/api/enterprise/temporary/example-headers'
});
}
/**
* Function to receive the result of the getOptions operation.
*/
getOptions() {
return this.get({
path: '/api/enterprise/temporary/example-options'
});
}
}

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 type ScopeQuery = { scope?: string };
export type AppIdQuery = { appId?: number };

View File

@@ -0,0 +1,251 @@
/*!
* @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 {
ResultListDataRepresentationUserProcessInstanceFilterRepresentation,
ResultListDataRepresentationUserTaskFilterRepresentation,
UserFilterOrderRepresentation,
UserProcessInstanceFilterRepresentation,
UserTaskFilterRepresentation
} from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
import { AppIdQuery } from './types';
/**
* UserFiltersApi service.
*/
export class UserFiltersApi extends BaseApi {
/**
* Create a process instance filter
*
* @param userProcessInstanceFilterRepresentation userProcessInstanceFilterRepresentation
* @returns Promise<UserProcessInstanceFilterRepresentation>
*/
createUserProcessInstanceFilter(
userProcessInstanceFilterRepresentation: UserProcessInstanceFilterRepresentation
): Promise<UserProcessInstanceFilterRepresentation> {
throwIfNotDefined(userProcessInstanceFilterRepresentation, 'userProcessInstanceFilterRepresentation');
return this.post({
path: '/api/enterprise/filters/processes',
bodyParam: userProcessInstanceFilterRepresentation
});
}
/**
* Create a task filter
*
* @param userTaskFilterRepresentation userTaskFilterRepresentation
* @returns Promise<UserTaskFilterRepresentation>
*/
createUserTaskFilter(userTaskFilterRepresentation: UserTaskFilterRepresentation): Promise<UserTaskFilterRepresentation> {
throwIfNotDefined(userTaskFilterRepresentation, 'userTaskFilterRepresentation');
return this.post({
path: '/api/enterprise/filters/tasks',
bodyParam: userTaskFilterRepresentation,
returnType: UserTaskFilterRepresentation
});
}
/**
* Delete a process instance filter
*
* @param userFilterId userFilterId
* @returns Promise<{}>
*/
deleteUserProcessInstanceFilter(userFilterId: number): Promise<void> {
throwIfNotDefined(userFilterId, 'userFilterId');
const pathParams = {
userFilterId
};
return this.delete({
path: '/api/enterprise/filters/processes/{userFilterId}',
pathParams
});
}
/**
* Delete a task filter
*
* @param userFilterId userFilterId
* @returns Promise<{}>
*/
deleteUserTaskFilter(userFilterId: number): Promise<void> {
throwIfNotDefined(userFilterId, 'userFilterId');
const pathParams = {
userFilterId
};
return this.delete({
path: '/api/enterprise/filters/tasks/{userFilterId}',
pathParams
});
}
/**
* Get a process instance filter
*
* @param userFilterId userFilterId
* @returns Promise<UserProcessInstanceFilterRepresentation>
*/
getUserProcessInstanceFilter(userFilterId: number): Promise<UserProcessInstanceFilterRepresentation> {
throwIfNotDefined(userFilterId, 'userFilterId');
const pathParams = {
userFilterId
};
return this.get({
path: '/api/enterprise/filters/processes/{userFilterId}',
pathParams
});
}
/**
* List process instance filters
*
* Returns filters for the current user, optionally filtered by *appId*.
*
* @param opts Optional parameters
* @returns Promise<ResultListDataRepresentationUserProcessInstanceFilterRepresentation>
*/
getUserProcessInstanceFilters(opts?: AppIdQuery): Promise<ResultListDataRepresentationUserProcessInstanceFilterRepresentation> {
return this.get({
path: '/api/enterprise/filters/processes',
queryParams: opts
});
}
/**
* Get a task filter
*
* @param userFilterId userFilterId
* @returns Promise<UserTaskFilterRepresentation>
*/
getUserTaskFilter(userFilterId: number): Promise<UserTaskFilterRepresentation> {
throwIfNotDefined(userFilterId, 'userFilterId');
const pathParams = {
userFilterId
};
return this.get({
path: '/api/enterprise/filters/tasks/{userFilterId}',
pathParams,
returnType: UserTaskFilterRepresentation
});
}
/**
* List task filters
*
* Returns filters for the current user, optionally filtered by *appId*.
*
* @param opts Optional parameters
* @returns Promise<ResultListDataRepresentationUserTaskFilterRepresentation>
*/
getUserTaskFilters(opts?: AppIdQuery): Promise<ResultListDataRepresentationUserTaskFilterRepresentation> {
return this.get({
path: '/api/enterprise/filters/tasks',
queryParams: opts,
returnType: ResultListDataRepresentationUserTaskFilterRepresentation
});
}
/**
* Re-order the list of user process instance filters
*
* @param filterOrderRepresentation filterOrderRepresentation
* @returns Promise<{}>
*/
orderUserProcessInstanceFilters(filterOrderRepresentation: UserFilterOrderRepresentation): Promise<any> {
throwIfNotDefined(filterOrderRepresentation, 'filterOrderRepresentation');
return this.put({
path: '/api/enterprise/filters/processes',
bodyParam: filterOrderRepresentation
});
}
/**
* Re-order the list of user task filters
*
* @param filterOrderRepresentation filterOrderRepresentation
* @returns Promise<{}>
*/
orderUserTaskFilters(filterOrderRepresentation: UserFilterOrderRepresentation): Promise<any> {
throwIfNotDefined(filterOrderRepresentation, 'filterOrderRepresentation');
return this.put({
path: '/api/enterprise/filters/tasks',
bodyParam: filterOrderRepresentation
});
}
/**
* Update a process instance filter
*
* @param userFilterId userFilterId
* @param userProcessInstanceFilterRepresentation userProcessInstanceFilterRepresentation
* @returns Promise<UserProcessInstanceFilterRepresentation>
*/
updateUserProcessInstanceFilter(
userFilterId: number,
userProcessInstanceFilterRepresentation: UserProcessInstanceFilterRepresentation
): Promise<UserProcessInstanceFilterRepresentation> {
throwIfNotDefined(userFilterId, 'userFilterId');
throwIfNotDefined(userProcessInstanceFilterRepresentation, 'userProcessInstanceFilterRepresentation');
const pathParams = {
userFilterId
};
return this.put({
path: '/api/enterprise/filters/processes/{userFilterId}',
pathParams,
bodyParam: userProcessInstanceFilterRepresentation
});
}
/**
* Update a task filter
*
* @param userFilterId userFilterId
* @param userTaskFilterRepresentation userTaskFilterRepresentation
* @returns Promise<UserTaskFilterRepresentation>
*/
updateUserTaskFilter(userFilterId: number, userTaskFilterRepresentation: UserTaskFilterRepresentation): Promise<UserTaskFilterRepresentation> {
throwIfNotDefined(userFilterId, 'userFilterId');
throwIfNotDefined(userTaskFilterRepresentation, 'userTaskFilterRepresentation');
const pathParams = {
userFilterId
};
return this.put({
path: '/api/enterprise/filters/tasks/{userFilterId}',
pathParams,
bodyParam: userTaskFilterRepresentation,
returnType: UserTaskFilterRepresentation
});
}
}

View File

@@ -0,0 +1,114 @@
/*!
* @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 { ChangePasswordRepresentation } from '../model/changePasswordRepresentation';
import { ImageUploadRepresentation } from '../model/imageUploadRepresentation';
import { UserRepresentation } from '../model/userRepresentation';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* Userprofile service.
*/
export class UserProfileApi extends BaseApi {
/**
* Change user password
*
* @param changePasswordRepresentation changePasswordRepresentation
* @return Promise<{}>
*/
changePassword(changePasswordRepresentation: ChangePasswordRepresentation): Promise<any> {
throwIfNotDefined(changePasswordRepresentation, 'changePasswordRepresentation');
return this.post({
path: '/api/enterprise/profile-password',
bodyParam: changePasswordRepresentation
});
}
/**
* Retrieve user profile picture
* Generally returns an image file
*
* @return Promise<Blob>
*/
getProfilePicture(): Promise<any> {
return this.get({
path: '/api/enterprise/profile-picture',
accepts: ['application/json', '*/*']
});
}
/**
* Retrieve user URL profile picture
* Generally returns an image file
*/
getProfilePictureUrl() {
return this.apiClient.basePath + '/app/rest/admin/profile-picture';
}
/**
* Get user profile
* This operation returns account information for the current user.
* This is useful to get the name, email, the groups that the user is part of, the user picture, etc.
*
* @return Promise<UserRepresentation>
*/
getProfile(): Promise<UserRepresentation> {
return this.get({
path: '/api/enterprise/profile',
returnType: UserRepresentation
});
}
/**
* Update user profile.
* Only a first name, last name, email and company can be updated
*
* @param userRepresentation userRepresentation
* @return Promise<UserRepresentation>
*/
updateProfile(userRepresentation: UserRepresentation): Promise<UserRepresentation> {
throwIfNotDefined(userRepresentation, 'userRepresentation');
return this.post({
path: '/api/enterprise/profile',
bodyParam: userRepresentation,
returnType: UserRepresentation
});
}
/**
* Change user profile picture
*
* @param file file
* @return Promise<ImageUploadRepresentation>
*/
uploadProfilePicture(file: any): Promise<ImageUploadRepresentation> {
throwIfNotDefined(file, 'file');
const formParams = {
file
};
return this.post({
path: '/api/enterprise/profile-picture',
formParams,
returnType: ImageUploadRepresentation
});
}
}

View File

@@ -0,0 +1,159 @@
/*!
* @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 { ResetPasswordRepresentation } from '../model/resetPasswordRepresentation';
import { ResultListDataRepresentationLightUserRepresentation } from '../model/resultListDataRepresentationLightUserRepresentation';
import { UserActionRepresentation } from '../model/userActionRepresentation';
import { UserRepresentation } from '../model/userRepresentation';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
export type GetUsersQuery = {
filter?: string;
email?: string;
externalId?: string;
externalIdCaseInsensitive?: string;
excludeTaskId?: string;
excludeProcessId?: string;
groupId?: number;
tenantId?: number;
};
/**
* Users service.
*/
export class UsersApi extends BaseApi {
/**
* Execute an action for a specific user
*
* Typical action is updating/reset password
*
* @param userId userId
* @param actionRequest actionRequest
* @returns Promise<{}>
*/
executeAction(userId: number, actionRequest: UserActionRepresentation): Promise<any> {
throwIfNotDefined(userId, 'userId');
throwIfNotDefined(actionRequest, 'actionRequest');
const pathParams = {
userId
};
return this.post({
path: '/api/enterprise/users/{userId}',
pathParams,
bodyParam: actionRequest
});
}
/**
* Stream user profile picture
*
* @param userId userId
* @returns Promise<{}>
*/
getUserProfilePictureUrl(userId: string): string {
return this.apiClient.basePath + '/app/rest/users/' + userId + '/picture';
}
/**
* Get a user
*
* @param userId userId
* @returns Promise<UserRepresentation>
*/
getUser(userId: number): Promise<UserRepresentation> {
throwIfNotDefined(userId, 'userId');
const pathParams = {
userId
};
return this.get({
path: '/api/enterprise/users/{userId}',
pathParams,
returnType: UserRepresentation
});
}
/**
* Query users
*
* A common use case is that a user wants to select another user (eg. when assigning a task) or group.
*
* @param opts Optional parameters
* @returns Promise<ResultListDataRepresentationLightUserRepresentation>
*/
getUsers(opts?: GetUsersQuery): Promise<ResultListDataRepresentationLightUserRepresentation> {
opts = opts || {};
const queryParams = {
filter: opts['filter'],
email: opts['email'],
externalId: opts['externalId'],
externalIdCaseInsensitive: opts['externalIdCaseInsensitive'],
excludeTaskId: opts['excludeTaskId'],
excludeProcessId: opts['excludeProcessId'],
groupId: opts['groupId'],
tenantId: opts['tenantId']
};
return this.get({
path: '/api/enterprise/users',
queryParams
});
}
/**
* Request a password reset
*
* @param resetPassword resetPassword
* @returns Promise<{}>
*/
requestPasswordReset(resetPassword: ResetPasswordRepresentation): Promise<any> {
throwIfNotDefined(resetPassword, 'resetPassword');
return this.post({
path: '/api/enterprise/idm/passwords',
bodyParam: resetPassword
});
}
/**
* Update a user
*
* @param userId userId
* @param userRequest userRequest
* @returns Promise<UserRepresentation>
*/
updateUser(userId: number, userRequest: UserRepresentation): Promise<UserRepresentation> {
throwIfNotDefined(userId, 'userId');
throwIfNotDefined(userRequest, 'userRequest');
const pathParams = {
userId
};
return this.put({
path: '/api/enterprise/users/{userId}',
pathParams,
bodyParam: userRequest,
returnType: UserRepresentation
});
}
}