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/ProductField.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"));
var _NewProductField = _interopRequireDefault(require("./NewProductField"));
var _ProductFieldAllOf = _interopRequireDefault(require("./ProductFieldAllOf"));
/**
 * 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 ProductField model module.
 * @module model/ProductField
 * @version 1.0.0
 */
var ProductField = /*#__PURE__*/function () {
  /**
   * Constructs a new <code>ProductField</code>.
   * @alias module:model/ProductField
   * @implements module:model/NewProductField
   * @implements module:model/ProductFieldAllOf
   * @param name {String} The name of the field
   * @param fieldType {module:model/ProductField.FieldTypeEnum} The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td><tr><td>`text`</td><td>Long text (up to 65k characters)</td><tr><td>`double`</td><td>Numeric value</td><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td><tr><td>`enum`</td><td>Options field with a single possible chosen option</td><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td><tr><td>`people`</td><td>Person field (contains a product ID which is stored on the same account)</td><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td><tr><td>`address`</td><td>Address field (autocompleted by Google Maps)</dd></table>
   */
  function ProductField(name, fieldType) {
    (0, _classCallCheck2["default"])(this, ProductField);
    _NewProductField["default"].initialize(this, name, fieldType);
    _ProductFieldAllOf["default"].initialize(this);
    ProductField.initialize(this, name, fieldType);
  }

  /**
   * 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"])(ProductField, null, [{
    key: "initialize",
    value: function initialize(obj, name, fieldType) {
      obj['name'] = name;
      obj['field_type'] = fieldType;
    }

    /**
     * Constructs a <code>ProductField</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/ProductField} obj Optional instance to populate.
     * @return {module:model/ProductField} The populated <code>ProductField</code> instance.
     */
  }, {
    key: "constructFromObject",
    value: function constructFromObject(data, obj) {
      if (data) {
        obj = obj || new ProductField();
        _NewProductField["default"].constructFromObject(data, obj);
        _ProductFieldAllOf["default"].constructFromObject(data, obj);
        if (data.hasOwnProperty('name')) {
          obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
          delete data['name'];
        }
        if (data.hasOwnProperty('options')) {
          obj['options'] = _ApiClient["default"].convertToType(data['options'], [Object]);
          delete data['options'];
        }
        if (data.hasOwnProperty('field_type')) {
          obj['field_type'] = _ApiClient["default"].convertToType(data['field_type'], 'String');
          delete data['field_type'];
        }
        if (data.hasOwnProperty('id')) {
          obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
          delete data['id'];
        }
        if (data.hasOwnProperty('key')) {
          obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String');
          delete data['key'];
        }
        if (data.hasOwnProperty('order_nr')) {
          obj['order_nr'] = _ApiClient["default"].convertToType(data['order_nr'], 'Number');
          delete data['order_nr'];
        }
        if (data.hasOwnProperty('add_time')) {
          obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
          delete data['add_time'];
        }
        if (data.hasOwnProperty('update_time')) {
          obj['update_time'] = _ApiClient["default"].convertToType(data['update_time'], 'String');
          delete data['update_time'];
        }
        if (data.hasOwnProperty('last_updated_by_user_id')) {
          obj['last_updated_by_user_id'] = _ApiClient["default"].convertToType(data['last_updated_by_user_id'], 'Number');
          delete data['last_updated_by_user_id'];
        }
        if (data.hasOwnProperty('active_flag')) {
          obj['active_flag'] = _ApiClient["default"].convertToType(data['active_flag'], 'Boolean');
          delete data['active_flag'];
        }
        if (data.hasOwnProperty('edit_flag')) {
          obj['edit_flag'] = _ApiClient["default"].convertToType(data['edit_flag'], 'Boolean');
          delete data['edit_flag'];
        }
        if (data.hasOwnProperty('add_visible_flag')) {
          obj['add_visible_flag'] = _ApiClient["default"].convertToType(data['add_visible_flag'], 'Boolean');
          delete data['add_visible_flag'];
        }
        if (data.hasOwnProperty('important_flag')) {
          obj['important_flag'] = _ApiClient["default"].convertToType(data['important_flag'], 'Boolean');
          delete data['important_flag'];
        }
        if (data.hasOwnProperty('bulk_edit_allowed')) {
          obj['bulk_edit_allowed'] = _ApiClient["default"].convertToType(data['bulk_edit_allowed'], 'Boolean');
          delete data['bulk_edit_allowed'];
        }
        if (data.hasOwnProperty('searchable_flag')) {
          obj['searchable_flag'] = _ApiClient["default"].convertToType(data['searchable_flag'], 'Boolean');
          delete data['searchable_flag'];
        }
        if (data.hasOwnProperty('filtering_allowed')) {
          obj['filtering_allowed'] = _ApiClient["default"].convertToType(data['filtering_allowed'], 'Boolean');
          delete data['filtering_allowed'];
        }
        if (data.hasOwnProperty('sortable_flag')) {
          obj['sortable_flag'] = _ApiClient["default"].convertToType(data['sortable_flag'], 'Boolean');
          delete data['sortable_flag'];
        }
        if (data.hasOwnProperty('mandatory_flag')) {
          obj['mandatory_flag'] = _ApiClient["default"].convertToType(data['mandatory_flag'], 'Boolean');
          delete data['mandatory_flag'];
        }
        if (Object.keys(data).length > 0) {
          Object.assign(obj, data);
        }
      }
      return obj;
    }
  }]);
  return ProductField;
}();
/**
 * The name of the field
 * @member {String} name
 */
ProductField.prototype['name'] = undefined;

/**
 * When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:</br>`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]`
 * @member {Array.<Object>} options
 */
ProductField.prototype['options'] = undefined;

/**
 * The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td><tr><td>`text`</td><td>Long text (up to 65k characters)</td><tr><td>`double`</td><td>Numeric value</td><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td><tr><td>`enum`</td><td>Options field with a single possible chosen option</td><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td><tr><td>`people`</td><td>Person field (contains a product ID which is stored on the same account)</td><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td><tr><td>`address`</td><td>Address field (autocompleted by Google Maps)</dd></table>
 * @member {module:model/ProductField.FieldTypeEnum} field_type
 */
ProductField.prototype['field_type'] = undefined;

/**
 * The ID of the product field
 * @member {Number} id
 */
ProductField.prototype['id'] = undefined;

/**
 * The key of the product field
 * @member {String} key
 */
ProductField.prototype['key'] = undefined;

/**
 * The position (index) of the product field in the detail view
 * @member {Number} order_nr
 */
ProductField.prototype['order_nr'] = undefined;

/**
 * The product field creation time. Format: YYYY-MM-DD HH:MM:SS
 * @member {String} add_time
 */
ProductField.prototype['add_time'] = undefined;

/**
 * The product field last update time. Format: YYYY-MM-DD HH:MM:SS
 * @member {String} update_time
 */
ProductField.prototype['update_time'] = undefined;

/**
 * The ID of the last user to update the product field
 * @member {Number} last_updated_by_user_id
 */
ProductField.prototype['last_updated_by_user_id'] = undefined;

/**
 * Whether or not the product field is currently active
 * @member {Boolean} active_flag
 */
ProductField.prototype['active_flag'] = undefined;

/**
 * Whether or not the product field name and metadata is editable
 * @member {Boolean} edit_flag
 */
ProductField.prototype['edit_flag'] = undefined;

/**
 * Whether or not the product field is visible in the Add Product Modal
 * @member {Boolean} add_visible_flag
 */
ProductField.prototype['add_visible_flag'] = undefined;

/**
 * Whether or not the product field is marked as important
 * @member {Boolean} important_flag
 */
ProductField.prototype['important_flag'] = undefined;

/**
 * Whether or not the product field data can be edited
 * @member {Boolean} bulk_edit_allowed
 */
ProductField.prototype['bulk_edit_allowed'] = undefined;

/**
 * Whether or not the product field is searchable
 * @member {Boolean} searchable_flag
 */
ProductField.prototype['searchable_flag'] = undefined;

/**
 * Whether or not the product field value can be used when filtering searches
 * @member {Boolean} filtering_allowed
 */
ProductField.prototype['filtering_allowed'] = undefined;

/**
 * Whether or not the product field is sortable
 * @member {Boolean} sortable_flag
 */
ProductField.prototype['sortable_flag'] = undefined;

/**
 * Whether or not the product field is mandatory when creating products
 * @member {Boolean} mandatory_flag
 */
ProductField.prototype['mandatory_flag'] = undefined;

// Implement NewProductField interface:
/**
 * The name of the field
 * @member {String} name
 */
_NewProductField["default"].prototype['name'] = undefined;
/**
 * When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:</br>`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]`
 * @member {Array.<Object>} options
 */
_NewProductField["default"].prototype['options'] = undefined;
/**
 * The type of the field<table><tr><th>Value</th><th>Description</th></tr><tr><td>`varchar`</td><td>Text (up to 255 characters)</td><tr><td>`varchar_auto`</td><td>Autocomplete text (up to 255 characters)</td><tr><td>`text`</td><td>Long text (up to 65k characters)</td><tr><td>`double`</td><td>Numeric value</td><tr><td>`monetary`</td><td>Monetary field (has a numeric value and a currency value)</td><tr><td>`date`</td><td>Date (format YYYY-MM-DD)</td><tr><td>`set`</td><td>Options field with a possibility of having multiple chosen options</td><tr><td>`enum`</td><td>Options field with a single possible chosen option</td><tr><td>`user`</td><td>User field (contains a user ID of another Pipedrive user)</td><tr><td>`org`</td><td>Organization field (contains an organization ID which is stored on the same account)</td><tr><td>`people`</td><td>Person field (contains a product ID which is stored on the same account)</td><tr><td>`phone`</td><td>Phone field (up to 255 numbers and/or characters)</td><tr><td>`time`</td><td>Time field (format HH:MM:SS)</td><tr><td>`timerange`</td><td>Time-range field (has a start time and end time value, both HH:MM:SS)</td><tr><td>`daterange`</td><td>Date-range field (has a start date and end date value, both YYYY-MM-DD)</td><tr><td>`address`</td><td>Address field (autocompleted by Google Maps)</dd></table>
 * @member {module:model/NewProductField.FieldTypeEnum} field_type
 */
_NewProductField["default"].prototype['field_type'] = undefined;
// Implement ProductFieldAllOf interface:
/**
 * The ID of the product field
 * @member {Number} id
 */
_ProductFieldAllOf["default"].prototype['id'] = undefined;
/**
 * The key of the product field
 * @member {String} key
 */
_ProductFieldAllOf["default"].prototype['key'] = undefined;
/**
 * The position (index) of the product field in the detail view
 * @member {Number} order_nr
 */
_ProductFieldAllOf["default"].prototype['order_nr'] = undefined;
/**
 * The product field creation time. Format: YYYY-MM-DD HH:MM:SS
 * @member {String} add_time
 */
_ProductFieldAllOf["default"].prototype['add_time'] = undefined;
/**
 * The product field last update time. Format: YYYY-MM-DD HH:MM:SS
 * @member {String} update_time
 */
_ProductFieldAllOf["default"].prototype['update_time'] = undefined;
/**
 * The ID of the last user to update the product field
 * @member {Number} last_updated_by_user_id
 */
_ProductFieldAllOf["default"].prototype['last_updated_by_user_id'] = undefined;
/**
 * Whether or not the product field is currently active
 * @member {Boolean} active_flag
 */
_ProductFieldAllOf["default"].prototype['active_flag'] = undefined;
/**
 * Whether or not the product field name and metadata is editable
 * @member {Boolean} edit_flag
 */
_ProductFieldAllOf["default"].prototype['edit_flag'] = undefined;
/**
 * Whether or not the product field is visible in the Add Product Modal
 * @member {Boolean} add_visible_flag
 */
_ProductFieldAllOf["default"].prototype['add_visible_flag'] = undefined;
/**
 * Whether or not the product field is marked as important
 * @member {Boolean} important_flag
 */
_ProductFieldAllOf["default"].prototype['important_flag'] = undefined;
/**
 * Whether or not the product field data can be edited
 * @member {Boolean} bulk_edit_allowed
 */
_ProductFieldAllOf["default"].prototype['bulk_edit_allowed'] = undefined;
/**
 * Whether or not the product field is searchable
 * @member {Boolean} searchable_flag
 */
_ProductFieldAllOf["default"].prototype['searchable_flag'] = undefined;
/**
 * Whether or not the product field value can be used when filtering searches
 * @member {Boolean} filtering_allowed
 */
_ProductFieldAllOf["default"].prototype['filtering_allowed'] = undefined;
/**
 * Whether or not the product field is sortable
 * @member {Boolean} sortable_flag
 */
_ProductFieldAllOf["default"].prototype['sortable_flag'] = undefined;
/**
 * Whether or not the product field is mandatory when creating products
 * @member {Boolean} mandatory_flag
 */
_ProductFieldAllOf["default"].prototype['mandatory_flag'] = undefined;

/**
 * Allowed values for the <code>field_type</code> property.
 * @enum {String}
 * @readonly
 */
ProductField['FieldTypeEnum'] = {
  /**
   * value: "varchar"
   * @const
   */
  "varchar": "varchar",
  /**
   * value: "varchar_auto"
   * @const
   */
  "varchar_auto": "varchar_auto",
  /**
   * value: "text"
   * @const
   */
  "text": "text",
  /**
   * value: "double"
   * @const
   */
  "double": "double",
  /**
   * value: "monetary"
   * @const
   */
  "monetary": "monetary",
  /**
   * value: "date"
   * @const
   */
  "date": "date",
  /**
   * value: "set"
   * @const
   */
  "set": "set",
  /**
   * value: "enum"
   * @const
   */
  "enum": "enum",
  /**
   * value: "user"
   * @const
   */
  "user": "user",
  /**
   * value: "org"
   * @const
   */
  "org": "org",
  /**
   * value: "people"
   * @const
   */
  "people": "people",
  /**
   * value: "phone"
   * @const
   */
  "phone": "phone",
  /**
   * value: "time"
   * @const
   */
  "time": "time",
  /**
   * value: "timerange"
   * @const
   */
  "timerange": "timerange",
  /**
   * value: "daterange"
   * @const
   */
  "daterange": "daterange",
  /**
   * value: "address"
   * @const
   */
  "address": "address"
};
var _default = ProductField;
exports["default"] = _default;