Denys Vuika ea2c0ce229
[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
2023-11-21 05:27:51 -05:00

16 KiB

AdmingroupsApi

All URIs are relative to /activiti-app/api

Method HTTP request Description
activate POST /enterprise/admin/groups/{groupId}/action/activate Activate a group
addAllUsersToGroup POST /enterprise/admin/groups/{groupId}/add-all-users Add users to a group
addGroupCapabilities POST /enterprise/admin/groups/{groupId}/capabilities Add capabilities to a group
addGroupMember POST /enterprise/admin/groups/{groupId}/members/{userId} Add a user to a group
addRelatedGroup POST /enterprise/admin/groups/{groupId}/related-groups/{relatedGroupId} Get a related group
createNewGroup POST /enterprise/admin/groups Create a group
deleteGroupCapability DELETE /enterprise/admin/groups/{groupId}/capabilities/{groupCapabilityId} Remove a capability from a group
deleteGroupMember DELETE /enterprise/admin/groups/{groupId}/members/{userId} Delete a member from a group
deleteGroup DELETE /enterprise/admin/groups/{groupId} Delete a group
deleteRelatedGroup DELETE /enterprise/admin/groups/{groupId}/related-groups/{relatedGroupId} Delete a related group
getCapabilities GET /enterprise/admin/groups/{groupId}/potential-capabilities List group capabilities
getGroupUsers GET /enterprise/admin/groups/{groupId}/users Get group members
getGroup GET /enterprise/admin/groups/{groupId} Get a group
getGroups GET /enterprise/admin/groups Query groups
getRelatedGroups GET /enterprise/admin/groups/{groupId}/related-groups Get related groups
updateGroup PUT /enterprise/admin/groups/{groupId} Update a group

activate

activate(groupId)

Activate a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.activate(groupId).then(() => {
    console.log('API called successfully.');
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId

Return type

null (empty response body)

addAllUsersToGroup

addAllUsersToGroup(groupId)

Add users to a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.addAllUsersToGroup(groupId).then(() => {
    console.log('API called successfully.');
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId

Return type

null (empty response body)

addGroupCapabilities

addGroupCapabilities(groupIdaddGroupCapabilitiesRepresentation)

Add capabilities to a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.addGroupCapabilities(groupIdaddGroupCapabilitiesRepresentation).then(() => {
    console.log('API called successfully.');
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId
addGroupCapabilitiesRepresentation AddGroupCapabilitiesRepresentation addGroupCapabilitiesRepresentation

Return type

null (empty response body)

addGroupMember

addGroupMember(groupIduserId)

Add a user to a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.addGroupMember(groupIduserId).then(() => {
    console.log('API called successfully.');
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId
userId number userId

Return type

null (empty response body)

addRelatedGroup

addRelatedGroup(groupIdrelatedGroupIdtype)

Get a related group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.addRelatedGroup(groupIdrelatedGroupIdtype).then(() => {
    console.log('API called successfully.');
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId
relatedGroupId number relatedGroupId
type string type

Return type

null (empty response body)

createNewGroup

GroupRepresentation createNewGroup(groupRepresentation)

Create a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.createNewGroup(groupRepresentation).then((data) => {
    console.log('API called successfully. Returned data: ' + data);
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupRepresentation GroupRepresentation groupRepresentation

Return type

GroupRepresentation

deleteGroupCapability

deleteGroupCapability(groupIdgroupCapabilityId)

Remove a capability from a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.deleteGroupCapability(groupIdgroupCapabilityId).then(() => {
    console.log('API called successfully.');
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId
groupCapabilityId number groupCapabilityId

Return type

null (empty response body)

deleteGroupMember

deleteGroupMember(groupIduserId)

Delete a member from a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.deleteGroupMember(groupIduserId).then(() => {
    console.log('API called successfully.');
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId
userId number userId

Return type

null (empty response body)

deleteGroup

deleteGroup(groupId)

Delete a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.deleteGroup(groupId).then(() => {
    console.log('API called successfully.');
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId

Return type

null (empty response body)

deleteRelatedGroup

deleteRelatedGroup(groupIdrelatedGroupId)

Delete a related group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.deleteRelatedGroup(groupIdrelatedGroupId).then(() => {
    console.log('API called successfully.');
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId
relatedGroupId number relatedGroupId

Return type

null (empty response body)

getCapabilities

string getCapabilities(groupId)

List group capabilities

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.getCapabilities(groupId).then((data) => {
    console.log('API called successfully. Returned data: ' + data);
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId

Return type

string

getGroupUsers

ResultListDataRepresentationLightUserRepresentation getGroupUsers(groupIdopts)

Get group members

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);

let opts = {
    'filter': filter_example //  | filter
    'page': 56 //  | page
    'pageSize': 56 //  | pageSize
};

admingroupsApi.getGroupUsers(groupIdopts).then((data) => {
    console.log('API called successfully. Returned data: ' + data);
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId
filter string filter [optional]
page number page [optional]
pageSize number pageSize [optional]

Return type

ResultListDataRepresentationLightUserRepresentation

getGroup

AbstractGroupRepresentation getGroup(groupIdopts)

Get a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);

let opts = {
    'includeAllUsers': true //  | includeAllUsers
    'summary': true //  | summary
};

admingroupsApi.getGroup(groupIdopts).then((data) => {
    console.log('API called successfully. Returned data: ' + data);
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId
includeAllUsers boolean includeAllUsers [optional]
summary boolean summary [optional]

Return type

AbstractGroupRepresentation

getGroups

LightGroupRepresentation getGroups(opts)

Query groups

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);

let opts = {
    'tenantId': 789 //  | tenantId
    'functional': true //  | functional
    'summary': true //  | summary
};

admingroupsApi.getGroups(opts).then((data) => {
    console.log('API called successfully. Returned data: ' + data);
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
tenantId number tenantId [optional]
functional boolean functional [optional]
summary boolean summary [optional]

Return type

LightGroupRepresentation

getRelatedGroups

LightGroupRepresentation getRelatedGroups(groupId)

Get related groups

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.getRelatedGroups(groupId).then((data) => {
    console.log('API called successfully. Returned data: ' + data);
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId

Return type

LightGroupRepresentation

updateGroup

GroupRepresentation updateGroup(groupIdgroupRepresentation)

Update a group

Example

import AdmingroupsApi from 'src/api/activiti-rest-api/docs/AdminGroupsApi';
import {AlfrescoApi} from '@alfresco/js-api';

this.alfrescoApi = new AlfrescoApi();
this.alfrescoApi.setConfig({
    hostEcm: 'http://127.0.0.1:8080'
});

let admingroupsApi = new AdmingroupsApi(this.alfrescoApi);


admingroupsApi.updateGroup(groupIdgroupRepresentation).then((data) => {
    console.log('API called successfully. Returned data: ' + data);
}, function (error) {
    console.error(error);
});

Parameters

Name Type Description Notes
groupId number groupId
groupRepresentation GroupRepresentation groupRepresentation

Return type

GroupRepresentation