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/api/RecentsApi.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 _GetRecents = _interopRequireDefault(require("../model/GetRecents"));
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; }
/**
* Recents service.
* @module api/RecentsApi
* @version 1.0.0
*/
var RecentsApi = /*#__PURE__*/function () {
  /**
  * Constructs a new RecentsApi. 
  * @alias module:api/RecentsApi
  * @class
  * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
  * default to {@link module:ApiClient#instance} if unspecified.
  */
  function RecentsApi(apiClient) {
    (0, _classCallCheck2["default"])(this, RecentsApi);
    this.apiClient = apiClient;
  }

  /**
   * Get recents
   * Returns data about all recent changes occurred after the given timestamp.
   * @param {String} sinceTimestamp The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS
   * @param {Object} opts Optional parameters
   * @param {module:model/String} opts.items Multiple selection of item types to include in the query (optional)
   * @param {Number} opts.start Pagination start (default to 0)
   * @param {Number} opts.limit Items shown per page
   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetRecents} and HTTP response
   */
  (0, _createClass2["default"])(RecentsApi, [{
    key: "getRecentsWithHttpInfo",
    value: function getRecentsWithHttpInfo(sinceTimestamp, opts) {
      opts = opts || {};
      var postBody = null;

      // verify the required parameter 'sinceTimestamp' is set
      if (sinceTimestamp === undefined || sinceTimestamp === null) {
        throw new Error("Missing the required parameter 'sinceTimestamp' when calling getRecents");
      }
      var pathParams = {};
      var queryParams = {
        'since_timestamp': sinceTimestamp,
        'items': opts['items'] === undefined ? opts['items'] : opts['items'],
        'start': opts['start'] === undefined ? opts['start'] : opts['start'],
        'limit': opts['limit'] === undefined ? opts['limit'] : opts['limit']
      };
      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 = _GetRecents["default"];
      return this.apiClient.callApi('/recents', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
    }

    /**
     * Get recents
     * Returns data about all recent changes occurred after the given timestamp.
     * @param {String} sinceTimestamp The timestamp in UTC. Format: YYYY-MM-DD HH:MM:SS
     * @param {Object} opts Optional parameters
     * @param {module:model/String} opts.items Multiple selection of item types to include in the query (optional)
     * @param {Number} opts.start Pagination start (default to 0)
     * @param {Number} opts.limit Items shown per page
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetRecents}
     */
  }, {
    key: "getRecents",
    value: function getRecents(sinceTimestamp, opts) {
      return this.getRecentsWithHttpInfo(sinceTimestamp, opts).then(function (response_and_data) {
        return response_and_data;
      });
    }
  }]);
  return RecentsApi;
}();
exports["default"] = RecentsApi;