HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode.com/node_modules/pipedrive/dist/api/ActivityTypesApi.js
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _ActivityTypeBulkDeleteResponse = _interopRequireDefault(require("../model/ActivityTypeBulkDeleteResponse"));
var _ActivityTypeCreateRequest = _interopRequireDefault(require("../model/ActivityTypeCreateRequest"));
var _ActivityTypeCreateUpdateDeleteResponse = _interopRequireDefault(require("../model/ActivityTypeCreateUpdateDeleteResponse"));
var _ActivityTypeListResponse = _interopRequireDefault(require("../model/ActivityTypeListResponse"));
var _ActivityTypeUpdateRequest = _interopRequireDefault(require("../model/ActivityTypeUpdateRequest"));
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /**
 * Pipedrive API v1
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */
/**
* ActivityTypes service.
* @module api/ActivityTypesApi
* @version 1.0.0
*/
var ActivityTypesApi = /*#__PURE__*/function () {
  /**
  * Constructs a new ActivityTypesApi. 
  * @alias module:api/ActivityTypesApi
  * @class
  * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
  * default to {@link module:ApiClient#instance} if unspecified.
  */
  function ActivityTypesApi(apiClient) {
    (0, _classCallCheck2["default"])(this, ActivityTypesApi);
    this.apiClient = apiClient;
  }

  /**
   * Add new activity type
   * Adds a new activity type.
   * @param {Object} opts Optional parameters
   * @param {module:model/ActivityTypeCreateRequest} opts.activityTypeCreateRequest 
   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ActivityTypeCreateUpdateDeleteResponse} and HTTP response
   */
  (0, _createClass2["default"])(ActivityTypesApi, [{
    key: "addActivityTypeWithHttpInfo",
    value: function addActivityTypeWithHttpInfo(opts) {
      opts = opts || {};
      var postBody = opts['activityTypeCreateRequest'];
      if (opts['name'] === undefined || opts['name'] === null) {
        throw new Error("Missing the required parameter 'name' when calling addActivityType");
      }
      if (opts['icon_key'] === undefined || opts['icon_key'] === null) {
        throw new Error("Missing the required parameter 'icon_key' when calling addActivityType");
      }
      var pathParams = {};
      var queryParams = {};
      var headerParams = {};
      var formParams = {};
      var formParamArray = [];
      var contentTypes = ['application/json'];
      var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
      var isJSON = contentTypes.includes('application/json');
      if (isJSON) {
        postBody = _objectSpread(_objectSpread({}, postBody), opts);
      } else if (isURLEncoded) {
        for (var key in opts) {
          if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
            formParams[key] = opts[key];
          }
        }
      }
      var authNames = ['api_key', 'oauth2'];
      var accepts = ['application/json'];
      var returnType = _ActivityTypeCreateUpdateDeleteResponse["default"];
      return this.apiClient.callApi('/activityTypes', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
    }

    /**
     * Add new activity type
     * Adds a new activity type.
     * @param {Object} opts Optional parameters
     * @param {module:model/ActivityTypeCreateRequest} opts.activityTypeCreateRequest 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ActivityTypeCreateUpdateDeleteResponse}
     */
  }, {
    key: "addActivityType",
    value: function addActivityType(opts) {
      return this.addActivityTypeWithHttpInfo(opts).then(function (response_and_data) {
        return response_and_data;
      });
    }

    /**
     * Delete an activity type
     * Marks an activity type as deleted.
     * @param {Number} id The ID of the activity type
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ActivityTypeCreateUpdateDeleteResponse} and HTTP response
     */
  }, {
    key: "deleteActivityTypeWithHttpInfo",
    value: function deleteActivityTypeWithHttpInfo(id) {
      var opts = {};
      var postBody = null;

      // verify the required parameter 'id' is set
      if (id === undefined || id === null) {
        throw new Error("Missing the required parameter 'id' when calling deleteActivityType");
      }
      var pathParams = {
        'id': id
      };
      var queryParams = {};
      var headerParams = {};
      var formParams = {};
      var formParamArray = [];
      var contentTypes = [];
      var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
      var isJSON = contentTypes.includes('application/json');
      if (isJSON) {
        postBody = _objectSpread(_objectSpread({}, postBody), opts);
      } else if (isURLEncoded) {
        for (var key in opts) {
          if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
            formParams[key] = opts[key];
          }
        }
      }
      var authNames = ['api_key', 'oauth2'];
      var accepts = ['application/json'];
      var returnType = _ActivityTypeCreateUpdateDeleteResponse["default"];
      return this.apiClient.callApi('/activityTypes/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
    }

    /**
     * Delete an activity type
     * Marks an activity type as deleted.
     * @param {Number} id The ID of the activity type
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ActivityTypeCreateUpdateDeleteResponse}
     */
  }, {
    key: "deleteActivityType",
    value: function deleteActivityType(id) {
      return this.deleteActivityTypeWithHttpInfo(id).then(function (response_and_data) {
        return response_and_data;
      });
    }

    /**
     * Delete multiple activity types in bulk
     * Marks multiple activity types as deleted.
     * @param {String} ids The comma-separated activity type IDs
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ActivityTypeBulkDeleteResponse} and HTTP response
     */
  }, {
    key: "deleteActivityTypesWithHttpInfo",
    value: function deleteActivityTypesWithHttpInfo(ids) {
      var opts = {};
      var postBody = null;

      // verify the required parameter 'ids' is set
      if (ids === undefined || ids === null) {
        throw new Error("Missing the required parameter 'ids' when calling deleteActivityTypes");
      }
      var pathParams = {};
      var queryParams = {
        'ids': ids
      };
      var headerParams = {};
      var formParams = {};
      var formParamArray = [];
      var contentTypes = [];
      var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
      var isJSON = contentTypes.includes('application/json');
      if (isJSON) {
        postBody = _objectSpread(_objectSpread({}, postBody), opts);
      } else if (isURLEncoded) {
        for (var key in opts) {
          if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
            formParams[key] = opts[key];
          }
        }
      }
      var authNames = ['api_key', 'oauth2'];
      var accepts = ['application/json'];
      var returnType = _ActivityTypeBulkDeleteResponse["default"];
      return this.apiClient.callApi('/activityTypes', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
    }

    /**
     * Delete multiple activity types in bulk
     * Marks multiple activity types as deleted.
     * @param {String} ids The comma-separated activity type IDs
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ActivityTypeBulkDeleteResponse}
     */
  }, {
    key: "deleteActivityTypes",
    value: function deleteActivityTypes(ids) {
      return this.deleteActivityTypesWithHttpInfo(ids).then(function (response_and_data) {
        return response_and_data;
      });
    }

    /**
     * Get all activity types
     * Returns all activity types.
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ActivityTypeListResponse} and HTTP response
     */
  }, {
    key: "getActivityTypesWithHttpInfo",
    value: function getActivityTypesWithHttpInfo() {
      var opts = {};
      var postBody = null;
      var pathParams = {};
      var queryParams = {};
      var headerParams = {};
      var formParams = {};
      var formParamArray = [];
      var contentTypes = [];
      var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
      var isJSON = contentTypes.includes('application/json');
      if (isJSON) {
        postBody = _objectSpread(_objectSpread({}, postBody), opts);
      } else if (isURLEncoded) {
        for (var key in opts) {
          if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
            formParams[key] = opts[key];
          }
        }
      }
      var authNames = ['api_key', 'oauth2'];
      var accepts = ['application/json'];
      var returnType = _ActivityTypeListResponse["default"];
      return this.apiClient.callApi('/activityTypes', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
    }

    /**
     * Get all activity types
     * Returns all activity types.
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ActivityTypeListResponse}
     */
  }, {
    key: "getActivityTypes",
    value: function getActivityTypes() {
      return this.getActivityTypesWithHttpInfo().then(function (response_and_data) {
        return response_and_data;
      });
    }

    /**
     * Update an activity type
     * Updates an activity type.
     * @param {Number} id The ID of the activity type
     * @param {Object} opts Optional parameters
     * @param {module:model/ActivityTypeUpdateRequest} opts.activityTypeUpdateRequest 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ActivityTypeCreateUpdateDeleteResponse} and HTTP response
     */
  }, {
    key: "updateActivityTypeWithHttpInfo",
    value: function updateActivityTypeWithHttpInfo(id, opts) {
      opts = opts || {};
      var postBody = opts['activityTypeUpdateRequest'];

      // verify the required parameter 'id' is set
      if (id === undefined || id === null) {
        throw new Error("Missing the required parameter 'id' when calling updateActivityType");
      }
      var pathParams = {
        'id': id
      };
      var queryParams = {};
      var headerParams = {};
      var formParams = {};
      var formParamArray = [];
      var contentTypes = ['application/json'];
      var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
      var isJSON = contentTypes.includes('application/json');
      if (isJSON) {
        postBody = _objectSpread(_objectSpread({}, postBody), opts);
      } else if (isURLEncoded) {
        for (var key in opts) {
          if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
            formParams[key] = opts[key];
          }
        }
      }
      var authNames = ['api_key', 'oauth2'];
      var accepts = ['application/json'];
      var returnType = _ActivityTypeCreateUpdateDeleteResponse["default"];
      return this.apiClient.callApi('/activityTypes/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
    }

    /**
     * Update an activity type
     * Updates an activity type.
     * @param {Number} id The ID of the activity type
     * @param {Object} opts Optional parameters
     * @param {module:model/ActivityTypeUpdateRequest} opts.activityTypeUpdateRequest 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ActivityTypeCreateUpdateDeleteResponse}
     */
  }, {
    key: "updateActivityType",
    value: function updateActivityType(id, opts) {
      return this.updateActivityTypeWithHttpInfo(id, opts).then(function (response_and_data) {
        return response_and_data;
      });
    }
  }]);
  return ActivityTypesApi;
}();
exports["default"] = ActivityTypesApi;