text: /*!
  * @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 * as tslib_1 from "tslib";
  import { ResultListDataRepresentationLightUserRepresentation } from '../model/resultListDataRepresentationLightUserRepresentation';
  import { UserRepresentation } from '../model/userRepresentation';
  import { BaseApi } from './base.api';
  var UsersApi = (function (_super) {
      tslib_1.__extends(UsersApi, _super);
      function UsersApi() {
          return _super !== null && _super.apply(this, arguments) || this;
      }
      UsersApi.prototype.executeAction = function (userId, actionRequest) {
          var postBody = actionRequest;
          if (userId === undefined || userId === null) {
              throw new Error("Required param 'userId' in executeAction");
          }
          if (actionRequest === undefined || actionRequest === null) {
              throw new Error("Required param 'actionRequest' in executeAction");
          }
          var pathParams = {
              'userId': userId
          };
          var queryParams = {};
          var headerParams = {};
          var formParams = {};
          var contentTypes = ['application/json'];
          var accepts = ['application/json'];
          return this.apiClient.callApi('/api/enterprise/users/{userId}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
      };
      UsersApi.prototype.getUserProfilePictureUrl = function (userId) {
          return this.apiClient.basePath + '/app/rest/users/' + userId + '/picture';
      };
      UsersApi.prototype.getUser = function (userId) {
          var postBody = null;
          if (userId === undefined || userId === null) {
              throw new Error("Required param 'userId' in getUser");
          }
          var pathParams = {
              'userId': userId
          };
          var queryParams = {};
          var headerParams = {};
          var formParams = {};
          var contentTypes = ['application/json'];
          var accepts = ['application/json'];
          return this.apiClient.callApi('/api/enterprise/users/{userId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts, UserRepresentation);
      };
      UsersApi.prototype.getUsers = function (opts) {
          opts = opts || {};
          var postBody = null;
          var pathParams = {};
          var 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']
          };
          var headerParams = {};
          var formParams = {};
          var contentTypes = ['application/json'];
          var accepts = ['application/json'];
          return this.apiClient.callApi('/api/enterprise/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts, ResultListDataRepresentationLightUserRepresentation);
      };
      UsersApi.prototype.requestPasswordReset = function (resetPassword) {
          var postBody = resetPassword;
          if (resetPassword === undefined || resetPassword === null) {
              throw new Error("Required param 'resetPassword' in requestPasswordReset");
          }
          var pathParams = {};
          var queryParams = {};
          var headerParams = {};
          var formParams = {};
          var contentTypes = ['application/json'];
          var accepts = ['application/json'];
          return this.apiClient.callApi('/api/enterprise/idm/passwords', 'POST', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);
      };
      UsersApi.prototype.updateUser = function (userId, userRequest) {
          var postBody = userRequest;
          if (userId === undefined || userId === null) {
              throw new Error("Required param 'userId' in updateUser");
          }
          if (userRequest === undefined || userRequest === null) {
              throw new Error("Required param 'userRequest' in updateUser");
          }
          var pathParams = {
              'userId': userId
          };
          var queryParams = {};
          var headerParams = {};
          var formParams = {};
          var contentTypes = ['application/json'];
          var accepts = ['application/json'];
          return this.apiClient.callApi('/api/enterprise/users/{userId}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts, UserRepresentation);
      };
      return UsersApi;
  }(BaseApi));
  export { UsersApi };
  //# sourceMappingURL=users.api.js.map