{"size": 9142, "ext": "js", "max_stars_repo_path": "node_modules/@alfresco/js-api/_esm2015/src/api/activiti-rest-api/api/taskActions.api.js", "max_stars_repo_name": "Chiquitaprabhu/activiti-demo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/@alfresco/js-api/_esm2015/src/api/activiti-rest-api/api/taskActions.api.js", "max_issues_repo_name": "Chiquitaprabhu/activiti-demo", "max_issues_repo_issues_event_min_datetime": "2020-09-06T08:56:50.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-02T04:44:23.000Z", "max_forks_repo_path": "node_modules/@alfresco/js-api/_esm2015/src/api/activiti-rest-api/api/taskActions.api.js", "max_forks_repo_name": "Chiquitaprabhu/activiti-demo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 6, "max_forks_count": null, "avg_line_length": 43.5333333333, "max_line_length": 197, "alphanum_fraction": 0.602165828}
/*!
* @license
* Copyright 2018 Alfresco Software, Ltd.
*
* 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 { TaskRepresentation } from '../model/taskRepresentation';
import { BaseApi } from './base.api';
export class TaskActionsApi extends BaseApi {
    assignTask(taskId, userIdentifier) {
        let postBody = userIdentifier;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in assignTask");
        }
        if (userIdentifier === undefined || userIdentifier === null) {
            throw new Error("Required param 'userIdentifier' in assignTask");
        }
        let pathParams = {
            'taskId': taskId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/assign', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts, TaskRepresentation);
    }
    attachForm(taskId, formIdentifier) {
        let postBody = formIdentifier;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in attachForm");
        }
        if (formIdentifier === undefined || formIdentifier === null) {
            throw new Error("Required param 'formIdentifier' in attachForm");
        }
        let pathParams = {
            'taskId': taskId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/attach-form', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
    }
    claimTask(taskId) {
        let postBody = null;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in claimTask");
        }
        let pathParams = {
            'taskId': taskId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/claim', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
    }
    completeTask(taskId) {
        let postBody = null;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in completeTask");
        }
        let pathParams = {
            'taskId': taskId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/complete', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
    }
    delegateTask(taskId, userIdentifier) {
        let postBody = userIdentifier;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in delegateTask");
        }
        if (userIdentifier === undefined || userIdentifier === null) {
            throw new Error("Required param 'userIdentifier' in delegateTask");
        }
        let pathParams = {
            'taskId': taskId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/delegate', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
    }
    involveGroup(taskId, groupId) {
        let postBody = null;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in involveGroup");
        }
        if (groupId === undefined || groupId === null) {
            throw new Error("Required param 'groupId' in involveGroup");
        }
        let pathParams = {
            'taskId': taskId, 'groupId': groupId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/groups/{groupId}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
    }
    involveUser(taskId, userIdentifier) {
        let postBody = userIdentifier;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in involveUser");
        }
        if (userIdentifier === undefined || userIdentifier === null) {
            throw new Error("Required param 'userIdentifier' in involveUser");
        }
        let pathParams = {
            'taskId': taskId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/involve', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
    }
    removeForm(taskId) {
        let postBody = null;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in removeForm");
        }
        let pathParams = {
            'taskId': taskId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/remove-form', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
    }
    removeInvolvedUser(taskId, identifier) {
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in removeInvolvedUser");
        }
        if (identifier === undefined || identifier === null) {
            throw new Error("Required param 'groupId' in identifier");
        }
        let pathParams = {
            'taskId': taskId, 'groupId': identifier
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        if (identifier instanceof String) {
            let postBody = null;
            return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/groups/{groupId}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
        }
        else {
            let postBody = identifier;
            return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/remove-involved', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
        }
    }
    resolveTask(taskId) {
        let postBody = null;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in resolveTask");
        }
        let pathParams = {
            'taskId': taskId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/resolve', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
    }
    unclaimTask(taskId) {
        let postBody = null;
        if (taskId === undefined || taskId === null) {
            throw new Error("Required param 'taskId' in unclaimTask");
        }
        let pathParams = {
            'taskId': taskId
        };
        let queryParams = {};
        let headerParams = {};
        let formParams = {};
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        return this.apiClient.callApi('/api/enterprise/tasks/{taskId}/action/unclaim', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
    }
}
//# sourceMappingURL=taskActions.api.js.map