diff --git a/CHANGELOG.md b/CHANGELOG.md
index 79554de1..47cfb3a9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19).
## [Unreleased]
+### Added
+- Added documentation for new endpoint `/deals/{id}/participantsChangelog`.
## [22.4.0] - 2024-01-05
### Added
diff --git a/README.md b/README.md
index 226a4337..f42788d3 100644
--- a/README.md
+++ b/README.md
@@ -300,6 +300,12 @@ app.get('/callback', (req, res) => {
+### basic_authentication
+
+- **Type**: HTTP basic authentication
+
+
+
### oauth2
@@ -389,6 +395,7 @@ Class | Method | HTTP request | Description
*Pipedrive.DealsApi* | [**getDealFollowers**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealFollowers) | **GET** /deals/{id}/followers | List followers of a deal
*Pipedrive.DealsApi* | [**getDealMailMessages**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealMailMessages) | **GET** /deals/{id}/mailMessages | List mail messages associated with a deal
*Pipedrive.DealsApi* | [**getDealParticipants**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealParticipants) | **GET** /deals/{id}/participants | List participants of a deal
+*Pipedrive.DealsApi* | [**getDealParticipantsChangelog**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealParticipantsChangelog) | **GET** /deals/{id}/participantsChangelog | List updates about participants of a deal
*Pipedrive.DealsApi* | [**getDealPersons**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealPersons) | **GET** /deals/{id}/persons | List all persons associated with a deal
*Pipedrive.DealsApi* | [**getDealProducts**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealProducts) | **GET** /deals/{id}/products | List products attached to a deal
*Pipedrive.DealsApi* | [**getDealUpdates**](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealsApi.md#getDealUpdates) | **GET** /deals/{id}/flow | List updates about a deal
@@ -785,6 +792,7 @@ Class | Method | HTTP request | Description
- [Pipedrive.DealOrganizationDataWithIdAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealOrganizationDataWithIdAllOf.md)
- [Pipedrive.DealParticipantCountInfo](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealParticipantCountInfo.md)
- [Pipedrive.DealParticipants](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealParticipants.md)
+ - [Pipedrive.DealParticipantsChangelog](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealParticipantsChangelog.md)
- [Pipedrive.DealPersonData](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonData.md)
- [Pipedrive.DealPersonDataEmail](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonDataEmail.md)
- [Pipedrive.DealPersonDataPhone](https://github.com/pipedrive/client-nodejs/blob/master/docs/DealPersonDataPhone.md)
@@ -1190,6 +1198,8 @@ Class | Method | HTTP request | Description
- [Pipedrive.PaginationDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaginationDetails.md)
- [Pipedrive.PaginationDetailsAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaginationDetailsAllOf.md)
- [Pipedrive.Params](https://github.com/pipedrive/client-nodejs/blob/master/docs/Params.md)
+ - [Pipedrive.ParticipantsChangelog](https://github.com/pipedrive/client-nodejs/blob/master/docs/ParticipantsChangelog.md)
+ - [Pipedrive.ParticipantsChangelogItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/ParticipantsChangelogItem.md)
- [Pipedrive.PaymentItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaymentItem.md)
- [Pipedrive.PaymentsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaymentsResponse.md)
- [Pipedrive.PaymentsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/PaymentsResponseAllOf.md)
diff --git a/docs/AddWebhookRequest.md b/docs/AddWebhookRequest.md
index 17f6f230..76c3d40a 100644
--- a/docs/AddWebhookRequest.md
+++ b/docs/AddWebhookRequest.md
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
**subscriptionUrl** | **String** | A full, valid, publicly accessible URL which determines where to send the notifications. Please note that you cannot use Pipedrive API endpoints as the `subscription_url` and the chosen URL must not redirect to another link. |
**eventAction** | **String** | The type of action to receive notifications about. Wildcard will match all supported actions. |
**eventObject** | **String** | The type of object to receive notifications about. Wildcard will match all supported objects. |
-**userId** | **Number** | The ID of the user that this webhook will be authorized with. You have the option to use a different user's `user_id`. If it is not set, the current user's `user_id` will be used. As each webhook event is checked against a user’s permissions, the webhook will only be sent if the user has access to the specified object(s). If you want to receive notifications for all events, please use a top-level admin user’s `user_id`. | [optional]
+**userId** | **Number** | The ID of the user that this webhook will be authorized with. You have the option to use a different user's `user_id`. If it is not set, the current user's `user_id` will be used. As each webhook event is checked against a user's permissions, the webhook will only be sent if the user has access to the specified object(s). If you want to receive notifications for all events, please use a top-level admin user’s `user_id`. | [optional]
**httpAuthUser** | **String** | The HTTP basic auth username of the subscription URL endpoint (if required) | [optional]
**httpAuthPassword** | **String** | The HTTP basic auth password of the subscription URL endpoint (if required) | [optional]
**version** | **String** | The webhook's version | [optional] [default to '1.0']
diff --git a/docs/BasicDeal.md b/docs/BasicDeal.md
index 2b03e9c9..ee266e34 100644
--- a/docs/BasicDeal.md
+++ b/docs/BasicDeal.md
@@ -4,6 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**wonTime** | **String** | The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`. | [optional]
+**lostTime** | **String** | The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`. | [optional]
+**closeTime** | **String** | The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. | [optional]
**expectedCloseDate** | **Date** | The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD. | [optional]
**probability** | **Number** | The success probability percentage of the deal. Used/shown only when `deal_probability` for the pipeline of the deal is enabled. | [optional]
**lostReason** | **String** | The optional message about why the deal was lost (to be used when status = lost) | [optional]
diff --git a/docs/DealParticipantsChangelog.md b/docs/DealParticipantsChangelog.md
new file mode 100644
index 00000000..b4795aef
--- /dev/null
+++ b/docs/DealParticipantsChangelog.md
@@ -0,0 +1,12 @@
+# Pipedrive.DealParticipantsChangelog
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**actorUserId** | **Number** | The ID of the user | [optional]
+**personId** | **Number** | The ID of the person | [optional]
+**action** | **String** | Deal participant action type | [optional]
+**time** | **String** | The deal participant action log time | [optional]
+
+
diff --git a/docs/DealsApi.md b/docs/DealsApi.md
index 72409344..08503ffb 100644
--- a/docs/DealsApi.md
+++ b/docs/DealsApi.md
@@ -20,6 +20,7 @@ Method | HTTP request | Description
[**getDealFollowers**](DealsApi.md#getDealFollowers) | **GET** /deals/{id}/followers | List followers of a deal
[**getDealMailMessages**](DealsApi.md#getDealMailMessages) | **GET** /deals/{id}/mailMessages | List mail messages associated with a deal
[**getDealParticipants**](DealsApi.md#getDealParticipants) | **GET** /deals/{id}/participants | List participants of a deal
+[**getDealParticipantsChangelog**](DealsApi.md#getDealParticipantsChangelog) | **GET** /deals/{id}/participantsChangelog | List updates about participants of a deal
[**getDealPersons**](DealsApi.md#getDealPersons) | **GET** /deals/{id}/persons | List all persons associated with a deal
[**getDealProducts**](DealsApi.md#getDealProducts) | **GET** /deals/{id}/products | List products attached to a deal
[**getDealUpdates**](DealsApi.md#getDealUpdates) | **GET** /deals/{id}/flow | List updates about a deal
@@ -933,6 +934,65 @@ Name | Type | Description | Notes
- **Accept**: application/json
+## getDealParticipantsChangelog
+
+> ParticipantsChangelog getDealParticipantsChangelog(id, opts)
+
+List updates about participants of a deal
+
+List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>.
+
+### Example
+
+```javascript
+import Pipedrive from 'pipedrive';
+let apiClient = new Pipedrive.ApiClient();
+// Configure API key authorization: api_key
+let api_key = apiClient.authentications['api_key'];
+api_key.apiKey = 'YOUR API KEY';
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//api_key.apiKeyPrefix = 'Token';
+// Configure OAuth2 access token for authorization: oauth2
+let oauth2 = apiClient.authentications['oauth2'];
+oauth2.accessToken = 'YOUR ACCESS TOKEN';
+
+let apiInstance = new Pipedrive.DealsApi(apiClient);
+let id = 56; // Number | The ID of the deal
+let opts = {
+ 'limit': 56, // Number | Items shown per page
+ 'cursor': "cursor_example" // String | For pagination, the marker (an opaque string value) representing the first item on the next page
+};
+apiInstance.getDealParticipantsChangelog(id, opts).then((data) => {
+ console.log('API called successfully. Returned data: ' + data);
+}, (error) => {
+ console.error(error);
+});
+
+```
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **id** | **Number**| The ID of the deal |
+ **limit** | **Number**| Items shown per page | [optional]
+ **cursor** | **String**| For pagination, the marker (an opaque string value) representing the first item on the next page | [optional]
+
+### Return type
+
+[**ParticipantsChangelog**](ParticipantsChangelog.md)
+
+### Authorization
+
+[api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
## getDealPersons
> ListPersonsResponse getDealPersons(id, opts)
diff --git a/docs/NewDeal.md b/docs/NewDeal.md
index 23d1aa0b..b90b0c54 100644
--- a/docs/NewDeal.md
+++ b/docs/NewDeal.md
@@ -15,6 +15,9 @@ Name | Type | Description | Notes
**stageId** | **Number** | The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline. | [optional]
**status** | **String** | open = Open, won = Won, lost = Lost, deleted = Deleted. If omitted, status will be set to open. | [optional]
**addTime** | **String** | The optional creation date & time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS | [optional]
+**wonTime** | **String** | The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`. | [optional]
+**lostTime** | **String** | The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`. | [optional]
+**closeTime** | **String** | The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. | [optional]
**expectedCloseDate** | **Date** | The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD. | [optional]
**probability** | **Number** | The success probability percentage of the deal. Used/shown only when `deal_probability` for the pipeline of the deal is enabled. | [optional]
**lostReason** | **String** | The optional message about why the deal was lost (to be used when status = lost) | [optional]
diff --git a/docs/ParticipantsChangelog.md b/docs/ParticipantsChangelog.md
new file mode 100644
index 00000000..cf3047f1
--- /dev/null
+++ b/docs/ParticipantsChangelog.md
@@ -0,0 +1,11 @@
+# Pipedrive.ParticipantsChangelog
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**success** | **Boolean** | If the request was successful or not | [optional]
+**data** | [**[ParticipantsChangelogItem]**](ParticipantsChangelogItem.md) | The array of participant changelog | [optional]
+**additionalData** | [**AdditionalData**](AdditionalData.md) | | [optional]
+
+
diff --git a/docs/ParticipantsChangelogItem.md b/docs/ParticipantsChangelogItem.md
new file mode 100644
index 00000000..5867507d
--- /dev/null
+++ b/docs/ParticipantsChangelogItem.md
@@ -0,0 +1,12 @@
+# Pipedrive.ParticipantsChangelogItem
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**actorUserId** | **Number** | The ID of the user | [optional]
+**personId** | **Number** | The ID of the person | [optional]
+**action** | **String** | Deal participant action type | [optional]
+**time** | **String** | The deal participant action log time | [optional]
+
+
diff --git a/docs/UpdateDealRequest.md b/docs/UpdateDealRequest.md
index 9ab3e188..35141e6e 100644
--- a/docs/UpdateDealRequest.md
+++ b/docs/UpdateDealRequest.md
@@ -14,6 +14,9 @@ Name | Type | Description | Notes
**pipelineId** | **Number** | The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored. | [optional]
**stageId** | **Number** | The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. | [optional]
**status** | **String** | open = Open, won = Won, lost = Lost, deleted = Deleted. | [optional]
+**wonTime** | **String** | The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`. | [optional]
+**lostTime** | **String** | The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`. | [optional]
+**closeTime** | **String** | The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. | [optional]
**expectedCloseDate** | **Date** | The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD. | [optional]
**probability** | **Number** | The success probability percentage of the deal. Used/shown only when `deal_probability` for the pipeline of the deal is enabled. | [optional]
**lostReason** | **String** | The optional message about why the deal was lost (to be used when status = lost) | [optional]
diff --git a/src/ApiClient.js b/src/ApiClient.js
index 034b50eb..b3e625a4 100644
--- a/src/ApiClient.js
+++ b/src/ApiClient.js
@@ -52,6 +52,7 @@ class ApiClient {
name: 'api_token',
apiKey: ''
},
+ 'basic_authentication': {type: 'basic'},
'oauth2': {
type: 'oauth2',
host: 'https://oauth.pipedrive.com',
diff --git a/src/api/DealsApi.js b/src/api/DealsApi.js
index 5165bc12..167492f6 100644
--- a/src/api/DealsApi.js
+++ b/src/api/DealsApi.js
@@ -46,6 +46,7 @@ import MergeDealsRequest from '../model/MergeDealsRequest';
import NewDeal from '../model/NewDeal';
import NewDealProduct from '../model/NewDealProduct';
import NumberBoolean from '../model/NumberBoolean';
+import ParticipantsChangelog from '../model/ParticipantsChangelog';
import PostDealParticipants from '../model/PostDealParticipants';
import UpdateDealProduct from '../model/UpdateDealProduct';
import UpdateDealRequest from '../model/UpdateDealRequest';
@@ -1220,6 +1221,82 @@ export default class DealsApi {
}
+ /**
+ * List updates about participants of a deal
+ * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination.
+ * @param {Number} id The ID of the deal
+ * @param {Object} opts Optional parameters
+ * @param {Number} opts.limit Items shown per page
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ParticipantsChangelog} and HTTP response
+ */
+ getDealParticipantsChangelogWithHttpInfo(id, opts) {
+ opts = opts || {};
+ let postBody = null;
+
+ // verify the required parameter 'id' is set
+ if (id === undefined || id === null) {
+ throw new Error("Missing the required parameter 'id' when calling getDealParticipantsChangelog");
+ }
+
+
+
+ let pathParams = {
+ 'id': id,
+ };
+ let queryParams = {
+ 'limit': opts['limit'] === undefined ? opts['limit'] : opts['limit'],
+ 'cursor': opts['cursor'] === undefined ? opts['cursor'] : opts['cursor'],
+ };
+ let headerParams = {
+ };
+ let formParams = {
+ };
+
+ let formParamArray = [
+ ];
+
+ let contentTypes = [];
+ const isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
+ const isJSON = contentTypes.includes('application/json');
+
+ if (isJSON) {
+ postBody = { ...postBody, ...opts };
+ } else if (isURLEncoded) {
+ for (let key in opts) {
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
+ formParams[key] = opts[key];
+ }
+ }
+ }
+
+ let authNames = ['api_key', 'oauth2', ];
+ let accepts = ['application/json', ];
+ let returnType = ParticipantsChangelog;
+ return this.apiClient.callApi(
+ '/deals/{id}/participantsChangelog', 'GET',
+ pathParams, queryParams, headerParams, formParams, postBody,
+ authNames, contentTypes, accepts, returnType, null
+ );
+ }
+
+ /**
+ * List updates about participants of a deal
+ * List updates about participants of a deal. This is a cursor-paginated endpoint. For more information, please refer to our documentation on pagination.
+ * @param {Number} id The ID of the deal
+ * @param {Object} opts Optional parameters
+ * @param {Number} opts.limit Items shown per page
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ParticipantsChangelog}
+ */
+ getDealParticipantsChangelog(id, opts) {
+ return this.getDealParticipantsChangelogWithHttpInfo(id, opts)
+ .then(function(response_and_data) {
+ return response_and_data;
+ });
+ }
+
+
/**
* List all persons associated with a deal
* Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
diff --git a/src/index.js b/src/index.js
index d9b1151d..ffb131e7 100644
--- a/src/index.js
+++ b/src/index.js
@@ -179,6 +179,7 @@ import DealOrganizationDataWithId from './model/DealOrganizationDataWithId';
import DealOrganizationDataWithIdAllOf from './model/DealOrganizationDataWithIdAllOf';
import DealParticipantCountInfo from './model/DealParticipantCountInfo';
import DealParticipants from './model/DealParticipants';
+import DealParticipantsChangelog from './model/DealParticipantsChangelog';
import DealPersonData from './model/DealPersonData';
import DealPersonDataEmail from './model/DealPersonDataEmail';
import DealPersonDataPhone from './model/DealPersonDataPhone';
@@ -584,6 +585,8 @@ import OwnerAllOf from './model/OwnerAllOf';
import PaginationDetails from './model/PaginationDetails';
import PaginationDetailsAllOf from './model/PaginationDetailsAllOf';
import Params from './model/Params';
+import ParticipantsChangelog from './model/ParticipantsChangelog';
+import ParticipantsChangelogItem from './model/ParticipantsChangelogItem';
import PaymentItem from './model/PaymentItem';
import PaymentsResponse from './model/PaymentsResponse';
import PaymentsResponseAllOf from './model/PaymentsResponseAllOf';
@@ -1884,6 +1887,12 @@ export {
*/
DealParticipants,
+ /**
+ * The DealParticipantsChangelog model constructor.
+ * @property {module:model/DealParticipantsChangelog}
+ */
+ DealParticipantsChangelog,
+
/**
* The DealPersonData model constructor.
* @property {module:model/DealPersonData}
@@ -4314,6 +4323,18 @@ export {
*/
Params,
+ /**
+ * The ParticipantsChangelog model constructor.
+ * @property {module:model/ParticipantsChangelog}
+ */
+ ParticipantsChangelog,
+
+ /**
+ * The ParticipantsChangelogItem model constructor.
+ * @property {module:model/ParticipantsChangelogItem}
+ */
+ ParticipantsChangelogItem,
+
/**
* The PaymentItem model constructor.
* @property {module:model/PaymentItem}
diff --git a/src/model/AddWebhookRequest.js b/src/model/AddWebhookRequest.js
index 4cc07453..de75a91e 100644
--- a/src/model/AddWebhookRequest.js
+++ b/src/model/AddWebhookRequest.js
@@ -119,7 +119,7 @@ AddWebhookRequest.prototype['event_action'] = undefined;
AddWebhookRequest.prototype['event_object'] = undefined;
/**
- * The ID of the user that this webhook will be authorized with. You have the option to use a different user's `user_id`. If it is not set, the current user's `user_id` will be used. As each webhook event is checked against a user’s permissions, the webhook will only be sent if the user has access to the specified object(s). If you want to receive notifications for all events, please use a top-level admin user’s `user_id`.
+ * The ID of the user that this webhook will be authorized with. You have the option to use a different user's `user_id`. If it is not set, the current user's `user_id` will be used. As each webhook event is checked against a user's permissions, the webhook will only be sent if the user has access to the specified object(s). If you want to receive notifications for all events, please use a top-level admin user’s `user_id`.
* @member {Number} user_id
*/
AddWebhookRequest.prototype['user_id'] = undefined;
diff --git a/src/model/BasicDeal.js b/src/model/BasicDeal.js
index ce7a61fa..ddf937f4 100644
--- a/src/model/BasicDeal.js
+++ b/src/model/BasicDeal.js
@@ -48,6 +48,21 @@ class BasicDeal {
if (data) {
obj = obj || new BasicDeal();
+ if (data.hasOwnProperty('won_time')) {
+ obj['won_time'] = ApiClient.convertToType(data['won_time'], 'String');
+
+ delete data['won_time'];
+ }
+ if (data.hasOwnProperty('lost_time')) {
+ obj['lost_time'] = ApiClient.convertToType(data['lost_time'], 'String');
+
+ delete data['lost_time'];
+ }
+ if (data.hasOwnProperty('close_time')) {
+ obj['close_time'] = ApiClient.convertToType(data['close_time'], 'String');
+
+ delete data['close_time'];
+ }
if (data.hasOwnProperty('expected_close_date')) {
obj['expected_close_date'] = ApiClient.convertToType(data['expected_close_date'], 'Date');
@@ -80,6 +95,24 @@ class BasicDeal {
}
+/**
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
+ * @member {String} won_time
+ */
+BasicDeal.prototype['won_time'] = undefined;
+
+/**
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
+ * @member {String} lost_time
+ */
+BasicDeal.prototype['lost_time'] = undefined;
+
+/**
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
+ * @member {String} close_time
+ */
+BasicDeal.prototype['close_time'] = undefined;
+
/**
* The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
* @member {Date} expected_close_date
diff --git a/src/model/DealParticipantsChangelog.js b/src/model/DealParticipantsChangelog.js
new file mode 100644
index 00000000..cff6d439
--- /dev/null
+++ b/src/model/DealParticipantsChangelog.js
@@ -0,0 +1,112 @@
+/**
+ * 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.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The DealParticipantsChangelog model module.
+ * @module model/DealParticipantsChangelog
+ * @version 1.0.0
+ */
+class DealParticipantsChangelog {
+ /**
+ * Constructs a new DealParticipantsChangelog
.
+ * @alias module:model/DealParticipantsChangelog
+ */
+ constructor() {
+
+ DealParticipantsChangelog.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.
+ */
+ static initialize(obj) {
+ }
+
+ /**
+ * Constructs a DealParticipantsChangelog
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/DealParticipantsChangelog} obj Optional instance to populate.
+ * @return {module:model/DealParticipantsChangelog} The populated DealParticipantsChangelog
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new DealParticipantsChangelog();
+
+ if (data.hasOwnProperty('actor_user_id')) {
+ obj['actor_user_id'] = ApiClient.convertToType(data['actor_user_id'], 'Number');
+
+ delete data['actor_user_id'];
+ }
+ if (data.hasOwnProperty('person_id')) {
+ obj['person_id'] = ApiClient.convertToType(data['person_id'], 'Number');
+
+ delete data['person_id'];
+ }
+ if (data.hasOwnProperty('action')) {
+ obj['action'] = ApiClient.convertToType(data['action'], 'String');
+
+ delete data['action'];
+ }
+ if (data.hasOwnProperty('time')) {
+ obj['time'] = ApiClient.convertToType(data['time'], 'String');
+
+ delete data['time'];
+ }
+
+ if (Object.keys(data).length > 0) {
+ Object.assign(obj, data);
+ }
+
+ }
+ return obj;
+ }
+
+
+}
+
+/**
+ * The ID of the user
+ * @member {Number} actor_user_id
+ */
+DealParticipantsChangelog.prototype['actor_user_id'] = undefined;
+
+/**
+ * The ID of the person
+ * @member {Number} person_id
+ */
+DealParticipantsChangelog.prototype['person_id'] = undefined;
+
+/**
+ * Deal participant action type
+ * @member {String} action
+ */
+DealParticipantsChangelog.prototype['action'] = undefined;
+
+/**
+ * The deal participant action log time
+ * @member {String} time
+ */
+DealParticipantsChangelog.prototype['time'] = undefined;
+
+
+
+
+
+
+export default DealParticipantsChangelog;
+
diff --git a/src/model/NewDeal.js b/src/model/NewDeal.js
index 09ea8830..5694d6ca 100644
--- a/src/model/NewDeal.js
+++ b/src/model/NewDeal.js
@@ -114,6 +114,21 @@ class NewDeal {
delete data['add_time'];
}
+ if (data.hasOwnProperty('won_time')) {
+ obj['won_time'] = ApiClient.convertToType(data['won_time'], 'String');
+
+ delete data['won_time'];
+ }
+ if (data.hasOwnProperty('lost_time')) {
+ obj['lost_time'] = ApiClient.convertToType(data['lost_time'], 'String');
+
+ delete data['lost_time'];
+ }
+ if (data.hasOwnProperty('close_time')) {
+ obj['close_time'] = ApiClient.convertToType(data['close_time'], 'String');
+
+ delete data['close_time'];
+ }
if (data.hasOwnProperty('expected_close_date')) {
obj['expected_close_date'] = ApiClient.convertToType(data['expected_close_date'], 'Date');
@@ -212,6 +227,24 @@ NewDeal.prototype['status'] = undefined;
*/
NewDeal.prototype['add_time'] = undefined;
+/**
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
+ * @member {String} won_time
+ */
+NewDeal.prototype['won_time'] = undefined;
+
+/**
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
+ * @member {String} lost_time
+ */
+NewDeal.prototype['lost_time'] = undefined;
+
+/**
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
+ * @member {String} close_time
+ */
+NewDeal.prototype['close_time'] = undefined;
+
/**
* The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
* @member {Date} expected_close_date
@@ -295,6 +328,21 @@ NewDealParameters.prototype['status'] = undefined;
*/
NewDealParameters.prototype['add_time'] = undefined;
// Implement BasicDeal interface:
+/**
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
+ * @member {String} won_time
+ */
+BasicDeal.prototype['won_time'] = undefined;
+/**
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
+ * @member {String} lost_time
+ */
+BasicDeal.prototype['lost_time'] = undefined;
+/**
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
+ * @member {String} close_time
+ */
+BasicDeal.prototype['close_time'] = undefined;
/**
* The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
* @member {Date} expected_close_date
diff --git a/src/model/ParticipantsChangelog.js b/src/model/ParticipantsChangelog.js
new file mode 100644
index 00000000..c85fb941
--- /dev/null
+++ b/src/model/ParticipantsChangelog.js
@@ -0,0 +1,102 @@
+/**
+ * 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.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import AdditionalData from './AdditionalData';
+import ParticipantsChangelogItem from './ParticipantsChangelogItem';
+
+/**
+ * The ParticipantsChangelog model module.
+ * @module model/ParticipantsChangelog
+ * @version 1.0.0
+ */
+class ParticipantsChangelog {
+ /**
+ * Constructs a new ParticipantsChangelog
.
+ * @alias module:model/ParticipantsChangelog
+ */
+ constructor() {
+
+ ParticipantsChangelog.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.
+ */
+ static initialize(obj) {
+ }
+
+ /**
+ * Constructs a ParticipantsChangelog
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/ParticipantsChangelog} obj Optional instance to populate.
+ * @return {module:model/ParticipantsChangelog} The populated ParticipantsChangelog
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new ParticipantsChangelog();
+
+ if (data.hasOwnProperty('success')) {
+ obj['success'] = ApiClient.convertToType(data['success'], 'Boolean');
+
+ delete data['success'];
+ }
+ if (data.hasOwnProperty('data')) {
+ obj['data'] = ApiClient.convertToType(data['data'], [ParticipantsChangelogItem]);
+
+ delete data['data'];
+ }
+ if (data.hasOwnProperty('additional_data')) {
+ obj['additional_data'] = AdditionalData.constructFromObject(data['additional_data']);
+
+ delete data['additional_data'];
+ }
+
+ if (Object.keys(data).length > 0) {
+ Object.assign(obj, data);
+ }
+
+ }
+ return obj;
+ }
+
+
+}
+
+/**
+ * If the request was successful or not
+ * @member {Boolean} success
+ */
+ParticipantsChangelog.prototype['success'] = undefined;
+
+/**
+ * The array of participant changelog
+ * @member {Array.} data
+ */
+ParticipantsChangelog.prototype['data'] = undefined;
+
+/**
+ * @member {module:model/AdditionalData} additional_data
+ */
+ParticipantsChangelog.prototype['additional_data'] = undefined;
+
+
+
+
+
+
+export default ParticipantsChangelog;
+
diff --git a/src/model/ParticipantsChangelogItem.js b/src/model/ParticipantsChangelogItem.js
new file mode 100644
index 00000000..947c99e4
--- /dev/null
+++ b/src/model/ParticipantsChangelogItem.js
@@ -0,0 +1,136 @@
+/**
+ * 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.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+import DealParticipantsChangelog from './DealParticipantsChangelog';
+
+/**
+ * The ParticipantsChangelogItem model module.
+ * @module model/ParticipantsChangelogItem
+ * @version 1.0.0
+ */
+class ParticipantsChangelogItem {
+ /**
+ * Constructs a new ParticipantsChangelogItem
.
+ * @alias module:model/ParticipantsChangelogItem
+ * @implements module:model/DealParticipantsChangelog
+ */
+ constructor() {
+ DealParticipantsChangelog.initialize(this);
+ ParticipantsChangelogItem.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.
+ */
+ static initialize(obj) {
+ }
+
+ /**
+ * Constructs a ParticipantsChangelogItem
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/ParticipantsChangelogItem} obj Optional instance to populate.
+ * @return {module:model/ParticipantsChangelogItem} The populated ParticipantsChangelogItem
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new ParticipantsChangelogItem();
+ DealParticipantsChangelog.constructFromObject(data, obj);
+
+ if (data.hasOwnProperty('actor_user_id')) {
+ obj['actor_user_id'] = ApiClient.convertToType(data['actor_user_id'], 'Number');
+
+ delete data['actor_user_id'];
+ }
+ if (data.hasOwnProperty('person_id')) {
+ obj['person_id'] = ApiClient.convertToType(data['person_id'], 'Number');
+
+ delete data['person_id'];
+ }
+ if (data.hasOwnProperty('action')) {
+ obj['action'] = ApiClient.convertToType(data['action'], 'String');
+
+ delete data['action'];
+ }
+ if (data.hasOwnProperty('time')) {
+ obj['time'] = ApiClient.convertToType(data['time'], 'String');
+
+ delete data['time'];
+ }
+
+ if (Object.keys(data).length > 0) {
+ Object.assign(obj, data);
+ }
+
+ }
+ return obj;
+ }
+
+
+}
+
+/**
+ * The ID of the user
+ * @member {Number} actor_user_id
+ */
+ParticipantsChangelogItem.prototype['actor_user_id'] = undefined;
+
+/**
+ * The ID of the person
+ * @member {Number} person_id
+ */
+ParticipantsChangelogItem.prototype['person_id'] = undefined;
+
+/**
+ * Deal participant action type
+ * @member {String} action
+ */
+ParticipantsChangelogItem.prototype['action'] = undefined;
+
+/**
+ * The deal participant action log time
+ * @member {String} time
+ */
+ParticipantsChangelogItem.prototype['time'] = undefined;
+
+
+// Implement DealParticipantsChangelog interface:
+/**
+ * The ID of the user
+ * @member {Number} actor_user_id
+ */
+DealParticipantsChangelog.prototype['actor_user_id'] = undefined;
+/**
+ * The ID of the person
+ * @member {Number} person_id
+ */
+DealParticipantsChangelog.prototype['person_id'] = undefined;
+/**
+ * Deal participant action type
+ * @member {String} action
+ */
+DealParticipantsChangelog.prototype['action'] = undefined;
+/**
+ * The deal participant action log time
+ * @member {String} time
+ */
+DealParticipantsChangelog.prototype['time'] = undefined;
+
+
+
+
+export default ParticipantsChangelogItem;
+
diff --git a/src/model/UpdateDealRequest.js b/src/model/UpdateDealRequest.js
index 436c8c41..52c1a362 100644
--- a/src/model/UpdateDealRequest.js
+++ b/src/model/UpdateDealRequest.js
@@ -107,6 +107,21 @@ class UpdateDealRequest {
delete data['status'];
}
+ if (data.hasOwnProperty('won_time')) {
+ obj['won_time'] = ApiClient.convertToType(data['won_time'], 'String');
+
+ delete data['won_time'];
+ }
+ if (data.hasOwnProperty('lost_time')) {
+ obj['lost_time'] = ApiClient.convertToType(data['lost_time'], 'String');
+
+ delete data['lost_time'];
+ }
+ if (data.hasOwnProperty('close_time')) {
+ obj['close_time'] = ApiClient.convertToType(data['close_time'], 'String');
+
+ delete data['close_time'];
+ }
if (data.hasOwnProperty('expected_close_date')) {
obj['expected_close_date'] = ApiClient.convertToType(data['expected_close_date'], 'Date');
@@ -199,6 +214,24 @@ UpdateDealRequest.prototype['stage_id'] = undefined;
*/
UpdateDealRequest.prototype['status'] = undefined;
+/**
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
+ * @member {String} won_time
+ */
+UpdateDealRequest.prototype['won_time'] = undefined;
+
+/**
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
+ * @member {String} lost_time
+ */
+UpdateDealRequest.prototype['lost_time'] = undefined;
+
+/**
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
+ * @member {String} close_time
+ */
+UpdateDealRequest.prototype['close_time'] = undefined;
+
/**
* The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
* @member {Date} expected_close_date
@@ -277,6 +310,21 @@ UpdateDealParameters.prototype['stage_id'] = undefined;
*/
UpdateDealParameters.prototype['status'] = undefined;
// Implement BasicDeal interface:
+/**
+ * The optional date and time of changing the deal status as won in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Won. Can not be used together with `lost_time`.
+ * @member {String} won_time
+ */
+BasicDeal.prototype['won_time'] = undefined;
+/**
+ * The optional date and time of changing the deal status as lost in UTC. Format: YYYY-MM-DD HH:MM:SS. Can be set only when deal `status` is already Lost. Can not be used together with `won_time`.
+ * @member {String} lost_time
+ */
+BasicDeal.prototype['lost_time'] = undefined;
+/**
+ * The optional date and time of closing the deal in UTC. Format: YYYY-MM-DD HH:MM:SS.
+ * @member {String} close_time
+ */
+BasicDeal.prototype['close_time'] = undefined;
/**
* The expected close date of the deal. In ISO 8601 format: YYYY-MM-DD.
* @member {Date} expected_close_date