diff --git a/CHANGELOG.md b/CHANGELOG.md index c22d913..4b6e8ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Marked fields that can be `null` as `nullable: true` in Mailbox endpoints: + - `draft`, `from[].linked_person_id`, `from[].linked_person_name` (and the same for `to`, `cc`, `bcc`) in `GET /v1/mailbox/mailMessages/{id}` + - `template_id`, plus the same `draft` and participant `linked_person_id` / `linked_person_name` fields, in `GET /v1/deals/{id}/mailMessages`, `GET /v1/persons/{id}/mailMessages` and `GET /v1/organizations/{id}/mailMessages` + - `snippet_sent`, `last_message_received_timestamp`, `archived_flag`, `drafts_parties`, `parties.to[].linked_person_id` and `parties.to[].linked_person_name` (and the same for `parties.from`) in `GET /v1/mailbox/mailThreads`, `GET /v1/mailbox/mailThreads/{id}` and `PUT /v1/mailbox/mailThreads/{id}` + - `from[].linked_person_id` and `from[].linked_person_name` (and the same for `to`, `cc`, `bcc`) in `GET /v1/mailbox/mailThreads/{id}/mailMessages` + - `deal_id` and `lead_id` in the `PUT /v1/mailbox/mailThreads/{id}` request body, where `null` unlinks the deal or lead ## [19.0.1](https://github.com/pipedrive/client-php/compare/19.0.0...19.0.1) (2026-10-09) ### Fixed diff --git a/docs/versions/v1/Api/PersonsApi.md b/docs/versions/v1/Api/PersonsApi.md index 4bb4d6e..11eb139 100644 --- a/docs/versions/v1/Api/PersonsApi.md +++ b/docs/versions/v1/Api/PersonsApi.md @@ -50,7 +50,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person $add_person_follower_request = new \Pipedrive\versions\v1\Model\AddPersonFollowerRequest(); // \Pipedrive\versions\v1\Model\AddPersonFollowerRequest try { @@ -65,7 +65,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | **add_person_follower_request** | [**\Pipedrive\versions\v1\Model\AddPersonFollowerRequest**](../Model/AddPersonFollowerRequest.md)| | [optional] ### Return type @@ -117,7 +117,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person $file = "/path/to/file.txt"; // \SplFileObject | One image supplied in the multipart/form-data encoding $crop_x = 56; // int | X coordinate to where start cropping form (in pixels) $crop_y = 56; // int | Y coordinate to where start cropping form (in pixels) @@ -136,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | **file** | **\SplFileObject****\SplFileObject**| One image supplied in the multipart/form-data encoding | **crop_x** | **int**| X coordinate to where start cropping form (in pixels) | [optional] **crop_y** | **int**| Y coordinate to where start cropping form (in pixels) | [optional] @@ -192,7 +192,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person $follower_id = 56; // int | The ID of the relationship between the follower and the person try { @@ -207,7 +207,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | **follower_id** | **int**| The ID of the relationship between the follower and the person | ### Return type @@ -259,7 +259,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person try { $result = $apiInstance->deletePersonPicture($id); @@ -273,7 +273,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | ### Return type @@ -324,7 +324,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person $cursor = 'cursor_example'; // string | For pagination, the marker (an opaque string value) representing the first item on the next page $limit = 56; // int | Items shown per page @@ -340,7 +340,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | **cursor** | **string**| For pagination, the marker (an opaque string value) representing the first item on the next page | [optional] **limit** | **int**| Items shown per page | [optional] @@ -393,7 +393,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person $start = 0; // int | Pagination start $limit = 56; // int | Items shown per page. Please note that a maximum value of 100 is allowed. $sort = 'sort_example'; // string | Supported fields: `id`, `update_time` @@ -410,7 +410,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | **start** | **int**| Pagination start | [optional] [default to 0] **limit** | **int**| Items shown per page. Please note that a maximum value of 100 is allowed. | [optional] **sort** | **string**| Supported fields: `id`, `update_time` | [optional] @@ -464,7 +464,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person try { $result = $apiInstance->getPersonFollowers($id); @@ -478,7 +478,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | ### Return type @@ -529,7 +529,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person $start = 0; // int | Pagination start $limit = 56; // int | Items shown per page $include_body = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBooleanDefault0(); // \Pipedrive\versions\v1\Model\NumberBooleanDefault0 | Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. @@ -546,7 +546,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | **start** | **int**| Pagination start | [optional] [default to 0] **limit** | **int**| Items shown per page | [optional] **include_body** | [**\Pipedrive\versions\v1\Model\NumberBooleanDefault0**](../Model/.md)| Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. | [optional] @@ -600,7 +600,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person $start = 0; // int | Pagination start $limit = 56; // int | Items shown per page @@ -616,7 +616,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | **start** | **int**| Pagination start | [optional] [default to 0] **limit** | **int**| Items shown per page | [optional] @@ -669,7 +669,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person $start = 0; // int | Pagination start $limit = 56; // int | Items shown per page $all_changes = 'all_changes_example'; // string | Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. @@ -687,7 +687,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | **start** | **int**| Pagination start | [optional] [default to 0] **limit** | **int**| Items shown per page | [optional] **all_changes** | **string**| Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. | [optional] @@ -742,7 +742,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person try { $result = $apiInstance->getPersonUsers($id); @@ -756,7 +756,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | ### Return type @@ -807,7 +807,7 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( new GuzzleHttp\Client(), $config ); -$id = 56; // int | The ID of the person +$id = 56; // int | The unique ID of the person $merge_persons_request = new \Pipedrive\versions\v1\Model\MergePersonsRequest(); // \Pipedrive\versions\v1\Model\MergePersonsRequest try { @@ -822,7 +822,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| The ID of the person | + **id** | **int**| The unique ID of the person | **merge_persons_request** | [**\Pipedrive\versions\v1\Model\MergePersonsRequest**](../Model/MergePersonsRequest.md)| | [optional] ### Return type diff --git a/docs/versions/v1/Model/BaseMailThread.md b/docs/versions/v1/Model/BaseMailThread.md index c3c34b9..7daa1fb 100644 --- a/docs/versions/v1/Model/BaseMailThread.md +++ b/docs/versions/v1/Model/BaseMailThread.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **smart_bcc_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether one of the parties of the mail thread is Bcc | [optional] **mail_link_tracking_enabled_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the link tracking of the mail thread is enabled | [optional] **parties** | [**\Pipedrive\versions\v1\Model\BaseMailThreadAllOfParties**](BaseMailThreadAllOfParties.md) | | [optional] -**drafts_parties** | **object[]** | Parties of the drafted mail thread | [optional] +**drafts_parties** | **object[]** | Parties of the drafted mail thread. `null` if the mail thread has no drafts. | [optional] **folders** | **string[]** | Folders in which messages from thread are being stored | [optional] **version** | **float** | Version | [optional] **snippet_draft** | **string** | A snippet from a draft | [optional] @@ -27,7 +27,7 @@ Name | Type | Description | Notes **message_count** | **int** | An amount of messages | [optional] **has_draft_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread has any drafts | [optional] **has_sent_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread has messages sent | [optional] -**archived_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread is archived | [optional] +**archived_flag** | **float** | Whether the mail thread is archived. `null` if the mail thread has not been explicitly archived or unarchived in Pipedrive. | [optional] **shared_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread is shared | [optional] **external_deleted_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread has been deleted externally | [optional] **first_message_to_me_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread was initialized by others | [optional] diff --git a/docs/versions/v1/Model/BaseMailThreadAllOf.md b/docs/versions/v1/Model/BaseMailThreadAllOf.md index 8959941..2ca6198 100644 --- a/docs/versions/v1/Model/BaseMailThreadAllOf.md +++ b/docs/versions/v1/Model/BaseMailThreadAllOf.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **parties** | [**\Pipedrive\versions\v1\Model\BaseMailThreadAllOfParties**](BaseMailThreadAllOfParties.md) | | [optional] -**drafts_parties** | **object[]** | Parties of the drafted mail thread | [optional] +**drafts_parties** | **object[]** | Parties of the drafted mail thread. `null` if the mail thread has no drafts. | [optional] **folders** | **string[]** | Folders in which messages from thread are being stored | [optional] **version** | **float** | Version | [optional] **snippet_draft** | **string** | A snippet from a draft | [optional] @@ -13,7 +13,7 @@ Name | Type | Description | Notes **message_count** | **int** | An amount of messages | [optional] **has_draft_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread has any drafts | [optional] **has_sent_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread has messages sent | [optional] -**archived_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread is archived | [optional] +**archived_flag** | **float** | Whether the mail thread is archived. `null` if the mail thread has not been explicitly archived or unarchived in Pipedrive. | [optional] **shared_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread is shared | [optional] **external_deleted_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread has been deleted externally | [optional] **first_message_to_me_flag** | [**NumberBooleanDefault0**](NumberBooleanDefault0.md) | Whether the mail thread was initialized by others | [optional] diff --git a/docs/versions/v1/Model/MailThreadParticipant.md b/docs/versions/v1/Model/MailThreadParticipant.md index f59dc91..0840b46 100644 --- a/docs/versions/v1/Model/MailThreadParticipant.md +++ b/docs/versions/v1/Model/MailThreadParticipant.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **email_address** | **string** | Email address of the mail thread participant | [optional] **message_time** | **float** | Message time | [optional] **linked_person_id** | **int** | ID of the linked person | [optional] -**linked_person_name** | **string** | Email of the linked person | [optional] +**linked_person_name** | **string** | Name of the linked person | [optional] **mail_message_party_id** | **int** | ID of the mail message party | [optional] **linked_organization_id** | **int** | Linked Organization ID | [optional] diff --git a/lib/versions/v1/Api/PersonsApi.php b/lib/versions/v1/Api/PersonsApi.php index 2d03e00..2ad24e2 100644 --- a/lib/versions/v1/Api/PersonsApi.php +++ b/lib/versions/v1/Api/PersonsApi.php @@ -127,7 +127,7 @@ public function getConfig(): Configuration * * Add a follower to a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\AddPersonFollowerRequest|null $add_person_follower_request add_person_follower_request (optional) * * @throws ApiException on non-2xx response @@ -145,7 +145,7 @@ public function addPersonFollower($id, $add_person_follower_request = null) * * Add a follower to a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\AddPersonFollowerRequest|null $add_person_follower_request (optional) * * @throws ApiException on non-2xx response @@ -247,7 +247,7 @@ public function addPersonFollowerWithHttpInfo($id, $add_person_follower_request * * Add a follower to a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\AddPersonFollowerRequest|null $add_person_follower_request (optional) * * @throws InvalidArgumentException|OAuthProviderException @@ -268,7 +268,7 @@ function ($response) { * * Add a follower to a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\AddPersonFollowerRequest|null $add_person_follower_request (optional) * * @throws InvalidArgumentException|OAuthProviderException @@ -316,7 +316,7 @@ function ($exception) { /** * Create request for operation 'addPersonFollower' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\AddPersonFollowerRequest|null $add_person_follower_request (optional) * * @throws InvalidArgumentException|OAuthProviderException @@ -434,7 +434,7 @@ public function addPersonFollowerRequest($id, $add_person_follower_request = nul * * Add person picture * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \SplFileObject $file One image supplied in the multipart/form-data encoding (required) * @param int|null $crop_x X coordinate to where start cropping form (in pixels) (optional) * @param int|null $crop_y Y coordinate to where start cropping form (in pixels) (optional) @@ -456,7 +456,7 @@ public function addPersonPicture($id, $file, $crop_x = null, $crop_y = null, $cr * * Add person picture * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \SplFileObject $file One image supplied in the multipart/form-data encoding (required) * @param int|null $crop_x X coordinate to where start cropping form (in pixels) (optional) * @param int|null $crop_y Y coordinate to where start cropping form (in pixels) (optional) @@ -562,7 +562,7 @@ public function addPersonPictureWithHttpInfo($id, $file, $crop_x = null, $crop_y * * Add person picture * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \SplFileObject $file One image supplied in the multipart/form-data encoding (required) * @param int|null $crop_x X coordinate to where start cropping form (in pixels) (optional) * @param int|null $crop_y Y coordinate to where start cropping form (in pixels) (optional) @@ -587,7 +587,7 @@ function ($response) { * * Add person picture * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \SplFileObject $file One image supplied in the multipart/form-data encoding (required) * @param int|null $crop_x X coordinate to where start cropping form (in pixels) (optional) * @param int|null $crop_y Y coordinate to where start cropping form (in pixels) (optional) @@ -639,7 +639,7 @@ function ($exception) { /** * Create request for operation 'addPersonPicture' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \SplFileObject $file One image supplied in the multipart/form-data encoding (required) * @param int|null $crop_x X coordinate to where start cropping form (in pixels) (optional) * @param int|null $crop_y Y coordinate to where start cropping form (in pixels) (optional) @@ -791,7 +791,7 @@ public function addPersonPictureRequest($id, $file, $crop_x = null, $crop_y = nu * * Delete a follower from a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int $follower_id The ID of the relationship between the follower and the person (required) * * @throws ApiException on non-2xx response @@ -809,7 +809,7 @@ public function deletePersonFollower($id, $follower_id) * * Delete a follower from a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int $follower_id The ID of the relationship between the follower and the person (required) * * @throws ApiException on non-2xx response @@ -911,7 +911,7 @@ public function deletePersonFollowerWithHttpInfo($id, $follower_id) * * Delete a follower from a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int $follower_id The ID of the relationship between the follower and the person (required) * * @throws InvalidArgumentException|OAuthProviderException @@ -932,7 +932,7 @@ function ($response) { * * Delete a follower from a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int $follower_id The ID of the relationship between the follower and the person (required) * * @throws InvalidArgumentException|OAuthProviderException @@ -980,7 +980,7 @@ function ($exception) { /** * Create request for operation 'deletePersonFollower' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int $follower_id The ID of the relationship between the follower and the person (required) * * @throws InvalidArgumentException|OAuthProviderException @@ -1107,7 +1107,7 @@ public function deletePersonFollowerRequest($id, $follower_id): Request * * Delete person picture * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException @@ -1124,7 +1124,7 @@ public function deletePersonPicture($id) * * Delete person picture * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException @@ -1225,7 +1225,7 @@ public function deletePersonPictureWithHttpInfo($id) * * Delete person picture * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface @@ -1245,7 +1245,7 @@ function ($response) { * * Delete person picture * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface @@ -1292,7 +1292,7 @@ function ($exception) { /** * Create request for operation 'deletePersonPicture' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws InvalidArgumentException|OAuthProviderException * @return Request @@ -1403,7 +1403,7 @@ public function deletePersonPictureRequest($id): Request * * List updates about person field values * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional) * @param int|null $limit Items shown per page (optional) * @@ -1422,7 +1422,7 @@ public function getPersonChangelog($id, $cursor = null, $limit = null) * * List updates about person field values * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional) * @param int|null $limit Items shown per page (optional) * @@ -1525,7 +1525,7 @@ public function getPersonChangelogWithHttpInfo($id, $cursor = null, $limit = nul * * List updates about person field values * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional) * @param int|null $limit Items shown per page (optional) * @@ -1547,7 +1547,7 @@ function ($response) { * * List updates about person field values * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional) * @param int|null $limit Items shown per page (optional) * @@ -1596,7 +1596,7 @@ function ($exception) { /** * Create request for operation 'getPersonChangelog' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional) * @param int|null $limit Items shown per page (optional) * @@ -1725,7 +1725,7 @@ public function getPersonChangelogRequest($id, $cursor = null, $limit = null): R * * List files attached to a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page. Please note that a maximum value of 100 is allowed. (optional) * @param string|null $sort Supported fields: `id`, `update_time` (optional) @@ -1745,7 +1745,7 @@ public function getPersonFiles($id, $start = 0, $limit = null, $sort = null) * * List files attached to a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page. Please note that a maximum value of 100 is allowed. (optional) * @param string|null $sort Supported fields: `id`, `update_time` (optional) @@ -1849,7 +1849,7 @@ public function getPersonFilesWithHttpInfo($id, $start = 0, $limit = null, $sort * * List files attached to a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page. Please note that a maximum value of 100 is allowed. (optional) * @param string|null $sort Supported fields: `id`, `update_time` (optional) @@ -1872,7 +1872,7 @@ function ($response) { * * List files attached to a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page. Please note that a maximum value of 100 is allowed. (optional) * @param string|null $sort Supported fields: `id`, `update_time` (optional) @@ -1922,7 +1922,7 @@ function ($exception) { /** * Create request for operation 'getPersonFiles' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page. Please note that a maximum value of 100 is allowed. (optional) * @param string|null $sort Supported fields: `id`, `update_time` (optional) @@ -2064,7 +2064,7 @@ public function getPersonFilesRequest($id, $start = 0, $limit = null, $sort = nu * * List followers of a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException @@ -2081,7 +2081,7 @@ public function getPersonFollowers($id) * * List followers of a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException @@ -2182,7 +2182,7 @@ public function getPersonFollowersWithHttpInfo($id) * * List followers of a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface @@ -2202,7 +2202,7 @@ function ($response) { * * List followers of a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface @@ -2249,7 +2249,7 @@ function ($exception) { /** * Create request for operation 'getPersonFollowers' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws InvalidArgumentException|OAuthProviderException * @return Request @@ -2360,7 +2360,7 @@ public function getPersonFollowersRequest($id): Request * * List mail messages associated with a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) @@ -2380,7 +2380,7 @@ public function getPersonMailMessages($id, $start = 0, $limit = null, $include_b * * List mail messages associated with a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) @@ -2484,7 +2484,7 @@ public function getPersonMailMessagesWithHttpInfo($id, $start = 0, $limit = null * * List mail messages associated with a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) @@ -2507,7 +2507,7 @@ function ($response) { * * List mail messages associated with a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) @@ -2557,7 +2557,7 @@ function ($exception) { /** * Create request for operation 'getPersonMailMessages' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) @@ -2695,7 +2695,7 @@ public function getPersonMailMessagesRequest($id, $start = 0, $limit = null, $in * * List products associated with a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @@ -2714,7 +2714,7 @@ public function getPersonProducts($id, $start = 0, $limit = null) * * List products associated with a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @@ -2817,7 +2817,7 @@ public function getPersonProductsWithHttpInfo($id, $start = 0, $limit = null) * * List products associated with a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @@ -2839,7 +2839,7 @@ function ($response) { * * List products associated with a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @@ -2888,7 +2888,7 @@ function ($exception) { /** * Create request for operation 'getPersonProducts' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @@ -3017,7 +3017,7 @@ public function getPersonProductsRequest($id, $start = 0, $limit = null): Reques * * List updates about a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param string|null $all_changes Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. (optional) @@ -3038,7 +3038,7 @@ public function getPersonUpdates($id, $start = 0, $limit = null, $all_changes = * * List updates about a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param string|null $all_changes Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. (optional) @@ -3143,7 +3143,7 @@ public function getPersonUpdatesWithHttpInfo($id, $start = 0, $limit = null, $al * * List updates about a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param string|null $all_changes Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. (optional) @@ -3167,7 +3167,7 @@ function ($response) { * * List updates about a person * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param string|null $all_changes Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. (optional) @@ -3218,7 +3218,7 @@ function ($exception) { /** * Create request for operation 'getPersonUpdates' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) * @param string|null $all_changes Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates. (optional) @@ -3366,7 +3366,7 @@ public function getPersonUpdatesRequest($id, $start = 0, $limit = null, $all_cha * * List permitted users * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException @@ -3383,7 +3383,7 @@ public function getPersonUsers($id) * * List permitted users * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException @@ -3484,7 +3484,7 @@ public function getPersonUsersWithHttpInfo($id) * * List permitted users * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface @@ -3504,7 +3504,7 @@ function ($response) { * * List permitted users * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface @@ -3551,7 +3551,7 @@ function ($exception) { /** * Create request for operation 'getPersonUsers' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * * @throws InvalidArgumentException|OAuthProviderException * @return Request @@ -3662,7 +3662,7 @@ public function getPersonUsersRequest($id): Request * * Merge two persons * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\MergePersonsRequest|null $merge_persons_request merge_persons_request (optional) * * @throws ApiException on non-2xx response @@ -3680,7 +3680,7 @@ public function mergePersons($id, $merge_persons_request = null) * * Merge two persons * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\MergePersonsRequest|null $merge_persons_request (optional) * * @throws ApiException on non-2xx response @@ -3782,7 +3782,7 @@ public function mergePersonsWithHttpInfo($id, $merge_persons_request = null) * * Merge two persons * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\MergePersonsRequest|null $merge_persons_request (optional) * * @throws InvalidArgumentException|OAuthProviderException @@ -3803,7 +3803,7 @@ function ($response) { * * Merge two persons * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\MergePersonsRequest|null $merge_persons_request (optional) * * @throws InvalidArgumentException|OAuthProviderException @@ -3851,7 +3851,7 @@ function ($exception) { /** * Create request for operation 'mergePersons' * - * @param int $id The ID of the person (required) + * @param int $id The unique ID of the person (required) * @param \Pipedrive\versions\v1\Model\MergePersonsRequest|null $merge_persons_request (optional) * * @throws InvalidArgumentException|OAuthProviderException diff --git a/lib/versions/v1/Model/BaseMailThread.php b/lib/versions/v1/Model/BaseMailThread.php index 01749f6..c85cf46 100644 --- a/lib/versions/v1/Model/BaseMailThread.php +++ b/lib/versions/v1/Model/BaseMailThread.php @@ -89,7 +89,7 @@ class BaseMailThread implements ModelInterface, ArrayAccess, JsonSerializable 'message_count' => 'int', 'has_draft_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', 'has_sent_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', - 'archived_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', + 'archived_flag' => 'float', 'shared_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', 'external_deleted_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', 'first_message_to_me_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', @@ -359,6 +359,23 @@ public function getModelName(): string return self::$openAPIModelName; } + const ARCHIVED_FLAG_0 = 0; + const ARCHIVED_FLAG_1 = 1; + + /** + * Gets allowable values of the enum + * + * @phpstan-return array + * @phpsalm-return array + * @return (string|int)[] + */ + public function getArchivedFlagAllowableValues(): array + { + return [ + self::ARCHIVED_FLAG_0, + self::ARCHIVED_FLAG_1, + ]; + } /** * Associative array for storing property values @@ -429,6 +446,15 @@ public function listInvalidProperties(): array { $invalidProperties = []; + $allowedValues = $this->getArchivedFlagAllowableValues(); + if (!is_null($this->container['archived_flag']) && !in_array($this->container['archived_flag'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'archived_flag', must be one of '%s'", + $this->container['archived_flag'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -817,7 +843,7 @@ public function getDraftsParties() /** * Sets drafts_parties * - * @param object[]|null $drafts_parties Parties of the drafted mail thread + * @param object[]|null $drafts_parties Parties of the drafted mail thread. `null` if the mail thread has no drafts. * * @return self */ @@ -999,7 +1025,7 @@ public function setHasSentFlag($has_sent_flag): self /** * Gets archived_flag * - * @return \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null + * @return float|null */ public function getArchivedFlag() { @@ -1009,12 +1035,22 @@ public function getArchivedFlag() /** * Sets archived_flag * - * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $archived_flag Whether the mail thread is archived + * @param float|null $archived_flag Whether the mail thread is archived. `null` if the mail thread has not been explicitly archived or unarchived in Pipedrive. * * @return self */ public function setArchivedFlag($archived_flag): self { + $allowedValues = $this->getArchivedFlagAllowableValues(); + if (!is_null($archived_flag) && !in_array($archived_flag, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'archived_flag', must be one of '%s'", + $archived_flag, + implode("', '", $allowedValues) + ) + ); + } $this->container['archived_flag'] = $archived_flag; return $this; diff --git a/lib/versions/v1/Model/BaseMailThreadAllOf.php b/lib/versions/v1/Model/BaseMailThreadAllOf.php index b5a46a0..cf865e4 100644 --- a/lib/versions/v1/Model/BaseMailThreadAllOf.php +++ b/lib/versions/v1/Model/BaseMailThreadAllOf.php @@ -75,7 +75,7 @@ class BaseMailThreadAllOf implements ModelInterface, ArrayAccess, JsonSerializab 'message_count' => 'int', 'has_draft_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', 'has_sent_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', - 'archived_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', + 'archived_flag' => 'float', 'shared_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', 'external_deleted_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', 'first_message_to_me_flag' => '\Pipedrive\versions\v1\Model\NumberBooleanDefault0', @@ -289,6 +289,23 @@ public function getModelName(): string return self::$openAPIModelName; } + const ARCHIVED_FLAG_0 = 0; + const ARCHIVED_FLAG_1 = 1; + + /** + * Gets allowable values of the enum + * + * @phpstan-return array + * @phpsalm-return array + * @return (string|int)[] + */ + public function getArchivedFlagAllowableValues(): array + { + return [ + self::ARCHIVED_FLAG_0, + self::ARCHIVED_FLAG_1, + ]; + } /** * Associative array for storing property values @@ -345,6 +362,15 @@ public function listInvalidProperties(): array { $invalidProperties = []; + $allowedValues = $this->getArchivedFlagAllowableValues(); + if (!is_null($this->container['archived_flag']) && !in_array($this->container['archived_flag'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'archived_flag', must be one of '%s'", + $this->container['archived_flag'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -397,7 +423,7 @@ public function getDraftsParties() /** * Sets drafts_parties * - * @param object[]|null $drafts_parties Parties of the drafted mail thread + * @param object[]|null $drafts_parties Parties of the drafted mail thread. `null` if the mail thread has no drafts. * * @return self */ @@ -579,7 +605,7 @@ public function setHasSentFlag($has_sent_flag): self /** * Gets archived_flag * - * @return \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null + * @return float|null */ public function getArchivedFlag() { @@ -589,12 +615,22 @@ public function getArchivedFlag() /** * Sets archived_flag * - * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $archived_flag Whether the mail thread is archived + * @param float|null $archived_flag Whether the mail thread is archived. `null` if the mail thread has not been explicitly archived or unarchived in Pipedrive. * * @return self */ public function setArchivedFlag($archived_flag): self { + $allowedValues = $this->getArchivedFlagAllowableValues(); + if (!is_null($archived_flag) && !in_array($archived_flag, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'archived_flag', must be one of '%s'", + $archived_flag, + implode("', '", $allowedValues) + ) + ); + } $this->container['archived_flag'] = $archived_flag; return $this; diff --git a/lib/versions/v1/Model/MailThreadParticipant.php b/lib/versions/v1/Model/MailThreadParticipant.php index 223dfb6..cc36af1 100644 --- a/lib/versions/v1/Model/MailThreadParticipant.php +++ b/lib/versions/v1/Model/MailThreadParticipant.php @@ -434,7 +434,7 @@ public function getLinkedPersonName() /** * Sets linked_person_name * - * @param string|null $linked_person_name Email of the linked person + * @param string|null $linked_person_name Name of the linked person * * @return self */