Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build 2252 - version-minor #515

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 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 Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
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
12 changes: 12 additions & 0 deletions docs/DealParticipantsChangelog.md
Original file line number Diff line number Diff line change
@@ -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]


60 changes: 60 additions & 0 deletions docs/DealsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
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
11 changes: 11 additions & 0 deletions docs/ParticipantsChangelog.md
Original file line number Diff line number Diff line change
@@ -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]


12 changes: 12 additions & 0 deletions docs/ParticipantsChangelogItem.md
Original file line number Diff line number Diff line change
@@ -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]


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
77 changes: 77 additions & 0 deletions src/api/DealsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>.
* @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 <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>.
* @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.<br>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.
Expand Down
Loading
Loading