From a1f20a15f736a7d6378281ac4dd587a87794fc12 Mon Sep 17 00:00:00 2001 From: pipedrive-bot Date: Tue, 21 May 2024 10:53:21 +0000 Subject: [PATCH 1/2] Build 10 - version-minor --- CHANGELOG.md | 2 + docs/AddLeadRequest.md | 3 ++ docs/BaseDeal.md | 4 ++ docs/DealNonStrict.md | 4 ++ docs/DealNonStrictWithDetails.md | 4 ++ docs/DealStrict.md | 4 ++ docs/DealStrictWithMergeId.md | 4 ++ docs/DealsApi.md | 2 +- docs/LeadResponse.md | 4 ++ docs/LeadsApi.md | 2 +- docs/NewDeal.md | 3 ++ docs/NewDealParameters.md | 3 ++ docs/UpdateDealParameters.md | 2 + docs/UpdateDealRequest.md | 2 + docs/UpdateLeadRequest.md | 2 + src/api/DealsApi.js | 4 +- src/api/LeadsApi.js | 4 +- src/model/AddLeadRequest.js | 33 ++++++++++++++ src/model/BaseDeal.js | 44 ++++++++++++++++++ src/model/DealNonStrict.js | 64 +++++++++++++++++++++++++++ src/model/DealNonStrictWithDetails.js | 64 +++++++++++++++++++++++++++ src/model/DealStrict.js | 64 +++++++++++++++++++++++++++ src/model/DealStrictWithMergeId.js | 64 +++++++++++++++++++++++++++ src/model/LeadResponse.js | 44 ++++++++++++++++++ src/model/NewDeal.js | 48 ++++++++++++++++++++ src/model/NewDealParameters.js | 33 ++++++++++++++ src/model/UpdateDealParameters.js | 22 +++++++++ src/model/UpdateDealRequest.js | 32 ++++++++++++++ src/model/UpdateLeadRequest.js | 22 +++++++++ 29 files changed, 581 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac49cdd1..3dc3e7e8 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 `origin`, `origin_id`, `channel` and `channel_id` parameters representing the Source for Lead and Deal entity. ## [22.7.0] - 2024-05-14 ### Added diff --git a/docs/AddLeadRequest.md b/docs/AddLeadRequest.md index dbca1b1d..1c33dcd0 100644 --- a/docs/AddLeadRequest.md +++ b/docs/AddLeadRequest.md @@ -13,5 +13,8 @@ Name | Type | Description | Notes **expectedCloseDate** | **Date** | The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD. | [optional] **visibleTo** | [**VisibleTo**](VisibleTo.md) | The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table> | [optional] **wasSeen** | **Boolean** | A flag indicating whether the lead was seen by someone in the Pipedrive UI | [optional] +**originId** | **String** | The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this lead. If omitted, `origin_id` will be set to null. | [optional] +**channel** | **Number** | The ID of Marketing channel this lead was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. If omitted, channel will be set to null. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null. | [optional] diff --git a/docs/BaseDeal.md b/docs/BaseDeal.md index a6acfc17..ba82acb3 100644 --- a/docs/BaseDeal.md +++ b/docs/BaseDeal.md @@ -56,5 +56,9 @@ Name | Type | Description | Notes **ccEmail** | **String** | The BCC email of the deal | [optional] **orgHidden** | **Boolean** | If the organization that is associated with the deal is hidden or not | [optional] **personHidden** | **Boolean** | If the person that is associated with the deal is hidden or not | [optional] +**origin** | **String** | The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. | [optional] +**originId** | **String** | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. | [optional] +**channel** | **Number** | The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. | [optional] diff --git a/docs/DealNonStrict.md b/docs/DealNonStrict.md index 61df9113..a3800b0a 100644 --- a/docs/DealNonStrict.md +++ b/docs/DealNonStrict.md @@ -61,5 +61,9 @@ Name | Type | Description | Notes **ccEmail** | **String** | The BCC email of the deal | [optional] **orgHidden** | **Boolean** | If the organization that is associated with the deal is hidden or not | [optional] **personHidden** | **Boolean** | If the person that is associated with the deal is hidden or not | [optional] +**origin** | **String** | The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. | [optional] +**originId** | **String** | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. | [optional] +**channel** | **Number** | The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. | [optional] diff --git a/docs/DealNonStrictWithDetails.md b/docs/DealNonStrictWithDetails.md index ae1e139e..c16b1299 100644 --- a/docs/DealNonStrictWithDetails.md +++ b/docs/DealNonStrictWithDetails.md @@ -61,6 +61,10 @@ Name | Type | Description | Notes **ccEmail** | **String** | The BCC email of the deal | [optional] **orgHidden** | **Boolean** | If the organization that is associated with the deal is hidden or not | [optional] **personHidden** | **Boolean** | If the person that is associated with the deal is hidden or not | [optional] +**origin** | **String** | The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. | [optional] +**originId** | **String** | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. | [optional] +**channel** | **Number** | The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. | [optional] **averageTimeToWon** | [**DealNonStrictWithDetailsAllOfAverageTimeToWon**](DealNonStrictWithDetailsAllOfAverageTimeToWon.md) | | [optional] **averageStageProgress** | **Number** | The average of the deal stage progression | [optional] **age** | [**DealNonStrictWithDetailsAllOfAge**](DealNonStrictWithDetailsAllOfAge.md) | | [optional] diff --git a/docs/DealStrict.md b/docs/DealStrict.md index 0dff87b3..26508b7e 100644 --- a/docs/DealStrict.md +++ b/docs/DealStrict.md @@ -61,5 +61,9 @@ Name | Type | Description | Notes **ccEmail** | **String** | The BCC email of the deal | [optional] **orgHidden** | **Boolean** | If the organization that is associated with the deal is hidden or not | [optional] **personHidden** | **Boolean** | If the person that is associated with the deal is hidden or not | [optional] +**origin** | **String** | The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. | [optional] +**originId** | **String** | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. | [optional] +**channel** | **Number** | The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. | [optional] diff --git a/docs/DealStrictWithMergeId.md b/docs/DealStrictWithMergeId.md index 9914444c..76526172 100644 --- a/docs/DealStrictWithMergeId.md +++ b/docs/DealStrictWithMergeId.md @@ -61,6 +61,10 @@ Name | Type | Description | Notes **ccEmail** | **String** | The BCC email of the deal | [optional] **orgHidden** | **Boolean** | If the organization that is associated with the deal is hidden or not | [optional] **personHidden** | **Boolean** | If the person that is associated with the deal is hidden or not | [optional] +**origin** | **String** | The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. | [optional] +**originId** | **String** | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. | [optional] +**channel** | **Number** | The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. | [optional] **mergeWhatId** | **Number** | The deal ID of the deal which the original deal was merged with | [optional] diff --git a/docs/DealsApi.md b/docs/DealsApi.md index 2f858fdf..8479eb83 100644 --- a/docs/DealsApi.md +++ b/docs/DealsApi.md @@ -43,7 +43,7 @@ Method | HTTP request | Description Add a deal -Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/creating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">adding a deal</a>. +Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/creating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">adding a deal</a>. ### Example diff --git a/docs/LeadResponse.md b/docs/LeadResponse.md index f5a99b12..75a389ac 100644 --- a/docs/LeadResponse.md +++ b/docs/LeadResponse.md @@ -12,6 +12,10 @@ Name | Type | Description | Notes **personId** | **Number** | The ID of a person which this lead is linked to | [optional] **organizationId** | **Number** | The ID of an organization which this lead is linked to | [optional] **sourceName** | **String** | Defines where the lead comes from. Will be `API` if the lead was created through the Public API and will be `Manually created` if the lead was created manually through the UI. | [optional] +**origin** | **String** | The way this Lead was created. `origin` field is set by Pipedrive when Lead is created and cannot be changed. | [optional] +**originId** | **String** | The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this Lead. | [optional] +**channel** | **Number** | The ID of your Marketing channel this Lead was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. | [optional] **isArchived** | **Boolean** | A flag indicating whether the lead is archived or not | [optional] **wasSeen** | **Boolean** | A flag indicating whether the lead was seen by someone in the Pipedrive UI | [optional] **value** | [**LeadValue**](LeadValue.md) | | [optional] diff --git a/docs/LeadsApi.md b/docs/LeadsApi.md index 2ac33ae1..b6e30c95 100644 --- a/docs/LeadsApi.md +++ b/docs/LeadsApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description Add a lead -Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source `API` assigned. Here's the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-lead\" target=\"_blank\" rel=\"noopener noreferrer\">adding a lead</a>. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the <a href=\"https://pipedrive.readme.io/docs/updating-custom-field-value\" target=\"_blank\" rel=\"noopener noreferrer\">updating custom fields' values tutorial</a>. +Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source and origin set to `API`. Here's the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-lead\" target=\"_blank\" rel=\"noopener noreferrer\">adding a lead</a>. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the <a href=\"https://pipedrive.readme.io/docs/updating-custom-field-value\" target=\"_blank\" rel=\"noopener noreferrer\">updating custom fields' values tutorial</a>. ### Example diff --git a/docs/NewDeal.md b/docs/NewDeal.md index b90b0c54..bbee54bf 100644 --- a/docs/NewDeal.md +++ b/docs/NewDeal.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`. 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] +**originId** | **String** | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, `origin_id` will be set to null. | [optional] +**channel** | **Number** | The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. If omitted, channel will be set to null. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null. | [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] diff --git a/docs/NewDealParameters.md b/docs/NewDealParameters.md index b75f0eaa..ff80ff0e 100644 --- a/docs/NewDealParameters.md +++ b/docs/NewDealParameters.md @@ -13,6 +13,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`. 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] +**originId** | **String** | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, `origin_id` will be set to null. | [optional] +**channel** | **Number** | The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. If omitted, channel will be set to null. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null. | [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] diff --git a/docs/UpdateDealParameters.md b/docs/UpdateDealParameters.md index 677f4825..6aa1f9b0 100644 --- a/docs/UpdateDealParameters.md +++ b/docs/UpdateDealParameters.md @@ -13,6 +13,8 @@ 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] +**channel** | **Number** | The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. | [optional] diff --git a/docs/UpdateDealRequest.md b/docs/UpdateDealRequest.md index 35141e6e..bd4ae925 100644 --- a/docs/UpdateDealRequest.md +++ b/docs/UpdateDealRequest.md @@ -14,6 +14,8 @@ 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] +**channel** | **Number** | The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. | [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] diff --git a/docs/UpdateLeadRequest.md b/docs/UpdateLeadRequest.md index 9c472265..de21dbcd 100644 --- a/docs/UpdateLeadRequest.md +++ b/docs/UpdateLeadRequest.md @@ -14,5 +14,7 @@ Name | Type | Description | Notes **expectedCloseDate** | **Date** | The date of when the deal which will be created from the lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD. | [optional] **visibleTo** | [**VisibleTo**](VisibleTo.md) | The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table> | [optional] **wasSeen** | **Boolean** | A flag indicating whether the lead was seen by someone in the Pipedrive UI | [optional] +**channel** | **Number** | The ID of Marketing channel this lead was created from. Provided value must be one of the channels configured for your company which you can fetch with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>. | [optional] +**channelId** | **String** | The optional ID to further distinguish the Marketing channel. | [optional] diff --git a/src/api/DealsApi.js b/src/api/DealsApi.js index 1451bb97..2bcafc1f 100644 --- a/src/api/DealsApi.js +++ b/src/api/DealsApi.js @@ -74,7 +74,7 @@ export default class DealsApi { /** * Add a deal - * Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal. + * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal. * @param {Object} opts Optional parameters * @param {module:model/NewDeal} opts.newDeal * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetAddedDeal} and HTTP response @@ -122,7 +122,7 @@ export default class DealsApi { /** * Add a deal - * Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal. + * Adds a new deal. All deals created through the Pipedrive API will have a `origin` set to `API`. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for `key` values. For more information, see the tutorial for adding a deal. * @param {Object} opts Optional parameters * @param {module:model/NewDeal} opts.newDeal * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetAddedDeal} diff --git a/src/api/LeadsApi.js b/src/api/LeadsApi.js index 3df8c058..57ee71ca 100644 --- a/src/api/LeadsApi.js +++ b/src/api/LeadsApi.js @@ -44,7 +44,7 @@ export default class LeadsApi { /** * Add a lead - * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source `API` assigned. Here's the tutorial for adding a lead. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the updating custom fields' values tutorial. + * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source and origin set to `API`. Here's the tutorial for adding a lead. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the updating custom fields' values tutorial. * @param {Object} opts Optional parameters * @param {module:model/AddLeadRequest} opts.addLeadRequest * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OneLeadResponse200} and HTTP response @@ -95,7 +95,7 @@ export default class LeadsApi { /** * Add a lead - * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source `API` assigned. Here's the tutorial for adding a lead. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the updating custom fields' values tutorial. + * Creates a lead. A lead always has to be linked to a person or an organization or both. All leads created through the Pipedrive API will have a lead source and origin set to `API`. Here's the tutorial for adding a lead. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals. See an example given in the updating custom fields' values tutorial. * @param {Object} opts Optional parameters * @param {module:model/AddLeadRequest} opts.addLeadRequest * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OneLeadResponse200} diff --git a/src/model/AddLeadRequest.js b/src/model/AddLeadRequest.js index ebfe5958..f7b0a6de 100644 --- a/src/model/AddLeadRequest.js +++ b/src/model/AddLeadRequest.js @@ -96,6 +96,21 @@ class AddLeadRequest { delete data['was_seen']; } + if (data.hasOwnProperty('origin_id')) { + obj['origin_id'] = ApiClient.convertToType(data['origin_id'], 'String'); + + delete data['origin_id']; + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (Object.keys(data).length > 0) { Object.assign(obj, data); @@ -161,6 +176,24 @@ AddLeadRequest.prototype['visible_to'] = undefined; */ AddLeadRequest.prototype['was_seen'] = undefined; +/** + * The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this lead. If omitted, `origin_id` will be set to null. + * @member {String} origin_id + */ +AddLeadRequest.prototype['origin_id'] = undefined; + +/** + * The ID of Marketing channel this lead was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with GET /v1/dealFields. If omitted, channel will be set to null. + * @member {Number} channel + */ +AddLeadRequest.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null. + * @member {String} channel_id + */ +AddLeadRequest.prototype['channel_id'] = undefined; + diff --git a/src/model/BaseDeal.js b/src/model/BaseDeal.js index d7bfc126..04f74c76 100644 --- a/src/model/BaseDeal.js +++ b/src/model/BaseDeal.js @@ -307,6 +307,26 @@ class BaseDeal { delete data['person_hidden']; } + if (data.hasOwnProperty('origin')) { + obj['origin'] = ApiClient.convertToType(data['origin'], 'String'); + + delete data['origin']; + } + if (data.hasOwnProperty('origin_id')) { + obj['origin_id'] = ApiClient.convertToType(data['origin_id'], 'String'); + + delete data['origin_id']; + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (Object.keys(data).length > 0) { Object.assign(obj, data); @@ -631,6 +651,30 @@ BaseDeal.prototype['org_hidden'] = undefined; */ BaseDeal.prototype['person_hidden'] = undefined; +/** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @member {String} origin + */ +BaseDeal.prototype['origin'] = undefined; + +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @member {String} origin_id + */ +BaseDeal.prototype['origin_id'] = undefined; + +/** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +BaseDeal.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +BaseDeal.prototype['channel_id'] = undefined; + diff --git a/src/model/DealNonStrict.js b/src/model/DealNonStrict.js index 7c2fecfb..cdffa9ee 100644 --- a/src/model/DealNonStrict.js +++ b/src/model/DealNonStrict.js @@ -342,6 +342,26 @@ class DealNonStrict { delete data['person_hidden']; } + if (data.hasOwnProperty('origin')) { + obj['origin'] = ApiClient.convertToType(data['origin'], 'String'); + + delete data['origin']; + } + if (data.hasOwnProperty('origin_id')) { + obj['origin_id'] = ApiClient.convertToType(data['origin_id'], 'String'); + + delete data['origin_id']; + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (Object.keys(data).length > 0) { Object.assign(obj, data); @@ -692,6 +712,30 @@ DealNonStrict.prototype['org_hidden'] = undefined; */ DealNonStrict.prototype['person_hidden'] = undefined; +/** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @member {String} origin + */ +DealNonStrict.prototype['origin'] = undefined; + +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @member {String} origin_id + */ +DealNonStrict.prototype['origin_id'] = undefined; + +/** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +DealNonStrict.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +DealNonStrict.prototype['channel_id'] = undefined; + // Implement DealNonStrictModeFields interface: /** @@ -976,6 +1020,26 @@ BaseDeal.prototype['org_hidden'] = undefined; * @member {Boolean} person_hidden */ BaseDeal.prototype['person_hidden'] = undefined; +/** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @member {String} origin + */ +BaseDeal.prototype['origin'] = undefined; +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @member {String} origin_id + */ +BaseDeal.prototype['origin_id'] = undefined; +/** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +BaseDeal.prototype['channel'] = undefined; +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +BaseDeal.prototype['channel_id'] = undefined; diff --git a/src/model/DealNonStrictWithDetails.js b/src/model/DealNonStrictWithDetails.js index bd81cf10..624abaf0 100644 --- a/src/model/DealNonStrictWithDetails.js +++ b/src/model/DealNonStrictWithDetails.js @@ -345,6 +345,26 @@ class DealNonStrictWithDetails { delete data['person_hidden']; } + if (data.hasOwnProperty('origin')) { + obj['origin'] = ApiClient.convertToType(data['origin'], 'String'); + + delete data['origin']; + } + if (data.hasOwnProperty('origin_id')) { + obj['origin_id'] = ApiClient.convertToType(data['origin_id'], 'String'); + + delete data['origin_id']; + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (data.hasOwnProperty('average_time_to_won')) { obj['average_time_to_won'] = DealNonStrictWithDetailsAllOfAverageTimeToWon.constructFromObject(data['average_time_to_won']); @@ -725,6 +745,30 @@ DealNonStrictWithDetails.prototype['org_hidden'] = undefined; */ DealNonStrictWithDetails.prototype['person_hidden'] = undefined; +/** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @member {String} origin + */ +DealNonStrictWithDetails.prototype['origin'] = undefined; + +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @member {String} origin_id + */ +DealNonStrictWithDetails.prototype['origin_id'] = undefined; + +/** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +DealNonStrictWithDetails.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +DealNonStrictWithDetails.prototype['channel_id'] = undefined; + /** * @member {module:model/DealNonStrictWithDetailsAllOfAverageTimeToWon} average_time_to_won */ @@ -1041,6 +1085,26 @@ DealNonStrict.prototype['org_hidden'] = undefined; * @member {Boolean} person_hidden */ DealNonStrict.prototype['person_hidden'] = undefined; +/** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @member {String} origin + */ +DealNonStrict.prototype['origin'] = undefined; +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @member {String} origin_id + */ +DealNonStrict.prototype['origin_id'] = undefined; +/** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +DealNonStrict.prototype['channel'] = undefined; +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +DealNonStrict.prototype['channel_id'] = undefined; // Implement DealNonStrictWithDetailsAllOf interface: /** * @member {module:model/DealNonStrictWithDetailsAllOfAverageTimeToWon} average_time_to_won diff --git a/src/model/DealStrict.js b/src/model/DealStrict.js index d2a23f96..0bb6e663 100644 --- a/src/model/DealStrict.js +++ b/src/model/DealStrict.js @@ -338,6 +338,26 @@ class DealStrict { delete data['person_hidden']; } + if (data.hasOwnProperty('origin')) { + obj['origin'] = ApiClient.convertToType(data['origin'], 'String'); + + delete data['origin']; + } + if (data.hasOwnProperty('origin_id')) { + obj['origin_id'] = ApiClient.convertToType(data['origin_id'], 'String'); + + delete data['origin_id']; + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (Object.keys(data).length > 0) { Object.assign(obj, data); @@ -692,6 +712,30 @@ DealStrict.prototype['org_hidden'] = undefined; */ DealStrict.prototype['person_hidden'] = undefined; +/** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @member {String} origin + */ +DealStrict.prototype['origin'] = undefined; + +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @member {String} origin_id + */ +DealStrict.prototype['origin_id'] = undefined; + +/** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +DealStrict.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +DealStrict.prototype['channel_id'] = undefined; + // Implement DealStrictModeFields interface: /** @@ -980,6 +1024,26 @@ BaseDeal.prototype['org_hidden'] = undefined; * @member {Boolean} person_hidden */ BaseDeal.prototype['person_hidden'] = undefined; +/** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @member {String} origin + */ +BaseDeal.prototype['origin'] = undefined; +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @member {String} origin_id + */ +BaseDeal.prototype['origin_id'] = undefined; +/** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +BaseDeal.prototype['channel'] = undefined; +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +BaseDeal.prototype['channel_id'] = undefined; diff --git a/src/model/DealStrictWithMergeId.js b/src/model/DealStrictWithMergeId.js index 246a39ac..fcec0aff 100644 --- a/src/model/DealStrictWithMergeId.js +++ b/src/model/DealStrictWithMergeId.js @@ -338,6 +338,26 @@ class DealStrictWithMergeId { delete data['person_hidden']; } + if (data.hasOwnProperty('origin')) { + obj['origin'] = ApiClient.convertToType(data['origin'], 'String'); + + delete data['origin']; + } + if (data.hasOwnProperty('origin_id')) { + obj['origin_id'] = ApiClient.convertToType(data['origin_id'], 'String'); + + delete data['origin_id']; + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (data.hasOwnProperty('merge_what_id')) { obj['merge_what_id'] = ApiClient.convertToType(data['merge_what_id'], 'Number'); @@ -697,6 +717,30 @@ DealStrictWithMergeId.prototype['org_hidden'] = undefined; */ DealStrictWithMergeId.prototype['person_hidden'] = undefined; +/** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @member {String} origin + */ +DealStrictWithMergeId.prototype['origin'] = undefined; + +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @member {String} origin_id + */ +DealStrictWithMergeId.prototype['origin_id'] = undefined; + +/** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +DealStrictWithMergeId.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +DealStrictWithMergeId.prototype['channel_id'] = undefined; + /** * The deal ID of the deal which the original deal was merged with * @member {Number} merge_what_id @@ -990,6 +1034,26 @@ DealStrict.prototype['org_hidden'] = undefined; * @member {Boolean} person_hidden */ DealStrict.prototype['person_hidden'] = undefined; +/** + * The way this Deal was created. `origin` field is set by Pipedrive when Deal is created and cannot be changed. + * @member {String} origin + */ +DealStrict.prototype['origin'] = undefined; +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. + * @member {String} origin_id + */ +DealStrict.prototype['origin_id'] = undefined; +/** + * The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +DealStrict.prototype['channel'] = undefined; +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +DealStrict.prototype['channel_id'] = undefined; // Implement DealStrictWithMergeIdAllOf interface: /** * The deal ID of the deal which the original deal was merged with diff --git a/src/model/LeadResponse.js b/src/model/LeadResponse.js index 92fcd007..97ca48d4 100644 --- a/src/model/LeadResponse.js +++ b/src/model/LeadResponse.js @@ -89,6 +89,26 @@ class LeadResponse { delete data['source_name']; } + if (data.hasOwnProperty('origin')) { + obj['origin'] = ApiClient.convertToType(data['origin'], 'String'); + + delete data['origin']; + } + if (data.hasOwnProperty('origin_id')) { + obj['origin_id'] = ApiClient.convertToType(data['origin_id'], 'String'); + + delete data['origin_id']; + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (data.hasOwnProperty('is_archived')) { obj['is_archived'] = ApiClient.convertToType(data['is_archived'], 'Boolean'); @@ -194,6 +214,30 @@ LeadResponse.prototype['organization_id'] = undefined; */ LeadResponse.prototype['source_name'] = undefined; +/** + * The way this Lead was created. `origin` field is set by Pipedrive when Lead is created and cannot be changed. + * @member {String} origin + */ +LeadResponse.prototype['origin'] = undefined; + +/** + * The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this Lead. + * @member {String} origin_id + */ +LeadResponse.prototype['origin_id'] = undefined; + +/** + * The ID of your Marketing channel this Lead was created from. Recognized Marketing channels can be configured in your Company settings. + * @member {Number} channel + */ +LeadResponse.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +LeadResponse.prototype['channel_id'] = undefined; + /** * A flag indicating whether the lead is archived or not * @member {Boolean} is_archived diff --git a/src/model/NewDeal.js b/src/model/NewDeal.js index 5694d6ca..25fc96a8 100644 --- a/src/model/NewDeal.js +++ b/src/model/NewDeal.js @@ -109,6 +109,21 @@ class NewDeal { delete data['status']; } + if (data.hasOwnProperty('origin_id')) { + obj['origin_id'] = ApiClient.convertToType(data['origin_id'], 'String'); + + delete data['origin_id']; + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (data.hasOwnProperty('add_time')) { obj['add_time'] = ApiClient.convertToType(data['add_time'], 'String'); @@ -221,6 +236,24 @@ NewDeal.prototype['stage_id'] = undefined; */ NewDeal.prototype['status'] = undefined; +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, `origin_id` will be set to null. + * @member {String} origin_id + */ +NewDeal.prototype['origin_id'] = undefined; + +/** + * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with GET /v1/dealFields. If omitted, channel will be set to null. + * @member {Number} channel + */ +NewDeal.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null. + * @member {String} channel_id + */ +NewDeal.prototype['channel_id'] = undefined; + /** * The optional creation date & time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS * @member {String} add_time @@ -322,6 +355,21 @@ NewDealParameters.prototype['stage_id'] = undefined; * @member {module:model/NewDealParameters.StatusEnum} status */ NewDealParameters.prototype['status'] = undefined; +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, `origin_id` will be set to null. + * @member {String} origin_id + */ +NewDealParameters.prototype['origin_id'] = undefined; +/** + * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with GET /v1/dealFields. If omitted, channel will be set to null. + * @member {Number} channel + */ +NewDealParameters.prototype['channel'] = undefined; +/** + * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null. + * @member {String} channel_id + */ +NewDealParameters.prototype['channel_id'] = undefined; /** * The optional creation date & time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS * @member {String} add_time diff --git a/src/model/NewDealParameters.js b/src/model/NewDealParameters.js index 86477e41..a32807f8 100644 --- a/src/model/NewDealParameters.js +++ b/src/model/NewDealParameters.js @@ -92,6 +92,21 @@ class NewDealParameters { delete data['status']; } + if (data.hasOwnProperty('origin_id')) { + obj['origin_id'] = ApiClient.convertToType(data['origin_id'], 'String'); + + delete data['origin_id']; + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (data.hasOwnProperty('add_time')) { obj['add_time'] = ApiClient.convertToType(data['add_time'], 'String'); @@ -163,6 +178,24 @@ NewDealParameters.prototype['stage_id'] = undefined; */ NewDealParameters.prototype['status'] = undefined; +/** + * The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this deal. If omitted, `origin_id` will be set to null. + * @member {String} origin_id + */ +NewDealParameters.prototype['origin_id'] = undefined; + +/** + * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with GET /v1/dealFields. If omitted, channel will be set to null. + * @member {Number} channel + */ +NewDealParameters.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. If omitted, `channel_id` will be set to null. + * @member {String} channel_id + */ +NewDealParameters.prototype['channel_id'] = undefined; + /** * The optional creation date & time of the deal in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS * @member {String} add_time diff --git a/src/model/UpdateDealParameters.js b/src/model/UpdateDealParameters.js index 9783aaac..171ac679 100644 --- a/src/model/UpdateDealParameters.js +++ b/src/model/UpdateDealParameters.js @@ -92,6 +92,16 @@ class UpdateDealParameters { delete data['status']; } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (Object.keys(data).length > 0) { Object.assign(obj, data); @@ -158,6 +168,18 @@ UpdateDealParameters.prototype['stage_id'] = undefined; */ UpdateDealParameters.prototype['status'] = undefined; +/** + * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with GET /v1/dealFields. + * @member {Number} channel + */ +UpdateDealParameters.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +UpdateDealParameters.prototype['channel_id'] = undefined; + diff --git a/src/model/UpdateDealRequest.js b/src/model/UpdateDealRequest.js index 52c1a362..4ac1a017 100644 --- a/src/model/UpdateDealRequest.js +++ b/src/model/UpdateDealRequest.js @@ -107,6 +107,16 @@ class UpdateDealRequest { delete data['status']; } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (data.hasOwnProperty('won_time')) { obj['won_time'] = ApiClient.convertToType(data['won_time'], 'String'); @@ -214,6 +224,18 @@ UpdateDealRequest.prototype['stage_id'] = undefined; */ UpdateDealRequest.prototype['status'] = undefined; +/** + * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with GET /v1/dealFields. + * @member {Number} channel + */ +UpdateDealRequest.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +UpdateDealRequest.prototype['channel_id'] = 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 @@ -309,6 +331,16 @@ UpdateDealParameters.prototype['stage_id'] = undefined; * @member {module:model/UpdateDealParameters.StatusEnum} status */ UpdateDealParameters.prototype['status'] = undefined; +/** + * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with GET /v1/dealFields. + * @member {Number} channel + */ +UpdateDealParameters.prototype['channel'] = undefined; +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +UpdateDealParameters.prototype['channel_id'] = 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`. diff --git a/src/model/UpdateLeadRequest.js b/src/model/UpdateLeadRequest.js index 9de59b76..1b4cf30c 100644 --- a/src/model/UpdateLeadRequest.js +++ b/src/model/UpdateLeadRequest.js @@ -99,6 +99,16 @@ class UpdateLeadRequest { delete data['was_seen']; } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'Number'); + + delete data['channel']; + } + if (data.hasOwnProperty('channel_id')) { + obj['channel_id'] = ApiClient.convertToType(data['channel_id'], 'String'); + + delete data['channel_id']; + } if (Object.keys(data).length > 0) { Object.assign(obj, data); @@ -170,6 +180,18 @@ UpdateLeadRequest.prototype['visible_to'] = undefined; */ UpdateLeadRequest.prototype['was_seen'] = undefined; +/** + * The ID of Marketing channel this lead was created from. Provided value must be one of the channels configured for your company which you can fetch with GET /v1/dealFields. + * @member {Number} channel + */ +UpdateLeadRequest.prototype['channel'] = undefined; + +/** + * The optional ID to further distinguish the Marketing channel. + * @member {String} channel_id + */ +UpdateLeadRequest.prototype['channel_id'] = undefined; + From 426a07121472e6a52a0178550b02ef17a17bf76a Mon Sep 17 00:00:00 2001 From: jenkins User Date: Tue, 21 May 2024 10:58:04 +0000 Subject: [PATCH 2/2] 22.8.0 --- CHANGELOG.md | 5 ++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dc3e7e8..72b37877 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] + +## [22.8.0] - 2024-05-21 ### Added - Added `origin`, `origin_id`, `channel` and `channel_id` parameters representing the Source for Lead and Deal entity. @@ -615,7 +617,8 @@ structure * Fixed `GET /goal/:id/results` error handling in case when there are no existing stages connected to specified goal * Fixed typo in lead example response (`crrency` to `currency`) -[Unreleased]: https://github.com/pipedrive/api-docs/compare/v22.7.0...HEAD +[Unreleased]: https://github.com/pipedrive/api-docs/compare/v22.8.0...HEAD +[22.8.0]: https://github.com/pipedrive/api-docs/compare/v22.7.0...v22.8.0 [22.7.0]: https://github.com/pipedrive/api-docs/compare/v22.6.1...v22.7.0 [22.6.1]: https://github.com/pipedrive/api-docs/compare/v22.6.0...v22.6.1 [22.6.0]: https://github.com/pipedrive/api-docs/compare/v22.5.0...v22.6.0 diff --git a/package-lock.json b/package-lock.json index 490ef26a..08806d0b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pipedrive", - "version": "22.7.0", + "version": "22.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pipedrive", - "version": "22.7.0", + "version": "22.8.0", "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", diff --git a/package.json b/package.json index 06fba9ea..eb7bd706 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pipedrive", - "version": "22.7.0", + "version": "22.8.0", "description": "Pipedrive REST client for NodeJS", "license": "MIT", "main": "dist/index.js",