Skip to content

Commit

Permalink
Build 2243 - version-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
pipedrive-bot committed Jan 25, 2024
1 parent 448390d commit 6764e7b
Show file tree
Hide file tree
Showing 11 changed files with 148 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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]
- Add `won_time`, `lost_time` and `close_time` parameters for the `POST /v1/deals` and `PUT /v1/deals/{id}` endpoints

## [22.4.0] - 2024-01-05
### Added
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ app.get('/callback', (req, res) => {



### basic_authentication

- **Type**: HTTP basic authentication



### oauth2


Expand Down
2 changes: 1 addition & 1 deletion docs/AddWebhookRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 users 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']
Expand Down
3 changes: 3 additions & 0 deletions docs/BasicDeal.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 3 additions & 0 deletions docs/NewDeal.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 3 additions & 0 deletions docs/UpdateDealRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class ApiClient {
name: 'api_token',
apiKey: ''
},
'basic_authentication': {type: 'basic'},
'oauth2': {
type: 'oauth2',
host: 'https://oauth.pipedrive.com',
Expand Down
2 changes: 1 addition & 1 deletion src/model/AddWebhookRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 users 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;
Expand Down
33 changes: 33 additions & 0 deletions src/model/BasicDeal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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
Expand Down
48 changes: 48 additions & 0 deletions src/model/NewDeal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
48 changes: 48 additions & 0 deletions src/model/UpdateDealRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6764e7b

Please sign in to comment.