diff --git a/CHANGELOG.md b/CHANGELOG.md index 9310e3c0..e3879ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ For public Changelog covering all changes done to Pipedrive’s API, webhooks an ## [Unreleased] +## [23.3.0] - 2024-09-23 +### Added +- Add documentation for installments functionality: + - `POST` `/v1/deals/{id}/products` endpoint + - `PUT` `/v1/deals/{id}/products/{product_attachment_id}` endpoint + - `DELETE` `/v1/deals/{id}/products/{product_attachment_id}` endpoint + - `POST` `/v2/deals/{id}/products` endpoint + - `PATCH` `/v2/deals/{id}/products/{product_attachment_id}` endpoint + - `DELETE` `/v2/deals/{id}/products/{product_attachment_id}` endpoint + ## [23.2.6] - 2024-09-06 ### Fixed - Deleted unused file with long name @@ -681,7 +691,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/v23.2.5...HEAD +[Unreleased]: https://github.com/pipedrive/api-docs/compare/v23.3.0...HEAD +[23.3.0]: https://github.com/pipedrive/api-docs/compare/v23.2.5...v23.3.0 [23.2.5]: https://github.com/pipedrive/api-docs/compare/v23.2.4...v23.2.5 [23.2.4]: https://github.com/pipedrive/api-docs/compare/v23.2.3...v23.2.4 [23.2.3]: https://github.com/pipedrive/api-docs/compare/v23.2.2...v23.2.3 diff --git a/README.md b/README.md index 9779eb34..ad5509f4 100644 --- a/README.md +++ b/README.md @@ -973,6 +973,8 @@ Class | Method | HTTP request | Description - [Pipedrive.GetDealsTimelineData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsTimelineData.md) - [Pipedrive.GetDealsTimelineDataTotals](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDealsTimelineDataTotals.md) - [Pipedrive.GetDuplicatedDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetDuplicatedDeal.md) + - [Pipedrive.GetField](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetField.md) + - [Pipedrive.GetFieldAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetFieldAllOf.md) - [Pipedrive.GetGoalResultResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetGoalResultResponse.md) - [Pipedrive.GetGoalsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetGoalsResponse.md) - [Pipedrive.GetLeadIdResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadIdResponse.md) @@ -983,6 +985,7 @@ Class | Method | HTTP request | Description - [Pipedrive.GetLeadsSourceResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadsSourceResponse.md) - [Pipedrive.GetLeadsSourceResponseData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetLeadsSourceResponseData.md) - [Pipedrive.GetMergedDeal](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetMergedDeal.md) + - [Pipedrive.GetNoteField](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetNoteField.md) - [Pipedrive.GetNotes](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetNotes.md) - [Pipedrive.GetOneFile](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetOneFile.md) - [Pipedrive.GetOnePipeline](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetOnePipeline.md) @@ -992,6 +995,7 @@ Class | Method | HTTP request | Description - [Pipedrive.GetPersonDetailsResponseAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetPersonDetailsResponseAllOf.md) - [Pipedrive.GetPersonDetailsResponseAllOfAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetPersonDetailsResponseAllOfAdditionalData.md) - [Pipedrive.GetProductAttachmentDetails](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProductAttachmentDetails.md) + - [Pipedrive.GetProductField](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProductField.md) - [Pipedrive.GetProductFieldResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProductFieldResponse.md) - [Pipedrive.GetProjectBoardResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectBoardResponse.md) - [Pipedrive.GetProjectBoardsResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/GetProjectBoardsResponse.md) @@ -1038,6 +1042,7 @@ Class | Method | HTTP request | Description - [Pipedrive.InlineResponse403AdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse403AdditionalData.md) - [Pipedrive.InlineResponse404](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse404.md) - [Pipedrive.InlineResponse404AdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/InlineResponse404AdditionalData.md) + - [Pipedrive.InternalFieldType](https://github.com/pipedrive/client-nodejs/blob/master/docs/InternalFieldType.md) - [Pipedrive.ItemSearchAdditionalData](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchAdditionalData.md) - [Pipedrive.ItemSearchAdditionalDataPagination](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchAdditionalDataPagination.md) - [Pipedrive.ItemSearchFieldResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/ItemSearchFieldResponse.md) @@ -1368,7 +1373,7 @@ Class | Method | HTTP request | Description - [Pipedrive.TemplateObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/TemplateObject.md) - [Pipedrive.TemplateResponseObject](https://github.com/pipedrive/client-nodejs/blob/master/docs/TemplateResponseObject.md) - [Pipedrive.Unauthorized](https://github.com/pipedrive/client-nodejs/blob/master/docs/Unauthorized.md) - - [Pipedrive.UpdateActivityPlanItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateActivityPlanItem.md) + - [Pipedrive.UpdateActivityPlanItemResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateActivityPlanItemResponse.md) - [Pipedrive.UpdateActivityResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateActivityResponse.md) - [Pipedrive.UpdateDealParameters](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateDealParameters.md) - [Pipedrive.UpdateDealProduct](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateDealProduct.md) @@ -1388,7 +1393,7 @@ Class | Method | HTTP request | Description - [Pipedrive.UpdateProjectResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateProjectResponse.md) - [Pipedrive.UpdateStageRequest](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateStageRequest.md) - [Pipedrive.UpdateStageRequestAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateStageRequestAllOf.md) - - [Pipedrive.UpdateTaskPlanItem](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTaskPlanItem.md) + - [Pipedrive.UpdateTaskPlanItemResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTaskPlanItemResponse.md) - [Pipedrive.UpdateTaskResponse](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTaskResponse.md) - [Pipedrive.UpdateTeam](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTeam.md) - [Pipedrive.UpdateTeamAllOf](https://github.com/pipedrive/client-nodejs/blob/master/docs/UpdateTeamAllOf.md) diff --git a/docs/DealProductRequestBody.md b/docs/DealProductRequestBody.md index 37c47044..b2b30eba 100644 --- a/docs/DealProductRequestBody.md +++ b/docs/DealProductRequestBody.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **comments** | **String** | A textual comment associated with this product-deal attachment | [optional] **tax** | **Number** | The tax percentage | [optional] [default to 0] **tax_method** | **String** | The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount | [optional] -**enabled_flag** | **Boolean** | Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default | [optional] [default to true] +**enabled_flag** | **Boolean** | Whether the product is enabled for a deal or not This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring | [optional] [default to true] diff --git a/docs/DealsApi.md b/docs/DealsApi.md index 75e27997..937fb3b6 100644 --- a/docs/DealsApi.md +++ b/docs/DealsApi.md @@ -432,7 +432,7 @@ Name | Type | Description | Notes Delete an attached product from a deal -Deletes a product attachment from a deal, using the `product_attachment_id`. +Deletes a product attachment from a deal, using the `product_attachment_id` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled ### Example diff --git a/docs/FieldsResponse.md b/docs/FieldsResponse.md index 69595d1a..39727d48 100644 --- a/docs/FieldsResponse.md +++ b/docs/FieldsResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **success** | **Boolean** | If the response is successful or not | [optional] -**data** | [**[Field]**](Field.md) | | [optional] +**data** | [**[GetField]**](GetField.md) | | [optional] **additional_data** | [**AdditionalData**](AdditionalData.md) | | [optional] diff --git a/docs/FieldsResponseAllOf.md b/docs/FieldsResponseAllOf.md index 9b2619a6..7a9f7c33 100644 --- a/docs/FieldsResponseAllOf.md +++ b/docs/FieldsResponseAllOf.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**[Field]**](Field.md) | | [optional] +**data** | [**[GetField]**](GetField.md) | | [optional] **additional_data** | [**AdditionalData**](AdditionalData.md) | | [optional] diff --git a/docs/GetAllProductFieldsResponse.md b/docs/GetAllProductFieldsResponse.md index c8eb1bd8..083c0026 100644 --- a/docs/GetAllProductFieldsResponse.md +++ b/docs/GetAllProductFieldsResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **success** | **Boolean** | If the response is successful or not | [optional] -**data** | [**[ProductField]**](ProductField.md) | Array containing data for all product fields | [optional] +**data** | [**[GetProductField]**](GetProductField.md) | Array containing data for all product fields | [optional] **additional_data** | **Object** | Additional data for the product field, such as pagination | [optional] diff --git a/docs/GetField.md b/docs/GetField.md new file mode 100644 index 00000000..a6e53f61 --- /dev/null +++ b/docs/GetField.md @@ -0,0 +1,32 @@ +# Pipedrive.GetField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Number** | The ID of the field. Value is `null` in case of subfields. | [optional] +**key** | **String** | The key of the field. For custom fields this is generated upon creation. | [optional] +**name** | **String** | The name of the field | [optional] +**order_nr** | **Number** | The order number of the field | [optional] +**field_type** | [**InternalFieldType**](InternalFieldType.md) | | [optional] +**add_time** | **Date** | The creation time of the field | [optional] +**update_time** | **Date** | The update time of the field | [optional] +**last_updated_by_user_id** | **Number** | The ID of the user who created or most recently updated the field, only applicable for custom fields | [optional] +**created_by_user_id** | **Number** | The ID of the user who created the field | [optional] +**active_flag** | **Boolean** | The active flag of the field | [optional] +**edit_flag** | **Boolean** | The edit flag of the field | [optional] +**index_visible_flag** | **Boolean** | Not used | [optional] +**details_visible_flag** | **Boolean** | Not used | [optional] +**add_visible_flag** | **Boolean** | Not used | [optional] +**important_flag** | **Boolean** | Not used | [optional] +**bulk_edit_allowed** | **Boolean** | Whether or not the field of an item can be edited in bulk | [optional] +**searchable_flag** | **Boolean** | Whether or not items can be searched by this field | [optional] +**filtering_allowed** | **Boolean** | Whether or not items can be filtered by this field | [optional] +**sortable_flag** | **Boolean** | Whether or not items can be sorted by this field | [optional] +**mandatory_flag** | **Boolean** | Whether or not the field is mandatory | [optional] +**options** | **[Object]** | The options of the field. When there are no options, `null` is returned. | [optional] +**options_deleted** | **[Object]** | The deleted options of the field. Only present when there is at least 1 deleted option. | [optional] +**is_subfield** | **Boolean** | Whether or not the field is a subfield of another field. Only present if field is subfield. | [optional] +**subfields** | **[Object]** | The subfields of the field. Only present when the field has subfields. | [optional] + + diff --git a/docs/GetFieldAllOf.md b/docs/GetFieldAllOf.md new file mode 100644 index 00000000..79d9d1ad --- /dev/null +++ b/docs/GetFieldAllOf.md @@ -0,0 +1,9 @@ +# Pipedrive.GetFieldAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field_type** | [**InternalFieldType**](InternalFieldType.md) | | [optional] + + diff --git a/docs/GetNoteField.md b/docs/GetNoteField.md new file mode 100644 index 00000000..cf849a8d --- /dev/null +++ b/docs/GetNoteField.md @@ -0,0 +1,17 @@ +# Pipedrive.GetNoteField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Number** | The ID of the field | [optional] +**key** | **String** | The key of the field | [optional] +**name** | **String** | The name of the field | [optional] +**field_type** | [**InternalFieldType**](InternalFieldType.md) | | [optional] +**active_flag** | **Boolean** | The active flag of the field | [optional] +**edit_flag** | **Boolean** | The edit flag of the field | [optional] +**bulk_edit_allowed** | **Boolean** | Not used | [optional] +**mandatory_flag** | **Boolean** | Whether or not the field is mandatory | [optional] +**options** | [**[NoteFieldOptions]**](NoteFieldOptions.md) | The options of the field. When there are no options, `null` is returned. | [optional] + + diff --git a/docs/GetProductField.md b/docs/GetProductField.md new file mode 100644 index 00000000..d0fb7aab --- /dev/null +++ b/docs/GetProductField.md @@ -0,0 +1,27 @@ +# Pipedrive.GetProductField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The name of the field | +**options** | **[Object]** | When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:</br>`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]` | [optional] +**field_type** | [**InternalFieldType**](InternalFieldType.md) | | +**id** | **Number** | The ID of the product field | [optional] +**key** | **String** | The key of the product field | [optional] +**order_nr** | **Number** | The position (index) of the product field in the detail view | [optional] +**add_time** | **String** | The product field creation time. Format: YYYY-MM-DD HH:MM:SS | [optional] +**update_time** | **String** | The product field last update time. Format: YYYY-MM-DD HH:MM:SS | [optional] +**last_updated_by_user_id** | **Number** | The ID of the last user to update the product field | [optional] +**created_by_user_id** | **Number** | The ID of the user who created the product field | [optional] +**active_flag** | **Boolean** | Whether or not the product field is currently active | [optional] +**edit_flag** | **Boolean** | Whether or not the product field name and metadata is editable | [optional] +**add_visible_flag** | **Boolean** | Whether or not the product field is visible in the Add Product Modal | [optional] +**important_flag** | **Boolean** | Whether or not the product field is marked as important | [optional] +**bulk_edit_allowed** | **Boolean** | Whether or not the product field data can be edited | [optional] +**searchable_flag** | **Boolean** | Whether or not the product field is searchable | [optional] +**filtering_allowed** | **Boolean** | Whether or not the product field value can be used when filtering searches | [optional] +**sortable_flag** | **Boolean** | Whether or not the product field is sortable | [optional] +**mandatory_flag** | **Boolean** | Whether or not the product field is mandatory when creating products | [optional] + + diff --git a/docs/InternalFieldType.md b/docs/InternalFieldType.md new file mode 100644 index 00000000..09f7398a --- /dev/null +++ b/docs/InternalFieldType.md @@ -0,0 +1,74 @@ +# Pipedrive.InternalFieldType + +## Enum + + +* `boolean` (value: `"boolean"`) + +* `double` (value: `"double"`) + +* `int` (value: `"int"`) + +* `json` (value: `"json"`) + +* `date` (value: `"date"`) + +* `daterange` (value: `"daterange"`) + +* `time` (value: `"time"`) + +* `timerange` (value: `"timerange"`) + +* `text` (value: `"text"`) + +* `varchar` (value: `"varchar"`) + +* `varchar_auto` (value: `"varchar_auto"`) + +* `varchar_options` (value: `"varchar_options"`) + +* `address` (value: `"address"`) + +* `enum` (value: `"enum"`) + +* `monetary` (value: `"monetary"`) + +* `phone` (value: `"phone"`) + +* `set` (value: `"set"`) + +* `activity` (value: `"activity"`) + +* `deal` (value: `"deal"`) + +* `lead` (value: `"lead"`) + +* `org` (value: `"org"`) + +* `people` (value: `"people"`) + +* `pipeline` (value: `"pipeline"`) + +* `product` (value: `"product"`) + +* `project` (value: `"project"`) + +* `stage` (value: `"stage"`) + +* `user` (value: `"user"`) + +* `billing_frequency` (value: `"billing_frequency"`) + +* `picture` (value: `"picture"`) + +* `price_list` (value: `"price_list"`) + +* `projects_board` (value: `"projects_board"`) + +* `projects_phase` (value: `"projects_phase"`) + +* `status` (value: `"status"`) + +* `visible_to` (value: `"visible_to"`) + + diff --git a/docs/NewDealProduct.md b/docs/NewDealProduct.md index 5633f67b..3150a816 100644 --- a/docs/NewDealProduct.md +++ b/docs/NewDealProduct.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **comments** | **String** | A textual comment associated with this product-deal attachment | [optional] **tax** | **Number** | The tax percentage | [optional] [default to 0] **tax_method** | **String** | The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount | [optional] -**enabled_flag** | **Boolean** | Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default | [optional] [default to true] +**enabled_flag** | **Boolean** | Whether the product is enabled for a deal or not This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring | [optional] [default to true] **billing_frequency** | [**BillingFrequency**](BillingFrequency.md) | | [optional] **billing_frequency_cycles** | **Number** | Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 312 | [optional] **billing_start_date** | **String** | Only available in Advanced and above plans The billing start date. Must be between 15 years in the past and 15 years in the future | [optional] diff --git a/docs/NoteFieldsResponse.md b/docs/NoteFieldsResponse.md index f026af53..5f733500 100644 --- a/docs/NoteFieldsResponse.md +++ b/docs/NoteFieldsResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **success** | **Boolean** | If the response is successful or not | [optional] -**data** | [**[NoteField]**](NoteField.md) | | [optional] +**data** | [**[GetNoteField]**](GetNoteField.md) | | [optional] **additional_data** | [**AdditionalData**](AdditionalData.md) | | [optional] diff --git a/docs/NoteFieldsResponseAllOf.md b/docs/NoteFieldsResponseAllOf.md index 10662735..22ad4435 100644 --- a/docs/NoteFieldsResponseAllOf.md +++ b/docs/NoteFieldsResponseAllOf.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**[NoteField]**](NoteField.md) | | [optional] +**data** | [**[GetNoteField]**](GetNoteField.md) | | [optional] **additional_data** | [**AdditionalData**](AdditionalData.md) | | [optional] diff --git a/docs/ProjectsApi.md b/docs/ProjectsApi.md index 788b5a18..7a835b12 100644 --- a/docs/ProjectsApi.md +++ b/docs/ProjectsApi.md @@ -617,7 +617,7 @@ Name | Type | Description | Notes ## putProjectPlanActivity -> UpdateActivityPlanItem putProjectPlanActivity(id, activityId, opts) +> UpdateActivityPlanItemResponse putProjectPlanActivity(id, activityId, opts) Update activity in project plan @@ -662,7 +662,7 @@ Name | Type | Description | Notes ### Return type -[**UpdateActivityPlanItem**](UpdateActivityPlanItem.md) +[**UpdateActivityPlanItemResponse**](UpdateActivityPlanItemResponse.md) ### Authorization @@ -676,7 +676,7 @@ Name | Type | Description | Notes ## putProjectPlanTask -> UpdateTaskPlanItem putProjectPlanTask(id, taskId, opts) +> UpdateTaskPlanItemResponse putProjectPlanTask(id, taskId, opts) Update task in project plan @@ -721,7 +721,7 @@ Name | Type | Description | Notes ### Return type -[**UpdateTaskPlanItem**](UpdateTaskPlanItem.md) +[**UpdateTaskPlanItemResponse**](UpdateTaskPlanItemResponse.md) ### Authorization diff --git a/docs/UpdateActivityPlanItemResponse.md b/docs/UpdateActivityPlanItemResponse.md new file mode 100644 index 00000000..00c1cf13 --- /dev/null +++ b/docs/UpdateActivityPlanItemResponse.md @@ -0,0 +1,11 @@ +# Pipedrive.UpdateActivityPlanItemResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **Boolean** | | [optional] +**data** | [**ProjectPlanItemObject**](ProjectPlanItemObject.md) | | [optional] +**additional_data** | **Object** | | [optional] + + diff --git a/docs/UpdateDealProduct.md b/docs/UpdateDealProduct.md index 88930495..1d62e82d 100644 --- a/docs/UpdateDealProduct.md +++ b/docs/UpdateDealProduct.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **comments** | **String** | A textual comment associated with this product-deal attachment | [optional] **tax** | **Number** | The tax percentage | [optional] [default to 0] **tax_method** | **String** | The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount | [optional] -**enabled_flag** | **Boolean** | Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default | [optional] [default to true] +**enabled_flag** | **Boolean** | Whether the product is enabled for a deal or not This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring | [optional] [default to true] **billing_frequency** | [**BillingFrequency**](BillingFrequency.md) | | [optional] **billing_frequency_cycles** | **Number** | Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 312 | [optional] **billing_start_date** | **String** | Only available in Advanced and above plans The billing start date. Must be between 15 years in the past and 15 years in the future | [optional] diff --git a/docs/UpdateTaskPlanItemResponse.md b/docs/UpdateTaskPlanItemResponse.md new file mode 100644 index 00000000..1354b8fc --- /dev/null +++ b/docs/UpdateTaskPlanItemResponse.md @@ -0,0 +1,11 @@ +# Pipedrive.UpdateTaskPlanItemResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **Boolean** | | [optional] +**data** | [**ProjectPlanItemObject**](ProjectPlanItemObject.md) | | [optional] +**additional_data** | **Object** | | [optional] + + diff --git a/package-lock.json b/package-lock.json index 7d3fc13b..f31ddc9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pipedrive", - "version": "23.2.5", + "version": "23.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pipedrive", - "version": "23.2.5", + "version": "23.3.0", "license": "MIT", "dependencies": { "@babel/runtime": "^7.20.1", diff --git a/package.json b/package.json index c296fa8f..759d8bfa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pipedrive", - "version": "23.2.5", + "version": "23.3.0", "description": "Pipedrive REST client for NodeJS", "license": "MIT", "main": "dist/index.js", diff --git a/src/api/DealsApi.js b/src/api/DealsApi.js index 28ea1364..90bc7236 100644 --- a/src/api/DealsApi.js +++ b/src/api/DealsApi.js @@ -570,7 +570,7 @@ export default class DealsApi { /** * Delete an attached product from a deal - * Deletes a product attachment from a deal, using the `product_attachment_id`. + * Deletes a product attachment from a deal, using the `product_attachment_id` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled * @param {Number} id The ID of the deal * @param {Number} productAttachmentId The product attachment ID * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteDealProduct} and HTTP response @@ -629,7 +629,7 @@ export default class DealsApi { /** * Delete an attached product from a deal - * Deletes a product attachment from a deal, using the `product_attachment_id`. + * Deletes a product attachment from a deal, using the `product_attachment_id` Not possible to delete the attached product if the deal has installments associated and the product is the last one enabled * @param {Number} id The ID of the deal * @param {Number} productAttachmentId The product attachment ID * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteDealProduct} diff --git a/src/api/ProjectsApi.js b/src/api/ProjectsApi.js index 6bb0e002..eb91194b 100644 --- a/src/api/ProjectsApi.js +++ b/src/api/ProjectsApi.js @@ -26,9 +26,9 @@ import GetTasksResponse from '../model/GetTasksResponse'; import ProjectPostObject from '../model/ProjectPostObject'; import ProjectPutObject from '../model/ProjectPutObject'; import ProjectPutPlanItemBodyObject from '../model/ProjectPutPlanItemBodyObject'; -import UpdateActivityPlanItem from '../model/UpdateActivityPlanItem'; +import UpdateActivityPlanItemResponse from '../model/UpdateActivityPlanItemResponse'; import UpdateProjectResponse from '../model/UpdateProjectResponse'; -import UpdateTaskPlanItem from '../model/UpdateTaskPlanItem'; +import UpdateTaskPlanItemResponse from '../model/UpdateTaskPlanItemResponse'; /** * Projects service. @@ -790,7 +790,7 @@ export default class ProjectsApi { * @param {Number} activityId The ID of the activity * @param {Object} opts Optional parameters * @param {module:model/ProjectPutPlanItemBodyObject} opts.projectPutPlanItemBodyObject - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdateActivityPlanItem} and HTTP response + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdateActivityPlanItemResponse} and HTTP response */ putProjectPlanActivityWithHttpInfo(id, activityId, opts) { opts = opts || {}; @@ -837,7 +837,7 @@ export default class ProjectsApi { let authNames = ['api_key', 'oauth2', ]; let accepts = ['application/json', ]; - let returnType = UpdateActivityPlanItem; + let returnType = UpdateActivityPlanItemResponse; return this.apiClient.callApi( '/projects/{id}/plan/activities/{activityId}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, @@ -852,7 +852,7 @@ export default class ProjectsApi { * @param {Number} activityId The ID of the activity * @param {Object} opts Optional parameters * @param {module:model/ProjectPutPlanItemBodyObject} opts.projectPutPlanItemBodyObject - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdateActivityPlanItem} + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdateActivityPlanItemResponse} */ putProjectPlanActivity(id, activityId, opts) { return this.putProjectPlanActivityWithHttpInfo(id, activityId, opts) @@ -869,7 +869,7 @@ export default class ProjectsApi { * @param {Number} taskId The ID of the task * @param {Object} opts Optional parameters * @param {module:model/ProjectPutPlanItemBodyObject} opts.projectPutPlanItemBodyObject - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdateTaskPlanItem} and HTTP response + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdateTaskPlanItemResponse} and HTTP response */ putProjectPlanTaskWithHttpInfo(id, taskId, opts) { opts = opts || {}; @@ -916,7 +916,7 @@ export default class ProjectsApi { let authNames = ['api_key', 'oauth2', ]; let accepts = ['application/json', ]; - let returnType = UpdateTaskPlanItem; + let returnType = UpdateTaskPlanItemResponse; return this.apiClient.callApi( '/projects/{id}/plan/tasks/{taskId}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, @@ -931,7 +931,7 @@ export default class ProjectsApi { * @param {Number} taskId The ID of the task * @param {Object} opts Optional parameters * @param {module:model/ProjectPutPlanItemBodyObject} opts.projectPutPlanItemBodyObject - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdateTaskPlanItem} + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdateTaskPlanItemResponse} */ putProjectPlanTask(id, taskId, opts) { return this.putProjectPlanTaskWithHttpInfo(id, taskId, opts) diff --git a/src/index.js b/src/index.js index a1b5cda3..55748bef 100644 --- a/src/index.js +++ b/src/index.js @@ -357,6 +357,8 @@ import GetDealsTimeline from './model/GetDealsTimeline'; import GetDealsTimelineData from './model/GetDealsTimelineData'; import GetDealsTimelineDataTotals from './model/GetDealsTimelineDataTotals'; import GetDuplicatedDeal from './model/GetDuplicatedDeal'; +import GetField from './model/GetField'; +import GetFieldAllOf from './model/GetFieldAllOf'; import GetGoalResultResponse from './model/GetGoalResultResponse'; import GetGoalsResponse from './model/GetGoalsResponse'; import GetLeadIdResponse from './model/GetLeadIdResponse'; @@ -367,6 +369,7 @@ import GetLeadsResponse from './model/GetLeadsResponse'; import GetLeadsSourceResponse from './model/GetLeadsSourceResponse'; import GetLeadsSourceResponseData from './model/GetLeadsSourceResponseData'; import GetMergedDeal from './model/GetMergedDeal'; +import GetNoteField from './model/GetNoteField'; import GetNotes from './model/GetNotes'; import GetOneFile from './model/GetOneFile'; import GetOnePipeline from './model/GetOnePipeline'; @@ -376,6 +379,7 @@ import GetPersonDetailsResponse from './model/GetPersonDetailsResponse'; import GetPersonDetailsResponseAllOf from './model/GetPersonDetailsResponseAllOf'; import GetPersonDetailsResponseAllOfAdditionalData from './model/GetPersonDetailsResponseAllOfAdditionalData'; import GetProductAttachmentDetails from './model/GetProductAttachmentDetails'; +import GetProductField from './model/GetProductField'; import GetProductFieldResponse from './model/GetProductFieldResponse'; import GetProjectBoardResponse from './model/GetProjectBoardResponse'; import GetProjectBoardsResponse from './model/GetProjectBoardsResponse'; @@ -422,6 +426,7 @@ import InlineResponse4031AdditionalData from './model/InlineResponse4031Addition import InlineResponse403AdditionalData from './model/InlineResponse403AdditionalData'; import InlineResponse404 from './model/InlineResponse404'; import InlineResponse404AdditionalData from './model/InlineResponse404AdditionalData'; +import InternalFieldType from './model/InternalFieldType'; import ItemSearchAdditionalData from './model/ItemSearchAdditionalData'; import ItemSearchAdditionalDataPagination from './model/ItemSearchAdditionalDataPagination'; import ItemSearchFieldResponse from './model/ItemSearchFieldResponse'; @@ -752,7 +757,7 @@ import TeamsAllOf from './model/TeamsAllOf'; import TemplateObject from './model/TemplateObject'; import TemplateResponseObject from './model/TemplateResponseObject'; import Unauthorized from './model/Unauthorized'; -import UpdateActivityPlanItem from './model/UpdateActivityPlanItem'; +import UpdateActivityPlanItemResponse from './model/UpdateActivityPlanItemResponse'; import UpdateActivityResponse from './model/UpdateActivityResponse'; import UpdateDealParameters from './model/UpdateDealParameters'; import UpdateDealProduct from './model/UpdateDealProduct'; @@ -772,7 +777,7 @@ import UpdateProductResponse from './model/UpdateProductResponse'; import UpdateProjectResponse from './model/UpdateProjectResponse'; import UpdateStageRequest from './model/UpdateStageRequest'; import UpdateStageRequestAllOf from './model/UpdateStageRequestAllOf'; -import UpdateTaskPlanItem from './model/UpdateTaskPlanItem'; +import UpdateTaskPlanItemResponse from './model/UpdateTaskPlanItemResponse'; import UpdateTaskResponse from './model/UpdateTaskResponse'; import UpdateTeam from './model/UpdateTeam'; import UpdateTeamAllOf from './model/UpdateTeamAllOf'; @@ -2961,6 +2966,18 @@ export { */ GetDuplicatedDeal, + /** + * The GetField model constructor. + * @property {module:model/GetField} + */ + GetField, + + /** + * The GetFieldAllOf model constructor. + * @property {module:model/GetFieldAllOf} + */ + GetFieldAllOf, + /** * The GetGoalResultResponse model constructor. * @property {module:model/GetGoalResultResponse} @@ -3021,6 +3038,12 @@ export { */ GetMergedDeal, + /** + * The GetNoteField model constructor. + * @property {module:model/GetNoteField} + */ + GetNoteField, + /** * The GetNotes model constructor. * @property {module:model/GetNotes} @@ -3075,6 +3098,12 @@ export { */ GetProductAttachmentDetails, + /** + * The GetProductField model constructor. + * @property {module:model/GetProductField} + */ + GetProductField, + /** * The GetProductFieldResponse model constructor. * @property {module:model/GetProductFieldResponse} @@ -3351,6 +3380,12 @@ export { */ InlineResponse404AdditionalData, + /** + * The InternalFieldType model constructor. + * @property {module:model/InternalFieldType} + */ + InternalFieldType, + /** * The ItemSearchAdditionalData model constructor. * @property {module:model/ItemSearchAdditionalData} @@ -5332,10 +5367,10 @@ export { Unauthorized, /** - * The UpdateActivityPlanItem model constructor. - * @property {module:model/UpdateActivityPlanItem} + * The UpdateActivityPlanItemResponse model constructor. + * @property {module:model/UpdateActivityPlanItemResponse} */ - UpdateActivityPlanItem, + UpdateActivityPlanItemResponse, /** * The UpdateActivityResponse model constructor. @@ -5452,10 +5487,10 @@ export { UpdateStageRequestAllOf, /** - * The UpdateTaskPlanItem model constructor. - * @property {module:model/UpdateTaskPlanItem} + * The UpdateTaskPlanItemResponse model constructor. + * @property {module:model/UpdateTaskPlanItemResponse} */ - UpdateTaskPlanItem, + UpdateTaskPlanItemResponse, /** * The UpdateTaskResponse model constructor. diff --git a/src/model/DealProductRequestBody.js b/src/model/DealProductRequestBody.js index 289da8ba..df1187e4 100644 --- a/src/model/DealProductRequestBody.js +++ b/src/model/DealProductRequestBody.js @@ -167,7 +167,7 @@ DealProductRequestBody.prototype['tax'] = 0; DealProductRequestBody.prototype['tax_method'] = undefined; /** - * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default + * Whether the product is enabled for a deal or not This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring * @member {Boolean} enabled_flag * @default true */ diff --git a/src/model/FieldsResponse.js b/src/model/FieldsResponse.js index c9484367..c75f6083 100644 --- a/src/model/FieldsResponse.js +++ b/src/model/FieldsResponse.js @@ -14,8 +14,8 @@ import ApiClient from '../ApiClient'; import AdditionalData from './AdditionalData'; import BaseResponse from './BaseResponse'; -import Field from './Field'; import FieldsResponseAllOf from './FieldsResponseAllOf'; +import GetField from './GetField'; /** * The FieldsResponse model module. @@ -61,7 +61,7 @@ class FieldsResponse { delete data['success']; } if (data.hasOwnProperty('data')) { - obj['data'] = ApiClient.convertToType(data['data'], [Field]); + obj['data'] = ApiClient.convertToType(data['data'], [GetField]); delete data['data']; } @@ -89,7 +89,7 @@ class FieldsResponse { FieldsResponse.prototype['success'] = undefined; /** - * @member {Array.} data + * @member {Array.} data */ FieldsResponse.prototype['data'] = undefined; @@ -107,7 +107,7 @@ FieldsResponse.prototype['additional_data'] = undefined; BaseResponse.prototype['success'] = undefined; // Implement FieldsResponseAllOf interface: /** - * @member {Array.} data + * @member {Array.} data */ FieldsResponseAllOf.prototype['data'] = undefined; /** diff --git a/src/model/FieldsResponseAllOf.js b/src/model/FieldsResponseAllOf.js index 89f9280d..b0f07312 100644 --- a/src/model/FieldsResponseAllOf.js +++ b/src/model/FieldsResponseAllOf.js @@ -13,7 +13,7 @@ import ApiClient from '../ApiClient'; import AdditionalData from './AdditionalData'; -import Field from './Field'; +import GetField from './GetField'; /** * The FieldsResponseAllOf model module. @@ -50,7 +50,7 @@ class FieldsResponseAllOf { obj = obj || new FieldsResponseAllOf(); if (data.hasOwnProperty('data')) { - obj['data'] = ApiClient.convertToType(data['data'], [Field]); + obj['data'] = ApiClient.convertToType(data['data'], [GetField]); delete data['data']; } @@ -72,7 +72,7 @@ class FieldsResponseAllOf { } /** - * @member {Array.} data + * @member {Array.} data */ FieldsResponseAllOf.prototype['data'] = undefined; diff --git a/src/model/GetAllProductFieldsResponse.js b/src/model/GetAllProductFieldsResponse.js index 805e6f19..eefccf84 100644 --- a/src/model/GetAllProductFieldsResponse.js +++ b/src/model/GetAllProductFieldsResponse.js @@ -12,7 +12,7 @@ */ import ApiClient from '../ApiClient'; -import ProductField from './ProductField'; +import GetProductField from './GetProductField'; /** * The GetAllProductFieldsResponse model module. @@ -54,7 +54,7 @@ class GetAllProductFieldsResponse { delete data['success']; } if (data.hasOwnProperty('data')) { - obj['data'] = ApiClient.convertToType(data['data'], [ProductField]); + obj['data'] = ApiClient.convertToType(data['data'], [GetProductField]); delete data['data']; } @@ -83,7 +83,7 @@ GetAllProductFieldsResponse.prototype['success'] = undefined; /** * Array containing data for all product fields - * @member {Array.} data + * @member {Array.} data */ GetAllProductFieldsResponse.prototype['data'] = undefined; diff --git a/src/model/GetField.js b/src/model/GetField.js new file mode 100644 index 00000000..c543f465 --- /dev/null +++ b/src/model/GetField.js @@ -0,0 +1,463 @@ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import Field from './Field'; +import GetFieldAllOf from './GetFieldAllOf'; +import InternalFieldType from './InternalFieldType'; + +/** + * The GetField model module. + * @module model/GetField + * @version 1.0.0 + */ +class GetField { + /** + * Constructs a new GetField. + * @alias module:model/GetField + * @implements module:model/Field + * @implements module:model/GetFieldAllOf + */ + constructor() { + Field.initialize(this);GetFieldAllOf.initialize(this); + GetField.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a GetField from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/GetField} obj Optional instance to populate. + * @return {module:model/GetField} The populated GetField instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new GetField(); + Field.constructFromObject(data, obj); + GetFieldAllOf.constructFromObject(data, obj); + + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); + + delete data['id']; + } + if (data.hasOwnProperty('key')) { + obj['key'] = ApiClient.convertToType(data['key'], 'String'); + + delete data['key']; + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + + delete data['name']; + } + if (data.hasOwnProperty('order_nr')) { + obj['order_nr'] = ApiClient.convertToType(data['order_nr'], 'Number'); + + delete data['order_nr']; + } + if (data.hasOwnProperty('field_type')) { + obj['field_type'] = InternalFieldType.constructFromObject(data['field_type']); + + delete data['field_type']; + } + if (data.hasOwnProperty('add_time')) { + obj['add_time'] = ApiClient.convertToType(data['add_time'], 'Date'); + + delete data['add_time']; + } + if (data.hasOwnProperty('update_time')) { + obj['update_time'] = ApiClient.convertToType(data['update_time'], 'Date'); + + delete data['update_time']; + } + if (data.hasOwnProperty('last_updated_by_user_id')) { + obj['last_updated_by_user_id'] = ApiClient.convertToType(data['last_updated_by_user_id'], 'Number'); + + delete data['last_updated_by_user_id']; + } + if (data.hasOwnProperty('created_by_user_id')) { + obj['created_by_user_id'] = ApiClient.convertToType(data['created_by_user_id'], 'Number'); + + delete data['created_by_user_id']; + } + if (data.hasOwnProperty('active_flag')) { + obj['active_flag'] = ApiClient.convertToType(data['active_flag'], 'Boolean'); + + delete data['active_flag']; + } + if (data.hasOwnProperty('edit_flag')) { + obj['edit_flag'] = ApiClient.convertToType(data['edit_flag'], 'Boolean'); + + delete data['edit_flag']; + } + if (data.hasOwnProperty('index_visible_flag')) { + obj['index_visible_flag'] = ApiClient.convertToType(data['index_visible_flag'], 'Boolean'); + + delete data['index_visible_flag']; + } + if (data.hasOwnProperty('details_visible_flag')) { + obj['details_visible_flag'] = ApiClient.convertToType(data['details_visible_flag'], 'Boolean'); + + delete data['details_visible_flag']; + } + if (data.hasOwnProperty('add_visible_flag')) { + obj['add_visible_flag'] = ApiClient.convertToType(data['add_visible_flag'], 'Boolean'); + + delete data['add_visible_flag']; + } + if (data.hasOwnProperty('important_flag')) { + obj['important_flag'] = ApiClient.convertToType(data['important_flag'], 'Boolean'); + + delete data['important_flag']; + } + if (data.hasOwnProperty('bulk_edit_allowed')) { + obj['bulk_edit_allowed'] = ApiClient.convertToType(data['bulk_edit_allowed'], 'Boolean'); + + delete data['bulk_edit_allowed']; + } + if (data.hasOwnProperty('searchable_flag')) { + obj['searchable_flag'] = ApiClient.convertToType(data['searchable_flag'], 'Boolean'); + + delete data['searchable_flag']; + } + if (data.hasOwnProperty('filtering_allowed')) { + obj['filtering_allowed'] = ApiClient.convertToType(data['filtering_allowed'], 'Boolean'); + + delete data['filtering_allowed']; + } + if (data.hasOwnProperty('sortable_flag')) { + obj['sortable_flag'] = ApiClient.convertToType(data['sortable_flag'], 'Boolean'); + + delete data['sortable_flag']; + } + if (data.hasOwnProperty('mandatory_flag')) { + obj['mandatory_flag'] = ApiClient.convertToType(data['mandatory_flag'], 'Boolean'); + + delete data['mandatory_flag']; + } + if (data.hasOwnProperty('options')) { + obj['options'] = ApiClient.convertToType(data['options'], [Object]); + + delete data['options']; + } + if (data.hasOwnProperty('options_deleted')) { + obj['options_deleted'] = ApiClient.convertToType(data['options_deleted'], [Object]); + + delete data['options_deleted']; + } + if (data.hasOwnProperty('is_subfield')) { + obj['is_subfield'] = ApiClient.convertToType(data['is_subfield'], 'Boolean'); + + delete data['is_subfield']; + } + if (data.hasOwnProperty('subfields')) { + obj['subfields'] = ApiClient.convertToType(data['subfields'], [Object]); + + delete data['subfields']; + } + + if (Object.keys(data).length > 0) { + Object.assign(obj, data); + } + + } + return obj; + } + + +} + +/** + * The ID of the field. Value is `null` in case of subfields. + * @member {Number} id + */ +GetField.prototype['id'] = undefined; + +/** + * The key of the field. For custom fields this is generated upon creation. + * @member {String} key + */ +GetField.prototype['key'] = undefined; + +/** + * The name of the field + * @member {String} name + */ +GetField.prototype['name'] = undefined; + +/** + * The order number of the field + * @member {Number} order_nr + */ +GetField.prototype['order_nr'] = undefined; + +/** + * @member {module:model/InternalFieldType} field_type + */ +GetField.prototype['field_type'] = undefined; + +/** + * The creation time of the field + * @member {Date} add_time + */ +GetField.prototype['add_time'] = undefined; + +/** + * The update time of the field + * @member {Date} update_time + */ +GetField.prototype['update_time'] = undefined; + +/** + * The ID of the user who created or most recently updated the field, only applicable for custom fields + * @member {Number} last_updated_by_user_id + */ +GetField.prototype['last_updated_by_user_id'] = undefined; + +/** + * The ID of the user who created the field + * @member {Number} created_by_user_id + */ +GetField.prototype['created_by_user_id'] = undefined; + +/** + * The active flag of the field + * @member {Boolean} active_flag + */ +GetField.prototype['active_flag'] = undefined; + +/** + * The edit flag of the field + * @member {Boolean} edit_flag + */ +GetField.prototype['edit_flag'] = undefined; + +/** + * Not used + * @member {Boolean} index_visible_flag + */ +GetField.prototype['index_visible_flag'] = undefined; + +/** + * Not used + * @member {Boolean} details_visible_flag + */ +GetField.prototype['details_visible_flag'] = undefined; + +/** + * Not used + * @member {Boolean} add_visible_flag + */ +GetField.prototype['add_visible_flag'] = undefined; + +/** + * Not used + * @member {Boolean} important_flag + */ +GetField.prototype['important_flag'] = undefined; + +/** + * Whether or not the field of an item can be edited in bulk + * @member {Boolean} bulk_edit_allowed + */ +GetField.prototype['bulk_edit_allowed'] = undefined; + +/** + * Whether or not items can be searched by this field + * @member {Boolean} searchable_flag + */ +GetField.prototype['searchable_flag'] = undefined; + +/** + * Whether or not items can be filtered by this field + * @member {Boolean} filtering_allowed + */ +GetField.prototype['filtering_allowed'] = undefined; + +/** + * Whether or not items can be sorted by this field + * @member {Boolean} sortable_flag + */ +GetField.prototype['sortable_flag'] = undefined; + +/** + * Whether or not the field is mandatory + * @member {Boolean} mandatory_flag + */ +GetField.prototype['mandatory_flag'] = undefined; + +/** + * The options of the field. When there are no options, `null` is returned. + * @member {Array.} options + */ +GetField.prototype['options'] = undefined; + +/** + * The deleted options of the field. Only present when there is at least 1 deleted option. + * @member {Array.} options_deleted + */ +GetField.prototype['options_deleted'] = undefined; + +/** + * Whether or not the field is a subfield of another field. Only present if field is subfield. + * @member {Boolean} is_subfield + */ +GetField.prototype['is_subfield'] = undefined; + +/** + * The subfields of the field. Only present when the field has subfields. + * @member {Array.} subfields + */ +GetField.prototype['subfields'] = undefined; + + +// Implement Field interface: +/** + * The ID of the field. Value is `null` in case of subfields. + * @member {Number} id + */ +Field.prototype['id'] = undefined; +/** + * The key of the field. For custom fields this is generated upon creation. + * @member {String} key + */ +Field.prototype['key'] = undefined; +/** + * The name of the field + * @member {String} name + */ +Field.prototype['name'] = undefined; +/** + * The order number of the field + * @member {Number} order_nr + */ +Field.prototype['order_nr'] = undefined; +/** + * @member {module:model/FieldTypeAsString} field_type + */ +Field.prototype['field_type'] = undefined; +/** + * The creation time of the field + * @member {Date} add_time + */ +Field.prototype['add_time'] = undefined; +/** + * The update time of the field + * @member {Date} update_time + */ +Field.prototype['update_time'] = undefined; +/** + * The ID of the user who created or most recently updated the field, only applicable for custom fields + * @member {Number} last_updated_by_user_id + */ +Field.prototype['last_updated_by_user_id'] = undefined; +/** + * The ID of the user who created the field + * @member {Number} created_by_user_id + */ +Field.prototype['created_by_user_id'] = undefined; +/** + * The active flag of the field + * @member {Boolean} active_flag + */ +Field.prototype['active_flag'] = undefined; +/** + * The edit flag of the field + * @member {Boolean} edit_flag + */ +Field.prototype['edit_flag'] = undefined; +/** + * Not used + * @member {Boolean} index_visible_flag + */ +Field.prototype['index_visible_flag'] = undefined; +/** + * Not used + * @member {Boolean} details_visible_flag + */ +Field.prototype['details_visible_flag'] = undefined; +/** + * Not used + * @member {Boolean} add_visible_flag + */ +Field.prototype['add_visible_flag'] = undefined; +/** + * Not used + * @member {Boolean} important_flag + */ +Field.prototype['important_flag'] = undefined; +/** + * Whether or not the field of an item can be edited in bulk + * @member {Boolean} bulk_edit_allowed + */ +Field.prototype['bulk_edit_allowed'] = undefined; +/** + * Whether or not items can be searched by this field + * @member {Boolean} searchable_flag + */ +Field.prototype['searchable_flag'] = undefined; +/** + * Whether or not items can be filtered by this field + * @member {Boolean} filtering_allowed + */ +Field.prototype['filtering_allowed'] = undefined; +/** + * Whether or not items can be sorted by this field + * @member {Boolean} sortable_flag + */ +Field.prototype['sortable_flag'] = undefined; +/** + * Whether or not the field is mandatory + * @member {Boolean} mandatory_flag + */ +Field.prototype['mandatory_flag'] = undefined; +/** + * The options of the field. When there are no options, `null` is returned. + * @member {Array.} options + */ +Field.prototype['options'] = undefined; +/** + * The deleted options of the field. Only present when there is at least 1 deleted option. + * @member {Array.} options_deleted + */ +Field.prototype['options_deleted'] = undefined; +/** + * Whether or not the field is a subfield of another field. Only present if field is subfield. + * @member {Boolean} is_subfield + */ +Field.prototype['is_subfield'] = undefined; +/** + * The subfields of the field. Only present when the field has subfields. + * @member {Array.} subfields + */ +Field.prototype['subfields'] = undefined; +// Implement GetFieldAllOf interface: +/** + * @member {module:model/InternalFieldType} field_type + */ +GetFieldAllOf.prototype['field_type'] = undefined; + + + + +export default GetField; + diff --git a/src/model/GetFieldAllOf.js b/src/model/GetFieldAllOf.js new file mode 100644 index 00000000..4676bb99 --- /dev/null +++ b/src/model/GetFieldAllOf.js @@ -0,0 +1,79 @@ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import InternalFieldType from './InternalFieldType'; + +/** + * The GetFieldAllOf model module. + * @module model/GetFieldAllOf + * @version 1.0.0 + */ +class GetFieldAllOf { + /** + * Constructs a new GetFieldAllOf. + * @alias module:model/GetFieldAllOf + */ + constructor() { + + GetFieldAllOf.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a GetFieldAllOf from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/GetFieldAllOf} obj Optional instance to populate. + * @return {module:model/GetFieldAllOf} The populated GetFieldAllOf instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new GetFieldAllOf(); + + if (data.hasOwnProperty('field_type')) { + obj['field_type'] = InternalFieldType.constructFromObject(data['field_type']); + + delete data['field_type']; + } + + if (Object.keys(data).length > 0) { + Object.assign(obj, data); + } + + } + return obj; + } + + +} + +/** + * @member {module:model/InternalFieldType} field_type + */ +GetFieldAllOf.prototype['field_type'] = undefined; + + + + + + +export default GetFieldAllOf; + diff --git a/src/model/GetNoteField.js b/src/model/GetNoteField.js new file mode 100644 index 00000000..2b1b4a4f --- /dev/null +++ b/src/model/GetNoteField.js @@ -0,0 +1,224 @@ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import GetFieldAllOf from './GetFieldAllOf'; +import InternalFieldType from './InternalFieldType'; +import NoteField from './NoteField'; +import NoteFieldOptions from './NoteFieldOptions'; + +/** + * The GetNoteField model module. + * @module model/GetNoteField + * @version 1.0.0 + */ +class GetNoteField { + /** + * Constructs a new GetNoteField. + * @alias module:model/GetNoteField + * @implements module:model/NoteField + * @implements module:model/GetFieldAllOf + */ + constructor() { + NoteField.initialize(this);GetFieldAllOf.initialize(this); + GetNoteField.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a GetNoteField from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/GetNoteField} obj Optional instance to populate. + * @return {module:model/GetNoteField} The populated GetNoteField instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new GetNoteField(); + NoteField.constructFromObject(data, obj); + GetFieldAllOf.constructFromObject(data, obj); + + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); + + delete data['id']; + } + if (data.hasOwnProperty('key')) { + obj['key'] = ApiClient.convertToType(data['key'], 'String'); + + delete data['key']; + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + + delete data['name']; + } + if (data.hasOwnProperty('field_type')) { + obj['field_type'] = InternalFieldType.constructFromObject(data['field_type']); + + delete data['field_type']; + } + if (data.hasOwnProperty('active_flag')) { + obj['active_flag'] = ApiClient.convertToType(data['active_flag'], 'Boolean'); + + delete data['active_flag']; + } + if (data.hasOwnProperty('edit_flag')) { + obj['edit_flag'] = ApiClient.convertToType(data['edit_flag'], 'Boolean'); + + delete data['edit_flag']; + } + if (data.hasOwnProperty('bulk_edit_allowed')) { + obj['bulk_edit_allowed'] = ApiClient.convertToType(data['bulk_edit_allowed'], 'Boolean'); + + delete data['bulk_edit_allowed']; + } + if (data.hasOwnProperty('mandatory_flag')) { + obj['mandatory_flag'] = ApiClient.convertToType(data['mandatory_flag'], 'Boolean'); + + delete data['mandatory_flag']; + } + if (data.hasOwnProperty('options')) { + obj['options'] = ApiClient.convertToType(data['options'], [NoteFieldOptions]); + + delete data['options']; + } + + if (Object.keys(data).length > 0) { + Object.assign(obj, data); + } + + } + return obj; + } + + +} + +/** + * The ID of the field + * @member {Number} id + */ +GetNoteField.prototype['id'] = undefined; + +/** + * The key of the field + * @member {String} key + */ +GetNoteField.prototype['key'] = undefined; + +/** + * The name of the field + * @member {String} name + */ +GetNoteField.prototype['name'] = undefined; + +/** + * @member {module:model/InternalFieldType} field_type + */ +GetNoteField.prototype['field_type'] = undefined; + +/** + * The active flag of the field + * @member {Boolean} active_flag + */ +GetNoteField.prototype['active_flag'] = undefined; + +/** + * The edit flag of the field + * @member {Boolean} edit_flag + */ +GetNoteField.prototype['edit_flag'] = undefined; + +/** + * Not used + * @member {Boolean} bulk_edit_allowed + */ +GetNoteField.prototype['bulk_edit_allowed'] = undefined; + +/** + * Whether or not the field is mandatory + * @member {Boolean} mandatory_flag + */ +GetNoteField.prototype['mandatory_flag'] = undefined; + +/** + * The options of the field. When there are no options, `null` is returned. + * @member {Array.} options + */ +GetNoteField.prototype['options'] = undefined; + + +// Implement NoteField interface: +/** + * The ID of the field + * @member {Number} id + */ +NoteField.prototype['id'] = undefined; +/** + * The key of the field + * @member {String} key + */ +NoteField.prototype['key'] = undefined; +/** + * The name of the field + * @member {String} name + */ +NoteField.prototype['name'] = undefined; +/** + * @member {module:model/FieldTypeAsString} field_type + */ +NoteField.prototype['field_type'] = undefined; +/** + * The active flag of the field + * @member {Boolean} active_flag + */ +NoteField.prototype['active_flag'] = undefined; +/** + * The edit flag of the field + * @member {Boolean} edit_flag + */ +NoteField.prototype['edit_flag'] = undefined; +/** + * Not used + * @member {Boolean} bulk_edit_allowed + */ +NoteField.prototype['bulk_edit_allowed'] = undefined; +/** + * Whether or not the field is mandatory + * @member {Boolean} mandatory_flag + */ +NoteField.prototype['mandatory_flag'] = undefined; +/** + * The options of the field. When there are no options, `null` is returned. + * @member {Array.} options + */ +NoteField.prototype['options'] = undefined; +// Implement GetFieldAllOf interface: +/** + * @member {module:model/InternalFieldType} field_type + */ +GetFieldAllOf.prototype['field_type'] = undefined; + + + + +export default GetNoteField; + diff --git a/src/model/GetProductField.js b/src/model/GetProductField.js new file mode 100644 index 00000000..da872f67 --- /dev/null +++ b/src/model/GetProductField.js @@ -0,0 +1,388 @@ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import GetFieldAllOf from './GetFieldAllOf'; +import InternalFieldType from './InternalFieldType'; +import ProductField from './ProductField'; + +/** + * The GetProductField model module. + * @module model/GetProductField + * @version 1.0.0 + */ +class GetProductField { + /** + * Constructs a new GetProductField. + * @alias module:model/GetProductField + * @implements module:model/ProductField + * @implements module:model/GetFieldAllOf + * @param name {String} The name of the field + * @param fieldType {module:model/InternalFieldType} + */ + constructor(name, fieldType) { + ProductField.initialize(this, name, fieldType);GetFieldAllOf.initialize(this); + GetProductField.initialize(this, name, fieldType); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, name, fieldType) { + obj['name'] = name; + obj['field_type'] = fieldType; + } + + /** + * Constructs a GetProductField from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/GetProductField} obj Optional instance to populate. + * @return {module:model/GetProductField} The populated GetProductField instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new GetProductField(); + ProductField.constructFromObject(data, obj); + GetFieldAllOf.constructFromObject(data, obj); + + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + + delete data['name']; + } + if (data.hasOwnProperty('options')) { + obj['options'] = ApiClient.convertToType(data['options'], [Object]); + + delete data['options']; + } + if (data.hasOwnProperty('field_type')) { + obj['field_type'] = InternalFieldType.constructFromObject(data['field_type']); + + delete data['field_type']; + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); + + delete data['id']; + } + if (data.hasOwnProperty('key')) { + obj['key'] = ApiClient.convertToType(data['key'], 'String'); + + delete data['key']; + } + if (data.hasOwnProperty('order_nr')) { + obj['order_nr'] = ApiClient.convertToType(data['order_nr'], 'Number'); + + delete data['order_nr']; + } + if (data.hasOwnProperty('add_time')) { + obj['add_time'] = ApiClient.convertToType(data['add_time'], 'String'); + + delete data['add_time']; + } + if (data.hasOwnProperty('update_time')) { + obj['update_time'] = ApiClient.convertToType(data['update_time'], 'String'); + + delete data['update_time']; + } + if (data.hasOwnProperty('last_updated_by_user_id')) { + obj['last_updated_by_user_id'] = ApiClient.convertToType(data['last_updated_by_user_id'], 'Number'); + + delete data['last_updated_by_user_id']; + } + if (data.hasOwnProperty('created_by_user_id')) { + obj['created_by_user_id'] = ApiClient.convertToType(data['created_by_user_id'], 'Number'); + + delete data['created_by_user_id']; + } + if (data.hasOwnProperty('active_flag')) { + obj['active_flag'] = ApiClient.convertToType(data['active_flag'], 'Boolean'); + + delete data['active_flag']; + } + if (data.hasOwnProperty('edit_flag')) { + obj['edit_flag'] = ApiClient.convertToType(data['edit_flag'], 'Boolean'); + + delete data['edit_flag']; + } + if (data.hasOwnProperty('add_visible_flag')) { + obj['add_visible_flag'] = ApiClient.convertToType(data['add_visible_flag'], 'Boolean'); + + delete data['add_visible_flag']; + } + if (data.hasOwnProperty('important_flag')) { + obj['important_flag'] = ApiClient.convertToType(data['important_flag'], 'Boolean'); + + delete data['important_flag']; + } + if (data.hasOwnProperty('bulk_edit_allowed')) { + obj['bulk_edit_allowed'] = ApiClient.convertToType(data['bulk_edit_allowed'], 'Boolean'); + + delete data['bulk_edit_allowed']; + } + if (data.hasOwnProperty('searchable_flag')) { + obj['searchable_flag'] = ApiClient.convertToType(data['searchable_flag'], 'Boolean'); + + delete data['searchable_flag']; + } + if (data.hasOwnProperty('filtering_allowed')) { + obj['filtering_allowed'] = ApiClient.convertToType(data['filtering_allowed'], 'Boolean'); + + delete data['filtering_allowed']; + } + if (data.hasOwnProperty('sortable_flag')) { + obj['sortable_flag'] = ApiClient.convertToType(data['sortable_flag'], 'Boolean'); + + delete data['sortable_flag']; + } + if (data.hasOwnProperty('mandatory_flag')) { + obj['mandatory_flag'] = ApiClient.convertToType(data['mandatory_flag'], 'Boolean'); + + delete data['mandatory_flag']; + } + + if (Object.keys(data).length > 0) { + Object.assign(obj, data); + } + + } + return obj; + } + + +} + +/** + * The name of the field + * @member {String} name + */ +GetProductField.prototype['name'] = undefined; + +/** + * When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:
`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]` + * @member {Array.} options + */ +GetProductField.prototype['options'] = undefined; + +/** + * @member {module:model/InternalFieldType} field_type + */ +GetProductField.prototype['field_type'] = undefined; + +/** + * The ID of the product field + * @member {Number} id + */ +GetProductField.prototype['id'] = undefined; + +/** + * The key of the product field + * @member {String} key + */ +GetProductField.prototype['key'] = undefined; + +/** + * The position (index) of the product field in the detail view + * @member {Number} order_nr + */ +GetProductField.prototype['order_nr'] = undefined; + +/** + * The product field creation time. Format: YYYY-MM-DD HH:MM:SS + * @member {String} add_time + */ +GetProductField.prototype['add_time'] = undefined; + +/** + * The product field last update time. Format: YYYY-MM-DD HH:MM:SS + * @member {String} update_time + */ +GetProductField.prototype['update_time'] = undefined; + +/** + * The ID of the last user to update the product field + * @member {Number} last_updated_by_user_id + */ +GetProductField.prototype['last_updated_by_user_id'] = undefined; + +/** + * The ID of the user who created the product field + * @member {Number} created_by_user_id + */ +GetProductField.prototype['created_by_user_id'] = undefined; + +/** + * Whether or not the product field is currently active + * @member {Boolean} active_flag + */ +GetProductField.prototype['active_flag'] = undefined; + +/** + * Whether or not the product field name and metadata is editable + * @member {Boolean} edit_flag + */ +GetProductField.prototype['edit_flag'] = undefined; + +/** + * Whether or not the product field is visible in the Add Product Modal + * @member {Boolean} add_visible_flag + */ +GetProductField.prototype['add_visible_flag'] = undefined; + +/** + * Whether or not the product field is marked as important + * @member {Boolean} important_flag + */ +GetProductField.prototype['important_flag'] = undefined; + +/** + * Whether or not the product field data can be edited + * @member {Boolean} bulk_edit_allowed + */ +GetProductField.prototype['bulk_edit_allowed'] = undefined; + +/** + * Whether or not the product field is searchable + * @member {Boolean} searchable_flag + */ +GetProductField.prototype['searchable_flag'] = undefined; + +/** + * Whether or not the product field value can be used when filtering searches + * @member {Boolean} filtering_allowed + */ +GetProductField.prototype['filtering_allowed'] = undefined; + +/** + * Whether or not the product field is sortable + * @member {Boolean} sortable_flag + */ +GetProductField.prototype['sortable_flag'] = undefined; + +/** + * Whether or not the product field is mandatory when creating products + * @member {Boolean} mandatory_flag + */ +GetProductField.prototype['mandatory_flag'] = undefined; + + +// Implement ProductField interface: +/** + * The name of the field + * @member {String} name + */ +ProductField.prototype['name'] = undefined; +/** + * When `field_type` is either `set` or `enum`, possible options must be supplied as a JSON-encoded sequential array, for example:
`[{\"label\":\"red\"}, {\"label\":\"blue\"}, {\"label\":\"lilac\"}]` + * @member {Array.} options + */ +ProductField.prototype['options'] = undefined; +/** + * The type of the field
ValueDescription
`varchar`Text (up to 255 characters)
`varchar_auto`Autocomplete text (up to 255 characters)
`text`Long text (up to 65k characters)
`double`Numeric value
`monetary`Monetary field (has a numeric value and a currency value)
`date`Date (format YYYY-MM-DD)
`set`Options field with a possibility of having multiple chosen options
`enum`Options field with a single possible chosen option
`user`User field (contains a user ID of another Pipedrive user)
`org`Organization field (contains an organization ID which is stored on the same account)
`people`Person field (contains a product ID which is stored on the same account)
`phone`Phone field (up to 255 numbers and/or characters)
`time`Time field (format HH:MM:SS)
`timerange`Time-range field (has a start time and end time value, both HH:MM:SS)
`daterange`Date-range field (has a start date and end date value, both YYYY-MM-DD)
`address`Address field
+ * @member {module:model/ProductField.FieldTypeEnum} field_type + */ +ProductField.prototype['field_type'] = undefined; +/** + * The ID of the product field + * @member {Number} id + */ +ProductField.prototype['id'] = undefined; +/** + * The key of the product field + * @member {String} key + */ +ProductField.prototype['key'] = undefined; +/** + * The position (index) of the product field in the detail view + * @member {Number} order_nr + */ +ProductField.prototype['order_nr'] = undefined; +/** + * The product field creation time. Format: YYYY-MM-DD HH:MM:SS + * @member {String} add_time + */ +ProductField.prototype['add_time'] = undefined; +/** + * The product field last update time. Format: YYYY-MM-DD HH:MM:SS + * @member {String} update_time + */ +ProductField.prototype['update_time'] = undefined; +/** + * The ID of the last user to update the product field + * @member {Number} last_updated_by_user_id + */ +ProductField.prototype['last_updated_by_user_id'] = undefined; +/** + * The ID of the user who created the product field + * @member {Number} created_by_user_id + */ +ProductField.prototype['created_by_user_id'] = undefined; +/** + * Whether or not the product field is currently active + * @member {Boolean} active_flag + */ +ProductField.prototype['active_flag'] = undefined; +/** + * Whether or not the product field name and metadata is editable + * @member {Boolean} edit_flag + */ +ProductField.prototype['edit_flag'] = undefined; +/** + * Whether or not the product field is visible in the Add Product Modal + * @member {Boolean} add_visible_flag + */ +ProductField.prototype['add_visible_flag'] = undefined; +/** + * Whether or not the product field is marked as important + * @member {Boolean} important_flag + */ +ProductField.prototype['important_flag'] = undefined; +/** + * Whether or not the product field data can be edited + * @member {Boolean} bulk_edit_allowed + */ +ProductField.prototype['bulk_edit_allowed'] = undefined; +/** + * Whether or not the product field is searchable + * @member {Boolean} searchable_flag + */ +ProductField.prototype['searchable_flag'] = undefined; +/** + * Whether or not the product field value can be used when filtering searches + * @member {Boolean} filtering_allowed + */ +ProductField.prototype['filtering_allowed'] = undefined; +/** + * Whether or not the product field is sortable + * @member {Boolean} sortable_flag + */ +ProductField.prototype['sortable_flag'] = undefined; +/** + * Whether or not the product field is mandatory when creating products + * @member {Boolean} mandatory_flag + */ +ProductField.prototype['mandatory_flag'] = undefined; +// Implement GetFieldAllOf interface: +/** + * @member {module:model/InternalFieldType} field_type + */ +GetFieldAllOf.prototype['field_type'] = undefined; + + + + +export default GetProductField; + diff --git a/src/model/InternalFieldType.js b/src/model/InternalFieldType.js new file mode 100644 index 00000000..81475337 --- /dev/null +++ b/src/model/InternalFieldType.js @@ -0,0 +1,278 @@ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +/** +* Enum class InternalFieldType. +* @enum {} +* @readonly +*/ +export default class InternalFieldType { + + /** + * value: "boolean" + * @const + */ + "boolean" = "boolean"; + + + /** + * value: "double" + * @const + */ + "double" = "double"; + + + /** + * value: "int" + * @const + */ + "int" = "int"; + + + /** + * value: "json" + * @const + */ + "json" = "json"; + + + /** + * value: "date" + * @const + */ + "date" = "date"; + + + /** + * value: "daterange" + * @const + */ + "daterange" = "daterange"; + + + /** + * value: "time" + * @const + */ + "time" = "time"; + + + /** + * value: "timerange" + * @const + */ + "timerange" = "timerange"; + + + /** + * value: "text" + * @const + */ + "text" = "text"; + + + /** + * value: "varchar" + * @const + */ + "varchar" = "varchar"; + + + /** + * value: "varchar_auto" + * @const + */ + "varchar_auto" = "varchar_auto"; + + + /** + * value: "varchar_options" + * @const + */ + "varchar_options" = "varchar_options"; + + + /** + * value: "address" + * @const + */ + "address" = "address"; + + + /** + * value: "enum" + * @const + */ + "enum" = "enum"; + + + /** + * value: "monetary" + * @const + */ + "monetary" = "monetary"; + + + /** + * value: "phone" + * @const + */ + "phone" = "phone"; + + + /** + * value: "set" + * @const + */ + "set" = "set"; + + + /** + * value: "activity" + * @const + */ + "activity" = "activity"; + + + /** + * value: "deal" + * @const + */ + "deal" = "deal"; + + + /** + * value: "lead" + * @const + */ + "lead" = "lead"; + + + /** + * value: "org" + * @const + */ + "org" = "org"; + + + /** + * value: "people" + * @const + */ + "people" = "people"; + + + /** + * value: "pipeline" + * @const + */ + "pipeline" = "pipeline"; + + + /** + * value: "product" + * @const + */ + "product" = "product"; + + + /** + * value: "project" + * @const + */ + "project" = "project"; + + + /** + * value: "stage" + * @const + */ + "stage" = "stage"; + + + /** + * value: "user" + * @const + */ + "user" = "user"; + + + /** + * value: "billing_frequency" + * @const + */ + "billing_frequency" = "billing_frequency"; + + + /** + * value: "picture" + * @const + */ + "picture" = "picture"; + + + /** + * value: "price_list" + * @const + */ + "price_list" = "price_list"; + + + /** + * value: "projects_board" + * @const + */ + "projects_board" = "projects_board"; + + + /** + * value: "projects_phase" + * @const + */ + "projects_phase" = "projects_phase"; + + + /** + * value: "status" + * @const + */ + "status" = "status"; + + + /** + * value: "visible_to" + * @const + */ + "visible_to" = "visible_to"; + + + + /** + * Returns a InternalFieldType enum value from a Javascript object name. + * @param {Object} data The plain JavaScript object containing the name of the enum value. + * @return {module:model/InternalFieldType} The enum InternalFieldType value. + */ + static constructFromObject(object) { + return object; + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } +} + diff --git a/src/model/NewDealProduct.js b/src/model/NewDealProduct.js index f7a35b78..70b04f19 100644 --- a/src/model/NewDealProduct.js +++ b/src/model/NewDealProduct.js @@ -195,7 +195,7 @@ NewDealProduct.prototype['tax'] = 0; NewDealProduct.prototype['tax_method'] = undefined; /** - * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default + * Whether the product is enabled for a deal or not This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring * @member {Boolean} enabled_flag * @default true */ @@ -269,7 +269,7 @@ DealProductRequestBody.prototype['tax'] = 0; */ DealProductRequestBody.prototype['tax_method'] = undefined; /** - * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default + * Whether the product is enabled for a deal or not This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring * @member {Boolean} enabled_flag * @default true */ diff --git a/src/model/NoteFieldsResponse.js b/src/model/NoteFieldsResponse.js index b881abcc..72636eeb 100644 --- a/src/model/NoteFieldsResponse.js +++ b/src/model/NoteFieldsResponse.js @@ -14,7 +14,7 @@ import ApiClient from '../ApiClient'; import AdditionalData from './AdditionalData'; import BaseResponse from './BaseResponse'; -import NoteField from './NoteField'; +import GetNoteField from './GetNoteField'; import NoteFieldsResponseAllOf from './NoteFieldsResponseAllOf'; /** @@ -61,7 +61,7 @@ class NoteFieldsResponse { delete data['success']; } if (data.hasOwnProperty('data')) { - obj['data'] = ApiClient.convertToType(data['data'], [NoteField]); + obj['data'] = ApiClient.convertToType(data['data'], [GetNoteField]); delete data['data']; } @@ -89,7 +89,7 @@ class NoteFieldsResponse { NoteFieldsResponse.prototype['success'] = undefined; /** - * @member {Array.} data + * @member {Array.} data */ NoteFieldsResponse.prototype['data'] = undefined; @@ -107,7 +107,7 @@ NoteFieldsResponse.prototype['additional_data'] = undefined; BaseResponse.prototype['success'] = undefined; // Implement NoteFieldsResponseAllOf interface: /** - * @member {Array.} data + * @member {Array.} data */ NoteFieldsResponseAllOf.prototype['data'] = undefined; /** diff --git a/src/model/NoteFieldsResponseAllOf.js b/src/model/NoteFieldsResponseAllOf.js index d654fefc..acd9ced9 100644 --- a/src/model/NoteFieldsResponseAllOf.js +++ b/src/model/NoteFieldsResponseAllOf.js @@ -13,7 +13,7 @@ import ApiClient from '../ApiClient'; import AdditionalData from './AdditionalData'; -import NoteField from './NoteField'; +import GetNoteField from './GetNoteField'; /** * The NoteFieldsResponseAllOf model module. @@ -50,7 +50,7 @@ class NoteFieldsResponseAllOf { obj = obj || new NoteFieldsResponseAllOf(); if (data.hasOwnProperty('data')) { - obj['data'] = ApiClient.convertToType(data['data'], [NoteField]); + obj['data'] = ApiClient.convertToType(data['data'], [GetNoteField]); delete data['data']; } @@ -72,7 +72,7 @@ class NoteFieldsResponseAllOf { } /** - * @member {Array.} data + * @member {Array.} data */ NoteFieldsResponseAllOf.prototype['data'] = undefined; diff --git a/src/model/UpdateActivityPlanItemResponse.js b/src/model/UpdateActivityPlanItemResponse.js new file mode 100644 index 00000000..7cd9e32a --- /dev/null +++ b/src/model/UpdateActivityPlanItemResponse.js @@ -0,0 +1,99 @@ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ProjectPlanItemObject from './ProjectPlanItemObject'; + +/** + * The UpdateActivityPlanItemResponse model module. + * @module model/UpdateActivityPlanItemResponse + * @version 1.0.0 + */ +class UpdateActivityPlanItemResponse { + /** + * Constructs a new UpdateActivityPlanItemResponse. + * @alias module:model/UpdateActivityPlanItemResponse + */ + constructor() { + + UpdateActivityPlanItemResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a UpdateActivityPlanItemResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/UpdateActivityPlanItemResponse} obj Optional instance to populate. + * @return {module:model/UpdateActivityPlanItemResponse} The populated UpdateActivityPlanItemResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new UpdateActivityPlanItemResponse(); + + if (data.hasOwnProperty('success')) { + obj['success'] = ApiClient.convertToType(data['success'], 'Boolean'); + + delete data['success']; + } + if (data.hasOwnProperty('data')) { + obj['data'] = ProjectPlanItemObject.constructFromObject(data['data']); + + delete data['data']; + } + if (data.hasOwnProperty('additional_data')) { + obj['additional_data'] = ApiClient.convertToType(data['additional_data'], Object); + + delete data['additional_data']; + } + + if (Object.keys(data).length > 0) { + Object.assign(obj, data); + } + + } + return obj; + } + + +} + +/** + * @member {Boolean} success + */ +UpdateActivityPlanItemResponse.prototype['success'] = undefined; + +/** + * @member {module:model/ProjectPlanItemObject} data + */ +UpdateActivityPlanItemResponse.prototype['data'] = undefined; + +/** + * @member {Object} additional_data + */ +UpdateActivityPlanItemResponse.prototype['additional_data'] = undefined; + + + + + + +export default UpdateActivityPlanItemResponse; + diff --git a/src/model/UpdateDealProduct.js b/src/model/UpdateDealProduct.js index 732e12cc..89839dc3 100644 --- a/src/model/UpdateDealProduct.js +++ b/src/model/UpdateDealProduct.js @@ -195,7 +195,7 @@ UpdateDealProduct.prototype['tax'] = 0; UpdateDealProduct.prototype['tax_method'] = undefined; /** - * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default + * Whether the product is enabled for a deal or not This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring * @member {Boolean} enabled_flag * @default true */ @@ -269,7 +269,7 @@ DealProductRequestBody.prototype['tax'] = 0; */ DealProductRequestBody.prototype['tax_method'] = undefined; /** - * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default + * Whether the product is enabled for a deal or not This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default Not possible to disable the product if the deal has installments associated and the product is the last one enabled Not possible to enable the product if the deal has installments associated and the product is recurring * @member {Boolean} enabled_flag * @default true */ diff --git a/src/model/UpdateTaskPlanItemResponse.js b/src/model/UpdateTaskPlanItemResponse.js new file mode 100644 index 00000000..efd7de42 --- /dev/null +++ b/src/model/UpdateTaskPlanItemResponse.js @@ -0,0 +1,99 @@ +/** + * Pipedrive API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ProjectPlanItemObject from './ProjectPlanItemObject'; + +/** + * The UpdateTaskPlanItemResponse model module. + * @module model/UpdateTaskPlanItemResponse + * @version 1.0.0 + */ +class UpdateTaskPlanItemResponse { + /** + * Constructs a new UpdateTaskPlanItemResponse. + * @alias module:model/UpdateTaskPlanItemResponse + */ + constructor() { + + UpdateTaskPlanItemResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a UpdateTaskPlanItemResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/UpdateTaskPlanItemResponse} obj Optional instance to populate. + * @return {module:model/UpdateTaskPlanItemResponse} The populated UpdateTaskPlanItemResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new UpdateTaskPlanItemResponse(); + + if (data.hasOwnProperty('success')) { + obj['success'] = ApiClient.convertToType(data['success'], 'Boolean'); + + delete data['success']; + } + if (data.hasOwnProperty('data')) { + obj['data'] = ProjectPlanItemObject.constructFromObject(data['data']); + + delete data['data']; + } + if (data.hasOwnProperty('additional_data')) { + obj['additional_data'] = ApiClient.convertToType(data['additional_data'], Object); + + delete data['additional_data']; + } + + if (Object.keys(data).length > 0) { + Object.assign(obj, data); + } + + } + return obj; + } + + +} + +/** + * @member {Boolean} success + */ +UpdateTaskPlanItemResponse.prototype['success'] = undefined; + +/** + * @member {module:model/ProjectPlanItemObject} data + */ +UpdateTaskPlanItemResponse.prototype['data'] = undefined; + +/** + * @member {Object} additional_data + */ +UpdateTaskPlanItemResponse.prototype['additional_data'] = undefined; + + + + + + +export default UpdateTaskPlanItemResponse; +