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/fintechfuel/node_modules/pipedrive/dist/model/BasicGoal.js
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
/**
 * 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.
 *
 */
/**
 * The BasicGoal model module.
 * @module model/BasicGoal
 * @version 1.0.0
 */
var BasicGoal = /*#__PURE__*/function () {
  /**
   * Constructs a new <code>BasicGoal</code>.
   * @alias module:model/BasicGoal
   */
  function BasicGoal() {
    (0, _classCallCheck2["default"])(this, BasicGoal);
    BasicGoal.initialize(this);
  }

  /**
   * Initializes the fields of this object.
   * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
   * Only for internal use.
   */
  (0, _createClass2["default"])(BasicGoal, null, [{
    key: "initialize",
    value: function initialize(obj) {}

    /**
     * Constructs a <code>BasicGoal</code> from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/BasicGoal} obj Optional instance to populate.
     * @return {module:model/BasicGoal} The populated <code>BasicGoal</code> instance.
     */
  }, {
    key: "constructFromObject",
    value: function constructFromObject(data, obj) {
      if (data) {
        obj = obj || new BasicGoal();
        if (data.hasOwnProperty('title')) {
          obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
          delete data['title'];
        }
        if (data.hasOwnProperty('assignee')) {
          obj['assignee'] = _ApiClient["default"].convertToType(data['assignee'], Object);
          delete data['assignee'];
        }
        if (data.hasOwnProperty('type')) {
          obj['type'] = _ApiClient["default"].convertToType(data['type'], Object);
          delete data['type'];
        }
        if (data.hasOwnProperty('expected_outcome')) {
          obj['expected_outcome'] = _ApiClient["default"].convertToType(data['expected_outcome'], Object);
          delete data['expected_outcome'];
        }
        if (data.hasOwnProperty('duration')) {
          obj['duration'] = _ApiClient["default"].convertToType(data['duration'], Object);
          delete data['duration'];
        }
        if (data.hasOwnProperty('interval')) {
          obj['interval'] = _ApiClient["default"].convertToType(data['interval'], 'String');
          delete data['interval'];
        }
        if (Object.keys(data).length > 0) {
          Object.assign(obj, data);
        }
      }
      return obj;
    }
  }]);
  return BasicGoal;
}();
/**
 * The title of the goal
 * @member {String} title
 */
BasicGoal.prototype['title'] = undefined;

/**
 * Who this goal is assigned to. It requires the following JSON structure: `{ \"id\": \"1\", \"type\": \"person\" }`. `type` can be either `person`, `company` or `team`. ID of the assignee person, company or team.
 * @member {Object} assignee
 */
BasicGoal.prototype['assignee'] = undefined;

/**
 * The type of the goal. It requires the following JSON structure: `{ \"name\": \"deals_started\", \"params\": { \"pipeline_id\": [1, 2], \"activity_type_id\": [9] } }`. Type can be one of: `deals_won`, `deals_progressed`, `activities_completed`, `activities_added`, `deals_started` or `revenue_forecast`. `params` can include `pipeline_id`, `stage_id` or `activity_type_id`. `stage_id` is related to only `deals_progressed` type of goals and `activity_type_id` to `activities_completed` or `activities_added` types of goals. The `pipeline_id` and `activity_type_id` need to be given as an array of integers. To track the goal in all pipelines, set `pipeline_id` as `null` and similarly, to track the goal for all activities, set `activity_type_id` as `null`.”
 * @member {Object} type
 */
BasicGoal.prototype['type'] = undefined;

/**
 * The expected outcome of the goal. Expected outcome can be tracked either by `quantity` or by `sum`. It requires the following JSON structure: `{ \"target\": \"50\", \"tracking_metric\": \"quantity\" }` or `{ \"target\": \"50\", \"tracking_metric\": \"sum\", \"currency_id\": 1 }`. `currency_id` should only be added to `sum` type of goals.
 * @member {Object} expected_outcome
 */
BasicGoal.prototype['expected_outcome'] = undefined;

/**
 * The date when the goal starts and ends. It requires the following JSON structure: `{ \"start\": \"2019-01-01\", \"end\": \"2022-12-31\" }`. Date in format of YYYY-MM-DD. \"end\" can be set to `null` for an infinite, open-ended goal.
 * @member {Object} duration
 */
BasicGoal.prototype['duration'] = undefined;

/**
 * The interval of the goal
 * @member {module:model/BasicGoal.IntervalEnum} interval
 */
BasicGoal.prototype['interval'] = undefined;

/**
 * Allowed values for the <code>interval</code> property.
 * @enum {String}
 * @readonly
 */
BasicGoal['IntervalEnum'] = {
  /**
   * value: "weekly"
   * @const
   */
  "weekly": "weekly",
  /**
   * value: "monthly"
   * @const
   */
  "monthly": "monthly",
  /**
   * value: "quarterly"
   * @const
   */
  "quarterly": "quarterly",
  /**
   * value: "yearly"
   * @const
   */
  "yearly": "yearly"
};
var _default = BasicGoal;
exports["default"] = _default;