From dd8d36e42f79b842b2677af349b171d34c2aff44 Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Fri, 11 Apr 2025 09:21:41 +0300 Subject: [PATCH] Codegen: CMS Automation Actions --- .../Automation/Actions/Api/CallbacksApi.php | 62 +-- .../Automation/Actions/Api/DefinitionsApi.php | 284 +++++++------ .../Automation/Actions/Api/FunctionsApi.php | 383 +++++++++--------- .../Automation/Actions/Api/RevisionsApi.php | 148 +++---- codegen/Automation/Actions/ApiException.php | 8 +- codegen/Automation/Actions/Configuration.php | 4 +- codegen/Automation/Actions/HeaderSelector.php | 32 +- ...tchInputCallbackCompletionBatchRequest.php | 6 +- .../Model/CallbackCompletionBatchRequest.php | 6 +- .../Model/CallbackCompletionRequest.php | 6 +- ...nsePublicActionDefinitionForwardPaging.php | 6 +- ...PublicActionFunctionIdentifierNoPaging.php | 6 +- ...ponsePublicActionRevisionForwardPaging.php | 6 +- codegen/Automation/Actions/Model/Error.php | 6 +- .../Automation/Actions/Model/ErrorDetail.php | 6 +- .../Actions/Model/FieldTypeDefinition.php | 6 +- .../Actions/Model/ForwardPaging.php | 6 +- .../Actions/Model/InputFieldDefinition.php | 6 +- .../Actions/Model/ModelInterface.php | 2 +- codegen/Automation/Actions/Model/NextPage.php | 6 +- codegen/Automation/Actions/Model/Option.php | 6 +- .../Actions/Model/OutputFieldDefinition.php | 6 +- .../Actions/Model/PublicActionDefinition.php | 6 +- .../Model/PublicActionDefinitionEgg.php | 6 +- ...nDefinitionInputFieldDependenciesInner.php | 66 +-- .../Model/PublicActionDefinitionPatch.php | 6 +- .../Actions/Model/PublicActionFunction.php | 6 +- .../Model/PublicActionFunctionIdentifier.php | 6 +- .../Actions/Model/PublicActionLabels.php | 6 +- .../Actions/Model/PublicActionRevision.php | 6 +- ...PublicConditionalSingleFieldDependency.php | 92 ++--- .../Model/PublicExecutionTranslationRule.php | 6 +- .../Model/PublicObjectRequestOptions.php | 6 +- .../Model/PublicSingleFieldDependency.php | 78 ++-- .../Automation/Actions/ObjectSerializer.php | 98 +++-- 35 files changed, 712 insertions(+), 683 deletions(-) diff --git a/codegen/Automation/Actions/Api/CallbacksApi.php b/codegen/Automation/Actions/Api/CallbacksApi.php index 23440ced2..37bc3771f 100644 --- a/codegen/Automation/Actions/Api/CallbacksApi.php +++ b/codegen/Automation/Actions/Api/CallbacksApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -86,13 +86,13 @@ class CallbacksApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -128,9 +128,9 @@ public function getConfig() /** * Operation complete * - * Completes a single callback + * Completes a callback * - * @param string $callback_id callback_id (required) + * @param string $callback_id The ID of the action execution. (required) * @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request callback_completion_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation * @@ -146,9 +146,9 @@ public function complete($callback_id, $callback_completion_request, string $con /** * Operation completeWithHttpInfo * - * Completes a single callback + * Completes a callback * - * @param string $callback_id (required) + * @param string $callback_id The ID of the action execution. (required) * @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation * @@ -182,18 +182,6 @@ public function completeWithHttpInfo($callback_id, $callback_completion_request, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -215,9 +203,9 @@ public function completeWithHttpInfo($callback_id, $callback_completion_request, /** * Operation completeAsync * - * Completes a single callback + * Completes a callback * - * @param string $callback_id (required) + * @param string $callback_id The ID of the action execution. (required) * @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation * @@ -237,9 +225,9 @@ function ($response) { /** * Operation completeAsyncWithHttpInfo * - * Completes a single callback + * Completes a callback * - * @param string $callback_id (required) + * @param string $callback_id The ID of the action execution. (required) * @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation * @@ -277,7 +265,7 @@ function ($exception) { /** * Create request for operation 'complete' * - * @param string $callback_id (required) + * @param string $callback_id The ID of the action execution. (required) * @param \HubSpot\Client\Automation\Actions\Model\CallbackCompletionRequest $callback_completion_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['complete'] to see the possible values for this operation * @@ -388,7 +376,7 @@ public function completeRequest($callback_id, $callback_completion_request, stri /** * Operation completeBatch * - * Completes a batch of callbacks + * Complete a batch of callbacks * * @param \HubSpot\Client\Automation\Actions\Model\BatchInputCallbackCompletionBatchRequest $batch_input_callback_completion_batch_request batch_input_callback_completion_batch_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['completeBatch'] to see the possible values for this operation @@ -405,7 +393,7 @@ public function completeBatch($batch_input_callback_completion_batch_request, st /** * Operation completeBatchWithHttpInfo * - * Completes a batch of callbacks + * Complete a batch of callbacks * * @param \HubSpot\Client\Automation\Actions\Model\BatchInputCallbackCompletionBatchRequest $batch_input_callback_completion_batch_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['completeBatch'] to see the possible values for this operation @@ -440,18 +428,6 @@ public function completeBatchWithHttpInfo($batch_input_callback_completion_batch $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -473,7 +449,7 @@ public function completeBatchWithHttpInfo($batch_input_callback_completion_batch /** * Operation completeBatchAsync * - * Completes a batch of callbacks + * Complete a batch of callbacks * * @param \HubSpot\Client\Automation\Actions\Model\BatchInputCallbackCompletionBatchRequest $batch_input_callback_completion_batch_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['completeBatch'] to see the possible values for this operation @@ -494,7 +470,7 @@ function ($response) { /** * Operation completeBatchAsyncWithHttpInfo * - * Completes a batch of callbacks + * Complete a batch of callbacks * * @param \HubSpot\Client\Automation\Actions\Model\BatchInputCallbackCompletionBatchRequest $batch_input_callback_completion_batch_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['completeBatch'] to see the possible values for this operation diff --git a/codegen/Automation/Actions/Api/DefinitionsApi.php b/codegen/Automation/Actions/Api/DefinitionsApi.php index d21419e31..b831d38d7 100644 --- a/codegen/Automation/Actions/Api/DefinitionsApi.php +++ b/codegen/Automation/Actions/Api/DefinitionsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -95,13 +95,13 @@ class DefinitionsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -137,10 +137,10 @@ public function getConfig() /** * Operation archive * - * Archive an extension definition + * Delete an action definition * - * @param string $definition_id definition_id (required) - * @param int $app_id app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -155,10 +155,10 @@ public function archive($definition_id, $app_id, string $contentType = self::con /** * Operation archiveWithHttpInfo * - * Archive an extension definition + * Delete an action definition * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -191,18 +191,6 @@ public function archiveWithHttpInfo($definition_id, $app_id, string $contentType $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -224,10 +212,10 @@ public function archiveWithHttpInfo($definition_id, $app_id, string $contentType /** * Operation archiveAsync * - * Archive an extension definition + * Delete an action definition * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -246,10 +234,10 @@ function ($response) { /** * Operation archiveAsyncWithHttpInfo * - * Archive an extension definition + * Delete an action definition * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -286,8 +274,8 @@ function ($exception) { /** * Create request for operation 'archive' * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -399,9 +387,9 @@ public function archiveRequest($definition_id, $app_id, string $contentType = se /** * Operation create * - * Create a new extension definition + * Create a new custom action definition * - * @param int $app_id app_id (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg public_action_definition_egg (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * @@ -418,9 +406,9 @@ public function create($app_id, $public_action_definition_egg, string $contentTy /** * Operation createWithHttpInfo * - * Create a new extension definition + * Create a new custom action definition * - * @param int $app_id (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * @@ -454,18 +442,6 @@ public function createWithHttpInfo($app_id, $public_action_definition_egg, strin $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 201: @@ -524,6 +500,19 @@ public function createWithHttpInfo($app_id, $public_action_definition_egg, strin ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -578,9 +567,9 @@ public function createWithHttpInfo($app_id, $public_action_definition_egg, strin /** * Operation createAsync * - * Create a new extension definition + * Create a new custom action definition * - * @param int $app_id (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * @@ -600,9 +589,9 @@ function ($response) { /** * Operation createAsyncWithHttpInfo * - * Create a new extension definition + * Create a new custom action definition * - * @param int $app_id (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * @@ -653,7 +642,7 @@ function ($exception) { /** * Create request for operation 'create' * - * @param int $app_id (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * @@ -765,11 +754,11 @@ public function createRequest($app_id, $public_action_definition_egg, string $co /** * Operation getById * - * Get extension definition by Id + * Retrieve a custom action definition * - * @param string $definition_id definition_id (required) - * @param int $app_id app_id (required) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $definition_id The ID of the custom action. (required) + * @param int $app_id The ID of the app. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -785,11 +774,11 @@ public function getById($definition_id, $app_id, $archived = false, string $cont /** * Operation getByIdWithHttpInfo * - * Get extension definition by Id + * Retrieve a custom action definition * - * @param string $definition_id (required) - * @param int $app_id (required) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $definition_id The ID of the custom action. (required) + * @param int $app_id The ID of the app. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -822,18 +811,6 @@ public function getByIdWithHttpInfo($definition_id, $app_id, $archived = false, $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -892,6 +869,19 @@ public function getByIdWithHttpInfo($definition_id, $app_id, $archived = false, ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -946,11 +936,11 @@ public function getByIdWithHttpInfo($definition_id, $app_id, $archived = false, /** * Operation getByIdAsync * - * Get extension definition by Id + * Retrieve a custom action definition * - * @param string $definition_id (required) - * @param int $app_id (required) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $definition_id The ID of the custom action. (required) + * @param int $app_id The ID of the app. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -969,11 +959,11 @@ function ($response) { /** * Operation getByIdAsyncWithHttpInfo * - * Get extension definition by Id + * Retrieve a custom action definition * - * @param string $definition_id (required) - * @param int $app_id (required) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $definition_id The ID of the custom action. (required) + * @param int $app_id The ID of the app. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1023,9 +1013,9 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param string $definition_id (required) - * @param int $app_id (required) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $definition_id The ID of the custom action. (required) + * @param int $app_id The ID of the app. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1147,12 +1137,12 @@ public function getByIdRequest($definition_id, $app_id, $archived = false, strin /** * Operation getPage * - * Get paged extension definitions + * Retrieve custom action definitions * - * @param int $app_id app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -1168,12 +1158,12 @@ public function getPage($app_id, $limit = null, $after = null, $archived = false /** * Operation getPageWithHttpInfo * - * Get paged extension definitions + * Retrieve custom action definitions * - * @param int $app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -1206,18 +1196,6 @@ public function getPageWithHttpInfo($app_id, $limit = null, $after = null, $arch $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -1276,6 +1254,19 @@ public function getPageWithHttpInfo($app_id, $limit = null, $after = null, $arch ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1330,12 +1321,12 @@ public function getPageWithHttpInfo($app_id, $limit = null, $after = null, $arch /** * Operation getPageAsync * - * Get paged extension definitions + * Retrieve custom action definitions * - * @param int $app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1354,12 +1345,12 @@ function ($response) { /** * Operation getPageAsyncWithHttpInfo * - * Get paged extension definitions + * Retrieve custom action definitions * - * @param int $app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1409,10 +1400,10 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param int $app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool $archived Whether to return only results that have been archived. (optional, default to false) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1539,10 +1530,10 @@ public function getPageRequest($app_id, $limit = null, $after = null, $archived /** * Operation update * - * Patch an existing extension definition + * Update an existing action definition * - * @param string $definition_id definition_id (required) - * @param int $app_id app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1559,10 +1550,10 @@ public function update($definition_id, $app_id, $public_action_definition_patch, /** * Operation updateWithHttpInfo * - * Patch an existing extension definition + * Update an existing action definition * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1596,18 +1587,6 @@ public function updateWithHttpInfo($definition_id, $app_id, $public_action_defin $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -1666,6 +1645,19 @@ public function updateWithHttpInfo($definition_id, $app_id, $public_action_defin ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1720,10 +1712,10 @@ public function updateWithHttpInfo($definition_id, $app_id, $public_action_defin /** * Operation updateAsync * - * Patch an existing extension definition + * Update an existing action definition * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1743,10 +1735,10 @@ function ($response) { /** * Operation updateAsyncWithHttpInfo * - * Patch an existing extension definition + * Update an existing action definition * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1797,8 +1789,8 @@ function ($exception) { /** * Create request for operation 'update' * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param int $app_id The ID of the app. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * diff --git a/codegen/Automation/Actions/Api/FunctionsApi.php b/codegen/Automation/Actions/Api/FunctionsApi.php index 65fbed433..bb60c0742 100644 --- a/codegen/Automation/Actions/Api/FunctionsApi.php +++ b/codegen/Automation/Actions/Api/FunctionsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -101,13 +101,13 @@ class FunctionsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -201,18 +201,6 @@ public function archiveWithHttpInfo($definition_id, $function_type, $function_id $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -447,9 +435,9 @@ public function archiveRequest($definition_id, $function_type, $function_id, $ap * * Delete a function for a definition * - * @param string $definition_id definition_id (required) - * @param string $function_type function_type (required) - * @param int $app_id app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -466,9 +454,9 @@ public function archiveByFunctionType($definition_id, $function_type, $app_id, s * * Delete a function for a definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -501,18 +489,6 @@ public function archiveByFunctionTypeWithHttpInfo($definition_id, $function_type $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } return [null, $statusCode, $response->getHeaders()]; @@ -536,9 +512,9 @@ public function archiveByFunctionTypeWithHttpInfo($definition_id, $function_type * * Delete a function for a definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -559,9 +535,9 @@ function ($response) { * * Delete a function for a definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -598,9 +574,9 @@ function ($exception) { /** * Create request for operation 'archiveByFunctionType' * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -727,12 +703,12 @@ public function archiveByFunctionTypeRequest($definition_id, $function_type, $ap /** * Operation createOrReplace * - * Insert a function for a definition + * Update a function for a definition * - * @param string $definition_id definition_id (required) - * @param string $function_type function_type (required) - * @param string $function_id function_id (required) - * @param int $app_id app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $body body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * @@ -749,12 +725,12 @@ public function createOrReplace($definition_id, $function_type, $function_id, $a /** * Operation createOrReplaceWithHttpInfo * - * Insert a function for a definition + * Update a function for a definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param string $function_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * @@ -788,18 +764,6 @@ public function createOrReplaceWithHttpInfo($definition_id, $function_type, $fun $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -858,6 +822,19 @@ public function createOrReplaceWithHttpInfo($definition_id, $function_type, $fun ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionFunctionIdentifier'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -912,12 +889,12 @@ public function createOrReplaceWithHttpInfo($definition_id, $function_type, $fun /** * Operation createOrReplaceAsync * - * Insert a function for a definition + * Update a function for a definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param string $function_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * @@ -937,12 +914,12 @@ function ($response) { /** * Operation createOrReplaceAsyncWithHttpInfo * - * Insert a function for a definition + * Update a function for a definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param string $function_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * @@ -993,10 +970,10 @@ function ($exception) { /** * Create request for operation 'createOrReplace' * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param string $function_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * @@ -1155,9 +1132,9 @@ public function createOrReplaceRequest($definition_id, $function_type, $function * * Insert a function for a definition * - * @param string $definition_id definition_id (required) - * @param string $function_type function_type (required) - * @param int $app_id app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $body body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * @@ -1176,9 +1153,9 @@ public function createOrReplaceByFunctionType($definition_id, $function_type, $a * * Insert a function for a definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * @@ -1212,18 +1189,6 @@ public function createOrReplaceByFunctionTypeWithHttpInfo($definition_id, $funct $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -1282,6 +1247,19 @@ public function createOrReplaceByFunctionTypeWithHttpInfo($definition_id, $funct ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionFunctionIdentifier'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1338,9 +1316,9 @@ public function createOrReplaceByFunctionTypeWithHttpInfo($definition_id, $funct * * Insert a function for a definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * @@ -1362,9 +1340,9 @@ function ($response) { * * Insert a function for a definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * @@ -1415,9 +1393,9 @@ function ($exception) { /** * Create request for operation 'createOrReplaceByFunctionType' * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * @@ -1559,11 +1537,11 @@ public function createOrReplaceByFunctionTypeRequest($definition_id, $function_t /** * Operation getByFunctionType * - * Get all functions by a type for a given definition + * Retrieve functions by a type for a given definition * - * @param string $definition_id definition_id (required) - * @param string $function_type function_type (required) - * @param int $app_id app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -1579,11 +1557,11 @@ public function getByFunctionType($definition_id, $function_type, $app_id, strin /** * Operation getByFunctionTypeWithHttpInfo * - * Get all functions by a type for a given definition + * Retrieve functions by a type for a given definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -1616,18 +1594,6 @@ public function getByFunctionTypeWithHttpInfo($definition_id, $function_type, $a $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -1686,6 +1652,19 @@ public function getByFunctionTypeWithHttpInfo($definition_id, $function_type, $a ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionFunction'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -1740,11 +1719,11 @@ public function getByFunctionTypeWithHttpInfo($definition_id, $function_type, $a /** * Operation getByFunctionTypeAsync * - * Get all functions by a type for a given definition + * Retrieve functions by a type for a given definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1763,11 +1742,11 @@ function ($response) { /** * Operation getByFunctionTypeAsyncWithHttpInfo * - * Get all functions by a type for a given definition + * Retrieve functions by a type for a given definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1817,9 +1796,9 @@ function ($exception) { /** * Create request for operation 'getByFunctionType' * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -1946,12 +1925,12 @@ public function getByFunctionTypeRequest($definition_id, $function_type, $app_id /** * Operation getById * - * Get a function for a given definition + * Retrieve a function from a given definition * - * @param string $definition_id definition_id (required) - * @param string $function_type function_type (required) - * @param string $function_id function_id (required) - * @param int $app_id app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -1967,12 +1946,12 @@ public function getById($definition_id, $function_type, $function_id, $app_id, s /** * Operation getByIdWithHttpInfo * - * Get a function for a given definition + * Retrieve a function from a given definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param string $function_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -2005,18 +1984,6 @@ public function getByIdWithHttpInfo($definition_id, $function_type, $function_id $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -2075,6 +2042,19 @@ public function getByIdWithHttpInfo($definition_id, $function_type, $function_id ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionFunction'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -2129,12 +2109,12 @@ public function getByIdWithHttpInfo($definition_id, $function_type, $function_id /** * Operation getByIdAsync * - * Get a function for a given definition + * Retrieve a function from a given definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param string $function_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2153,12 +2133,12 @@ function ($response) { /** * Operation getByIdAsyncWithHttpInfo * - * Get a function for a given definition + * Retrieve a function from a given definition * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param string $function_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2208,10 +2188,10 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param string $definition_id (required) - * @param string $function_type (required) - * @param string $function_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $function_type The type of function. Can be `PRE_ACTION_EXECUTION`, `PRE_FETCH_OPTIONS`, `POST_FETCH_OPTIONS`, `POST_ACTION_EXECUTION`. (required) + * @param string $function_id The ID of the function. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2353,10 +2333,10 @@ public function getByIdRequest($definition_id, $function_type, $function_id, $ap /** * Operation getPage * - * Get all functions for a given definition + * Retrieve functions for a given definition * - * @param string $definition_id definition_id (required) - * @param int $app_id app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -2372,10 +2352,10 @@ public function getPage($definition_id, $app_id, string $contentType = self::con /** * Operation getPageWithHttpInfo * - * Get all functions for a given definition + * Retrieve functions for a given definition * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -2408,18 +2388,6 @@ public function getPageWithHttpInfo($definition_id, $app_id, string $contentType $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -2478,6 +2446,19 @@ public function getPageWithHttpInfo($definition_id, $app_id, string $contentType ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionFunctionIdentifierNoPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -2532,10 +2513,10 @@ public function getPageWithHttpInfo($definition_id, $app_id, string $contentType /** * Operation getPageAsync * - * Get all functions for a given definition + * Retrieve functions for a given definition * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2554,10 +2535,10 @@ function ($response) { /** * Operation getPageAsyncWithHttpInfo * - * Get all functions for a given definition + * Retrieve functions for a given definition * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -2607,8 +2588,8 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string $definition_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException diff --git a/codegen/Automation/Actions/Api/RevisionsApi.php b/codegen/Automation/Actions/Api/RevisionsApi.php index e816473b7..d924b0b0c 100644 --- a/codegen/Automation/Actions/Api/RevisionsApi.php +++ b/codegen/Automation/Actions/Api/RevisionsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -86,13 +86,13 @@ class RevisionsApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, - $hostIndex = 0 + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 ) { $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); $this->headerSelector = $selector ?: new HeaderSelector(); $this->hostIndex = $hostIndex; } @@ -128,11 +128,11 @@ public function getConfig() /** * Operation getById * - * Gets a revision for a given definition by revision id + * Retrieve a specific revision of a definition * - * @param string $definition_id definition_id (required) - * @param string $revision_id revision_id (required) - * @param int $app_id app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $revision_id The ID of the revision. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -148,11 +148,11 @@ public function getById($definition_id, $revision_id, $app_id, string $contentTy /** * Operation getByIdWithHttpInfo * - * Gets a revision for a given definition by revision id + * Retrieve a specific revision of a definition * - * @param string $definition_id (required) - * @param string $revision_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $revision_id The ID of the revision. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -185,18 +185,6 @@ public function getByIdWithHttpInfo($definition_id, $revision_id, $app_id, strin $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -255,6 +243,19 @@ public function getByIdWithHttpInfo($definition_id, $revision_id, $app_id, strin ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionRevision'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -309,11 +310,11 @@ public function getByIdWithHttpInfo($definition_id, $revision_id, $app_id, strin /** * Operation getByIdAsync * - * Gets a revision for a given definition by revision id + * Retrieve a specific revision of a definition * - * @param string $definition_id (required) - * @param string $revision_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $revision_id The ID of the revision. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -332,11 +333,11 @@ function ($response) { /** * Operation getByIdAsyncWithHttpInfo * - * Gets a revision for a given definition by revision id + * Retrieve a specific revision of a definition * - * @param string $definition_id (required) - * @param string $revision_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $revision_id The ID of the revision. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -386,9 +387,9 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param string $definition_id (required) - * @param string $revision_id (required) - * @param int $app_id (required) + * @param string $definition_id The ID of the definition. (required) + * @param string $revision_id The ID of the revision. (required) + * @param int $app_id The ID of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -515,12 +516,12 @@ public function getByIdRequest($definition_id, $revision_id, $app_id, string $co /** * Operation getPage * - * Get all revisions for a given definition + * Retrieve revisions for a given definition * - * @param string $definition_id definition_id (required) - * @param int $app_id app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -536,12 +537,12 @@ public function getPage($definition_id, $app_id, $limit = null, $after = null, s /** * Operation getPageWithHttpInfo * - * Get all revisions for a given definition + * Retrieve revisions for a given definition * - * @param string $definition_id (required) - * @param int $app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format @@ -574,18 +575,6 @@ public function getPageWithHttpInfo($definition_id, $app_id, $limit = null, $aft $statusCode = $response->getStatusCode(); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } switch($statusCode) { case 200: @@ -644,6 +633,19 @@ public function getPageWithHttpInfo($definition_id, $app_id, $limit = null, $aft ]; } + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + $returnType = '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionRevisionForwardPaging'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -698,12 +700,12 @@ public function getPageWithHttpInfo($definition_id, $app_id, $limit = null, $aft /** * Operation getPageAsync * - * Get all revisions for a given definition + * Retrieve revisions for a given definition * - * @param string $definition_id (required) - * @param int $app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -722,12 +724,12 @@ function ($response) { /** * Operation getPageAsyncWithHttpInfo * - * Get all revisions for a given definition + * Retrieve revisions for a given definition * - * @param string $definition_id (required) - * @param int $app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException @@ -777,10 +779,10 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string $definition_id (required) - * @param int $app_id (required) - * @param int $limit The maximum number of results to display per page. (optional) - * @param string $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param string $definition_id The ID of the definition. (required) + * @param int $app_id The ID of the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException diff --git a/codegen/Automation/Actions/ApiException.php b/codegen/Automation/Actions/ApiException.php index 694ff71c7..ba5587292 100644 --- a/codegen/Automation/Actions/ApiException.php +++ b/codegen/Automation/Actions/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -49,7 +49,7 @@ class ApiException extends Exception /** * The HTTP header of the server response. * - * @var string[]|null + * @var string[][]|null */ protected $responseHeaders; @@ -65,7 +65,7 @@ class ApiException extends Exception * * @param string $message Error message * @param int $code HTTP status code - * @param string[]|null $responseHeaders HTTP response header + * @param string[][]|null $responseHeaders HTTP response header * @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string */ public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null) @@ -78,7 +78,7 @@ public function __construct($message = "", $code = 0, $responseHeaders = [], $re /** * Gets the HTTP response header * - * @return string[]|null HTTP response header + * @return string[][]|null HTTP response header */ public function getResponseHeaders() { diff --git a/codegen/Automation/Actions/Configuration.php b/codegen/Automation/Actions/Configuration.php index 212101fd3..66ed47045 100644 --- a/codegen/Automation/Actions/Configuration.php +++ b/codegen/Automation/Actions/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -486,7 +486,7 @@ public function getHostSettings() * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, $hostIndex, array $variables = null) + public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null) { if (null === $variables) { $variables = []; diff --git a/codegen/Automation/Actions/HeaderSelector.php b/codegen/Automation/Actions/HeaderSelector.php index f10e08dcd..18dc9de06 100644 --- a/codegen/Automation/Actions/HeaderSelector.php +++ b/codegen/Automation/Actions/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -85,7 +85,7 @@ private function selectAcceptHeader(array $accept): ?string } # If none of the available Accept headers is of type "json", then just use all them - $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); + $headersWithJson = $this->selectJsonMimeList($accept); if (count($headersWithJson) === 0) { return implode(',', $accept); } @@ -95,6 +95,34 @@ private function selectAcceptHeader(array $accept): ?string return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); } + /** + * Detects whether a string contains a valid JSON mime type + * + * @param string $searchString + * @return bool + */ + public function isJsonMime(string $searchString): bool + { + return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1; + } + + /** + * Select all items from a list containing a JSON mime type + * + * @param array $mimeList + * @return array + */ + private function selectJsonMimeList(array $mimeList): array { + $jsonMimeList = []; + foreach ($mimeList as $mime) { + if($this->isJsonMime($mime)) { + $jsonMimeList[] = $mime; + } + } + return $jsonMimeList; + } + + /** * Create an Accept header string from the given "Accept" headers array, recalculating all weights * diff --git a/codegen/Automation/Actions/Model/BatchInputCallbackCompletionBatchRequest.php b/codegen/Automation/Actions/Model/BatchInputCallbackCompletionBatchRequest.php index 9da6c34e7..f797bb74b 100644 --- a/codegen/Automation/Actions/Model/BatchInputCallbackCompletionBatchRequest.php +++ b/codegen/Automation/Actions/Model/BatchInputCallbackCompletionBatchRequest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('inputs', $data ?? [], null); } diff --git a/codegen/Automation/Actions/Model/CallbackCompletionBatchRequest.php b/codegen/Automation/Actions/Model/CallbackCompletionBatchRequest.php index 0dcdbdad1..a56bbf125 100644 --- a/codegen/Automation/Actions/Model/CallbackCompletionBatchRequest.php +++ b/codegen/Automation/Actions/Model/CallbackCompletionBatchRequest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('output_fields', $data ?? [], null); $this->setIfExists('callback_id', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/CallbackCompletionRequest.php b/codegen/Automation/Actions/Model/CallbackCompletionRequest.php index 7a4f5bef0..aaeb5b9ee 100644 --- a/codegen/Automation/Actions/Model/CallbackCompletionRequest.php +++ b/codegen/Automation/Actions/Model/CallbackCompletionRequest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('output_fields', $data ?? [], null); } diff --git a/codegen/Automation/Actions/Model/CollectionResponsePublicActionDefinitionForwardPaging.php b/codegen/Automation/Actions/Model/CollectionResponsePublicActionDefinitionForwardPaging.php index bf583fb80..0521dc193 100644 --- a/codegen/Automation/Actions/Model/CollectionResponsePublicActionDefinitionForwardPaging.php +++ b/codegen/Automation/Actions/Model/CollectionResponsePublicActionDefinitionForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('paging', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/CollectionResponsePublicActionFunctionIdentifierNoPaging.php b/codegen/Automation/Actions/Model/CollectionResponsePublicActionFunctionIdentifierNoPaging.php index 0772fb1b5..4a316536d 100644 --- a/codegen/Automation/Actions/Model/CollectionResponsePublicActionFunctionIdentifierNoPaging.php +++ b/codegen/Automation/Actions/Model/CollectionResponsePublicActionFunctionIdentifierNoPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('results', $data ?? [], null); } diff --git a/codegen/Automation/Actions/Model/CollectionResponsePublicActionRevisionForwardPaging.php b/codegen/Automation/Actions/Model/CollectionResponsePublicActionRevisionForwardPaging.php index 1a68f0281..2f31c11f8 100644 --- a/codegen/Automation/Actions/Model/CollectionResponsePublicActionRevisionForwardPaging.php +++ b/codegen/Automation/Actions/Model/CollectionResponsePublicActionRevisionForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('paging', $data ?? [], null); $this->setIfExists('results', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/Error.php b/codegen/Automation/Actions/Model/Error.php index 6a7099c28..20274b0a9 100644 --- a/codegen/Automation/Actions/Model/Error.php +++ b/codegen/Automation/Actions/Model/Error.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -275,10 +275,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('context', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/ErrorDetail.php b/codegen/Automation/Actions/Model/ErrorDetail.php index bd2ff5aba..a6d5e346c 100644 --- a/codegen/Automation/Actions/Model/ErrorDetail.php +++ b/codegen/Automation/Actions/Model/ErrorDetail.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -263,10 +263,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('sub_category', $data ?? [], null); $this->setIfExists('code', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/FieldTypeDefinition.php b/codegen/Automation/Actions/Model/FieldTypeDefinition.php index b341acb7a..e4fd99699 100644 --- a/codegen/Automation/Actions/Model/FieldTypeDefinition.php +++ b/codegen/Automation/Actions/Model/FieldTypeDefinition.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -692,10 +692,10 @@ public function getFieldTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('help_text', $data ?? [], null); $this->setIfExists('referenced_object_type', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/ForwardPaging.php b/codegen/Automation/Actions/Model/ForwardPaging.php index c63db1856..5f5c3defd 100644 --- a/codegen/Automation/Actions/Model/ForwardPaging.php +++ b/codegen/Automation/Actions/Model/ForwardPaging.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('next', $data ?? [], null); } diff --git a/codegen/Automation/Actions/Model/InputFieldDefinition.php b/codegen/Automation/Actions/Model/InputFieldDefinition.php index f7706328b..650c28533 100644 --- a/codegen/Automation/Actions/Model/InputFieldDefinition.php +++ b/codegen/Automation/Actions/Model/InputFieldDefinition.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -278,10 +278,10 @@ public function getSupportedValueTypesAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('is_required', $data ?? [], null); $this->setIfExists('automation_field_type', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/ModelInterface.php b/codegen/Automation/Actions/Model/ModelInterface.php index 90a218266..c49be9e69 100644 --- a/codegen/Automation/Actions/Model/ModelInterface.php +++ b/codegen/Automation/Actions/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** diff --git a/codegen/Automation/Actions/Model/NextPage.php b/codegen/Automation/Actions/Model/NextPage.php index b77f5a920..5739b86e7 100644 --- a/codegen/Automation/Actions/Model/NextPage.php +++ b/codegen/Automation/Actions/Model/NextPage.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('link', $data ?? [], null); $this->setIfExists('after', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/Option.php b/codegen/Automation/Actions/Model/Option.php index 4431c2987..90eba07ea 100644 --- a/codegen/Automation/Actions/Model/Option.php +++ b/codegen/Automation/Actions/Model/Option.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -275,10 +275,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('hidden', $data ?? [], null); $this->setIfExists('display_order', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/OutputFieldDefinition.php b/codegen/Automation/Actions/Model/OutputFieldDefinition.php index a8a47fd25..e527d3031 100644 --- a/codegen/Automation/Actions/Model/OutputFieldDefinition.php +++ b/codegen/Automation/Actions/Model/OutputFieldDefinition.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type_definition', $data ?? [], null); } diff --git a/codegen/Automation/Actions/Model/PublicActionDefinition.php b/codegen/Automation/Actions/Model/PublicActionDefinition.php index f6071e44d..8d5f5d062 100644 --- a/codegen/Automation/Actions/Model/PublicActionDefinition.php +++ b/codegen/Automation/Actions/Model/PublicActionDefinition.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -311,10 +311,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('functions', $data ?? [], null); $this->setIfExists('action_url', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/PublicActionDefinitionEgg.php b/codegen/Automation/Actions/Model/PublicActionDefinitionEgg.php index cd2bc4557..3c4a95826 100644 --- a/codegen/Automation/Actions/Model/PublicActionDefinitionEgg.php +++ b/codegen/Automation/Actions/Model/PublicActionDefinitionEgg.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -299,10 +299,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('input_fields', $data ?? [], null); $this->setIfExists('output_fields', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/PublicActionDefinitionInputFieldDependenciesInner.php b/codegen/Automation/Actions/Model/PublicActionDefinitionInputFieldDependenciesInner.php index bd707c374..1593d2a6e 100644 --- a/codegen/Automation/Actions/Model/PublicActionDefinitionInputFieldDependenciesInner.php +++ b/codegen/Automation/Actions/Model/PublicActionDefinitionInputFieldDependenciesInner.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -58,8 +58,8 @@ class PublicActionDefinitionInputFieldDependenciesInner implements ModelInterfac */ protected static $openAPITypes = [ 'dependency_type' => 'string', - 'dependent_field_names' => 'string[]', 'controlling_field_name' => 'string', + 'dependent_field_names' => 'string[]', 'controlling_field_value' => 'string' ]; @@ -72,8 +72,8 @@ class PublicActionDefinitionInputFieldDependenciesInner implements ModelInterfac */ protected static $openAPIFormats = [ 'dependency_type' => null, - 'dependent_field_names' => null, 'controlling_field_name' => null, + 'dependent_field_names' => null, 'controlling_field_value' => null ]; @@ -84,8 +84,8 @@ class PublicActionDefinitionInputFieldDependenciesInner implements ModelInterfac */ protected static array $openAPINullables = [ 'dependency_type' => false, - 'dependent_field_names' => false, 'controlling_field_name' => false, + 'dependent_field_names' => false, 'controlling_field_value' => false ]; @@ -176,8 +176,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'dependency_type' => 'dependencyType', - 'dependent_field_names' => 'dependentFieldNames', 'controlling_field_name' => 'controllingFieldName', + 'dependent_field_names' => 'dependentFieldNames', 'controlling_field_value' => 'controllingFieldValue' ]; @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'dependency_type' => 'setDependencyType', - 'dependent_field_names' => 'setDependentFieldNames', 'controlling_field_name' => 'setControllingFieldName', + 'dependent_field_names' => 'setDependentFieldNames', 'controlling_field_value' => 'setControllingFieldValue' ]; @@ -200,8 +200,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'dependency_type' => 'getDependencyType', - 'dependent_field_names' => 'getDependentFieldNames', 'controlling_field_name' => 'getControllingFieldName', + 'dependent_field_names' => 'getDependentFieldNames', 'controlling_field_value' => 'getControllingFieldValue' ]; @@ -270,14 +270,14 @@ public function getDependencyTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('dependency_type', $data ?? [], 'CONDITIONAL_SINGLE_FIELD'); - $this->setIfExists('dependent_field_names', $data ?? [], null); $this->setIfExists('controlling_field_name', $data ?? [], null); + $this->setIfExists('dependent_field_names', $data ?? [], null); $this->setIfExists('controlling_field_value', $data ?? [], null); } @@ -320,12 +320,12 @@ public function listInvalidProperties() ); } - if ($this->container['dependent_field_names'] === null) { - $invalidProperties[] = "'dependent_field_names' can't be null"; - } if ($this->container['controlling_field_name'] === null) { $invalidProperties[] = "'controlling_field_name' can't be null"; } + if ($this->container['dependent_field_names'] === null) { + $invalidProperties[] = "'dependent_field_names' can't be null"; + } if ($this->container['controlling_field_value'] === null) { $invalidProperties[] = "'controlling_field_value' can't be null"; } @@ -382,55 +382,55 @@ public function setDependencyType($dependency_type) } /** - * Gets dependent_field_names + * Gets controlling_field_name * - * @return string[] + * @return string */ - public function getDependentFieldNames() + public function getControllingFieldName() { - return $this->container['dependent_field_names']; + return $this->container['controlling_field_name']; } /** - * Sets dependent_field_names + * Sets controlling_field_name * - * @param string[] $dependent_field_names dependent_field_names + * @param string $controlling_field_name controlling_field_name * * @return self */ - public function setDependentFieldNames($dependent_field_names) + public function setControllingFieldName($controlling_field_name) { - if (is_null($dependent_field_names)) { - throw new \InvalidArgumentException('non-nullable dependent_field_names cannot be null'); + if (is_null($controlling_field_name)) { + throw new \InvalidArgumentException('non-nullable controlling_field_name cannot be null'); } - $this->container['dependent_field_names'] = $dependent_field_names; + $this->container['controlling_field_name'] = $controlling_field_name; return $this; } /** - * Gets controlling_field_name + * Gets dependent_field_names * - * @return string + * @return string[] */ - public function getControllingFieldName() + public function getDependentFieldNames() { - return $this->container['controlling_field_name']; + return $this->container['dependent_field_names']; } /** - * Sets controlling_field_name + * Sets dependent_field_names * - * @param string $controlling_field_name controlling_field_name + * @param string[] $dependent_field_names dependent_field_names * * @return self */ - public function setControllingFieldName($controlling_field_name) + public function setDependentFieldNames($dependent_field_names) { - if (is_null($controlling_field_name)) { - throw new \InvalidArgumentException('non-nullable controlling_field_name cannot be null'); + if (is_null($dependent_field_names)) { + throw new \InvalidArgumentException('non-nullable dependent_field_names cannot be null'); } - $this->container['controlling_field_name'] = $controlling_field_name; + $this->container['dependent_field_names'] = $dependent_field_names; return $this; } diff --git a/codegen/Automation/Actions/Model/PublicActionDefinitionPatch.php b/codegen/Automation/Actions/Model/PublicActionDefinitionPatch.php index e31547ca8..57679d5a4 100644 --- a/codegen/Automation/Actions/Model/PublicActionDefinitionPatch.php +++ b/codegen/Automation/Actions/Model/PublicActionDefinitionPatch.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('input_fields', $data ?? [], null); $this->setIfExists('output_fields', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/PublicActionFunction.php b/codegen/Automation/Actions/Model/PublicActionFunction.php index dbd598233..160afce52 100644 --- a/codegen/Automation/Actions/Model/PublicActionFunction.php +++ b/codegen/Automation/Actions/Model/PublicActionFunction.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -270,10 +270,10 @@ public function getFunctionTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('function_source', $data ?? [], null); $this->setIfExists('function_type', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/PublicActionFunctionIdentifier.php b/codegen/Automation/Actions/Model/PublicActionFunctionIdentifier.php index d4e026429..4e372689a 100644 --- a/codegen/Automation/Actions/Model/PublicActionFunctionIdentifier.php +++ b/codegen/Automation/Actions/Model/PublicActionFunctionIdentifier.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -264,10 +264,10 @@ public function getFunctionTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('function_type', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/PublicActionLabels.php b/codegen/Automation/Actions/Model/PublicActionLabels.php index ee185db8e..7684f9243 100644 --- a/codegen/Automation/Actions/Model/PublicActionLabels.php +++ b/codegen/Automation/Actions/Model/PublicActionLabels.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -287,10 +287,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('input_field_descriptions', $data ?? [], null); $this->setIfExists('app_display_name', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/PublicActionRevision.php b/codegen/Automation/Actions/Model/PublicActionRevision.php index 554fc3613..ff895e9c0 100644 --- a/codegen/Automation/Actions/Model/PublicActionRevision.php +++ b/codegen/Automation/Actions/Model/PublicActionRevision.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -257,10 +257,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('revision_id', $data ?? [], null); $this->setIfExists('created_at', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/PublicConditionalSingleFieldDependency.php b/codegen/Automation/Actions/Model/PublicConditionalSingleFieldDependency.php index 49624ba93..785332b78 100644 --- a/codegen/Automation/Actions/Model/PublicConditionalSingleFieldDependency.php +++ b/codegen/Automation/Actions/Model/PublicConditionalSingleFieldDependency.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -58,9 +58,9 @@ class PublicConditionalSingleFieldDependency implements ModelInterface, ArrayAcc */ protected static $openAPITypes = [ 'dependency_type' => 'string', - 'dependent_field_names' => 'string[]', 'controlling_field_name' => 'string', - 'controlling_field_value' => 'string' + 'controlling_field_value' => 'string', + 'dependent_field_names' => 'string[]' ]; /** @@ -72,9 +72,9 @@ class PublicConditionalSingleFieldDependency implements ModelInterface, ArrayAcc */ protected static $openAPIFormats = [ 'dependency_type' => null, - 'dependent_field_names' => null, 'controlling_field_name' => null, - 'controlling_field_value' => null + 'controlling_field_value' => null, + 'dependent_field_names' => null ]; /** @@ -84,9 +84,9 @@ class PublicConditionalSingleFieldDependency implements ModelInterface, ArrayAcc */ protected static array $openAPINullables = [ 'dependency_type' => false, - 'dependent_field_names' => false, 'controlling_field_name' => false, - 'controlling_field_value' => false + 'controlling_field_value' => false, + 'dependent_field_names' => false ]; /** @@ -176,9 +176,9 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'dependency_type' => 'dependencyType', - 'dependent_field_names' => 'dependentFieldNames', 'controlling_field_name' => 'controllingFieldName', - 'controlling_field_value' => 'controllingFieldValue' + 'controlling_field_value' => 'controllingFieldValue', + 'dependent_field_names' => 'dependentFieldNames' ]; /** @@ -188,9 +188,9 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'dependency_type' => 'setDependencyType', - 'dependent_field_names' => 'setDependentFieldNames', 'controlling_field_name' => 'setControllingFieldName', - 'controlling_field_value' => 'setControllingFieldValue' + 'controlling_field_value' => 'setControllingFieldValue', + 'dependent_field_names' => 'setDependentFieldNames' ]; /** @@ -200,9 +200,9 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'dependency_type' => 'getDependencyType', - 'dependent_field_names' => 'getDependentFieldNames', 'controlling_field_name' => 'getControllingFieldName', - 'controlling_field_value' => 'getControllingFieldValue' + 'controlling_field_value' => 'getControllingFieldValue', + 'dependent_field_names' => 'getDependentFieldNames' ]; /** @@ -270,15 +270,15 @@ public function getDependencyTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('dependency_type', $data ?? [], 'CONDITIONAL_SINGLE_FIELD'); - $this->setIfExists('dependent_field_names', $data ?? [], null); $this->setIfExists('controlling_field_name', $data ?? [], null); $this->setIfExists('controlling_field_value', $data ?? [], null); + $this->setIfExists('dependent_field_names', $data ?? [], null); } /** @@ -320,15 +320,15 @@ public function listInvalidProperties() ); } - if ($this->container['dependent_field_names'] === null) { - $invalidProperties[] = "'dependent_field_names' can't be null"; - } if ($this->container['controlling_field_name'] === null) { $invalidProperties[] = "'controlling_field_name' can't be null"; } if ($this->container['controlling_field_value'] === null) { $invalidProperties[] = "'controlling_field_value' can't be null"; } + if ($this->container['dependent_field_names'] === null) { + $invalidProperties[] = "'dependent_field_names' can't be null"; + } return $invalidProperties; } @@ -381,33 +381,6 @@ public function setDependencyType($dependency_type) return $this; } - /** - * Gets dependent_field_names - * - * @return string[] - */ - public function getDependentFieldNames() - { - return $this->container['dependent_field_names']; - } - - /** - * Sets dependent_field_names - * - * @param string[] $dependent_field_names dependent_field_names - * - * @return self - */ - public function setDependentFieldNames($dependent_field_names) - { - if (is_null($dependent_field_names)) { - throw new \InvalidArgumentException('non-nullable dependent_field_names cannot be null'); - } - $this->container['dependent_field_names'] = $dependent_field_names; - - return $this; - } - /** * Gets controlling_field_name * @@ -461,6 +434,33 @@ public function setControllingFieldValue($controlling_field_value) return $this; } + + /** + * Gets dependent_field_names + * + * @return string[] + */ + public function getDependentFieldNames() + { + return $this->container['dependent_field_names']; + } + + /** + * Sets dependent_field_names + * + * @param string[] $dependent_field_names dependent_field_names + * + * @return self + */ + public function setDependentFieldNames($dependent_field_names) + { + if (is_null($dependent_field_names)) { + throw new \InvalidArgumentException('non-nullable dependent_field_names cannot be null'); + } + $this->container['dependent_field_names'] = $dependent_field_names; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Automation/Actions/Model/PublicExecutionTranslationRule.php b/codegen/Automation/Actions/Model/PublicExecutionTranslationRule.php index d0a6a882c..b7aca9571 100644 --- a/codegen/Automation/Actions/Model/PublicExecutionTranslationRule.php +++ b/codegen/Automation/Actions/Model/PublicExecutionTranslationRule.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -245,10 +245,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('label_name', $data ?? [], null); $this->setIfExists('conditions', $data ?? [], null); diff --git a/codegen/Automation/Actions/Model/PublicObjectRequestOptions.php b/codegen/Automation/Actions/Model/PublicObjectRequestOptions.php index 69ace5931..a1b38e53c 100644 --- a/codegen/Automation/Actions/Model/PublicObjectRequestOptions.php +++ b/codegen/Automation/Actions/Model/PublicObjectRequestOptions.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -239,10 +239,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('properties', $data ?? [], null); } diff --git a/codegen/Automation/Actions/Model/PublicSingleFieldDependency.php b/codegen/Automation/Actions/Model/PublicSingleFieldDependency.php index b9ac6af1c..5839066aa 100644 --- a/codegen/Automation/Actions/Model/PublicSingleFieldDependency.php +++ b/codegen/Automation/Actions/Model/PublicSingleFieldDependency.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -58,8 +58,8 @@ class PublicSingleFieldDependency implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPITypes = [ 'dependency_type' => 'string', - 'dependent_field_names' => 'string[]', - 'controlling_field_name' => 'string' + 'controlling_field_name' => 'string', + 'dependent_field_names' => 'string[]' ]; /** @@ -71,8 +71,8 @@ class PublicSingleFieldDependency implements ModelInterface, ArrayAccess, \JsonS */ protected static $openAPIFormats = [ 'dependency_type' => null, - 'dependent_field_names' => null, - 'controlling_field_name' => null + 'controlling_field_name' => null, + 'dependent_field_names' => null ]; /** @@ -82,8 +82,8 @@ class PublicSingleFieldDependency implements ModelInterface, ArrayAccess, \JsonS */ protected static array $openAPINullables = [ 'dependency_type' => false, - 'dependent_field_names' => false, - 'controlling_field_name' => false + 'controlling_field_name' => false, + 'dependent_field_names' => false ]; /** @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'dependency_type' => 'dependencyType', - 'dependent_field_names' => 'dependentFieldNames', - 'controlling_field_name' => 'controllingFieldName' + 'controlling_field_name' => 'controllingFieldName', + 'dependent_field_names' => 'dependentFieldNames' ]; /** @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'dependency_type' => 'setDependencyType', - 'dependent_field_names' => 'setDependentFieldNames', - 'controlling_field_name' => 'setControllingFieldName' + 'controlling_field_name' => 'setControllingFieldName', + 'dependent_field_names' => 'setDependentFieldNames' ]; /** @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'dependency_type' => 'getDependencyType', - 'dependent_field_names' => 'getDependentFieldNames', - 'controlling_field_name' => 'getControllingFieldName' + 'controlling_field_name' => 'getControllingFieldName', + 'dependent_field_names' => 'getDependentFieldNames' ]; /** @@ -264,14 +264,14 @@ public function getDependencyTypeAllowableValues() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[]|null $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('dependency_type', $data ?? [], 'SINGLE_FIELD'); - $this->setIfExists('dependent_field_names', $data ?? [], null); $this->setIfExists('controlling_field_name', $data ?? [], null); + $this->setIfExists('dependent_field_names', $data ?? [], null); } /** @@ -313,12 +313,12 @@ public function listInvalidProperties() ); } - if ($this->container['dependent_field_names'] === null) { - $invalidProperties[] = "'dependent_field_names' can't be null"; - } if ($this->container['controlling_field_name'] === null) { $invalidProperties[] = "'controlling_field_name' can't be null"; } + if ($this->container['dependent_field_names'] === null) { + $invalidProperties[] = "'dependent_field_names' can't be null"; + } return $invalidProperties; } @@ -372,55 +372,55 @@ public function setDependencyType($dependency_type) } /** - * Gets dependent_field_names + * Gets controlling_field_name * - * @return string[] + * @return string */ - public function getDependentFieldNames() + public function getControllingFieldName() { - return $this->container['dependent_field_names']; + return $this->container['controlling_field_name']; } /** - * Sets dependent_field_names + * Sets controlling_field_name * - * @param string[] $dependent_field_names dependent_field_names + * @param string $controlling_field_name controlling_field_name * * @return self */ - public function setDependentFieldNames($dependent_field_names) + public function setControllingFieldName($controlling_field_name) { - if (is_null($dependent_field_names)) { - throw new \InvalidArgumentException('non-nullable dependent_field_names cannot be null'); + if (is_null($controlling_field_name)) { + throw new \InvalidArgumentException('non-nullable controlling_field_name cannot be null'); } - $this->container['dependent_field_names'] = $dependent_field_names; + $this->container['controlling_field_name'] = $controlling_field_name; return $this; } /** - * Gets controlling_field_name + * Gets dependent_field_names * - * @return string + * @return string[] */ - public function getControllingFieldName() + public function getDependentFieldNames() { - return $this->container['controlling_field_name']; + return $this->container['dependent_field_names']; } /** - * Sets controlling_field_name + * Sets dependent_field_names * - * @param string $controlling_field_name controlling_field_name + * @param string[] $dependent_field_names dependent_field_names * * @return self */ - public function setControllingFieldName($controlling_field_name) + public function setDependentFieldNames($dependent_field_names) { - if (is_null($controlling_field_name)) { - throw new \InvalidArgumentException('non-nullable controlling_field_name cannot be null'); + if (is_null($dependent_field_names)) { + throw new \InvalidArgumentException('non-nullable dependent_field_names cannot be null'); } - $this->container['controlling_field_name'] = $controlling_field_name; + $this->container['dependent_field_names'] = $dependent_field_names; return $this; } diff --git a/codegen/Automation/Actions/ObjectSerializer.php b/codegen/Automation/Actions/ObjectSerializer.php index 75f9de691..277ae0fc1 100644 --- a/codegen/Automation/Actions/ObjectSerializer.php +++ b/codegen/Automation/Actions/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: v4 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.3.0 + * Generator version: 7.12.0 */ /** @@ -58,8 +58,8 @@ public static function setDateTimeFormat($format) * Serialize data * * @param mixed $data the data to serialize - * @param string $type the OpenAPIToolsType of the data - * @param string $format the format of the OpenAPITools type of the data + * @param string|null $type the OpenAPIToolsType of the data + * @param string|null $format the format of the OpenAPITools type of the data * * @return scalar|object|array|null serialized form of $data */ @@ -194,6 +194,10 @@ private static function isEmptyValue($value, string $openApiType): bool case 'boolean': return !in_array($value, [false, 0], true); + # For string values, '' is considered empty. + case 'string': + return $value === ''; + # For all the other types, any value at this point can be considered empty. default: return true; @@ -265,6 +269,11 @@ public static function toQueryValue( $value = $flattenArray($value, $paramName); + // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values + if ($openApiType === 'array' && $style === 'deepObject' && $explode) { + return $value; + } + if ($openApiType === 'object' && ($style === 'deepObject' || $explode)) { return $value; } @@ -338,7 +347,7 @@ public static function toFormValue($value) * If it's a datetime object, format it in ISO8601 * If it's a boolean, convert it to "true" or "false". * - * @param string|bool|\DateTime $value the value of the parameter + * @param float|int|bool|\DateTime $value the value of the parameter * * @return string the header string */ @@ -395,8 +404,7 @@ public static function serializeCollection(array $collection, $style, $allowColl * * @param mixed $data object or primitive to be deserialized * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used + * @param string[]|null $httpHeaders HTTP headers * * @return object|array|null a single or an array of $class instances */ @@ -473,7 +481,7 @@ public static function deserialize($data, $class, $httpHeaders = null) // determine file name if ( is_array($httpHeaders) - && array_key_exists('Content-Disposition', $httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); @@ -546,22 +554,64 @@ public static function deserialize($data, $class, $httpHeaders = null) } /** - * Native `http_build_query` wrapper. - * @see https://www.php.net/manual/en/function.http-build-query - * - * @param array|object $data May be an array or object containing properties. - * @param string $numeric_prefix If numeric indices are used in the base array and this parameter is provided, it will be prepended to the numeric index for elements in the base array only. - * @param string|null $arg_separator arg_separator.output is used to separate arguments but may be overridden by specifying this parameter. - * @param int $encoding_type Encoding type. By default, PHP_QUERY_RFC1738. - * - * @return string - */ - public static function buildQuery( - $data, - string $numeric_prefix = '', - ?string $arg_separator = null, - int $encoding_type = \PHP_QUERY_RFC3986 - ): string { - return \GuzzleHttp\Psr7\Query::build($data, $encoding_type); + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * The function is copied from https://github.com/guzzle/psr7/blob/a243f80a1ca7fe8ceed4deee17f12c1930efe662/src/Query.php#L59-L112 + * with a modification which is described in https://github.com/guzzle/psr7/pull/603 + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + */ + public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): string + { + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function (string $str): string { + return $str; + }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $castBool = Configuration::BOOLEAN_FORMAT_INT == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString() + ? function ($v) { return (int) $v; } + : function ($v) { return $v ? 'true' : 'false'; }; + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder((string) $k); + if (!is_array($v)) { + $qs .= $k; + $v = is_bool($v) ? $castBool($v) : $v; + if ($v !== null) { + $qs .= '='.$encoder((string) $v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + $vv = is_bool($vv) ? $castBool($vv) : $vv; + if ($vv !== null) { + $qs .= '='.$encoder((string) $vv); + } + $qs .= '&'; + } + } + } + + return $qs ? (string) substr($qs, 0, -1) : ''; } }