diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 850c3bf..76bdf9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: uses: php-actions/composer@v6 - name: Test - Start Compose - run: docker-compose up -d + run: docker compose up -d working-directory: tests - name: Test - RUN @@ -34,5 +34,5 @@ jobs: - name: Test - Cleanup if: always() - run: docker-compose down + run: docker compose down working-directory: tests diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 276be79..4f21b3b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -4,14 +4,13 @@ composer.json lib/Api/AppsApi.php lib/Api/AssetsApi.php lib/Api/BackupsApi.php -lib/Api/CommentsApi.php lib/Api/ContentsApi.php lib/Api/DiagnosticsApi.php lib/Api/EventConsumersApi.php lib/Api/HistoryApi.php +lib/Api/JobsApi.php lib/Api/LanguagesApi.php lib/Api/NewsApi.php -lib/Api/NotificationsApi.php lib/Api/PingApi.php lib/Api/PlansApi.php lib/Api/RulesApi.php @@ -40,7 +39,6 @@ lib/Model/AppLanguagesDto.php lib/Model/AppSettingsDto.php lib/Model/ArrayCalculatedDefaultValue.php lib/Model/ArrayFieldPropertiesDto.php -lib/Model/AskDto.php lib/Model/AssetChangedRuleTriggerDto.php lib/Model/AssetDto.php lib/Model/AssetFolderDto.php @@ -53,6 +51,9 @@ lib/Model/AssetType.php lib/Model/AssetsDto.php lib/Model/AssetsFieldPropertiesDto.php lib/Model/AssignContributorDto.php +lib/Model/AuthSchemeDto.php +lib/Model/AuthSchemeResponseDto.php +lib/Model/AuthSchemeValueDto.php lib/Model/AzureQueueRuleActionDto.php lib/Model/BackupJobDto.php lib/Model/BackupJobsDto.php @@ -72,10 +73,8 @@ lib/Model/ChangePlanDto.php lib/Model/ChangeStatusDto.php lib/Model/ClientDto.php lib/Model/ClientsDto.php -lib/Model/CommentDto.php lib/Model/CommentRuleActionDto.php lib/Model/CommentRuleTriggerDto.php -lib/Model/CommentsDto.php lib/Model/ComponentFieldPropertiesDto.php lib/Model/ComponentsFieldPropertiesDto.php lib/Model/ConfigureFieldRulesDto.php @@ -98,7 +97,6 @@ lib/Model/CurrentStorageDto.php lib/Model/DateTimeCalculatedDefaultValue.php lib/Model/DateTimeFieldEditor.php lib/Model/DateTimeFieldPropertiesDto.php -lib/Model/DeepDetectRuleActionDto.php lib/Model/DiscourseRuleActionDto.php lib/Model/EditorDto.php lib/Model/ElasticSearchRuleActionDto.php @@ -118,7 +116,10 @@ lib/Model/GeolocationFieldPropertiesDto.php lib/Model/HistoryEventDto.php lib/Model/ImageFormat.php lib/Model/ImportContentsDto.php +lib/Model/JobDto.php +lib/Model/JobLogMessageDto.php lib/Model/JobStatus.php +lib/Model/JobsDto.php lib/Model/JsonFieldPropertiesDto.php lib/Model/LanguageDto.php lib/Model/LogDownloadDto.php @@ -152,6 +153,7 @@ lib/Model/ResourceLink.php lib/Model/ResourcesDto.php lib/Model/RestoreJobDto.php lib/Model/RestoreRequestDto.php +lib/Model/RichTextFieldPropertiesDto.php lib/Model/RoleDto.php lib/Model/RolesDto.php lib/Model/RuleActionDto.php @@ -217,7 +219,6 @@ lib/Model/UpdateSettingDto.php lib/Model/UpdateTeamDto.php lib/Model/UpdateUserDto.php lib/Model/UpdateWorkflowDto.php -lib/Model/UpsertCommentDto.php lib/Model/UpsertSchemaDto.php lib/Model/UpsertSchemaFieldDto.php lib/Model/UpsertSchemaNestedFieldDto.php diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 44bad91..09a6d30 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.1-SNAPSHOT \ No newline at end of file +7.8.0 diff --git a/README.md b/README.md index 50172c5..f6b6830 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,19 @@ try { } ``` +## Generation Config + +To generate the config you have to execute the following steps. + +1. Run a Squidex version locally. +2. Run the `/api/docs` URL to get the OpenAPI spec. +3. Copy the OpenAPI spec to this repository. +4. Run the generator: + +``` +docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/openapi.json -g php --template-dir /local/templates -o /local/ -c /local/openapi-config.yml +``` + ## Contributing While we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us! diff --git a/lib/Api/AppsApi.php b/lib/Api/AppsApi.php index fb7b340..1cf9992 100644 --- a/lib/Api/AppsApi.php +++ b/lib/Api/AppsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -226,16 +226,15 @@ public function getConfig() * * Get the app asset scripts. * - * @param string $app The name of the app to get the asset scripts for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetScripts'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetScriptsDto|\Squidex\Client\Model\ErrorDto */ - public function getAssetScripts($app, string $contentType = self::contentTypes['getAssetScripts'][0]) + public function getAssetScripts(string $contentType = self::contentTypes['getAssetScripts'][0]) { - list($response) = $this->getAssetScriptsWithHttpInfo($app, $contentType); + list($response) = $this->getAssetScriptsWithHttpInfo($contentType); return $response; } @@ -244,16 +243,15 @@ public function getAssetScripts($app, string $contentType = self::contentTypes[' * * Get the app asset scripts. * - * @param string $app The name of the app to get the asset scripts for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetScripts'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetScriptsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAssetScriptsWithHttpInfo($app, string $contentType = self::contentTypes['getAssetScripts'][0]) + public function getAssetScriptsWithHttpInfo(string $contentType = self::contentTypes['getAssetScripts'][0]) { - $request = $this->getAssetScriptsRequest($app, $contentType); + $request = $this->getAssetScriptsRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -367,15 +365,14 @@ public function getAssetScriptsWithHttpInfo($app, string $contentType = self::co * * Get the app asset scripts. * - * @param string $app The name of the app to get the asset scripts for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetScripts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetScriptsAsync($app, string $contentType = self::contentTypes['getAssetScripts'][0]) + public function getAssetScriptsAsync(string $contentType = self::contentTypes['getAssetScripts'][0]) { - return $this->getAssetScriptsAsyncWithHttpInfo($app, $contentType) + return $this->getAssetScriptsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -388,16 +385,15 @@ function ($response) { * * Get the app asset scripts. * - * @param string $app The name of the app to get the asset scripts for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetScripts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetScriptsAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getAssetScripts'][0]) + public function getAssetScriptsAsyncWithHttpInfo(string $contentType = self::contentTypes['getAssetScripts'][0]) { $returnType = '\Squidex\Client\Model\AssetScriptsDto'; - $request = $this->getAssetScriptsRequest($app, $contentType); + $request = $this->getAssetScriptsRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -438,16 +434,16 @@ function ($exception) { /** * Create request for operation 'getAssetScripts' * - * @param string $app The name of the app to get the asset scripts for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetScripts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAssetScriptsRequest($app, string $contentType = self::contentTypes['getAssetScripts'][0]) + public function getAssetScriptsRequest(string $contentType = self::contentTypes['getAssetScripts'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -530,9 +526,8 @@ public function getAssetScriptsRequest($app, string $contentType = self::content /** * Operation putAssetScripts * - * Update the app asset scripts. + * Update the asset scripts. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAssetScriptsDto $update_asset_scripts_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetScripts'] to see the possible values for this operation * @@ -540,18 +535,17 @@ public function getAssetScriptsRequest($app, string $contentType = self::content * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetScriptsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putAssetScripts($app, $update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) + public function putAssetScripts($update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) { - list($response) = $this->putAssetScriptsWithHttpInfo($app, $update_asset_scripts_dto, $contentType); + list($response) = $this->putAssetScriptsWithHttpInfo($update_asset_scripts_dto, $contentType); return $response; } /** * Operation putAssetScriptsWithHttpInfo * - * Update the app asset scripts. + * Update the asset scripts. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAssetScriptsDto $update_asset_scripts_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetScripts'] to see the possible values for this operation * @@ -559,9 +553,9 @@ public function putAssetScripts($app, $update_asset_scripts_dto, string $content * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetScriptsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putAssetScriptsWithHttpInfo($app, $update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) + public function putAssetScriptsWithHttpInfo($update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) { - $request = $this->putAssetScriptsRequest($app, $update_asset_scripts_dto, $contentType); + $request = $this->putAssetScriptsRequest($update_asset_scripts_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -696,18 +690,17 @@ public function putAssetScriptsWithHttpInfo($app, $update_asset_scripts_dto, str /** * Operation putAssetScriptsAsync * - * Update the app asset scripts. + * Update the asset scripts. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAssetScriptsDto $update_asset_scripts_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetScripts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetScriptsAsync($app, $update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) + public function putAssetScriptsAsync($update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) { - return $this->putAssetScriptsAsyncWithHttpInfo($app, $update_asset_scripts_dto, $contentType) + return $this->putAssetScriptsAsyncWithHttpInfo($update_asset_scripts_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -718,19 +711,18 @@ function ($response) { /** * Operation putAssetScriptsAsyncWithHttpInfo * - * Update the app asset scripts. + * Update the asset scripts. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAssetScriptsDto $update_asset_scripts_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetScripts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetScriptsAsyncWithHttpInfo($app, $update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) + public function putAssetScriptsAsyncWithHttpInfo($update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) { $returnType = '\Squidex\Client\Model\AssetScriptsDto'; - $request = $this->putAssetScriptsRequest($app, $update_asset_scripts_dto, $contentType); + $request = $this->putAssetScriptsRequest($update_asset_scripts_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -771,17 +763,17 @@ function ($exception) { /** * Create request for operation 'putAssetScripts' * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAssetScriptsDto $update_asset_scripts_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetScripts'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putAssetScriptsRequest($app, $update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) + public function putAssetScriptsRequest($update_asset_scripts_dto, string $contentType = self::contentTypes['putAssetScripts'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -880,7 +872,6 @@ public function putAssetScriptsRequest($app, $update_asset_scripts_dto, string $ * * Revoke an app client. * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteClient'] to see the possible values for this operation * @@ -888,9 +879,9 @@ public function putAssetScriptsRequest($app, $update_asset_scripts_dto, string $ * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ClientsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteClient($app, $id, string $contentType = self::contentTypes['deleteClient'][0]) + public function deleteClient($id, string $contentType = self::contentTypes['deleteClient'][0]) { - list($response) = $this->deleteClientWithHttpInfo($app, $id, $contentType); + list($response) = $this->deleteClientWithHttpInfo($id, $contentType); return $response; } @@ -899,7 +890,6 @@ public function deleteClient($app, $id, string $contentType = self::contentTypes * * Revoke an app client. * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteClient'] to see the possible values for this operation * @@ -907,9 +897,9 @@ public function deleteClient($app, $id, string $contentType = self::contentTypes * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ClientsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteClientWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteClient'][0]) + public function deleteClientWithHttpInfo($id, string $contentType = self::contentTypes['deleteClient'][0]) { - $request = $this->deleteClientRequest($app, $id, $contentType); + $request = $this->deleteClientRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1046,16 +1036,15 @@ public function deleteClientWithHttpInfo($app, $id, string $contentType = self:: * * Revoke an app client. * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteClientAsync($app, $id, string $contentType = self::contentTypes['deleteClient'][0]) + public function deleteClientAsync($id, string $contentType = self::contentTypes['deleteClient'][0]) { - return $this->deleteClientAsyncWithHttpInfo($app, $id, $contentType) + return $this->deleteClientAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -1068,17 +1057,16 @@ function ($response) { * * Revoke an app client. * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteClientAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteClient'][0]) + public function deleteClientAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteClient'][0]) { $returnType = '\Squidex\Client\Model\ClientsDto'; - $request = $this->deleteClientRequest($app, $id, $contentType); + $request = $this->deleteClientRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1119,17 +1107,17 @@ function ($exception) { /** * Create request for operation 'deleteClient' * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteClientRequest($app, $id, string $contentType = self::contentTypes['deleteClient'][0]) + public function deleteClientRequest($id, string $contentType = self::contentTypes['deleteClient'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1229,16 +1217,15 @@ public function deleteClientRequest($app, $id, string $contentType = self::conte * * Get app clients. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getClients'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ClientsDto|\Squidex\Client\Model\ErrorDto */ - public function getClients($app, string $contentType = self::contentTypes['getClients'][0]) + public function getClients(string $contentType = self::contentTypes['getClients'][0]) { - list($response) = $this->getClientsWithHttpInfo($app, $contentType); + list($response) = $this->getClientsWithHttpInfo($contentType); return $response; } @@ -1247,16 +1234,15 @@ public function getClients($app, string $contentType = self::contentTypes['getCl * * Get app clients. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getClients'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ClientsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getClientsWithHttpInfo($app, string $contentType = self::contentTypes['getClients'][0]) + public function getClientsWithHttpInfo(string $contentType = self::contentTypes['getClients'][0]) { - $request = $this->getClientsRequest($app, $contentType); + $request = $this->getClientsRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -1370,15 +1356,14 @@ public function getClientsWithHttpInfo($app, string $contentType = self::content * * Get app clients. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getClients'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getClientsAsync($app, string $contentType = self::contentTypes['getClients'][0]) + public function getClientsAsync(string $contentType = self::contentTypes['getClients'][0]) { - return $this->getClientsAsyncWithHttpInfo($app, $contentType) + return $this->getClientsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -1391,16 +1376,15 @@ function ($response) { * * Get app clients. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getClients'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getClientsAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getClients'][0]) + public function getClientsAsyncWithHttpInfo(string $contentType = self::contentTypes['getClients'][0]) { $returnType = '\Squidex\Client\Model\ClientsDto'; - $request = $this->getClientsRequest($app, $contentType); + $request = $this->getClientsRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1441,16 +1425,16 @@ function ($exception) { /** * Create request for operation 'getClients' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getClients'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getClientsRequest($app, string $contentType = self::contentTypes['getClients'][0]) + public function getClientsRequest(string $contentType = self::contentTypes['getClients'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1535,7 +1519,6 @@ public function getClientsRequest($app, string $contentType = self::contentTypes * * Create a new app client. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateClientDto $create_client_dto Client object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postClient'] to see the possible values for this operation * @@ -1543,9 +1526,9 @@ public function getClientsRequest($app, string $contentType = self::contentTypes * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ClientsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postClient($app, $create_client_dto, string $contentType = self::contentTypes['postClient'][0]) + public function postClient($create_client_dto, string $contentType = self::contentTypes['postClient'][0]) { - list($response) = $this->postClientWithHttpInfo($app, $create_client_dto, $contentType); + list($response) = $this->postClientWithHttpInfo($create_client_dto, $contentType); return $response; } @@ -1554,7 +1537,6 @@ public function postClient($app, $create_client_dto, string $contentType = self: * * Create a new app client. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateClientDto $create_client_dto Client object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postClient'] to see the possible values for this operation * @@ -1562,9 +1544,9 @@ public function postClient($app, $create_client_dto, string $contentType = self: * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ClientsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postClientWithHttpInfo($app, $create_client_dto, string $contentType = self::contentTypes['postClient'][0]) + public function postClientWithHttpInfo($create_client_dto, string $contentType = self::contentTypes['postClient'][0]) { - $request = $this->postClientRequest($app, $create_client_dto, $contentType); + $request = $this->postClientRequest($create_client_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -1701,16 +1683,15 @@ public function postClientWithHttpInfo($app, $create_client_dto, string $content * * Create a new app client. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateClientDto $create_client_dto Client object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postClientAsync($app, $create_client_dto, string $contentType = self::contentTypes['postClient'][0]) + public function postClientAsync($create_client_dto, string $contentType = self::contentTypes['postClient'][0]) { - return $this->postClientAsyncWithHttpInfo($app, $create_client_dto, $contentType) + return $this->postClientAsyncWithHttpInfo($create_client_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -1723,17 +1704,16 @@ function ($response) { * * Create a new app client. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateClientDto $create_client_dto Client object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postClientAsyncWithHttpInfo($app, $create_client_dto, string $contentType = self::contentTypes['postClient'][0]) + public function postClientAsyncWithHttpInfo($create_client_dto, string $contentType = self::contentTypes['postClient'][0]) { $returnType = '\Squidex\Client\Model\ClientsDto'; - $request = $this->postClientRequest($app, $create_client_dto, $contentType); + $request = $this->postClientRequest($create_client_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1774,17 +1754,17 @@ function ($exception) { /** * Create request for operation 'postClient' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateClientDto $create_client_dto Client object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postClient'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postClientRequest($app, $create_client_dto, string $contentType = self::contentTypes['postClient'][0]) + public function postClientRequest($create_client_dto, string $contentType = self::contentTypes['postClient'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1883,7 +1863,6 @@ public function postClientRequest($app, $create_client_dto, string $contentType * * Updates an app client. * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be updated. (required) * @param \Squidex\Client\Model\UpdateClientDto $update_client_dto Client object that needs to be updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putClient'] to see the possible values for this operation @@ -1892,9 +1871,9 @@ public function postClientRequest($app, $create_client_dto, string $contentType * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ClientsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putClient($app, $id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) + public function putClient($id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) { - list($response) = $this->putClientWithHttpInfo($app, $id, $update_client_dto, $contentType); + list($response) = $this->putClientWithHttpInfo($id, $update_client_dto, $contentType); return $response; } @@ -1903,7 +1882,6 @@ public function putClient($app, $id, $update_client_dto, string $contentType = s * * Updates an app client. * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be updated. (required) * @param \Squidex\Client\Model\UpdateClientDto $update_client_dto Client object that needs to be updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putClient'] to see the possible values for this operation @@ -1912,9 +1890,9 @@ public function putClient($app, $id, $update_client_dto, string $contentType = s * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ClientsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putClientWithHttpInfo($app, $id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) + public function putClientWithHttpInfo($id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) { - $request = $this->putClientRequest($app, $id, $update_client_dto, $contentType); + $request = $this->putClientRequest($id, $update_client_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -2051,7 +2029,6 @@ public function putClientWithHttpInfo($app, $id, $update_client_dto, string $con * * Updates an app client. * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be updated. (required) * @param \Squidex\Client\Model\UpdateClientDto $update_client_dto Client object that needs to be updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putClient'] to see the possible values for this operation @@ -2059,9 +2036,9 @@ public function putClientWithHttpInfo($app, $id, $update_client_dto, string $con * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putClientAsync($app, $id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) + public function putClientAsync($id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) { - return $this->putClientAsyncWithHttpInfo($app, $id, $update_client_dto, $contentType) + return $this->putClientAsyncWithHttpInfo($id, $update_client_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -2074,7 +2051,6 @@ function ($response) { * * Updates an app client. * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be updated. (required) * @param \Squidex\Client\Model\UpdateClientDto $update_client_dto Client object that needs to be updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putClient'] to see the possible values for this operation @@ -2082,10 +2058,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putClientAsyncWithHttpInfo($app, $id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) + public function putClientAsyncWithHttpInfo($id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) { $returnType = '\Squidex\Client\Model\ClientsDto'; - $request = $this->putClientRequest($app, $id, $update_client_dto, $contentType); + $request = $this->putClientRequest($id, $update_client_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2126,7 +2102,6 @@ function ($exception) { /** * Create request for operation 'putClient' * - * @param string $app The name of the app. (required) * @param string $id The ID of the client that must be updated. (required) * @param \Squidex\Client\Model\UpdateClientDto $update_client_dto Client object that needs to be updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putClient'] to see the possible values for this operation @@ -2134,10 +2109,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putClientRequest($app, $id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) + public function putClientRequest($id, $update_client_dto, string $contentType = self::contentTypes['putClient'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2251,7 +2227,6 @@ public function putClientRequest($app, $id, $update_client_dto, string $contentT * * Remove contributor. * - * @param string $app The name of the app. (required) * @param string $id The ID of the contributor. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteContributor'] to see the possible values for this operation * @@ -2259,9 +2234,9 @@ public function putClientRequest($app, $id, $update_client_dto, string $contentT * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContributorsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteContributor($app, $id, string $contentType = self::contentTypes['deleteContributor'][0]) + public function deleteContributor($id, string $contentType = self::contentTypes['deleteContributor'][0]) { - list($response) = $this->deleteContributorWithHttpInfo($app, $id, $contentType); + list($response) = $this->deleteContributorWithHttpInfo($id, $contentType); return $response; } @@ -2270,7 +2245,6 @@ public function deleteContributor($app, $id, string $contentType = self::content * * Remove contributor. * - * @param string $app The name of the app. (required) * @param string $id The ID of the contributor. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteContributor'] to see the possible values for this operation * @@ -2278,9 +2252,9 @@ public function deleteContributor($app, $id, string $contentType = self::content * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContributorsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteContributorWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteContributor'][0]) + public function deleteContributorWithHttpInfo($id, string $contentType = self::contentTypes['deleteContributor'][0]) { - $request = $this->deleteContributorRequest($app, $id, $contentType); + $request = $this->deleteContributorRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2417,16 +2391,15 @@ public function deleteContributorWithHttpInfo($app, $id, string $contentType = s * * Remove contributor. * - * @param string $app The name of the app. (required) * @param string $id The ID of the contributor. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteContributor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteContributorAsync($app, $id, string $contentType = self::contentTypes['deleteContributor'][0]) + public function deleteContributorAsync($id, string $contentType = self::contentTypes['deleteContributor'][0]) { - return $this->deleteContributorAsyncWithHttpInfo($app, $id, $contentType) + return $this->deleteContributorAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -2439,17 +2412,16 @@ function ($response) { * * Remove contributor. * - * @param string $app The name of the app. (required) * @param string $id The ID of the contributor. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteContributor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteContributorAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteContributor'][0]) + public function deleteContributorAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteContributor'][0]) { $returnType = '\Squidex\Client\Model\ContributorsDto'; - $request = $this->deleteContributorRequest($app, $id, $contentType); + $request = $this->deleteContributorRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2490,17 +2462,17 @@ function ($exception) { /** * Create request for operation 'deleteContributor' * - * @param string $app The name of the app. (required) * @param string $id The ID of the contributor. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteContributor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteContributorRequest($app, $id, string $contentType = self::contentTypes['deleteContributor'][0]) + public function deleteContributorRequest($id, string $contentType = self::contentTypes['deleteContributor'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2600,16 +2572,15 @@ public function deleteContributorRequest($app, $id, string $contentType = self:: * * Remove yourself. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMyself'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContributorsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteMyself($app, string $contentType = self::contentTypes['deleteMyself'][0]) + public function deleteMyself(string $contentType = self::contentTypes['deleteMyself'][0]) { - list($response) = $this->deleteMyselfWithHttpInfo($app, $contentType); + list($response) = $this->deleteMyselfWithHttpInfo($contentType); return $response; } @@ -2618,16 +2589,15 @@ public function deleteMyself($app, string $contentType = self::contentTypes['del * * Remove yourself. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMyself'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContributorsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteMyselfWithHttpInfo($app, string $contentType = self::contentTypes['deleteMyself'][0]) + public function deleteMyselfWithHttpInfo(string $contentType = self::contentTypes['deleteMyself'][0]) { - $request = $this->deleteMyselfRequest($app, $contentType); + $request = $this->deleteMyselfRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -2764,15 +2734,14 @@ public function deleteMyselfWithHttpInfo($app, string $contentType = self::conte * * Remove yourself. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMyself'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteMyselfAsync($app, string $contentType = self::contentTypes['deleteMyself'][0]) + public function deleteMyselfAsync(string $contentType = self::contentTypes['deleteMyself'][0]) { - return $this->deleteMyselfAsyncWithHttpInfo($app, $contentType) + return $this->deleteMyselfAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -2785,16 +2754,15 @@ function ($response) { * * Remove yourself. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMyself'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteMyselfAsyncWithHttpInfo($app, string $contentType = self::contentTypes['deleteMyself'][0]) + public function deleteMyselfAsyncWithHttpInfo(string $contentType = self::contentTypes['deleteMyself'][0]) { $returnType = '\Squidex\Client\Model\ContributorsDto'; - $request = $this->deleteMyselfRequest($app, $contentType); + $request = $this->deleteMyselfRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2835,16 +2803,16 @@ function ($exception) { /** * Create request for operation 'deleteMyself' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMyself'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteMyselfRequest($app, string $contentType = self::contentTypes['deleteMyself'][0]) + public function deleteMyselfRequest(string $contentType = self::contentTypes['deleteMyself'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2929,16 +2897,15 @@ public function deleteMyselfRequest($app, string $contentType = self::contentTyp * * Get app contributors. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContributors'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContributorsDto|\Squidex\Client\Model\ErrorDto */ - public function getContributors($app, string $contentType = self::contentTypes['getContributors'][0]) + public function getContributors(string $contentType = self::contentTypes['getContributors'][0]) { - list($response) = $this->getContributorsWithHttpInfo($app, $contentType); + list($response) = $this->getContributorsWithHttpInfo($contentType); return $response; } @@ -2947,16 +2914,15 @@ public function getContributors($app, string $contentType = self::contentTypes[' * * Get app contributors. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContributors'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContributorsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getContributorsWithHttpInfo($app, string $contentType = self::contentTypes['getContributors'][0]) + public function getContributorsWithHttpInfo(string $contentType = self::contentTypes['getContributors'][0]) { - $request = $this->getContributorsRequest($app, $contentType); + $request = $this->getContributorsRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -3070,15 +3036,14 @@ public function getContributorsWithHttpInfo($app, string $contentType = self::co * * Get app contributors. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContributors'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContributorsAsync($app, string $contentType = self::contentTypes['getContributors'][0]) + public function getContributorsAsync(string $contentType = self::contentTypes['getContributors'][0]) { - return $this->getContributorsAsyncWithHttpInfo($app, $contentType) + return $this->getContributorsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -3091,16 +3056,15 @@ function ($response) { * * Get app contributors. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContributors'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContributorsAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getContributors'][0]) + public function getContributorsAsyncWithHttpInfo(string $contentType = self::contentTypes['getContributors'][0]) { $returnType = '\Squidex\Client\Model\ContributorsDto'; - $request = $this->getContributorsRequest($app, $contentType); + $request = $this->getContributorsRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3141,16 +3105,16 @@ function ($exception) { /** * Create request for operation 'getContributors' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContributors'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getContributorsRequest($app, string $contentType = self::contentTypes['getContributors'][0]) + public function getContributorsRequest(string $contentType = self::contentTypes['getContributors'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3235,7 +3199,6 @@ public function getContributorsRequest($app, string $contentType = self::content * * Assign contributor to app. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AssignContributorDto $assign_contributor_dto Contributor object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContributor'] to see the possible values for this operation * @@ -3243,9 +3206,9 @@ public function getContributorsRequest($app, string $contentType = self::content * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContributorsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postContributor($app, $assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) + public function postContributor($assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) { - list($response) = $this->postContributorWithHttpInfo($app, $assign_contributor_dto, $contentType); + list($response) = $this->postContributorWithHttpInfo($assign_contributor_dto, $contentType); return $response; } @@ -3254,7 +3217,6 @@ public function postContributor($app, $assign_contributor_dto, string $contentTy * * Assign contributor to app. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AssignContributorDto $assign_contributor_dto Contributor object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContributor'] to see the possible values for this operation * @@ -3262,9 +3224,9 @@ public function postContributor($app, $assign_contributor_dto, string $contentTy * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContributorsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postContributorWithHttpInfo($app, $assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) + public function postContributorWithHttpInfo($assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) { - $request = $this->postContributorRequest($app, $assign_contributor_dto, $contentType); + $request = $this->postContributorRequest($assign_contributor_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -3401,16 +3363,15 @@ public function postContributorWithHttpInfo($app, $assign_contributor_dto, strin * * Assign contributor to app. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AssignContributorDto $assign_contributor_dto Contributor object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContributor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postContributorAsync($app, $assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) + public function postContributorAsync($assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) { - return $this->postContributorAsyncWithHttpInfo($app, $assign_contributor_dto, $contentType) + return $this->postContributorAsyncWithHttpInfo($assign_contributor_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -3423,17 +3384,16 @@ function ($response) { * * Assign contributor to app. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AssignContributorDto $assign_contributor_dto Contributor object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContributor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postContributorAsyncWithHttpInfo($app, $assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) + public function postContributorAsyncWithHttpInfo($assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) { $returnType = '\Squidex\Client\Model\ContributorsDto'; - $request = $this->postContributorRequest($app, $assign_contributor_dto, $contentType); + $request = $this->postContributorRequest($assign_contributor_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3474,17 +3434,17 @@ function ($exception) { /** * Create request for operation 'postContributor' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AssignContributorDto $assign_contributor_dto Contributor object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContributor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postContributorRequest($app, $assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) + public function postContributorRequest($assign_contributor_dto, string $contentType = self::contentTypes['postContributor'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3583,16 +3543,15 @@ public function postContributorRequest($app, $assign_contributor_dto, string $co * * Get the app image. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImage'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SplFileObject|\Squidex\Client\Model\ErrorDto */ - public function getImage($app, string $contentType = self::contentTypes['getImage'][0]) + public function getImage(string $contentType = self::contentTypes['getImage'][0]) { - list($response) = $this->getImageWithHttpInfo($app, $contentType); + list($response) = $this->getImageWithHttpInfo($contentType); return $response; } @@ -3601,16 +3560,15 @@ public function getImage($app, string $contentType = self::contentTypes['getImag * * Get the app image. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImage'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SplFileObject|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getImageWithHttpInfo($app, string $contentType = self::contentTypes['getImage'][0]) + public function getImageWithHttpInfo(string $contentType = self::contentTypes['getImage'][0]) { - $request = $this->getImageRequest($app, $contentType); + $request = $this->getImageRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -3724,15 +3682,14 @@ public function getImageWithHttpInfo($app, string $contentType = self::contentTy * * Get the app image. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getImageAsync($app, string $contentType = self::contentTypes['getImage'][0]) + public function getImageAsync(string $contentType = self::contentTypes['getImage'][0]) { - return $this->getImageAsyncWithHttpInfo($app, $contentType) + return $this->getImageAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -3745,16 +3702,15 @@ function ($response) { * * Get the app image. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getImageAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getImage'][0]) + public function getImageAsyncWithHttpInfo(string $contentType = self::contentTypes['getImage'][0]) { $returnType = '\SplFileObject'; - $request = $this->getImageRequest($app, $contentType); + $request = $this->getImageRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3795,16 +3751,16 @@ function ($exception) { /** * Create request for operation 'getImage' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getImageRequest($app, string $contentType = self::contentTypes['getImage'][0]) + public function getImageRequest(string $contentType = self::contentTypes['getImage'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3889,7 +3845,6 @@ public function getImageRequest($app, string $contentType = self::contentTypes[' * * Deletes an app language. * - * @param string $app The name of the app. (required) * @param string $language The language to delete from the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteLanguage'] to see the possible values for this operation * @@ -3897,9 +3852,9 @@ public function getImageRequest($app, string $contentType = self::contentTypes[' * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppLanguagesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteLanguage($app, $language, string $contentType = self::contentTypes['deleteLanguage'][0]) + public function deleteLanguage($language, string $contentType = self::contentTypes['deleteLanguage'][0]) { - list($response) = $this->deleteLanguageWithHttpInfo($app, $language, $contentType); + list($response) = $this->deleteLanguageWithHttpInfo($language, $contentType); return $response; } @@ -3908,7 +3863,6 @@ public function deleteLanguage($app, $language, string $contentType = self::cont * * Deletes an app language. * - * @param string $app The name of the app. (required) * @param string $language The language to delete from the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteLanguage'] to see the possible values for this operation * @@ -3916,9 +3870,9 @@ public function deleteLanguage($app, $language, string $contentType = self::cont * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppLanguagesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteLanguageWithHttpInfo($app, $language, string $contentType = self::contentTypes['deleteLanguage'][0]) + public function deleteLanguageWithHttpInfo($language, string $contentType = self::contentTypes['deleteLanguage'][0]) { - $request = $this->deleteLanguageRequest($app, $language, $contentType); + $request = $this->deleteLanguageRequest($language, $contentType); try { $options = $this->createHttpClientOption(); @@ -4055,16 +4009,15 @@ public function deleteLanguageWithHttpInfo($app, $language, string $contentType * * Deletes an app language. * - * @param string $app The name of the app. (required) * @param string $language The language to delete from the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteLanguage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteLanguageAsync($app, $language, string $contentType = self::contentTypes['deleteLanguage'][0]) + public function deleteLanguageAsync($language, string $contentType = self::contentTypes['deleteLanguage'][0]) { - return $this->deleteLanguageAsyncWithHttpInfo($app, $language, $contentType) + return $this->deleteLanguageAsyncWithHttpInfo($language, $contentType) ->then( function ($response) { return $response[0]; @@ -4077,17 +4030,16 @@ function ($response) { * * Deletes an app language. * - * @param string $app The name of the app. (required) * @param string $language The language to delete from the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteLanguage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteLanguageAsyncWithHttpInfo($app, $language, string $contentType = self::contentTypes['deleteLanguage'][0]) + public function deleteLanguageAsyncWithHttpInfo($language, string $contentType = self::contentTypes['deleteLanguage'][0]) { $returnType = '\Squidex\Client\Model\AppLanguagesDto'; - $request = $this->deleteLanguageRequest($app, $language, $contentType); + $request = $this->deleteLanguageRequest($language, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4128,17 +4080,17 @@ function ($exception) { /** * Create request for operation 'deleteLanguage' * - * @param string $app The name of the app. (required) * @param string $language The language to delete from the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteLanguage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteLanguageRequest($app, $language, string $contentType = self::contentTypes['deleteLanguage'][0]) + public function deleteLanguageRequest($language, string $contentType = self::contentTypes['deleteLanguage'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4238,16 +4190,15 @@ public function deleteLanguageRequest($app, $language, string $contentType = sel * * Get app languages. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLanguages'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppLanguagesDto|\Squidex\Client\Model\ErrorDto */ - public function getLanguages($app, string $contentType = self::contentTypes['getLanguages'][0]) + public function getLanguages(string $contentType = self::contentTypes['getLanguages'][0]) { - list($response) = $this->getLanguagesWithHttpInfo($app, $contentType); + list($response) = $this->getLanguagesWithHttpInfo($contentType); return $response; } @@ -4256,16 +4207,15 @@ public function getLanguages($app, string $contentType = self::contentTypes['get * * Get app languages. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLanguages'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppLanguagesDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getLanguagesWithHttpInfo($app, string $contentType = self::contentTypes['getLanguages'][0]) + public function getLanguagesWithHttpInfo(string $contentType = self::contentTypes['getLanguages'][0]) { - $request = $this->getLanguagesRequest($app, $contentType); + $request = $this->getLanguagesRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -4379,15 +4329,14 @@ public function getLanguagesWithHttpInfo($app, string $contentType = self::conte * * Get app languages. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLanguages'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLanguagesAsync($app, string $contentType = self::contentTypes['getLanguages'][0]) + public function getLanguagesAsync(string $contentType = self::contentTypes['getLanguages'][0]) { - return $this->getLanguagesAsyncWithHttpInfo($app, $contentType) + return $this->getLanguagesAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -4400,16 +4349,15 @@ function ($response) { * * Get app languages. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLanguages'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLanguagesAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getLanguages'][0]) + public function getLanguagesAsyncWithHttpInfo(string $contentType = self::contentTypes['getLanguages'][0]) { $returnType = '\Squidex\Client\Model\AppLanguagesDto'; - $request = $this->getLanguagesRequest($app, $contentType); + $request = $this->getLanguagesRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4450,16 +4398,16 @@ function ($exception) { /** * Create request for operation 'getLanguages' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLanguages'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getLanguagesRequest($app, string $contentType = self::contentTypes['getLanguages'][0]) + public function getLanguagesRequest(string $contentType = self::contentTypes['getLanguages'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4542,9 +4490,8 @@ public function getLanguagesRequest($app, string $contentType = self::contentTyp /** * Operation postLanguage * - * Attaches an app language. + * Add an app language. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddLanguageDto $add_language_dto The language to add to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postLanguage'] to see the possible values for this operation * @@ -4552,18 +4499,17 @@ public function getLanguagesRequest($app, string $contentType = self::contentTyp * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppLanguagesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postLanguage($app, $add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) + public function postLanguage($add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) { - list($response) = $this->postLanguageWithHttpInfo($app, $add_language_dto, $contentType); + list($response) = $this->postLanguageWithHttpInfo($add_language_dto, $contentType); return $response; } /** * Operation postLanguageWithHttpInfo * - * Attaches an app language. + * Add an app language. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddLanguageDto $add_language_dto The language to add to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postLanguage'] to see the possible values for this operation * @@ -4571,9 +4517,9 @@ public function postLanguage($app, $add_language_dto, string $contentType = self * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppLanguagesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postLanguageWithHttpInfo($app, $add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) + public function postLanguageWithHttpInfo($add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) { - $request = $this->postLanguageRequest($app, $add_language_dto, $contentType); + $request = $this->postLanguageRequest($add_language_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -4708,18 +4654,17 @@ public function postLanguageWithHttpInfo($app, $add_language_dto, string $conten /** * Operation postLanguageAsync * - * Attaches an app language. + * Add an app language. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddLanguageDto $add_language_dto The language to add to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postLanguage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postLanguageAsync($app, $add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) + public function postLanguageAsync($add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) { - return $this->postLanguageAsyncWithHttpInfo($app, $add_language_dto, $contentType) + return $this->postLanguageAsyncWithHttpInfo($add_language_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -4730,19 +4675,18 @@ function ($response) { /** * Operation postLanguageAsyncWithHttpInfo * - * Attaches an app language. + * Add an app language. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddLanguageDto $add_language_dto The language to add to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postLanguage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postLanguageAsyncWithHttpInfo($app, $add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) + public function postLanguageAsyncWithHttpInfo($add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) { $returnType = '\Squidex\Client\Model\AppLanguagesDto'; - $request = $this->postLanguageRequest($app, $add_language_dto, $contentType); + $request = $this->postLanguageRequest($add_language_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4783,17 +4727,17 @@ function ($exception) { /** * Create request for operation 'postLanguage' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddLanguageDto $add_language_dto The language to add to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postLanguage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postLanguageRequest($app, $add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) + public function postLanguageRequest($add_language_dto, string $contentType = self::contentTypes['postLanguage'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4892,7 +4836,6 @@ public function postLanguageRequest($app, $add_language_dto, string $contentType * * Updates an app language. * - * @param string $app The name of the app. (required) * @param string $language The language to update. (required) * @param \Squidex\Client\Model\UpdateLanguageDto $update_language_dto The language object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putLanguage'] to see the possible values for this operation @@ -4901,9 +4844,9 @@ public function postLanguageRequest($app, $add_language_dto, string $contentType * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppLanguagesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putLanguage($app, $language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) + public function putLanguage($language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) { - list($response) = $this->putLanguageWithHttpInfo($app, $language, $update_language_dto, $contentType); + list($response) = $this->putLanguageWithHttpInfo($language, $update_language_dto, $contentType); return $response; } @@ -4912,7 +4855,6 @@ public function putLanguage($app, $language, $update_language_dto, string $conte * * Updates an app language. * - * @param string $app The name of the app. (required) * @param string $language The language to update. (required) * @param \Squidex\Client\Model\UpdateLanguageDto $update_language_dto The language object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putLanguage'] to see the possible values for this operation @@ -4921,9 +4863,9 @@ public function putLanguage($app, $language, $update_language_dto, string $conte * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppLanguagesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putLanguageWithHttpInfo($app, $language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) + public function putLanguageWithHttpInfo($language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) { - $request = $this->putLanguageRequest($app, $language, $update_language_dto, $contentType); + $request = $this->putLanguageRequest($language, $update_language_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -5060,7 +5002,6 @@ public function putLanguageWithHttpInfo($app, $language, $update_language_dto, s * * Updates an app language. * - * @param string $app The name of the app. (required) * @param string $language The language to update. (required) * @param \Squidex\Client\Model\UpdateLanguageDto $update_language_dto The language object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putLanguage'] to see the possible values for this operation @@ -5068,9 +5009,9 @@ public function putLanguageWithHttpInfo($app, $language, $update_language_dto, s * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putLanguageAsync($app, $language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) + public function putLanguageAsync($language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) { - return $this->putLanguageAsyncWithHttpInfo($app, $language, $update_language_dto, $contentType) + return $this->putLanguageAsyncWithHttpInfo($language, $update_language_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -5083,7 +5024,6 @@ function ($response) { * * Updates an app language. * - * @param string $app The name of the app. (required) * @param string $language The language to update. (required) * @param \Squidex\Client\Model\UpdateLanguageDto $update_language_dto The language object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putLanguage'] to see the possible values for this operation @@ -5091,10 +5031,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putLanguageAsyncWithHttpInfo($app, $language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) + public function putLanguageAsyncWithHttpInfo($language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) { $returnType = '\Squidex\Client\Model\AppLanguagesDto'; - $request = $this->putLanguageRequest($app, $language, $update_language_dto, $contentType); + $request = $this->putLanguageRequest($language, $update_language_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5135,7 +5075,6 @@ function ($exception) { /** * Create request for operation 'putLanguage' * - * @param string $app The name of the app. (required) * @param string $language The language to update. (required) * @param \Squidex\Client\Model\UpdateLanguageDto $update_language_dto The language object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putLanguage'] to see the possible values for this operation @@ -5143,10 +5082,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putLanguageRequest($app, $language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) + public function putLanguageRequest($language, $update_language_dto, string $contentType = self::contentTypes['putLanguage'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5260,7 +5200,6 @@ public function putLanguageRequest($app, $language, $update_language_dto, string * * Remove role from app. * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRole'] to see the possible values for this operation * @@ -5268,9 +5207,9 @@ public function putLanguageRequest($app, $language, $update_language_dto, string * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RolesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteRole($app, $role_name, string $contentType = self::contentTypes['deleteRole'][0]) + public function deleteRole($role_name, string $contentType = self::contentTypes['deleteRole'][0]) { - list($response) = $this->deleteRoleWithHttpInfo($app, $role_name, $contentType); + list($response) = $this->deleteRoleWithHttpInfo($role_name, $contentType); return $response; } @@ -5279,7 +5218,6 @@ public function deleteRole($app, $role_name, string $contentType = self::content * * Remove role from app. * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRole'] to see the possible values for this operation * @@ -5287,9 +5225,9 @@ public function deleteRole($app, $role_name, string $contentType = self::content * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RolesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteRoleWithHttpInfo($app, $role_name, string $contentType = self::contentTypes['deleteRole'][0]) + public function deleteRoleWithHttpInfo($role_name, string $contentType = self::contentTypes['deleteRole'][0]) { - $request = $this->deleteRoleRequest($app, $role_name, $contentType); + $request = $this->deleteRoleRequest($role_name, $contentType); try { $options = $this->createHttpClientOption(); @@ -5426,16 +5364,15 @@ public function deleteRoleWithHttpInfo($app, $role_name, string $contentType = s * * Remove role from app. * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRole'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRoleAsync($app, $role_name, string $contentType = self::contentTypes['deleteRole'][0]) + public function deleteRoleAsync($role_name, string $contentType = self::contentTypes['deleteRole'][0]) { - return $this->deleteRoleAsyncWithHttpInfo($app, $role_name, $contentType) + return $this->deleteRoleAsyncWithHttpInfo($role_name, $contentType) ->then( function ($response) { return $response[0]; @@ -5448,17 +5385,16 @@ function ($response) { * * Remove role from app. * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRole'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRoleAsyncWithHttpInfo($app, $role_name, string $contentType = self::contentTypes['deleteRole'][0]) + public function deleteRoleAsyncWithHttpInfo($role_name, string $contentType = self::contentTypes['deleteRole'][0]) { $returnType = '\Squidex\Client\Model\RolesDto'; - $request = $this->deleteRoleRequest($app, $role_name, $contentType); + $request = $this->deleteRoleRequest($role_name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5499,17 +5435,17 @@ function ($exception) { /** * Create request for operation 'deleteRole' * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRole'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteRoleRequest($app, $role_name, string $contentType = self::contentTypes['deleteRole'][0]) + public function deleteRoleRequest($role_name, string $contentType = self::contentTypes['deleteRole'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5609,16 +5545,15 @@ public function deleteRoleRequest($app, $role_name, string $contentType = self:: * * Get app permissions. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPermissions'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return string[]|\Squidex\Client\Model\ErrorDto */ - public function getPermissions($app, string $contentType = self::contentTypes['getPermissions'][0]) + public function getPermissions(string $contentType = self::contentTypes['getPermissions'][0]) { - list($response) = $this->getPermissionsWithHttpInfo($app, $contentType); + list($response) = $this->getPermissionsWithHttpInfo($contentType); return $response; } @@ -5627,16 +5562,15 @@ public function getPermissions($app, string $contentType = self::contentTypes['g * * Get app permissions. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPermissions'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of string[]|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getPermissionsWithHttpInfo($app, string $contentType = self::contentTypes['getPermissions'][0]) + public function getPermissionsWithHttpInfo(string $contentType = self::contentTypes['getPermissions'][0]) { - $request = $this->getPermissionsRequest($app, $contentType); + $request = $this->getPermissionsRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -5750,15 +5684,14 @@ public function getPermissionsWithHttpInfo($app, string $contentType = self::con * * Get app permissions. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPermissions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPermissionsAsync($app, string $contentType = self::contentTypes['getPermissions'][0]) + public function getPermissionsAsync(string $contentType = self::contentTypes['getPermissions'][0]) { - return $this->getPermissionsAsyncWithHttpInfo($app, $contentType) + return $this->getPermissionsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -5771,16 +5704,15 @@ function ($response) { * * Get app permissions. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPermissions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPermissionsAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getPermissions'][0]) + public function getPermissionsAsyncWithHttpInfo(string $contentType = self::contentTypes['getPermissions'][0]) { $returnType = 'string[]'; - $request = $this->getPermissionsRequest($app, $contentType); + $request = $this->getPermissionsRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5821,16 +5753,16 @@ function ($exception) { /** * Create request for operation 'getPermissions' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPermissions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPermissionsRequest($app, string $contentType = self::contentTypes['getPermissions'][0]) + public function getPermissionsRequest(string $contentType = self::contentTypes['getPermissions'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5915,16 +5847,15 @@ public function getPermissionsRequest($app, string $contentType = self::contentT * * Get app roles. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoles'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RolesDto|\Squidex\Client\Model\ErrorDto */ - public function getRoles($app, string $contentType = self::contentTypes['getRoles'][0]) + public function getRoles(string $contentType = self::contentTypes['getRoles'][0]) { - list($response) = $this->getRolesWithHttpInfo($app, $contentType); + list($response) = $this->getRolesWithHttpInfo($contentType); return $response; } @@ -5933,16 +5864,15 @@ public function getRoles($app, string $contentType = self::contentTypes['getRole * * Get app roles. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoles'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RolesDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getRolesWithHttpInfo($app, string $contentType = self::contentTypes['getRoles'][0]) + public function getRolesWithHttpInfo(string $contentType = self::contentTypes['getRoles'][0]) { - $request = $this->getRolesRequest($app, $contentType); + $request = $this->getRolesRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -6056,15 +5986,14 @@ public function getRolesWithHttpInfo($app, string $contentType = self::contentTy * * Get app roles. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoles'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRolesAsync($app, string $contentType = self::contentTypes['getRoles'][0]) + public function getRolesAsync(string $contentType = self::contentTypes['getRoles'][0]) { - return $this->getRolesAsyncWithHttpInfo($app, $contentType) + return $this->getRolesAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -6077,16 +6006,15 @@ function ($response) { * * Get app roles. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoles'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRolesAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getRoles'][0]) + public function getRolesAsyncWithHttpInfo(string $contentType = self::contentTypes['getRoles'][0]) { $returnType = '\Squidex\Client\Model\RolesDto'; - $request = $this->getRolesRequest($app, $contentType); + $request = $this->getRolesRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6127,16 +6055,16 @@ function ($exception) { /** * Create request for operation 'getRoles' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRoles'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getRolesRequest($app, string $contentType = self::contentTypes['getRoles'][0]) + public function getRolesRequest(string $contentType = self::contentTypes['getRoles'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6221,7 +6149,6 @@ public function getRolesRequest($app, string $contentType = self::contentTypes[' * * Add role to app. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddRoleDto $add_role_dto Role object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRole'] to see the possible values for this operation * @@ -6229,9 +6156,9 @@ public function getRolesRequest($app, string $contentType = self::contentTypes[' * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RolesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postRole($app, $add_role_dto, string $contentType = self::contentTypes['postRole'][0]) + public function postRole($add_role_dto, string $contentType = self::contentTypes['postRole'][0]) { - list($response) = $this->postRoleWithHttpInfo($app, $add_role_dto, $contentType); + list($response) = $this->postRoleWithHttpInfo($add_role_dto, $contentType); return $response; } @@ -6240,7 +6167,6 @@ public function postRole($app, $add_role_dto, string $contentType = self::conten * * Add role to app. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddRoleDto $add_role_dto Role object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRole'] to see the possible values for this operation * @@ -6248,9 +6174,9 @@ public function postRole($app, $add_role_dto, string $contentType = self::conten * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RolesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postRoleWithHttpInfo($app, $add_role_dto, string $contentType = self::contentTypes['postRole'][0]) + public function postRoleWithHttpInfo($add_role_dto, string $contentType = self::contentTypes['postRole'][0]) { - $request = $this->postRoleRequest($app, $add_role_dto, $contentType); + $request = $this->postRoleRequest($add_role_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -6387,16 +6313,15 @@ public function postRoleWithHttpInfo($app, $add_role_dto, string $contentType = * * Add role to app. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddRoleDto $add_role_dto Role object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRole'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postRoleAsync($app, $add_role_dto, string $contentType = self::contentTypes['postRole'][0]) + public function postRoleAsync($add_role_dto, string $contentType = self::contentTypes['postRole'][0]) { - return $this->postRoleAsyncWithHttpInfo($app, $add_role_dto, $contentType) + return $this->postRoleAsyncWithHttpInfo($add_role_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -6409,17 +6334,16 @@ function ($response) { * * Add role to app. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddRoleDto $add_role_dto Role object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRole'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postRoleAsyncWithHttpInfo($app, $add_role_dto, string $contentType = self::contentTypes['postRole'][0]) + public function postRoleAsyncWithHttpInfo($add_role_dto, string $contentType = self::contentTypes['postRole'][0]) { $returnType = '\Squidex\Client\Model\RolesDto'; - $request = $this->postRoleRequest($app, $add_role_dto, $contentType); + $request = $this->postRoleRequest($add_role_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6460,17 +6384,17 @@ function ($exception) { /** * Create request for operation 'postRole' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddRoleDto $add_role_dto Role object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRole'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postRoleRequest($app, $add_role_dto, string $contentType = self::contentTypes['postRole'][0]) + public function postRoleRequest($add_role_dto, string $contentType = self::contentTypes['postRole'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6569,7 +6493,6 @@ public function postRoleRequest($app, $add_role_dto, string $contentType = self: * * Update an app role. * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role to be updated. (required) * @param \Squidex\Client\Model\UpdateRoleDto $update_role_dto Role to be updated for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRole'] to see the possible values for this operation @@ -6578,9 +6501,9 @@ public function postRoleRequest($app, $add_role_dto, string $contentType = self: * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RolesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putRole($app, $role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) + public function putRole($role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) { - list($response) = $this->putRoleWithHttpInfo($app, $role_name, $update_role_dto, $contentType); + list($response) = $this->putRoleWithHttpInfo($role_name, $update_role_dto, $contentType); return $response; } @@ -6589,7 +6512,6 @@ public function putRole($app, $role_name, $update_role_dto, string $contentType * * Update an app role. * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role to be updated. (required) * @param \Squidex\Client\Model\UpdateRoleDto $update_role_dto Role to be updated for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRole'] to see the possible values for this operation @@ -6598,9 +6520,9 @@ public function putRole($app, $role_name, $update_role_dto, string $contentType * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RolesDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putRoleWithHttpInfo($app, $role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) + public function putRoleWithHttpInfo($role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) { - $request = $this->putRoleRequest($app, $role_name, $update_role_dto, $contentType); + $request = $this->putRoleRequest($role_name, $update_role_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -6737,7 +6659,6 @@ public function putRoleWithHttpInfo($app, $role_name, $update_role_dto, string $ * * Update an app role. * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role to be updated. (required) * @param \Squidex\Client\Model\UpdateRoleDto $update_role_dto Role to be updated for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRole'] to see the possible values for this operation @@ -6745,9 +6666,9 @@ public function putRoleWithHttpInfo($app, $role_name, $update_role_dto, string $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRoleAsync($app, $role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) + public function putRoleAsync($role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) { - return $this->putRoleAsyncWithHttpInfo($app, $role_name, $update_role_dto, $contentType) + return $this->putRoleAsyncWithHttpInfo($role_name, $update_role_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -6760,7 +6681,6 @@ function ($response) { * * Update an app role. * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role to be updated. (required) * @param \Squidex\Client\Model\UpdateRoleDto $update_role_dto Role to be updated for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRole'] to see the possible values for this operation @@ -6768,10 +6688,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRoleAsyncWithHttpInfo($app, $role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) + public function putRoleAsyncWithHttpInfo($role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) { $returnType = '\Squidex\Client\Model\RolesDto'; - $request = $this->putRoleRequest($app, $role_name, $update_role_dto, $contentType); + $request = $this->putRoleRequest($role_name, $update_role_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6812,7 +6732,6 @@ function ($exception) { /** * Create request for operation 'putRole' * - * @param string $app The name of the app. (required) * @param string $role_name The name of the role to be updated. (required) * @param \Squidex\Client\Model\UpdateRoleDto $update_role_dto Role to be updated for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRole'] to see the possible values for this operation @@ -6820,10 +6739,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putRoleRequest($app, $role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) + public function putRoleRequest($role_name, $update_role_dto, string $contentType = self::contentTypes['putRole'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6937,16 +6857,15 @@ public function putRoleRequest($app, $role_name, $update_role_dto, string $conte * * Get the app settings. * - * @param string $app The name of the app to get the settings for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSettings'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppSettingsDto|\Squidex\Client\Model\ErrorDto */ - public function getSettings($app, string $contentType = self::contentTypes['getSettings'][0]) + public function getSettings(string $contentType = self::contentTypes['getSettings'][0]) { - list($response) = $this->getSettingsWithHttpInfo($app, $contentType); + list($response) = $this->getSettingsWithHttpInfo($contentType); return $response; } @@ -6955,16 +6874,15 @@ public function getSettings($app, string $contentType = self::contentTypes['getS * * Get the app settings. * - * @param string $app The name of the app to get the settings for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSettings'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppSettingsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getSettingsWithHttpInfo($app, string $contentType = self::contentTypes['getSettings'][0]) + public function getSettingsWithHttpInfo(string $contentType = self::contentTypes['getSettings'][0]) { - $request = $this->getSettingsRequest($app, $contentType); + $request = $this->getSettingsRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -7078,15 +6996,14 @@ public function getSettingsWithHttpInfo($app, string $contentType = self::conten * * Get the app settings. * - * @param string $app The name of the app to get the settings for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSettings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSettingsAsync($app, string $contentType = self::contentTypes['getSettings'][0]) + public function getSettingsAsync(string $contentType = self::contentTypes['getSettings'][0]) { - return $this->getSettingsAsyncWithHttpInfo($app, $contentType) + return $this->getSettingsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -7099,16 +7016,15 @@ function ($response) { * * Get the app settings. * - * @param string $app The name of the app to get the settings for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSettings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSettingsAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getSettings'][0]) + public function getSettingsAsyncWithHttpInfo(string $contentType = self::contentTypes['getSettings'][0]) { $returnType = '\Squidex\Client\Model\AppSettingsDto'; - $request = $this->getSettingsRequest($app, $contentType); + $request = $this->getSettingsRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7149,16 +7065,16 @@ function ($exception) { /** * Create request for operation 'getSettings' * - * @param string $app The name of the app to get the settings for. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSettings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSettingsRequest($app, string $contentType = self::contentTypes['getSettings'][0]) + public function getSettingsRequest(string $contentType = self::contentTypes['getSettings'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -7241,9 +7157,8 @@ public function getSettingsRequest($app, string $contentType = self::contentType /** * Operation putSettings * - * Update the app settings. + * Update the settings. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppSettingsDto $update_app_settings_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSettings'] to see the possible values for this operation * @@ -7251,18 +7166,17 @@ public function getSettingsRequest($app, string $contentType = self::contentType * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppSettingsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putSettings($app, $update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) + public function putSettings($update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) { - list($response) = $this->putSettingsWithHttpInfo($app, $update_app_settings_dto, $contentType); + list($response) = $this->putSettingsWithHttpInfo($update_app_settings_dto, $contentType); return $response; } /** * Operation putSettingsWithHttpInfo * - * Update the app settings. + * Update the settings. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppSettingsDto $update_app_settings_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSettings'] to see the possible values for this operation * @@ -7270,9 +7184,9 @@ public function putSettings($app, $update_app_settings_dto, string $contentType * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppSettingsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putSettingsWithHttpInfo($app, $update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) + public function putSettingsWithHttpInfo($update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) { - $request = $this->putSettingsRequest($app, $update_app_settings_dto, $contentType); + $request = $this->putSettingsRequest($update_app_settings_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -7407,18 +7321,17 @@ public function putSettingsWithHttpInfo($app, $update_app_settings_dto, string $ /** * Operation putSettingsAsync * - * Update the app settings. + * Update the settings. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppSettingsDto $update_app_settings_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSettings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSettingsAsync($app, $update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) + public function putSettingsAsync($update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) { - return $this->putSettingsAsyncWithHttpInfo($app, $update_app_settings_dto, $contentType) + return $this->putSettingsAsyncWithHttpInfo($update_app_settings_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -7429,19 +7342,18 @@ function ($response) { /** * Operation putSettingsAsyncWithHttpInfo * - * Update the app settings. + * Update the settings. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppSettingsDto $update_app_settings_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSettings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSettingsAsyncWithHttpInfo($app, $update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) + public function putSettingsAsyncWithHttpInfo($update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) { $returnType = '\Squidex\Client\Model\AppSettingsDto'; - $request = $this->putSettingsRequest($app, $update_app_settings_dto, $contentType); + $request = $this->putSettingsRequest($update_app_settings_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7482,17 +7394,17 @@ function ($exception) { /** * Create request for operation 'putSettings' * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppSettingsDto $update_app_settings_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSettings'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putSettingsRequest($app, $update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) + public function putSettingsRequest($update_app_settings_dto, string $contentType = self::contentTypes['putSettings'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -7591,7 +7503,6 @@ public function putSettingsRequest($app, $update_app_settings_dto, string $conte * * Delete a workflow. * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWorkflow'] to see the possible values for this operation * @@ -7599,9 +7510,9 @@ public function putSettingsRequest($app, $update_app_settings_dto, string $conte * @throws \InvalidArgumentException * @return \Squidex\Client\Model\WorkflowsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteWorkflow($app, $id, string $contentType = self::contentTypes['deleteWorkflow'][0]) + public function deleteWorkflow($id, string $contentType = self::contentTypes['deleteWorkflow'][0]) { - list($response) = $this->deleteWorkflowWithHttpInfo($app, $id, $contentType); + list($response) = $this->deleteWorkflowWithHttpInfo($id, $contentType); return $response; } @@ -7610,7 +7521,6 @@ public function deleteWorkflow($app, $id, string $contentType = self::contentTyp * * Delete a workflow. * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWorkflow'] to see the possible values for this operation * @@ -7618,9 +7528,9 @@ public function deleteWorkflow($app, $id, string $contentType = self::contentTyp * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\WorkflowsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteWorkflowWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteWorkflow'][0]) + public function deleteWorkflowWithHttpInfo($id, string $contentType = self::contentTypes['deleteWorkflow'][0]) { - $request = $this->deleteWorkflowRequest($app, $id, $contentType); + $request = $this->deleteWorkflowRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -7757,16 +7667,15 @@ public function deleteWorkflowWithHttpInfo($app, $id, string $contentType = self * * Delete a workflow. * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWorkflow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteWorkflowAsync($app, $id, string $contentType = self::contentTypes['deleteWorkflow'][0]) + public function deleteWorkflowAsync($id, string $contentType = self::contentTypes['deleteWorkflow'][0]) { - return $this->deleteWorkflowAsyncWithHttpInfo($app, $id, $contentType) + return $this->deleteWorkflowAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -7779,17 +7688,16 @@ function ($response) { * * Delete a workflow. * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWorkflow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteWorkflowAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteWorkflow'][0]) + public function deleteWorkflowAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteWorkflow'][0]) { $returnType = '\Squidex\Client\Model\WorkflowsDto'; - $request = $this->deleteWorkflowRequest($app, $id, $contentType); + $request = $this->deleteWorkflowRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7830,17 +7738,17 @@ function ($exception) { /** * Create request for operation 'deleteWorkflow' * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWorkflow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteWorkflowRequest($app, $id, string $contentType = self::contentTypes['deleteWorkflow'][0]) + public function deleteWorkflowRequest($id, string $contentType = self::contentTypes['deleteWorkflow'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -7940,16 +7848,15 @@ public function deleteWorkflowRequest($app, $id, string $contentType = self::con * * Get app workflow. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getWorkflows'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\WorkflowsDto|\Squidex\Client\Model\ErrorDto */ - public function getWorkflows($app, string $contentType = self::contentTypes['getWorkflows'][0]) + public function getWorkflows(string $contentType = self::contentTypes['getWorkflows'][0]) { - list($response) = $this->getWorkflowsWithHttpInfo($app, $contentType); + list($response) = $this->getWorkflowsWithHttpInfo($contentType); return $response; } @@ -7958,16 +7865,15 @@ public function getWorkflows($app, string $contentType = self::contentTypes['get * * Get app workflow. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getWorkflows'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\WorkflowsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getWorkflowsWithHttpInfo($app, string $contentType = self::contentTypes['getWorkflows'][0]) + public function getWorkflowsWithHttpInfo(string $contentType = self::contentTypes['getWorkflows'][0]) { - $request = $this->getWorkflowsRequest($app, $contentType); + $request = $this->getWorkflowsRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -8081,15 +7987,14 @@ public function getWorkflowsWithHttpInfo($app, string $contentType = self::conte * * Get app workflow. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getWorkflows'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWorkflowsAsync($app, string $contentType = self::contentTypes['getWorkflows'][0]) + public function getWorkflowsAsync(string $contentType = self::contentTypes['getWorkflows'][0]) { - return $this->getWorkflowsAsyncWithHttpInfo($app, $contentType) + return $this->getWorkflowsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -8102,16 +8007,15 @@ function ($response) { * * Get app workflow. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getWorkflows'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWorkflowsAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getWorkflows'][0]) + public function getWorkflowsAsyncWithHttpInfo(string $contentType = self::contentTypes['getWorkflows'][0]) { $returnType = '\Squidex\Client\Model\WorkflowsDto'; - $request = $this->getWorkflowsRequest($app, $contentType); + $request = $this->getWorkflowsRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8152,16 +8056,16 @@ function ($exception) { /** * Create request for operation 'getWorkflows' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getWorkflows'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getWorkflowsRequest($app, string $contentType = self::contentTypes['getWorkflows'][0]) + public function getWorkflowsRequest(string $contentType = self::contentTypes['getWorkflows'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -8246,7 +8150,6 @@ public function getWorkflowsRequest($app, string $contentType = self::contentTyp * * Create a workflow. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddWorkflowDto $add_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWorkflow'] to see the possible values for this operation * @@ -8254,9 +8157,9 @@ public function getWorkflowsRequest($app, string $contentType = self::contentTyp * @throws \InvalidArgumentException * @return \Squidex\Client\Model\WorkflowsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postWorkflow($app, $add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) + public function postWorkflow($add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) { - list($response) = $this->postWorkflowWithHttpInfo($app, $add_workflow_dto, $contentType); + list($response) = $this->postWorkflowWithHttpInfo($add_workflow_dto, $contentType); return $response; } @@ -8265,7 +8168,6 @@ public function postWorkflow($app, $add_workflow_dto, string $contentType = self * * Create a workflow. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddWorkflowDto $add_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWorkflow'] to see the possible values for this operation * @@ -8273,9 +8175,9 @@ public function postWorkflow($app, $add_workflow_dto, string $contentType = self * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\WorkflowsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postWorkflowWithHttpInfo($app, $add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) + public function postWorkflowWithHttpInfo($add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) { - $request = $this->postWorkflowRequest($app, $add_workflow_dto, $contentType); + $request = $this->postWorkflowRequest($add_workflow_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -8412,16 +8314,15 @@ public function postWorkflowWithHttpInfo($app, $add_workflow_dto, string $conten * * Create a workflow. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddWorkflowDto $add_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWorkflow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postWorkflowAsync($app, $add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) + public function postWorkflowAsync($add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) { - return $this->postWorkflowAsyncWithHttpInfo($app, $add_workflow_dto, $contentType) + return $this->postWorkflowAsyncWithHttpInfo($add_workflow_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -8434,17 +8335,16 @@ function ($response) { * * Create a workflow. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddWorkflowDto $add_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWorkflow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postWorkflowAsyncWithHttpInfo($app, $add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) + public function postWorkflowAsyncWithHttpInfo($add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) { $returnType = '\Squidex\Client\Model\WorkflowsDto'; - $request = $this->postWorkflowRequest($app, $add_workflow_dto, $contentType); + $request = $this->postWorkflowRequest($add_workflow_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8485,17 +8385,17 @@ function ($exception) { /** * Create request for operation 'postWorkflow' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\AddWorkflowDto $add_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postWorkflow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postWorkflowRequest($app, $add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) + public function postWorkflowRequest($add_workflow_dto, string $contentType = self::contentTypes['postWorkflow'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -8594,7 +8494,6 @@ public function postWorkflowRequest($app, $add_workflow_dto, string $contentType * * Update a workflow. * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param \Squidex\Client\Model\UpdateWorkflowDto $update_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putWorkflow'] to see the possible values for this operation @@ -8603,9 +8502,9 @@ public function postWorkflowRequest($app, $add_workflow_dto, string $contentType * @throws \InvalidArgumentException * @return \Squidex\Client\Model\WorkflowsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putWorkflow($app, $id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) + public function putWorkflow($id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) { - list($response) = $this->putWorkflowWithHttpInfo($app, $id, $update_workflow_dto, $contentType); + list($response) = $this->putWorkflowWithHttpInfo($id, $update_workflow_dto, $contentType); return $response; } @@ -8614,7 +8513,6 @@ public function putWorkflow($app, $id, $update_workflow_dto, string $contentType * * Update a workflow. * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param \Squidex\Client\Model\UpdateWorkflowDto $update_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putWorkflow'] to see the possible values for this operation @@ -8623,9 +8521,9 @@ public function putWorkflow($app, $id, $update_workflow_dto, string $contentType * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\WorkflowsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putWorkflowWithHttpInfo($app, $id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) + public function putWorkflowWithHttpInfo($id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) { - $request = $this->putWorkflowRequest($app, $id, $update_workflow_dto, $contentType); + $request = $this->putWorkflowRequest($id, $update_workflow_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -8762,7 +8660,6 @@ public function putWorkflowWithHttpInfo($app, $id, $update_workflow_dto, string * * Update a workflow. * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param \Squidex\Client\Model\UpdateWorkflowDto $update_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putWorkflow'] to see the possible values for this operation @@ -8770,9 +8667,9 @@ public function putWorkflowWithHttpInfo($app, $id, $update_workflow_dto, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putWorkflowAsync($app, $id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) + public function putWorkflowAsync($id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) { - return $this->putWorkflowAsyncWithHttpInfo($app, $id, $update_workflow_dto, $contentType) + return $this->putWorkflowAsyncWithHttpInfo($id, $update_workflow_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -8785,7 +8682,6 @@ function ($response) { * * Update a workflow. * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param \Squidex\Client\Model\UpdateWorkflowDto $update_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putWorkflow'] to see the possible values for this operation @@ -8793,10 +8689,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putWorkflowAsyncWithHttpInfo($app, $id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) + public function putWorkflowAsyncWithHttpInfo($id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) { $returnType = '\Squidex\Client\Model\WorkflowsDto'; - $request = $this->putWorkflowRequest($app, $id, $update_workflow_dto, $contentType); + $request = $this->putWorkflowRequest($id, $update_workflow_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8837,7 +8733,6 @@ function ($exception) { /** * Create request for operation 'putWorkflow' * - * @param string $app The name of the app. (required) * @param string $id The ID of the workflow to update. (required) * @param \Squidex\Client\Model\UpdateWorkflowDto $update_workflow_dto The new workflow. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putWorkflow'] to see the possible values for this operation @@ -8845,10 +8740,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putWorkflowRequest($app, $id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) + public function putWorkflowRequest($id, $update_workflow_dto, string $contentType = self::contentTypes['putWorkflow'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -8962,16 +8858,15 @@ public function putWorkflowRequest($app, $id, $update_workflow_dto, string $cont * * Delete the app. * - * @param string $app The name of the app to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApp'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteApp($app, string $contentType = self::contentTypes['deleteApp'][0]) + public function deleteApp(string $contentType = self::contentTypes['deleteApp'][0]) { - $this->deleteAppWithHttpInfo($app, $contentType); + $this->deleteAppWithHttpInfo($contentType); } /** @@ -8979,16 +8874,15 @@ public function deleteApp($app, string $contentType = self::contentTypes['delete * * Delete the app. * - * @param string $app The name of the app to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApp'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteAppWithHttpInfo($app, string $contentType = self::contentTypes['deleteApp'][0]) + public function deleteAppWithHttpInfo(string $contentType = self::contentTypes['deleteApp'][0]) { - $request = $this->deleteAppRequest($app, $contentType); + $request = $this->deleteAppRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -9055,15 +8949,14 @@ public function deleteAppWithHttpInfo($app, string $contentType = self::contentT * * Delete the app. * - * @param string $app The name of the app to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApp'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAppAsync($app, string $contentType = self::contentTypes['deleteApp'][0]) + public function deleteAppAsync(string $contentType = self::contentTypes['deleteApp'][0]) { - return $this->deleteAppAsyncWithHttpInfo($app, $contentType) + return $this->deleteAppAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -9076,16 +8969,15 @@ function ($response) { * * Delete the app. * - * @param string $app The name of the app to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApp'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAppAsyncWithHttpInfo($app, string $contentType = self::contentTypes['deleteApp'][0]) + public function deleteAppAsyncWithHttpInfo(string $contentType = self::contentTypes['deleteApp'][0]) { $returnType = ''; - $request = $this->deleteAppRequest($app, $contentType); + $request = $this->deleteAppRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9113,16 +9005,16 @@ function ($exception) { /** * Create request for operation 'deleteApp' * - * @param string $app The name of the app to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteApp'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteAppRequest($app, string $contentType = self::contentTypes['deleteApp'][0]) + public function deleteAppRequest(string $contentType = self::contentTypes['deleteApp'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -9207,16 +9099,15 @@ public function deleteAppRequest($app, string $contentType = self::contentTypes[ * * Remove the app image. * - * @param string $app The name of the app to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteImage'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteImage($app, string $contentType = self::contentTypes['deleteImage'][0]) + public function deleteImage(string $contentType = self::contentTypes['deleteImage'][0]) { - list($response) = $this->deleteImageWithHttpInfo($app, $contentType); + list($response) = $this->deleteImageWithHttpInfo($contentType); return $response; } @@ -9225,16 +9116,15 @@ public function deleteImage($app, string $contentType = self::contentTypes['dele * * Remove the app image. * - * @param string $app The name of the app to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteImage'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteImageWithHttpInfo($app, string $contentType = self::contentTypes['deleteImage'][0]) + public function deleteImageWithHttpInfo(string $contentType = self::contentTypes['deleteImage'][0]) { - $request = $this->deleteImageRequest($app, $contentType); + $request = $this->deleteImageRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -9371,15 +9261,14 @@ public function deleteImageWithHttpInfo($app, string $contentType = self::conten * * Remove the app image. * - * @param string $app The name of the app to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteImageAsync($app, string $contentType = self::contentTypes['deleteImage'][0]) + public function deleteImageAsync(string $contentType = self::contentTypes['deleteImage'][0]) { - return $this->deleteImageAsyncWithHttpInfo($app, $contentType) + return $this->deleteImageAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -9392,16 +9281,15 @@ function ($response) { * * Remove the app image. * - * @param string $app The name of the app to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteImageAsyncWithHttpInfo($app, string $contentType = self::contentTypes['deleteImage'][0]) + public function deleteImageAsyncWithHttpInfo(string $contentType = self::contentTypes['deleteImage'][0]) { $returnType = '\Squidex\Client\Model\AppDto'; - $request = $this->deleteImageRequest($app, $contentType); + $request = $this->deleteImageRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9442,16 +9330,16 @@ function ($exception) { /** * Create request for operation 'deleteImage' * - * @param string $app The name of the app to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteImageRequest($app, string $contentType = self::contentTypes['deleteImage'][0]) + public function deleteImageRequest(string $contentType = self::contentTypes['deleteImage'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -9536,16 +9424,15 @@ public function deleteImageRequest($app, string $contentType = self::contentType * * Get an app by name. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto */ - public function getApp($app, string $contentType = self::contentTypes['getApp'][0]) + public function getApp(string $contentType = self::contentTypes['getApp'][0]) { - list($response) = $this->getAppWithHttpInfo($app, $contentType); + list($response) = $this->getAppWithHttpInfo($contentType); return $response; } @@ -9554,16 +9441,15 @@ public function getApp($app, string $contentType = self::contentTypes['getApp'][ * * Get an app by name. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAppWithHttpInfo($app, string $contentType = self::contentTypes['getApp'][0]) + public function getAppWithHttpInfo(string $contentType = self::contentTypes['getApp'][0]) { - $request = $this->getAppRequest($app, $contentType); + $request = $this->getAppRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -9677,15 +9563,14 @@ public function getAppWithHttpInfo($app, string $contentType = self::contentType * * Get an app by name. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAppAsync($app, string $contentType = self::contentTypes['getApp'][0]) + public function getAppAsync(string $contentType = self::contentTypes['getApp'][0]) { - return $this->getAppAsyncWithHttpInfo($app, $contentType) + return $this->getAppAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -9698,16 +9583,15 @@ function ($response) { * * Get an app by name. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAppAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getApp'][0]) + public function getAppAsyncWithHttpInfo(string $contentType = self::contentTypes['getApp'][0]) { $returnType = '\Squidex\Client\Model\AppDto'; - $request = $this->getAppRequest($app, $contentType); + $request = $this->getAppRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9748,16 +9632,16 @@ function ($exception) { /** * Create request for operation 'getApp' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getApp'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAppRequest($app, string $contentType = self::contentTypes['getApp'][0]) + public function getAppRequest(string $contentType = self::contentTypes['getApp'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -10785,7 +10669,6 @@ public function postAppRequest($create_app_dto, string $contentType = self::cont * * Update the app. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppDto $update_app_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putApp'] to see the possible values for this operation * @@ -10793,9 +10676,9 @@ public function postAppRequest($create_app_dto, string $contentType = self::cont * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putApp($app, $update_app_dto, string $contentType = self::contentTypes['putApp'][0]) + public function putApp($update_app_dto, string $contentType = self::contentTypes['putApp'][0]) { - list($response) = $this->putAppWithHttpInfo($app, $update_app_dto, $contentType); + list($response) = $this->putAppWithHttpInfo($update_app_dto, $contentType); return $response; } @@ -10804,7 +10687,6 @@ public function putApp($app, $update_app_dto, string $contentType = self::conten * * Update the app. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppDto $update_app_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putApp'] to see the possible values for this operation * @@ -10812,9 +10694,9 @@ public function putApp($app, $update_app_dto, string $contentType = self::conten * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putAppWithHttpInfo($app, $update_app_dto, string $contentType = self::contentTypes['putApp'][0]) + public function putAppWithHttpInfo($update_app_dto, string $contentType = self::contentTypes['putApp'][0]) { - $request = $this->putAppRequest($app, $update_app_dto, $contentType); + $request = $this->putAppRequest($update_app_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -10951,16 +10833,15 @@ public function putAppWithHttpInfo($app, $update_app_dto, string $contentType = * * Update the app. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppDto $update_app_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putApp'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAppAsync($app, $update_app_dto, string $contentType = self::contentTypes['putApp'][0]) + public function putAppAsync($update_app_dto, string $contentType = self::contentTypes['putApp'][0]) { - return $this->putAppAsyncWithHttpInfo($app, $update_app_dto, $contentType) + return $this->putAppAsyncWithHttpInfo($update_app_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -10973,17 +10854,16 @@ function ($response) { * * Update the app. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppDto $update_app_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putApp'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAppAsyncWithHttpInfo($app, $update_app_dto, string $contentType = self::contentTypes['putApp'][0]) + public function putAppAsyncWithHttpInfo($update_app_dto, string $contentType = self::contentTypes['putApp'][0]) { $returnType = '\Squidex\Client\Model\AppDto'; - $request = $this->putAppRequest($app, $update_app_dto, $contentType); + $request = $this->putAppRequest($update_app_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11024,17 +10904,17 @@ function ($exception) { /** * Create request for operation 'putApp' * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\UpdateAppDto $update_app_dto The values to update. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putApp'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putAppRequest($app, $update_app_dto, string $contentType = self::contentTypes['putApp'][0]) + public function putAppRequest($update_app_dto, string $contentType = self::contentTypes['putApp'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -11133,7 +11013,6 @@ public function putAppRequest($app, $update_app_dto, string $contentType = self: * * Transfer the app. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\TransferToTeamDto $transfer_to_team_dto The team information. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAppTeam'] to see the possible values for this operation * @@ -11141,9 +11020,9 @@ public function putAppRequest($app, $update_app_dto, string $contentType = self: * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putAppTeam($app, $transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) + public function putAppTeam($transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) { - list($response) = $this->putAppTeamWithHttpInfo($app, $transfer_to_team_dto, $contentType); + list($response) = $this->putAppTeamWithHttpInfo($transfer_to_team_dto, $contentType); return $response; } @@ -11152,7 +11031,6 @@ public function putAppTeam($app, $transfer_to_team_dto, string $contentType = se * * Transfer the app. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\TransferToTeamDto $transfer_to_team_dto The team information. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAppTeam'] to see the possible values for this operation * @@ -11160,9 +11038,9 @@ public function putAppTeam($app, $transfer_to_team_dto, string $contentType = se * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putAppTeamWithHttpInfo($app, $transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) + public function putAppTeamWithHttpInfo($transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) { - $request = $this->putAppTeamRequest($app, $transfer_to_team_dto, $contentType); + $request = $this->putAppTeamRequest($transfer_to_team_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -11299,16 +11177,15 @@ public function putAppTeamWithHttpInfo($app, $transfer_to_team_dto, string $cont * * Transfer the app. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\TransferToTeamDto $transfer_to_team_dto The team information. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAppTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAppTeamAsync($app, $transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) + public function putAppTeamAsync($transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) { - return $this->putAppTeamAsyncWithHttpInfo($app, $transfer_to_team_dto, $contentType) + return $this->putAppTeamAsyncWithHttpInfo($transfer_to_team_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -11321,17 +11198,16 @@ function ($response) { * * Transfer the app. * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\TransferToTeamDto $transfer_to_team_dto The team information. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAppTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAppTeamAsyncWithHttpInfo($app, $transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) + public function putAppTeamAsyncWithHttpInfo($transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) { $returnType = '\Squidex\Client\Model\AppDto'; - $request = $this->putAppTeamRequest($app, $transfer_to_team_dto, $contentType); + $request = $this->putAppTeamRequest($transfer_to_team_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11372,17 +11248,17 @@ function ($exception) { /** * Create request for operation 'putAppTeam' * - * @param string $app The name of the app to update. (required) * @param \Squidex\Client\Model\TransferToTeamDto $transfer_to_team_dto The team information. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAppTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putAppTeamRequest($app, $transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) + public function putAppTeamRequest($transfer_to_team_dto, string $contentType = self::contentTypes['putAppTeam'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -11481,17 +11357,18 @@ public function putAppTeamRequest($app, $transfer_to_team_dto, string $contentTy * * Upload the app image. * - * @param string $app The name of the app to update. (required) * @param \SplFileObject $file file (optional) + * @param string $file_url file_url (optional) + * @param string $file_name file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function uploadImage($app, $file = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImage($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0]) { - list($response) = $this->uploadImageWithHttpInfo($app, $file, $contentType); + list($response) = $this->uploadImageWithHttpInfo($file, $file_url, $file_name, $contentType); return $response; } @@ -11500,17 +11377,18 @@ public function uploadImage($app, $file = null, string $contentType = self::cont * * Upload the app image. * - * @param string $app The name of the app to update. (required) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function uploadImageWithHttpInfo($app, $file = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImageWithHttpInfo($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0]) { - $request = $this->uploadImageRequest($app, $file, $contentType); + $request = $this->uploadImageRequest($file, $file_url, $file_name, $contentType); try { $options = $this->createHttpClientOption(); @@ -11647,16 +11525,17 @@ public function uploadImageWithHttpInfo($app, $file = null, string $contentType * * Upload the app image. * - * @param string $app The name of the app to update. (required) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadImageAsync($app, $file = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImageAsync($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0]) { - return $this->uploadImageAsyncWithHttpInfo($app, $file, $contentType) + return $this->uploadImageAsyncWithHttpInfo($file, $file_url, $file_name, $contentType) ->then( function ($response) { return $response[0]; @@ -11669,17 +11548,18 @@ function ($response) { * * Upload the app image. * - * @param string $app The name of the app to update. (required) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function uploadImageAsyncWithHttpInfo($app, $file = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImageAsyncWithHttpInfo($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0]) { $returnType = '\Squidex\Client\Model\AppDto'; - $request = $this->uploadImageRequest($app, $file, $contentType); + $request = $this->uploadImageRequest($file, $file_url, $file_name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11720,17 +11600,19 @@ function ($exception) { /** * Create request for operation 'uploadImage' * - * @param string $app The name of the app to update. (required) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function uploadImageRequest($app, $file = null, string $contentType = self::contentTypes['uploadImage'][0]) + public function uploadImageRequest($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -11739,6 +11621,8 @@ public function uploadImageRequest($app, $file = null, string $contentType = sel + + $resourcePath = '/api/apps/{app}/image'; $formParams = []; $queryParams = []; @@ -11769,6 +11653,14 @@ public function uploadImageRequest($app, $file = null, string $contentType = sel ); } } + // form params + if ($file_url !== null) { + $formParams['fileUrl'] = ObjectSerializer::toFormValue($file_url); + } + // form params + if ($file_name !== null) { + $formParams['fileName'] = ObjectSerializer::toFormValue($file_name); + } $headers = $this->headerSelector->selectHeaders( ['application/json', ], diff --git a/lib/Api/AssetsApi.php b/lib/Api/AssetsApi.php index 63a7d8c..20964f7 100644 --- a/lib/Api/AssetsApi.php +++ b/lib/Api/AssetsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -714,7 +714,6 @@ public function getAssetContentRequest($id, $version = null, $cache = null, $dow * * Get the asset content. * - * @param string $app The name of the app. (required) * @param string $id_or_slug The id or slug of the asset. (required) * @param string $more Optional suffix that can be used to seo-optimize the link to the image Has not effect. (required) * @param int $version The optional version of the asset. (optional) @@ -738,9 +737,9 @@ public function getAssetContentRequest($id, $version = null, $cache = null, $dow * @throws \InvalidArgumentException * @return \SplFileObject|\Squidex\Client\Model\ErrorDto */ - public function getAssetContentBySlug($app, $id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) + public function getAssetContentBySlug($id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) { - list($response) = $this->getAssetContentBySlugWithHttpInfo($app, $id_or_slug, $more, $version, $cache, $download, $width, $height, $quality, $mode, $bg, $focus_x, $focus_y, $nofocus, $auto, $force, $deleted, $format, $contentType); + list($response) = $this->getAssetContentBySlugWithHttpInfo($id_or_slug, $more, $version, $cache, $download, $width, $height, $quality, $mode, $bg, $focus_x, $focus_y, $nofocus, $auto, $force, $deleted, $format, $contentType); return $response; } @@ -749,7 +748,6 @@ public function getAssetContentBySlug($app, $id_or_slug, $more, $version = null, * * Get the asset content. * - * @param string $app The name of the app. (required) * @param string $id_or_slug The id or slug of the asset. (required) * @param string $more Optional suffix that can be used to seo-optimize the link to the image Has not effect. (required) * @param int $version The optional version of the asset. (optional) @@ -773,9 +771,9 @@ public function getAssetContentBySlug($app, $id_or_slug, $more, $version = null, * @throws \InvalidArgumentException * @return array of \SplFileObject|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAssetContentBySlugWithHttpInfo($app, $id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) + public function getAssetContentBySlugWithHttpInfo($id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) { - $request = $this->getAssetContentBySlugRequest($app, $id_or_slug, $more, $version, $cache, $download, $width, $height, $quality, $mode, $bg, $focus_x, $focus_y, $nofocus, $auto, $force, $deleted, $format, $contentType); + $request = $this->getAssetContentBySlugRequest($id_or_slug, $more, $version, $cache, $download, $width, $height, $quality, $mode, $bg, $focus_x, $focus_y, $nofocus, $auto, $force, $deleted, $format, $contentType); try { $options = $this->createHttpClientOption(); @@ -889,7 +887,6 @@ public function getAssetContentBySlugWithHttpInfo($app, $id_or_slug, $more, $ver * * Get the asset content. * - * @param string $app The name of the app. (required) * @param string $id_or_slug The id or slug of the asset. (required) * @param string $more Optional suffix that can be used to seo-optimize the link to the image Has not effect. (required) * @param int $version The optional version of the asset. (optional) @@ -912,9 +909,9 @@ public function getAssetContentBySlugWithHttpInfo($app, $id_or_slug, $more, $ver * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetContentBySlugAsync($app, $id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) + public function getAssetContentBySlugAsync($id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) { - return $this->getAssetContentBySlugAsyncWithHttpInfo($app, $id_or_slug, $more, $version, $cache, $download, $width, $height, $quality, $mode, $bg, $focus_x, $focus_y, $nofocus, $auto, $force, $deleted, $format, $contentType) + return $this->getAssetContentBySlugAsyncWithHttpInfo($id_or_slug, $more, $version, $cache, $download, $width, $height, $quality, $mode, $bg, $focus_x, $focus_y, $nofocus, $auto, $force, $deleted, $format, $contentType) ->then( function ($response) { return $response[0]; @@ -927,7 +924,6 @@ function ($response) { * * Get the asset content. * - * @param string $app The name of the app. (required) * @param string $id_or_slug The id or slug of the asset. (required) * @param string $more Optional suffix that can be used to seo-optimize the link to the image Has not effect. (required) * @param int $version The optional version of the asset. (optional) @@ -950,10 +946,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetContentBySlugAsyncWithHttpInfo($app, $id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) + public function getAssetContentBySlugAsyncWithHttpInfo($id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) { $returnType = '\SplFileObject'; - $request = $this->getAssetContentBySlugRequest($app, $id_or_slug, $more, $version, $cache, $download, $width, $height, $quality, $mode, $bg, $focus_x, $focus_y, $nofocus, $auto, $force, $deleted, $format, $contentType); + $request = $this->getAssetContentBySlugRequest($id_or_slug, $more, $version, $cache, $download, $width, $height, $quality, $mode, $bg, $focus_x, $focus_y, $nofocus, $auto, $force, $deleted, $format, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -994,7 +990,6 @@ function ($exception) { /** * Create request for operation 'getAssetContentBySlug' * - * @param string $app The name of the app. (required) * @param string $id_or_slug The id or slug of the asset. (required) * @param string $more Optional suffix that can be used to seo-optimize the link to the image Has not effect. (required) * @param int $version The optional version of the asset. (optional) @@ -1017,10 +1012,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAssetContentBySlugRequest($app, $id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) + public function getAssetContentBySlugRequest($id_or_slug, $more, $version = null, $cache = null, $download = null, $width = null, $height = null, $quality = null, $mode = null, $bg = null, $focus_x = null, $focus_y = null, $nofocus = null, $auto = null, $force = null, $deleted = null, $format = null, string $contentType = self::contentTypes['getAssetContentBySlug'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1285,7 +1281,6 @@ public function getAssetContentBySlugRequest($app, $id_or_slug, $more, $version * * Delete an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAssetFolder'] to see the possible values for this operation * @@ -1293,9 +1288,9 @@ public function getAssetContentBySlugRequest($app, $id_or_slug, $more, $version * @throws \InvalidArgumentException * @return void */ - public function deleteAssetFolder($app, $id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) + public function deleteAssetFolder($id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) { - $this->deleteAssetFolderWithHttpInfo($app, $id, $contentType); + $this->deleteAssetFolderWithHttpInfo($id, $contentType); } /** @@ -1303,7 +1298,6 @@ public function deleteAssetFolder($app, $id, string $contentType = self::content * * Delete an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAssetFolder'] to see the possible values for this operation * @@ -1311,9 +1305,9 @@ public function deleteAssetFolder($app, $id, string $contentType = self::content * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteAssetFolderWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) + public function deleteAssetFolderWithHttpInfo($id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) { - $request = $this->deleteAssetFolderRequest($app, $id, $contentType); + $request = $this->deleteAssetFolderRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1380,16 +1374,15 @@ public function deleteAssetFolderWithHttpInfo($app, $id, string $contentType = s * * Delete an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAssetFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAssetFolderAsync($app, $id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) + public function deleteAssetFolderAsync($id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) { - return $this->deleteAssetFolderAsyncWithHttpInfo($app, $id, $contentType) + return $this->deleteAssetFolderAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -1402,17 +1395,16 @@ function ($response) { * * Delete an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAssetFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAssetFolderAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) + public function deleteAssetFolderAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) { $returnType = ''; - $request = $this->deleteAssetFolderRequest($app, $id, $contentType); + $request = $this->deleteAssetFolderRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1440,17 +1432,17 @@ function ($exception) { /** * Create request for operation 'deleteAssetFolder' * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteAssetFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteAssetFolderRequest($app, $id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) + public function deleteAssetFolderRequest($id, string $contentType = self::contentTypes['deleteAssetFolder'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1550,7 +1542,6 @@ public function deleteAssetFolderRequest($app, $id, string $contentType = self:: * * Get asset folders. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param AssetFolderScope $scope The scope of the query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetFolders'] to see the possible values for this operation @@ -1559,9 +1550,9 @@ public function deleteAssetFolderRequest($app, $id, string $contentType = self:: * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetFoldersDto|\Squidex\Client\Model\ErrorDto */ - public function getAssetFolders($app, $parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) + public function getAssetFolders($parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) { - list($response) = $this->getAssetFoldersWithHttpInfo($app, $parent_id, $scope, $contentType); + list($response) = $this->getAssetFoldersWithHttpInfo($parent_id, $scope, $contentType); return $response; } @@ -1570,7 +1561,6 @@ public function getAssetFolders($app, $parent_id = null, $scope = null, string $ * * Get asset folders. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param AssetFolderScope $scope The scope of the query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetFolders'] to see the possible values for this operation @@ -1579,9 +1569,9 @@ public function getAssetFolders($app, $parent_id = null, $scope = null, string $ * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetFoldersDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAssetFoldersWithHttpInfo($app, $parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) + public function getAssetFoldersWithHttpInfo($parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) { - $request = $this->getAssetFoldersRequest($app, $parent_id, $scope, $contentType); + $request = $this->getAssetFoldersRequest($parent_id, $scope, $contentType); try { $options = $this->createHttpClientOption(); @@ -1695,7 +1685,6 @@ public function getAssetFoldersWithHttpInfo($app, $parent_id = null, $scope = nu * * Get asset folders. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param AssetFolderScope $scope The scope of the query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetFolders'] to see the possible values for this operation @@ -1703,9 +1692,9 @@ public function getAssetFoldersWithHttpInfo($app, $parent_id = null, $scope = nu * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetFoldersAsync($app, $parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) + public function getAssetFoldersAsync($parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) { - return $this->getAssetFoldersAsyncWithHttpInfo($app, $parent_id, $scope, $contentType) + return $this->getAssetFoldersAsyncWithHttpInfo($parent_id, $scope, $contentType) ->then( function ($response) { return $response[0]; @@ -1718,7 +1707,6 @@ function ($response) { * * Get asset folders. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param AssetFolderScope $scope The scope of the query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetFolders'] to see the possible values for this operation @@ -1726,10 +1714,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetFoldersAsyncWithHttpInfo($app, $parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) + public function getAssetFoldersAsyncWithHttpInfo($parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) { $returnType = '\Squidex\Client\Model\AssetFoldersDto'; - $request = $this->getAssetFoldersRequest($app, $parent_id, $scope, $contentType); + $request = $this->getAssetFoldersRequest($parent_id, $scope, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1770,7 +1758,6 @@ function ($exception) { /** * Create request for operation 'getAssetFolders' * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param AssetFolderScope $scope The scope of the query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAssetFolders'] to see the possible values for this operation @@ -1778,10 +1765,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAssetFoldersRequest($app, $parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) + public function getAssetFoldersRequest($parent_id = null, $scope = null, string $contentType = self::contentTypes['getAssetFolders'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1886,7 +1874,6 @@ public function getAssetFoldersRequest($app, $parent_id = null, $scope = null, s * * Create an asset folder. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateAssetFolderDto $create_asset_folder_dto The asset folder object that needs to be added to the App. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAssetFolder'] to see the possible values for this operation * @@ -1894,9 +1881,9 @@ public function getAssetFoldersRequest($app, $parent_id = null, $scope = null, s * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetFolderDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postAssetFolder($app, $create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) + public function postAssetFolder($create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) { - list($response) = $this->postAssetFolderWithHttpInfo($app, $create_asset_folder_dto, $contentType); + list($response) = $this->postAssetFolderWithHttpInfo($create_asset_folder_dto, $contentType); return $response; } @@ -1905,7 +1892,6 @@ public function postAssetFolder($app, $create_asset_folder_dto, string $contentT * * Create an asset folder. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateAssetFolderDto $create_asset_folder_dto The asset folder object that needs to be added to the App. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAssetFolder'] to see the possible values for this operation * @@ -1913,9 +1899,9 @@ public function postAssetFolder($app, $create_asset_folder_dto, string $contentT * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetFolderDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postAssetFolderWithHttpInfo($app, $create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) + public function postAssetFolderWithHttpInfo($create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) { - $request = $this->postAssetFolderRequest($app, $create_asset_folder_dto, $contentType); + $request = $this->postAssetFolderRequest($create_asset_folder_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -2052,16 +2038,15 @@ public function postAssetFolderWithHttpInfo($app, $create_asset_folder_dto, stri * * Create an asset folder. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateAssetFolderDto $create_asset_folder_dto The asset folder object that needs to be added to the App. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAssetFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postAssetFolderAsync($app, $create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) + public function postAssetFolderAsync($create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) { - return $this->postAssetFolderAsyncWithHttpInfo($app, $create_asset_folder_dto, $contentType) + return $this->postAssetFolderAsyncWithHttpInfo($create_asset_folder_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -2074,17 +2059,16 @@ function ($response) { * * Create an asset folder. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateAssetFolderDto $create_asset_folder_dto The asset folder object that needs to be added to the App. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAssetFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postAssetFolderAsyncWithHttpInfo($app, $create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) + public function postAssetFolderAsyncWithHttpInfo($create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) { $returnType = '\Squidex\Client\Model\AssetFolderDto'; - $request = $this->postAssetFolderRequest($app, $create_asset_folder_dto, $contentType); + $request = $this->postAssetFolderRequest($create_asset_folder_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2125,17 +2109,17 @@ function ($exception) { /** * Create request for operation 'postAssetFolder' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateAssetFolderDto $create_asset_folder_dto The asset folder object that needs to be added to the App. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAssetFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postAssetFolderRequest($app, $create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) + public function postAssetFolderRequest($create_asset_folder_dto, string $contentType = self::contentTypes['postAssetFolder'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2234,7 +2218,6 @@ public function postAssetFolderRequest($app, $create_asset_folder_dto, string $c * * Update an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\RenameAssetFolderDto $rename_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolder'] to see the possible values for this operation @@ -2243,9 +2226,9 @@ public function postAssetFolderRequest($app, $create_asset_folder_dto, string $c * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetFolderDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putAssetFolder($app, $id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) + public function putAssetFolder($id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) { - list($response) = $this->putAssetFolderWithHttpInfo($app, $id, $rename_asset_folder_dto, $contentType); + list($response) = $this->putAssetFolderWithHttpInfo($id, $rename_asset_folder_dto, $contentType); return $response; } @@ -2254,7 +2237,6 @@ public function putAssetFolder($app, $id, $rename_asset_folder_dto, string $cont * * Update an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\RenameAssetFolderDto $rename_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolder'] to see the possible values for this operation @@ -2263,9 +2245,9 @@ public function putAssetFolder($app, $id, $rename_asset_folder_dto, string $cont * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetFolderDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putAssetFolderWithHttpInfo($app, $id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) + public function putAssetFolderWithHttpInfo($id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) { - $request = $this->putAssetFolderRequest($app, $id, $rename_asset_folder_dto, $contentType); + $request = $this->putAssetFolderRequest($id, $rename_asset_folder_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -2402,7 +2384,6 @@ public function putAssetFolderWithHttpInfo($app, $id, $rename_asset_folder_dto, * * Update an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\RenameAssetFolderDto $rename_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolder'] to see the possible values for this operation @@ -2410,9 +2391,9 @@ public function putAssetFolderWithHttpInfo($app, $id, $rename_asset_folder_dto, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetFolderAsync($app, $id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) + public function putAssetFolderAsync($id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) { - return $this->putAssetFolderAsyncWithHttpInfo($app, $id, $rename_asset_folder_dto, $contentType) + return $this->putAssetFolderAsyncWithHttpInfo($id, $rename_asset_folder_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -2425,7 +2406,6 @@ function ($response) { * * Update an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\RenameAssetFolderDto $rename_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolder'] to see the possible values for this operation @@ -2433,10 +2413,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetFolderAsyncWithHttpInfo($app, $id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) + public function putAssetFolderAsyncWithHttpInfo($id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) { $returnType = '\Squidex\Client\Model\AssetFolderDto'; - $request = $this->putAssetFolderRequest($app, $id, $rename_asset_folder_dto, $contentType); + $request = $this->putAssetFolderRequest($id, $rename_asset_folder_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2477,7 +2457,6 @@ function ($exception) { /** * Create request for operation 'putAssetFolder' * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\RenameAssetFolderDto $rename_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolder'] to see the possible values for this operation @@ -2485,10 +2464,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putAssetFolderRequest($app, $id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) + public function putAssetFolderRequest($id, $rename_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolder'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2602,7 +2582,6 @@ public function putAssetFolderRequest($app, $id, $rename_asset_folder_dto, strin * * Move an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\MoveAssetFolderDto $move_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolderParent'] to see the possible values for this operation @@ -2611,9 +2590,9 @@ public function putAssetFolderRequest($app, $id, $rename_asset_folder_dto, strin * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetFolderDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putAssetFolderParent($app, $id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) + public function putAssetFolderParent($id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) { - list($response) = $this->putAssetFolderParentWithHttpInfo($app, $id, $move_asset_folder_dto, $contentType); + list($response) = $this->putAssetFolderParentWithHttpInfo($id, $move_asset_folder_dto, $contentType); return $response; } @@ -2622,7 +2601,6 @@ public function putAssetFolderParent($app, $id, $move_asset_folder_dto, string $ * * Move an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\MoveAssetFolderDto $move_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolderParent'] to see the possible values for this operation @@ -2631,9 +2609,9 @@ public function putAssetFolderParent($app, $id, $move_asset_folder_dto, string $ * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetFolderDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putAssetFolderParentWithHttpInfo($app, $id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) + public function putAssetFolderParentWithHttpInfo($id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) { - $request = $this->putAssetFolderParentRequest($app, $id, $move_asset_folder_dto, $contentType); + $request = $this->putAssetFolderParentRequest($id, $move_asset_folder_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -2770,7 +2748,6 @@ public function putAssetFolderParentWithHttpInfo($app, $id, $move_asset_folder_d * * Move an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\MoveAssetFolderDto $move_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolderParent'] to see the possible values for this operation @@ -2778,9 +2755,9 @@ public function putAssetFolderParentWithHttpInfo($app, $id, $move_asset_folder_d * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetFolderParentAsync($app, $id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) + public function putAssetFolderParentAsync($id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) { - return $this->putAssetFolderParentAsyncWithHttpInfo($app, $id, $move_asset_folder_dto, $contentType) + return $this->putAssetFolderParentAsyncWithHttpInfo($id, $move_asset_folder_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -2793,7 +2770,6 @@ function ($response) { * * Move an asset folder. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\MoveAssetFolderDto $move_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolderParent'] to see the possible values for this operation @@ -2801,10 +2777,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetFolderParentAsyncWithHttpInfo($app, $id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) + public function putAssetFolderParentAsyncWithHttpInfo($id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) { $returnType = '\Squidex\Client\Model\AssetFolderDto'; - $request = $this->putAssetFolderParentRequest($app, $id, $move_asset_folder_dto, $contentType); + $request = $this->putAssetFolderParentRequest($id, $move_asset_folder_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2845,7 +2821,6 @@ function ($exception) { /** * Create request for operation 'putAssetFolderParent' * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset folder. (required) * @param \Squidex\Client\Model\MoveAssetFolderDto $move_asset_folder_dto The asset folder object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetFolderParent'] to see the possible values for this operation @@ -2853,10 +2828,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putAssetFolderParentRequest($app, $id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) + public function putAssetFolderParentRequest($id, $move_asset_folder_dto, string $contentType = self::contentTypes['putAssetFolderParent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2970,7 +2946,6 @@ public function putAssetFolderParentRequest($app, $id, $move_asset_folder_dto, s * * Bulk update assets. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\BulkUpdateAssetsDto $bulk_update_assets_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAssets'] to see the possible values for this operation * @@ -2978,9 +2953,9 @@ public function putAssetFolderParentRequest($app, $id, $move_asset_folder_dto, s * @throws \InvalidArgumentException * @return \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function bulkUpdateAssets($app, $bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) + public function bulkUpdateAssets($bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) { - list($response) = $this->bulkUpdateAssetsWithHttpInfo($app, $bulk_update_assets_dto, $contentType); + list($response) = $this->bulkUpdateAssetsWithHttpInfo($bulk_update_assets_dto, $contentType); return $response; } @@ -2989,7 +2964,6 @@ public function bulkUpdateAssets($app, $bulk_update_assets_dto, string $contentT * * Bulk update assets. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\BulkUpdateAssetsDto $bulk_update_assets_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAssets'] to see the possible values for this operation * @@ -2997,9 +2971,9 @@ public function bulkUpdateAssets($app, $bulk_update_assets_dto, string $contentT * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function bulkUpdateAssetsWithHttpInfo($app, $bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) + public function bulkUpdateAssetsWithHttpInfo($bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) { - $request = $this->bulkUpdateAssetsRequest($app, $bulk_update_assets_dto, $contentType); + $request = $this->bulkUpdateAssetsRequest($bulk_update_assets_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -3136,16 +3110,15 @@ public function bulkUpdateAssetsWithHttpInfo($app, $bulk_update_assets_dto, stri * * Bulk update assets. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\BulkUpdateAssetsDto $bulk_update_assets_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAssets'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkUpdateAssetsAsync($app, $bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) + public function bulkUpdateAssetsAsync($bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) { - return $this->bulkUpdateAssetsAsyncWithHttpInfo($app, $bulk_update_assets_dto, $contentType) + return $this->bulkUpdateAssetsAsyncWithHttpInfo($bulk_update_assets_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -3158,17 +3131,16 @@ function ($response) { * * Bulk update assets. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\BulkUpdateAssetsDto $bulk_update_assets_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAssets'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkUpdateAssetsAsyncWithHttpInfo($app, $bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) + public function bulkUpdateAssetsAsyncWithHttpInfo($bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) { $returnType = '\Squidex\Client\Model\BulkResultDto[]'; - $request = $this->bulkUpdateAssetsRequest($app, $bulk_update_assets_dto, $contentType); + $request = $this->bulkUpdateAssetsRequest($bulk_update_assets_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3209,17 +3181,17 @@ function ($exception) { /** * Create request for operation 'bulkUpdateAssets' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\BulkUpdateAssetsDto $bulk_update_assets_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAssets'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function bulkUpdateAssetsRequest($app, $bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) + public function bulkUpdateAssetsRequest($bulk_update_assets_dto, string $contentType = self::contentTypes['bulkUpdateAssets'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3318,7 +3290,6 @@ public function bulkUpdateAssetsRequest($app, $bulk_update_assets_dto, string $c * * Delete an asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to delete. (required) * @param bool $check_referrers True to check referrers of this asset. (optional) * @param bool $permanent True to delete the asset permanently. (optional) @@ -3328,9 +3299,9 @@ public function bulkUpdateAssetsRequest($app, $bulk_update_assets_dto, string $c * @throws \InvalidArgumentException * @return void */ - public function deleteAsset($app, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) + public function deleteAsset($id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) { - $this->deleteAssetWithHttpInfo($app, $id, $check_referrers, $permanent, $contentType); + $this->deleteAssetWithHttpInfo($id, $check_referrers, $permanent, $contentType); } /** @@ -3338,7 +3309,6 @@ public function deleteAsset($app, $id, $check_referrers = null, $permanent = nul * * Delete an asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to delete. (required) * @param bool $check_referrers True to check referrers of this asset. (optional) * @param bool $permanent True to delete the asset permanently. (optional) @@ -3348,9 +3318,9 @@ public function deleteAsset($app, $id, $check_referrers = null, $permanent = nul * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteAssetWithHttpInfo($app, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) + public function deleteAssetWithHttpInfo($id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) { - $request = $this->deleteAssetRequest($app, $id, $check_referrers, $permanent, $contentType); + $request = $this->deleteAssetRequest($id, $check_referrers, $permanent, $contentType); try { $options = $this->createHttpClientOption(); @@ -3417,7 +3387,6 @@ public function deleteAssetWithHttpInfo($app, $id, $check_referrers = null, $per * * Delete an asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to delete. (required) * @param bool $check_referrers True to check referrers of this asset. (optional) * @param bool $permanent True to delete the asset permanently. (optional) @@ -3426,9 +3395,9 @@ public function deleteAssetWithHttpInfo($app, $id, $check_referrers = null, $per * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAssetAsync($app, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) + public function deleteAssetAsync($id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) { - return $this->deleteAssetAsyncWithHttpInfo($app, $id, $check_referrers, $permanent, $contentType) + return $this->deleteAssetAsyncWithHttpInfo($id, $check_referrers, $permanent, $contentType) ->then( function ($response) { return $response[0]; @@ -3441,7 +3410,6 @@ function ($response) { * * Delete an asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to delete. (required) * @param bool $check_referrers True to check referrers of this asset. (optional) * @param bool $permanent True to delete the asset permanently. (optional) @@ -3450,10 +3418,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAssetAsyncWithHttpInfo($app, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) + public function deleteAssetAsyncWithHttpInfo($id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) { $returnType = ''; - $request = $this->deleteAssetRequest($app, $id, $check_referrers, $permanent, $contentType); + $request = $this->deleteAssetRequest($id, $check_referrers, $permanent, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3481,7 +3449,6 @@ function ($exception) { /** * Create request for operation 'deleteAsset' * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to delete. (required) * @param bool $check_referrers True to check referrers of this asset. (optional) * @param bool $permanent True to delete the asset permanently. (optional) @@ -3490,10 +3457,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteAssetRequest($app, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) + public function deleteAssetRequest($id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteAsset'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3613,7 +3581,6 @@ public function deleteAssetRequest($app, $id, $check_referrers = null, $permanen * * Get an asset by id. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsset'] to see the possible values for this operation * @@ -3621,9 +3588,9 @@ public function deleteAssetRequest($app, $id, $check_referrers = null, $permanen * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto */ - public function getAsset($app, $id, string $contentType = self::contentTypes['getAsset'][0]) + public function getAsset($id, string $contentType = self::contentTypes['getAsset'][0]) { - list($response) = $this->getAssetWithHttpInfo($app, $id, $contentType); + list($response) = $this->getAssetWithHttpInfo($id, $contentType); return $response; } @@ -3632,7 +3599,6 @@ public function getAsset($app, $id, string $contentType = self::contentTypes['ge * * Get an asset by id. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsset'] to see the possible values for this operation * @@ -3640,9 +3606,9 @@ public function getAsset($app, $id, string $contentType = self::contentTypes['ge * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAssetWithHttpInfo($app, $id, string $contentType = self::contentTypes['getAsset'][0]) + public function getAssetWithHttpInfo($id, string $contentType = self::contentTypes['getAsset'][0]) { - $request = $this->getAssetRequest($app, $id, $contentType); + $request = $this->getAssetRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -3756,16 +3722,15 @@ public function getAssetWithHttpInfo($app, $id, string $contentType = self::cont * * Get an asset by id. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetAsync($app, $id, string $contentType = self::contentTypes['getAsset'][0]) + public function getAssetAsync($id, string $contentType = self::contentTypes['getAsset'][0]) { - return $this->getAssetAsyncWithHttpInfo($app, $id, $contentType) + return $this->getAssetAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -3778,17 +3743,16 @@ function ($response) { * * Get an asset by id. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['getAsset'][0]) + public function getAssetAsyncWithHttpInfo($id, string $contentType = self::contentTypes['getAsset'][0]) { $returnType = '\Squidex\Client\Model\AssetDto'; - $request = $this->getAssetRequest($app, $id, $contentType); + $request = $this->getAssetRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3829,17 +3793,17 @@ function ($exception) { /** * Create request for operation 'getAsset' * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAssetRequest($app, $id, string $contentType = self::contentTypes['getAsset'][0]) + public function getAssetRequest($id, string $contentType = self::contentTypes['getAsset'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3939,7 +3903,6 @@ public function getAssetRequest($app, $id, string $contentType = self::contentTy * * Get assets. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $ids The optional asset ids. (optional) * @param string $q The optional json query. (optional) @@ -3955,9 +3918,9 @@ public function getAssetRequest($app, $id, string $contentType = self::contentTy * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetsDto|\Squidex\Client\Model\ErrorDto */ - public function getAssets($app, $parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) + public function getAssets($parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) { - list($response) = $this->getAssetsWithHttpInfo($app, $parent_id, $ids, $q, $top, $skip, $orderby, $filter, $x_no_total, $x_no_slow_total, $contentType); + list($response) = $this->getAssetsWithHttpInfo($parent_id, $ids, $q, $top, $skip, $orderby, $filter, $x_no_total, $x_no_slow_total, $contentType); return $response; } @@ -3966,7 +3929,6 @@ public function getAssets($app, $parent_id = null, $ids = null, $q = null, $top * * Get assets. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $ids The optional asset ids. (optional) * @param string $q The optional json query. (optional) @@ -3982,9 +3944,9 @@ public function getAssets($app, $parent_id = null, $ids = null, $q = null, $top * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAssetsWithHttpInfo($app, $parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) + public function getAssetsWithHttpInfo($parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) { - $request = $this->getAssetsRequest($app, $parent_id, $ids, $q, $top, $skip, $orderby, $filter, $x_no_total, $x_no_slow_total, $contentType); + $request = $this->getAssetsRequest($parent_id, $ids, $q, $top, $skip, $orderby, $filter, $x_no_total, $x_no_slow_total, $contentType); try { $options = $this->createHttpClientOption(); @@ -4098,7 +4060,6 @@ public function getAssetsWithHttpInfo($app, $parent_id = null, $ids = null, $q = * * Get assets. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $ids The optional asset ids. (optional) * @param string $q The optional json query. (optional) @@ -4113,9 +4074,9 @@ public function getAssetsWithHttpInfo($app, $parent_id = null, $ids = null, $q = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetsAsync($app, $parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) + public function getAssetsAsync($parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) { - return $this->getAssetsAsyncWithHttpInfo($app, $parent_id, $ids, $q, $top, $skip, $orderby, $filter, $x_no_total, $x_no_slow_total, $contentType) + return $this->getAssetsAsyncWithHttpInfo($parent_id, $ids, $q, $top, $skip, $orderby, $filter, $x_no_total, $x_no_slow_total, $contentType) ->then( function ($response) { return $response[0]; @@ -4128,7 +4089,6 @@ function ($response) { * * Get assets. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $ids The optional asset ids. (optional) * @param string $q The optional json query. (optional) @@ -4143,10 +4103,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetsAsyncWithHttpInfo($app, $parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) + public function getAssetsAsyncWithHttpInfo($parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) { $returnType = '\Squidex\Client\Model\AssetsDto'; - $request = $this->getAssetsRequest($app, $parent_id, $ids, $q, $top, $skip, $orderby, $filter, $x_no_total, $x_no_slow_total, $contentType); + $request = $this->getAssetsRequest($parent_id, $ids, $q, $top, $skip, $orderby, $filter, $x_no_total, $x_no_slow_total, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4187,7 +4147,6 @@ function ($exception) { /** * Create request for operation 'getAssets' * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $ids The optional asset ids. (optional) * @param string $q The optional json query. (optional) @@ -4202,10 +4161,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAssetsRequest($app, $parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) + public function getAssetsRequest($parent_id = null, $ids = null, $q = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssets'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4370,7 +4330,6 @@ public function getAssetsRequest($app, $parent_id = null, $ids = null, $q = null * * Get assets. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param bool $x_no_total Do not return the total amount. (optional) * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) @@ -4380,9 +4339,9 @@ public function getAssetsRequest($app, $parent_id = null, $ids = null, $q = null * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function getAssetsPost($app, $query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) + public function getAssetsPost($query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) { - list($response) = $this->getAssetsPostWithHttpInfo($app, $query_dto, $x_no_total, $x_no_slow_total, $contentType); + list($response) = $this->getAssetsPostWithHttpInfo($query_dto, $x_no_total, $x_no_slow_total, $contentType); return $response; } @@ -4391,7 +4350,6 @@ public function getAssetsPost($app, $query_dto, $x_no_total = null, $x_no_slow_t * * Get assets. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param bool $x_no_total Do not return the total amount. (optional) * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) @@ -4401,9 +4359,9 @@ public function getAssetsPost($app, $query_dto, $x_no_total = null, $x_no_slow_t * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAssetsPostWithHttpInfo($app, $query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) + public function getAssetsPostWithHttpInfo($query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) { - $request = $this->getAssetsPostRequest($app, $query_dto, $x_no_total, $x_no_slow_total, $contentType); + $request = $this->getAssetsPostRequest($query_dto, $x_no_total, $x_no_slow_total, $contentType); try { $options = $this->createHttpClientOption(); @@ -4540,7 +4498,6 @@ public function getAssetsPostWithHttpInfo($app, $query_dto, $x_no_total = null, * * Get assets. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param bool $x_no_total Do not return the total amount. (optional) * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) @@ -4549,9 +4506,9 @@ public function getAssetsPostWithHttpInfo($app, $query_dto, $x_no_total = null, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetsPostAsync($app, $query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) + public function getAssetsPostAsync($query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) { - return $this->getAssetsPostAsyncWithHttpInfo($app, $query_dto, $x_no_total, $x_no_slow_total, $contentType) + return $this->getAssetsPostAsyncWithHttpInfo($query_dto, $x_no_total, $x_no_slow_total, $contentType) ->then( function ($response) { return $response[0]; @@ -4564,7 +4521,6 @@ function ($response) { * * Get assets. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param bool $x_no_total Do not return the total amount. (optional) * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) @@ -4573,10 +4529,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAssetsPostAsyncWithHttpInfo($app, $query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) + public function getAssetsPostAsyncWithHttpInfo($query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) { $returnType = '\Squidex\Client\Model\AssetsDto'; - $request = $this->getAssetsPostRequest($app, $query_dto, $x_no_total, $x_no_slow_total, $contentType); + $request = $this->getAssetsPostRequest($query_dto, $x_no_total, $x_no_slow_total, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4617,7 +4573,6 @@ function ($exception) { /** * Create request for operation 'getAssetsPost' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param bool $x_no_total Do not return the total amount. (optional) * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) @@ -4626,10 +4581,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAssetsPostRequest($app, $query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) + public function getAssetsPostRequest($query_dto, $x_no_total = null, $x_no_slow_total = null, string $contentType = self::contentTypes['getAssetsPost'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4738,16 +4694,15 @@ public function getAssetsPostRequest($app, $query_dto, $x_no_total = null, $x_no * * Get assets tags. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTags'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\Squidex\Client\Model\ErrorDto */ - public function getTags($app, string $contentType = self::contentTypes['getTags'][0]) + public function getTags(string $contentType = self::contentTypes['getTags'][0]) { - list($response) = $this->getTagsWithHttpInfo($app, $contentType); + list($response) = $this->getTagsWithHttpInfo($contentType); return $response; } @@ -4756,16 +4711,15 @@ public function getTags($app, string $contentType = self::contentTypes['getTags' * * Get assets tags. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTags'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getTagsWithHttpInfo($app, string $contentType = self::contentTypes['getTags'][0]) + public function getTagsWithHttpInfo(string $contentType = self::contentTypes['getTags'][0]) { - $request = $this->getTagsRequest($app, $contentType); + $request = $this->getTagsRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -4879,15 +4833,14 @@ public function getTagsWithHttpInfo($app, string $contentType = self::contentTyp * * Get assets tags. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTags'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTagsAsync($app, string $contentType = self::contentTypes['getTags'][0]) + public function getTagsAsync(string $contentType = self::contentTypes['getTags'][0]) { - return $this->getTagsAsyncWithHttpInfo($app, $contentType) + return $this->getTagsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -4900,16 +4853,15 @@ function ($response) { * * Get assets tags. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTags'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTagsAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getTags'][0]) + public function getTagsAsyncWithHttpInfo(string $contentType = self::contentTypes['getTags'][0]) { $returnType = 'array'; - $request = $this->getTagsRequest($app, $contentType); + $request = $this->getTagsRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4950,16 +4902,16 @@ function ($exception) { /** * Create request for operation 'getTags' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTags'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTagsRequest($app, string $contentType = self::contentTypes['getTags'][0]) + public function getTagsRequest(string $contentType = self::contentTypes['getTags'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5044,20 +4996,21 @@ public function getTagsRequest($app, string $contentType = self::contentTypes['g * * Upload a new asset. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $id The optional custom asset id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file file (optional) + * @param string $file_url file_url (optional) + * @param string $file_name file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAsset'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postAsset($app, $parent_id = null, $id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postAsset'][0]) + public function postAsset($parent_id = null, $id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postAsset'][0]) { - list($response) = $this->postAssetWithHttpInfo($app, $parent_id, $id, $duplicate, $file, $contentType); + list($response) = $this->postAssetWithHttpInfo($parent_id, $id, $duplicate, $file, $file_url, $file_name, $contentType); return $response; } @@ -5066,20 +5019,21 @@ public function postAsset($app, $parent_id = null, $id = null, $duplicate = null * * Upload a new asset. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $id The optional custom asset id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAsset'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postAssetWithHttpInfo($app, $parent_id = null, $id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postAsset'][0]) + public function postAssetWithHttpInfo($parent_id = null, $id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postAsset'][0]) { - $request = $this->postAssetRequest($app, $parent_id, $id, $duplicate, $file, $contentType); + $request = $this->postAssetRequest($parent_id, $id, $duplicate, $file, $file_url, $file_name, $contentType); try { $options = $this->createHttpClientOption(); @@ -5239,19 +5193,20 @@ public function postAssetWithHttpInfo($app, $parent_id = null, $id = null, $dupl * * Upload a new asset. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $id The optional custom asset id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postAssetAsync($app, $parent_id = null, $id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postAsset'][0]) + public function postAssetAsync($parent_id = null, $id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postAsset'][0]) { - return $this->postAssetAsyncWithHttpInfo($app, $parent_id, $id, $duplicate, $file, $contentType) + return $this->postAssetAsyncWithHttpInfo($parent_id, $id, $duplicate, $file, $file_url, $file_name, $contentType) ->then( function ($response) { return $response[0]; @@ -5264,20 +5219,21 @@ function ($response) { * * Upload a new asset. * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $id The optional custom asset id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postAssetAsyncWithHttpInfo($app, $parent_id = null, $id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postAsset'][0]) + public function postAssetAsyncWithHttpInfo($parent_id = null, $id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postAsset'][0]) { $returnType = '\Squidex\Client\Model\AssetDto'; - $request = $this->postAssetRequest($app, $parent_id, $id, $duplicate, $file, $contentType); + $request = $this->postAssetRequest($parent_id, $id, $duplicate, $file, $file_url, $file_name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5318,20 +5274,22 @@ function ($exception) { /** * Create request for operation 'postAsset' * - * @param string $app The name of the app. (required) * @param string $parent_id The optional parent folder id. (optional) * @param string $id The optional custom asset id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postAssetRequest($app, $parent_id = null, $id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postAsset'][0]) + public function postAssetRequest($parent_id = null, $id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postAsset'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5343,6 +5301,8 @@ public function postAssetRequest($app, $parent_id = null, $id = null, $duplicate + + $resourcePath = '/api/apps/{app}/assets'; $formParams = []; $queryParams = []; @@ -5353,7 +5313,7 @@ public function postAssetRequest($app, $parent_id = null, $id = null, $duplicate // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $parent_id, - 'parentId', // param base name + 'ParentId', // param base name 'string', // openApiType 'form', // style true, // explode @@ -5400,6 +5360,14 @@ public function postAssetRequest($app, $parent_id = null, $id = null, $duplicate ); } } + // form params + if ($file_url !== null) { + $formParams['fileUrl'] = ObjectSerializer::toFormValue($file_url); + } + // form params + if ($file_name !== null) { + $formParams['fileName'] = ObjectSerializer::toFormValue($file_name); + } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -5459,20 +5427,21 @@ public function postAssetRequest($app, $parent_id = null, $id = null, $duplicate * * Upsert an asset. * - * @param string $app The name of the app. (required) * @param string $id The optional custom asset id. (required) * @param string $parent_id The optional parent folder id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file file (optional) + * @param string $file_url file_url (optional) + * @param string $file_name file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUpsertAsset'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postUpsertAsset($app, $id, $parent_id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) + public function postUpsertAsset($id, $parent_id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) { - list($response) = $this->postUpsertAssetWithHttpInfo($app, $id, $parent_id, $duplicate, $file, $contentType); + list($response) = $this->postUpsertAssetWithHttpInfo($id, $parent_id, $duplicate, $file, $file_url, $file_name, $contentType); return $response; } @@ -5481,20 +5450,21 @@ public function postUpsertAsset($app, $id, $parent_id = null, $duplicate = null, * * Upsert an asset. * - * @param string $app The name of the app. (required) * @param string $id The optional custom asset id. (required) * @param string $parent_id The optional parent folder id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUpsertAsset'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postUpsertAssetWithHttpInfo($app, $id, $parent_id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) + public function postUpsertAssetWithHttpInfo($id, $parent_id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) { - $request = $this->postUpsertAssetRequest($app, $id, $parent_id, $duplicate, $file, $contentType); + $request = $this->postUpsertAssetRequest($id, $parent_id, $duplicate, $file, $file_url, $file_name, $contentType); try { $options = $this->createHttpClientOption(); @@ -5654,19 +5624,20 @@ public function postUpsertAssetWithHttpInfo($app, $id, $parent_id = null, $dupli * * Upsert an asset. * - * @param string $app The name of the app. (required) * @param string $id The optional custom asset id. (required) * @param string $parent_id The optional parent folder id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUpsertAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postUpsertAssetAsync($app, $id, $parent_id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) + public function postUpsertAssetAsync($id, $parent_id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) { - return $this->postUpsertAssetAsyncWithHttpInfo($app, $id, $parent_id, $duplicate, $file, $contentType) + return $this->postUpsertAssetAsyncWithHttpInfo($id, $parent_id, $duplicate, $file, $file_url, $file_name, $contentType) ->then( function ($response) { return $response[0]; @@ -5679,20 +5650,21 @@ function ($response) { * * Upsert an asset. * - * @param string $app The name of the app. (required) * @param string $id The optional custom asset id. (required) * @param string $parent_id The optional parent folder id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUpsertAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postUpsertAssetAsyncWithHttpInfo($app, $id, $parent_id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) + public function postUpsertAssetAsyncWithHttpInfo($id, $parent_id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) { $returnType = '\Squidex\Client\Model\AssetDto'; - $request = $this->postUpsertAssetRequest($app, $id, $parent_id, $duplicate, $file, $contentType); + $request = $this->postUpsertAssetRequest($id, $parent_id, $duplicate, $file, $file_url, $file_name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5733,20 +5705,22 @@ function ($exception) { /** * Create request for operation 'postUpsertAsset' * - * @param string $app The name of the app. (required) * @param string $id The optional custom asset id. (required) * @param string $parent_id The optional parent folder id. (optional) * @param bool $duplicate True to duplicate the asset, event if the file has been uploaded. (optional) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postUpsertAsset'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postUpsertAssetRequest($app, $id, $parent_id = null, $duplicate = null, $file = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) + public function postUpsertAssetRequest($id, $parent_id = null, $duplicate = null, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['postUpsertAsset'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5764,6 +5738,8 @@ public function postUpsertAssetRequest($app, $id, $parent_id = null, $duplicate + + $resourcePath = '/api/apps/{app}/assets/{id}'; $formParams = []; $queryParams = []; @@ -5820,6 +5796,14 @@ public function postUpsertAssetRequest($app, $id, $parent_id = null, $duplicate ); } } + // form params + if ($file_url !== null) { + $formParams['fileUrl'] = ObjectSerializer::toFormValue($file_url); + } + // form params + if ($file_name !== null) { + $formParams['fileName'] = ObjectSerializer::toFormValue($file_name); + } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -5879,7 +5863,6 @@ public function postUpsertAssetRequest($app, $id, $parent_id = null, $duplicate * * Update an asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\AnnotateAssetDto $annotate_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAsset'] to see the possible values for this operation @@ -5888,9 +5871,9 @@ public function postUpsertAssetRequest($app, $id, $parent_id = null, $duplicate * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putAsset($app, $id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) + public function putAsset($id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) { - list($response) = $this->putAssetWithHttpInfo($app, $id, $annotate_asset_dto, $contentType); + list($response) = $this->putAssetWithHttpInfo($id, $annotate_asset_dto, $contentType); return $response; } @@ -5899,7 +5882,6 @@ public function putAsset($app, $id, $annotate_asset_dto, string $contentType = s * * Update an asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\AnnotateAssetDto $annotate_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAsset'] to see the possible values for this operation @@ -5908,9 +5890,9 @@ public function putAsset($app, $id, $annotate_asset_dto, string $contentType = s * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putAssetWithHttpInfo($app, $id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) + public function putAssetWithHttpInfo($id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) { - $request = $this->putAssetRequest($app, $id, $annotate_asset_dto, $contentType); + $request = $this->putAssetRequest($id, $annotate_asset_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -6047,7 +6029,6 @@ public function putAssetWithHttpInfo($app, $id, $annotate_asset_dto, string $con * * Update an asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\AnnotateAssetDto $annotate_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAsset'] to see the possible values for this operation @@ -6055,9 +6036,9 @@ public function putAssetWithHttpInfo($app, $id, $annotate_asset_dto, string $con * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetAsync($app, $id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) + public function putAssetAsync($id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) { - return $this->putAssetAsyncWithHttpInfo($app, $id, $annotate_asset_dto, $contentType) + return $this->putAssetAsyncWithHttpInfo($id, $annotate_asset_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -6070,7 +6051,6 @@ function ($response) { * * Update an asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\AnnotateAssetDto $annotate_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAsset'] to see the possible values for this operation @@ -6078,10 +6058,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetAsyncWithHttpInfo($app, $id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) + public function putAssetAsyncWithHttpInfo($id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) { $returnType = '\Squidex\Client\Model\AssetDto'; - $request = $this->putAssetRequest($app, $id, $annotate_asset_dto, $contentType); + $request = $this->putAssetRequest($id, $annotate_asset_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6122,7 +6102,6 @@ function ($exception) { /** * Create request for operation 'putAsset' * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\AnnotateAssetDto $annotate_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAsset'] to see the possible values for this operation @@ -6130,10 +6109,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putAssetRequest($app, $id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) + public function putAssetRequest($id, $annotate_asset_dto, string $contentType = self::contentTypes['putAsset'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6247,18 +6227,19 @@ public function putAssetRequest($app, $id, $annotate_asset_dto, string $contentT * * Replace asset content. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \SplFileObject $file file (optional) + * @param string $file_url file_url (optional) + * @param string $file_name file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetContent'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putAssetContent($app, $id, $file = null, string $contentType = self::contentTypes['putAssetContent'][0]) + public function putAssetContent($id, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['putAssetContent'][0]) { - list($response) = $this->putAssetContentWithHttpInfo($app, $id, $file, $contentType); + list($response) = $this->putAssetContentWithHttpInfo($id, $file, $file_url, $file_name, $contentType); return $response; } @@ -6267,18 +6248,19 @@ public function putAssetContent($app, $id, $file = null, string $contentType = s * * Replace asset content. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetContent'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putAssetContentWithHttpInfo($app, $id, $file = null, string $contentType = self::contentTypes['putAssetContent'][0]) + public function putAssetContentWithHttpInfo($id, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['putAssetContent'][0]) { - $request = $this->putAssetContentRequest($app, $id, $file, $contentType); + $request = $this->putAssetContentRequest($id, $file, $file_url, $file_name, $contentType); try { $options = $this->createHttpClientOption(); @@ -6438,17 +6420,18 @@ public function putAssetContentWithHttpInfo($app, $id, $file = null, string $con * * Replace asset content. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetContent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetContentAsync($app, $id, $file = null, string $contentType = self::contentTypes['putAssetContent'][0]) + public function putAssetContentAsync($id, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['putAssetContent'][0]) { - return $this->putAssetContentAsyncWithHttpInfo($app, $id, $file, $contentType) + return $this->putAssetContentAsyncWithHttpInfo($id, $file, $file_url, $file_name, $contentType) ->then( function ($response) { return $response[0]; @@ -6461,18 +6444,19 @@ function ($response) { * * Replace asset content. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetContent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetContentAsyncWithHttpInfo($app, $id, $file = null, string $contentType = self::contentTypes['putAssetContent'][0]) + public function putAssetContentAsyncWithHttpInfo($id, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['putAssetContent'][0]) { $returnType = '\Squidex\Client\Model\AssetDto'; - $request = $this->putAssetContentRequest($app, $id, $file, $contentType); + $request = $this->putAssetContentRequest($id, $file, $file_url, $file_name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6513,18 +6497,20 @@ function ($exception) { /** * Create request for operation 'putAssetContent' * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \SplFileObject $file (optional) + * @param string $file_url (optional) + * @param string $file_name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetContent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putAssetContentRequest($app, $id, $file = null, string $contentType = self::contentTypes['putAssetContent'][0]) + public function putAssetContentRequest($id, $file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['putAssetContent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6540,6 +6526,8 @@ public function putAssetContentRequest($app, $id, $file = null, string $contentT + + $resourcePath = '/api/apps/{app}/assets/{id}/content'; $formParams = []; $queryParams = []; @@ -6578,6 +6566,14 @@ public function putAssetContentRequest($app, $id, $file = null, string $contentT ); } } + // form params + if ($file_url !== null) { + $formParams['fileUrl'] = ObjectSerializer::toFormValue($file_url); + } + // form params + if ($file_name !== null) { + $formParams['fileName'] = ObjectSerializer::toFormValue($file_name); + } $headers = $this->headerSelector->selectHeaders( ['application/json', ], @@ -6637,7 +6633,6 @@ public function putAssetContentRequest($app, $id, $file = null, string $contentT * * Moves the asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\MoveAssetDto $move_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetParent'] to see the possible values for this operation @@ -6646,9 +6641,9 @@ public function putAssetContentRequest($app, $id, $file = null, string $contentT * @throws \InvalidArgumentException * @return \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putAssetParent($app, $id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) + public function putAssetParent($id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) { - list($response) = $this->putAssetParentWithHttpInfo($app, $id, $move_asset_dto, $contentType); + list($response) = $this->putAssetParentWithHttpInfo($id, $move_asset_dto, $contentType); return $response; } @@ -6657,7 +6652,6 @@ public function putAssetParent($app, $id, $move_asset_dto, string $contentType = * * Moves the asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\MoveAssetDto $move_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetParent'] to see the possible values for this operation @@ -6666,9 +6660,9 @@ public function putAssetParent($app, $id, $move_asset_dto, string $contentType = * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\AssetDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putAssetParentWithHttpInfo($app, $id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) + public function putAssetParentWithHttpInfo($id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) { - $request = $this->putAssetParentRequest($app, $id, $move_asset_dto, $contentType); + $request = $this->putAssetParentRequest($id, $move_asset_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -6805,7 +6799,6 @@ public function putAssetParentWithHttpInfo($app, $id, $move_asset_dto, string $c * * Moves the asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\MoveAssetDto $move_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetParent'] to see the possible values for this operation @@ -6813,9 +6806,9 @@ public function putAssetParentWithHttpInfo($app, $id, $move_asset_dto, string $c * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetParentAsync($app, $id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) + public function putAssetParentAsync($id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) { - return $this->putAssetParentAsyncWithHttpInfo($app, $id, $move_asset_dto, $contentType) + return $this->putAssetParentAsyncWithHttpInfo($id, $move_asset_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -6828,7 +6821,6 @@ function ($response) { * * Moves the asset. * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\MoveAssetDto $move_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetParent'] to see the possible values for this operation @@ -6836,10 +6828,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putAssetParentAsyncWithHttpInfo($app, $id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) + public function putAssetParentAsyncWithHttpInfo($id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) { $returnType = '\Squidex\Client\Model\AssetDto'; - $request = $this->putAssetParentRequest($app, $id, $move_asset_dto, $contentType); + $request = $this->putAssetParentRequest($id, $move_asset_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6880,7 +6872,6 @@ function ($exception) { /** * Create request for operation 'putAssetParent' * - * @param string $app The name of the app. (required) * @param string $id The ID of the asset. (required) * @param \Squidex\Client\Model\MoveAssetDto $move_asset_dto The asset object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putAssetParent'] to see the possible values for this operation @@ -6888,10 +6879,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putAssetParentRequest($app, $id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) + public function putAssetParentRequest($id, $move_asset_dto, string $contentType = self::contentTypes['putAssetParent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -7005,7 +6997,6 @@ public function putAssetParentRequest($app, $id, $move_asset_dto, string $conten * * Rename an asset tag. * - * @param string $app The name of the app. (required) * @param string $name The tag to return. (required) * @param \Squidex\Client\Model\RenameTagDto $rename_tag_dto The required request object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTag'] to see the possible values for this operation @@ -7014,9 +7005,9 @@ public function putAssetParentRequest($app, $id, $move_asset_dto, string $conten * @throws \InvalidArgumentException * @return array|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putTag($app, $name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) + public function putTag($name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) { - list($response) = $this->putTagWithHttpInfo($app, $name, $rename_tag_dto, $contentType); + list($response) = $this->putTagWithHttpInfo($name, $rename_tag_dto, $contentType); return $response; } @@ -7025,7 +7016,6 @@ public function putTag($app, $name, $rename_tag_dto, string $contentType = self: * * Rename an asset tag. * - * @param string $app The name of the app. (required) * @param string $name The tag to return. (required) * @param \Squidex\Client\Model\RenameTagDto $rename_tag_dto The required request object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTag'] to see the possible values for this operation @@ -7034,9 +7024,9 @@ public function putTag($app, $name, $rename_tag_dto, string $contentType = self: * @throws \InvalidArgumentException * @return array of array|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putTagWithHttpInfo($app, $name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) + public function putTagWithHttpInfo($name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) { - $request = $this->putTagRequest($app, $name, $rename_tag_dto, $contentType); + $request = $this->putTagRequest($name, $rename_tag_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -7173,7 +7163,6 @@ public function putTagWithHttpInfo($app, $name, $rename_tag_dto, string $content * * Rename an asset tag. * - * @param string $app The name of the app. (required) * @param string $name The tag to return. (required) * @param \Squidex\Client\Model\RenameTagDto $rename_tag_dto The required request object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTag'] to see the possible values for this operation @@ -7181,9 +7170,9 @@ public function putTagWithHttpInfo($app, $name, $rename_tag_dto, string $content * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putTagAsync($app, $name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) + public function putTagAsync($name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) { - return $this->putTagAsyncWithHttpInfo($app, $name, $rename_tag_dto, $contentType) + return $this->putTagAsyncWithHttpInfo($name, $rename_tag_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -7196,7 +7185,6 @@ function ($response) { * * Rename an asset tag. * - * @param string $app The name of the app. (required) * @param string $name The tag to return. (required) * @param \Squidex\Client\Model\RenameTagDto $rename_tag_dto The required request object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTag'] to see the possible values for this operation @@ -7204,10 +7192,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putTagAsyncWithHttpInfo($app, $name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) + public function putTagAsyncWithHttpInfo($name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) { $returnType = 'array'; - $request = $this->putTagRequest($app, $name, $rename_tag_dto, $contentType); + $request = $this->putTagRequest($name, $rename_tag_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7248,7 +7236,6 @@ function ($exception) { /** * Create request for operation 'putTag' * - * @param string $app The name of the app. (required) * @param string $name The tag to return. (required) * @param \Squidex\Client\Model\RenameTagDto $rename_tag_dto The required request object. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTag'] to see the possible values for this operation @@ -7256,10 +7243,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putTagRequest($app, $name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) + public function putTagRequest($name, $rename_tag_dto, string $contentType = self::contentTypes['putTag'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' diff --git a/lib/Api/BackupsApi.php b/lib/Api/BackupsApi.php index a15ffc4..1ac550e 100644 --- a/lib/Api/BackupsApi.php +++ b/lib/Api/BackupsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -142,17 +142,17 @@ public function getConfig() * * Get the backup content. * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackupContent'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SplFileObject|\Squidex\Client\Model\ErrorDto + * @deprecated */ - public function getBackupContent($app, $id, string $contentType = self::contentTypes['getBackupContent'][0]) + public function getBackupContent($id, string $contentType = self::contentTypes['getBackupContent'][0]) { - list($response) = $this->getBackupContentWithHttpInfo($app, $id, $contentType); + list($response) = $this->getBackupContentWithHttpInfo($id, $contentType); return $response; } @@ -161,17 +161,17 @@ public function getBackupContent($app, $id, string $contentType = self::contentT * * Get the backup content. * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackupContent'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SplFileObject|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function getBackupContentWithHttpInfo($app, $id, string $contentType = self::contentTypes['getBackupContent'][0]) + public function getBackupContentWithHttpInfo($id, string $contentType = self::contentTypes['getBackupContent'][0]) { - $request = $this->getBackupContentRequest($app, $id, $contentType); + $request = $this->getBackupContentRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -285,16 +285,16 @@ public function getBackupContentWithHttpInfo($app, $id, string $contentType = se * * Get the backup content. * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackupContent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getBackupContentAsync($app, $id, string $contentType = self::contentTypes['getBackupContent'][0]) + public function getBackupContentAsync($id, string $contentType = self::contentTypes['getBackupContent'][0]) { - return $this->getBackupContentAsyncWithHttpInfo($app, $id, $contentType) + return $this->getBackupContentAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -307,17 +307,17 @@ function ($response) { * * Get the backup content. * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackupContent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getBackupContentAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['getBackupContent'][0]) + public function getBackupContentAsyncWithHttpInfo($id, string $contentType = self::contentTypes['getBackupContent'][0]) { $returnType = '\SplFileObject'; - $request = $this->getBackupContentRequest($app, $id, $contentType); + $request = $this->getBackupContentRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -358,17 +358,18 @@ function ($exception) { /** * Create request for operation 'getBackupContent' * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackupContent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function getBackupContentRequest($app, $id, string $contentType = self::contentTypes['getBackupContent'][0]) + public function getBackupContentRequest($id, string $contentType = self::contentTypes['getBackupContent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -476,6 +477,7 @@ public function getBackupContentRequest($app, $id, string $contentType = self::c * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SplFileObject|\Squidex\Client\Model\ErrorDto + * @deprecated */ public function getBackupContentV2($id, $app_id = null, $app = '', string $contentType = self::contentTypes['getBackupContentV2'][0]) { @@ -496,6 +498,7 @@ public function getBackupContentV2($id, $app_id = null, $app = '', string $conte * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SplFileObject|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ public function getBackupContentV2WithHttpInfo($id, $app_id = null, $app = '', string $contentType = self::contentTypes['getBackupContentV2'][0]) { @@ -620,6 +623,7 @@ public function getBackupContentV2WithHttpInfo($id, $app_id = null, $app = '', s * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getBackupContentV2Async($id, $app_id = null, $app = '', string $contentType = self::contentTypes['getBackupContentV2'][0]) { @@ -643,6 +647,7 @@ function ($response) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getBackupContentV2AsyncWithHttpInfo($id, $app_id = null, $app = '', string $contentType = self::contentTypes['getBackupContentV2'][0]) { @@ -695,6 +700,7 @@ function ($exception) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ public function getBackupContentV2Request($id, $app_id = null, $app = '', string $contentType = self::contentTypes['getBackupContentV2'][0]) { @@ -804,17 +810,17 @@ public function getBackupContentV2Request($id, $app_id = null, $app = '', string * * Delete a backup. * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBackup'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void + * @deprecated */ - public function deleteBackup($app, $id, string $contentType = self::contentTypes['deleteBackup'][0]) + public function deleteBackup($id, string $contentType = self::contentTypes['deleteBackup'][0]) { - $this->deleteBackupWithHttpInfo($app, $id, $contentType); + $this->deleteBackupWithHttpInfo($id, $contentType); } /** @@ -822,17 +828,17 @@ public function deleteBackup($app, $id, string $contentType = self::contentTypes * * Delete a backup. * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBackup'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function deleteBackupWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteBackup'][0]) + public function deleteBackupWithHttpInfo($id, string $contentType = self::contentTypes['deleteBackup'][0]) { - $request = $this->deleteBackupRequest($app, $id, $contentType); + $request = $this->deleteBackupRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -899,16 +905,16 @@ public function deleteBackupWithHttpInfo($app, $id, string $contentType = self:: * * Delete a backup. * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBackup'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function deleteBackupAsync($app, $id, string $contentType = self::contentTypes['deleteBackup'][0]) + public function deleteBackupAsync($id, string $contentType = self::contentTypes['deleteBackup'][0]) { - return $this->deleteBackupAsyncWithHttpInfo($app, $id, $contentType) + return $this->deleteBackupAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -921,17 +927,17 @@ function ($response) { * * Delete a backup. * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBackup'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function deleteBackupAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteBackup'][0]) + public function deleteBackupAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteBackup'][0]) { $returnType = ''; - $request = $this->deleteBackupRequest($app, $id, $contentType); + $request = $this->deleteBackupRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -959,17 +965,18 @@ function ($exception) { /** * Create request for operation 'deleteBackup' * - * @param string $app The name of the app. (required) * @param string $id The ID of the backup to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteBackup'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function deleteBackupRequest($app, $id, string $contentType = self::contentTypes['deleteBackup'][0]) + public function deleteBackupRequest($id, string $contentType = self::contentTypes['deleteBackup'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1069,16 +1076,16 @@ public function deleteBackupRequest($app, $id, string $contentType = self::conte * * Get all backup jobs. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackups'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\BackupJobsDto|\Squidex\Client\Model\ErrorDto + * @deprecated */ - public function getBackups($app, string $contentType = self::contentTypes['getBackups'][0]) + public function getBackups(string $contentType = self::contentTypes['getBackups'][0]) { - list($response) = $this->getBackupsWithHttpInfo($app, $contentType); + list($response) = $this->getBackupsWithHttpInfo($contentType); return $response; } @@ -1087,16 +1094,16 @@ public function getBackups($app, string $contentType = self::contentTypes['getBa * * Get all backup jobs. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackups'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\BackupJobsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ - public function getBackupsWithHttpInfo($app, string $contentType = self::contentTypes['getBackups'][0]) + public function getBackupsWithHttpInfo(string $contentType = self::contentTypes['getBackups'][0]) { - $request = $this->getBackupsRequest($app, $contentType); + $request = $this->getBackupsRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -1210,15 +1217,15 @@ public function getBackupsWithHttpInfo($app, string $contentType = self::content * * Get all backup jobs. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackups'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getBackupsAsync($app, string $contentType = self::contentTypes['getBackups'][0]) + public function getBackupsAsync(string $contentType = self::contentTypes['getBackups'][0]) { - return $this->getBackupsAsyncWithHttpInfo($app, $contentType) + return $this->getBackupsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -1231,16 +1238,16 @@ function ($response) { * * Get all backup jobs. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackups'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ - public function getBackupsAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getBackups'][0]) + public function getBackupsAsyncWithHttpInfo(string $contentType = self::contentTypes['getBackups'][0]) { $returnType = '\Squidex\Client\Model\BackupJobsDto'; - $request = $this->getBackupsRequest($app, $contentType); + $request = $this->getBackupsRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1281,16 +1288,17 @@ function ($exception) { /** * Create request for operation 'getBackups' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBackups'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ - public function getBackupsRequest($app, string $contentType = self::contentTypes['getBackups'][0]) + public function getBackupsRequest(string $contentType = self::contentTypes['getBackups'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1375,16 +1383,15 @@ public function getBackupsRequest($app, string $contentType = self::contentTypes * * Start a new backup. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBackup'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function postBackup($app, string $contentType = self::contentTypes['postBackup'][0]) + public function postBackup(string $contentType = self::contentTypes['postBackup'][0]) { - $this->postBackupWithHttpInfo($app, $contentType); + $this->postBackupWithHttpInfo($contentType); } /** @@ -1392,16 +1399,15 @@ public function postBackup($app, string $contentType = self::contentTypes['postB * * Start a new backup. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBackup'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function postBackupWithHttpInfo($app, string $contentType = self::contentTypes['postBackup'][0]) + public function postBackupWithHttpInfo(string $contentType = self::contentTypes['postBackup'][0]) { - $request = $this->postBackupRequest($app, $contentType); + $request = $this->postBackupRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -1468,15 +1474,14 @@ public function postBackupWithHttpInfo($app, string $contentType = self::content * * Start a new backup. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBackup'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postBackupAsync($app, string $contentType = self::contentTypes['postBackup'][0]) + public function postBackupAsync(string $contentType = self::contentTypes['postBackup'][0]) { - return $this->postBackupAsyncWithHttpInfo($app, $contentType) + return $this->postBackupAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -1489,16 +1494,15 @@ function ($response) { * * Start a new backup. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBackup'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postBackupAsyncWithHttpInfo($app, string $contentType = self::contentTypes['postBackup'][0]) + public function postBackupAsyncWithHttpInfo(string $contentType = self::contentTypes['postBackup'][0]) { $returnType = ''; - $request = $this->postBackupRequest($app, $contentType); + $request = $this->postBackupRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1526,16 +1530,16 @@ function ($exception) { /** * Create request for operation 'postBackup' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postBackup'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postBackupRequest($app, string $contentType = self::contentTypes['postBackup'][0]) + public function postBackupRequest(string $contentType = self::contentTypes['postBackup'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' diff --git a/lib/Api/ContentsApi.php b/lib/Api/ContentsApi.php index 42670a7..3e8607d 100644 --- a/lib/Api/ContentsApi.php +++ b/lib/Api/ContentsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -127,10 +127,13 @@ class ContentsApi 'putContent' => [ 'application/json', ], + 'putContentDefaults' => [ + 'application/json', + ], 'putContentStatus' => [ 'application/json', ], - 'bulkUpdateContents' => [ + 'bulkUpdateAllContents' => [ 'application/json', ], 'getAllContents' => [ @@ -142,7 +145,13 @@ class ContentsApi 'getGraphQL' => [ 'application/json', ], - 'getGraphQL2' => [ + 'getGraphQLBatch' => [ + 'application/json', + ], + 'postGraphQL' => [ + 'application/json', + ], + 'postGraphQLBatch' => [ 'application/json', ], ]; @@ -190,7 +199,6 @@ public function getConfig() * * Bulk update content items. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation @@ -199,9 +207,9 @@ public function getConfig() * @throws \InvalidArgumentException * @return \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function bulkUpdateContents($app, $schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function bulkUpdateContents($schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) { - list($response) = $this->bulkUpdateContentsWithHttpInfo($app, $schema, $bulk_update_contents_dto, $contentType); + list($response) = $this->bulkUpdateContentsWithHttpInfo($schema, $bulk_update_contents_dto, $contentType); return $response; } @@ -210,7 +218,6 @@ public function bulkUpdateContents($app, $schema, $bulk_update_contents_dto, str * * Bulk update content items. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation @@ -219,9 +226,9 @@ public function bulkUpdateContents($app, $schema, $bulk_update_contents_dto, str * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function bulkUpdateContentsWithHttpInfo($app, $schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function bulkUpdateContentsWithHttpInfo($schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) { - $request = $this->bulkUpdateContentsRequest($app, $schema, $bulk_update_contents_dto, $contentType); + $request = $this->bulkUpdateContentsRequest($schema, $bulk_update_contents_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -358,7 +365,6 @@ public function bulkUpdateContentsWithHttpInfo($app, $schema, $bulk_update_conte * * Bulk update content items. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation @@ -366,9 +372,9 @@ public function bulkUpdateContentsWithHttpInfo($app, $schema, $bulk_update_conte * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkUpdateContentsAsync($app, $schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function bulkUpdateContentsAsync($schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) { - return $this->bulkUpdateContentsAsyncWithHttpInfo($app, $schema, $bulk_update_contents_dto, $contentType) + return $this->bulkUpdateContentsAsyncWithHttpInfo($schema, $bulk_update_contents_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -381,7 +387,6 @@ function ($response) { * * Bulk update content items. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation @@ -389,10 +394,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkUpdateContentsAsyncWithHttpInfo($app, $schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function bulkUpdateContentsAsyncWithHttpInfo($schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) { $returnType = '\Squidex\Client\Model\BulkResultDto[]'; - $request = $this->bulkUpdateContentsRequest($app, $schema, $bulk_update_contents_dto, $contentType); + $request = $this->bulkUpdateContentsRequest($schema, $bulk_update_contents_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -433,7 +438,6 @@ function ($exception) { /** * Create request for operation 'bulkUpdateContents' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation @@ -441,10 +445,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function bulkUpdateContentsRequest($app, $schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function bulkUpdateContentsRequest($schema, $bulk_update_contents_dto, string $contentType = self::contentTypes['bulkUpdateContents'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -558,7 +563,6 @@ public function bulkUpdateContentsRequest($app, $schema, $bulk_update_contents_d * * Create a new draft version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to create the draft for. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -569,9 +573,9 @@ public function bulkUpdateContentsRequest($app, $schema, $bulk_update_contents_d * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function createDraft($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) + public function createDraft($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) { - list($response) = $this->createDraftWithHttpInfo($app, $schema, $id, $x_unpublished, $x_languages, $contentType); + list($response) = $this->createDraftWithHttpInfo($schema, $id, $x_unpublished, $x_languages, $contentType); return $response; } @@ -580,7 +584,6 @@ public function createDraft($app, $schema, $id, $x_unpublished = null, $x_langua * * Create a new draft version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to create the draft for. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -591,9 +594,9 @@ public function createDraft($app, $schema, $id, $x_unpublished = null, $x_langua * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function createDraftWithHttpInfo($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) + public function createDraftWithHttpInfo($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) { - $request = $this->createDraftRequest($app, $schema, $id, $x_unpublished, $x_languages, $contentType); + $request = $this->createDraftRequest($schema, $id, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -730,7 +733,6 @@ public function createDraftWithHttpInfo($app, $schema, $id, $x_unpublished = nul * * Create a new draft version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to create the draft for. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -740,9 +742,9 @@ public function createDraftWithHttpInfo($app, $schema, $id, $x_unpublished = nul * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createDraftAsync($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) + public function createDraftAsync($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) { - return $this->createDraftAsyncWithHttpInfo($app, $schema, $id, $x_unpublished, $x_languages, $contentType) + return $this->createDraftAsyncWithHttpInfo($schema, $id, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -755,7 +757,6 @@ function ($response) { * * Create a new draft version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to create the draft for. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -765,10 +766,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createDraftAsyncWithHttpInfo($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) + public function createDraftAsyncWithHttpInfo($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) { $returnType = '\Squidex\Client\Model\ContentDto'; - $request = $this->createDraftRequest($app, $schema, $id, $x_unpublished, $x_languages, $contentType); + $request = $this->createDraftRequest($schema, $id, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -809,7 +810,6 @@ function ($exception) { /** * Create request for operation 'createDraft' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to create the draft for. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -819,10 +819,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createDraftRequest($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) + public function createDraftRequest($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['createDraft'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -947,7 +948,6 @@ public function createDraftRequest($app, $schema, $id, $x_unpublished = null, $x * * Delete a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete. (required) * @param bool $check_referrers True to check referrers of this content. (optional) @@ -958,9 +958,9 @@ public function createDraftRequest($app, $schema, $id, $x_unpublished = null, $x * @throws \InvalidArgumentException * @return void */ - public function deleteContent($app, $schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) + public function deleteContent($schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) { - $this->deleteContentWithHttpInfo($app, $schema, $id, $check_referrers, $permanent, $contentType); + $this->deleteContentWithHttpInfo($schema, $id, $check_referrers, $permanent, $contentType); } /** @@ -968,7 +968,6 @@ public function deleteContent($app, $schema, $id, $check_referrers = null, $perm * * Delete a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete. (required) * @param bool $check_referrers True to check referrers of this content. (optional) @@ -979,9 +978,9 @@ public function deleteContent($app, $schema, $id, $check_referrers = null, $perm * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteContentWithHttpInfo($app, $schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) + public function deleteContentWithHttpInfo($schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) { - $request = $this->deleteContentRequest($app, $schema, $id, $check_referrers, $permanent, $contentType); + $request = $this->deleteContentRequest($schema, $id, $check_referrers, $permanent, $contentType); try { $options = $this->createHttpClientOption(); @@ -1048,7 +1047,6 @@ public function deleteContentWithHttpInfo($app, $schema, $id, $check_referrers = * * Delete a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete. (required) * @param bool $check_referrers True to check referrers of this content. (optional) @@ -1058,9 +1056,9 @@ public function deleteContentWithHttpInfo($app, $schema, $id, $check_referrers = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteContentAsync($app, $schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) + public function deleteContentAsync($schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) { - return $this->deleteContentAsyncWithHttpInfo($app, $schema, $id, $check_referrers, $permanent, $contentType) + return $this->deleteContentAsyncWithHttpInfo($schema, $id, $check_referrers, $permanent, $contentType) ->then( function ($response) { return $response[0]; @@ -1073,7 +1071,6 @@ function ($response) { * * Delete a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete. (required) * @param bool $check_referrers True to check referrers of this content. (optional) @@ -1083,10 +1080,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteContentAsyncWithHttpInfo($app, $schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) + public function deleteContentAsyncWithHttpInfo($schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) { $returnType = ''; - $request = $this->deleteContentRequest($app, $schema, $id, $check_referrers, $permanent, $contentType); + $request = $this->deleteContentRequest($schema, $id, $check_referrers, $permanent, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1114,7 +1111,6 @@ function ($exception) { /** * Create request for operation 'deleteContent' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete. (required) * @param bool $check_referrers True to check referrers of this content. (optional) @@ -1124,10 +1120,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteContentRequest($app, $schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) + public function deleteContentRequest($schema, $id, $check_referrers = null, $permanent = null, string $contentType = self::contentTypes['deleteContent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1262,7 +1259,6 @@ public function deleteContentRequest($app, $schema, $id, $check_referrers = null * * Cancel status change of a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to cancel. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1273,9 +1269,9 @@ public function deleteContentRequest($app, $schema, $id, $check_referrers = null * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteContentStatus($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) + public function deleteContentStatus($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) { - list($response) = $this->deleteContentStatusWithHttpInfo($app, $schema, $id, $x_unpublished, $x_languages, $contentType); + list($response) = $this->deleteContentStatusWithHttpInfo($schema, $id, $x_unpublished, $x_languages, $contentType); return $response; } @@ -1284,7 +1280,6 @@ public function deleteContentStatus($app, $schema, $id, $x_unpublished = null, $ * * Cancel status change of a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to cancel. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1295,9 +1290,9 @@ public function deleteContentStatus($app, $schema, $id, $x_unpublished = null, $ * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteContentStatusWithHttpInfo($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) + public function deleteContentStatusWithHttpInfo($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) { - $request = $this->deleteContentStatusRequest($app, $schema, $id, $x_unpublished, $x_languages, $contentType); + $request = $this->deleteContentStatusRequest($schema, $id, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -1434,7 +1429,6 @@ public function deleteContentStatusWithHttpInfo($app, $schema, $id, $x_unpublish * * Cancel status change of a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to cancel. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1444,9 +1438,9 @@ public function deleteContentStatusWithHttpInfo($app, $schema, $id, $x_unpublish * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteContentStatusAsync($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) + public function deleteContentStatusAsync($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) { - return $this->deleteContentStatusAsyncWithHttpInfo($app, $schema, $id, $x_unpublished, $x_languages, $contentType) + return $this->deleteContentStatusAsyncWithHttpInfo($schema, $id, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -1459,7 +1453,6 @@ function ($response) { * * Cancel status change of a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to cancel. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1469,10 +1462,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteContentStatusAsyncWithHttpInfo($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) + public function deleteContentStatusAsyncWithHttpInfo($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) { $returnType = '\Squidex\Client\Model\ContentDto'; - $request = $this->deleteContentStatusRequest($app, $schema, $id, $x_unpublished, $x_languages, $contentType); + $request = $this->deleteContentStatusRequest($schema, $id, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1513,7 +1506,6 @@ function ($exception) { /** * Create request for operation 'deleteContentStatus' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to cancel. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1523,10 +1515,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteContentStatusRequest($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) + public function deleteContentStatusRequest($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteContentStatus'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1651,7 +1644,6 @@ public function deleteContentStatusRequest($app, $schema, $id, $x_unpublished = * * Delete the draft version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete the draft from. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1662,9 +1654,9 @@ public function deleteContentStatusRequest($app, $schema, $id, $x_unpublished = * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteVersion($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) + public function deleteVersion($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) { - list($response) = $this->deleteVersionWithHttpInfo($app, $schema, $id, $x_unpublished, $x_languages, $contentType); + list($response) = $this->deleteVersionWithHttpInfo($schema, $id, $x_unpublished, $x_languages, $contentType); return $response; } @@ -1673,7 +1665,6 @@ public function deleteVersion($app, $schema, $id, $x_unpublished = null, $x_lang * * Delete the draft version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete the draft from. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1684,9 +1675,9 @@ public function deleteVersion($app, $schema, $id, $x_unpublished = null, $x_lang * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteVersionWithHttpInfo($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) + public function deleteVersionWithHttpInfo($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) { - $request = $this->deleteVersionRequest($app, $schema, $id, $x_unpublished, $x_languages, $contentType); + $request = $this->deleteVersionRequest($schema, $id, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -1823,7 +1814,6 @@ public function deleteVersionWithHttpInfo($app, $schema, $id, $x_unpublished = n * * Delete the draft version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete the draft from. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1833,9 +1823,9 @@ public function deleteVersionWithHttpInfo($app, $schema, $id, $x_unpublished = n * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteVersionAsync($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) + public function deleteVersionAsync($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) { - return $this->deleteVersionAsyncWithHttpInfo($app, $schema, $id, $x_unpublished, $x_languages, $contentType) + return $this->deleteVersionAsyncWithHttpInfo($schema, $id, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -1848,7 +1838,6 @@ function ($response) { * * Delete the draft version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete the draft from. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1858,10 +1847,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteVersionAsyncWithHttpInfo($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) + public function deleteVersionAsyncWithHttpInfo($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) { $returnType = '\Squidex\Client\Model\ContentDto'; - $request = $this->deleteVersionRequest($app, $schema, $id, $x_unpublished, $x_languages, $contentType); + $request = $this->deleteVersionRequest($schema, $id, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1902,7 +1891,6 @@ function ($exception) { /** * Create request for operation 'deleteVersion' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to delete the draft from. (required) * @param bool $x_unpublished Return unpublished content items. (optional) @@ -1912,10 +1900,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteVersionRequest($app, $schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) + public function deleteVersionRequest($schema, $id, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['deleteVersion'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2040,7 +2029,6 @@ public function deleteVersionRequest($app, $schema, $id, $x_unpublished = null, * * Get a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The optional version. (optional, default to -2) @@ -2054,9 +2042,9 @@ public function deleteVersionRequest($app, $schema, $id, $x_unpublished = null, * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto */ - public function getContent($app, $schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) + public function getContent($schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) { - list($response) = $this->getContentWithHttpInfo($app, $schema, $id, $version, $x_fields, $x_flatten, $x_languages, $x_unpublished, $contentType); + list($response) = $this->getContentWithHttpInfo($schema, $id, $version, $x_fields, $x_flatten, $x_languages, $x_unpublished, $contentType); return $response; } @@ -2065,7 +2053,6 @@ public function getContent($app, $schema, $id, $version = -2, $x_fields = null, * * Get a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The optional version. (optional, default to -2) @@ -2079,9 +2066,9 @@ public function getContent($app, $schema, $id, $version = -2, $x_fields = null, * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getContentWithHttpInfo($app, $schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) + public function getContentWithHttpInfo($schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) { - $request = $this->getContentRequest($app, $schema, $id, $version, $x_fields, $x_flatten, $x_languages, $x_unpublished, $contentType); + $request = $this->getContentRequest($schema, $id, $version, $x_fields, $x_flatten, $x_languages, $x_unpublished, $contentType); try { $options = $this->createHttpClientOption(); @@ -2195,7 +2182,6 @@ public function getContentWithHttpInfo($app, $schema, $id, $version = -2, $x_fie * * Get a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The optional version. (optional, default to -2) @@ -2208,9 +2194,9 @@ public function getContentWithHttpInfo($app, $schema, $id, $version = -2, $x_fie * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContentAsync($app, $schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) + public function getContentAsync($schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) { - return $this->getContentAsyncWithHttpInfo($app, $schema, $id, $version, $x_fields, $x_flatten, $x_languages, $x_unpublished, $contentType) + return $this->getContentAsyncWithHttpInfo($schema, $id, $version, $x_fields, $x_flatten, $x_languages, $x_unpublished, $contentType) ->then( function ($response) { return $response[0]; @@ -2223,7 +2209,6 @@ function ($response) { * * Get a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The optional version. (optional, default to -2) @@ -2236,10 +2221,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContentAsyncWithHttpInfo($app, $schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) + public function getContentAsyncWithHttpInfo($schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) { $returnType = '\Squidex\Client\Model\ContentDto'; - $request = $this->getContentRequest($app, $schema, $id, $version, $x_fields, $x_flatten, $x_languages, $x_unpublished, $contentType); + $request = $this->getContentRequest($schema, $id, $version, $x_fields, $x_flatten, $x_languages, $x_unpublished, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2280,7 +2265,6 @@ function ($exception) { /** * Create request for operation 'getContent' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The optional version. (optional, default to -2) @@ -2293,10 +2277,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getContentRequest($app, $schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) + public function getContentRequest($schema, $id, $version = -2, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, string $contentType = self::contentTypes['getContent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2441,7 +2426,6 @@ public function getContentRequest($app, $schema, $id, $version = -2, $x_fields = * * Get a content item validity. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContentValidity'] to see the possible values for this operation @@ -2450,9 +2434,9 @@ public function getContentRequest($app, $schema, $id, $version = -2, $x_fields = * @throws \InvalidArgumentException * @return void */ - public function getContentValidity($app, $schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) + public function getContentValidity($schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) { - $this->getContentValidityWithHttpInfo($app, $schema, $id, $contentType); + $this->getContentValidityWithHttpInfo($schema, $id, $contentType); } /** @@ -2460,7 +2444,6 @@ public function getContentValidity($app, $schema, $id, string $contentType = sel * * Get a content item validity. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContentValidity'] to see the possible values for this operation @@ -2469,9 +2452,9 @@ public function getContentValidity($app, $schema, $id, string $contentType = sel * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function getContentValidityWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) + public function getContentValidityWithHttpInfo($schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) { - $request = $this->getContentValidityRequest($app, $schema, $id, $contentType); + $request = $this->getContentValidityRequest($schema, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2538,7 +2521,6 @@ public function getContentValidityWithHttpInfo($app, $schema, $id, string $conte * * Get a content item validity. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContentValidity'] to see the possible values for this operation @@ -2546,9 +2528,9 @@ public function getContentValidityWithHttpInfo($app, $schema, $id, string $conte * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContentValidityAsync($app, $schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) + public function getContentValidityAsync($schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) { - return $this->getContentValidityAsyncWithHttpInfo($app, $schema, $id, $contentType) + return $this->getContentValidityAsyncWithHttpInfo($schema, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -2561,7 +2543,6 @@ function ($response) { * * Get a content item validity. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContentValidity'] to see the possible values for this operation @@ -2569,10 +2550,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContentValidityAsyncWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) + public function getContentValidityAsyncWithHttpInfo($schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) { $returnType = ''; - $request = $this->getContentValidityRequest($app, $schema, $id, $contentType); + $request = $this->getContentValidityRequest($schema, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2600,7 +2581,6 @@ function ($exception) { /** * Create request for operation 'getContentValidity' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getContentValidity'] to see the possible values for this operation @@ -2608,10 +2588,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getContentValidityRequest($app, $schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) + public function getContentValidityRequest($schema, $id, string $contentType = self::contentTypes['getContentValidity'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2726,7 +2707,6 @@ public function getContentValidityRequest($app, $schema, $id, string $contentTyp * * Get a content by version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The version fo the content to fetch. (required) @@ -2739,9 +2719,9 @@ public function getContentValidityRequest($app, $schema, $id, string $contentTyp * @return \SplFileObject|\Squidex\Client\Model\ErrorDto * @deprecated */ - public function getContentVersion($app, $schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) + public function getContentVersion($schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) { - list($response) = $this->getContentVersionWithHttpInfo($app, $schema, $id, $version, $x_unpublished, $x_languages, $contentType); + list($response) = $this->getContentVersionWithHttpInfo($schema, $id, $version, $x_unpublished, $x_languages, $contentType); return $response; } @@ -2750,7 +2730,6 @@ public function getContentVersion($app, $schema, $id, $version, $x_unpublished = * * Get a content by version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The version fo the content to fetch. (required) @@ -2763,9 +2742,9 @@ public function getContentVersion($app, $schema, $id, $version, $x_unpublished = * @return array of \SplFileObject|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function getContentVersionWithHttpInfo($app, $schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) + public function getContentVersionWithHttpInfo($schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) { - $request = $this->getContentVersionRequest($app, $schema, $id, $version, $x_unpublished, $x_languages, $contentType); + $request = $this->getContentVersionRequest($schema, $id, $version, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -2879,7 +2858,6 @@ public function getContentVersionWithHttpInfo($app, $schema, $id, $version, $x_u * * Get a content by version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The version fo the content to fetch. (required) @@ -2891,9 +2869,9 @@ public function getContentVersionWithHttpInfo($app, $schema, $id, $version, $x_u * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function getContentVersionAsync($app, $schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) + public function getContentVersionAsync($schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) { - return $this->getContentVersionAsyncWithHttpInfo($app, $schema, $id, $version, $x_unpublished, $x_languages, $contentType) + return $this->getContentVersionAsyncWithHttpInfo($schema, $id, $version, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -2906,7 +2884,6 @@ function ($response) { * * Get a content by version. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The version fo the content to fetch. (required) @@ -2918,10 +2895,10 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function getContentVersionAsyncWithHttpInfo($app, $schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) + public function getContentVersionAsyncWithHttpInfo($schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) { $returnType = '\SplFileObject'; - $request = $this->getContentVersionRequest($app, $schema, $id, $version, $x_unpublished, $x_languages, $contentType); + $request = $this->getContentVersionRequest($schema, $id, $version, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2962,7 +2939,6 @@ function ($exception) { /** * Create request for operation 'getContentVersion' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param int $version The version fo the content to fetch. (required) @@ -2974,10 +2950,11 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function getContentVersionRequest($app, $schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) + public function getContentVersionRequest($schema, $id, $version, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['getContentVersion'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3117,7 +3094,6 @@ public function getContentVersionRequest($app, $schema, $id, $version, $x_unpubl * * Queries contents. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $ids The optional ids of the content to fetch. (optional) * @param string $q The optional json query. (optional) @@ -3138,9 +3114,9 @@ public function getContentVersionRequest($app, $schema, $id, $version, $x_unpubl * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto */ - public function getContents($app, $schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) + public function getContents($schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) { - list($response) = $this->getContentsWithHttpInfo($app, $schema, $ids, $q, $search, $top, $skip, $orderby, $filter, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + list($response) = $this->getContentsWithHttpInfo($schema, $ids, $q, $search, $top, $skip, $orderby, $filter, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); return $response; } @@ -3149,7 +3125,6 @@ public function getContents($app, $schema, $ids = null, $q = null, $search = nul * * Queries contents. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $ids The optional ids of the content to fetch. (optional) * @param string $q The optional json query. (optional) @@ -3170,9 +3145,9 @@ public function getContents($app, $schema, $ids = null, $q = null, $search = nul * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getContentsWithHttpInfo($app, $schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) + public function getContentsWithHttpInfo($schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) { - $request = $this->getContentsRequest($app, $schema, $ids, $q, $search, $top, $skip, $orderby, $filter, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + $request = $this->getContentsRequest($schema, $ids, $q, $search, $top, $skip, $orderby, $filter, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); try { $options = $this->createHttpClientOption(); @@ -3286,7 +3261,6 @@ public function getContentsWithHttpInfo($app, $schema, $ids = null, $q = null, $ * * Queries contents. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $ids The optional ids of the content to fetch. (optional) * @param string $q The optional json query. (optional) @@ -3306,9 +3280,9 @@ public function getContentsWithHttpInfo($app, $schema, $ids = null, $q = null, $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContentsAsync($app, $schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) + public function getContentsAsync($schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) { - return $this->getContentsAsyncWithHttpInfo($app, $schema, $ids, $q, $search, $top, $skip, $orderby, $filter, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType) + return $this->getContentsAsyncWithHttpInfo($schema, $ids, $q, $search, $top, $skip, $orderby, $filter, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType) ->then( function ($response) { return $response[0]; @@ -3321,7 +3295,6 @@ function ($response) { * * Queries contents. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $ids The optional ids of the content to fetch. (optional) * @param string $q The optional json query. (optional) @@ -3341,10 +3314,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContentsAsyncWithHttpInfo($app, $schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) + public function getContentsAsyncWithHttpInfo($schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) { $returnType = '\Squidex\Client\Model\ContentsDto'; - $request = $this->getContentsRequest($app, $schema, $ids, $q, $search, $top, $skip, $orderby, $filter, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + $request = $this->getContentsRequest($schema, $ids, $q, $search, $top, $skip, $orderby, $filter, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3385,7 +3358,6 @@ function ($exception) { /** * Create request for operation 'getContents' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $ids The optional ids of the content to fetch. (optional) * @param string $q The optional json query. (optional) @@ -3405,10 +3377,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getContentsRequest($app, $schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) + public function getContentsRequest($schema, $ids = null, $q = null, $search = null, $top = null, $skip = null, $orderby = null, $filter = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContents'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3608,7 +3581,6 @@ public function getContentsRequest($app, $schema, $ids = null, $q = null, $searc * * Queries contents. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param string $x_fields The list of content fields (comma-separated). (optional) @@ -3623,9 +3595,9 @@ public function getContentsRequest($app, $schema, $ids = null, $q = null, $searc * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function getContentsPost($app, $schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) + public function getContentsPost($schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) { - list($response) = $this->getContentsPostWithHttpInfo($app, $schema, $query_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + list($response) = $this->getContentsPostWithHttpInfo($schema, $query_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); return $response; } @@ -3634,7 +3606,6 @@ public function getContentsPost($app, $schema, $query_dto, $x_fields = null, $x_ * * Queries contents. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param string $x_fields The list of content fields (comma-separated). (optional) @@ -3649,9 +3620,9 @@ public function getContentsPost($app, $schema, $query_dto, $x_fields = null, $x_ * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getContentsPostWithHttpInfo($app, $schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) + public function getContentsPostWithHttpInfo($schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) { - $request = $this->getContentsPostRequest($app, $schema, $query_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + $request = $this->getContentsPostRequest($schema, $query_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); try { $options = $this->createHttpClientOption(); @@ -3788,7 +3759,6 @@ public function getContentsPostWithHttpInfo($app, $schema, $query_dto, $x_fields * * Queries contents. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param string $x_fields The list of content fields (comma-separated). (optional) @@ -3802,9 +3772,9 @@ public function getContentsPostWithHttpInfo($app, $schema, $query_dto, $x_fields * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContentsPostAsync($app, $schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) + public function getContentsPostAsync($schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) { - return $this->getContentsPostAsyncWithHttpInfo($app, $schema, $query_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType) + return $this->getContentsPostAsyncWithHttpInfo($schema, $query_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType) ->then( function ($response) { return $response[0]; @@ -3817,7 +3787,6 @@ function ($response) { * * Queries contents. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param string $x_fields The list of content fields (comma-separated). (optional) @@ -3831,10 +3800,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getContentsPostAsyncWithHttpInfo($app, $schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) + public function getContentsPostAsyncWithHttpInfo($schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) { $returnType = '\Squidex\Client\Model\ContentsDto'; - $request = $this->getContentsPostRequest($app, $schema, $query_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + $request = $this->getContentsPostRequest($schema, $query_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3875,7 +3844,6 @@ function ($exception) { /** * Create request for operation 'getContentsPost' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\QueryDto $query_dto The required query object. (required) * @param string $x_fields The list of content fields (comma-separated). (optional) @@ -3889,10 +3857,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getContentsPostRequest($app, $schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) + public function getContentsPostRequest($schema, $query_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getContentsPost'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4036,7 +4005,6 @@ public function getContentsPostRequest($app, $schema, $query_dto, $x_fields = nu * * Get all references of a content. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4052,9 +4020,9 @@ public function getContentsPostRequest($app, $schema, $query_dto, $x_fields = nu * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto */ - public function getReferences($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) + public function getReferences($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) { - list($response) = $this->getReferencesWithHttpInfo($app, $schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); + list($response) = $this->getReferencesWithHttpInfo($schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); return $response; } @@ -4063,7 +4031,6 @@ public function getReferences($app, $schema, $id, $q = null, $x_fields = null, $ * * Get all references of a content. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4079,9 +4046,9 @@ public function getReferences($app, $schema, $id, $q = null, $x_fields = null, $ * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getReferencesWithHttpInfo($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) + public function getReferencesWithHttpInfo($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) { - $request = $this->getReferencesRequest($app, $schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); + $request = $this->getReferencesRequest($schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); try { $options = $this->createHttpClientOption(); @@ -4195,7 +4162,6 @@ public function getReferencesWithHttpInfo($app, $schema, $id, $q = null, $x_fiel * * Get all references of a content. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4210,9 +4176,9 @@ public function getReferencesWithHttpInfo($app, $schema, $id, $q = null, $x_fiel * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReferencesAsync($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) + public function getReferencesAsync($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) { - return $this->getReferencesAsyncWithHttpInfo($app, $schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType) + return $this->getReferencesAsyncWithHttpInfo($schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType) ->then( function ($response) { return $response[0]; @@ -4225,7 +4191,6 @@ function ($response) { * * Get all references of a content. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4240,10 +4205,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReferencesAsyncWithHttpInfo($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) + public function getReferencesAsyncWithHttpInfo($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) { $returnType = '\Squidex\Client\Model\ContentsDto'; - $request = $this->getReferencesRequest($app, $schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); + $request = $this->getReferencesRequest($schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4284,7 +4249,6 @@ function ($exception) { /** * Create request for operation 'getReferences' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4299,10 +4263,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getReferencesRequest($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) + public function getReferencesRequest($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferences'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4457,7 +4422,6 @@ public function getReferencesRequest($app, $schema, $id, $q = null, $x_fields = * * Get a referencing contents of a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4473,9 +4437,9 @@ public function getReferencesRequest($app, $schema, $id, $q = null, $x_fields = * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto */ - public function getReferencing($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) + public function getReferencing($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) { - list($response) = $this->getReferencingWithHttpInfo($app, $schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); + list($response) = $this->getReferencingWithHttpInfo($schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); return $response; } @@ -4484,7 +4448,6 @@ public function getReferencing($app, $schema, $id, $q = null, $x_fields = null, * * Get a referencing contents of a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4500,9 +4463,9 @@ public function getReferencing($app, $schema, $id, $q = null, $x_fields = null, * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getReferencingWithHttpInfo($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) + public function getReferencingWithHttpInfo($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) { - $request = $this->getReferencingRequest($app, $schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); + $request = $this->getReferencingRequest($schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); try { $options = $this->createHttpClientOption(); @@ -4616,7 +4579,6 @@ public function getReferencingWithHttpInfo($app, $schema, $id, $q = null, $x_fie * * Get a referencing contents of a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4631,9 +4593,9 @@ public function getReferencingWithHttpInfo($app, $schema, $id, $q = null, $x_fie * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReferencingAsync($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) + public function getReferencingAsync($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) { - return $this->getReferencingAsyncWithHttpInfo($app, $schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType) + return $this->getReferencingAsyncWithHttpInfo($schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType) ->then( function ($response) { return $response[0]; @@ -4646,7 +4608,6 @@ function ($response) { * * Get a referencing contents of a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4661,10 +4622,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReferencingAsyncWithHttpInfo($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) + public function getReferencingAsyncWithHttpInfo($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) { $returnType = '\Squidex\Client\Model\ContentsDto'; - $request = $this->getReferencingRequest($app, $schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); + $request = $this->getReferencingRequest($schema, $id, $q, $x_fields, $x_flatten, $x_languages, $x_unpublished, $x_no_slow_total, $x_no_total, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4705,7 +4666,6 @@ function ($exception) { /** * Create request for operation 'getReferencing' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content to fetch. (required) * @param string $q The optional json query. (optional) @@ -4720,10 +4680,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getReferencingRequest($app, $schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) + public function getReferencingRequest($schema, $id, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_unpublished = null, $x_no_slow_total = null, $x_no_total = null, string $contentType = self::contentTypes['getReferencing'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4878,7 +4839,6 @@ public function getReferencingRequest($app, $schema, $id, $q = null, $x_fields = * * Patchs a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to patch. (required) * @param array $request_body The patch for the content item. (required) @@ -4890,9 +4850,9 @@ public function getReferencingRequest($app, $schema, $id, $q = null, $x_fields = * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function patchContent($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) + public function patchContent($schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) { - list($response) = $this->patchContentWithHttpInfo($app, $schema, $id, $request_body, $x_unpublished, $x_languages, $contentType); + list($response) = $this->patchContentWithHttpInfo($schema, $id, $request_body, $x_unpublished, $x_languages, $contentType); return $response; } @@ -4901,7 +4861,6 @@ public function patchContent($app, $schema, $id, $request_body, $x_unpublished = * * Patchs a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to patch. (required) * @param array $request_body The patch for the content item. (required) @@ -4913,9 +4872,9 @@ public function patchContent($app, $schema, $id, $request_body, $x_unpublished = * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function patchContentWithHttpInfo($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) + public function patchContentWithHttpInfo($schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) { - $request = $this->patchContentRequest($app, $schema, $id, $request_body, $x_unpublished, $x_languages, $contentType); + $request = $this->patchContentRequest($schema, $id, $request_body, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -5052,7 +5011,6 @@ public function patchContentWithHttpInfo($app, $schema, $id, $request_body, $x_u * * Patchs a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to patch. (required) * @param array $request_body The patch for the content item. (required) @@ -5063,9 +5021,9 @@ public function patchContentWithHttpInfo($app, $schema, $id, $request_body, $x_u * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchContentAsync($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) + public function patchContentAsync($schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) { - return $this->patchContentAsyncWithHttpInfo($app, $schema, $id, $request_body, $x_unpublished, $x_languages, $contentType) + return $this->patchContentAsyncWithHttpInfo($schema, $id, $request_body, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -5078,7 +5036,6 @@ function ($response) { * * Patchs a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to patch. (required) * @param array $request_body The patch for the content item. (required) @@ -5089,10 +5046,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchContentAsyncWithHttpInfo($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) + public function patchContentAsyncWithHttpInfo($schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) { $returnType = '\Squidex\Client\Model\ContentDto'; - $request = $this->patchContentRequest($app, $schema, $id, $request_body, $x_unpublished, $x_languages, $contentType); + $request = $this->patchContentRequest($schema, $id, $request_body, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5133,7 +5090,6 @@ function ($exception) { /** * Create request for operation 'patchContent' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to patch. (required) * @param array $request_body The patch for the content item. (required) @@ -5144,10 +5100,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function patchContentRequest($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) + public function patchContentRequest($schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['patchContent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5286,7 +5243,6 @@ public function patchContentRequest($app, $schema, $id, $request_body, $x_unpubl * * Create a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) @@ -5300,9 +5256,9 @@ public function patchContentRequest($app, $schema, $id, $request_body, $x_unpubl * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postContent($app, $schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) + public function postContent($schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) { - list($response) = $this->postContentWithHttpInfo($app, $schema, $request_body, $status, $id, $publish, $x_unpublished, $x_languages, $contentType); + list($response) = $this->postContentWithHttpInfo($schema, $request_body, $status, $id, $publish, $x_unpublished, $x_languages, $contentType); return $response; } @@ -5311,7 +5267,6 @@ public function postContent($app, $schema, $request_body, $status = null, $id = * * Create a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) @@ -5325,9 +5280,9 @@ public function postContent($app, $schema, $request_body, $status = null, $id = * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postContentWithHttpInfo($app, $schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) + public function postContentWithHttpInfo($schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) { - $request = $this->postContentRequest($app, $schema, $request_body, $status, $id, $publish, $x_unpublished, $x_languages, $contentType); + $request = $this->postContentRequest($schema, $request_body, $status, $id, $publish, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -5464,7 +5419,6 @@ public function postContentWithHttpInfo($app, $schema, $request_body, $status = * * Create a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) @@ -5477,9 +5431,9 @@ public function postContentWithHttpInfo($app, $schema, $request_body, $status = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postContentAsync($app, $schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) + public function postContentAsync($schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) { - return $this->postContentAsyncWithHttpInfo($app, $schema, $request_body, $status, $id, $publish, $x_unpublished, $x_languages, $contentType) + return $this->postContentAsyncWithHttpInfo($schema, $request_body, $status, $id, $publish, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -5492,7 +5446,6 @@ function ($response) { * * Create a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) @@ -5505,10 +5458,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postContentAsyncWithHttpInfo($app, $schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) + public function postContentAsyncWithHttpInfo($schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) { $returnType = '\Squidex\Client\Model\ContentDto'; - $request = $this->postContentRequest($app, $schema, $request_body, $status, $id, $publish, $x_unpublished, $x_languages, $contentType); + $request = $this->postContentRequest($schema, $request_body, $status, $id, $publish, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5549,7 +5502,6 @@ function ($exception) { /** * Create request for operation 'postContent' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) @@ -5562,10 +5514,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postContentRequest($app, $schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) + public function postContentRequest($schema, $request_body, $status = null, $id = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postContent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5719,7 +5672,6 @@ public function postContentRequest($app, $schema, $request_body, $status = null, * * Import content items. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ImportContentsDto $import_contents_dto The import request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContents'] to see the possible values for this operation @@ -5729,9 +5681,9 @@ public function postContentRequest($app, $schema, $request_body, $status = null, * @return \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto * @deprecated */ - public function postContents($app, $schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) + public function postContents($schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) { - list($response) = $this->postContentsWithHttpInfo($app, $schema, $import_contents_dto, $contentType); + list($response) = $this->postContentsWithHttpInfo($schema, $import_contents_dto, $contentType); return $response; } @@ -5740,7 +5692,6 @@ public function postContents($app, $schema, $import_contents_dto, string $conten * * Import content items. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ImportContentsDto $import_contents_dto The import request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContents'] to see the possible values for this operation @@ -5750,9 +5701,9 @@ public function postContents($app, $schema, $import_contents_dto, string $conten * @return array of \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function postContentsWithHttpInfo($app, $schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) + public function postContentsWithHttpInfo($schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) { - $request = $this->postContentsRequest($app, $schema, $import_contents_dto, $contentType); + $request = $this->postContentsRequest($schema, $import_contents_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -5889,7 +5840,6 @@ public function postContentsWithHttpInfo($app, $schema, $import_contents_dto, st * * Import content items. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ImportContentsDto $import_contents_dto The import request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContents'] to see the possible values for this operation @@ -5898,9 +5848,9 @@ public function postContentsWithHttpInfo($app, $schema, $import_contents_dto, st * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function postContentsAsync($app, $schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) + public function postContentsAsync($schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) { - return $this->postContentsAsyncWithHttpInfo($app, $schema, $import_contents_dto, $contentType) + return $this->postContentsAsyncWithHttpInfo($schema, $import_contents_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -5913,7 +5863,6 @@ function ($response) { * * Import content items. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ImportContentsDto $import_contents_dto The import request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContents'] to see the possible values for this operation @@ -5922,10 +5871,10 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function postContentsAsyncWithHttpInfo($app, $schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) + public function postContentsAsyncWithHttpInfo($schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) { $returnType = '\Squidex\Client\Model\BulkResultDto[]'; - $request = $this->postContentsRequest($app, $schema, $import_contents_dto, $contentType); + $request = $this->postContentsRequest($schema, $import_contents_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5966,7 +5915,6 @@ function ($exception) { /** * Create request for operation 'postContents' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ImportContentsDto $import_contents_dto The import request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postContents'] to see the possible values for this operation @@ -5975,10 +5923,11 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function postContentsRequest($app, $schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) + public function postContentsRequest($schema, $import_contents_dto, string $contentType = self::contentTypes['postContents'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6092,12 +6041,12 @@ public function postContentsRequest($app, $schema, $import_contents_dto, string * * Upsert a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) * @param bool $patch Makes the update as patch. (optional) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $publish True to automatically publish the content. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) @@ -6107,9 +6056,9 @@ public function postContentsRequest($app, $schema, $import_contents_dto, string * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postUpsertContent($app, $schema, $id, $request_body, $status = null, $patch = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) + public function postUpsertContent($schema, $id, $request_body, $status = null, $patch = null, $enrich_defaults = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) { - list($response) = $this->postUpsertContentWithHttpInfo($app, $schema, $id, $request_body, $status, $patch, $publish, $x_unpublished, $x_languages, $contentType); + list($response) = $this->postUpsertContentWithHttpInfo($schema, $id, $request_body, $status, $patch, $enrich_defaults, $publish, $x_unpublished, $x_languages, $contentType); return $response; } @@ -6118,12 +6067,12 @@ public function postUpsertContent($app, $schema, $id, $request_body, $status = n * * Upsert a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) * @param bool $patch Makes the update as patch. (optional) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $publish True to automatically publish the content. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) @@ -6133,9 +6082,9 @@ public function postUpsertContent($app, $schema, $id, $request_body, $status = n * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postUpsertContentWithHttpInfo($app, $schema, $id, $request_body, $status = null, $patch = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) + public function postUpsertContentWithHttpInfo($schema, $id, $request_body, $status = null, $patch = null, $enrich_defaults = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) { - $request = $this->postUpsertContentRequest($app, $schema, $id, $request_body, $status, $patch, $publish, $x_unpublished, $x_languages, $contentType); + $request = $this->postUpsertContentRequest($schema, $id, $request_body, $status, $patch, $enrich_defaults, $publish, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -6272,12 +6221,12 @@ public function postUpsertContentWithHttpInfo($app, $schema, $id, $request_body, * * Upsert a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) * @param bool $patch Makes the update as patch. (optional) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $publish True to automatically publish the content. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) @@ -6286,9 +6235,9 @@ public function postUpsertContentWithHttpInfo($app, $schema, $id, $request_body, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postUpsertContentAsync($app, $schema, $id, $request_body, $status = null, $patch = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) + public function postUpsertContentAsync($schema, $id, $request_body, $status = null, $patch = null, $enrich_defaults = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) { - return $this->postUpsertContentAsyncWithHttpInfo($app, $schema, $id, $request_body, $status, $patch, $publish, $x_unpublished, $x_languages, $contentType) + return $this->postUpsertContentAsyncWithHttpInfo($schema, $id, $request_body, $status, $patch, $enrich_defaults, $publish, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -6301,12 +6250,12 @@ function ($response) { * * Upsert a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) * @param bool $patch Makes the update as patch. (optional) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $publish True to automatically publish the content. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) @@ -6315,10 +6264,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postUpsertContentAsyncWithHttpInfo($app, $schema, $id, $request_body, $status = null, $patch = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) + public function postUpsertContentAsyncWithHttpInfo($schema, $id, $request_body, $status = null, $patch = null, $enrich_defaults = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) { $returnType = '\Squidex\Client\Model\ContentDto'; - $request = $this->postUpsertContentRequest($app, $schema, $id, $request_body, $status, $patch, $publish, $x_unpublished, $x_languages, $contentType); + $request = $this->postUpsertContentRequest($schema, $id, $request_body, $status, $patch, $enrich_defaults, $publish, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6359,12 +6308,12 @@ function ($exception) { /** * Create request for operation 'postUpsertContent' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) * @param string $status The initial status. (optional) * @param bool $patch Makes the update as patch. (optional) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $publish True to automatically publish the content. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) @@ -6373,10 +6322,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postUpsertContentRequest($app, $schema, $id, $request_body, $status = null, $patch = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) + public function postUpsertContentRequest($schema, $id, $request_body, $status = null, $patch = null, $enrich_defaults = null, $publish = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['postUpsertContent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6410,6 +6360,7 @@ public function postUpsertContentRequest($app, $schema, $id, $request_body, $sta + $resourcePath = '/api/content/{app}/{schema}/{id}'; $formParams = []; $queryParams = []; @@ -6436,6 +6387,15 @@ public function postUpsertContentRequest($app, $schema, $id, $request_body, $sta false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enrich_defaults, + 'enrichDefaults', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $publish, 'publish', // param base name @@ -6545,10 +6505,10 @@ public function postUpsertContentRequest($app, $schema, $id, $request_body, $sta * * Update a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContent'] to see the possible values for this operation @@ -6557,9 +6517,9 @@ public function postUpsertContentRequest($app, $schema, $id, $request_body, $sta * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putContent($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) + public function putContent($schema, $id, $request_body, $enrich_defaults = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) { - list($response) = $this->putContentWithHttpInfo($app, $schema, $id, $request_body, $x_unpublished, $x_languages, $contentType); + list($response) = $this->putContentWithHttpInfo($schema, $id, $request_body, $enrich_defaults, $x_unpublished, $x_languages, $contentType); return $response; } @@ -6568,10 +6528,10 @@ public function putContent($app, $schema, $id, $request_body, $x_unpublished = n * * Update a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContent'] to see the possible values for this operation @@ -6580,9 +6540,9 @@ public function putContent($app, $schema, $id, $request_body, $x_unpublished = n * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putContentWithHttpInfo($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) + public function putContentWithHttpInfo($schema, $id, $request_body, $enrich_defaults = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) { - $request = $this->putContentRequest($app, $schema, $id, $request_body, $x_unpublished, $x_languages, $contentType); + $request = $this->putContentRequest($schema, $id, $request_body, $enrich_defaults, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -6719,10 +6679,10 @@ public function putContentWithHttpInfo($app, $schema, $id, $request_body, $x_unp * * Update a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContent'] to see the possible values for this operation @@ -6730,9 +6690,9 @@ public function putContentWithHttpInfo($app, $schema, $id, $request_body, $x_unp * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putContentAsync($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) + public function putContentAsync($schema, $id, $request_body, $enrich_defaults = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) { - return $this->putContentAsyncWithHttpInfo($app, $schema, $id, $request_body, $x_unpublished, $x_languages, $contentType) + return $this->putContentAsyncWithHttpInfo($schema, $id, $request_body, $enrich_defaults, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -6745,10 +6705,10 @@ function ($response) { * * Update a content item. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContent'] to see the possible values for this operation @@ -6756,10 +6716,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putContentAsyncWithHttpInfo($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) + public function putContentAsyncWithHttpInfo($schema, $id, $request_body, $enrich_defaults = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) { $returnType = '\Squidex\Client\Model\ContentDto'; - $request = $this->putContentRequest($app, $schema, $id, $request_body, $x_unpublished, $x_languages, $contentType); + $request = $this->putContentRequest($schema, $id, $request_body, $enrich_defaults, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6800,10 +6760,10 @@ function ($exception) { /** * Create request for operation 'putContent' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param string $id The ID of the content item to update. (required) * @param array $request_body The full data for the content item. (required) + * @param bool $enrich_defaults Enrich the content with defaults. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContent'] to see the possible values for this operation @@ -6811,10 +6771,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putContentRequest($app, $schema, $id, $request_body, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) + public function putContentRequest($schema, $id, $request_body, $enrich_defaults = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6845,6 +6806,7 @@ public function putContentRequest($app, $schema, $id, $request_body, $x_unpublis + $resourcePath = '/api/content/{app}/{schema}/{id}'; $formParams = []; $queryParams = []; @@ -6852,6 +6814,15 @@ public function putContentRequest($app, $schema, $id, $request_body, $x_unpublis $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enrich_defaults, + 'enrichDefaults', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($x_unpublished !== null) { @@ -6949,48 +6920,46 @@ public function putContentRequest($app, $schema, $id, $request_body, $x_unpublis } /** - * Operation putContentStatus + * Operation putContentDefaults * - * Change status of a content item. + * Enrich a content item with defaults. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) - * @param string $id The ID of the content item to change. (required) - * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param string $id The ID of the content item to update. (required) + * @param bool $enrich_required_fields True, to also enrich required fields. Default: false. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentDefaults'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putContentStatus($app, $schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) + public function putContentDefaults($schema, $id, $enrich_required_fields = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentDefaults'][0]) { - list($response) = $this->putContentStatusWithHttpInfo($app, $schema, $id, $change_status_dto, $x_unpublished, $x_languages, $contentType); + list($response) = $this->putContentDefaultsWithHttpInfo($schema, $id, $enrich_required_fields, $x_unpublished, $x_languages, $contentType); return $response; } /** - * Operation putContentStatusWithHttpInfo + * Operation putContentDefaultsWithHttpInfo * - * Change status of a content item. + * Enrich a content item with defaults. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) - * @param string $id The ID of the content item to change. (required) - * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param string $id The ID of the content item to update. (required) + * @param bool $enrich_required_fields True, to also enrich required fields. Default: false. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentDefaults'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putContentStatusWithHttpInfo($app, $schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) + public function putContentDefaultsWithHttpInfo($schema, $id, $enrich_required_fields = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentDefaults'][0]) { - $request = $this->putContentStatusRequest($app, $schema, $id, $change_status_dto, $x_unpublished, $x_languages, $contentType); + $request = $this->putContentDefaultsRequest($schema, $id, $enrich_required_fields, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -7123,24 +7092,23 @@ public function putContentStatusWithHttpInfo($app, $schema, $id, $change_status_ } /** - * Operation putContentStatusAsync + * Operation putContentDefaultsAsync * - * Change status of a content item. + * Enrich a content item with defaults. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) - * @param string $id The ID of the content item to change. (required) - * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param string $id The ID of the content item to update. (required) + * @param bool $enrich_required_fields True, to also enrich required fields. Default: false. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentDefaults'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putContentStatusAsync($app, $schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) + public function putContentDefaultsAsync($schema, $id, $enrich_required_fields = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentDefaults'][0]) { - return $this->putContentStatusAsyncWithHttpInfo($app, $schema, $id, $change_status_dto, $x_unpublished, $x_languages, $contentType) + return $this->putContentDefaultsAsyncWithHttpInfo($schema, $id, $enrich_required_fields, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -7149,25 +7117,24 @@ function ($response) { } /** - * Operation putContentStatusAsyncWithHttpInfo + * Operation putContentDefaultsAsyncWithHttpInfo * - * Change status of a content item. + * Enrich a content item with defaults. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) - * @param string $id The ID of the content item to change. (required) - * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param string $id The ID of the content item to update. (required) + * @param bool $enrich_required_fields True, to also enrich required fields. Default: false. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentDefaults'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putContentStatusAsyncWithHttpInfo($app, $schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) + public function putContentDefaultsAsyncWithHttpInfo($schema, $id, $enrich_required_fields = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentDefaults'][0]) { $returnType = '\Squidex\Client\Model\ContentDto'; - $request = $this->putContentStatusRequest($app, $schema, $id, $change_status_dto, $x_unpublished, $x_languages, $contentType); + $request = $this->putContentDefaultsRequest($schema, $id, $enrich_required_fields, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7206,23 +7173,23 @@ function ($exception) { } /** - * Create request for operation 'putContentStatus' + * Create request for operation 'putContentDefaults' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) - * @param string $id The ID of the content item to change. (required) - * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param string $id The ID of the content item to update. (required) + * @param bool $enrich_required_fields True, to also enrich required fields. Default: false. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentDefaults'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putContentStatusRequest($app, $schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) + public function putContentDefaultsRequest($schema, $id, $enrich_required_fields = null, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentDefaults'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -7243,23 +7210,26 @@ public function putContentStatusRequest($app, $schema, $id, $change_status_dto, ); } - // verify the required parameter 'change_status_dto' is set - if ($change_status_dto === null || (is_array($change_status_dto) && count($change_status_dto) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $change_status_dto when calling ' - ); - } - $resourcePath = '/api/content/{app}/{schema}/{id}/status'; + $resourcePath = '/api/content/{app}/{schema}/{id}/defaults'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enrich_required_fields, + 'enrichRequiredFields', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header params if ($x_unpublished !== null) { @@ -7303,14 +7273,7 @@ public function putContentStatusRequest($app, $schema, $id, $change_status_dto, ); // for model (json/xml) - if (isset($change_status_dto)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($change_status_dto)); - } else { - $httpBody = $change_status_dto; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -7357,42 +7320,46 @@ public function putContentStatusRequest($app, $schema, $id, $change_status_dto, } /** - * Operation bulkUpdateContents + * Operation putContentStatus * - * Bulk update content items. + * Change status of a content item. * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) - * @param string $schema The name of the schema. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation + * @param string $schema The name of the schema. (required) + * @param string $id The ID of the content item to change. (required) + * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto + * @return \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function bulkUpdateContents($app, $bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function putContentStatus($schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) { - list($response) = $this->bulkUpdateContentsWithHttpInfo($app, $bulk_update_contents_dto, $schema, $contentType); + list($response) = $this->putContentStatusWithHttpInfo($schema, $id, $change_status_dto, $x_unpublished, $x_languages, $contentType); return $response; } /** - * Operation bulkUpdateContentsWithHttpInfo + * Operation putContentStatusWithHttpInfo * - * Bulk update content items. + * Change status of a content item. * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) - * @param string $schema The name of the schema. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation + * @param string $schema The name of the schema. (required) + * @param string $id The ID of the content item to change. (required) + * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @return array of \Squidex\Client\Model\ContentDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function bulkUpdateContentsWithHttpInfo($app, $bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function putContentStatusWithHttpInfo($schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) { - $request = $this->bulkUpdateContentsRequest($app, $bulk_update_contents_dto, $schema, $contentType); + $request = $this->putContentStatusRequest($schema, $id, $change_status_dto, $x_unpublished, $x_languages, $contentType); try { $options = $this->createHttpClientOption(); @@ -7431,17 +7398,17 @@ public function bulkUpdateContentsWithHttpInfo($app, $bulk_update_contents_dto, switch($statusCode) { case 200: - if ('\Squidex\Client\Model\BulkResultDto[]' === '\SplFileObject') { + if ('\Squidex\Client\Model\ContentDto' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\BulkResultDto[]' !== 'string') { + if ('\Squidex\Client\Model\ContentDto' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\BulkResultDto[]', []), + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ContentDto', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -7477,7 +7444,7 @@ public function bulkUpdateContentsWithHttpInfo($app, $bulk_update_contents_dto, ]; } - $returnType = '\Squidex\Client\Model\BulkResultDto[]'; + $returnType = '\Squidex\Client\Model\ContentDto'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -7498,7 +7465,7 @@ public function bulkUpdateContentsWithHttpInfo($app, $bulk_update_contents_dto, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Squidex\Client\Model\BulkResultDto[]', + '\Squidex\Client\Model\ContentDto', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -7525,21 +7492,23 @@ public function bulkUpdateContentsWithHttpInfo($app, $bulk_update_contents_dto, } /** - * Operation bulkUpdateContentsAsync + * Operation putContentStatusAsync * - * Bulk update content items. + * Change status of a content item. * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) - * @param string $schema The name of the schema. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation + * @param string $schema The name of the schema. (required) + * @param string $id The ID of the content item to change. (required) + * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkUpdateContentsAsync($app, $bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function putContentStatusAsync($schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) { - return $this->bulkUpdateContentsAsyncWithHttpInfo($app, $bulk_update_contents_dto, $schema, $contentType) + return $this->putContentStatusAsyncWithHttpInfo($schema, $id, $change_status_dto, $x_unpublished, $x_languages, $contentType) ->then( function ($response) { return $response[0]; @@ -7548,22 +7517,24 @@ function ($response) { } /** - * Operation bulkUpdateContentsAsyncWithHttpInfo + * Operation putContentStatusAsyncWithHttpInfo * - * Bulk update content items. + * Change status of a content item. * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) - * @param string $schema The name of the schema. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation + * @param string $schema The name of the schema. (required) + * @param string $id The ID of the content item to change. (required) + * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkUpdateContentsAsyncWithHttpInfo($app, $bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function putContentStatusAsyncWithHttpInfo($schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) { - $returnType = '\Squidex\Client\Model\BulkResultDto[]'; - $request = $this->bulkUpdateContentsRequest($app, $bulk_update_contents_dto, $schema, $contentType); + $returnType = '\Squidex\Client\Model\ContentDto'; + $request = $this->putContentStatusRequest($schema, $id, $change_status_dto, $x_unpublished, $x_languages, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7602,52 +7573,69 @@ function ($exception) { } /** - * Create request for operation 'bulkUpdateContents' + * Create request for operation 'putContentStatus' * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) - * @param string $schema The name of the schema. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateContents'] to see the possible values for this operation + * @param string $schema The name of the schema. (required) + * @param string $id The ID of the content item to change. (required) + * @param \Squidex\Client\Model\ChangeStatusDto $change_status_dto The status request. (required) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putContentStatus'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function bulkUpdateContentsRequest($app, $bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateContents'][0]) + public function putContentStatusRequest($schema, $id, $change_status_dto, $x_unpublished = null, $x_languages = null, string $contentType = self::contentTypes['putContentStatus'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' ); } - // verify the required parameter 'bulk_update_contents_dto' is set - if ($bulk_update_contents_dto === null || (is_array($bulk_update_contents_dto) && count($bulk_update_contents_dto) === 0)) { + // verify the required parameter 'schema' is set + if ($schema === null || (is_array($schema) && count($schema) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $bulk_update_contents_dto when calling ' + 'Missing the required parameter $schema when calling ' ); } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling ' + ); + } + + // verify the required parameter 'change_status_dto' is set + if ($change_status_dto === null || (is_array($change_status_dto) && count($change_status_dto) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $change_status_dto when calling ' + ); + } - $resourcePath = '/api/content/{app}/bulk'; + + + $resourcePath = '/api/content/{app}/{schema}/{id}/status'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $schema, - 'schema', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // header params + if ($x_unpublished !== null) { + $headerParams['X-Unpublished'] = ObjectSerializer::toHeaderValue($x_unpublished); + } + // header params + if ($x_languages !== null) { + $headerParams['X-Languages'] = ObjectSerializer::toHeaderValue($x_languages); + } // path params if ($app !== null) { @@ -7657,6 +7645,22 @@ public function bulkUpdateContentsRequest($app, $bulk_update_contents_dto, $sche $resourcePath ); } + // path params + if ($schema !== null) { + $resourcePath = str_replace( + '{' . 'schema' . '}', + ObjectSerializer::toPathValue($schema), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -7666,12 +7670,12 @@ public function bulkUpdateContentsRequest($app, $bulk_update_contents_dto, $sche ); // for model (json/xml) - if (isset($bulk_update_contents_dto)) { + if (isset($change_status_dto)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($bulk_update_contents_dto)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($change_status_dto)); } else { - $httpBody = $bulk_update_contents_dto; + $httpBody = $change_status_dto; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -7712,7 +7716,7 @@ public function bulkUpdateContentsRequest($app, $bulk_update_contents_dto, $sche $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -7720,62 +7724,1259 @@ public function bulkUpdateContentsRequest($app, $bulk_update_contents_dto, $sche } /** - * Operation getAllContents + * Operation bulkUpdateAllContents * - * Queries contents. + * Bulk update content items. * - * @param string $app The name of the app. (required) - * @param string $ids The list of ids to query. (optional) - * @param \DateTime $schedule_from The start of the schedule. (optional) - * @param \DateTime $schedule_to The end of the schedule. (optional) - * @param string $referencing The ID of the referencing content item. (optional) - * @param string $references The ID of the reference content item. (optional) - * @param string $q The optional json query. (optional) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) - * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation + * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) + * @param string $schema The name of the schema. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAllContents'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto + * @return \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function getAllContents($app, $ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + public function bulkUpdateAllContents($bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateAllContents'][0]) { - list($response) = $this->getAllContentsWithHttpInfo($app, $ids, $schedule_from, $schedule_to, $referencing, $references, $q, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + list($response) = $this->bulkUpdateAllContentsWithHttpInfo($bulk_update_contents_dto, $schema, $contentType); return $response; } /** - * Operation getAllContentsWithHttpInfo + * Operation bulkUpdateAllContentsWithHttpInfo * - * Queries contents. + * Bulk update content items. * - * @param string $app The name of the app. (required) - * @param string $ids The list of ids to query. (optional) - * @param \DateTime $schedule_from The start of the schedule. (optional) - * @param \DateTime $schedule_to The end of the schedule. (optional) - * @param string $referencing The ID of the referencing content item. (optional) - * @param string $references The ID of the reference content item. (optional) - * @param string $q The optional json query. (optional) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) - * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation + * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) + * @param string $schema The name of the schema. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAllContents'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Squidex\Client\Model\BulkResultDto[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + */ + public function bulkUpdateAllContentsWithHttpInfo($bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateAllContents'][0]) + { + $request = $this->bulkUpdateAllContentsRequest($bulk_update_contents_dto, $schema, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $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: + if ('\Squidex\Client\Model\BulkResultDto[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\BulkResultDto[]' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\BulkResultDto[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Squidex\Client\Model\BulkResultDto[]'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\BulkResultDto[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation bulkUpdateAllContentsAsync + * + * Bulk update content items. + * + * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) + * @param string $schema The name of the schema. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAllContents'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function bulkUpdateAllContentsAsync($bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateAllContents'][0]) + { + return $this->bulkUpdateAllContentsAsyncWithHttpInfo($bulk_update_contents_dto, $schema, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation bulkUpdateAllContentsAsyncWithHttpInfo + * + * Bulk update content items. + * + * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) + * @param string $schema The name of the schema. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAllContents'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function bulkUpdateAllContentsAsyncWithHttpInfo($bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateAllContents'][0]) + { + $returnType = '\Squidex\Client\Model\BulkResultDto[]'; + $request = $this->bulkUpdateAllContentsRequest($bulk_update_contents_dto, $schema, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'bulkUpdateAllContents' + * + * @param \Squidex\Client\Model\BulkUpdateContentsDto $bulk_update_contents_dto The bulk update request. (required) + * @param string $schema The name of the schema. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkUpdateAllContents'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function bulkUpdateAllContentsRequest($bulk_update_contents_dto, $schema = null, string $contentType = self::contentTypes['bulkUpdateAllContents'][0]) + { + + // verify the required parameter 'app' is set + $app = $this->config->getAppName(); + if ($app === null || (is_array($app) && count($app) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app when calling ' + ); + } + + // verify the required parameter 'bulk_update_contents_dto' is set + if ($bulk_update_contents_dto === null || (is_array($bulk_update_contents_dto) && count($bulk_update_contents_dto) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $bulk_update_contents_dto when calling ' + ); + } + + + + $resourcePath = '/api/content/{app}/bulk'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $schema, + 'schema', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($app !== null) { + $resourcePath = str_replace( + '{' . 'app' . '}', + ObjectSerializer::toPathValue($app), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($bulk_update_contents_dto)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($bulk_update_contents_dto)); + } else { + $httpBody = $bulk_update_contents_dto; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAllContents + * + * Queries contents. + * + * @param string $ids The list of ids to query. (optional) + * @param \DateTime $schedule_from The start of the schedule. (optional) + * @param \DateTime $schedule_to The end of the schedule. (optional) + * @param string $referencing The ID of the referencing content item. (optional) + * @param string $references The ID of the reference content item. (optional) + * @param string $q The optional json query. (optional) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto + */ + public function getAllContents($ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + { + list($response) = $this->getAllContentsWithHttpInfo($ids, $schedule_from, $schedule_to, $referencing, $references, $q, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + return $response; + } + + /** + * Operation getAllContentsWithHttpInfo + * + * Queries contents. + * + * @param string $ids The list of ids to query. (optional) + * @param \DateTime $schedule_from The start of the schedule. (optional) + * @param \DateTime $schedule_to The end of the schedule. (optional) + * @param string $referencing The ID of the referencing content item. (optional) + * @param string $references The ID of the reference content item. (optional) + * @param string $q The optional json query. (optional) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAllContentsWithHttpInfo($app, $ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + public function getAllContentsWithHttpInfo($ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + { + $request = $this->getAllContentsRequest($ids, $schedule_from, $schedule_to, $referencing, $references, $q, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $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: + if ('\Squidex\Client\Model\ContentsDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ContentsDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ContentsDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Squidex\Client\Model\ContentsDto'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ContentsDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAllContentsAsync + * + * Queries contents. + * + * @param string $ids The list of ids to query. (optional) + * @param \DateTime $schedule_from The start of the schedule. (optional) + * @param \DateTime $schedule_to The end of the schedule. (optional) + * @param string $referencing The ID of the referencing content item. (optional) + * @param string $references The ID of the reference content item. (optional) + * @param string $q The optional json query. (optional) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAllContentsAsync($ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + { + return $this->getAllContentsAsyncWithHttpInfo($ids, $schedule_from, $schedule_to, $referencing, $references, $q, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAllContentsAsyncWithHttpInfo + * + * Queries contents. + * + * @param string $ids The list of ids to query. (optional) + * @param \DateTime $schedule_from The start of the schedule. (optional) + * @param \DateTime $schedule_to The end of the schedule. (optional) + * @param string $referencing The ID of the referencing content item. (optional) + * @param string $references The ID of the reference content item. (optional) + * @param string $q The optional json query. (optional) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAllContentsAsyncWithHttpInfo($ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + { + $returnType = '\Squidex\Client\Model\ContentsDto'; + $request = $this->getAllContentsRequest($ids, $schedule_from, $schedule_to, $referencing, $references, $q, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAllContents' + * + * @param string $ids The list of ids to query. (optional) + * @param \DateTime $schedule_from The start of the schedule. (optional) + * @param \DateTime $schedule_to The end of the schedule. (optional) + * @param string $referencing The ID of the referencing content item. (optional) + * @param string $references The ID of the reference content item. (optional) + * @param string $q The optional json query. (optional) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAllContentsRequest($ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + { + + // verify the required parameter 'app' is set + $app = $this->config->getAppName(); + if ($app === null || (is_array($app) && count($app) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app when calling ' + ); + } + + + + + + + + + + + + + + + $resourcePath = '/api/content/{app}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $ids, + 'ids', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $schedule_from, + 'scheduleFrom', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $schedule_to, + 'scheduleTo', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $referencing, + 'referencing', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $references, + 'references', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $q, + 'q', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + // header params + if ($x_fields !== null) { + $headerParams['X-Fields'] = ObjectSerializer::toHeaderValue($x_fields); + } + // header params + if ($x_flatten !== null) { + $headerParams['X-Flatten'] = ObjectSerializer::toHeaderValue($x_flatten); + } + // header params + if ($x_languages !== null) { + $headerParams['X-Languages'] = ObjectSerializer::toHeaderValue($x_languages); + } + // header params + if ($x_no_slow_total !== null) { + $headerParams['X-NoSlowTotal'] = ObjectSerializer::toHeaderValue($x_no_slow_total); + } + // header params + if ($x_no_total !== null) { + $headerParams['X-NoTotal'] = ObjectSerializer::toHeaderValue($x_no_total); + } + // header params + if ($x_unpublished !== null) { + $headerParams['X-Unpublished'] = ObjectSerializer::toHeaderValue($x_unpublished); + } + + // path params + if ($app !== null) { + $resourcePath = str_replace( + '{' . 'app' . '}', + ObjectSerializer::toPathValue($app), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAllContentsPost + * + * Queries contents. + * + * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto + */ + public function getAllContentsPost($all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + { + list($response) = $this->getAllContentsPostWithHttpInfo($all_contents_by_post_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + return $response; + } + + /** + * Operation getAllContentsPostWithHttpInfo + * + * Queries contents. + * + * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + */ + public function getAllContentsPostWithHttpInfo($all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + { + $request = $this->getAllContentsPostRequest($all_contents_by_post_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $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: + if ('\Squidex\Client\Model\ContentsDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ContentsDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ContentsDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Squidex\Client\Model\ContentsDto'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ContentsDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAllContentsPostAsync + * + * Queries contents. + * + * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAllContentsPostAsync($all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + { + return $this->getAllContentsPostAsyncWithHttpInfo($all_contents_by_post_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAllContentsPostAsyncWithHttpInfo + * + * Queries contents. + * + * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAllContentsPostAsyncWithHttpInfo($all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + { + $returnType = '\Squidex\Client\Model\ContentsDto'; + $request = $this->getAllContentsPostRequest($all_contents_by_post_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAllContentsPost' + * + * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) + * @param string $x_fields The list of content fields (comma-separated). (optional) + * @param bool $x_flatten Provide the data as flat object. (optional) + * @param string $x_languages The list of languages to resolve (comma-separated). (optional) + * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) + * @param bool $x_no_total Do not return the total amount. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAllContentsPostRequest($all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + { + + // verify the required parameter 'app' is set + $app = $this->config->getAppName(); + if ($app === null || (is_array($app) && count($app) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app when calling ' + ); + } + + // verify the required parameter 'all_contents_by_post_dto' is set + if ($all_contents_by_post_dto === null || (is_array($all_contents_by_post_dto) && count($all_contents_by_post_dto) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $all_contents_by_post_dto when calling ' + ); + } + + + + + + + + + $resourcePath = '/api/content/{app}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($x_fields !== null) { + $headerParams['X-Fields'] = ObjectSerializer::toHeaderValue($x_fields); + } + // header params + if ($x_flatten !== null) { + $headerParams['X-Flatten'] = ObjectSerializer::toHeaderValue($x_flatten); + } + // header params + if ($x_languages !== null) { + $headerParams['X-Languages'] = ObjectSerializer::toHeaderValue($x_languages); + } + // header params + if ($x_no_slow_total !== null) { + $headerParams['X-NoSlowTotal'] = ObjectSerializer::toHeaderValue($x_no_slow_total); + } + // header params + if ($x_no_total !== null) { + $headerParams['X-NoTotal'] = ObjectSerializer::toHeaderValue($x_no_total); + } + // header params + if ($x_unpublished !== null) { + $headerParams['X-Unpublished'] = ObjectSerializer::toHeaderValue($x_unpublished); + } + + // path params + if ($app !== null) { + $resourcePath = str_replace( + '{' . 'app' . '}', + ObjectSerializer::toPathValue($app), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($all_contents_by_post_dto)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($all_contents_by_post_dto)); + } else { + $httpBody = $all_contents_by_post_dto; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getGraphQL + * + * GraphQL endpoint. + * + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return mixed|\Squidex\Client\Model\ErrorDto + */ + public function getGraphQL($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) + { + list($response) = $this->getGraphQLWithHttpInfo($the_query_string, $variables, $operation_name, $x_unpublished, $contentType); + return $response; + } + + /** + * Operation getGraphQLWithHttpInfo + * + * GraphQL endpoint. + * + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) + * @param bool $x_unpublished Return unpublished content items. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of mixed|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + */ + public function getGraphQLWithHttpInfo($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) { - $request = $this->getAllContentsRequest($app, $ids, $schedule_from, $schedule_to, $referencing, $references, $q, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + $request = $this->getGraphQLRequest($the_query_string, $variables, $operation_name, $x_unpublished, $contentType); try { $options = $this->createHttpClientOption(); @@ -7814,17 +9015,17 @@ public function getAllContentsWithHttpInfo($app, $ids = null, $schedule_from = n switch($statusCode) { case 200: - if ('\Squidex\Client\Model\ContentsDto' === '\SplFileObject') { + if ('mixed' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\ContentsDto' !== 'string') { + if ('mixed' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ContentsDto', []), + ObjectSerializer::deserialize($content, 'mixed', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -7845,7 +9046,7 @@ public function getAllContentsWithHttpInfo($app, $ids = null, $schedule_from = n ]; } - $returnType = '\Squidex\Client\Model\ContentsDto'; + $returnType = 'mixed'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -7866,7 +9067,7 @@ public function getAllContentsWithHttpInfo($app, $ids = null, $schedule_from = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Squidex\Client\Model\ContentsDto', + 'mixed', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -7885,31 +9086,22 @@ public function getAllContentsWithHttpInfo($app, $ids = null, $schedule_from = n } /** - * Operation getAllContentsAsync + * Operation getGraphQLAsync * - * Queries contents. + * GraphQL endpoint. * - * @param string $app The name of the app. (required) - * @param string $ids The list of ids to query. (optional) - * @param \DateTime $schedule_from The start of the schedule. (optional) - * @param \DateTime $schedule_to The end of the schedule. (optional) - * @param string $referencing The ID of the referencing content item. (optional) - * @param string $references The ID of the reference content item. (optional) - * @param string $q The optional json query. (optional) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllContentsAsync($app, $ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + public function getGraphQLAsync($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) { - return $this->getAllContentsAsyncWithHttpInfo($app, $ids, $schedule_from, $schedule_to, $referencing, $references, $q, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType) + return $this->getGraphQLAsyncWithHttpInfo($the_query_string, $variables, $operation_name, $x_unpublished, $contentType) ->then( function ($response) { return $response[0]; @@ -7918,32 +9110,23 @@ function ($response) { } /** - * Operation getAllContentsAsyncWithHttpInfo + * Operation getGraphQLAsyncWithHttpInfo * - * Queries contents. + * GraphQL endpoint. * - * @param string $app The name of the app. (required) - * @param string $ids The list of ids to query. (optional) - * @param \DateTime $schedule_from The start of the schedule. (optional) - * @param \DateTime $schedule_to The end of the schedule. (optional) - * @param string $referencing The ID of the referencing content item. (optional) - * @param string $references The ID of the reference content item. (optional) - * @param string $q The optional json query. (optional) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllContentsAsyncWithHttpInfo($app, $ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + public function getGraphQLAsyncWithHttpInfo($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) { - $returnType = '\Squidex\Client\Model\ContentsDto'; - $request = $this->getAllContentsRequest($app, $ids, $schedule_from, $schedule_to, $referencing, $references, $q, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + $returnType = 'mixed'; + $request = $this->getGraphQLRequest($the_query_string, $variables, $operation_name, $x_unpublished, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7982,30 +9165,22 @@ function ($exception) { } /** - * Create request for operation 'getAllContents' + * Create request for operation 'getGraphQL' * - * @param string $app The name of the app. (required) - * @param string $ids The list of ids to query. (optional) - * @param \DateTime $schedule_from The start of the schedule. (optional) - * @param \DateTime $schedule_to The end of the schedule. (optional) - * @param string $referencing The ID of the referencing content item. (optional) - * @param string $references The ID of the reference content item. (optional) - * @param string $q The optional json query. (optional) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContents'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAllContentsRequest($app, $ids = null, $schedule_from = null, $schedule_to = null, $referencing = null, $references = null, $q = null, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContents'][0]) + public function getGraphQLRequest($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -8017,15 +9192,7 @@ public function getAllContentsRequest($app, $ids = null, $schedule_from = null, - - - - - - - - - $resourcePath = '/api/content/{app}'; + $resourcePath = '/api/content/{app}/graphql'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8034,35 +9201,8 @@ public function getAllContentsRequest($app, $ids = null, $schedule_from = null, // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ids, - 'ids', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $schedule_from, - 'scheduleFrom', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $schedule_to, - 'scheduleTo', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $referencing, - 'referencing', // param base name + $the_query_string, + 'The query string', // param base name 'string', // openApiType 'form', // style true, // explode @@ -8070,8 +9210,8 @@ public function getAllContentsRequest($app, $ids = null, $schedule_from = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $references, - 'references', // param base name + $variables, + 'variables', // param base name 'string', // openApiType 'form', // style true, // explode @@ -8079,34 +9219,14 @@ public function getAllContentsRequest($app, $ids = null, $schedule_from = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $q, - 'q', // param base name + $operation_name, + 'operationName', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); - // header params - if ($x_fields !== null) { - $headerParams['X-Fields'] = ObjectSerializer::toHeaderValue($x_fields); - } - // header params - if ($x_flatten !== null) { - $headerParams['X-Flatten'] = ObjectSerializer::toHeaderValue($x_flatten); - } - // header params - if ($x_languages !== null) { - $headerParams['X-Languages'] = ObjectSerializer::toHeaderValue($x_languages); - } - // header params - if ($x_no_slow_total !== null) { - $headerParams['X-NoSlowTotal'] = ObjectSerializer::toHeaderValue($x_no_slow_total); - } - // header params - if ($x_no_total !== null) { - $headerParams['X-NoTotal'] = ObjectSerializer::toHeaderValue($x_no_total); - } // header params if ($x_unpublished !== null) { $headerParams['X-Unpublished'] = ObjectSerializer::toHeaderValue($x_unpublished); @@ -8176,52 +9296,44 @@ public function getAllContentsRequest($app, $ids = null, $schedule_from = null, } /** - * Operation getAllContentsPost + * Operation getGraphQLBatch * - * Queries contents. + * GraphQL batch endpoint. * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQLBatch'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto + * @return mixed|\Squidex\Client\Model\ErrorDto */ - public function getAllContentsPost($app, $all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + public function getGraphQLBatch($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQLBatch'][0]) { - list($response) = $this->getAllContentsPostWithHttpInfo($app, $all_contents_by_post_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + list($response) = $this->getGraphQLBatchWithHttpInfo($the_query_string, $variables, $operation_name, $x_unpublished, $contentType); return $response; } /** - * Operation getAllContentsPostWithHttpInfo + * Operation getGraphQLBatchWithHttpInfo * - * Queries contents. + * GraphQL batch endpoint. * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQLBatch'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Squidex\Client\Model\ContentsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @return array of mixed|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAllContentsPostWithHttpInfo($app, $all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + public function getGraphQLBatchWithHttpInfo($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQLBatch'][0]) { - $request = $this->getAllContentsPostRequest($app, $all_contents_by_post_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + $request = $this->getGraphQLBatchRequest($the_query_string, $variables, $operation_name, $x_unpublished, $contentType); try { $options = $this->createHttpClientOption(); @@ -8260,32 +9372,17 @@ public function getAllContentsPostWithHttpInfo($app, $all_contents_by_post_dto, switch($statusCode) { case 200: - if ('\Squidex\Client\Model\ContentsDto' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\ContentsDto' !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ContentsDto', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + if ('mixed' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + if ('mixed' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + ObjectSerializer::deserialize($content, 'mixed', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -8306,7 +9403,7 @@ public function getAllContentsPostWithHttpInfo($app, $all_contents_by_post_dto, ]; } - $returnType = '\Squidex\Client\Model\ContentsDto'; + $returnType = 'mixed'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -8327,15 +9424,7 @@ public function getAllContentsPostWithHttpInfo($app, $all_contents_by_post_dto, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Squidex\Client\Model\ContentsDto', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Squidex\Client\Model\ErrorDto', + 'mixed', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -8354,26 +9443,22 @@ public function getAllContentsPostWithHttpInfo($app, $all_contents_by_post_dto, } /** - * Operation getAllContentsPostAsync + * Operation getGraphQLBatchAsync * - * Queries contents. + * GraphQL batch endpoint. * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQLBatch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllContentsPostAsync($app, $all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + public function getGraphQLBatchAsync($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQLBatch'][0]) { - return $this->getAllContentsPostAsyncWithHttpInfo($app, $all_contents_by_post_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType) + return $this->getGraphQLBatchAsyncWithHttpInfo($the_query_string, $variables, $operation_name, $x_unpublished, $contentType) ->then( function ($response) { return $response[0]; @@ -8382,27 +9467,23 @@ function ($response) { } /** - * Operation getAllContentsPostAsyncWithHttpInfo + * Operation getGraphQLBatchAsyncWithHttpInfo * - * Queries contents. + * GraphQL batch endpoint. * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQLBatch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllContentsPostAsyncWithHttpInfo($app, $all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + public function getGraphQLBatchAsyncWithHttpInfo($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQLBatch'][0]) { - $returnType = '\Squidex\Client\Model\ContentsDto'; - $request = $this->getAllContentsPostRequest($app, $all_contents_by_post_dto, $x_fields, $x_flatten, $x_languages, $x_no_slow_total, $x_no_total, $x_unpublished, $contentType); + $returnType = 'mixed'; + $request = $this->getGraphQLBatchRequest($the_query_string, $variables, $operation_name, $x_unpublished, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8441,73 +9522,68 @@ function ($exception) { } /** - * Create request for operation 'getAllContentsPost' + * Create request for operation 'getGraphQLBatch' * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AllContentsByPostDto $all_contents_by_post_dto The required query object. (required) - * @param string $x_fields The list of content fields (comma-separated). (optional) - * @param bool $x_flatten Provide the data as flat object. (optional) - * @param string $x_languages The list of languages to resolve (comma-separated). (optional) - * @param bool $x_no_slow_total Do not return the total amount, if it would be slow. (optional) - * @param bool $x_no_total Do not return the total amount. (optional) + * @param string $the_query_string The optional version of the asset. (optional) + * @param string $variables The optional operation variables. (optional) + * @param string $operation_name The optional operation name. (optional) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllContentsPost'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQLBatch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAllContentsPostRequest($app, $all_contents_by_post_dto, $x_fields = null, $x_flatten = null, $x_languages = null, $x_no_slow_total = null, $x_no_total = null, $x_unpublished = null, string $contentType = self::contentTypes['getAllContentsPost'][0]) + public function getGraphQLBatchRequest($the_query_string = null, $variables = null, $operation_name = null, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQLBatch'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' ); } - // verify the required parameter 'all_contents_by_post_dto' is set - if ($all_contents_by_post_dto === null || (is_array($all_contents_by_post_dto) && count($all_contents_by_post_dto) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $all_contents_by_post_dto when calling ' - ); - } - - - - $resourcePath = '/api/content/{app}'; + $resourcePath = '/api/content/{app}/graphql/batch'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $the_query_string, + 'The query string', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $variables, + 'variables', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $operation_name, + 'operationName', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - // header params - if ($x_fields !== null) { - $headerParams['X-Fields'] = ObjectSerializer::toHeaderValue($x_fields); - } - // header params - if ($x_flatten !== null) { - $headerParams['X-Flatten'] = ObjectSerializer::toHeaderValue($x_flatten); - } - // header params - if ($x_languages !== null) { - $headerParams['X-Languages'] = ObjectSerializer::toHeaderValue($x_languages); - } - // header params - if ($x_no_slow_total !== null) { - $headerParams['X-NoSlowTotal'] = ObjectSerializer::toHeaderValue($x_no_slow_total); - } - // header params - if ($x_no_total !== null) { - $headerParams['X-NoTotal'] = ObjectSerializer::toHeaderValue($x_no_total); - } // header params if ($x_unpublished !== null) { $headerParams['X-Unpublished'] = ObjectSerializer::toHeaderValue($x_unpublished); @@ -8530,14 +9606,7 @@ public function getAllContentsPostRequest($app, $all_contents_by_post_dto, $x_fi ); // for model (json/xml) - if (isset($all_contents_by_post_dto)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($all_contents_by_post_dto)); - } else { - $httpBody = $all_contents_by_post_dto; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -8576,7 +9645,7 @@ public function getAllContentsPostRequest($app, $all_contents_by_post_dto, $x_fi $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -8584,40 +9653,40 @@ public function getAllContentsPostRequest($app, $all_contents_by_post_dto, $x_fi } /** - * Operation getGraphQL + * Operation postGraphQL * * GraphQL endpoint. * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQL'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SplFileObject|\Squidex\Client\Model\ErrorDto + * @return mixed|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function getGraphQL($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) + public function postGraphQL($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQL'][0]) { - list($response) = $this->getGraphQLWithHttpInfo($app, $x_unpublished, $contentType); + list($response) = $this->postGraphQLWithHttpInfo($x_unpublished, $body, $contentType); return $response; } /** - * Operation getGraphQLWithHttpInfo + * Operation postGraphQLWithHttpInfo * * GraphQL endpoint. * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQL'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SplFileObject|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @return array of mixed|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getGraphQLWithHttpInfo($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) + public function postGraphQLWithHttpInfo($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQL'][0]) { - $request = $this->getGraphQLRequest($app, $x_unpublished, $contentType); + $request = $this->postGraphQLRequest($x_unpublished, $body, $contentType); try { $options = $this->createHttpClientOption(); @@ -8656,17 +9725,32 @@ public function getGraphQLWithHttpInfo($app, $x_unpublished = null, string $cont switch($statusCode) { case 200: - if ('\SplFileObject' === '\SplFileObject') { + if ('mixed' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { + if ('mixed' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), + ObjectSerializer::deserialize($content, 'mixed', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -8687,7 +9771,7 @@ public function getGraphQLWithHttpInfo($app, $x_unpublished = null, string $cont ]; } - $returnType = '\SplFileObject'; + $returnType = 'mixed'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -8708,7 +9792,15 @@ public function getGraphQLWithHttpInfo($app, $x_unpublished = null, string $cont case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SplFileObject', + 'mixed', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -8727,20 +9819,20 @@ public function getGraphQLWithHttpInfo($app, $x_unpublished = null, string $cont } /** - * Operation getGraphQLAsync + * Operation postGraphQLAsync * * GraphQL endpoint. * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQL'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGraphQLAsync($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) + public function postGraphQLAsync($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQL'][0]) { - return $this->getGraphQLAsyncWithHttpInfo($app, $x_unpublished, $contentType) + return $this->postGraphQLAsyncWithHttpInfo($x_unpublished, $body, $contentType) ->then( function ($response) { return $response[0]; @@ -8749,21 +9841,21 @@ function ($response) { } /** - * Operation getGraphQLAsyncWithHttpInfo + * Operation postGraphQLAsyncWithHttpInfo * * GraphQL endpoint. * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQL'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGraphQLAsyncWithHttpInfo($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) + public function postGraphQLAsyncWithHttpInfo($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQL'][0]) { - $returnType = '\SplFileObject'; - $request = $this->getGraphQLRequest($app, $x_unpublished, $contentType); + $returnType = 'mixed'; + $request = $this->postGraphQLRequest($x_unpublished, $body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8802,19 +9894,20 @@ function ($exception) { } /** - * Create request for operation 'getGraphQL' + * Create request for operation 'postGraphQL' * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQL'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGraphQLRequest($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL'][0]) + public function postGraphQLRequest($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQL'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -8823,6 +9916,7 @@ public function getGraphQLRequest($app, $x_unpublished = null, string $contentTy + $resourcePath = '/api/content/{app}/graphql'; $formParams = []; $queryParams = []; @@ -8847,13 +9941,20 @@ public function getGraphQLRequest($app, $x_unpublished = null, string $contentTy $headers = $this->headerSelector->selectHeaders( - ['application/octet-stream', 'application/json', ], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -8892,7 +9993,7 @@ public function getGraphQLRequest($app, $x_unpublished = null, string $contentTy $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -8900,40 +10001,40 @@ public function getGraphQLRequest($app, $x_unpublished = null, string $contentTy } /** - * Operation getGraphQL2 + * Operation postGraphQLBatch * - * GraphQL endpoint. + * GraphQL batch endpoint. * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL2'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQLBatch'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SplFileObject|\Squidex\Client\Model\ErrorDto + * @return mixed|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function getGraphQL2($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL2'][0]) + public function postGraphQLBatch($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQLBatch'][0]) { - list($response) = $this->getGraphQL2WithHttpInfo($app, $x_unpublished, $contentType); + list($response) = $this->postGraphQLBatchWithHttpInfo($x_unpublished, $body, $contentType); return $response; } /** - * Operation getGraphQL2WithHttpInfo + * Operation postGraphQLBatchWithHttpInfo * - * GraphQL endpoint. + * GraphQL batch endpoint. * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL2'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQLBatch'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SplFileObject|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @return array of mixed|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getGraphQL2WithHttpInfo($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL2'][0]) + public function postGraphQLBatchWithHttpInfo($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQLBatch'][0]) { - $request = $this->getGraphQL2Request($app, $x_unpublished, $contentType); + $request = $this->postGraphQLBatchRequest($x_unpublished, $body, $contentType); try { $options = $this->createHttpClientOption(); @@ -8972,17 +10073,32 @@ public function getGraphQL2WithHttpInfo($app, $x_unpublished = null, string $con switch($statusCode) { case 200: - if ('\SplFileObject' === '\SplFileObject') { + if ('mixed' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\SplFileObject' !== 'string') { + if ('mixed' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), + ObjectSerializer::deserialize($content, 'mixed', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -9003,7 +10119,7 @@ public function getGraphQL2WithHttpInfo($app, $x_unpublished = null, string $con ]; } - $returnType = '\SplFileObject'; + $returnType = 'mixed'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -9024,7 +10140,15 @@ public function getGraphQL2WithHttpInfo($app, $x_unpublished = null, string $con case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SplFileObject', + 'mixed', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -9043,20 +10167,20 @@ public function getGraphQL2WithHttpInfo($app, $x_unpublished = null, string $con } /** - * Operation getGraphQL2Async + * Operation postGraphQLBatchAsync * - * GraphQL endpoint. + * GraphQL batch endpoint. * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL2'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQLBatch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGraphQL2Async($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL2'][0]) + public function postGraphQLBatchAsync($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQLBatch'][0]) { - return $this->getGraphQL2AsyncWithHttpInfo($app, $x_unpublished, $contentType) + return $this->postGraphQLBatchAsyncWithHttpInfo($x_unpublished, $body, $contentType) ->then( function ($response) { return $response[0]; @@ -9065,21 +10189,21 @@ function ($response) { } /** - * Operation getGraphQL2AsyncWithHttpInfo + * Operation postGraphQLBatchAsyncWithHttpInfo * - * GraphQL endpoint. + * GraphQL batch endpoint. * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL2'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQLBatch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getGraphQL2AsyncWithHttpInfo($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL2'][0]) + public function postGraphQLBatchAsyncWithHttpInfo($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQLBatch'][0]) { - $returnType = '\SplFileObject'; - $request = $this->getGraphQL2Request($app, $x_unpublished, $contentType); + $returnType = 'mixed'; + $request = $this->postGraphQLBatchRequest($x_unpublished, $body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9118,19 +10242,20 @@ function ($exception) { } /** - * Create request for operation 'getGraphQL2' + * Create request for operation 'postGraphQLBatch' * - * @param string $app The name of the app. (required) * @param bool $x_unpublished Return unpublished content items. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getGraphQL2'] to see the possible values for this operation + * @param mixed $body The graphql request. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postGraphQLBatch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getGraphQL2Request($app, $x_unpublished = null, string $contentType = self::contentTypes['getGraphQL2'][0]) + public function postGraphQLBatchRequest($x_unpublished = null, $body = null, string $contentType = self::contentTypes['postGraphQLBatch'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -9139,6 +10264,7 @@ public function getGraphQL2Request($app, $x_unpublished = null, string $contentT + $resourcePath = '/api/content/{app}/graphql/batch'; $formParams = []; $queryParams = []; @@ -9163,13 +10289,20 @@ public function getGraphQL2Request($app, $x_unpublished = null, string $contentT $headers = $this->headerSelector->selectHeaders( - ['application/octet-stream', 'application/json', ], + ['application/json', ], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -9208,7 +10341,7 @@ public function getGraphQL2Request($app, $x_unpublished = null, string $contentT $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/lib/Api/DiagnosticsApi.php b/lib/Api/DiagnosticsApi.php index 29a3e1b..2f9eabf 100644 --- a/lib/Api/DiagnosticsApi.php +++ b/lib/Api/DiagnosticsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Api/EventConsumersApi.php b/lib/Api/EventConsumersApi.php index 4d30c20..576317c 100644 --- a/lib/Api/EventConsumersApi.php +++ b/lib/Api/EventConsumersApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Api/HistoryApi.php b/lib/Api/HistoryApi.php index 2d3f797..9a27e22 100644 --- a/lib/Api/HistoryApi.php +++ b/lib/Api/HistoryApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -125,9 +125,8 @@ public function getConfig() /** * Operation getAppHistory * - * Get historical events. + * Get the app history. * - * @param string $app The name of the app. (required) * @param string $channel The name of the channel. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppHistory'] to see the possible values for this operation * @@ -135,18 +134,17 @@ public function getConfig() * @throws \InvalidArgumentException * @return \Squidex\Client\Model\HistoryEventDto[]|\Squidex\Client\Model\ErrorDto */ - public function getAppHistory($app, $channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) + public function getAppHistory($channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) { - list($response) = $this->getAppHistoryWithHttpInfo($app, $channel, $contentType); + list($response) = $this->getAppHistoryWithHttpInfo($channel, $contentType); return $response; } /** * Operation getAppHistoryWithHttpInfo * - * Get historical events. + * Get the app history. * - * @param string $app The name of the app. (required) * @param string $channel The name of the channel. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppHistory'] to see the possible values for this operation * @@ -154,9 +152,9 @@ public function getAppHistory($app, $channel = null, string $contentType = self: * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\HistoryEventDto[]|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getAppHistoryWithHttpInfo($app, $channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) + public function getAppHistoryWithHttpInfo($channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) { - $request = $this->getAppHistoryRequest($app, $channel, $contentType); + $request = $this->getAppHistoryRequest($channel, $contentType); try { $options = $this->createHttpClientOption(); @@ -268,18 +266,17 @@ public function getAppHistoryWithHttpInfo($app, $channel = null, string $content /** * Operation getAppHistoryAsync * - * Get historical events. + * Get the app history. * - * @param string $app The name of the app. (required) * @param string $channel The name of the channel. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppHistory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAppHistoryAsync($app, $channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) + public function getAppHistoryAsync($channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) { - return $this->getAppHistoryAsyncWithHttpInfo($app, $channel, $contentType) + return $this->getAppHistoryAsyncWithHttpInfo($channel, $contentType) ->then( function ($response) { return $response[0]; @@ -290,19 +287,18 @@ function ($response) { /** * Operation getAppHistoryAsyncWithHttpInfo * - * Get historical events. + * Get the app history. * - * @param string $app The name of the app. (required) * @param string $channel The name of the channel. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppHistory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAppHistoryAsyncWithHttpInfo($app, $channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) + public function getAppHistoryAsyncWithHttpInfo($channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) { $returnType = '\Squidex\Client\Model\HistoryEventDto[]'; - $request = $this->getAppHistoryRequest($app, $channel, $contentType); + $request = $this->getAppHistoryRequest($channel, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -343,17 +339,17 @@ function ($exception) { /** * Create request for operation 'getAppHistory' * - * @param string $app The name of the app. (required) * @param string $channel The name of the channel. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppHistory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAppHistoryRequest($app, $channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) + public function getAppHistoryRequest($channel = null, string $contentType = self::contentTypes['getAppHistory'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -446,7 +442,7 @@ public function getAppHistoryRequest($app, $channel = null, string $contentType /** * Operation getTeamHistory * - * Get historical events for a team. + * Get the team history. * * @param string $team The ID of the team. (required) * @param string $channel The name of the channel. (optional) @@ -465,7 +461,7 @@ public function getTeamHistory($team, $channel = null, string $contentType = sel /** * Operation getTeamHistoryWithHttpInfo * - * Get historical events for a team. + * Get the team history. * * @param string $team The ID of the team. (required) * @param string $channel The name of the channel. (optional) @@ -589,7 +585,7 @@ public function getTeamHistoryWithHttpInfo($team, $channel = null, string $conte /** * Operation getTeamHistoryAsync * - * Get historical events for a team. + * Get the team history. * * @param string $team The ID of the team. (required) * @param string $channel The name of the channel. (optional) @@ -611,7 +607,7 @@ function ($response) { /** * Operation getTeamHistoryAsyncWithHttpInfo * - * Get historical events for a team. + * Get the team history. * * @param string $team The ID of the team. (required) * @param string $channel The name of the channel. (optional) diff --git a/lib/Api/JobsApi.php b/lib/Api/JobsApi.php new file mode 100644 index 0000000..dced211 --- /dev/null +++ b/lib/Api/JobsApi.php @@ -0,0 +1,1030 @@ + [ + 'application/json', + ], + 'deleteJob' => [ + 'application/json', + ], + 'getJobs' => [ + 'application/json', + ], + ]; + +/** + * @param $options + */ + public function __construct($config, $client) { + $this->client = $client; + $this->config = $config; + $this->headerSelector = new HeaderSelector(); + $this->hostIndex = 0; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getJobContent + * + * Get the job content. + * + * @param string $id The ID of the job. (required) + * @param string $app_id The ID of the app. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobContent'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SplFileObject|\Squidex\Client\Model\ErrorDto + */ + public function getJobContent($id, $app_id = null, string $contentType = self::contentTypes['getJobContent'][0]) + { + list($response) = $this->getJobContentWithHttpInfo($id, $app_id, $contentType); + return $response; + } + + /** + * Operation getJobContentWithHttpInfo + * + * Get the job content. + * + * @param string $id The ID of the job. (required) + * @param string $app_id The ID of the app. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobContent'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SplFileObject|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + */ + public function getJobContentWithHttpInfo($id, $app_id = null, string $contentType = self::contentTypes['getJobContent'][0]) + { + $request = $this->getJobContentRequest($id, $app_id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $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: + if ('\SplFileObject' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\SplFileObject' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\SplFileObject', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\SplFileObject'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getJobContentAsync + * + * Get the job content. + * + * @param string $id The ID of the job. (required) + * @param string $app_id The ID of the app. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobContent'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getJobContentAsync($id, $app_id = null, string $contentType = self::contentTypes['getJobContent'][0]) + { + return $this->getJobContentAsyncWithHttpInfo($id, $app_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getJobContentAsyncWithHttpInfo + * + * Get the job content. + * + * @param string $id The ID of the job. (required) + * @param string $app_id The ID of the app. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobContent'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getJobContentAsyncWithHttpInfo($id, $app_id = null, string $contentType = self::contentTypes['getJobContent'][0]) + { + $returnType = '\SplFileObject'; + $request = $this->getJobContentRequest($id, $app_id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getJobContent' + * + * @param string $id The ID of the job. (required) + * @param string $app_id The ID of the app. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobContent'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getJobContentRequest($id, $app_id = null, string $contentType = self::contentTypes['getJobContent'][0]) + { + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling ' + ); + } + + + + $resourcePath = '/api/apps/jobs/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $app_id, + 'appId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/octet-stream', 'application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteJob + * + * Delete a job. + * + * @param string $id The ID of the jobs to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJob'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteJob($id, string $contentType = self::contentTypes['deleteJob'][0]) + { + $this->deleteJobWithHttpInfo($id, $contentType); + } + + /** + * Operation deleteJobWithHttpInfo + * + * Delete a job. + * + * @param string $id The ID of the jobs to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJob'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteJobWithHttpInfo($id, string $contentType = self::contentTypes['deleteJob'][0]) + { + $request = $this->deleteJobRequest($id, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $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()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteJobAsync + * + * Delete a job. + * + * @param string $id The ID of the jobs to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJob'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteJobAsync($id, string $contentType = self::contentTypes['deleteJob'][0]) + { + return $this->deleteJobAsyncWithHttpInfo($id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteJobAsyncWithHttpInfo + * + * Delete a job. + * + * @param string $id The ID of the jobs to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJob'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteJobAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteJob'][0]) + { + $returnType = ''; + $request = $this->deleteJobRequest($id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteJob' + * + * @param string $id The ID of the jobs to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteJob'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteJobRequest($id, string $contentType = self::contentTypes['deleteJob'][0]) + { + + // verify the required parameter 'app' is set + $app = $this->config->getAppName(); + if ($app === null || (is_array($app) && count($app) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app when calling ' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling ' + ); + } + + + $resourcePath = '/api/apps/{app}/jobs/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($app !== null) { + $resourcePath = str_replace( + '{' . 'app' . '}', + ObjectSerializer::toPathValue($app), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getJobs + * + * Get all jobs. + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobs'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Squidex\Client\Model\JobsDto|\Squidex\Client\Model\ErrorDto + */ + public function getJobs(string $contentType = self::contentTypes['getJobs'][0]) + { + list($response) = $this->getJobsWithHttpInfo($contentType); + return $response; + } + + /** + * Operation getJobsWithHttpInfo + * + * Get all jobs. + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobs'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Squidex\Client\Model\JobsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + */ + public function getJobsWithHttpInfo(string $contentType = self::contentTypes['getJobs'][0]) + { + $request = $this->getJobsRequest($contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $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: + if ('\Squidex\Client\Model\JobsDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\JobsDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\JobsDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Squidex\Client\Model\JobsDto'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\JobsDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getJobsAsync + * + * Get all jobs. + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobs'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getJobsAsync(string $contentType = self::contentTypes['getJobs'][0]) + { + return $this->getJobsAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getJobsAsyncWithHttpInfo + * + * Get all jobs. + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobs'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getJobsAsyncWithHttpInfo(string $contentType = self::contentTypes['getJobs'][0]) + { + $returnType = '\Squidex\Client\Model\JobsDto'; + $request = $this->getJobsRequest($contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getJobs' + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getJobs'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getJobsRequest(string $contentType = self::contentTypes['getJobs'][0]) + { + + // verify the required parameter 'app' is set + $app = $this->config->getAppName(); + if ($app === null || (is_array($app) && count($app) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app when calling ' + ); + } + + + $resourcePath = '/api/apps/{app}/jobs'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($app !== null) { + $resourcePath = str_replace( + '{' . 'app' . '}', + ObjectSerializer::toPathValue($app), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/LanguagesApi.php b/lib/Api/LanguagesApi.php index f17a17b..b8a036c 100644 --- a/lib/Api/LanguagesApi.php +++ b/lib/Api/LanguagesApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Api/NewsApi.php b/lib/Api/NewsApi.php index bc0e93c..33aa87d 100644 --- a/lib/Api/NewsApi.php +++ b/lib/Api/NewsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Api/PingApi.php b/lib/Api/PingApi.php index 7344a7f..90059dd 100644 --- a/lib/Api/PingApi.php +++ b/lib/Api/PingApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -130,16 +130,15 @@ public function getConfig() * * Get ping status. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppPing'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function getAppPing($app, string $contentType = self::contentTypes['getAppPing'][0]) + public function getAppPing(string $contentType = self::contentTypes['getAppPing'][0]) { - $this->getAppPingWithHttpInfo($app, $contentType); + $this->getAppPingWithHttpInfo($contentType); } /** @@ -147,16 +146,15 @@ public function getAppPing($app, string $contentType = self::contentTypes['getAp * * Get ping status. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppPing'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function getAppPingWithHttpInfo($app, string $contentType = self::contentTypes['getAppPing'][0]) + public function getAppPingWithHttpInfo(string $contentType = self::contentTypes['getAppPing'][0]) { - $request = $this->getAppPingRequest($app, $contentType); + $request = $this->getAppPingRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -215,15 +213,14 @@ public function getAppPingWithHttpInfo($app, string $contentType = self::content * * Get ping status. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppPing'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAppPingAsync($app, string $contentType = self::contentTypes['getAppPing'][0]) + public function getAppPingAsync(string $contentType = self::contentTypes['getAppPing'][0]) { - return $this->getAppPingAsyncWithHttpInfo($app, $contentType) + return $this->getAppPingAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -236,16 +233,15 @@ function ($response) { * * Get ping status. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppPing'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAppPingAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getAppPing'][0]) + public function getAppPingAsyncWithHttpInfo(string $contentType = self::contentTypes['getAppPing'][0]) { $returnType = ''; - $request = $this->getAppPingRequest($app, $contentType); + $request = $this->getAppPingRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -273,16 +269,16 @@ function ($exception) { /** * Create request for operation 'getAppPing' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAppPing'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAppPingRequest($app, string $contentType = self::contentTypes['getAppPing'][0]) + public function getAppPingRequest(string $contentType = self::contentTypes['getAppPing'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' diff --git a/lib/Api/PlansApi.php b/lib/Api/PlansApi.php index 41b37cd..a83bad6 100644 --- a/lib/Api/PlansApi.php +++ b/lib/Api/PlansApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -133,16 +133,15 @@ public function getConfig() * * Get app plan information. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPlans'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\PlansDto|\Squidex\Client\Model\ErrorDto */ - public function getPlans($app, string $contentType = self::contentTypes['getPlans'][0]) + public function getPlans(string $contentType = self::contentTypes['getPlans'][0]) { - list($response) = $this->getPlansWithHttpInfo($app, $contentType); + list($response) = $this->getPlansWithHttpInfo($contentType); return $response; } @@ -151,16 +150,15 @@ public function getPlans($app, string $contentType = self::contentTypes['getPlan * * Get app plan information. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPlans'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\PlansDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getPlansWithHttpInfo($app, string $contentType = self::contentTypes['getPlans'][0]) + public function getPlansWithHttpInfo(string $contentType = self::contentTypes['getPlans'][0]) { - $request = $this->getPlansRequest($app, $contentType); + $request = $this->getPlansRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -274,15 +272,14 @@ public function getPlansWithHttpInfo($app, string $contentType = self::contentTy * * Get app plan information. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPlans'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPlansAsync($app, string $contentType = self::contentTypes['getPlans'][0]) + public function getPlansAsync(string $contentType = self::contentTypes['getPlans'][0]) { - return $this->getPlansAsyncWithHttpInfo($app, $contentType) + return $this->getPlansAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -295,16 +292,15 @@ function ($response) { * * Get app plan information. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPlans'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPlansAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getPlans'][0]) + public function getPlansAsyncWithHttpInfo(string $contentType = self::contentTypes['getPlans'][0]) { $returnType = '\Squidex\Client\Model\PlansDto'; - $request = $this->getPlansRequest($app, $contentType); + $request = $this->getPlansRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -345,16 +341,16 @@ function ($exception) { /** * Create request for operation 'getPlans' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPlans'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPlansRequest($app, string $contentType = self::contentTypes['getPlans'][0]) + public function getPlansRequest(string $contentType = self::contentTypes['getPlans'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -439,7 +435,6 @@ public function getPlansRequest($app, string $contentType = self::contentTypes[' * * Change the app plan. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\ChangePlanDto $change_plan_dto Plan object that needs to be changed. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPlan'] to see the possible values for this operation * @@ -447,9 +442,9 @@ public function getPlansRequest($app, string $contentType = self::contentTypes[' * @throws \InvalidArgumentException * @return \Squidex\Client\Model\PlanChangedDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putPlan($app, $change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) + public function putPlan($change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) { - list($response) = $this->putPlanWithHttpInfo($app, $change_plan_dto, $contentType); + list($response) = $this->putPlanWithHttpInfo($change_plan_dto, $contentType); return $response; } @@ -458,7 +453,6 @@ public function putPlan($app, $change_plan_dto, string $contentType = self::cont * * Change the app plan. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\ChangePlanDto $change_plan_dto Plan object that needs to be changed. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPlan'] to see the possible values for this operation * @@ -466,9 +460,9 @@ public function putPlan($app, $change_plan_dto, string $contentType = self::cont * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\PlanChangedDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putPlanWithHttpInfo($app, $change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) + public function putPlanWithHttpInfo($change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) { - $request = $this->putPlanRequest($app, $change_plan_dto, $contentType); + $request = $this->putPlanRequest($change_plan_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -605,16 +599,15 @@ public function putPlanWithHttpInfo($app, $change_plan_dto, string $contentType * * Change the app plan. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\ChangePlanDto $change_plan_dto Plan object that needs to be changed. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPlan'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putPlanAsync($app, $change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) + public function putPlanAsync($change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) { - return $this->putPlanAsyncWithHttpInfo($app, $change_plan_dto, $contentType) + return $this->putPlanAsyncWithHttpInfo($change_plan_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -627,17 +620,16 @@ function ($response) { * * Change the app plan. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\ChangePlanDto $change_plan_dto Plan object that needs to be changed. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPlan'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putPlanAsyncWithHttpInfo($app, $change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) + public function putPlanAsyncWithHttpInfo($change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) { $returnType = '\Squidex\Client\Model\PlanChangedDto'; - $request = $this->putPlanRequest($app, $change_plan_dto, $contentType); + $request = $this->putPlanRequest($change_plan_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -678,17 +670,17 @@ function ($exception) { /** * Create request for operation 'putPlan' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\ChangePlanDto $change_plan_dto Plan object that needs to be changed. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPlan'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putPlanRequest($app, $change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) + public function putPlanRequest($change_plan_dto, string $contentType = self::contentTypes['putPlan'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' diff --git a/lib/Api/RulesApi.php b/lib/Api/RulesApi.php index 4447677..f9d4c57 100644 --- a/lib/Api/RulesApi.php +++ b/lib/Api/RulesApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -178,7 +178,6 @@ public function getConfig() * * Cancels an event. * - * @param string $app The name of the app. (required) * @param string $id The event to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvent'] to see the possible values for this operation * @@ -186,9 +185,9 @@ public function getConfig() * @throws \InvalidArgumentException * @return void */ - public function deleteEvent($app, $id, string $contentType = self::contentTypes['deleteEvent'][0]) + public function deleteEvent($id, string $contentType = self::contentTypes['deleteEvent'][0]) { - $this->deleteEventWithHttpInfo($app, $id, $contentType); + $this->deleteEventWithHttpInfo($id, $contentType); } /** @@ -196,7 +195,6 @@ public function deleteEvent($app, $id, string $contentType = self::contentTypes[ * * Cancels an event. * - * @param string $app The name of the app. (required) * @param string $id The event to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvent'] to see the possible values for this operation * @@ -204,9 +202,9 @@ public function deleteEvent($app, $id, string $contentType = self::contentTypes[ * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteEventWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteEvent'][0]) + public function deleteEventWithHttpInfo($id, string $contentType = self::contentTypes['deleteEvent'][0]) { - $request = $this->deleteEventRequest($app, $id, $contentType); + $request = $this->deleteEventRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -273,16 +271,15 @@ public function deleteEventWithHttpInfo($app, $id, string $contentType = self::c * * Cancels an event. * - * @param string $app The name of the app. (required) * @param string $id The event to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEventAsync($app, $id, string $contentType = self::contentTypes['deleteEvent'][0]) + public function deleteEventAsync($id, string $contentType = self::contentTypes['deleteEvent'][0]) { - return $this->deleteEventAsyncWithHttpInfo($app, $id, $contentType) + return $this->deleteEventAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -295,17 +292,16 @@ function ($response) { * * Cancels an event. * - * @param string $app The name of the app. (required) * @param string $id The event to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEventAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteEvent'][0]) + public function deleteEventAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteEvent'][0]) { $returnType = ''; - $request = $this->deleteEventRequest($app, $id, $contentType); + $request = $this->deleteEventRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -333,17 +329,17 @@ function ($exception) { /** * Create request for operation 'deleteEvent' * - * @param string $app The name of the app. (required) * @param string $id The event to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteEventRequest($app, $id, string $contentType = self::contentTypes['deleteEvent'][0]) + public function deleteEventRequest($id, string $contentType = self::contentTypes['deleteEvent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -443,16 +439,15 @@ public function deleteEventRequest($app, $id, string $contentType = self::conten * * Cancels all events. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvents'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteEvents($app, string $contentType = self::contentTypes['deleteEvents'][0]) + public function deleteEvents(string $contentType = self::contentTypes['deleteEvents'][0]) { - $this->deleteEventsWithHttpInfo($app, $contentType); + $this->deleteEventsWithHttpInfo($contentType); } /** @@ -460,16 +455,15 @@ public function deleteEvents($app, string $contentType = self::contentTypes['del * * Cancels all events. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvents'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteEventsWithHttpInfo($app, string $contentType = self::contentTypes['deleteEvents'][0]) + public function deleteEventsWithHttpInfo(string $contentType = self::contentTypes['deleteEvents'][0]) { - $request = $this->deleteEventsRequest($app, $contentType); + $request = $this->deleteEventsRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -536,15 +530,14 @@ public function deleteEventsWithHttpInfo($app, string $contentType = self::conte * * Cancels all events. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEventsAsync($app, string $contentType = self::contentTypes['deleteEvents'][0]) + public function deleteEventsAsync(string $contentType = self::contentTypes['deleteEvents'][0]) { - return $this->deleteEventsAsyncWithHttpInfo($app, $contentType) + return $this->deleteEventsAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -557,16 +550,15 @@ function ($response) { * * Cancels all events. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteEventsAsyncWithHttpInfo($app, string $contentType = self::contentTypes['deleteEvents'][0]) + public function deleteEventsAsyncWithHttpInfo(string $contentType = self::contentTypes['deleteEvents'][0]) { $returnType = ''; - $request = $this->deleteEventsRequest($app, $contentType); + $request = $this->deleteEventsRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -594,16 +586,16 @@ function ($exception) { /** * Create request for operation 'deleteEvents' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEvents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteEventsRequest($app, string $contentType = self::contentTypes['deleteEvents'][0]) + public function deleteEventsRequest(string $contentType = self::contentTypes['deleteEvents'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -688,7 +680,6 @@ public function deleteEventsRequest($app, string $contentType = self::contentTyp * * Delete a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRule'] to see the possible values for this operation * @@ -696,9 +687,9 @@ public function deleteEventsRequest($app, string $contentType = self::contentTyp * @throws \InvalidArgumentException * @return void */ - public function deleteRule($app, $id, string $contentType = self::contentTypes['deleteRule'][0]) + public function deleteRule($id, string $contentType = self::contentTypes['deleteRule'][0]) { - $this->deleteRuleWithHttpInfo($app, $id, $contentType); + $this->deleteRuleWithHttpInfo($id, $contentType); } /** @@ -706,7 +697,6 @@ public function deleteRule($app, $id, string $contentType = self::contentTypes[' * * Delete a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRule'] to see the possible values for this operation * @@ -714,9 +704,9 @@ public function deleteRule($app, $id, string $contentType = self::contentTypes[' * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteRuleWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteRule'][0]) + public function deleteRuleWithHttpInfo($id, string $contentType = self::contentTypes['deleteRule'][0]) { - $request = $this->deleteRuleRequest($app, $id, $contentType); + $request = $this->deleteRuleRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -783,16 +773,15 @@ public function deleteRuleWithHttpInfo($app, $id, string $contentType = self::co * * Delete a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRuleAsync($app, $id, string $contentType = self::contentTypes['deleteRule'][0]) + public function deleteRuleAsync($id, string $contentType = self::contentTypes['deleteRule'][0]) { - return $this->deleteRuleAsyncWithHttpInfo($app, $id, $contentType) + return $this->deleteRuleAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -805,17 +794,16 @@ function ($response) { * * Delete a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRuleAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteRule'][0]) + public function deleteRuleAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteRule'][0]) { $returnType = ''; - $request = $this->deleteRuleRequest($app, $id, $contentType); + $request = $this->deleteRuleRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -843,17 +831,17 @@ function ($exception) { /** * Create request for operation 'deleteRule' * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteRuleRequest($app, $id, string $contentType = self::contentTypes['deleteRule'][0]) + public function deleteRuleRequest($id, string $contentType = self::contentTypes['deleteRule'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -953,7 +941,6 @@ public function deleteRuleRequest($app, $id, string $contentType = self::content * * Cancels all rule events. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleEvents'] to see the possible values for this operation * @@ -961,9 +948,9 @@ public function deleteRuleRequest($app, $id, string $contentType = self::content * @throws \InvalidArgumentException * @return void */ - public function deleteRuleEvents($app, $id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) + public function deleteRuleEvents($id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) { - $this->deleteRuleEventsWithHttpInfo($app, $id, $contentType); + $this->deleteRuleEventsWithHttpInfo($id, $contentType); } /** @@ -971,7 +958,6 @@ public function deleteRuleEvents($app, $id, string $contentType = self::contentT * * Cancels all rule events. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleEvents'] to see the possible values for this operation * @@ -979,9 +965,9 @@ public function deleteRuleEvents($app, $id, string $contentType = self::contentT * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteRuleEventsWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) + public function deleteRuleEventsWithHttpInfo($id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) { - $request = $this->deleteRuleEventsRequest($app, $id, $contentType); + $request = $this->deleteRuleEventsRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1048,16 +1034,15 @@ public function deleteRuleEventsWithHttpInfo($app, $id, string $contentType = se * * Cancels all rule events. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleEvents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRuleEventsAsync($app, $id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) + public function deleteRuleEventsAsync($id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) { - return $this->deleteRuleEventsAsyncWithHttpInfo($app, $id, $contentType) + return $this->deleteRuleEventsAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -1070,17 +1055,16 @@ function ($response) { * * Cancels all rule events. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleEvents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRuleEventsAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) + public function deleteRuleEventsAsyncWithHttpInfo($id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) { $returnType = ''; - $request = $this->deleteRuleEventsRequest($app, $id, $contentType); + $request = $this->deleteRuleEventsRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1108,17 +1092,17 @@ function ($exception) { /** * Create request for operation 'deleteRuleEvents' * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to cancel. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleEvents'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteRuleEventsRequest($app, $id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) + public function deleteRuleEventsRequest($id, string $contentType = self::contentTypes['deleteRuleEvents'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1218,16 +1202,15 @@ public function deleteRuleEventsRequest($app, $id, string $contentType = self::c * * Cancel the current run. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleRun'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteRuleRun($app, string $contentType = self::contentTypes['deleteRuleRun'][0]) + public function deleteRuleRun(string $contentType = self::contentTypes['deleteRuleRun'][0]) { - $this->deleteRuleRunWithHttpInfo($app, $contentType); + $this->deleteRuleRunWithHttpInfo($contentType); } /** @@ -1235,16 +1218,15 @@ public function deleteRuleRun($app, string $contentType = self::contentTypes['de * * Cancel the current run. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleRun'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteRuleRunWithHttpInfo($app, string $contentType = self::contentTypes['deleteRuleRun'][0]) + public function deleteRuleRunWithHttpInfo(string $contentType = self::contentTypes['deleteRuleRun'][0]) { - $request = $this->deleteRuleRunRequest($app, $contentType); + $request = $this->deleteRuleRunRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -1311,15 +1293,14 @@ public function deleteRuleRunWithHttpInfo($app, string $contentType = self::cont * * Cancel the current run. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleRun'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRuleRunAsync($app, string $contentType = self::contentTypes['deleteRuleRun'][0]) + public function deleteRuleRunAsync(string $contentType = self::contentTypes['deleteRuleRun'][0]) { - return $this->deleteRuleRunAsyncWithHttpInfo($app, $contentType) + return $this->deleteRuleRunAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -1332,16 +1313,15 @@ function ($response) { * * Cancel the current run. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleRun'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteRuleRunAsyncWithHttpInfo($app, string $contentType = self::contentTypes['deleteRuleRun'][0]) + public function deleteRuleRunAsyncWithHttpInfo(string $contentType = self::contentTypes['deleteRuleRun'][0]) { $returnType = ''; - $request = $this->deleteRuleRunRequest($app, $contentType); + $request = $this->deleteRuleRunRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1369,16 +1349,16 @@ function ($exception) { /** * Create request for operation 'deleteRuleRun' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRuleRun'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteRuleRunRequest($app, string $contentType = self::contentTypes['deleteRuleRun'][0]) + public function deleteRuleRunRequest(string $contentType = self::contentTypes['deleteRuleRun'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1463,7 +1443,6 @@ public function deleteRuleRunRequest($app, string $contentType = self::contentTy * * Disable a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableRule'] to see the possible values for this operation * @@ -1471,9 +1450,9 @@ public function deleteRuleRunRequest($app, string $contentType = self::contentTy * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RuleDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function disableRule($app, $id, string $contentType = self::contentTypes['disableRule'][0]) + public function disableRule($id, string $contentType = self::contentTypes['disableRule'][0]) { - list($response) = $this->disableRuleWithHttpInfo($app, $id, $contentType); + list($response) = $this->disableRuleWithHttpInfo($id, $contentType); return $response; } @@ -1482,7 +1461,6 @@ public function disableRule($app, $id, string $contentType = self::contentTypes[ * * Disable a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableRule'] to see the possible values for this operation * @@ -1490,9 +1468,9 @@ public function disableRule($app, $id, string $contentType = self::contentTypes[ * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RuleDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function disableRuleWithHttpInfo($app, $id, string $contentType = self::contentTypes['disableRule'][0]) + public function disableRuleWithHttpInfo($id, string $contentType = self::contentTypes['disableRule'][0]) { - $request = $this->disableRuleRequest($app, $id, $contentType); + $request = $this->disableRuleRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1629,16 +1607,15 @@ public function disableRuleWithHttpInfo($app, $id, string $contentType = self::c * * Disable a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function disableRuleAsync($app, $id, string $contentType = self::contentTypes['disableRule'][0]) + public function disableRuleAsync($id, string $contentType = self::contentTypes['disableRule'][0]) { - return $this->disableRuleAsyncWithHttpInfo($app, $id, $contentType) + return $this->disableRuleAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -1651,17 +1628,16 @@ function ($response) { * * Disable a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function disableRuleAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['disableRule'][0]) + public function disableRuleAsyncWithHttpInfo($id, string $contentType = self::contentTypes['disableRule'][0]) { $returnType = '\Squidex\Client\Model\RuleDto'; - $request = $this->disableRuleRequest($app, $id, $contentType); + $request = $this->disableRuleRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1702,17 +1678,17 @@ function ($exception) { /** * Create request for operation 'disableRule' * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function disableRuleRequest($app, $id, string $contentType = self::contentTypes['disableRule'][0]) + public function disableRuleRequest($id, string $contentType = self::contentTypes['disableRule'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1812,7 +1788,6 @@ public function disableRuleRequest($app, $id, string $contentType = self::conten * * Enable a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableRule'] to see the possible values for this operation * @@ -1820,9 +1795,9 @@ public function disableRuleRequest($app, $id, string $contentType = self::conten * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RuleDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function enableRule($app, $id, string $contentType = self::contentTypes['enableRule'][0]) + public function enableRule($id, string $contentType = self::contentTypes['enableRule'][0]) { - list($response) = $this->enableRuleWithHttpInfo($app, $id, $contentType); + list($response) = $this->enableRuleWithHttpInfo($id, $contentType); return $response; } @@ -1831,7 +1806,6 @@ public function enableRule($app, $id, string $contentType = self::contentTypes[' * * Enable a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableRule'] to see the possible values for this operation * @@ -1839,9 +1813,9 @@ public function enableRule($app, $id, string $contentType = self::contentTypes[' * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RuleDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function enableRuleWithHttpInfo($app, $id, string $contentType = self::contentTypes['enableRule'][0]) + public function enableRuleWithHttpInfo($id, string $contentType = self::contentTypes['enableRule'][0]) { - $request = $this->enableRuleRequest($app, $id, $contentType); + $request = $this->enableRuleRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1978,16 +1952,15 @@ public function enableRuleWithHttpInfo($app, $id, string $contentType = self::co * * Enable a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function enableRuleAsync($app, $id, string $contentType = self::contentTypes['enableRule'][0]) + public function enableRuleAsync($id, string $contentType = self::contentTypes['enableRule'][0]) { - return $this->enableRuleAsyncWithHttpInfo($app, $id, $contentType) + return $this->enableRuleAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -2000,17 +1973,16 @@ function ($response) { * * Enable a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function enableRuleAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['enableRule'][0]) + public function enableRuleAsyncWithHttpInfo($id, string $contentType = self::contentTypes['enableRule'][0]) { $returnType = '\Squidex\Client\Model\RuleDto'; - $request = $this->enableRuleRequest($app, $id, $contentType); + $request = $this->enableRuleRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2051,17 +2023,17 @@ function ($exception) { /** * Create request for operation 'enableRule' * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function enableRuleRequest($app, $id, string $contentType = self::contentTypes['enableRule'][0]) + public function enableRuleRequest($id, string $contentType = self::contentTypes['enableRule'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3039,7 +3011,6 @@ public function getEventTypesRequest(string $contentType = self::contentTypes['g * * Get rule events. * - * @param string $app The name of the app. (required) * @param string $rule_id The optional rule id to filter to events. (optional) * @param int $skip The number of events to skip. (optional, default to 0) * @param int $take The number of events to take. (optional, default to 20) @@ -3049,9 +3020,9 @@ public function getEventTypesRequest(string $contentType = self::contentTypes['g * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RuleEventsDto|\Squidex\Client\Model\ErrorDto */ - public function getEvents($app, $rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) + public function getEvents($rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) { - list($response) = $this->getEventsWithHttpInfo($app, $rule_id, $skip, $take, $contentType); + list($response) = $this->getEventsWithHttpInfo($rule_id, $skip, $take, $contentType); return $response; } @@ -3060,7 +3031,6 @@ public function getEvents($app, $rule_id = null, $skip = 0, $take = 20, string $ * * Get rule events. * - * @param string $app The name of the app. (required) * @param string $rule_id The optional rule id to filter to events. (optional) * @param int $skip The number of events to skip. (optional, default to 0) * @param int $take The number of events to take. (optional, default to 20) @@ -3070,9 +3040,9 @@ public function getEvents($app, $rule_id = null, $skip = 0, $take = 20, string $ * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RuleEventsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getEventsWithHttpInfo($app, $rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) + public function getEventsWithHttpInfo($rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) { - $request = $this->getEventsRequest($app, $rule_id, $skip, $take, $contentType); + $request = $this->getEventsRequest($rule_id, $skip, $take, $contentType); try { $options = $this->createHttpClientOption(); @@ -3186,7 +3156,6 @@ public function getEventsWithHttpInfo($app, $rule_id = null, $skip = 0, $take = * * Get rule events. * - * @param string $app The name of the app. (required) * @param string $rule_id The optional rule id to filter to events. (optional) * @param int $skip The number of events to skip. (optional, default to 0) * @param int $take The number of events to take. (optional, default to 20) @@ -3195,9 +3164,9 @@ public function getEventsWithHttpInfo($app, $rule_id = null, $skip = 0, $take = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventsAsync($app, $rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) + public function getEventsAsync($rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) { - return $this->getEventsAsyncWithHttpInfo($app, $rule_id, $skip, $take, $contentType) + return $this->getEventsAsyncWithHttpInfo($rule_id, $skip, $take, $contentType) ->then( function ($response) { return $response[0]; @@ -3210,7 +3179,6 @@ function ($response) { * * Get rule events. * - * @param string $app The name of the app. (required) * @param string $rule_id The optional rule id to filter to events. (optional) * @param int $skip The number of events to skip. (optional, default to 0) * @param int $take The number of events to take. (optional, default to 20) @@ -3219,10 +3187,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventsAsyncWithHttpInfo($app, $rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) + public function getEventsAsyncWithHttpInfo($rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) { $returnType = '\Squidex\Client\Model\RuleEventsDto'; - $request = $this->getEventsRequest($app, $rule_id, $skip, $take, $contentType); + $request = $this->getEventsRequest($rule_id, $skip, $take, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3263,7 +3231,6 @@ function ($exception) { /** * Create request for operation 'getEvents' * - * @param string $app The name of the app. (required) * @param string $rule_id The optional rule id to filter to events. (optional) * @param int $skip The number of events to skip. (optional, default to 0) * @param int $take The number of events to take. (optional, default to 20) @@ -3272,10 +3239,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEventsRequest($app, $rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) + public function getEventsRequest($rule_id = null, $skip = 0, $take = 20, string $contentType = self::contentTypes['getEvents'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3390,16 +3358,15 @@ public function getEventsRequest($app, $rule_id = null, $skip = 0, $take = 20, s * * Get rules. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRules'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RulesDto|\Squidex\Client\Model\ErrorDto */ - public function getRules($app, string $contentType = self::contentTypes['getRules'][0]) + public function getRules(string $contentType = self::contentTypes['getRules'][0]) { - list($response) = $this->getRulesWithHttpInfo($app, $contentType); + list($response) = $this->getRulesWithHttpInfo($contentType); return $response; } @@ -3408,16 +3375,15 @@ public function getRules($app, string $contentType = self::contentTypes['getRule * * Get rules. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRules'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RulesDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getRulesWithHttpInfo($app, string $contentType = self::contentTypes['getRules'][0]) + public function getRulesWithHttpInfo(string $contentType = self::contentTypes['getRules'][0]) { - $request = $this->getRulesRequest($app, $contentType); + $request = $this->getRulesRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -3531,15 +3497,14 @@ public function getRulesWithHttpInfo($app, string $contentType = self::contentTy * * Get rules. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRules'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRulesAsync($app, string $contentType = self::contentTypes['getRules'][0]) + public function getRulesAsync(string $contentType = self::contentTypes['getRules'][0]) { - return $this->getRulesAsyncWithHttpInfo($app, $contentType) + return $this->getRulesAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -3552,16 +3517,15 @@ function ($response) { * * Get rules. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRules'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRulesAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getRules'][0]) + public function getRulesAsyncWithHttpInfo(string $contentType = self::contentTypes['getRules'][0]) { $returnType = '\Squidex\Client\Model\RulesDto'; - $request = $this->getRulesRequest($app, $contentType); + $request = $this->getRulesRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3602,16 +3566,16 @@ function ($exception) { /** * Create request for operation 'getRules' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRules'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getRulesRequest($app, string $contentType = self::contentTypes['getRules'][0]) + public function getRulesRequest(string $contentType = self::contentTypes['getRules'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3696,7 +3660,6 @@ public function getRulesRequest($app, string $contentType = self::contentTypes[' * * Create a new rule. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRule'] to see the possible values for this operation * @@ -3704,9 +3667,9 @@ public function getRulesRequest($app, string $contentType = self::contentTypes[' * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RuleDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postRule($app, $create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) + public function postRule($create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) { - list($response) = $this->postRuleWithHttpInfo($app, $create_rule_dto, $contentType); + list($response) = $this->postRuleWithHttpInfo($create_rule_dto, $contentType); return $response; } @@ -3715,7 +3678,6 @@ public function postRule($app, $create_rule_dto, string $contentType = self::con * * Create a new rule. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRule'] to see the possible values for this operation * @@ -3723,9 +3685,9 @@ public function postRule($app, $create_rule_dto, string $contentType = self::con * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RuleDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postRuleWithHttpInfo($app, $create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) + public function postRuleWithHttpInfo($create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) { - $request = $this->postRuleRequest($app, $create_rule_dto, $contentType); + $request = $this->postRuleRequest($create_rule_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -3862,16 +3824,15 @@ public function postRuleWithHttpInfo($app, $create_rule_dto, string $contentType * * Create a new rule. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postRuleAsync($app, $create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) + public function postRuleAsync($create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) { - return $this->postRuleAsyncWithHttpInfo($app, $create_rule_dto, $contentType) + return $this->postRuleAsyncWithHttpInfo($create_rule_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -3884,17 +3845,16 @@ function ($response) { * * Create a new rule. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postRuleAsyncWithHttpInfo($app, $create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) + public function postRuleAsyncWithHttpInfo($create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) { $returnType = '\Squidex\Client\Model\RuleDto'; - $request = $this->postRuleRequest($app, $create_rule_dto, $contentType); + $request = $this->postRuleRequest($create_rule_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3935,17 +3895,17 @@ function ($exception) { /** * Create request for operation 'postRule' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postRuleRequest($app, $create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) + public function postRuleRequest($create_rule_dto, string $contentType = self::contentTypes['postRule'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4044,7 +4004,6 @@ public function postRuleRequest($app, $create_rule_dto, string $contentType = se * * Retry the event immediately. * - * @param string $app The name of the app. (required) * @param string $id The event to enqueue. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putEvent'] to see the possible values for this operation * @@ -4052,9 +4011,9 @@ public function postRuleRequest($app, $create_rule_dto, string $contentType = se * @throws \InvalidArgumentException * @return void */ - public function putEvent($app, $id, string $contentType = self::contentTypes['putEvent'][0]) + public function putEvent($id, string $contentType = self::contentTypes['putEvent'][0]) { - $this->putEventWithHttpInfo($app, $id, $contentType); + $this->putEventWithHttpInfo($id, $contentType); } /** @@ -4062,7 +4021,6 @@ public function putEvent($app, $id, string $contentType = self::contentTypes['pu * * Retry the event immediately. * - * @param string $app The name of the app. (required) * @param string $id The event to enqueue. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putEvent'] to see the possible values for this operation * @@ -4070,9 +4028,9 @@ public function putEvent($app, $id, string $contentType = self::contentTypes['pu * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function putEventWithHttpInfo($app, $id, string $contentType = self::contentTypes['putEvent'][0]) + public function putEventWithHttpInfo($id, string $contentType = self::contentTypes['putEvent'][0]) { - $request = $this->putEventRequest($app, $id, $contentType); + $request = $this->putEventRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -4139,16 +4097,15 @@ public function putEventWithHttpInfo($app, $id, string $contentType = self::cont * * Retry the event immediately. * - * @param string $app The name of the app. (required) * @param string $id The event to enqueue. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putEvent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putEventAsync($app, $id, string $contentType = self::contentTypes['putEvent'][0]) + public function putEventAsync($id, string $contentType = self::contentTypes['putEvent'][0]) { - return $this->putEventAsyncWithHttpInfo($app, $id, $contentType) + return $this->putEventAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -4161,17 +4118,16 @@ function ($response) { * * Retry the event immediately. * - * @param string $app The name of the app. (required) * @param string $id The event to enqueue. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putEvent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putEventAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['putEvent'][0]) + public function putEventAsyncWithHttpInfo($id, string $contentType = self::contentTypes['putEvent'][0]) { $returnType = ''; - $request = $this->putEventRequest($app, $id, $contentType); + $request = $this->putEventRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4199,17 +4155,17 @@ function ($exception) { /** * Create request for operation 'putEvent' * - * @param string $app The name of the app. (required) * @param string $id The event to enqueue. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putEvent'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putEventRequest($app, $id, string $contentType = self::contentTypes['putEvent'][0]) + public function putEventRequest($id, string $contentType = self::contentTypes['putEvent'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4309,7 +4265,6 @@ public function putEventRequest($app, $id, string $contentType = self::contentTy * * Update a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to update. (required) * @param \Squidex\Client\Model\UpdateRuleDto $update_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRule'] to see the possible values for this operation @@ -4318,9 +4273,9 @@ public function putEventRequest($app, $id, string $contentType = self::contentTy * @throws \InvalidArgumentException * @return \Squidex\Client\Model\RuleDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putRule($app, $id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) + public function putRule($id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) { - list($response) = $this->putRuleWithHttpInfo($app, $id, $update_rule_dto, $contentType); + list($response) = $this->putRuleWithHttpInfo($id, $update_rule_dto, $contentType); return $response; } @@ -4329,7 +4284,6 @@ public function putRule($app, $id, $update_rule_dto, string $contentType = self: * * Update a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to update. (required) * @param \Squidex\Client\Model\UpdateRuleDto $update_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRule'] to see the possible values for this operation @@ -4338,9 +4292,9 @@ public function putRule($app, $id, $update_rule_dto, string $contentType = self: * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\RuleDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putRuleWithHttpInfo($app, $id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) + public function putRuleWithHttpInfo($id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) { - $request = $this->putRuleRequest($app, $id, $update_rule_dto, $contentType); + $request = $this->putRuleRequest($id, $update_rule_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -4477,7 +4431,6 @@ public function putRuleWithHttpInfo($app, $id, $update_rule_dto, string $content * * Update a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to update. (required) * @param \Squidex\Client\Model\UpdateRuleDto $update_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRule'] to see the possible values for this operation @@ -4485,9 +4438,9 @@ public function putRuleWithHttpInfo($app, $id, $update_rule_dto, string $content * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRuleAsync($app, $id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) + public function putRuleAsync($id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) { - return $this->putRuleAsyncWithHttpInfo($app, $id, $update_rule_dto, $contentType) + return $this->putRuleAsyncWithHttpInfo($id, $update_rule_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -4500,7 +4453,6 @@ function ($response) { * * Update a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to update. (required) * @param \Squidex\Client\Model\UpdateRuleDto $update_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRule'] to see the possible values for this operation @@ -4508,10 +4460,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRuleAsyncWithHttpInfo($app, $id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) + public function putRuleAsyncWithHttpInfo($id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) { $returnType = '\Squidex\Client\Model\RuleDto'; - $request = $this->putRuleRequest($app, $id, $update_rule_dto, $contentType); + $request = $this->putRuleRequest($id, $update_rule_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4552,7 +4504,6 @@ function ($exception) { /** * Create request for operation 'putRule' * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to update. (required) * @param \Squidex\Client\Model\UpdateRuleDto $update_rule_dto The rule object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRule'] to see the possible values for this operation @@ -4560,10 +4511,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putRuleRequest($app, $id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) + public function putRuleRequest($id, $update_rule_dto, string $contentType = self::contentTypes['putRule'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4677,7 +4629,6 @@ public function putRuleRequest($app, $id, $update_rule_dto, string $contentType * * Run a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to run. (required) * @param bool $from_snapshots Runs the rule from snapeshots if possible. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRuleRun'] to see the possible values for this operation @@ -4686,9 +4637,9 @@ public function putRuleRequest($app, $id, $update_rule_dto, string $contentType * @throws \InvalidArgumentException * @return void */ - public function putRuleRun($app, $id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) + public function putRuleRun($id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) { - $this->putRuleRunWithHttpInfo($app, $id, $from_snapshots, $contentType); + $this->putRuleRunWithHttpInfo($id, $from_snapshots, $contentType); } /** @@ -4696,7 +4647,6 @@ public function putRuleRun($app, $id, $from_snapshots = false, string $contentTy * * Run a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to run. (required) * @param bool $from_snapshots Runs the rule from snapeshots if possible. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRuleRun'] to see the possible values for this operation @@ -4705,9 +4655,9 @@ public function putRuleRun($app, $id, $from_snapshots = false, string $contentTy * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function putRuleRunWithHttpInfo($app, $id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) + public function putRuleRunWithHttpInfo($id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) { - $request = $this->putRuleRunRequest($app, $id, $from_snapshots, $contentType); + $request = $this->putRuleRunRequest($id, $from_snapshots, $contentType); try { $options = $this->createHttpClientOption(); @@ -4774,7 +4724,6 @@ public function putRuleRunWithHttpInfo($app, $id, $from_snapshots = false, strin * * Run a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to run. (required) * @param bool $from_snapshots Runs the rule from snapeshots if possible. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRuleRun'] to see the possible values for this operation @@ -4782,9 +4731,9 @@ public function putRuleRunWithHttpInfo($app, $id, $from_snapshots = false, strin * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRuleRunAsync($app, $id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) + public function putRuleRunAsync($id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) { - return $this->putRuleRunAsyncWithHttpInfo($app, $id, $from_snapshots, $contentType) + return $this->putRuleRunAsyncWithHttpInfo($id, $from_snapshots, $contentType) ->then( function ($response) { return $response[0]; @@ -4797,7 +4746,6 @@ function ($response) { * * Run a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to run. (required) * @param bool $from_snapshots Runs the rule from snapeshots if possible. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRuleRun'] to see the possible values for this operation @@ -4805,10 +4753,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRuleRunAsyncWithHttpInfo($app, $id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) + public function putRuleRunAsyncWithHttpInfo($id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) { $returnType = ''; - $request = $this->putRuleRunRequest($app, $id, $from_snapshots, $contentType); + $request = $this->putRuleRunRequest($id, $from_snapshots, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4836,7 +4784,6 @@ function ($exception) { /** * Create request for operation 'putRuleRun' * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to run. (required) * @param bool $from_snapshots Runs the rule from snapeshots if possible. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRuleRun'] to see the possible values for this operation @@ -4844,10 +4791,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putRuleRunRequest($app, $id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) + public function putRuleRunRequest($id, $from_snapshots = false, string $contentType = self::contentTypes['putRuleRun'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4957,7 +4905,6 @@ public function putRuleRunRequest($app, $id, $from_snapshots = false, string $co * * Simulate a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulateGET'] to see the possible values for this operation * @@ -4965,9 +4912,9 @@ public function putRuleRunRequest($app, $id, $from_snapshots = false, string $co * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SimulatedRuleEventsDto|\Squidex\Client\Model\ErrorDto */ - public function simulateGET($app, $id, string $contentType = self::contentTypes['simulateGET'][0]) + public function simulateGET($id, string $contentType = self::contentTypes['simulateGET'][0]) { - list($response) = $this->simulateGETWithHttpInfo($app, $id, $contentType); + list($response) = $this->simulateGETWithHttpInfo($id, $contentType); return $response; } @@ -4976,7 +4923,6 @@ public function simulateGET($app, $id, string $contentType = self::contentTypes[ * * Simulate a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulateGET'] to see the possible values for this operation * @@ -4984,9 +4930,9 @@ public function simulateGET($app, $id, string $contentType = self::contentTypes[ * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SimulatedRuleEventsDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function simulateGETWithHttpInfo($app, $id, string $contentType = self::contentTypes['simulateGET'][0]) + public function simulateGETWithHttpInfo($id, string $contentType = self::contentTypes['simulateGET'][0]) { - $request = $this->simulateGETRequest($app, $id, $contentType); + $request = $this->simulateGETRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -5100,16 +5046,15 @@ public function simulateGETWithHttpInfo($app, $id, string $contentType = self::c * * Simulate a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulateGET'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function simulateGETAsync($app, $id, string $contentType = self::contentTypes['simulateGET'][0]) + public function simulateGETAsync($id, string $contentType = self::contentTypes['simulateGET'][0]) { - return $this->simulateGETAsyncWithHttpInfo($app, $id, $contentType) + return $this->simulateGETAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -5122,17 +5067,16 @@ function ($response) { * * Simulate a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulateGET'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function simulateGETAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['simulateGET'][0]) + public function simulateGETAsyncWithHttpInfo($id, string $contentType = self::contentTypes['simulateGET'][0]) { $returnType = '\Squidex\Client\Model\SimulatedRuleEventsDto'; - $request = $this->simulateGETRequest($app, $id, $contentType); + $request = $this->simulateGETRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5173,17 +5117,17 @@ function ($exception) { /** * Create request for operation 'simulateGET' * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulateGET'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function simulateGETRequest($app, $id, string $contentType = self::contentTypes['simulateGET'][0]) + public function simulateGETRequest($id, string $contentType = self::contentTypes['simulateGET'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5283,7 +5227,6 @@ public function simulateGETRequest($app, $id, string $contentType = self::conten * * Simulate a rule. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePOST'] to see the possible values for this operation * @@ -5291,9 +5234,9 @@ public function simulateGETRequest($app, $id, string $contentType = self::conten * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SimulatedRuleEventsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function simulatePOST($app, $create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) + public function simulatePOST($create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) { - list($response) = $this->simulatePOSTWithHttpInfo($app, $create_rule_dto, $contentType); + list($response) = $this->simulatePOSTWithHttpInfo($create_rule_dto, $contentType); return $response; } @@ -5302,7 +5245,6 @@ public function simulatePOST($app, $create_rule_dto, string $contentType = self: * * Simulate a rule. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePOST'] to see the possible values for this operation * @@ -5310,9 +5252,9 @@ public function simulatePOST($app, $create_rule_dto, string $contentType = self: * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SimulatedRuleEventsDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function simulatePOSTWithHttpInfo($app, $create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) + public function simulatePOSTWithHttpInfo($create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) { - $request = $this->simulatePOSTRequest($app, $create_rule_dto, $contentType); + $request = $this->simulatePOSTRequest($create_rule_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -5449,16 +5391,15 @@ public function simulatePOSTWithHttpInfo($app, $create_rule_dto, string $content * * Simulate a rule. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePOST'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function simulatePOSTAsync($app, $create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) + public function simulatePOSTAsync($create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) { - return $this->simulatePOSTAsyncWithHttpInfo($app, $create_rule_dto, $contentType) + return $this->simulatePOSTAsyncWithHttpInfo($create_rule_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -5471,17 +5412,16 @@ function ($response) { * * Simulate a rule. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePOST'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function simulatePOSTAsyncWithHttpInfo($app, $create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) + public function simulatePOSTAsyncWithHttpInfo($create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) { $returnType = '\Squidex\Client\Model\SimulatedRuleEventsDto'; - $request = $this->simulatePOSTRequest($app, $create_rule_dto, $contentType); + $request = $this->simulatePOSTRequest($create_rule_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5522,17 +5462,17 @@ function ($exception) { /** * Create request for operation 'simulatePOST' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateRuleDto $create_rule_dto The rule to simulate. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePOST'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function simulatePOSTRequest($app, $create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) + public function simulatePOSTRequest($create_rule_dto, string $contentType = self::contentTypes['simulatePOST'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5631,7 +5571,6 @@ public function simulatePOSTRequest($app, $create_rule_dto, string $contentType * * Trigger a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['triggerRule'] to see the possible values for this operation * @@ -5639,9 +5578,9 @@ public function simulatePOSTRequest($app, $create_rule_dto, string $contentType * @throws \InvalidArgumentException * @return void */ - public function triggerRule($app, $id, string $contentType = self::contentTypes['triggerRule'][0]) + public function triggerRule($id, string $contentType = self::contentTypes['triggerRule'][0]) { - $this->triggerRuleWithHttpInfo($app, $id, $contentType); + $this->triggerRuleWithHttpInfo($id, $contentType); } /** @@ -5649,7 +5588,6 @@ public function triggerRule($app, $id, string $contentType = self::contentTypes[ * * Trigger a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['triggerRule'] to see the possible values for this operation * @@ -5657,9 +5595,9 @@ public function triggerRule($app, $id, string $contentType = self::contentTypes[ * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function triggerRuleWithHttpInfo($app, $id, string $contentType = self::contentTypes['triggerRule'][0]) + public function triggerRuleWithHttpInfo($id, string $contentType = self::contentTypes['triggerRule'][0]) { - $request = $this->triggerRuleRequest($app, $id, $contentType); + $request = $this->triggerRuleRequest($id, $contentType); try { $options = $this->createHttpClientOption(); @@ -5726,16 +5664,15 @@ public function triggerRuleWithHttpInfo($app, $id, string $contentType = self::c * * Trigger a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['triggerRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function triggerRuleAsync($app, $id, string $contentType = self::contentTypes['triggerRule'][0]) + public function triggerRuleAsync($id, string $contentType = self::contentTypes['triggerRule'][0]) { - return $this->triggerRuleAsyncWithHttpInfo($app, $id, $contentType) + return $this->triggerRuleAsyncWithHttpInfo($id, $contentType) ->then( function ($response) { return $response[0]; @@ -5748,17 +5685,16 @@ function ($response) { * * Trigger a rule. * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['triggerRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function triggerRuleAsyncWithHttpInfo($app, $id, string $contentType = self::contentTypes['triggerRule'][0]) + public function triggerRuleAsyncWithHttpInfo($id, string $contentType = self::contentTypes['triggerRule'][0]) { $returnType = ''; - $request = $this->triggerRuleRequest($app, $id, $contentType); + $request = $this->triggerRuleRequest($id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5786,17 +5722,17 @@ function ($exception) { /** * Create request for operation 'triggerRule' * - * @param string $app The name of the app. (required) * @param string $id The ID of the rule to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['triggerRule'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function triggerRuleRequest($app, $id, string $contentType = self::contentTypes['triggerRule'][0]) + public function triggerRuleRequest($id, string $contentType = self::contentTypes['triggerRule'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' diff --git a/lib/Api/SchemasApi.php b/lib/Api/SchemasApi.php index ea81fa3..1ac87c2 100644 --- a/lib/Api/SchemasApi.php +++ b/lib/Api/SchemasApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -214,7 +214,6 @@ public function getConfig() * * Delete a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteField'] to see the possible values for this operation @@ -223,9 +222,9 @@ public function getConfig() * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteField($app, $schema, $id, string $contentType = self::contentTypes['deleteField'][0]) + public function deleteField($schema, $id, string $contentType = self::contentTypes['deleteField'][0]) { - list($response) = $this->deleteFieldWithHttpInfo($app, $schema, $id, $contentType); + list($response) = $this->deleteFieldWithHttpInfo($schema, $id, $contentType); return $response; } @@ -234,7 +233,6 @@ public function deleteField($app, $schema, $id, string $contentType = self::cont * * Delete a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteField'] to see the possible values for this operation @@ -243,9 +241,9 @@ public function deleteField($app, $schema, $id, string $contentType = self::cont * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteFieldWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['deleteField'][0]) + public function deleteFieldWithHttpInfo($schema, $id, string $contentType = self::contentTypes['deleteField'][0]) { - $request = $this->deleteFieldRequest($app, $schema, $id, $contentType); + $request = $this->deleteFieldRequest($schema, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -382,7 +380,6 @@ public function deleteFieldWithHttpInfo($app, $schema, $id, string $contentType * * Delete a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteField'] to see the possible values for this operation @@ -390,9 +387,9 @@ public function deleteFieldWithHttpInfo($app, $schema, $id, string $contentType * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteFieldAsync($app, $schema, $id, string $contentType = self::contentTypes['deleteField'][0]) + public function deleteFieldAsync($schema, $id, string $contentType = self::contentTypes['deleteField'][0]) { - return $this->deleteFieldAsyncWithHttpInfo($app, $schema, $id, $contentType) + return $this->deleteFieldAsyncWithHttpInfo($schema, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -405,7 +402,6 @@ function ($response) { * * Delete a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteField'] to see the possible values for this operation @@ -413,10 +409,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteFieldAsyncWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['deleteField'][0]) + public function deleteFieldAsyncWithHttpInfo($schema, $id, string $contentType = self::contentTypes['deleteField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->deleteFieldRequest($app, $schema, $id, $contentType); + $request = $this->deleteFieldRequest($schema, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -457,7 +453,6 @@ function ($exception) { /** * Create request for operation 'deleteField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteField'] to see the possible values for this operation @@ -465,10 +460,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteFieldRequest($app, $schema, $id, string $contentType = self::contentTypes['deleteField'][0]) + public function deleteFieldRequest($schema, $id, string $contentType = self::contentTypes['deleteField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -583,7 +579,6 @@ public function deleteFieldRequest($app, $schema, $id, string $contentType = sel * * Delete a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -593,9 +588,9 @@ public function deleteFieldRequest($app, $schema, $id, string $contentType = sel * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function deleteNestedField($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) + public function deleteNestedField($schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) { - list($response) = $this->deleteNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $contentType); + list($response) = $this->deleteNestedFieldWithHttpInfo($schema, $parent_id, $id, $contentType); return $response; } @@ -604,7 +599,6 @@ public function deleteNestedField($app, $schema, $parent_id, $id, string $conten * * Delete a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -614,9 +608,9 @@ public function deleteNestedField($app, $schema, $parent_id, $id, string $conten * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function deleteNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) + public function deleteNestedFieldWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) { - $request = $this->deleteNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->deleteNestedFieldRequest($schema, $parent_id, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -753,7 +747,6 @@ public function deleteNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, st * * Delete a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -762,9 +755,9 @@ public function deleteNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, st * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteNestedFieldAsync($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) + public function deleteNestedFieldAsync($schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) { - return $this->deleteNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, $contentType) + return $this->deleteNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -777,7 +770,6 @@ function ($response) { * * Delete a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -786,10 +778,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) + public function deleteNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->deleteNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->deleteNestedFieldRequest($schema, $parent_id, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -830,7 +822,6 @@ function ($exception) { /** * Create request for operation 'deleteNestedField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -839,10 +830,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteNestedFieldRequest($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) + public function deleteNestedFieldRequest($schema, $parent_id, $id, string $contentType = self::contentTypes['deleteNestedField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -972,7 +964,6 @@ public function deleteNestedFieldRequest($app, $schema, $parent_id, $id, string * * Disable a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableField'] to see the possible values for this operation @@ -981,9 +972,9 @@ public function deleteNestedFieldRequest($app, $schema, $parent_id, $id, string * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function disableField($app, $schema, $id, string $contentType = self::contentTypes['disableField'][0]) + public function disableField($schema, $id, string $contentType = self::contentTypes['disableField'][0]) { - list($response) = $this->disableFieldWithHttpInfo($app, $schema, $id, $contentType); + list($response) = $this->disableFieldWithHttpInfo($schema, $id, $contentType); return $response; } @@ -992,7 +983,6 @@ public function disableField($app, $schema, $id, string $contentType = self::con * * Disable a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableField'] to see the possible values for this operation @@ -1001,9 +991,9 @@ public function disableField($app, $schema, $id, string $contentType = self::con * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function disableFieldWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['disableField'][0]) + public function disableFieldWithHttpInfo($schema, $id, string $contentType = self::contentTypes['disableField'][0]) { - $request = $this->disableFieldRequest($app, $schema, $id, $contentType); + $request = $this->disableFieldRequest($schema, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1140,7 +1130,6 @@ public function disableFieldWithHttpInfo($app, $schema, $id, string $contentType * * Disable a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableField'] to see the possible values for this operation @@ -1148,9 +1137,9 @@ public function disableFieldWithHttpInfo($app, $schema, $id, string $contentType * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function disableFieldAsync($app, $schema, $id, string $contentType = self::contentTypes['disableField'][0]) + public function disableFieldAsync($schema, $id, string $contentType = self::contentTypes['disableField'][0]) { - return $this->disableFieldAsyncWithHttpInfo($app, $schema, $id, $contentType) + return $this->disableFieldAsyncWithHttpInfo($schema, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -1163,7 +1152,6 @@ function ($response) { * * Disable a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableField'] to see the possible values for this operation @@ -1171,10 +1159,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function disableFieldAsyncWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['disableField'][0]) + public function disableFieldAsyncWithHttpInfo($schema, $id, string $contentType = self::contentTypes['disableField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->disableFieldRequest($app, $schema, $id, $contentType); + $request = $this->disableFieldRequest($schema, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1215,7 +1203,6 @@ function ($exception) { /** * Create request for operation 'disableField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to disable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['disableField'] to see the possible values for this operation @@ -1223,10 +1210,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function disableFieldRequest($app, $schema, $id, string $contentType = self::contentTypes['disableField'][0]) + public function disableFieldRequest($schema, $id, string $contentType = self::contentTypes['disableField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1341,7 +1329,6 @@ public function disableFieldRequest($app, $schema, $id, string $contentType = se * * Disable a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -1351,9 +1338,9 @@ public function disableFieldRequest($app, $schema, $id, string $contentType = se * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function disableNestedField($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) + public function disableNestedField($schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) { - list($response) = $this->disableNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $contentType); + list($response) = $this->disableNestedFieldWithHttpInfo($schema, $parent_id, $id, $contentType); return $response; } @@ -1362,7 +1349,6 @@ public function disableNestedField($app, $schema, $parent_id, $id, string $conte * * Disable a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -1372,9 +1358,9 @@ public function disableNestedField($app, $schema, $parent_id, $id, string $conte * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function disableNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) + public function disableNestedFieldWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) { - $request = $this->disableNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->disableNestedFieldRequest($schema, $parent_id, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1511,7 +1497,6 @@ public function disableNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, s * * Disable a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -1520,9 +1505,9 @@ public function disableNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, s * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function disableNestedFieldAsync($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) + public function disableNestedFieldAsync($schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) { - return $this->disableNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, $contentType) + return $this->disableNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -1535,7 +1520,6 @@ function ($response) { * * Disable a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -1544,10 +1528,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function disableNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) + public function disableNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->disableNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->disableNestedFieldRequest($schema, $parent_id, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1588,7 +1572,6 @@ function ($exception) { /** * Create request for operation 'disableNestedField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to disable. (required) @@ -1597,10 +1580,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function disableNestedFieldRequest($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) + public function disableNestedFieldRequest($schema, $parent_id, $id, string $contentType = self::contentTypes['disableNestedField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1730,7 +1714,6 @@ public function disableNestedFieldRequest($app, $schema, $parent_id, $id, string * * Enable a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableField'] to see the possible values for this operation @@ -1739,9 +1722,9 @@ public function disableNestedFieldRequest($app, $schema, $parent_id, $id, string * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function enableField($app, $schema, $id, string $contentType = self::contentTypes['enableField'][0]) + public function enableField($schema, $id, string $contentType = self::contentTypes['enableField'][0]) { - list($response) = $this->enableFieldWithHttpInfo($app, $schema, $id, $contentType); + list($response) = $this->enableFieldWithHttpInfo($schema, $id, $contentType); return $response; } @@ -1750,7 +1733,6 @@ public function enableField($app, $schema, $id, string $contentType = self::cont * * Enable a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableField'] to see the possible values for this operation @@ -1759,9 +1741,9 @@ public function enableField($app, $schema, $id, string $contentType = self::cont * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function enableFieldWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['enableField'][0]) + public function enableFieldWithHttpInfo($schema, $id, string $contentType = self::contentTypes['enableField'][0]) { - $request = $this->enableFieldRequest($app, $schema, $id, $contentType); + $request = $this->enableFieldRequest($schema, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1898,7 +1880,6 @@ public function enableFieldWithHttpInfo($app, $schema, $id, string $contentType * * Enable a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableField'] to see the possible values for this operation @@ -1906,9 +1887,9 @@ public function enableFieldWithHttpInfo($app, $schema, $id, string $contentType * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function enableFieldAsync($app, $schema, $id, string $contentType = self::contentTypes['enableField'][0]) + public function enableFieldAsync($schema, $id, string $contentType = self::contentTypes['enableField'][0]) { - return $this->enableFieldAsyncWithHttpInfo($app, $schema, $id, $contentType) + return $this->enableFieldAsyncWithHttpInfo($schema, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -1921,7 +1902,6 @@ function ($response) { * * Enable a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableField'] to see the possible values for this operation @@ -1929,10 +1909,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function enableFieldAsyncWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['enableField'][0]) + public function enableFieldAsyncWithHttpInfo($schema, $id, string $contentType = self::contentTypes['enableField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->enableFieldRequest($app, $schema, $id, $contentType); + $request = $this->enableFieldRequest($schema, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1973,7 +1953,6 @@ function ($exception) { /** * Create request for operation 'enableField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to enable. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['enableField'] to see the possible values for this operation @@ -1981,10 +1960,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function enableFieldRequest($app, $schema, $id, string $contentType = self::contentTypes['enableField'][0]) + public function enableFieldRequest($schema, $id, string $contentType = self::contentTypes['enableField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2099,7 +2079,6 @@ public function enableFieldRequest($app, $schema, $id, string $contentType = sel * * Enable a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to enable. (required) @@ -2109,9 +2088,9 @@ public function enableFieldRequest($app, $schema, $id, string $contentType = sel * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function enableNestedField($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) + public function enableNestedField($schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) { - list($response) = $this->enableNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $contentType); + list($response) = $this->enableNestedFieldWithHttpInfo($schema, $parent_id, $id, $contentType); return $response; } @@ -2120,7 +2099,6 @@ public function enableNestedField($app, $schema, $parent_id, $id, string $conten * * Enable a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to enable. (required) @@ -2130,9 +2108,9 @@ public function enableNestedField($app, $schema, $parent_id, $id, string $conten * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function enableNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) + public function enableNestedFieldWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) { - $request = $this->enableNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->enableNestedFieldRequest($schema, $parent_id, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2269,7 +2247,6 @@ public function enableNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, st * * Enable a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to enable. (required) @@ -2278,9 +2255,9 @@ public function enableNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, st * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function enableNestedFieldAsync($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) + public function enableNestedFieldAsync($schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) { - return $this->enableNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, $contentType) + return $this->enableNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -2293,7 +2270,6 @@ function ($response) { * * Enable a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to enable. (required) @@ -2302,10 +2278,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function enableNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) + public function enableNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->enableNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->enableNestedFieldRequest($schema, $parent_id, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2346,7 +2322,6 @@ function ($exception) { /** * Create request for operation 'enableNestedField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to enable. (required) @@ -2355,10 +2330,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function enableNestedFieldRequest($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) + public function enableNestedFieldRequest($schema, $parent_id, $id, string $contentType = self::contentTypes['enableNestedField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2488,7 +2464,6 @@ public function enableNestedFieldRequest($app, $schema, $parent_id, $id, string * * Hide a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to hide. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hideField'] to see the possible values for this operation @@ -2497,9 +2472,9 @@ public function enableNestedFieldRequest($app, $schema, $parent_id, $id, string * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function hideField($app, $schema, $id, string $contentType = self::contentTypes['hideField'][0]) + public function hideField($schema, $id, string $contentType = self::contentTypes['hideField'][0]) { - list($response) = $this->hideFieldWithHttpInfo($app, $schema, $id, $contentType); + list($response) = $this->hideFieldWithHttpInfo($schema, $id, $contentType); return $response; } @@ -2508,7 +2483,6 @@ public function hideField($app, $schema, $id, string $contentType = self::conten * * Hide a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to hide. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hideField'] to see the possible values for this operation @@ -2517,9 +2491,9 @@ public function hideField($app, $schema, $id, string $contentType = self::conten * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function hideFieldWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['hideField'][0]) + public function hideFieldWithHttpInfo($schema, $id, string $contentType = self::contentTypes['hideField'][0]) { - $request = $this->hideFieldRequest($app, $schema, $id, $contentType); + $request = $this->hideFieldRequest($schema, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2656,7 +2630,6 @@ public function hideFieldWithHttpInfo($app, $schema, $id, string $contentType = * * Hide a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to hide. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hideField'] to see the possible values for this operation @@ -2664,9 +2637,9 @@ public function hideFieldWithHttpInfo($app, $schema, $id, string $contentType = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function hideFieldAsync($app, $schema, $id, string $contentType = self::contentTypes['hideField'][0]) + public function hideFieldAsync($schema, $id, string $contentType = self::contentTypes['hideField'][0]) { - return $this->hideFieldAsyncWithHttpInfo($app, $schema, $id, $contentType) + return $this->hideFieldAsyncWithHttpInfo($schema, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -2679,7 +2652,6 @@ function ($response) { * * Hide a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to hide. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hideField'] to see the possible values for this operation @@ -2687,10 +2659,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function hideFieldAsyncWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['hideField'][0]) + public function hideFieldAsyncWithHttpInfo($schema, $id, string $contentType = self::contentTypes['hideField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->hideFieldRequest($app, $schema, $id, $contentType); + $request = $this->hideFieldRequest($schema, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2731,7 +2703,6 @@ function ($exception) { /** * Create request for operation 'hideField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to hide. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['hideField'] to see the possible values for this operation @@ -2739,10 +2710,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function hideFieldRequest($app, $schema, $id, string $contentType = self::contentTypes['hideField'][0]) + public function hideFieldRequest($schema, $id, string $contentType = self::contentTypes['hideField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -2857,7 +2829,6 @@ public function hideFieldRequest($app, $schema, $id, string $contentType = self: * * Hide a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to hide. (required) @@ -2867,9 +2838,9 @@ public function hideFieldRequest($app, $schema, $id, string $contentType = self: * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function hideNestedField($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) + public function hideNestedField($schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) { - list($response) = $this->hideNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $contentType); + list($response) = $this->hideNestedFieldWithHttpInfo($schema, $parent_id, $id, $contentType); return $response; } @@ -2878,7 +2849,6 @@ public function hideNestedField($app, $schema, $parent_id, $id, string $contentT * * Hide a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to hide. (required) @@ -2888,9 +2858,9 @@ public function hideNestedField($app, $schema, $parent_id, $id, string $contentT * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function hideNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) + public function hideNestedFieldWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) { - $request = $this->hideNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->hideNestedFieldRequest($schema, $parent_id, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -3027,7 +2997,6 @@ public function hideNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, stri * * Hide a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to hide. (required) @@ -3036,9 +3005,9 @@ public function hideNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, stri * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function hideNestedFieldAsync($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) + public function hideNestedFieldAsync($schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) { - return $this->hideNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, $contentType) + return $this->hideNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -3051,7 +3020,6 @@ function ($response) { * * Hide a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to hide. (required) @@ -3060,10 +3028,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function hideNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) + public function hideNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->hideNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->hideNestedFieldRequest($schema, $parent_id, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3104,7 +3072,6 @@ function ($exception) { /** * Create request for operation 'hideNestedField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to hide. (required) @@ -3113,10 +3080,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function hideNestedFieldRequest($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) + public function hideNestedFieldRequest($schema, $parent_id, $id, string $contentType = self::contentTypes['hideNestedField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3246,7 +3214,6 @@ public function hideNestedFieldRequest($app, $schema, $parent_id, $id, string $c * * Lock a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to lock. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['lockField'] to see the possible values for this operation @@ -3255,9 +3222,9 @@ public function hideNestedFieldRequest($app, $schema, $parent_id, $id, string $c * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function lockField($app, $schema, $id, string $contentType = self::contentTypes['lockField'][0]) + public function lockField($schema, $id, string $contentType = self::contentTypes['lockField'][0]) { - list($response) = $this->lockFieldWithHttpInfo($app, $schema, $id, $contentType); + list($response) = $this->lockFieldWithHttpInfo($schema, $id, $contentType); return $response; } @@ -3266,7 +3233,6 @@ public function lockField($app, $schema, $id, string $contentType = self::conten * * Lock a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to lock. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['lockField'] to see the possible values for this operation @@ -3275,9 +3241,9 @@ public function lockField($app, $schema, $id, string $contentType = self::conten * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function lockFieldWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['lockField'][0]) + public function lockFieldWithHttpInfo($schema, $id, string $contentType = self::contentTypes['lockField'][0]) { - $request = $this->lockFieldRequest($app, $schema, $id, $contentType); + $request = $this->lockFieldRequest($schema, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -3414,7 +3380,6 @@ public function lockFieldWithHttpInfo($app, $schema, $id, string $contentType = * * Lock a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to lock. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['lockField'] to see the possible values for this operation @@ -3422,9 +3387,9 @@ public function lockFieldWithHttpInfo($app, $schema, $id, string $contentType = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function lockFieldAsync($app, $schema, $id, string $contentType = self::contentTypes['lockField'][0]) + public function lockFieldAsync($schema, $id, string $contentType = self::contentTypes['lockField'][0]) { - return $this->lockFieldAsyncWithHttpInfo($app, $schema, $id, $contentType) + return $this->lockFieldAsyncWithHttpInfo($schema, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -3437,7 +3402,6 @@ function ($response) { * * Lock a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to lock. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['lockField'] to see the possible values for this operation @@ -3445,10 +3409,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function lockFieldAsyncWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['lockField'][0]) + public function lockFieldAsyncWithHttpInfo($schema, $id, string $contentType = self::contentTypes['lockField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->lockFieldRequest($app, $schema, $id, $contentType); + $request = $this->lockFieldRequest($schema, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3489,7 +3453,6 @@ function ($exception) { /** * Create request for operation 'lockField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to lock. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['lockField'] to see the possible values for this operation @@ -3497,10 +3460,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function lockFieldRequest($app, $schema, $id, string $contentType = self::contentTypes['lockField'][0]) + public function lockFieldRequest($schema, $id, string $contentType = self::contentTypes['lockField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -3615,7 +3579,6 @@ public function lockFieldRequest($app, $schema, $id, string $contentType = self: * * Lock a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to lock. (required) @@ -3625,9 +3588,9 @@ public function lockFieldRequest($app, $schema, $id, string $contentType = self: * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function lockNestedField($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) + public function lockNestedField($schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) { - list($response) = $this->lockNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $contentType); + list($response) = $this->lockNestedFieldWithHttpInfo($schema, $parent_id, $id, $contentType); return $response; } @@ -3636,7 +3599,6 @@ public function lockNestedField($app, $schema, $parent_id, $id, string $contentT * * Lock a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to lock. (required) @@ -3646,9 +3608,9 @@ public function lockNestedField($app, $schema, $parent_id, $id, string $contentT * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function lockNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) + public function lockNestedFieldWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) { - $request = $this->lockNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->lockNestedFieldRequest($schema, $parent_id, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -3785,7 +3747,6 @@ public function lockNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, stri * * Lock a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to lock. (required) @@ -3794,9 +3755,9 @@ public function lockNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, stri * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function lockNestedFieldAsync($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) + public function lockNestedFieldAsync($schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) { - return $this->lockNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, $contentType) + return $this->lockNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -3809,7 +3770,6 @@ function ($response) { * * Lock a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to lock. (required) @@ -3818,10 +3778,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function lockNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) + public function lockNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->lockNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->lockNestedFieldRequest($schema, $parent_id, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3862,7 +3822,6 @@ function ($exception) { /** * Create request for operation 'lockNestedField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to lock. (required) @@ -3871,10 +3830,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function lockNestedFieldRequest($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) + public function lockNestedFieldRequest($schema, $parent_id, $id, string $contentType = self::contentTypes['lockNestedField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4004,7 +3964,6 @@ public function lockNestedFieldRequest($app, $schema, $parent_id, $id, string $c * * Add a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postField'] to see the possible values for this operation @@ -4013,9 +3972,9 @@ public function lockNestedFieldRequest($app, $schema, $parent_id, $id, string $c * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postField($app, $schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) + public function postField($schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) { - list($response) = $this->postFieldWithHttpInfo($app, $schema, $add_field_dto, $contentType); + list($response) = $this->postFieldWithHttpInfo($schema, $add_field_dto, $contentType); return $response; } @@ -4024,7 +3983,6 @@ public function postField($app, $schema, $add_field_dto, string $contentType = s * * Add a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postField'] to see the possible values for this operation @@ -4033,9 +3991,9 @@ public function postField($app, $schema, $add_field_dto, string $contentType = s * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postFieldWithHttpInfo($app, $schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) + public function postFieldWithHttpInfo($schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) { - $request = $this->postFieldRequest($app, $schema, $add_field_dto, $contentType); + $request = $this->postFieldRequest($schema, $add_field_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -4195,7 +4153,6 @@ public function postFieldWithHttpInfo($app, $schema, $add_field_dto, string $con * * Add a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postField'] to see the possible values for this operation @@ -4203,9 +4160,9 @@ public function postFieldWithHttpInfo($app, $schema, $add_field_dto, string $con * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postFieldAsync($app, $schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) + public function postFieldAsync($schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) { - return $this->postFieldAsyncWithHttpInfo($app, $schema, $add_field_dto, $contentType) + return $this->postFieldAsyncWithHttpInfo($schema, $add_field_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -4218,7 +4175,6 @@ function ($response) { * * Add a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postField'] to see the possible values for this operation @@ -4226,10 +4182,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postFieldAsyncWithHttpInfo($app, $schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) + public function postFieldAsyncWithHttpInfo($schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->postFieldRequest($app, $schema, $add_field_dto, $contentType); + $request = $this->postFieldRequest($schema, $add_field_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4270,7 +4226,6 @@ function ($exception) { /** * Create request for operation 'postField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postField'] to see the possible values for this operation @@ -4278,10 +4233,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postFieldRequest($app, $schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) + public function postFieldRequest($schema, $add_field_dto, string $contentType = self::contentTypes['postField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4395,7 +4351,6 @@ public function postFieldRequest($app, $schema, $add_field_dto, string $contentT * * Add a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) @@ -4405,9 +4360,9 @@ public function postFieldRequest($app, $schema, $add_field_dto, string $contentT * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postNestedField($app, $schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) + public function postNestedField($schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) { - list($response) = $this->postNestedFieldWithHttpInfo($app, $schema, $parent_id, $add_field_dto, $contentType); + list($response) = $this->postNestedFieldWithHttpInfo($schema, $parent_id, $add_field_dto, $contentType); return $response; } @@ -4416,7 +4371,6 @@ public function postNestedField($app, $schema, $parent_id, $add_field_dto, strin * * Add a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) @@ -4426,9 +4380,9 @@ public function postNestedField($app, $schema, $parent_id, $add_field_dto, strin * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postNestedFieldWithHttpInfo($app, $schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) + public function postNestedFieldWithHttpInfo($schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) { - $request = $this->postNestedFieldRequest($app, $schema, $parent_id, $add_field_dto, $contentType); + $request = $this->postNestedFieldRequest($schema, $parent_id, $add_field_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -4588,7 +4542,6 @@ public function postNestedFieldWithHttpInfo($app, $schema, $parent_id, $add_fiel * * Add a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) @@ -4597,9 +4550,9 @@ public function postNestedFieldWithHttpInfo($app, $schema, $parent_id, $add_fiel * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postNestedFieldAsync($app, $schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) + public function postNestedFieldAsync($schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) { - return $this->postNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $add_field_dto, $contentType) + return $this->postNestedFieldAsyncWithHttpInfo($schema, $parent_id, $add_field_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -4612,7 +4565,6 @@ function ($response) { * * Add a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) @@ -4621,10 +4573,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) + public function postNestedFieldAsyncWithHttpInfo($schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->postNestedFieldRequest($app, $schema, $parent_id, $add_field_dto, $contentType); + $request = $this->postNestedFieldRequest($schema, $parent_id, $add_field_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4665,7 +4617,6 @@ function ($exception) { /** * Create request for operation 'postNestedField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\AddFieldDto $add_field_dto The field object that needs to be added to the schema. (required) @@ -4674,10 +4625,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postNestedFieldRequest($app, $schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) + public function postNestedFieldRequest($schema, $parent_id, $add_field_dto, string $contentType = self::contentTypes['postNestedField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -4806,7 +4758,6 @@ public function postNestedFieldRequest($app, $schema, $parent_id, $add_field_dto * * Update a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to update. (required) * @param \Squidex\Client\Model\UpdateFieldDto $update_field_dto The field object that needs to be added to the schema. (required) @@ -4816,9 +4767,9 @@ public function postNestedFieldRequest($app, $schema, $parent_id, $add_field_dto * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putField($app, $schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) + public function putField($schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) { - list($response) = $this->putFieldWithHttpInfo($app, $schema, $id, $update_field_dto, $contentType); + list($response) = $this->putFieldWithHttpInfo($schema, $id, $update_field_dto, $contentType); return $response; } @@ -4827,7 +4778,6 @@ public function putField($app, $schema, $id, $update_field_dto, string $contentT * * Update a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to update. (required) * @param \Squidex\Client\Model\UpdateFieldDto $update_field_dto The field object that needs to be added to the schema. (required) @@ -4837,9 +4787,9 @@ public function putField($app, $schema, $id, $update_field_dto, string $contentT * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putFieldWithHttpInfo($app, $schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) + public function putFieldWithHttpInfo($schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) { - $request = $this->putFieldRequest($app, $schema, $id, $update_field_dto, $contentType); + $request = $this->putFieldRequest($schema, $id, $update_field_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -4976,7 +4926,6 @@ public function putFieldWithHttpInfo($app, $schema, $id, $update_field_dto, stri * * Update a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to update. (required) * @param \Squidex\Client\Model\UpdateFieldDto $update_field_dto The field object that needs to be added to the schema. (required) @@ -4985,9 +4934,9 @@ public function putFieldWithHttpInfo($app, $schema, $id, $update_field_dto, stri * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putFieldAsync($app, $schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) + public function putFieldAsync($schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) { - return $this->putFieldAsyncWithHttpInfo($app, $schema, $id, $update_field_dto, $contentType) + return $this->putFieldAsyncWithHttpInfo($schema, $id, $update_field_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -5000,7 +4949,6 @@ function ($response) { * * Update a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to update. (required) * @param \Squidex\Client\Model\UpdateFieldDto $update_field_dto The field object that needs to be added to the schema. (required) @@ -5009,10 +4957,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putFieldAsyncWithHttpInfo($app, $schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) + public function putFieldAsyncWithHttpInfo($schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putFieldRequest($app, $schema, $id, $update_field_dto, $contentType); + $request = $this->putFieldRequest($schema, $id, $update_field_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5053,7 +5001,6 @@ function ($exception) { /** * Create request for operation 'putField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to update. (required) * @param \Squidex\Client\Model\UpdateFieldDto $update_field_dto The field object that needs to be added to the schema. (required) @@ -5062,10 +5009,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putFieldRequest($app, $schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) + public function putFieldRequest($schema, $id, $update_field_dto, string $contentType = self::contentTypes['putField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5194,7 +5142,6 @@ public function putFieldRequest($app, $schema, $id, $update_field_dto, string $c * * Update a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to update. (required) @@ -5205,9 +5152,9 @@ public function putFieldRequest($app, $schema, $id, $update_field_dto, string $c * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putNestedField($app, $schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) + public function putNestedField($schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) { - list($response) = $this->putNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $update_field_dto, $contentType); + list($response) = $this->putNestedFieldWithHttpInfo($schema, $parent_id, $id, $update_field_dto, $contentType); return $response; } @@ -5216,7 +5163,6 @@ public function putNestedField($app, $schema, $parent_id, $id, $update_field_dto * * Update a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to update. (required) @@ -5227,9 +5173,9 @@ public function putNestedField($app, $schema, $parent_id, $id, $update_field_dto * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) + public function putNestedFieldWithHttpInfo($schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) { - $request = $this->putNestedFieldRequest($app, $schema, $parent_id, $id, $update_field_dto, $contentType); + $request = $this->putNestedFieldRequest($schema, $parent_id, $id, $update_field_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -5366,7 +5312,6 @@ public function putNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $upda * * Update a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to update. (required) @@ -5376,9 +5321,9 @@ public function putNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $upda * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putNestedFieldAsync($app, $schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) + public function putNestedFieldAsync($schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) { - return $this->putNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, $update_field_dto, $contentType) + return $this->putNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, $update_field_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -5391,7 +5336,6 @@ function ($response) { * * Update a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to update. (required) @@ -5401,10 +5345,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) + public function putNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putNestedFieldRequest($app, $schema, $parent_id, $id, $update_field_dto, $contentType); + $request = $this->putNestedFieldRequest($schema, $parent_id, $id, $update_field_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5445,7 +5389,6 @@ function ($exception) { /** * Create request for operation 'putNestedField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to update. (required) @@ -5455,10 +5398,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putNestedFieldRequest($app, $schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) + public function putNestedFieldRequest($schema, $parent_id, $id, $update_field_dto, string $contentType = self::contentTypes['putNestedField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5602,7 +5546,6 @@ public function putNestedFieldRequest($app, $schema, $parent_id, $id, $update_fi * * Reorder all nested fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) @@ -5612,9 +5555,9 @@ public function putNestedFieldRequest($app, $schema, $parent_id, $id, $update_fi * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putNestedFieldOrdering($app, $schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) + public function putNestedFieldOrdering($schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) { - list($response) = $this->putNestedFieldOrderingWithHttpInfo($app, $schema, $parent_id, $reorder_fields_dto, $contentType); + list($response) = $this->putNestedFieldOrderingWithHttpInfo($schema, $parent_id, $reorder_fields_dto, $contentType); return $response; } @@ -5623,7 +5566,6 @@ public function putNestedFieldOrdering($app, $schema, $parent_id, $reorder_field * * Reorder all nested fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) @@ -5633,9 +5575,9 @@ public function putNestedFieldOrdering($app, $schema, $parent_id, $reorder_field * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putNestedFieldOrderingWithHttpInfo($app, $schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) + public function putNestedFieldOrderingWithHttpInfo($schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) { - $request = $this->putNestedFieldOrderingRequest($app, $schema, $parent_id, $reorder_fields_dto, $contentType); + $request = $this->putNestedFieldOrderingRequest($schema, $parent_id, $reorder_fields_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -5772,7 +5714,6 @@ public function putNestedFieldOrderingWithHttpInfo($app, $schema, $parent_id, $r * * Reorder all nested fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) @@ -5781,9 +5722,9 @@ public function putNestedFieldOrderingWithHttpInfo($app, $schema, $parent_id, $r * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putNestedFieldOrderingAsync($app, $schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) + public function putNestedFieldOrderingAsync($schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) { - return $this->putNestedFieldOrderingAsyncWithHttpInfo($app, $schema, $parent_id, $reorder_fields_dto, $contentType) + return $this->putNestedFieldOrderingAsyncWithHttpInfo($schema, $parent_id, $reorder_fields_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -5796,7 +5737,6 @@ function ($response) { * * Reorder all nested fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) @@ -5805,10 +5745,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putNestedFieldOrderingAsyncWithHttpInfo($app, $schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) + public function putNestedFieldOrderingAsyncWithHttpInfo($schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putNestedFieldOrderingRequest($app, $schema, $parent_id, $reorder_fields_dto, $contentType); + $request = $this->putNestedFieldOrderingRequest($schema, $parent_id, $reorder_fields_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5849,7 +5789,6 @@ function ($exception) { /** * Create request for operation 'putNestedFieldOrdering' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) @@ -5858,10 +5797,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putNestedFieldOrderingRequest($app, $schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) + public function putNestedFieldOrderingRequest($schema, $parent_id, $reorder_fields_dto, string $contentType = self::contentTypes['putNestedFieldOrdering'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -5990,7 +5930,6 @@ public function putNestedFieldOrderingRequest($app, $schema, $parent_id, $reorde * * Reorder all fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaFieldOrdering'] to see the possible values for this operation @@ -5999,9 +5938,9 @@ public function putNestedFieldOrderingRequest($app, $schema, $parent_id, $reorde * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putSchemaFieldOrdering($app, $schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) + public function putSchemaFieldOrdering($schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) { - list($response) = $this->putSchemaFieldOrderingWithHttpInfo($app, $schema, $reorder_fields_dto, $contentType); + list($response) = $this->putSchemaFieldOrderingWithHttpInfo($schema, $reorder_fields_dto, $contentType); return $response; } @@ -6010,7 +5949,6 @@ public function putSchemaFieldOrdering($app, $schema, $reorder_fields_dto, strin * * Reorder all fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaFieldOrdering'] to see the possible values for this operation @@ -6019,9 +5957,9 @@ public function putSchemaFieldOrdering($app, $schema, $reorder_fields_dto, strin * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putSchemaFieldOrderingWithHttpInfo($app, $schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) + public function putSchemaFieldOrderingWithHttpInfo($schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) { - $request = $this->putSchemaFieldOrderingRequest($app, $schema, $reorder_fields_dto, $contentType); + $request = $this->putSchemaFieldOrderingRequest($schema, $reorder_fields_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -6158,7 +6096,6 @@ public function putSchemaFieldOrderingWithHttpInfo($app, $schema, $reorder_field * * Reorder all fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaFieldOrdering'] to see the possible values for this operation @@ -6166,9 +6103,9 @@ public function putSchemaFieldOrderingWithHttpInfo($app, $schema, $reorder_field * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSchemaFieldOrderingAsync($app, $schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) + public function putSchemaFieldOrderingAsync($schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) { - return $this->putSchemaFieldOrderingAsyncWithHttpInfo($app, $schema, $reorder_fields_dto, $contentType) + return $this->putSchemaFieldOrderingAsyncWithHttpInfo($schema, $reorder_fields_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -6181,7 +6118,6 @@ function ($response) { * * Reorder all fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaFieldOrdering'] to see the possible values for this operation @@ -6189,10 +6125,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSchemaFieldOrderingAsyncWithHttpInfo($app, $schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) + public function putSchemaFieldOrderingAsyncWithHttpInfo($schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putSchemaFieldOrderingRequest($app, $schema, $reorder_fields_dto, $contentType); + $request = $this->putSchemaFieldOrderingRequest($schema, $reorder_fields_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6233,7 +6169,6 @@ function ($exception) { /** * Create request for operation 'putSchemaFieldOrdering' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ReorderFieldsDto $reorder_fields_dto The request that contains the field ids. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaFieldOrdering'] to see the possible values for this operation @@ -6241,10 +6176,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putSchemaFieldOrderingRequest($app, $schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) + public function putSchemaFieldOrderingRequest($schema, $reorder_fields_dto, string $contentType = self::contentTypes['putSchemaFieldOrdering'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6358,7 +6294,6 @@ public function putSchemaFieldOrderingRequest($app, $schema, $reorder_fields_dto * * Configure UI fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureUIFieldsDto $configure_ui_fields_dto The request that contains the field names. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaUIFields'] to see the possible values for this operation @@ -6367,9 +6302,9 @@ public function putSchemaFieldOrderingRequest($app, $schema, $reorder_fields_dto * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putSchemaUIFields($app, $schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) + public function putSchemaUIFields($schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) { - list($response) = $this->putSchemaUIFieldsWithHttpInfo($app, $schema, $configure_ui_fields_dto, $contentType); + list($response) = $this->putSchemaUIFieldsWithHttpInfo($schema, $configure_ui_fields_dto, $contentType); return $response; } @@ -6378,7 +6313,6 @@ public function putSchemaUIFields($app, $schema, $configure_ui_fields_dto, strin * * Configure UI fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureUIFieldsDto $configure_ui_fields_dto The request that contains the field names. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaUIFields'] to see the possible values for this operation @@ -6387,9 +6321,9 @@ public function putSchemaUIFields($app, $schema, $configure_ui_fields_dto, strin * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putSchemaUIFieldsWithHttpInfo($app, $schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) + public function putSchemaUIFieldsWithHttpInfo($schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) { - $request = $this->putSchemaUIFieldsRequest($app, $schema, $configure_ui_fields_dto, $contentType); + $request = $this->putSchemaUIFieldsRequest($schema, $configure_ui_fields_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -6526,7 +6460,6 @@ public function putSchemaUIFieldsWithHttpInfo($app, $schema, $configure_ui_field * * Configure UI fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureUIFieldsDto $configure_ui_fields_dto The request that contains the field names. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaUIFields'] to see the possible values for this operation @@ -6534,9 +6467,9 @@ public function putSchemaUIFieldsWithHttpInfo($app, $schema, $configure_ui_field * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSchemaUIFieldsAsync($app, $schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) + public function putSchemaUIFieldsAsync($schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) { - return $this->putSchemaUIFieldsAsyncWithHttpInfo($app, $schema, $configure_ui_fields_dto, $contentType) + return $this->putSchemaUIFieldsAsyncWithHttpInfo($schema, $configure_ui_fields_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -6549,7 +6482,6 @@ function ($response) { * * Configure UI fields. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureUIFieldsDto $configure_ui_fields_dto The request that contains the field names. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaUIFields'] to see the possible values for this operation @@ -6557,10 +6489,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSchemaUIFieldsAsyncWithHttpInfo($app, $schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) + public function putSchemaUIFieldsAsyncWithHttpInfo($schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putSchemaUIFieldsRequest($app, $schema, $configure_ui_fields_dto, $contentType); + $request = $this->putSchemaUIFieldsRequest($schema, $configure_ui_fields_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6601,7 +6533,6 @@ function ($exception) { /** * Create request for operation 'putSchemaUIFields' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureUIFieldsDto $configure_ui_fields_dto The request that contains the field names. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaUIFields'] to see the possible values for this operation @@ -6609,10 +6540,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putSchemaUIFieldsRequest($app, $schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) + public function putSchemaUIFieldsRequest($schema, $configure_ui_fields_dto, string $contentType = self::contentTypes['putSchemaUIFields'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -6726,7 +6658,6 @@ public function putSchemaUIFieldsRequest($app, $schema, $configure_ui_fields_dto * * Show a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to show. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['showField'] to see the possible values for this operation @@ -6735,9 +6666,9 @@ public function putSchemaUIFieldsRequest($app, $schema, $configure_ui_fields_dto * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function showField($app, $schema, $id, string $contentType = self::contentTypes['showField'][0]) + public function showField($schema, $id, string $contentType = self::contentTypes['showField'][0]) { - list($response) = $this->showFieldWithHttpInfo($app, $schema, $id, $contentType); + list($response) = $this->showFieldWithHttpInfo($schema, $id, $contentType); return $response; } @@ -6746,7 +6677,6 @@ public function showField($app, $schema, $id, string $contentType = self::conten * * Show a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to show. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['showField'] to see the possible values for this operation @@ -6755,9 +6685,9 @@ public function showField($app, $schema, $id, string $contentType = self::conten * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function showFieldWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['showField'][0]) + public function showFieldWithHttpInfo($schema, $id, string $contentType = self::contentTypes['showField'][0]) { - $request = $this->showFieldRequest($app, $schema, $id, $contentType); + $request = $this->showFieldRequest($schema, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -6894,7 +6824,6 @@ public function showFieldWithHttpInfo($app, $schema, $id, string $contentType = * * Show a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to show. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['showField'] to see the possible values for this operation @@ -6902,9 +6831,9 @@ public function showFieldWithHttpInfo($app, $schema, $id, string $contentType = * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function showFieldAsync($app, $schema, $id, string $contentType = self::contentTypes['showField'][0]) + public function showFieldAsync($schema, $id, string $contentType = self::contentTypes['showField'][0]) { - return $this->showFieldAsyncWithHttpInfo($app, $schema, $id, $contentType) + return $this->showFieldAsyncWithHttpInfo($schema, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -6917,7 +6846,6 @@ function ($response) { * * Show a schema field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to show. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['showField'] to see the possible values for this operation @@ -6925,10 +6853,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function showFieldAsyncWithHttpInfo($app, $schema, $id, string $contentType = self::contentTypes['showField'][0]) + public function showFieldAsyncWithHttpInfo($schema, $id, string $contentType = self::contentTypes['showField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->showFieldRequest($app, $schema, $id, $contentType); + $request = $this->showFieldRequest($schema, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6969,7 +6897,6 @@ function ($exception) { /** * Create request for operation 'showField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $id The ID of the field to show. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['showField'] to see the possible values for this operation @@ -6977,10 +6904,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function showFieldRequest($app, $schema, $id, string $contentType = self::contentTypes['showField'][0]) + public function showFieldRequest($schema, $id, string $contentType = self::contentTypes['showField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -7095,7 +7023,6 @@ public function showFieldRequest($app, $schema, $id, string $contentType = self: * * Show a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to show. (required) @@ -7105,9 +7032,9 @@ public function showFieldRequest($app, $schema, $id, string $contentType = self: * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function showNestedField($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) + public function showNestedField($schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) { - list($response) = $this->showNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, $contentType); + list($response) = $this->showNestedFieldWithHttpInfo($schema, $parent_id, $id, $contentType); return $response; } @@ -7116,7 +7043,6 @@ public function showNestedField($app, $schema, $parent_id, $id, string $contentT * * Show a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to show. (required) @@ -7126,9 +7052,9 @@ public function showNestedField($app, $schema, $parent_id, $id, string $contentT * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function showNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) + public function showNestedFieldWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) { - $request = $this->showNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->showNestedFieldRequest($schema, $parent_id, $id, $contentType); try { $options = $this->createHttpClientOption(); @@ -7265,7 +7191,6 @@ public function showNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, stri * * Show a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to show. (required) @@ -7274,9 +7199,9 @@ public function showNestedFieldWithHttpInfo($app, $schema, $parent_id, $id, stri * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function showNestedFieldAsync($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) + public function showNestedFieldAsync($schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) { - return $this->showNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, $contentType) + return $this->showNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, $contentType) ->then( function ($response) { return $response[0]; @@ -7289,7 +7214,6 @@ function ($response) { * * Show a nested field. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to show. (required) @@ -7298,10 +7222,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function showNestedFieldAsyncWithHttpInfo($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) + public function showNestedFieldAsyncWithHttpInfo($schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->showNestedFieldRequest($app, $schema, $parent_id, $id, $contentType); + $request = $this->showNestedFieldRequest($schema, $parent_id, $id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7342,7 +7266,6 @@ function ($exception) { /** * Create request for operation 'showNestedField' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param int $parent_id The parent field id. (required) * @param int $id The ID of the field to show. (required) @@ -7351,10 +7274,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function showNestedFieldRequest($app, $schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) + public function showNestedFieldRequest($schema, $parent_id, $id, string $contentType = self::contentTypes['showNestedField'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -7484,7 +7408,6 @@ public function showNestedFieldRequest($app, $schema, $parent_id, $id, string $c * * Delete a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSchema'] to see the possible values for this operation * @@ -7492,9 +7415,9 @@ public function showNestedFieldRequest($app, $schema, $parent_id, $id, string $c * @throws \InvalidArgumentException * @return void */ - public function deleteSchema($app, $schema, string $contentType = self::contentTypes['deleteSchema'][0]) + public function deleteSchema($schema, string $contentType = self::contentTypes['deleteSchema'][0]) { - $this->deleteSchemaWithHttpInfo($app, $schema, $contentType); + $this->deleteSchemaWithHttpInfo($schema, $contentType); } /** @@ -7502,7 +7425,6 @@ public function deleteSchema($app, $schema, string $contentType = self::contentT * * Delete a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSchema'] to see the possible values for this operation * @@ -7510,9 +7432,9 @@ public function deleteSchema($app, $schema, string $contentType = self::contentT * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteSchemaWithHttpInfo($app, $schema, string $contentType = self::contentTypes['deleteSchema'][0]) + public function deleteSchemaWithHttpInfo($schema, string $contentType = self::contentTypes['deleteSchema'][0]) { - $request = $this->deleteSchemaRequest($app, $schema, $contentType); + $request = $this->deleteSchemaRequest($schema, $contentType); try { $options = $this->createHttpClientOption(); @@ -7579,16 +7501,15 @@ public function deleteSchemaWithHttpInfo($app, $schema, string $contentType = se * * Delete a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSchemaAsync($app, $schema, string $contentType = self::contentTypes['deleteSchema'][0]) + public function deleteSchemaAsync($schema, string $contentType = self::contentTypes['deleteSchema'][0]) { - return $this->deleteSchemaAsyncWithHttpInfo($app, $schema, $contentType) + return $this->deleteSchemaAsyncWithHttpInfo($schema, $contentType) ->then( function ($response) { return $response[0]; @@ -7601,17 +7522,16 @@ function ($response) { * * Delete a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteSchemaAsyncWithHttpInfo($app, $schema, string $contentType = self::contentTypes['deleteSchema'][0]) + public function deleteSchemaAsyncWithHttpInfo($schema, string $contentType = self::contentTypes['deleteSchema'][0]) { $returnType = ''; - $request = $this->deleteSchemaRequest($app, $schema, $contentType); + $request = $this->deleteSchemaRequest($schema, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7639,17 +7559,17 @@ function ($exception) { /** * Create request for operation 'deleteSchema' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to delete. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteSchemaRequest($app, $schema, string $contentType = self::contentTypes['deleteSchema'][0]) + public function deleteSchemaRequest($schema, string $contentType = self::contentTypes['deleteSchema'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -7749,7 +7669,6 @@ public function deleteSchemaRequest($app, $schema, string $contentType = self::c * * Get a schema by name. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchema'] to see the possible values for this operation * @@ -7757,9 +7676,9 @@ public function deleteSchemaRequest($app, $schema, string $contentType = self::c * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto */ - public function getSchema($app, $schema, string $contentType = self::contentTypes['getSchema'][0]) + public function getSchema($schema, string $contentType = self::contentTypes['getSchema'][0]) { - list($response) = $this->getSchemaWithHttpInfo($app, $schema, $contentType); + list($response) = $this->getSchemaWithHttpInfo($schema, $contentType); return $response; } @@ -7768,7 +7687,6 @@ public function getSchema($app, $schema, string $contentType = self::contentType * * Get a schema by name. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchema'] to see the possible values for this operation * @@ -7776,9 +7694,9 @@ public function getSchema($app, $schema, string $contentType = self::contentType * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getSchemaWithHttpInfo($app, $schema, string $contentType = self::contentTypes['getSchema'][0]) + public function getSchemaWithHttpInfo($schema, string $contentType = self::contentTypes['getSchema'][0]) { - $request = $this->getSchemaRequest($app, $schema, $contentType); + $request = $this->getSchemaRequest($schema, $contentType); try { $options = $this->createHttpClientOption(); @@ -7892,16 +7810,15 @@ public function getSchemaWithHttpInfo($app, $schema, string $contentType = self: * * Get a schema by name. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSchemaAsync($app, $schema, string $contentType = self::contentTypes['getSchema'][0]) + public function getSchemaAsync($schema, string $contentType = self::contentTypes['getSchema'][0]) { - return $this->getSchemaAsyncWithHttpInfo($app, $schema, $contentType) + return $this->getSchemaAsyncWithHttpInfo($schema, $contentType) ->then( function ($response) { return $response[0]; @@ -7914,17 +7831,16 @@ function ($response) { * * Get a schema by name. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSchemaAsyncWithHttpInfo($app, $schema, string $contentType = self::contentTypes['getSchema'][0]) + public function getSchemaAsyncWithHttpInfo($schema, string $contentType = self::contentTypes['getSchema'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->getSchemaRequest($app, $schema, $contentType); + $request = $this->getSchemaRequest($schema, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7965,17 +7881,17 @@ function ($exception) { /** * Create request for operation 'getSchema' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to retrieve. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSchemaRequest($app, $schema, string $contentType = self::contentTypes['getSchema'][0]) + public function getSchemaRequest($schema, string $contentType = self::contentTypes['getSchema'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -8075,16 +7991,15 @@ public function getSchemaRequest($app, $schema, string $contentType = self::cont * * Get schemas. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchemas'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemasDto|\Squidex\Client\Model\ErrorDto */ - public function getSchemas($app, string $contentType = self::contentTypes['getSchemas'][0]) + public function getSchemas(string $contentType = self::contentTypes['getSchemas'][0]) { - list($response) = $this->getSchemasWithHttpInfo($app, $contentType); + list($response) = $this->getSchemasWithHttpInfo($contentType); return $response; } @@ -8093,16 +8008,15 @@ public function getSchemas($app, string $contentType = self::contentTypes['getSc * * Get schemas. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchemas'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemasDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getSchemasWithHttpInfo($app, string $contentType = self::contentTypes['getSchemas'][0]) + public function getSchemasWithHttpInfo(string $contentType = self::contentTypes['getSchemas'][0]) { - $request = $this->getSchemasRequest($app, $contentType); + $request = $this->getSchemasRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -8216,15 +8130,14 @@ public function getSchemasWithHttpInfo($app, string $contentType = self::content * * Get schemas. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchemas'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSchemasAsync($app, string $contentType = self::contentTypes['getSchemas'][0]) + public function getSchemasAsync(string $contentType = self::contentTypes['getSchemas'][0]) { - return $this->getSchemasAsyncWithHttpInfo($app, $contentType) + return $this->getSchemasAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -8237,16 +8150,15 @@ function ($response) { * * Get schemas. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchemas'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSchemasAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getSchemas'][0]) + public function getSchemasAsyncWithHttpInfo(string $contentType = self::contentTypes['getSchemas'][0]) { $returnType = '\Squidex\Client\Model\SchemasDto'; - $request = $this->getSchemasRequest($app, $contentType); + $request = $this->getSchemasRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8287,16 +8199,16 @@ function ($exception) { /** * Create request for operation 'getSchemas' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSchemas'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSchemasRequest($app, string $contentType = self::contentTypes['getSchemas'][0]) + public function getSchemasRequest(string $contentType = self::contentTypes['getSchemas'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -8381,7 +8293,6 @@ public function getSchemasRequest($app, string $contentType = self::contentTypes * * Create a new schema. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateSchemaDto $create_schema_dto The schema object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSchema'] to see the possible values for this operation * @@ -8389,9 +8300,9 @@ public function getSchemasRequest($app, string $contentType = self::contentTypes * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postSchema($app, $create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) + public function postSchema($create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) { - list($response) = $this->postSchemaWithHttpInfo($app, $create_schema_dto, $contentType); + list($response) = $this->postSchemaWithHttpInfo($create_schema_dto, $contentType); return $response; } @@ -8400,7 +8311,6 @@ public function postSchema($app, $create_schema_dto, string $contentType = self: * * Create a new schema. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateSchemaDto $create_schema_dto The schema object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSchema'] to see the possible values for this operation * @@ -8408,9 +8318,9 @@ public function postSchema($app, $create_schema_dto, string $contentType = self: * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postSchemaWithHttpInfo($app, $create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) + public function postSchemaWithHttpInfo($create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) { - $request = $this->postSchemaRequest($app, $create_schema_dto, $contentType); + $request = $this->postSchemaRequest($create_schema_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -8570,16 +8480,15 @@ public function postSchemaWithHttpInfo($app, $create_schema_dto, string $content * * Create a new schema. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateSchemaDto $create_schema_dto The schema object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSchemaAsync($app, $create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) + public function postSchemaAsync($create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) { - return $this->postSchemaAsyncWithHttpInfo($app, $create_schema_dto, $contentType) + return $this->postSchemaAsyncWithHttpInfo($create_schema_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -8592,17 +8501,16 @@ function ($response) { * * Create a new schema. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateSchemaDto $create_schema_dto The schema object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postSchemaAsyncWithHttpInfo($app, $create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) + public function postSchemaAsyncWithHttpInfo($create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->postSchemaRequest($app, $create_schema_dto, $contentType); + $request = $this->postSchemaRequest($create_schema_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8643,17 +8551,17 @@ function ($exception) { /** * Create request for operation 'postSchema' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\CreateSchemaDto $create_schema_dto The schema object that needs to be added to the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postSchemaRequest($app, $create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) + public function postSchemaRequest($create_schema_dto, string $contentType = self::contentTypes['postSchema'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -8752,7 +8660,6 @@ public function postSchemaRequest($app, $create_schema_dto, string $contentType * * Publish a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to publish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishSchema'] to see the possible values for this operation * @@ -8760,9 +8667,9 @@ public function postSchemaRequest($app, $create_schema_dto, string $contentType * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function publishSchema($app, $schema, string $contentType = self::contentTypes['publishSchema'][0]) + public function publishSchema($schema, string $contentType = self::contentTypes['publishSchema'][0]) { - list($response) = $this->publishSchemaWithHttpInfo($app, $schema, $contentType); + list($response) = $this->publishSchemaWithHttpInfo($schema, $contentType); return $response; } @@ -8771,7 +8678,6 @@ public function publishSchema($app, $schema, string $contentType = self::content * * Publish a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to publish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishSchema'] to see the possible values for this operation * @@ -8779,9 +8685,9 @@ public function publishSchema($app, $schema, string $contentType = self::content * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function publishSchemaWithHttpInfo($app, $schema, string $contentType = self::contentTypes['publishSchema'][0]) + public function publishSchemaWithHttpInfo($schema, string $contentType = self::contentTypes['publishSchema'][0]) { - $request = $this->publishSchemaRequest($app, $schema, $contentType); + $request = $this->publishSchemaRequest($schema, $contentType); try { $options = $this->createHttpClientOption(); @@ -8918,16 +8824,15 @@ public function publishSchemaWithHttpInfo($app, $schema, string $contentType = s * * Publish a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to publish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function publishSchemaAsync($app, $schema, string $contentType = self::contentTypes['publishSchema'][0]) + public function publishSchemaAsync($schema, string $contentType = self::contentTypes['publishSchema'][0]) { - return $this->publishSchemaAsyncWithHttpInfo($app, $schema, $contentType) + return $this->publishSchemaAsyncWithHttpInfo($schema, $contentType) ->then( function ($response) { return $response[0]; @@ -8940,17 +8845,16 @@ function ($response) { * * Publish a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to publish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function publishSchemaAsyncWithHttpInfo($app, $schema, string $contentType = self::contentTypes['publishSchema'][0]) + public function publishSchemaAsyncWithHttpInfo($schema, string $contentType = self::contentTypes['publishSchema'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->publishSchemaRequest($app, $schema, $contentType); + $request = $this->publishSchemaRequest($schema, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8991,17 +8895,17 @@ function ($exception) { /** * Create request for operation 'publishSchema' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to publish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['publishSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function publishSchemaRequest($app, $schema, string $contentType = self::contentTypes['publishSchema'][0]) + public function publishSchemaRequest($schema, string $contentType = self::contentTypes['publishSchema'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -9101,7 +9005,6 @@ public function publishSchemaRequest($app, $schema, string $contentType = self:: * * Update a schema category. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ChangeCategoryDto $change_category_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCategory'] to see the possible values for this operation @@ -9110,9 +9013,9 @@ public function publishSchemaRequest($app, $schema, string $contentType = self:: * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putCategory($app, $schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) + public function putCategory($schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) { - list($response) = $this->putCategoryWithHttpInfo($app, $schema, $change_category_dto, $contentType); + list($response) = $this->putCategoryWithHttpInfo($schema, $change_category_dto, $contentType); return $response; } @@ -9121,7 +9024,6 @@ public function putCategory($app, $schema, $change_category_dto, string $content * * Update a schema category. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ChangeCategoryDto $change_category_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCategory'] to see the possible values for this operation @@ -9130,9 +9032,9 @@ public function putCategory($app, $schema, $change_category_dto, string $content * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putCategoryWithHttpInfo($app, $schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) + public function putCategoryWithHttpInfo($schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) { - $request = $this->putCategoryRequest($app, $schema, $change_category_dto, $contentType); + $request = $this->putCategoryRequest($schema, $change_category_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -9269,7 +9171,6 @@ public function putCategoryWithHttpInfo($app, $schema, $change_category_dto, str * * Update a schema category. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ChangeCategoryDto $change_category_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCategory'] to see the possible values for this operation @@ -9277,9 +9178,9 @@ public function putCategoryWithHttpInfo($app, $schema, $change_category_dto, str * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putCategoryAsync($app, $schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) + public function putCategoryAsync($schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) { - return $this->putCategoryAsyncWithHttpInfo($app, $schema, $change_category_dto, $contentType) + return $this->putCategoryAsyncWithHttpInfo($schema, $change_category_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -9292,7 +9193,6 @@ function ($response) { * * Update a schema category. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ChangeCategoryDto $change_category_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCategory'] to see the possible values for this operation @@ -9300,10 +9200,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putCategoryAsyncWithHttpInfo($app, $schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) + public function putCategoryAsyncWithHttpInfo($schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putCategoryRequest($app, $schema, $change_category_dto, $contentType); + $request = $this->putCategoryRequest($schema, $change_category_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9344,7 +9244,6 @@ function ($exception) { /** * Create request for operation 'putCategory' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ChangeCategoryDto $change_category_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putCategory'] to see the possible values for this operation @@ -9352,10 +9251,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putCategoryRequest($app, $schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) + public function putCategoryRequest($schema, $change_category_dto, string $contentType = self::contentTypes['putCategory'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -9469,7 +9369,6 @@ public function putCategoryRequest($app, $schema, $change_category_dto, string $ * * Update the preview urls. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The preview urls for the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPreviewUrls'] to see the possible values for this operation @@ -9478,9 +9377,9 @@ public function putCategoryRequest($app, $schema, $change_category_dto, string $ * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putPreviewUrls($app, $schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) + public function putPreviewUrls($schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) { - list($response) = $this->putPreviewUrlsWithHttpInfo($app, $schema, $request_body, $contentType); + list($response) = $this->putPreviewUrlsWithHttpInfo($schema, $request_body, $contentType); return $response; } @@ -9489,7 +9388,6 @@ public function putPreviewUrls($app, $schema, $request_body, string $contentType * * Update the preview urls. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The preview urls for the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPreviewUrls'] to see the possible values for this operation @@ -9498,9 +9396,9 @@ public function putPreviewUrls($app, $schema, $request_body, string $contentType * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putPreviewUrlsWithHttpInfo($app, $schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) + public function putPreviewUrlsWithHttpInfo($schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) { - $request = $this->putPreviewUrlsRequest($app, $schema, $request_body, $contentType); + $request = $this->putPreviewUrlsRequest($schema, $request_body, $contentType); try { $options = $this->createHttpClientOption(); @@ -9637,7 +9535,6 @@ public function putPreviewUrlsWithHttpInfo($app, $schema, $request_body, string * * Update the preview urls. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The preview urls for the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPreviewUrls'] to see the possible values for this operation @@ -9645,9 +9542,9 @@ public function putPreviewUrlsWithHttpInfo($app, $schema, $request_body, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putPreviewUrlsAsync($app, $schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) + public function putPreviewUrlsAsync($schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) { - return $this->putPreviewUrlsAsyncWithHttpInfo($app, $schema, $request_body, $contentType) + return $this->putPreviewUrlsAsyncWithHttpInfo($schema, $request_body, $contentType) ->then( function ($response) { return $response[0]; @@ -9660,7 +9557,6 @@ function ($response) { * * Update the preview urls. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The preview urls for the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPreviewUrls'] to see the possible values for this operation @@ -9668,10 +9564,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putPreviewUrlsAsyncWithHttpInfo($app, $schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) + public function putPreviewUrlsAsyncWithHttpInfo($schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putPreviewUrlsRequest($app, $schema, $request_body, $contentType); + $request = $this->putPreviewUrlsRequest($schema, $request_body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9712,7 +9608,6 @@ function ($exception) { /** * Create request for operation 'putPreviewUrls' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param array $request_body The preview urls for the schema. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putPreviewUrls'] to see the possible values for this operation @@ -9720,10 +9615,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putPreviewUrlsRequest($app, $schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) + public function putPreviewUrlsRequest($schema, $request_body, string $contentType = self::contentTypes['putPreviewUrls'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -9837,7 +9733,6 @@ public function putPreviewUrlsRequest($app, $schema, $request_body, string $cont * * Update the rules. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureFieldRulesDto $configure_field_rules_dto The schema rules object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRules'] to see the possible values for this operation @@ -9846,9 +9741,9 @@ public function putPreviewUrlsRequest($app, $schema, $request_body, string $cont * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putRules($app, $schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) + public function putRules($schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) { - list($response) = $this->putRulesWithHttpInfo($app, $schema, $configure_field_rules_dto, $contentType); + list($response) = $this->putRulesWithHttpInfo($schema, $configure_field_rules_dto, $contentType); return $response; } @@ -9857,7 +9752,6 @@ public function putRules($app, $schema, $configure_field_rules_dto, string $cont * * Update the rules. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureFieldRulesDto $configure_field_rules_dto The schema rules object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRules'] to see the possible values for this operation @@ -9866,9 +9760,9 @@ public function putRules($app, $schema, $configure_field_rules_dto, string $cont * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putRulesWithHttpInfo($app, $schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) + public function putRulesWithHttpInfo($schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) { - $request = $this->putRulesRequest($app, $schema, $configure_field_rules_dto, $contentType); + $request = $this->putRulesRequest($schema, $configure_field_rules_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -10005,7 +9899,6 @@ public function putRulesWithHttpInfo($app, $schema, $configure_field_rules_dto, * * Update the rules. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureFieldRulesDto $configure_field_rules_dto The schema rules object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRules'] to see the possible values for this operation @@ -10013,9 +9906,9 @@ public function putRulesWithHttpInfo($app, $schema, $configure_field_rules_dto, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRulesAsync($app, $schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) + public function putRulesAsync($schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) { - return $this->putRulesAsyncWithHttpInfo($app, $schema, $configure_field_rules_dto, $contentType) + return $this->putRulesAsyncWithHttpInfo($schema, $configure_field_rules_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -10028,7 +9921,6 @@ function ($response) { * * Update the rules. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureFieldRulesDto $configure_field_rules_dto The schema rules object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRules'] to see the possible values for this operation @@ -10036,10 +9928,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putRulesAsyncWithHttpInfo($app, $schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) + public function putRulesAsyncWithHttpInfo($schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putRulesRequest($app, $schema, $configure_field_rules_dto, $contentType); + $request = $this->putRulesRequest($schema, $configure_field_rules_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10080,7 +9972,6 @@ function ($exception) { /** * Create request for operation 'putRules' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\ConfigureFieldRulesDto $configure_field_rules_dto The schema rules object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putRules'] to see the possible values for this operation @@ -10088,10 +9979,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putRulesRequest($app, $schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) + public function putRulesRequest($schema, $configure_field_rules_dto, string $contentType = self::contentTypes['putRules'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -10205,7 +10097,6 @@ public function putRulesRequest($app, $schema, $configure_field_rules_dto, strin * * Update a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\UpdateSchemaDto $update_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchema'] to see the possible values for this operation @@ -10214,9 +10105,9 @@ public function putRulesRequest($app, $schema, $configure_field_rules_dto, strin * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putSchema($app, $schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) + public function putSchema($schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) { - list($response) = $this->putSchemaWithHttpInfo($app, $schema, $update_schema_dto, $contentType); + list($response) = $this->putSchemaWithHttpInfo($schema, $update_schema_dto, $contentType); return $response; } @@ -10225,7 +10116,6 @@ public function putSchema($app, $schema, $update_schema_dto, string $contentType * * Update a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\UpdateSchemaDto $update_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchema'] to see the possible values for this operation @@ -10234,9 +10124,9 @@ public function putSchema($app, $schema, $update_schema_dto, string $contentType * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putSchemaWithHttpInfo($app, $schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) + public function putSchemaWithHttpInfo($schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) { - $request = $this->putSchemaRequest($app, $schema, $update_schema_dto, $contentType); + $request = $this->putSchemaRequest($schema, $update_schema_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -10373,7 +10263,6 @@ public function putSchemaWithHttpInfo($app, $schema, $update_schema_dto, string * * Update a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\UpdateSchemaDto $update_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchema'] to see the possible values for this operation @@ -10381,9 +10270,9 @@ public function putSchemaWithHttpInfo($app, $schema, $update_schema_dto, string * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSchemaAsync($app, $schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) + public function putSchemaAsync($schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) { - return $this->putSchemaAsyncWithHttpInfo($app, $schema, $update_schema_dto, $contentType) + return $this->putSchemaAsyncWithHttpInfo($schema, $update_schema_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -10396,7 +10285,6 @@ function ($response) { * * Update a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\UpdateSchemaDto $update_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchema'] to see the possible values for this operation @@ -10404,10 +10292,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSchemaAsyncWithHttpInfo($app, $schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) + public function putSchemaAsyncWithHttpInfo($schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putSchemaRequest($app, $schema, $update_schema_dto, $contentType); + $request = $this->putSchemaRequest($schema, $update_schema_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10448,7 +10336,6 @@ function ($exception) { /** * Create request for operation 'putSchema' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\UpdateSchemaDto $update_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchema'] to see the possible values for this operation @@ -10456,10 +10343,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putSchemaRequest($app, $schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) + public function putSchemaRequest($schema, $update_schema_dto, string $contentType = self::contentTypes['putSchema'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -10573,7 +10461,6 @@ public function putSchemaRequest($app, $schema, $update_schema_dto, string $cont * * Synchronize a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SynchronizeSchemaDto $synchronize_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaSync'] to see the possible values for this operation @@ -10582,9 +10469,9 @@ public function putSchemaRequest($app, $schema, $update_schema_dto, string $cont * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putSchemaSync($app, $schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) + public function putSchemaSync($schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) { - list($response) = $this->putSchemaSyncWithHttpInfo($app, $schema, $synchronize_schema_dto, $contentType); + list($response) = $this->putSchemaSyncWithHttpInfo($schema, $synchronize_schema_dto, $contentType); return $response; } @@ -10593,7 +10480,6 @@ public function putSchemaSync($app, $schema, $synchronize_schema_dto, string $co * * Synchronize a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SynchronizeSchemaDto $synchronize_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaSync'] to see the possible values for this operation @@ -10602,9 +10488,9 @@ public function putSchemaSync($app, $schema, $synchronize_schema_dto, string $co * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putSchemaSyncWithHttpInfo($app, $schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) + public function putSchemaSyncWithHttpInfo($schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) { - $request = $this->putSchemaSyncRequest($app, $schema, $synchronize_schema_dto, $contentType); + $request = $this->putSchemaSyncRequest($schema, $synchronize_schema_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -10741,7 +10627,6 @@ public function putSchemaSyncWithHttpInfo($app, $schema, $synchronize_schema_dto * * Synchronize a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SynchronizeSchemaDto $synchronize_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaSync'] to see the possible values for this operation @@ -10749,9 +10634,9 @@ public function putSchemaSyncWithHttpInfo($app, $schema, $synchronize_schema_dto * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSchemaSyncAsync($app, $schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) + public function putSchemaSyncAsync($schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) { - return $this->putSchemaSyncAsyncWithHttpInfo($app, $schema, $synchronize_schema_dto, $contentType) + return $this->putSchemaSyncAsyncWithHttpInfo($schema, $synchronize_schema_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -10764,7 +10649,6 @@ function ($response) { * * Synchronize a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SynchronizeSchemaDto $synchronize_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaSync'] to see the possible values for this operation @@ -10772,10 +10656,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putSchemaSyncAsyncWithHttpInfo($app, $schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) + public function putSchemaSyncAsyncWithHttpInfo($schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putSchemaSyncRequest($app, $schema, $synchronize_schema_dto, $contentType); + $request = $this->putSchemaSyncRequest($schema, $synchronize_schema_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10816,7 +10700,6 @@ function ($exception) { /** * Create request for operation 'putSchemaSync' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SynchronizeSchemaDto $synchronize_schema_dto The schema object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putSchemaSync'] to see the possible values for this operation @@ -10824,10 +10707,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putSchemaSyncRequest($app, $schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) + public function putSchemaSyncRequest($schema, $synchronize_schema_dto, string $contentType = self::contentTypes['putSchemaSync'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -10941,7 +10825,6 @@ public function putSchemaSyncRequest($app, $schema, $synchronize_schema_dto, str * * Update the scripts. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SchemaScriptsDto $schema_scripts_dto The schema scripts object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putScripts'] to see the possible values for this operation @@ -10950,9 +10833,9 @@ public function putSchemaSyncRequest($app, $schema, $synchronize_schema_dto, str * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putScripts($app, $schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) + public function putScripts($schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) { - list($response) = $this->putScriptsWithHttpInfo($app, $schema, $schema_scripts_dto, $contentType); + list($response) = $this->putScriptsWithHttpInfo($schema, $schema_scripts_dto, $contentType); return $response; } @@ -10961,7 +10844,6 @@ public function putScripts($app, $schema, $schema_scripts_dto, string $contentTy * * Update the scripts. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SchemaScriptsDto $schema_scripts_dto The schema scripts object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putScripts'] to see the possible values for this operation @@ -10970,9 +10852,9 @@ public function putScripts($app, $schema, $schema_scripts_dto, string $contentTy * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putScriptsWithHttpInfo($app, $schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) + public function putScriptsWithHttpInfo($schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) { - $request = $this->putScriptsRequest($app, $schema, $schema_scripts_dto, $contentType); + $request = $this->putScriptsRequest($schema, $schema_scripts_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -11109,7 +10991,6 @@ public function putScriptsWithHttpInfo($app, $schema, $schema_scripts_dto, strin * * Update the scripts. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SchemaScriptsDto $schema_scripts_dto The schema scripts object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putScripts'] to see the possible values for this operation @@ -11117,9 +10998,9 @@ public function putScriptsWithHttpInfo($app, $schema, $schema_scripts_dto, strin * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putScriptsAsync($app, $schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) + public function putScriptsAsync($schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) { - return $this->putScriptsAsyncWithHttpInfo($app, $schema, $schema_scripts_dto, $contentType) + return $this->putScriptsAsyncWithHttpInfo($schema, $schema_scripts_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -11132,7 +11013,6 @@ function ($response) { * * Update the scripts. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SchemaScriptsDto $schema_scripts_dto The schema scripts object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putScripts'] to see the possible values for this operation @@ -11140,10 +11020,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putScriptsAsyncWithHttpInfo($app, $schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) + public function putScriptsAsyncWithHttpInfo($schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->putScriptsRequest($app, $schema, $schema_scripts_dto, $contentType); + $request = $this->putScriptsRequest($schema, $schema_scripts_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11184,7 +11064,6 @@ function ($exception) { /** * Create request for operation 'putScripts' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema. (required) * @param \Squidex\Client\Model\SchemaScriptsDto $schema_scripts_dto The schema scripts object that needs to updated. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putScripts'] to see the possible values for this operation @@ -11192,10 +11071,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putScriptsRequest($app, $schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) + public function putScriptsRequest($schema, $schema_scripts_dto, string $contentType = self::contentTypes['putScripts'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -11309,7 +11189,6 @@ public function putScriptsRequest($app, $schema, $schema_scripts_dto, string $co * * Unpublish a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to unpublish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishSchema'] to see the possible values for this operation * @@ -11317,9 +11196,9 @@ public function putScriptsRequest($app, $schema, $schema_scripts_dto, string $co * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function unpublishSchema($app, $schema, string $contentType = self::contentTypes['unpublishSchema'][0]) + public function unpublishSchema($schema, string $contentType = self::contentTypes['unpublishSchema'][0]) { - list($response) = $this->unpublishSchemaWithHttpInfo($app, $schema, $contentType); + list($response) = $this->unpublishSchemaWithHttpInfo($schema, $contentType); return $response; } @@ -11328,7 +11207,6 @@ public function unpublishSchema($app, $schema, string $contentType = self::conte * * Unpublish a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to unpublish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishSchema'] to see the possible values for this operation * @@ -11336,9 +11214,9 @@ public function unpublishSchema($app, $schema, string $contentType = self::conte * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SchemaDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function unpublishSchemaWithHttpInfo($app, $schema, string $contentType = self::contentTypes['unpublishSchema'][0]) + public function unpublishSchemaWithHttpInfo($schema, string $contentType = self::contentTypes['unpublishSchema'][0]) { - $request = $this->unpublishSchemaRequest($app, $schema, $contentType); + $request = $this->unpublishSchemaRequest($schema, $contentType); try { $options = $this->createHttpClientOption(); @@ -11475,16 +11353,15 @@ public function unpublishSchemaWithHttpInfo($app, $schema, string $contentType = * * Unpublish a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to unpublish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unpublishSchemaAsync($app, $schema, string $contentType = self::contentTypes['unpublishSchema'][0]) + public function unpublishSchemaAsync($schema, string $contentType = self::contentTypes['unpublishSchema'][0]) { - return $this->unpublishSchemaAsyncWithHttpInfo($app, $schema, $contentType) + return $this->unpublishSchemaAsyncWithHttpInfo($schema, $contentType) ->then( function ($response) { return $response[0]; @@ -11497,17 +11374,16 @@ function ($response) { * * Unpublish a schema. * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to unpublish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unpublishSchemaAsyncWithHttpInfo($app, $schema, string $contentType = self::contentTypes['unpublishSchema'][0]) + public function unpublishSchemaAsyncWithHttpInfo($schema, string $contentType = self::contentTypes['unpublishSchema'][0]) { $returnType = '\Squidex\Client\Model\SchemaDto'; - $request = $this->unpublishSchemaRequest($app, $schema, $contentType); + $request = $this->unpublishSchemaRequest($schema, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11548,17 +11424,17 @@ function ($exception) { /** * Create request for operation 'unpublishSchema' * - * @param string $app The name of the app. (required) * @param string $schema The name of the schema to unpublish. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['unpublishSchema'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function unpublishSchemaRequest($app, $schema, string $contentType = self::contentTypes['unpublishSchema'][0]) + public function unpublishSchemaRequest($schema, string $contentType = self::contentTypes['unpublishSchema'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' diff --git a/lib/Api/SearchApi.php b/lib/Api/SearchApi.php index 0f25a71..93f9082 100644 --- a/lib/Api/SearchApi.php +++ b/lib/Api/SearchApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -124,7 +124,6 @@ public function getConfig() * * Get search results. * - * @param string $app The name of the app. (required) * @param string $query The search query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchResults'] to see the possible values for this operation * @@ -132,9 +131,9 @@ public function getConfig() * @throws \InvalidArgumentException * @return \Squidex\Client\Model\SearchResultDto[]|\Squidex\Client\Model\ErrorDto */ - public function getSearchResults($app, $query = null, string $contentType = self::contentTypes['getSearchResults'][0]) + public function getSearchResults($query = null, string $contentType = self::contentTypes['getSearchResults'][0]) { - list($response) = $this->getSearchResultsWithHttpInfo($app, $query, $contentType); + list($response) = $this->getSearchResultsWithHttpInfo($query, $contentType); return $response; } @@ -143,7 +142,6 @@ public function getSearchResults($app, $query = null, string $contentType = self * * Get search results. * - * @param string $app The name of the app. (required) * @param string $query The search query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchResults'] to see the possible values for this operation * @@ -151,9 +149,9 @@ public function getSearchResults($app, $query = null, string $contentType = self * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\SearchResultDto[]|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getSearchResultsWithHttpInfo($app, $query = null, string $contentType = self::contentTypes['getSearchResults'][0]) + public function getSearchResultsWithHttpInfo($query = null, string $contentType = self::contentTypes['getSearchResults'][0]) { - $request = $this->getSearchResultsRequest($app, $query, $contentType); + $request = $this->getSearchResultsRequest($query, $contentType); try { $options = $this->createHttpClientOption(); @@ -267,16 +265,15 @@ public function getSearchResultsWithHttpInfo($app, $query = null, string $conten * * Get search results. * - * @param string $app The name of the app. (required) * @param string $query The search query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchResults'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchResultsAsync($app, $query = null, string $contentType = self::contentTypes['getSearchResults'][0]) + public function getSearchResultsAsync($query = null, string $contentType = self::contentTypes['getSearchResults'][0]) { - return $this->getSearchResultsAsyncWithHttpInfo($app, $query, $contentType) + return $this->getSearchResultsAsyncWithHttpInfo($query, $contentType) ->then( function ($response) { return $response[0]; @@ -289,17 +286,16 @@ function ($response) { * * Get search results. * - * @param string $app The name of the app. (required) * @param string $query The search query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchResults'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSearchResultsAsyncWithHttpInfo($app, $query = null, string $contentType = self::contentTypes['getSearchResults'][0]) + public function getSearchResultsAsyncWithHttpInfo($query = null, string $contentType = self::contentTypes['getSearchResults'][0]) { $returnType = '\Squidex\Client\Model\SearchResultDto[]'; - $request = $this->getSearchResultsRequest($app, $query, $contentType); + $request = $this->getSearchResultsRequest($query, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -340,17 +336,17 @@ function ($exception) { /** * Create request for operation 'getSearchResults' * - * @param string $app The name of the app. (required) * @param string $query The search query. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSearchResults'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSearchResultsRequest($app, $query = null, string $contentType = self::contentTypes['getSearchResults'][0]) + public function getSearchResultsRequest($query = null, string $contentType = self::contentTypes['getSearchResults'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' diff --git a/lib/Api/StatisticsApi.php b/lib/Api/StatisticsApi.php index dbb77e7..6319cf4 100644 --- a/lib/Api/StatisticsApi.php +++ b/lib/Api/StatisticsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -140,36 +140,34 @@ public function getConfig() /** * Operation getCurrentStorageSize * - * Get total asset size. + * Get total asset size for app. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCurrentStorageSize'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\CurrentStorageDto|\Squidex\Client\Model\ErrorDto */ - public function getCurrentStorageSize($app, string $contentType = self::contentTypes['getCurrentStorageSize'][0]) + public function getCurrentStorageSize(string $contentType = self::contentTypes['getCurrentStorageSize'][0]) { - list($response) = $this->getCurrentStorageSizeWithHttpInfo($app, $contentType); + list($response) = $this->getCurrentStorageSizeWithHttpInfo($contentType); return $response; } /** * Operation getCurrentStorageSizeWithHttpInfo * - * Get total asset size. + * Get total asset size for app. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCurrentStorageSize'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\CurrentStorageDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getCurrentStorageSizeWithHttpInfo($app, string $contentType = self::contentTypes['getCurrentStorageSize'][0]) + public function getCurrentStorageSizeWithHttpInfo(string $contentType = self::contentTypes['getCurrentStorageSize'][0]) { - $request = $this->getCurrentStorageSizeRequest($app, $contentType); + $request = $this->getCurrentStorageSizeRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -281,17 +279,16 @@ public function getCurrentStorageSizeWithHttpInfo($app, string $contentType = se /** * Operation getCurrentStorageSizeAsync * - * Get total asset size. + * Get total asset size for app. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCurrentStorageSize'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCurrentStorageSizeAsync($app, string $contentType = self::contentTypes['getCurrentStorageSize'][0]) + public function getCurrentStorageSizeAsync(string $contentType = self::contentTypes['getCurrentStorageSize'][0]) { - return $this->getCurrentStorageSizeAsyncWithHttpInfo($app, $contentType) + return $this->getCurrentStorageSizeAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -302,18 +299,17 @@ function ($response) { /** * Operation getCurrentStorageSizeAsyncWithHttpInfo * - * Get total asset size. + * Get total asset size for app. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCurrentStorageSize'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCurrentStorageSizeAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getCurrentStorageSize'][0]) + public function getCurrentStorageSizeAsyncWithHttpInfo(string $contentType = self::contentTypes['getCurrentStorageSize'][0]) { $returnType = '\Squidex\Client\Model\CurrentStorageDto'; - $request = $this->getCurrentStorageSizeRequest($app, $contentType); + $request = $this->getCurrentStorageSizeRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -354,16 +350,16 @@ function ($exception) { /** * Create request for operation 'getCurrentStorageSize' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCurrentStorageSize'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCurrentStorageSizeRequest($app, string $contentType = self::contentTypes['getCurrentStorageSize'][0]) + public function getCurrentStorageSizeRequest(string $contentType = self::contentTypes['getCurrentStorageSize'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -448,16 +444,15 @@ public function getCurrentStorageSizeRequest($app, string $contentType = self::c * * Get api calls as log file. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLog'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Squidex\Client\Model\LogDownloadDto|\Squidex\Client\Model\ErrorDto */ - public function getLog($app, string $contentType = self::contentTypes['getLog'][0]) + public function getLog(string $contentType = self::contentTypes['getLog'][0]) { - list($response) = $this->getLogWithHttpInfo($app, $contentType); + list($response) = $this->getLogWithHttpInfo($contentType); return $response; } @@ -466,16 +461,15 @@ public function getLog($app, string $contentType = self::contentTypes['getLog'][ * * Get api calls as log file. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLog'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\LogDownloadDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getLogWithHttpInfo($app, string $contentType = self::contentTypes['getLog'][0]) + public function getLogWithHttpInfo(string $contentType = self::contentTypes['getLog'][0]) { - $request = $this->getLogRequest($app, $contentType); + $request = $this->getLogRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -589,15 +583,14 @@ public function getLogWithHttpInfo($app, string $contentType = self::contentType * * Get api calls as log file. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLog'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLogAsync($app, string $contentType = self::contentTypes['getLog'][0]) + public function getLogAsync(string $contentType = self::contentTypes['getLog'][0]) { - return $this->getLogAsyncWithHttpInfo($app, $contentType) + return $this->getLogAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -610,16 +603,15 @@ function ($response) { * * Get api calls as log file. * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLog'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLogAsyncWithHttpInfo($app, string $contentType = self::contentTypes['getLog'][0]) + public function getLogAsyncWithHttpInfo(string $contentType = self::contentTypes['getLog'][0]) { $returnType = '\Squidex\Client\Model\LogDownloadDto'; - $request = $this->getLogRequest($app, $contentType); + $request = $this->getLogRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -660,16 +652,16 @@ function ($exception) { /** * Create request for operation 'getLog' * - * @param string $app The name of the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLog'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getLogRequest($app, string $contentType = self::contentTypes['getLog'][0]) + public function getLogRequest(string $contentType = self::contentTypes['getLog'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -752,9 +744,8 @@ public function getLogRequest($app, string $contentType = self::contentTypes['ge /** * Operation getStorageSizes * - * Get asset usage by date. + * Get asset usage by date for app. * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStorageSizes'] to see the possible values for this operation @@ -763,18 +754,17 @@ public function getLogRequest($app, string $contentType = self::contentTypes['ge * @throws \InvalidArgumentException * @return \Squidex\Client\Model\StorageUsagePerDateDto[]|\Squidex\Client\Model\ErrorDto */ - public function getStorageSizes($app, $from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) + public function getStorageSizes($from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) { - list($response) = $this->getStorageSizesWithHttpInfo($app, $from_date, $to_date, $contentType); + list($response) = $this->getStorageSizesWithHttpInfo($from_date, $to_date, $contentType); return $response; } /** * Operation getStorageSizesWithHttpInfo * - * Get asset usage by date. + * Get asset usage by date for app. * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStorageSizes'] to see the possible values for this operation @@ -783,9 +773,9 @@ public function getStorageSizes($app, $from_date, $to_date, string $contentType * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\StorageUsagePerDateDto[]|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getStorageSizesWithHttpInfo($app, $from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) + public function getStorageSizesWithHttpInfo($from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) { - $request = $this->getStorageSizesRequest($app, $from_date, $to_date, $contentType); + $request = $this->getStorageSizesRequest($from_date, $to_date, $contentType); try { $options = $this->createHttpClientOption(); @@ -897,9 +887,8 @@ public function getStorageSizesWithHttpInfo($app, $from_date, $to_date, string $ /** * Operation getStorageSizesAsync * - * Get asset usage by date. + * Get asset usage by date for app. * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStorageSizes'] to see the possible values for this operation @@ -907,9 +896,9 @@ public function getStorageSizesWithHttpInfo($app, $from_date, $to_date, string $ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getStorageSizesAsync($app, $from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) + public function getStorageSizesAsync($from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) { - return $this->getStorageSizesAsyncWithHttpInfo($app, $from_date, $to_date, $contentType) + return $this->getStorageSizesAsyncWithHttpInfo($from_date, $to_date, $contentType) ->then( function ($response) { return $response[0]; @@ -920,9 +909,8 @@ function ($response) { /** * Operation getStorageSizesAsyncWithHttpInfo * - * Get asset usage by date. + * Get asset usage by date for app. * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStorageSizes'] to see the possible values for this operation @@ -930,10 +918,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getStorageSizesAsyncWithHttpInfo($app, $from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) + public function getStorageSizesAsyncWithHttpInfo($from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) { $returnType = '\Squidex\Client\Model\StorageUsagePerDateDto[]'; - $request = $this->getStorageSizesRequest($app, $from_date, $to_date, $contentType); + $request = $this->getStorageSizesRequest($from_date, $to_date, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -974,7 +962,6 @@ function ($exception) { /** * Create request for operation 'getStorageSizes' * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStorageSizes'] to see the possible values for this operation @@ -982,10 +969,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getStorageSizesRequest($app, $from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) + public function getStorageSizesRequest($from_date, $to_date, string $contentType = self::contentTypes['getStorageSizes'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' @@ -1444,7 +1432,7 @@ public function getStorageSizesForTeamRequest($team, $from_date, $to_date, strin /** * Operation getTeamCurrentStorageSizeForTeam * - * Get total asset size by team. + * Get total asset size for team. * * @param string $team The ID of the team. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeamCurrentStorageSizeForTeam'] to see the possible values for this operation @@ -1462,7 +1450,7 @@ public function getTeamCurrentStorageSizeForTeam($team, string $contentType = se /** * Operation getTeamCurrentStorageSizeForTeamWithHttpInfo * - * Get total asset size by team. + * Get total asset size for team. * * @param string $team The ID of the team. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeamCurrentStorageSizeForTeam'] to see the possible values for this operation @@ -1585,7 +1573,7 @@ public function getTeamCurrentStorageSizeForTeamWithHttpInfo($team, string $cont /** * Operation getTeamCurrentStorageSizeForTeamAsync * - * Get total asset size by team. + * Get total asset size for team. * * @param string $team The ID of the team. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeamCurrentStorageSizeForTeam'] to see the possible values for this operation @@ -1606,7 +1594,7 @@ function ($response) { /** * Operation getTeamCurrentStorageSizeForTeamAsyncWithHttpInfo * - * Get total asset size by team. + * Get total asset size for team. * * @param string $team The ID of the team. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeamCurrentStorageSizeForTeam'] to see the possible values for this operation @@ -1750,9 +1738,8 @@ public function getTeamCurrentStorageSizeForTeamRequest($team, string $contentTy /** * Operation getUsages * - * Get api calls in date range. + * Get api calls in date range for app. * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsages'] to see the possible values for this operation @@ -1761,18 +1748,17 @@ public function getTeamCurrentStorageSizeForTeamRequest($team, string $contentTy * @throws \InvalidArgumentException * @return \Squidex\Client\Model\CallsUsageDtoDto|\Squidex\Client\Model\ErrorDto */ - public function getUsages($app, $from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) + public function getUsages($from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) { - list($response) = $this->getUsagesWithHttpInfo($app, $from_date, $to_date, $contentType); + list($response) = $this->getUsagesWithHttpInfo($from_date, $to_date, $contentType); return $response; } /** * Operation getUsagesWithHttpInfo * - * Get api calls in date range. + * Get api calls in date range for app. * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsages'] to see the possible values for this operation @@ -1781,9 +1767,9 @@ public function getUsages($app, $from_date, $to_date, string $contentType = self * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\CallsUsageDtoDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getUsagesWithHttpInfo($app, $from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) + public function getUsagesWithHttpInfo($from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) { - $request = $this->getUsagesRequest($app, $from_date, $to_date, $contentType); + $request = $this->getUsagesRequest($from_date, $to_date, $contentType); try { $options = $this->createHttpClientOption(); @@ -1895,9 +1881,8 @@ public function getUsagesWithHttpInfo($app, $from_date, $to_date, string $conten /** * Operation getUsagesAsync * - * Get api calls in date range. + * Get api calls in date range for app. * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsages'] to see the possible values for this operation @@ -1905,9 +1890,9 @@ public function getUsagesWithHttpInfo($app, $from_date, $to_date, string $conten * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUsagesAsync($app, $from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) + public function getUsagesAsync($from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) { - return $this->getUsagesAsyncWithHttpInfo($app, $from_date, $to_date, $contentType) + return $this->getUsagesAsyncWithHttpInfo($from_date, $to_date, $contentType) ->then( function ($response) { return $response[0]; @@ -1918,9 +1903,8 @@ function ($response) { /** * Operation getUsagesAsyncWithHttpInfo * - * Get api calls in date range. + * Get api calls in date range for app. * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsages'] to see the possible values for this operation @@ -1928,10 +1912,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUsagesAsyncWithHttpInfo($app, $from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) + public function getUsagesAsyncWithHttpInfo($from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) { $returnType = '\Squidex\Client\Model\CallsUsageDtoDto'; - $request = $this->getUsagesRequest($app, $from_date, $to_date, $contentType); + $request = $this->getUsagesRequest($from_date, $to_date, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1972,7 +1956,6 @@ function ($exception) { /** * Create request for operation 'getUsages' * - * @param string $app The name of the app. (required) * @param \DateTime $from_date The from date. (required) * @param \DateTime $to_date The to date. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUsages'] to see the possible values for this operation @@ -1980,10 +1963,11 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getUsagesRequest($app, $from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) + public function getUsagesRequest($from_date, $to_date, string $contentType = self::contentTypes['getUsages'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' diff --git a/lib/Api/TeamsApi.php b/lib/Api/TeamsApi.php index 6ea833e..d7c6a08 100644 --- a/lib/Api/TeamsApi.php +++ b/lib/Api/TeamsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -88,9 +88,15 @@ class TeamsApi 'postContributor' => [ 'application/json', ], + 'deleteTeam' => [ + 'application/json', + ], 'getTeam' => [ 'application/json', ], + 'getTeamAuth' => [ + 'application/json', + ], 'getTeams' => [ 'application/json', ], @@ -100,6 +106,9 @@ class TeamsApi 'putTeam' => [ 'application/json', ], + 'putTeamAuth' => [ + 'application/json', + ], ]; /** @@ -1473,38 +1482,37 @@ public function postContributorRequest($team, $assign_contributor_dto, string $c } /** - * Operation getTeam + * Operation deleteTeam * - * Get an team by name. + * Delete the team. * - * @param string $team The name of the team. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation + * @param string $team The ID of the team to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto + * @return void */ - public function getTeam($team, string $contentType = self::contentTypes['getTeam'][0]) + public function deleteTeam($team, string $contentType = self::contentTypes['deleteTeam'][0]) { - list($response) = $this->getTeamWithHttpInfo($team, $contentType); - return $response; + $this->deleteTeamWithHttpInfo($team, $contentType); } /** - * Operation getTeamWithHttpInfo + * Operation deleteTeamWithHttpInfo * - * Get an team by name. + * Delete the team. * - * @param string $team The name of the team. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation + * @param string $team The ID of the team to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function getTeamWithHttpInfo($team, string $contentType = self::contentTypes['getTeam'][0]) + public function deleteTeamWithHttpInfo($team, string $contentType = self::contentTypes['deleteTeam'][0]) { - $request = $this->getTeamRequest($team, $contentType); + $request = $this->deleteTeamRequest($team, $contentType); try { $options = $this->createHttpClientOption(); @@ -1541,61 +1549,14 @@ public function getTeamWithHttpInfo($team, string $contentType = self::contentTy ); } - switch($statusCode) { - case 200: - if ('\Squidex\Client\Model\TeamDto' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\TeamDto' !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\TeamDto', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\ErrorDto' !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Squidex\Client\Model\TeamDto'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Squidex\Client\Model\TeamDto', + '\Squidex\Client\Model\ErrorDto', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1614,19 +1575,19 @@ public function getTeamWithHttpInfo($team, string $contentType = self::contentTy } /** - * Operation getTeamAsync + * Operation deleteTeamAsync * - * Get an team by name. + * Delete the team. * - * @param string $team The name of the team. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation + * @param string $team The ID of the team to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTeamAsync($team, string $contentType = self::contentTypes['getTeam'][0]) + public function deleteTeamAsync($team, string $contentType = self::contentTypes['deleteTeam'][0]) { - return $this->getTeamAsyncWithHttpInfo($team, $contentType) + return $this->deleteTeamAsyncWithHttpInfo($team, $contentType) ->then( function ($response) { return $response[0]; @@ -1635,39 +1596,26 @@ function ($response) { } /** - * Operation getTeamAsyncWithHttpInfo + * Operation deleteTeamAsyncWithHttpInfo * - * Get an team by name. + * Delete the team. * - * @param string $team The name of the team. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation + * @param string $team The ID of the team to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTeamAsyncWithHttpInfo($team, string $contentType = self::contentTypes['getTeam'][0]) + public function deleteTeamAsyncWithHttpInfo($team, string $contentType = self::contentTypes['deleteTeam'][0]) { - $returnType = '\Squidex\Client\Model\TeamDto'; - $request = $this->getTeamRequest($team, $contentType); + $returnType = ''; + $request = $this->deleteTeamRequest($team, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -1687,15 +1635,15 @@ function ($exception) { } /** - * Create request for operation 'getTeam' + * Create request for operation 'deleteTeam' * - * @param string $team The name of the team. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation + * @param string $team The ID of the team to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTeamRequest($team, string $contentType = self::contentTypes['getTeam'][0]) + public function deleteTeamRequest($team, string $contentType = self::contentTypes['deleteTeam'][0]) { // verify the required parameter 'team' is set @@ -1771,7 +1719,7 @@ public function getTeamRequest($team, string $contentType = self::contentTypes[' $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1779,36 +1727,38 @@ public function getTeamRequest($team, string $contentType = self::contentTypes[' } /** - * Operation getTeams + * Operation getTeam * - * Get your teams. + * Get an team by ID. * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Squidex\Client\Model\TeamDto[]|\Squidex\Client\Model\ErrorDto + * @return \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto */ - public function getTeams(string $contentType = self::contentTypes['getTeams'][0]) + public function getTeam($team, string $contentType = self::contentTypes['getTeam'][0]) { - list($response) = $this->getTeamsWithHttpInfo($contentType); + list($response) = $this->getTeamWithHttpInfo($team, $contentType); return $response; } /** - * Operation getTeamsWithHttpInfo + * Operation getTeamWithHttpInfo * - * Get your teams. + * Get an team by ID. * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Squidex\Client\Model\TeamDto[]|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @return array of \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function getTeamsWithHttpInfo(string $contentType = self::contentTypes['getTeams'][0]) + public function getTeamWithHttpInfo($team, string $contentType = self::contentTypes['getTeam'][0]) { - $request = $this->getTeamsRequest($contentType); + $request = $this->getTeamRequest($team, $contentType); try { $options = $this->createHttpClientOption(); @@ -1847,17 +1797,17 @@ public function getTeamsWithHttpInfo(string $contentType = self::contentTypes['g switch($statusCode) { case 200: - if ('\Squidex\Client\Model\TeamDto[]' === '\SplFileObject') { + if ('\Squidex\Client\Model\TeamDto' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\TeamDto[]' !== 'string') { + if ('\Squidex\Client\Model\TeamDto' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\TeamDto[]', []), + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\TeamDto', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -1878,7 +1828,7 @@ public function getTeamsWithHttpInfo(string $contentType = self::contentTypes['g ]; } - $returnType = '\Squidex\Client\Model\TeamDto[]'; + $returnType = '\Squidex\Client\Model\TeamDto'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1899,7 +1849,7 @@ public function getTeamsWithHttpInfo(string $contentType = self::contentTypes['g case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Squidex\Client\Model\TeamDto[]', + '\Squidex\Client\Model\TeamDto', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1918,18 +1868,19 @@ public function getTeamsWithHttpInfo(string $contentType = self::contentTypes['g } /** - * Operation getTeamsAsync + * Operation getTeamAsync * - * Get your teams. + * Get an team by ID. * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTeamsAsync(string $contentType = self::contentTypes['getTeams'][0]) + public function getTeamAsync($team, string $contentType = self::contentTypes['getTeam'][0]) { - return $this->getTeamsAsyncWithHttpInfo($contentType) + return $this->getTeamAsyncWithHttpInfo($team, $contentType) ->then( function ($response) { return $response[0]; @@ -1938,19 +1889,20 @@ function ($response) { } /** - * Operation getTeamsAsyncWithHttpInfo + * Operation getTeamAsyncWithHttpInfo * - * Get your teams. + * Get an team by ID. * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTeamsAsyncWithHttpInfo(string $contentType = self::contentTypes['getTeams'][0]) + public function getTeamAsyncWithHttpInfo($team, string $contentType = self::contentTypes['getTeam'][0]) { - $returnType = '\Squidex\Client\Model\TeamDto[]'; - $request = $this->getTeamsRequest($contentType); + $returnType = '\Squidex\Client\Model\TeamDto'; + $request = $this->getTeamRequest($team, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1989,18 +1941,26 @@ function ($exception) { } /** - * Create request for operation 'getTeams' + * Create request for operation 'getTeam' * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTeamsRequest(string $contentType = self::contentTypes['getTeams'][0]) + public function getTeamRequest($team, string $contentType = self::contentTypes['getTeam'][0]) { + // verify the required parameter 'team' is set + if ($team === null || (is_array($team) && count($team) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $team when calling ' + ); + } - $resourcePath = '/api/teams'; + + $resourcePath = '/api/teams/{team}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2009,6 +1969,14 @@ public function getTeamsRequest(string $contentType = self::contentTypes['getTea + // path params + if ($team !== null) { + $resourcePath = str_replace( + '{' . 'team' . '}', + ObjectSerializer::toPathValue($team), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -2065,38 +2033,38 @@ public function getTeamsRequest(string $contentType = self::contentTypes['getTea } /** - * Operation postTeam + * Operation getTeamAuth * - * Create a new team. + * Get the team auth settings. * - * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeamAuth'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto + * @return \Squidex\Client\Model\AuthSchemeResponseDto|\Squidex\Client\Model\ErrorDto */ - public function postTeam($create_team_dto, string $contentType = self::contentTypes['postTeam'][0]) + public function getTeamAuth($team, string $contentType = self::contentTypes['getTeamAuth'][0]) { - list($response) = $this->postTeamWithHttpInfo($create_team_dto, $contentType); + list($response) = $this->getTeamAuthWithHttpInfo($team, $contentType); return $response; } /** - * Operation postTeamWithHttpInfo + * Operation getTeamAuthWithHttpInfo * - * Create a new team. + * Get the team auth settings. * - * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeamAuth'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @return array of \Squidex\Client\Model\AuthSchemeResponseDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postTeamWithHttpInfo($create_team_dto, string $contentType = self::contentTypes['postTeam'][0]) + public function getTeamAuthWithHttpInfo($team, string $contentType = self::contentTypes['getTeamAuth'][0]) { - $request = $this->postTeamRequest($create_team_dto, $contentType); + $request = $this->getTeamAuthRequest($team, $contentType); try { $options = $this->createHttpClientOption(); @@ -2134,48 +2102,18 @@ public function postTeamWithHttpInfo($create_team_dto, string $contentType = sel } switch($statusCode) { - case 201: - if ('\Squidex\Client\Model\TeamDto' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\TeamDto' !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\TeamDto', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\ErrorDto' !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 409: - if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + case 200: + if ('\Squidex\Client\Model\AuthSchemeResponseDto' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + if ('\Squidex\Client\Model\AuthSchemeResponseDto' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\AuthSchemeResponseDto', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2196,7 +2134,7 @@ public function postTeamWithHttpInfo($create_team_dto, string $contentType = sel ]; } - $returnType = '\Squidex\Client\Model\TeamDto'; + $returnType = '\Squidex\Client\Model\AuthSchemeResponseDto'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -2214,26 +2152,10 @@ public function postTeamWithHttpInfo($create_team_dto, string $contentType = sel } catch (ApiException $e) { switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Squidex\Client\Model\TeamDto', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Squidex\Client\Model\ErrorDto', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 409: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Squidex\Client\Model\ErrorDto', + '\Squidex\Client\Model\AuthSchemeResponseDto', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2252,19 +2174,19 @@ public function postTeamWithHttpInfo($create_team_dto, string $contentType = sel } /** - * Operation postTeamAsync + * Operation getTeamAuthAsync * - * Create a new team. + * Get the team auth settings. * - * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeamAuth'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postTeamAsync($create_team_dto, string $contentType = self::contentTypes['postTeam'][0]) + public function getTeamAuthAsync($team, string $contentType = self::contentTypes['getTeamAuth'][0]) { - return $this->postTeamAsyncWithHttpInfo($create_team_dto, $contentType) + return $this->getTeamAuthAsyncWithHttpInfo($team, $contentType) ->then( function ($response) { return $response[0]; @@ -2273,12 +2195,627 @@ function ($response) { } /** - * Operation postTeamAsyncWithHttpInfo + * Operation getTeamAuthAsyncWithHttpInfo * - * Create a new team. + * Get the team auth settings. * - * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeamAuth'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTeamAuthAsyncWithHttpInfo($team, string $contentType = self::contentTypes['getTeamAuth'][0]) + { + $returnType = '\Squidex\Client\Model\AuthSchemeResponseDto'; + $request = $this->getTeamAuthRequest($team, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getTeamAuth' + * + * @param string $team The ID of the team. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeamAuth'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getTeamAuthRequest($team, string $contentType = self::contentTypes['getTeamAuth'][0]) + { + + // verify the required parameter 'team' is set + if ($team === null || (is_array($team) && count($team) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $team when calling ' + ); + } + + + $resourcePath = '/api/teams/{team}/auth'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($team !== null) { + $resourcePath = str_replace( + '{' . 'team' . '}', + ObjectSerializer::toPathValue($team), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getTeams + * + * Get your teams. + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Squidex\Client\Model\TeamDto[]|\Squidex\Client\Model\ErrorDto + */ + public function getTeams(string $contentType = self::contentTypes['getTeams'][0]) + { + list($response) = $this->getTeamsWithHttpInfo($contentType); + return $response; + } + + /** + * Operation getTeamsWithHttpInfo + * + * Get your teams. + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Squidex\Client\Model\TeamDto[]|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + */ + public function getTeamsWithHttpInfo(string $contentType = self::contentTypes['getTeams'][0]) + { + $request = $this->getTeamsRequest($contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $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: + if ('\Squidex\Client\Model\TeamDto[]' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\TeamDto[]' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\TeamDto[]', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Squidex\Client\Model\TeamDto[]'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\TeamDto[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getTeamsAsync + * + * Get your teams. + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTeamsAsync(string $contentType = self::contentTypes['getTeams'][0]) + { + return $this->getTeamsAsyncWithHttpInfo($contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTeamsAsyncWithHttpInfo + * + * Get your teams. + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getTeamsAsyncWithHttpInfo(string $contentType = self::contentTypes['getTeams'][0]) + { + $returnType = '\Squidex\Client\Model\TeamDto[]'; + $request = $this->getTeamsRequest($contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getTeams' + * + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTeams'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getTeamsRequest(string $contentType = self::contentTypes['getTeams'][0]) + { + + + $resourcePath = '/api/teams'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postTeam + * + * Create a new team. + * + * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto + */ + public function postTeam($create_team_dto, string $contentType = self::contentTypes['postTeam'][0]) + { + list($response) = $this->postTeamWithHttpInfo($create_team_dto, $contentType); + return $response; + } + + /** + * Operation postTeamWithHttpInfo + * + * Create a new team. + * + * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + */ + public function postTeamWithHttpInfo($create_team_dto, string $contentType = self::contentTypes['postTeam'][0]) + { + $request = $this->postTeamRequest($create_team_dto, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $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: + if ('\Squidex\Client\Model\TeamDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\TeamDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\TeamDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Squidex\Client\Model\TeamDto'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\TeamDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation postTeamAsync + * + * Create a new team. + * + * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postTeamAsync($create_team_dto, string $contentType = self::contentTypes['postTeam'][0]) + { + return $this->postTeamAsyncWithHttpInfo($create_team_dto, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postTeamAsyncWithHttpInfo + * + * Create a new team. + * + * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2286,7 +2823,339 @@ function ($response) { public function postTeamAsyncWithHttpInfo($create_team_dto, string $contentType = self::contentTypes['postTeam'][0]) { $returnType = '\Squidex\Client\Model\TeamDto'; - $request = $this->postTeamRequest($create_team_dto, $contentType); + $request = $this->postTeamRequest($create_team_dto, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postTeam' + * + * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function postTeamRequest($create_team_dto, string $contentType = self::contentTypes['postTeam'][0]) + { + + // verify the required parameter 'create_team_dto' is set + if ($create_team_dto === null || (is_array($create_team_dto) && count($create_team_dto) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $create_team_dto when calling ' + ); + } + + + $resourcePath = '/api/teams'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_team_dto)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_team_dto)); + } else { + $httpBody = $create_team_dto; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation putTeam + * + * Update the team. + * + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto + */ + public function putTeam($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) + { + list($response) = $this->putTeamWithHttpInfo($team, $update_team_dto, $contentType); + return $response; + } + + /** + * Operation putTeamWithHttpInfo + * + * Update the team. + * + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation + * + * @throws \Squidex\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + */ + public function putTeamWithHttpInfo($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) + { + $request = $this->putTeamRequest($team, $update_team_dto, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $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: + if ('\Squidex\Client\Model\TeamDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\TeamDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\TeamDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\Squidex\Client\Model\ErrorDto' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Squidex\Client\Model\TeamDto'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\TeamDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Squidex\Client\Model\ErrorDto', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation putTeamAsync + * + * Update the team. + * + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putTeamAsync($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) + { + return $this->putTeamAsyncWithHttpInfo($team, $update_team_dto, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation putTeamAsyncWithHttpInfo + * + * Update the team. + * + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function putTeamAsyncWithHttpInfo($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) + { + $returnType = '\Squidex\Client\Model\TeamDto'; + $request = $this->putTeamRequest($team, $update_team_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2325,26 +3194,34 @@ function ($exception) { } /** - * Create request for operation 'postTeam' + * Create request for operation 'putTeam' * - * @param \Squidex\Client\Model\CreateTeamDto $create_team_dto The team object that needs to be added to Squidex. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTeam'] to see the possible values for this operation + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postTeamRequest($create_team_dto, string $contentType = self::contentTypes['postTeam'][0]) + public function putTeamRequest($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) { - // verify the required parameter 'create_team_dto' is set - if ($create_team_dto === null || (is_array($create_team_dto) && count($create_team_dto) === 0)) { + // verify the required parameter 'team' is set + if ($team === null || (is_array($team) && count($team) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $create_team_dto when calling ' + 'Missing the required parameter $team when calling ' + ); + } + + // verify the required parameter 'update_team_dto' is set + if ($update_team_dto === null || (is_array($update_team_dto) && count($update_team_dto) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $update_team_dto when calling ' ); } - $resourcePath = '/api/teams'; + $resourcePath = '/api/teams/{team}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2353,6 +3230,14 @@ public function postTeamRequest($create_team_dto, string $contentType = self::co + // path params + if ($team !== null) { + $resourcePath = str_replace( + '{' . 'team' . '}', + ObjectSerializer::toPathValue($team), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -2362,12 +3247,12 @@ public function postTeamRequest($create_team_dto, string $contentType = self::co ); // for model (json/xml) - if (isset($create_team_dto)) { + if (isset($update_team_dto)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_team_dto)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_team_dto)); } else { - $httpBody = $create_team_dto; + $httpBody = $update_team_dto; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -2408,7 +3293,7 @@ public function postTeamRequest($create_team_dto, string $contentType = self::co $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -2416,40 +3301,40 @@ public function postTeamRequest($create_team_dto, string $contentType = self::co } /** - * Operation putTeam + * Operation putTeamAuth * - * Update the team. + * Update the team auth. * - * @param string $team The name of the team to update. (required) - * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\AuthSchemeValueDto $auth_scheme_value_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeamAuth'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto + * @return \Squidex\Client\Model\AuthSchemeResponseDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function putTeam($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) + public function putTeamAuth($team, $auth_scheme_value_dto, string $contentType = self::contentTypes['putTeamAuth'][0]) { - list($response) = $this->putTeamWithHttpInfo($team, $update_team_dto, $contentType); + list($response) = $this->putTeamAuthWithHttpInfo($team, $auth_scheme_value_dto, $contentType); return $response; } /** - * Operation putTeamWithHttpInfo + * Operation putTeamAuthWithHttpInfo * - * Update the team. + * Update the team auth. * - * @param string $team The name of the team to update. (required) - * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\AuthSchemeValueDto $auth_scheme_value_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeamAuth'] to see the possible values for this operation * * @throws \Squidex\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Squidex\Client\Model\TeamDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) + * @return array of \Squidex\Client\Model\AuthSchemeResponseDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function putTeamWithHttpInfo($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) + public function putTeamAuthWithHttpInfo($team, $auth_scheme_value_dto, string $contentType = self::contentTypes['putTeamAuth'][0]) { - $request = $this->putTeamRequest($team, $update_team_dto, $contentType); + $request = $this->putTeamAuthRequest($team, $auth_scheme_value_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -2488,17 +3373,17 @@ public function putTeamWithHttpInfo($team, $update_team_dto, string $contentType switch($statusCode) { case 200: - if ('\Squidex\Client\Model\TeamDto' === '\SplFileObject') { + if ('\Squidex\Client\Model\AuthSchemeResponseDto' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\TeamDto' !== 'string') { + if ('\Squidex\Client\Model\AuthSchemeResponseDto' !== 'string') { $content = json_decode($content); } } return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\TeamDto', []), + ObjectSerializer::deserialize($content, '\Squidex\Client\Model\AuthSchemeResponseDto', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2534,7 +3419,7 @@ public function putTeamWithHttpInfo($team, $update_team_dto, string $contentType ]; } - $returnType = '\Squidex\Client\Model\TeamDto'; + $returnType = '\Squidex\Client\Model\AuthSchemeResponseDto'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -2555,7 +3440,7 @@ public function putTeamWithHttpInfo($team, $update_team_dto, string $contentType case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Squidex\Client\Model\TeamDto', + '\Squidex\Client\Model\AuthSchemeResponseDto', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2582,20 +3467,20 @@ public function putTeamWithHttpInfo($team, $update_team_dto, string $contentType } /** - * Operation putTeamAsync + * Operation putTeamAuthAsync * - * Update the team. + * Update the team auth. * - * @param string $team The name of the team to update. (required) - * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\AuthSchemeValueDto $auth_scheme_value_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeamAuth'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putTeamAsync($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) + public function putTeamAuthAsync($team, $auth_scheme_value_dto, string $contentType = self::contentTypes['putTeamAuth'][0]) { - return $this->putTeamAsyncWithHttpInfo($team, $update_team_dto, $contentType) + return $this->putTeamAuthAsyncWithHttpInfo($team, $auth_scheme_value_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -2604,21 +3489,21 @@ function ($response) { } /** - * Operation putTeamAsyncWithHttpInfo + * Operation putTeamAuthAsyncWithHttpInfo * - * Update the team. + * Update the team auth. * - * @param string $team The name of the team to update. (required) - * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\AuthSchemeValueDto $auth_scheme_value_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeamAuth'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function putTeamAsyncWithHttpInfo($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) + public function putTeamAuthAsyncWithHttpInfo($team, $auth_scheme_value_dto, string $contentType = self::contentTypes['putTeamAuth'][0]) { - $returnType = '\Squidex\Client\Model\TeamDto'; - $request = $this->putTeamRequest($team, $update_team_dto, $contentType); + $returnType = '\Squidex\Client\Model\AuthSchemeResponseDto'; + $request = $this->putTeamAuthRequest($team, $auth_scheme_value_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2657,16 +3542,16 @@ function ($exception) { } /** - * Create request for operation 'putTeam' + * Create request for operation 'putTeamAuth' * - * @param string $team The name of the team to update. (required) - * @param \Squidex\Client\Model\UpdateTeamDto $update_team_dto The values to update. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeam'] to see the possible values for this operation + * @param string $team The ID of the team to update. (required) + * @param \Squidex\Client\Model\AuthSchemeValueDto $auth_scheme_value_dto The values to update. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['putTeamAuth'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function putTeamRequest($team, $update_team_dto, string $contentType = self::contentTypes['putTeam'][0]) + public function putTeamAuthRequest($team, $auth_scheme_value_dto, string $contentType = self::contentTypes['putTeamAuth'][0]) { // verify the required parameter 'team' is set @@ -2676,15 +3561,15 @@ public function putTeamRequest($team, $update_team_dto, string $contentType = se ); } - // verify the required parameter 'update_team_dto' is set - if ($update_team_dto === null || (is_array($update_team_dto) && count($update_team_dto) === 0)) { + // verify the required parameter 'auth_scheme_value_dto' is set + if ($auth_scheme_value_dto === null || (is_array($auth_scheme_value_dto) && count($auth_scheme_value_dto) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $update_team_dto when calling ' + 'Missing the required parameter $auth_scheme_value_dto when calling ' ); } - $resourcePath = '/api/teams/{team}'; + $resourcePath = '/api/teams/{team}/auth'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2710,12 +3595,12 @@ public function putTeamRequest($team, $update_team_dto, string $contentType = se ); // for model (json/xml) - if (isset($update_team_dto)) { + if (isset($auth_scheme_value_dto)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_team_dto)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($auth_scheme_value_dto)); } else { - $httpBody = $update_team_dto; + $httpBody = $auth_scheme_value_dto; } } elseif (count($formParams) > 0) { if ($multipart) { diff --git a/lib/Api/TemplatesApi.php b/lib/Api/TemplatesApi.php index 0d5414f..b0ec554 100644 --- a/lib/Api/TemplatesApi.php +++ b/lib/Api/TemplatesApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Api/TranslationsApi.php b/lib/Api/TranslationsApi.php index 4041ab5..4ee63e9 100644 --- a/lib/Api/TranslationsApi.php +++ b/lib/Api/TranslationsApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -76,9 +76,6 @@ class TranslationsApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'postQuestion' => [ - 'application/json', - ], 'postTranslation' => [ 'application/json', ], @@ -122,360 +119,11 @@ public function getConfig() return $this->config; } - /** - * Operation postQuestion - * - * Asks the chatbot a question a text. - * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AskDto $ask_dto The question request. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postQuestion'] to see the possible values for this operation - * - * @throws \Squidex\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return string[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto - */ - public function postQuestion($app, $ask_dto, string $contentType = self::contentTypes['postQuestion'][0]) - { - list($response) = $this->postQuestionWithHttpInfo($app, $ask_dto, $contentType); - return $response; - } - - /** - * Operation postQuestionWithHttpInfo - * - * Asks the chatbot a question a text. - * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AskDto $ask_dto The question request. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postQuestion'] to see the possible values for this operation - * - * @throws \Squidex\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of string[]|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) - */ - public function postQuestionWithHttpInfo($app, $ask_dto, string $contentType = self::contentTypes['postQuestion'][0]) - { - $request = $this->postQuestionRequest($app, $ask_dto, $contentType); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $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: - if ('string[]' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('string[]' !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, 'string[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\ErrorDto' !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Squidex\Client\Model\ErrorDto' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\Squidex\Client\Model\ErrorDto' !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, '\Squidex\Client\Model\ErrorDto', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'string[]'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'string[]', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Squidex\Client\Model\ErrorDto', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Squidex\Client\Model\ErrorDto', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation postQuestionAsync - * - * Asks the chatbot a question a text. - * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AskDto $ask_dto The question request. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postQuestion'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function postQuestionAsync($app, $ask_dto, string $contentType = self::contentTypes['postQuestion'][0]) - { - return $this->postQuestionAsyncWithHttpInfo($app, $ask_dto, $contentType) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation postQuestionAsyncWithHttpInfo - * - * Asks the chatbot a question a text. - * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AskDto $ask_dto The question request. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postQuestion'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function postQuestionAsyncWithHttpInfo($app, $ask_dto, string $contentType = self::contentTypes['postQuestion'][0]) - { - $returnType = 'string[]'; - $request = $this->postQuestionRequest($app, $ask_dto, $contentType); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'postQuestion' - * - * @param string $app The name of the app. (required) - * @param \Squidex\Client\Model\AskDto $ask_dto The question request. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postQuestion'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function postQuestionRequest($app, $ask_dto, string $contentType = self::contentTypes['postQuestion'][0]) - { - - // verify the required parameter 'app' is set - if ($app === null || (is_array($app) && count($app) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app when calling ' - ); - } - - // verify the required parameter 'ask_dto' is set - if ($ask_dto === null || (is_array($ask_dto) && count($ask_dto) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $ask_dto when calling ' - ); - } - - - $resourcePath = '/api/apps/{app}/ask'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($app !== null) { - $resourcePath = str_replace( - '{' . 'app' . '}', - ObjectSerializer::toPathValue($app), - $resourcePath - ); - } - - - $headers = $this->headerSelector->selectHeaders( - ['application/json', ], - $contentType, - $multipart - ); - - // for model (json/xml) - if (isset($ask_dto)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($ask_dto)); - } else { - $httpBody = $ask_dto; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHost = $this->config->getHost(); - $query = ObjectSerializer::buildQuery($queryParams); - return new Request( - 'POST', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - /** * Operation postTranslation * * Translate a text. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\TranslateDto $translate_dto The translation request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTranslation'] to see the possible values for this operation * @@ -483,9 +131,9 @@ public function postQuestionRequest($app, $ask_dto, string $contentType = self:: * @throws \InvalidArgumentException * @return \Squidex\Client\Model\TranslationDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto */ - public function postTranslation($app, $translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) + public function postTranslation($translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) { - list($response) = $this->postTranslationWithHttpInfo($app, $translate_dto, $contentType); + list($response) = $this->postTranslationWithHttpInfo($translate_dto, $contentType); return $response; } @@ -494,7 +142,6 @@ public function postTranslation($app, $translate_dto, string $contentType = self * * Translate a text. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\TranslateDto $translate_dto The translation request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTranslation'] to see the possible values for this operation * @@ -502,9 +149,9 @@ public function postTranslation($app, $translate_dto, string $contentType = self * @throws \InvalidArgumentException * @return array of \Squidex\Client\Model\TranslationDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings) */ - public function postTranslationWithHttpInfo($app, $translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) + public function postTranslationWithHttpInfo($translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) { - $request = $this->postTranslationRequest($app, $translate_dto, $contentType); + $request = $this->postTranslationRequest($translate_dto, $contentType); try { $options = $this->createHttpClientOption(); @@ -641,16 +288,15 @@ public function postTranslationWithHttpInfo($app, $translate_dto, string $conten * * Translate a text. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\TranslateDto $translate_dto The translation request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTranslation'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postTranslationAsync($app, $translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) + public function postTranslationAsync($translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) { - return $this->postTranslationAsyncWithHttpInfo($app, $translate_dto, $contentType) + return $this->postTranslationAsyncWithHttpInfo($translate_dto, $contentType) ->then( function ($response) { return $response[0]; @@ -663,17 +309,16 @@ function ($response) { * * Translate a text. * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\TranslateDto $translate_dto The translation request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTranslation'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postTranslationAsyncWithHttpInfo($app, $translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) + public function postTranslationAsyncWithHttpInfo($translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) { $returnType = '\Squidex\Client\Model\TranslationDto'; - $request = $this->postTranslationRequest($app, $translate_dto, $contentType); + $request = $this->postTranslationRequest($translate_dto, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -714,17 +359,17 @@ function ($exception) { /** * Create request for operation 'postTranslation' * - * @param string $app The name of the app. (required) * @param \Squidex\Client\Model\TranslateDto $translate_dto The translation request. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postTranslation'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postTranslationRequest($app, $translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) + public function postTranslationRequest($translate_dto, string $contentType = self::contentTypes['postTranslation'][0]) { // verify the required parameter 'app' is set + $app = $this->config->getAppName(); if ($app === null || (is_array($app) && count($app) === 0)) { throw new \InvalidArgumentException( 'Missing the required parameter $app when calling ' diff --git a/lib/Api/UserManagementApi.php b/lib/Api/UserManagementApi.php index 991e81d..eda0dfa 100644 --- a/lib/Api/UserManagementApi.php +++ b/lib/Api/UserManagementApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Api/UsersApi.php b/lib/Api/UsersApi.php index 3b9cfad..02892fc 100644 --- a/lib/Api/UsersApi.php +++ b/lib/Api/UsersApi.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/ApiException.php b/lib/ApiException.php index f246036..feafe5a 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.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/lib/Configuration.php b/lib/Configuration.php index c6371cf..3903a58 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index ea51ee7..728d9af 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -16,7 +16,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ActionTypeEnum.php b/lib/Model/ActionTypeEnum.php index 4423aa9..a6c0033 100644 --- a/lib/Model/ActionTypeEnum.php +++ b/lib/Model/ActionTypeEnum.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AddFieldDto.php b/lib/Model/AddFieldDto.php index 31242c1..3d79a05 100644 --- a/lib/Model/AddFieldDto.php +++ b/lib/Model/AddFieldDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AddLanguageDto.php b/lib/Model/AddLanguageDto.php index 059c23f..d9a0e2e 100644 --- a/lib/Model/AddLanguageDto.php +++ b/lib/Model/AddLanguageDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -302,10 +302,6 @@ public function listInvalidProperties() if ($this->container['language'] === null) { $invalidProperties[] = "'language' can't be null"; } - if ((mb_strlen($this->container['language']) < 1)) { - $invalidProperties[] = "invalid value for 'language', the character length must be bigger than or equal to 1."; - } - return $invalidProperties; } @@ -343,8 +339,6 @@ public function setLanguage($language) if (is_null($language)) { throw new \InvalidArgumentException('non-nullable language cannot be null'); } - - $this->container['language'] = $language; return $this; diff --git a/lib/Model/AddRoleDto.php b/lib/Model/AddRoleDto.php index 0fffde6..786be0c 100644 --- a/lib/Model/AddRoleDto.php +++ b/lib/Model/AddRoleDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AddWorkflowDto.php b/lib/Model/AddWorkflowDto.php index 62b9e78..0a878fd 100644 --- a/lib/Model/AddWorkflowDto.php +++ b/lib/Model/AddWorkflowDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AlgoliaRuleActionDto.php b/lib/Model/AlgoliaRuleActionDto.php index 9578fee..bc75ca7 100644 --- a/lib/Model/AlgoliaRuleActionDto.php +++ b/lib/Model/AlgoliaRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AllContentsByPostDto.php b/lib/Model/AllContentsByPostDto.php index fa3f829..2ae1347 100644 --- a/lib/Model/AllContentsByPostDto.php +++ b/lib/Model/AllContentsByPostDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AnnotateAssetDto.php b/lib/Model/AnnotateAssetDto.php index 8997cb9..4338cd4 100644 --- a/lib/Model/AnnotateAssetDto.php +++ b/lib/Model/AnnotateAssetDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AppDto.php b/lib/Model/AppDto.php index 48cc490..5d73206 100644 --- a/lib/Model/AppDto.php +++ b/lib/Model/AppDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AppLanguageDto.php b/lib/Model/AppLanguageDto.php index bb887a5..734205e 100644 --- a/lib/Model/AppLanguageDto.php +++ b/lib/Model/AppLanguageDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AppLanguagesDto.php b/lib/Model/AppLanguagesDto.php index 994caa1..faef212 100644 --- a/lib/Model/AppLanguagesDto.php +++ b/lib/Model/AppLanguagesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AppSettingsDto.php b/lib/Model/AppSettingsDto.php index c3d63ce..fdba0ab 100644 --- a/lib/Model/AppSettingsDto.php +++ b/lib/Model/AppSettingsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ArrayCalculatedDefaultValue.php b/lib/Model/ArrayCalculatedDefaultValue.php index 628ccb0..4ace7b7 100644 --- a/lib/Model/ArrayCalculatedDefaultValue.php +++ b/lib/Model/ArrayCalculatedDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ArrayFieldPropertiesDto.php b/lib/Model/ArrayFieldPropertiesDto.php index fe3b23d..2f8c369 100644 --- a/lib/Model/ArrayFieldPropertiesDto.php +++ b/lib/Model/ArrayFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetChangedRuleTriggerDto.php b/lib/Model/AssetChangedRuleTriggerDto.php index 1234b24..6f9bd75 100644 --- a/lib/Model/AssetChangedRuleTriggerDto.php +++ b/lib/Model/AssetChangedRuleTriggerDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetDto.php b/lib/Model/AssetDto.php index 1694bd3..0d9adc9 100644 --- a/lib/Model/AssetDto.php +++ b/lib/Model/AssetDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetFolderDto.php b/lib/Model/AssetFolderDto.php index 5b3d3c8..5084305 100644 --- a/lib/Model/AssetFolderDto.php +++ b/lib/Model/AssetFolderDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetFolderScope.php b/lib/Model/AssetFolderScope.php index 2ddc391..c98e16c 100644 --- a/lib/Model/AssetFolderScope.php +++ b/lib/Model/AssetFolderScope.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetFoldersDto.php b/lib/Model/AssetFoldersDto.php index 396a63c..e55c033 100644 --- a/lib/Model/AssetFoldersDto.php +++ b/lib/Model/AssetFoldersDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetMeta.php b/lib/Model/AssetMeta.php index b07498c..aa38b83 100644 --- a/lib/Model/AssetMeta.php +++ b/lib/Model/AssetMeta.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetPreviewMode.php b/lib/Model/AssetPreviewMode.php index a31a552..e03f1f9 100644 --- a/lib/Model/AssetPreviewMode.php +++ b/lib/Model/AssetPreviewMode.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetScriptsDto.php b/lib/Model/AssetScriptsDto.php index ae387e0..d0153e6 100644 --- a/lib/Model/AssetScriptsDto.php +++ b/lib/Model/AssetScriptsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetType.php b/lib/Model/AssetType.php index 91240ac..111480c 100644 --- a/lib/Model/AssetType.php +++ b/lib/Model/AssetType.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetsDto.php b/lib/Model/AssetsDto.php index 7a70e24..8fac614 100644 --- a/lib/Model/AssetsDto.php +++ b/lib/Model/AssetsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssetsFieldPropertiesDto.php b/lib/Model/AssetsFieldPropertiesDto.php index 7590630..4b01a4e 100644 --- a/lib/Model/AssetsFieldPropertiesDto.php +++ b/lib/Model/AssetsFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AssignContributorDto.php b/lib/Model/AssignContributorDto.php index 39f1d71..3080c07 100644 --- a/lib/Model/AssignContributorDto.php +++ b/lib/Model/AssignContributorDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/AuthSchemeDto.php b/lib/Model/AuthSchemeDto.php new file mode 100644 index 0000000..a9244b5 --- /dev/null +++ b/lib/Model/AuthSchemeDto.php @@ -0,0 +1,656 @@ + + */ +class AuthSchemeDto implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AuthSchemeDto'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'domain' => 'string', + 'display_name' => 'string', + 'client_id' => 'string', + 'client_secret' => 'string', + 'authority' => 'string', + 'signout_redirect_url' => 'string' + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappings = [ + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappingsReverse = [ + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'domain' => null, + 'display_name' => null, + 'client_id' => null, + 'client_secret' => null, + 'authority' => null, + 'signout_redirect_url' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'domain' => false, + 'display_name' => false, + 'client_id' => false, + 'client_secret' => false, + 'authority' => false, + 'signout_redirect_url' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of discriminator mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIMappings() + { + return self::$openAPIMappings; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domain' => 'domain', + 'display_name' => 'displayName', + 'client_id' => 'clientId', + 'client_secret' => 'clientSecret', + 'authority' => 'authority', + 'signout_redirect_url' => 'signoutRedirectUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domain' => 'setDomain', + 'display_name' => 'setDisplayName', + 'client_id' => 'setClientId', + 'client_secret' => 'setClientSecret', + 'authority' => 'setAuthority', + 'signout_redirect_url' => 'setSignoutRedirectUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domain' => 'getDomain', + 'display_name' => 'getDisplayName', + 'client_id' => 'getClientId', + 'client_secret' => 'getClientSecret', + 'authority' => 'getAuthority', + 'signout_redirect_url' => 'getSignoutRedirectUrl' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('domain', $data ?? [], null); + $this->setIfExists('display_name', $data ?? [], null); + $this->setIfExists('client_id', $data ?? [], null); + $this->setIfExists('client_secret', $data ?? [], null); + $this->setIfExists('authority', $data ?? [], null); + $this->setIfExists('signout_redirect_url', $data ?? [], null); + + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['domain'] === null) { + $invalidProperties[] = "'domain' can't be null"; + } + if ((mb_strlen($this->container['domain']) < 1)) { + $invalidProperties[] = "invalid value for 'domain', the character length must be bigger than or equal to 1."; + } + + if ($this->container['display_name'] === null) { + $invalidProperties[] = "'display_name' can't be null"; + } + if ((mb_strlen($this->container['display_name']) < 1)) { + $invalidProperties[] = "invalid value for 'display_name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['client_id'] === null) { + $invalidProperties[] = "'client_id' can't be null"; + } + if ((mb_strlen($this->container['client_id']) < 1)) { + $invalidProperties[] = "invalid value for 'client_id', the character length must be bigger than or equal to 1."; + } + + if ($this->container['client_secret'] === null) { + $invalidProperties[] = "'client_secret' can't be null"; + } + if ((mb_strlen($this->container['client_secret']) < 1)) { + $invalidProperties[] = "invalid value for 'client_secret', the character length must be bigger than or equal to 1."; + } + + if ($this->container['authority'] === null) { + $invalidProperties[] = "'authority' can't be null"; + } + if ((mb_strlen($this->container['authority']) < 1)) { + $invalidProperties[] = "invalid value for 'authority', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domain + * + * @return string + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string $domain The domain name of your user accounts. + * + * @return self + */ + public function setDomain($domain) + { + if (is_null($domain)) { + throw new \InvalidArgumentException('non-nullable domain cannot be null'); + } + + + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets display_name + * + * @return string + */ + public function getDisplayName() + { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string $display_name The display name for buttons. + * + * @return self + */ + public function setDisplayName($display_name) + { + if (is_null($display_name)) { + throw new \InvalidArgumentException('non-nullable display_name cannot be null'); + } + + + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets client_id + * + * @return string + */ + public function getClientId() + { + return $this->container['client_id']; + } + + /** + * Sets client_id + * + * @param string $client_id The client ID. + * + * @return self + */ + public function setClientId($client_id) + { + if (is_null($client_id)) { + throw new \InvalidArgumentException('non-nullable client_id cannot be null'); + } + + + $this->container['client_id'] = $client_id; + + return $this; + } + + /** + * Gets client_secret + * + * @return string + */ + public function getClientSecret() + { + return $this->container['client_secret']; + } + + /** + * Sets client_secret + * + * @param string $client_secret The client secret. + * + * @return self + */ + public function setClientSecret($client_secret) + { + if (is_null($client_secret)) { + throw new \InvalidArgumentException('non-nullable client_secret cannot be null'); + } + + + $this->container['client_secret'] = $client_secret; + + return $this; + } + + /** + * Gets authority + * + * @return string + */ + public function getAuthority() + { + return $this->container['authority']; + } + + /** + * Sets authority + * + * @param string $authority The authority URL. + * + * @return self + */ + public function setAuthority($authority) + { + if (is_null($authority)) { + throw new \InvalidArgumentException('non-nullable authority cannot be null'); + } + + + $this->container['authority'] = $authority; + + return $this; + } + + /** + * Gets signout_redirect_url + * + * @return string|null + */ + public function getSignoutRedirectUrl() + { + return $this->container['signout_redirect_url']; + } + + /** + * Sets signout_redirect_url + * + * @param string|null $signout_redirect_url The URL to redirect after a signout. + * + * @return self + */ + public function setSignoutRedirectUrl($signout_redirect_url) + { + if (is_null($signout_redirect_url)) { + array_push($this->openAPINullablesSetToNull, 'signout_redirect_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('signout_redirect_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['signout_redirect_url'] = $signout_redirect_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/AuthSchemeResponseDto.php b/lib/Model/AuthSchemeResponseDto.php new file mode 100644 index 0000000..aa0eba6 --- /dev/null +++ b/lib/Model/AuthSchemeResponseDto.php @@ -0,0 +1,471 @@ + + */ +class AuthSchemeResponseDto implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AuthSchemeResponseDto'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + '_links' => 'array', + 'scheme' => '\Squidex\Client\Model\AuthSchemeDto' + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappings = [ + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappingsReverse = [ + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + '_links' => null, + 'scheme' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + '_links' => false, + 'scheme' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of discriminator mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIMappings() + { + return self::$openAPIMappings; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links', + 'scheme' => 'scheme' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks', + 'scheme' => 'setScheme' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks', + 'scheme' => 'getScheme' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('_links', $data ?? [], null); + $this->setIfExists('scheme', $data ?? [], null); + + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['_links'] === null) { + $invalidProperties[] = "'_links' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return array + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param array $_links The links. + * + * @return self + */ + public function setLinks($_links) + { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + + /** + * Gets scheme + * + * @return \Squidex\Client\Model\AuthSchemeDto|null + */ + public function getScheme() + { + return $this->container['scheme']; + } + + /** + * Sets scheme + * + * @param \Squidex\Client\Model\AuthSchemeDto|null $scheme scheme + * + * @return self + */ + public function setScheme($scheme) + { + if (is_null($scheme)) { + throw new \InvalidArgumentException('non-nullable scheme cannot be null'); + } + $this->container['scheme'] = $scheme; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/AuthSchemeValueDto.php b/lib/Model/AuthSchemeValueDto.php new file mode 100644 index 0000000..8852e51 --- /dev/null +++ b/lib/Model/AuthSchemeValueDto.php @@ -0,0 +1,434 @@ + + */ +class AuthSchemeValueDto implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AuthSchemeValueDto'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'scheme' => '\Squidex\Client\Model\AuthSchemeDto' + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappings = [ + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappingsReverse = [ + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'scheme' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'scheme' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of discriminator mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIMappings() + { + return self::$openAPIMappings; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scheme' => 'scheme' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scheme' => 'setScheme' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scheme' => 'getScheme' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('scheme', $data ?? [], null); + + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scheme + * + * @return \Squidex\Client\Model\AuthSchemeDto|null + */ + public function getScheme() + { + return $this->container['scheme']; + } + + /** + * Sets scheme + * + * @param \Squidex\Client\Model\AuthSchemeDto|null $scheme scheme + * + * @return self + */ + public function setScheme($scheme) + { + if (is_null($scheme)) { + throw new \InvalidArgumentException('non-nullable scheme cannot be null'); + } + $this->container['scheme'] = $scheme; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/AzureQueueRuleActionDto.php b/lib/Model/AzureQueueRuleActionDto.php index 5ca61f1..a58b6c5 100644 --- a/lib/Model/AzureQueueRuleActionDto.php +++ b/lib/Model/AzureQueueRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/BackupJobDto.php b/lib/Model/BackupJobDto.php index 751f818..6a3aed0 100644 --- a/lib/Model/BackupJobDto.php +++ b/lib/Model/BackupJobDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/BackupJobsDto.php b/lib/Model/BackupJobsDto.php index 81838dc..5dfb046 100644 --- a/lib/Model/BackupJobsDto.php +++ b/lib/Model/BackupJobsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/BooleanFieldEditor.php b/lib/Model/BooleanFieldEditor.php index 5ad216c..c804160 100644 --- a/lib/Model/BooleanFieldEditor.php +++ b/lib/Model/BooleanFieldEditor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/BooleanFieldPropertiesDto.php b/lib/Model/BooleanFieldPropertiesDto.php index 9740a3a..dd3d59e 100644 --- a/lib/Model/BooleanFieldPropertiesDto.php +++ b/lib/Model/BooleanFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/BulkResultDto.php b/lib/Model/BulkResultDto.php index c177231..1e21770 100644 --- a/lib/Model/BulkResultDto.php +++ b/lib/Model/BulkResultDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/BulkUpdateAssetType.php b/lib/Model/BulkUpdateAssetType.php index 957c013..3e03645 100644 --- a/lib/Model/BulkUpdateAssetType.php +++ b/lib/Model/BulkUpdateAssetType.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/BulkUpdateAssetsDto.php b/lib/Model/BulkUpdateAssetsDto.php index 78e5417..471b918 100644 --- a/lib/Model/BulkUpdateAssetsDto.php +++ b/lib/Model/BulkUpdateAssetsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/BulkUpdateAssetsJobDto.php b/lib/Model/BulkUpdateAssetsJobDto.php index 6254b18..e11b5d3 100644 --- a/lib/Model/BulkUpdateAssetsJobDto.php +++ b/lib/Model/BulkUpdateAssetsJobDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/BulkUpdateContentType.php b/lib/Model/BulkUpdateContentType.php index 45a59d0..817c662 100644 --- a/lib/Model/BulkUpdateContentType.php +++ b/lib/Model/BulkUpdateContentType.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -57,6 +57,8 @@ class BulkUpdateContentType public const VALIDATE = 'Validate'; + public const ENRICH_DEFAULTS = 'EnrichDefaults'; + /** * Gets allowable values of the enum * @return string[] @@ -70,7 +72,8 @@ public static function getAllowableEnumValues() self::DELETE, self::PATCH, self::UPDATE, - self::VALIDATE + self::VALIDATE, + self::ENRICH_DEFAULTS ]; } } diff --git a/lib/Model/BulkUpdateContentsDto.php b/lib/Model/BulkUpdateContentsDto.php index de16966..ef58db3 100644 --- a/lib/Model/BulkUpdateContentsDto.php +++ b/lib/Model/BulkUpdateContentsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -60,6 +60,7 @@ class BulkUpdateContentsDto implements ModelInterface, ArrayAccess, \JsonSeriali 'jobs' => '\Squidex\Client\Model\BulkUpdateContentsJobDto[]', 'publish' => 'bool', 'do_not_script' => 'bool', + 'enrich_required_fields' => 'bool', 'do_not_validate' => 'bool', 'do_not_validate_workflow' => 'bool', 'check_referrers' => 'bool', @@ -91,6 +92,7 @@ class BulkUpdateContentsDto implements ModelInterface, ArrayAccess, \JsonSeriali 'jobs' => null, 'publish' => null, 'do_not_script' => null, + 'enrich_required_fields' => null, 'do_not_validate' => null, 'do_not_validate_workflow' => null, 'check_referrers' => null, @@ -106,6 +108,7 @@ class BulkUpdateContentsDto implements ModelInterface, ArrayAccess, \JsonSeriali 'jobs' => false, 'publish' => false, 'do_not_script' => false, + 'enrich_required_fields' => false, 'do_not_validate' => false, 'do_not_validate_workflow' => false, 'check_referrers' => false, @@ -211,6 +214,7 @@ public function isNullableSetToNull(string $property): bool 'jobs' => 'jobs', 'publish' => 'publish', 'do_not_script' => 'doNotScript', + 'enrich_required_fields' => 'enrichRequiredFields', 'do_not_validate' => 'doNotValidate', 'do_not_validate_workflow' => 'doNotValidateWorkflow', 'check_referrers' => 'checkReferrers', @@ -226,6 +230,7 @@ public function isNullableSetToNull(string $property): bool 'jobs' => 'setJobs', 'publish' => 'setPublish', 'do_not_script' => 'setDoNotScript', + 'enrich_required_fields' => 'setEnrichRequiredFields', 'do_not_validate' => 'setDoNotValidate', 'do_not_validate_workflow' => 'setDoNotValidateWorkflow', 'check_referrers' => 'setCheckReferrers', @@ -241,6 +246,7 @@ public function isNullableSetToNull(string $property): bool 'jobs' => 'getJobs', 'publish' => 'getPublish', 'do_not_script' => 'getDoNotScript', + 'enrich_required_fields' => 'getEnrichRequiredFields', 'do_not_validate' => 'getDoNotValidate', 'do_not_validate_workflow' => 'getDoNotValidateWorkflow', 'check_referrers' => 'getCheckReferrers', @@ -307,6 +313,7 @@ public function __construct(array $data = null) $this->setIfExists('jobs', $data ?? [], null); $this->setIfExists('publish', $data ?? [], null); $this->setIfExists('do_not_script', $data ?? [], null); + $this->setIfExists('enrich_required_fields', $data ?? [], null); $this->setIfExists('do_not_validate', $data ?? [], null); $this->setIfExists('do_not_validate_workflow', $data ?? [], null); $this->setIfExists('check_referrers', $data ?? [], null); @@ -442,6 +449,33 @@ public function setDoNotScript($do_not_script) return $this; } + /** + * Gets enrich_required_fields + * + * @return bool|null + */ + public function getEnrichRequiredFields() + { + return $this->container['enrich_required_fields']; + } + + /** + * Sets enrich_required_fields + * + * @param bool|null $enrich_required_fields True, to also enrich required fields. Default: false. + * + * @return self + */ + public function setEnrichRequiredFields($enrich_required_fields) + { + if (is_null($enrich_required_fields)) { + throw new \InvalidArgumentException('non-nullable enrich_required_fields cannot be null'); + } + $this->container['enrich_required_fields'] = $enrich_required_fields; + + return $this; + } + /** * Gets do_not_validate * diff --git a/lib/Model/BulkUpdateContentsJobDto.php b/lib/Model/BulkUpdateContentsJobDto.php index ba86ee5..68ae04e 100644 --- a/lib/Model/BulkUpdateContentsJobDto.php +++ b/lib/Model/BulkUpdateContentsJobDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -66,6 +66,7 @@ class BulkUpdateContentsJobDto implements ModelInterface, ArrayAccess, \JsonSeri 'schema' => 'string', 'patch' => 'bool', 'permanent' => 'bool', + 'enrich_defaults' => 'bool', 'expected_count' => 'int', 'expected_version' => 'int' ]; @@ -101,6 +102,7 @@ class BulkUpdateContentsJobDto implements ModelInterface, ArrayAccess, \JsonSeri 'schema' => null, 'patch' => null, 'permanent' => null, + 'enrich_defaults' => null, 'expected_count' => 'int64', 'expected_version' => 'int64' ]; @@ -120,6 +122,7 @@ class BulkUpdateContentsJobDto implements ModelInterface, ArrayAccess, \JsonSeri 'schema' => true, 'patch' => false, 'permanent' => false, + 'enrich_defaults' => false, 'expected_count' => false, 'expected_version' => false ]; @@ -229,6 +232,7 @@ public function isNullableSetToNull(string $property): bool 'schema' => 'schema', 'patch' => 'patch', 'permanent' => 'permanent', + 'enrich_defaults' => 'enrichDefaults', 'expected_count' => 'expectedCount', 'expected_version' => 'expectedVersion' ]; @@ -248,6 +252,7 @@ public function isNullableSetToNull(string $property): bool 'schema' => 'setSchema', 'patch' => 'setPatch', 'permanent' => 'setPermanent', + 'enrich_defaults' => 'setEnrichDefaults', 'expected_count' => 'setExpectedCount', 'expected_version' => 'setExpectedVersion' ]; @@ -267,6 +272,7 @@ public function isNullableSetToNull(string $property): bool 'schema' => 'getSchema', 'patch' => 'getPatch', 'permanent' => 'getPermanent', + 'enrich_defaults' => 'getEnrichDefaults', 'expected_count' => 'getExpectedCount', 'expected_version' => 'getExpectedVersion' ]; @@ -337,6 +343,7 @@ public function __construct(array $data = null) $this->setIfExists('schema', $data ?? [], null); $this->setIfExists('patch', $data ?? [], null); $this->setIfExists('permanent', $data ?? [], null); + $this->setIfExists('enrich_defaults', $data ?? [], null); $this->setIfExists('expected_count', $data ?? [], null); $this->setIfExists('expected_version', $data ?? [], null); @@ -655,6 +662,33 @@ public function setPermanent($permanent) return $this; } + /** + * Gets enrich_defaults + * + * @return bool|null + */ + public function getEnrichDefaults() + { + return $this->container['enrich_defaults']; + } + + /** + * Sets enrich_defaults + * + * @param bool|null $enrich_defaults Enrich the data with the default values when updating a content item. + * + * @return self + */ + public function setEnrichDefaults($enrich_defaults) + { + if (is_null($enrich_defaults)) { + throw new \InvalidArgumentException('non-nullable enrich_defaults cannot be null'); + } + $this->container['enrich_defaults'] = $enrich_defaults; + + return $this; + } + /** * Gets expected_count * diff --git a/lib/Model/CallsUsageDtoDto.php b/lib/Model/CallsUsageDtoDto.php index db4cd21..48dfb9f 100644 --- a/lib/Model/CallsUsageDtoDto.php +++ b/lib/Model/CallsUsageDtoDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CallsUsagePerDateDto.php b/lib/Model/CallsUsagePerDateDto.php index d59672c..7cfa8ec 100644 --- a/lib/Model/CallsUsagePerDateDto.php +++ b/lib/Model/CallsUsagePerDateDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ChangeCategoryDto.php b/lib/Model/ChangeCategoryDto.php index 20fe531..df8ef85 100644 --- a/lib/Model/ChangeCategoryDto.php +++ b/lib/Model/ChangeCategoryDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ChangePlanDto.php b/lib/Model/ChangePlanDto.php index 6c926fc..a30a9f2 100644 --- a/lib/Model/ChangePlanDto.php +++ b/lib/Model/ChangePlanDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ChangeStatusDto.php b/lib/Model/ChangeStatusDto.php index edac937..4f40ed1 100644 --- a/lib/Model/ChangeStatusDto.php +++ b/lib/Model/ChangeStatusDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -316,10 +316,6 @@ public function listInvalidProperties() if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ((mb_strlen($this->container['status']) < 1)) { - $invalidProperties[] = "invalid value for 'status', the character length must be bigger than or equal to 1."; - } - return $invalidProperties; } @@ -357,8 +353,6 @@ public function setStatus($status) if (is_null($status)) { throw new \InvalidArgumentException('non-nullable status cannot be null'); } - - $this->container['status'] = $status; return $this; diff --git a/lib/Model/ClientDto.php b/lib/Model/ClientDto.php index 69b8474..751ff2c 100644 --- a/lib/Model/ClientDto.php +++ b/lib/Model/ClientDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ClientsDto.php b/lib/Model/ClientsDto.php index 9f75cd3..7267526 100644 --- a/lib/Model/ClientsDto.php +++ b/lib/Model/ClientsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CommentRuleActionDto.php b/lib/Model/CommentRuleActionDto.php index 6b49154..fd39e5a 100644 --- a/lib/Model/CommentRuleActionDto.php +++ b/lib/Model/CommentRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CommentRuleTriggerDto.php b/lib/Model/CommentRuleTriggerDto.php index fd6df7f..facf8c0 100644 --- a/lib/Model/CommentRuleTriggerDto.php +++ b/lib/Model/CommentRuleTriggerDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ComponentFieldPropertiesDto.php b/lib/Model/ComponentFieldPropertiesDto.php index 309d789..9d79d01 100644 --- a/lib/Model/ComponentFieldPropertiesDto.php +++ b/lib/Model/ComponentFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ComponentsFieldPropertiesDto.php b/lib/Model/ComponentsFieldPropertiesDto.php index 34b0b19..d57ce79 100644 --- a/lib/Model/ComponentsFieldPropertiesDto.php +++ b/lib/Model/ComponentsFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ConfigureFieldRulesDto.php b/lib/Model/ConfigureFieldRulesDto.php index 7314a55..13fa407 100644 --- a/lib/Model/ConfigureFieldRulesDto.php +++ b/lib/Model/ConfigureFieldRulesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ConfigureUIFieldsDto.php b/lib/Model/ConfigureUIFieldsDto.php index dc34ffa..ef6a803 100644 --- a/lib/Model/ConfigureUIFieldsDto.php +++ b/lib/Model/ConfigureUIFieldsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ContentChangedRuleTriggerDto.php b/lib/Model/ContentChangedRuleTriggerDto.php index cb6151c..4ed47bb 100644 --- a/lib/Model/ContentChangedRuleTriggerDto.php +++ b/lib/Model/ContentChangedRuleTriggerDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ContentDto.php b/lib/Model/ContentDto.php index 29771fa..c0c8467 100644 --- a/lib/Model/ContentDto.php +++ b/lib/Model/ContentDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ContentsDto.php b/lib/Model/ContentsDto.php index de31e4a..a5d1012 100644 --- a/lib/Model/ContentsDto.php +++ b/lib/Model/ContentsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ContributorDto.php b/lib/Model/ContributorDto.php index fa2aa1d..ae670af 100644 --- a/lib/Model/ContributorDto.php +++ b/lib/Model/ContributorDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ContributorsDto.php b/lib/Model/ContributorsDto.php index 88917ea..c37600c 100644 --- a/lib/Model/ContributorsDto.php +++ b/lib/Model/ContributorsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ContributorsMetadata.php b/lib/Model/ContributorsMetadata.php index 40be847..79c4c23 100644 --- a/lib/Model/ContributorsMetadata.php +++ b/lib/Model/ContributorsMetadata.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CreateAppDto.php b/lib/Model/CreateAppDto.php index 2272c91..b0b62fc 100644 --- a/lib/Model/CreateAppDto.php +++ b/lib/Model/CreateAppDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CreateAssetFolderDto.php b/lib/Model/CreateAssetFolderDto.php index ddb41c0..36a63b3 100644 --- a/lib/Model/CreateAssetFolderDto.php +++ b/lib/Model/CreateAssetFolderDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CreateClientDto.php b/lib/Model/CreateClientDto.php index 73c44d5..f4dc1fb 100644 --- a/lib/Model/CreateClientDto.php +++ b/lib/Model/CreateClientDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CreateContentRuleActionDto.php b/lib/Model/CreateContentRuleActionDto.php index 8d96282..b68e861 100644 --- a/lib/Model/CreateContentRuleActionDto.php +++ b/lib/Model/CreateContentRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CreateRuleDto.php b/lib/Model/CreateRuleDto.php index db7a400..1f95a65 100644 --- a/lib/Model/CreateRuleDto.php +++ b/lib/Model/CreateRuleDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CreateSchemaDto.php b/lib/Model/CreateSchemaDto.php index f334138..0f23fc4 100644 --- a/lib/Model/CreateSchemaDto.php +++ b/lib/Model/CreateSchemaDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CreateTeamDto.php b/lib/Model/CreateTeamDto.php index 4b9be24..e85f28c 100644 --- a/lib/Model/CreateTeamDto.php +++ b/lib/Model/CreateTeamDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CreateUserDto.php b/lib/Model/CreateUserDto.php index a1c332f..d37f8a9 100644 --- a/lib/Model/CreateUserDto.php +++ b/lib/Model/CreateUserDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/CurrentStorageDto.php b/lib/Model/CurrentStorageDto.php index d2c75c6..86f3912 100644 --- a/lib/Model/CurrentStorageDto.php +++ b/lib/Model/CurrentStorageDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/DateTimeCalculatedDefaultValue.php b/lib/Model/DateTimeCalculatedDefaultValue.php index f40d3f3..5c79bb1 100644 --- a/lib/Model/DateTimeCalculatedDefaultValue.php +++ b/lib/Model/DateTimeCalculatedDefaultValue.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/DateTimeFieldEditor.php b/lib/Model/DateTimeFieldEditor.php index a8538d8..0341592 100644 --- a/lib/Model/DateTimeFieldEditor.php +++ b/lib/Model/DateTimeFieldEditor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/DateTimeFieldPropertiesDto.php b/lib/Model/DateTimeFieldPropertiesDto.php index 3f07a73..e0067fb 100644 --- a/lib/Model/DateTimeFieldPropertiesDto.php +++ b/lib/Model/DateTimeFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/DiscourseRuleActionDto.php b/lib/Model/DiscourseRuleActionDto.php index 32edd3e..c24bccf 100644 --- a/lib/Model/DiscourseRuleActionDto.php +++ b/lib/Model/DiscourseRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/EditorDto.php b/lib/Model/EditorDto.php index e8728da..f6fdfc4 100644 --- a/lib/Model/EditorDto.php +++ b/lib/Model/EditorDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ElasticSearchRuleActionDto.php b/lib/Model/ElasticSearchRuleActionDto.php index 96a2b94..1566555 100644 --- a/lib/Model/ElasticSearchRuleActionDto.php +++ b/lib/Model/ElasticSearchRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/EmailRuleActionDto.php b/lib/Model/EmailRuleActionDto.php index c84b486..3d44aae 100644 --- a/lib/Model/EmailRuleActionDto.php +++ b/lib/Model/EmailRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -358,17 +358,9 @@ public function listInvalidProperties() if ($this->container['server_username'] === null) { $invalidProperties[] = "'server_username' can't be null"; } - if ((mb_strlen($this->container['server_username']) < 1)) { - $invalidProperties[] = "invalid value for 'server_username', the character length must be bigger than or equal to 1."; - } - if ($this->container['server_password'] === null) { $invalidProperties[] = "'server_password' can't be null"; } - if ((mb_strlen($this->container['server_password']) < 1)) { - $invalidProperties[] = "invalid value for 'server_password', the character length must be bigger than or equal to 1."; - } - if ($this->container['message_from'] === null) { $invalidProperties[] = "'message_from' can't be null"; } @@ -490,8 +482,6 @@ public function setServerUsername($server_username) if (is_null($server_username)) { throw new \InvalidArgumentException('non-nullable server_username cannot be null'); } - - $this->container['server_username'] = $server_username; return $this; @@ -519,8 +509,6 @@ public function setServerPassword($server_password) if (is_null($server_password)) { throw new \InvalidArgumentException('non-nullable server_password cannot be null'); } - - $this->container['server_password'] = $server_password; return $this; diff --git a/lib/Model/ErrorDto.php b/lib/Model/ErrorDto.php index 27bb5b2..b7fa291 100644 --- a/lib/Model/ErrorDto.php +++ b/lib/Model/ErrorDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/EventConsumerDto.php b/lib/Model/EventConsumerDto.php index aef1e63..c9ab8e4 100644 --- a/lib/Model/EventConsumerDto.php +++ b/lib/Model/EventConsumerDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/EventConsumersDto.php b/lib/Model/EventConsumersDto.php index aee2107..6eb2b2b 100644 --- a/lib/Model/EventConsumersDto.php +++ b/lib/Model/EventConsumersDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/FastlyRuleActionDto.php b/lib/Model/FastlyRuleActionDto.php index bede626..fb46703 100644 --- a/lib/Model/FastlyRuleActionDto.php +++ b/lib/Model/FastlyRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/FeatureDto.php b/lib/Model/FeatureDto.php index b2fa722..55c2123 100644 --- a/lib/Model/FeatureDto.php +++ b/lib/Model/FeatureDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/FeaturesDto.php b/lib/Model/FeaturesDto.php index a71ff47..0479989 100644 --- a/lib/Model/FeaturesDto.php +++ b/lib/Model/FeaturesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/FieldDto.php b/lib/Model/FieldDto.php index 08dbd18..fc0609c 100644 --- a/lib/Model/FieldDto.php +++ b/lib/Model/FieldDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/FieldPropertiesDto.php b/lib/Model/FieldPropertiesDto.php index c73d374..60ff3d8 100644 --- a/lib/Model/FieldPropertiesDto.php +++ b/lib/Model/FieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -84,6 +84,7 @@ class FieldPropertiesDto implements ModelInterface, ArrayAccess, \JsonSerializab 'Json' => 'JsonFieldPropertiesDto', 'Number' => 'NumberFieldPropertiesDto', 'References' => 'ReferencesFieldPropertiesDto', + 'RichText' => 'RichTextFieldPropertiesDto', 'String' => 'StringFieldPropertiesDto', 'Tags' => 'TagsFieldPropertiesDto', 'UI' => 'UIFieldPropertiesDto' @@ -105,6 +106,7 @@ class FieldPropertiesDto implements ModelInterface, ArrayAccess, \JsonSerializab 'JsonFieldPropertiesDto' => 'Json', 'NumberFieldPropertiesDto' => 'Number', 'ReferencesFieldPropertiesDto' => 'References', + 'RichTextFieldPropertiesDto' => 'RichText', 'StringFieldPropertiesDto' => 'String', 'TagsFieldPropertiesDto' => 'Tags', 'UIFieldPropertiesDto' => 'UI' diff --git a/lib/Model/FieldRuleAction.php b/lib/Model/FieldRuleAction.php index cc4aa41..026c6f7 100644 --- a/lib/Model/FieldRuleAction.php +++ b/lib/Model/FieldRuleAction.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/FieldRuleDto.php b/lib/Model/FieldRuleDto.php index 4c93b30..c26db7a 100644 --- a/lib/Model/FieldRuleDto.php +++ b/lib/Model/FieldRuleDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/GeolocationFieldEditor.php b/lib/Model/GeolocationFieldEditor.php index 3ec864a..122c3b2 100644 --- a/lib/Model/GeolocationFieldEditor.php +++ b/lib/Model/GeolocationFieldEditor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/GeolocationFieldPropertiesDto.php b/lib/Model/GeolocationFieldPropertiesDto.php index 4005772..eac03d2 100644 --- a/lib/Model/GeolocationFieldPropertiesDto.php +++ b/lib/Model/GeolocationFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/HistoryEventDto.php b/lib/Model/HistoryEventDto.php index 41c558c..0389381 100644 --- a/lib/Model/HistoryEventDto.php +++ b/lib/Model/HistoryEventDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ImageFormat.php b/lib/Model/ImageFormat.php index 9348c25..c2993e4 100644 --- a/lib/Model/ImageFormat.php +++ b/lib/Model/ImageFormat.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ImportContentsDto.php b/lib/Model/ImportContentsDto.php index 36f3a41..cb21613 100644 --- a/lib/Model/ImportContentsDto.php +++ b/lib/Model/ImportContentsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/JobDto.php b/lib/Model/JobDto.php new file mode 100644 index 0000000..b8a35b2 --- /dev/null +++ b/lib/Model/JobDto.php @@ -0,0 +1,774 @@ + + */ +class JobDto implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'JobDto'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + '_links' => 'array', + 'id' => 'string', + 'started' => '\DateTime', + 'stopped' => '\DateTime', + 'status' => '\Squidex\Client\Model\JobStatus', + 'task_name' => 'string', + 'description' => 'string', + 'task_arguments' => 'array', + 'log' => '\Squidex\Client\Model\JobLogMessageDto[]', + 'can_download' => 'bool' + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappings = [ + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappingsReverse = [ + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + '_links' => null, + 'id' => null, + 'started' => 'date-time', + 'stopped' => 'date-time', + 'status' => null, + 'task_name' => null, + 'description' => null, + 'task_arguments' => null, + 'log' => null, + 'can_download' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + '_links' => false, + 'id' => false, + 'started' => false, + 'stopped' => true, + 'status' => false, + 'task_name' => false, + 'description' => false, + 'task_arguments' => false, + 'log' => false, + 'can_download' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of discriminator mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIMappings() + { + return self::$openAPIMappings; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links', + 'id' => 'id', + 'started' => 'started', + 'stopped' => 'stopped', + 'status' => 'status', + 'task_name' => 'taskName', + 'description' => 'description', + 'task_arguments' => 'taskArguments', + 'log' => 'log', + 'can_download' => 'canDownload' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks', + 'id' => 'setId', + 'started' => 'setStarted', + 'stopped' => 'setStopped', + 'status' => 'setStatus', + 'task_name' => 'setTaskName', + 'description' => 'setDescription', + 'task_arguments' => 'setTaskArguments', + 'log' => 'setLog', + 'can_download' => 'setCanDownload' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks', + 'id' => 'getId', + 'started' => 'getStarted', + 'stopped' => 'getStopped', + 'status' => 'getStatus', + 'task_name' => 'getTaskName', + 'description' => 'getDescription', + 'task_arguments' => 'getTaskArguments', + 'log' => 'getLog', + 'can_download' => 'getCanDownload' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('_links', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('started', $data ?? [], null); + $this->setIfExists('stopped', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('task_name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('task_arguments', $data ?? [], null); + $this->setIfExists('log', $data ?? [], null); + $this->setIfExists('can_download', $data ?? [], null); + + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['_links'] === null) { + $invalidProperties[] = "'_links' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['started'] === null) { + $invalidProperties[] = "'started' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['task_name'] === null) { + $invalidProperties[] = "'task_name' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['task_arguments'] === null) { + $invalidProperties[] = "'task_arguments' can't be null"; + } + if ($this->container['log'] === null) { + $invalidProperties[] = "'log' can't be null"; + } + if ($this->container['can_download'] === null) { + $invalidProperties[] = "'can_download' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return array + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param array $_links The links. + * + * @return self + */ + public function setLinks($_links) + { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The ID of the job. + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets started + * + * @return \DateTime + */ + public function getStarted() + { + return $this->container['started']; + } + + /** + * Sets started + * + * @param \DateTime $started The time when the job has been started. + * + * @return self + */ + public function setStarted($started) + { + if (is_null($started)) { + throw new \InvalidArgumentException('non-nullable started cannot be null'); + } + $this->container['started'] = $started; + + return $this; + } + + /** + * Gets stopped + * + * @return \DateTime|null + */ + public function getStopped() + { + return $this->container['stopped']; + } + + /** + * Sets stopped + * + * @param \DateTime|null $stopped The time when the job has been stopped. + * + * @return self + */ + public function setStopped($stopped) + { + if (is_null($stopped)) { + array_push($this->openAPINullablesSetToNull, 'stopped'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('stopped', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['stopped'] = $stopped; + + return $this; + } + + /** + * Gets status + * + * @return \Squidex\Client\Model\JobStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \Squidex\Client\Model\JobStatus $status status + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets task_name + * + * @return string + */ + public function getTaskName() + { + return $this->container['task_name']; + } + + /** + * Sets task_name + * + * @param string $task_name The name of the task. + * + * @return self + */ + public function setTaskName($task_name) + { + if (is_null($task_name)) { + throw new \InvalidArgumentException('non-nullable task_name cannot be null'); + } + $this->container['task_name'] = $task_name; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description The description of the job. + * + * @return self + */ + public function setDescription($description) + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets task_arguments + * + * @return array + */ + public function getTaskArguments() + { + return $this->container['task_arguments']; + } + + /** + * Sets task_arguments + * + * @param array $task_arguments The arguments for the job. + * + * @return self + */ + public function setTaskArguments($task_arguments) + { + if (is_null($task_arguments)) { + throw new \InvalidArgumentException('non-nullable task_arguments cannot be null'); + } + $this->container['task_arguments'] = $task_arguments; + + return $this; + } + + /** + * Gets log + * + * @return \Squidex\Client\Model\JobLogMessageDto[] + */ + public function getLog() + { + return $this->container['log']; + } + + /** + * Sets log + * + * @param \Squidex\Client\Model\JobLogMessageDto[] $log The list of log items. + * + * @return self + */ + public function setLog($log) + { + if (is_null($log)) { + throw new \InvalidArgumentException('non-nullable log cannot be null'); + } + $this->container['log'] = $log; + + return $this; + } + + /** + * Gets can_download + * + * @return bool + */ + public function getCanDownload() + { + return $this->container['can_download']; + } + + /** + * Sets can_download + * + * @param bool $can_download Indicates whether the job can be downloaded. + * + * @return self + */ + public function setCanDownload($can_download) + { + if (is_null($can_download)) { + throw new \InvalidArgumentException('non-nullable can_download cannot be null'); + } + $this->container['can_download'] = $can_download; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/JobLogMessageDto.php b/lib/Model/JobLogMessageDto.php new file mode 100644 index 0000000..1423b0a --- /dev/null +++ b/lib/Model/JobLogMessageDto.php @@ -0,0 +1,474 @@ + + */ +class JobLogMessageDto implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'JobLogMessageDto'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'timestamp' => '\DateTime', + 'message' => 'string' + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappings = [ + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappingsReverse = [ + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'timestamp' => 'date-time', + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'timestamp' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of discriminator mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIMappings() + { + return self::$openAPIMappings; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'timestamp' => 'timestamp', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'timestamp' => 'setTimestamp', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'timestamp' => 'getTimestamp', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['timestamp'] === null) { + $invalidProperties[] = "'timestamp' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets timestamp + * + * @return \DateTime + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime $timestamp The timestamp. + * + * @return self + */ + public function setTimestamp($timestamp) + { + if (is_null($timestamp)) { + throw new \InvalidArgumentException('non-nullable timestamp cannot be null'); + } + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message The log message. + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/JobStatus.php b/lib/Model/JobStatus.php index b40ed9f..ab04b25 100644 --- a/lib/Model/JobStatus.php +++ b/lib/Model/JobStatus.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -49,6 +49,8 @@ class JobStatus public const COMPLETED = 'Completed'; + public const CANCELLED = 'Cancelled'; + public const FAILED = 'Failed'; /** @@ -61,6 +63,7 @@ public static function getAllowableEnumValues() self::CREATED, self::STARTED, self::COMPLETED, + self::CANCELLED, self::FAILED ]; } diff --git a/lib/Model/JobsDto.php b/lib/Model/JobsDto.php new file mode 100644 index 0000000..4783edc --- /dev/null +++ b/lib/Model/JobsDto.php @@ -0,0 +1,474 @@ + + */ +class JobsDto implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'JobsDto'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + '_links' => 'array', + 'items' => '\Squidex\Client\Model\JobDto[]' + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappings = [ + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappingsReverse = [ + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + '_links' => null, + 'items' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + '_links' => false, + 'items' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of discriminator mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIMappings() + { + return self::$openAPIMappings; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links', + 'items' => 'items' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks', + 'items' => 'setItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks', + 'items' => 'getItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('_links', $data ?? [], null); + $this->setIfExists('items', $data ?? [], null); + + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['_links'] === null) { + $invalidProperties[] = "'_links' can't be null"; + } + if ($this->container['items'] === null) { + $invalidProperties[] = "'items' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return array + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param array $_links The links. + * + * @return self + */ + public function setLinks($_links) + { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + + /** + * Gets items + * + * @return \Squidex\Client\Model\JobDto[] + */ + public function getItems() + { + return $this->container['items']; + } + + /** + * Sets items + * + * @param \Squidex\Client\Model\JobDto[] $items The jobs. + * + * @return self + */ + public function setItems($items) + { + if (is_null($items)) { + throw new \InvalidArgumentException('non-nullable items cannot be null'); + } + $this->container['items'] = $items; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/JsonFieldPropertiesDto.php b/lib/Model/JsonFieldPropertiesDto.php index 26193bf..4e7b92b 100644 --- a/lib/Model/JsonFieldPropertiesDto.php +++ b/lib/Model/JsonFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/LanguageDto.php b/lib/Model/LanguageDto.php index 2b28d2b..7fa12b7 100644 --- a/lib/Model/LanguageDto.php +++ b/lib/Model/LanguageDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/LogDownloadDto.php b/lib/Model/LogDownloadDto.php index f285a61..eeb2fc5 100644 --- a/lib/Model/LogDownloadDto.php +++ b/lib/Model/LogDownloadDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ManualRuleTriggerDto.php b/lib/Model/ManualRuleTriggerDto.php index ea3efe0..fe04531 100644 --- a/lib/Model/ManualRuleTriggerDto.php +++ b/lib/Model/ManualRuleTriggerDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/MediumRuleActionDto.php b/lib/Model/MediumRuleActionDto.php index 7177617..0e1c543 100644 --- a/lib/Model/MediumRuleActionDto.php +++ b/lib/Model/MediumRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 96b7d78..ef8c169 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/MoveAssetDto.php b/lib/Model/MoveAssetDto.php index e9cd473..cce84f6 100644 --- a/lib/Model/MoveAssetDto.php +++ b/lib/Model/MoveAssetDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/MoveAssetFolderDto.php b/lib/Model/MoveAssetFolderDto.php index 8d20070..1567edb 100644 --- a/lib/Model/MoveAssetFolderDto.php +++ b/lib/Model/MoveAssetFolderDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/NestedFieldDto.php b/lib/Model/NestedFieldDto.php index f209b7e..7649c15 100644 --- a/lib/Model/NestedFieldDto.php +++ b/lib/Model/NestedFieldDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/NotificationRuleActionDto.php b/lib/Model/NotificationRuleActionDto.php index d7621e2..95d817f 100644 --- a/lib/Model/NotificationRuleActionDto.php +++ b/lib/Model/NotificationRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/NumberFieldEditor.php b/lib/Model/NumberFieldEditor.php index aab6c0d..af60d29 100644 --- a/lib/Model/NumberFieldEditor.php +++ b/lib/Model/NumberFieldEditor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/NumberFieldPropertiesDto.php b/lib/Model/NumberFieldPropertiesDto.php index 5615066..9a92915 100644 --- a/lib/Model/NumberFieldPropertiesDto.php +++ b/lib/Model/NumberFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/OpenSearchRuleActionDto.php b/lib/Model/OpenSearchRuleActionDto.php index a12201f..fcbb6b8 100644 --- a/lib/Model/OpenSearchRuleActionDto.php +++ b/lib/Model/OpenSearchRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/PatternDto.php b/lib/Model/PatternDto.php index ed1928c..a1e642d 100644 --- a/lib/Model/PatternDto.php +++ b/lib/Model/PatternDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/PlanChangedDto.php b/lib/Model/PlanChangedDto.php index 67b5563..0173e54 100644 --- a/lib/Model/PlanChangedDto.php +++ b/lib/Model/PlanChangedDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/PlanDto.php b/lib/Model/PlanDto.php index 9ba86ee..d35f8a9 100644 --- a/lib/Model/PlanDto.php +++ b/lib/Model/PlanDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/PlansDto.php b/lib/Model/PlansDto.php index 258ffb7..0f20d16 100644 --- a/lib/Model/PlansDto.php +++ b/lib/Model/PlansDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/PlansLockedReason.php b/lib/Model/PlansLockedReason.php index 5a450c4..eba0125 100644 --- a/lib/Model/PlansLockedReason.php +++ b/lib/Model/PlansLockedReason.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/PrerenderRuleActionDto.php b/lib/Model/PrerenderRuleActionDto.php index 19c888c..be1bef0 100644 --- a/lib/Model/PrerenderRuleActionDto.php +++ b/lib/Model/PrerenderRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/QueryDto.php b/lib/Model/QueryDto.php index a119a45..99fa596 100644 --- a/lib/Model/QueryDto.php +++ b/lib/Model/QueryDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/QueryJsonDto.php b/lib/Model/QueryJsonDto.php index 2760c11..16ef180 100644 --- a/lib/Model/QueryJsonDto.php +++ b/lib/Model/QueryJsonDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ReferencesFieldEditor.php b/lib/Model/ReferencesFieldEditor.php index b6918c5..e762454 100644 --- a/lib/Model/ReferencesFieldEditor.php +++ b/lib/Model/ReferencesFieldEditor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -53,6 +53,8 @@ class ReferencesFieldEditor public const INPUT = 'Input'; + public const RADIO = 'Radio'; + /** * Gets allowable values of the enum * @return string[] @@ -64,7 +66,8 @@ public static function getAllowableEnumValues() self::DROPDOWN, self::TAGS, self::CHECKBOXES, - self::INPUT + self::INPUT, + self::RADIO ]; } } diff --git a/lib/Model/ReferencesFieldPropertiesDto.php b/lib/Model/ReferencesFieldPropertiesDto.php index cc823dd..3263fae 100644 --- a/lib/Model/ReferencesFieldPropertiesDto.php +++ b/lib/Model/ReferencesFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ReferralInfo.php b/lib/Model/ReferralInfo.php index bbe4d34..28e5c32 100644 --- a/lib/Model/ReferralInfo.php +++ b/lib/Model/ReferralInfo.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RenameAssetFolderDto.php b/lib/Model/RenameAssetFolderDto.php index 257c6b3..1b60057 100644 --- a/lib/Model/RenameAssetFolderDto.php +++ b/lib/Model/RenameAssetFolderDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RenameTagDto.php b/lib/Model/RenameTagDto.php index 9b0baf2..d560f54 100644 --- a/lib/Model/RenameTagDto.php +++ b/lib/Model/RenameTagDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ReorderFieldsDto.php b/lib/Model/ReorderFieldsDto.php index a75b819..8027b94 100644 --- a/lib/Model/ReorderFieldsDto.php +++ b/lib/Model/ReorderFieldsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ResizeMode.php b/lib/Model/ResizeMode.php index a8f2ee7..28cfdff 100644 --- a/lib/Model/ResizeMode.php +++ b/lib/Model/ResizeMode.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/Resource.php b/lib/Model/Resource.php index 97fbc5e..064d9b0 100644 --- a/lib/Model/Resource.php +++ b/lib/Model/Resource.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ResourceLink.php b/lib/Model/ResourceLink.php index a682d7b..00eb435 100644 --- a/lib/Model/ResourceLink.php +++ b/lib/Model/ResourceLink.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ResourcesDto.php b/lib/Model/ResourcesDto.php index 16fc2de..dbdd006 100644 --- a/lib/Model/ResourcesDto.php +++ b/lib/Model/ResourcesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RestoreJobDto.php b/lib/Model/RestoreJobDto.php index a86895c..9557955 100644 --- a/lib/Model/RestoreJobDto.php +++ b/lib/Model/RestoreJobDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RestoreRequestDto.php b/lib/Model/RestoreRequestDto.php index a2dc657..0218a93 100644 --- a/lib/Model/RestoreRequestDto.php +++ b/lib/Model/RestoreRequestDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RichTextFieldPropertiesDto.php b/lib/Model/RichTextFieldPropertiesDto.php new file mode 100644 index 0000000..b54e928 --- /dev/null +++ b/lib/Model/RichTextFieldPropertiesDto.php @@ -0,0 +1,766 @@ + + */ +class RichTextFieldPropertiesDto extends FieldPropertiesDto +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RichTextFieldPropertiesDto'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'folder_id' => 'string', + 'min_length' => 'int', + 'max_length' => 'int', + 'min_characters' => 'int', + 'max_characters' => 'int', + 'min_words' => 'int', + 'max_words' => 'int', + 'class_names' => 'string[]', + 'schema_ids' => 'string[]' + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappings = [ + ]; + + /** + * Array of mapping. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIMappingsReverse = [ + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'folder_id' => null, + 'min_length' => 'int32', + 'max_length' => 'int32', + 'min_characters' => 'int32', + 'max_characters' => 'int32', + 'min_words' => 'int32', + 'max_words' => 'int32', + 'class_names' => null, + 'schema_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'folder_id' => true, + 'min_length' => true, + 'max_length' => true, + 'min_characters' => true, + 'max_characters' => true, + 'min_words' => true, + 'max_words' => true, + 'class_names' => true, + 'schema_ids' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes + parent::openAPITypes(); + } + + /** + * Array of discriminator mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIMappings() + { + return self::$openAPIMappings; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats + parent::openAPIFormats(); + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables + parent::openAPINullables(); + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'folder_id' => 'folderId', + 'min_length' => 'minLength', + 'max_length' => 'maxLength', + 'min_characters' => 'minCharacters', + 'max_characters' => 'maxCharacters', + 'min_words' => 'minWords', + 'max_words' => 'maxWords', + 'class_names' => 'classNames', + 'schema_ids' => 'schemaIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'folder_id' => 'setFolderId', + 'min_length' => 'setMinLength', + 'max_length' => 'setMaxLength', + 'min_characters' => 'setMinCharacters', + 'max_characters' => 'setMaxCharacters', + 'min_words' => 'setMinWords', + 'max_words' => 'setMaxWords', + 'class_names' => 'setClassNames', + 'schema_ids' => 'setSchemaIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'folder_id' => 'getFolderId', + 'min_length' => 'getMinLength', + 'max_length' => 'getMaxLength', + 'min_characters' => 'getMinCharacters', + 'max_characters' => 'getMaxCharacters', + 'min_words' => 'getMinWords', + 'max_words' => 'getMaxWords', + 'class_names' => 'getClassNames', + 'schema_ids' => 'getSchemaIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return parent::attributeMap() + self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return parent::setters() + self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return parent::getters() + self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + parent::__construct($data); + + $this->setIfExists('folder_id', $data ?? [], null); + $this->setIfExists('min_length', $data ?? [], null); + $this->setIfExists('max_length', $data ?? [], null); + $this->setIfExists('min_characters', $data ?? [], null); + $this->setIfExists('max_characters', $data ?? [], null); + $this->setIfExists('min_words', $data ?? [], null); + $this->setIfExists('max_words', $data ?? [], null); + $this->setIfExists('class_names', $data ?? [], null); + $this->setIfExists('schema_ids', $data ?? [], null); + + + // Initialize discriminator property with the model name. + $this->container['field_type'] = parent::$openAPIMappingsReverse['RichTextFieldPropertiesDto']; + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = parent::listInvalidProperties(); + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets folder_id + * + * @return string|null + */ + public function getFolderId() + { + return $this->container['folder_id']; + } + + /** + * Sets folder_id + * + * @param string|null $folder_id The initial id to the folder when the control supports file uploads. + * + * @return self + */ + public function setFolderId($folder_id) + { + if (is_null($folder_id)) { + array_push($this->openAPINullablesSetToNull, 'folder_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('folder_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['folder_id'] = $folder_id; + + return $this; + } + + /** + * Gets min_length + * + * @return int|null + */ + public function getMinLength() + { + return $this->container['min_length']; + } + + /** + * Sets min_length + * + * @param int|null $min_length The minimum allowed length for the field value. + * + * @return self + */ + public function setMinLength($min_length) + { + if (is_null($min_length)) { + array_push($this->openAPINullablesSetToNull, 'min_length'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('min_length', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['min_length'] = $min_length; + + return $this; + } + + /** + * Gets max_length + * + * @return int|null + */ + public function getMaxLength() + { + return $this->container['max_length']; + } + + /** + * Sets max_length + * + * @param int|null $max_length The maximum allowed length for the field value. + * + * @return self + */ + public function setMaxLength($max_length) + { + if (is_null($max_length)) { + array_push($this->openAPINullablesSetToNull, 'max_length'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('max_length', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['max_length'] = $max_length; + + return $this; + } + + /** + * Gets min_characters + * + * @return int|null + */ + public function getMinCharacters() + { + return $this->container['min_characters']; + } + + /** + * Sets min_characters + * + * @param int|null $min_characters The minimum allowed of normal characters for the field value. + * + * @return self + */ + public function setMinCharacters($min_characters) + { + if (is_null($min_characters)) { + array_push($this->openAPINullablesSetToNull, 'min_characters'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('min_characters', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['min_characters'] = $min_characters; + + return $this; + } + + /** + * Gets max_characters + * + * @return int|null + */ + public function getMaxCharacters() + { + return $this->container['max_characters']; + } + + /** + * Sets max_characters + * + * @param int|null $max_characters The maximum allowed of normal characters for the field value. + * + * @return self + */ + public function setMaxCharacters($max_characters) + { + if (is_null($max_characters)) { + array_push($this->openAPINullablesSetToNull, 'max_characters'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('max_characters', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['max_characters'] = $max_characters; + + return $this; + } + + /** + * Gets min_words + * + * @return int|null + */ + public function getMinWords() + { + return $this->container['min_words']; + } + + /** + * Sets min_words + * + * @param int|null $min_words The minimum allowed number of words for the field value. + * + * @return self + */ + public function setMinWords($min_words) + { + if (is_null($min_words)) { + array_push($this->openAPINullablesSetToNull, 'min_words'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('min_words', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['min_words'] = $min_words; + + return $this; + } + + /** + * Gets max_words + * + * @return int|null + */ + public function getMaxWords() + { + return $this->container['max_words']; + } + + /** + * Sets max_words + * + * @param int|null $max_words The maximum allowed number of words for the field value. + * + * @return self + */ + public function setMaxWords($max_words) + { + if (is_null($max_words)) { + array_push($this->openAPINullablesSetToNull, 'max_words'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('max_words', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['max_words'] = $max_words; + + return $this; + } + + /** + * Gets class_names + * + * @return string[]|null + */ + public function getClassNames() + { + return $this->container['class_names']; + } + + /** + * Sets class_names + * + * @param string[]|null $class_names The class names for the editor. + * + * @return self + */ + public function setClassNames($class_names) + { + if (is_null($class_names)) { + array_push($this->openAPINullablesSetToNull, 'class_names'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('class_names', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['class_names'] = $class_names; + + return $this; + } + + /** + * Gets schema_ids + * + * @return string[]|null + */ + public function getSchemaIds() + { + return $this->container['schema_ids']; + } + + /** + * Sets schema_ids + * + * @param string[]|null $schema_ids The allowed schema ids that can be embedded. + * + * @return self + */ + public function setSchemaIds($schema_ids) + { + if (is_null($schema_ids)) { + array_push($this->openAPINullablesSetToNull, 'schema_ids'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('schema_ids', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['schema_ids'] = $schema_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RoleDto.php b/lib/Model/RoleDto.php index 0816b2c..090d5b0 100644 --- a/lib/Model/RoleDto.php +++ b/lib/Model/RoleDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RolesDto.php b/lib/Model/RolesDto.php index 98e371b..1b734fc 100644 --- a/lib/Model/RolesDto.php +++ b/lib/Model/RolesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RuleActionDto.php b/lib/Model/RuleActionDto.php index 75afa5c..3a4c39e 100644 --- a/lib/Model/RuleActionDto.php +++ b/lib/Model/RuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -70,7 +70,6 @@ class RuleActionDto implements ModelInterface, ArrayAccess, \JsonSerializable 'AzureQueue' => 'AzureQueueRuleActionDto', 'Comment' => 'CommentRuleActionDto', 'CreateContent' => 'CreateContentRuleActionDto', - 'DeepDetect' => 'DeepDetectRuleActionDto', 'Discourse' => 'DiscourseRuleActionDto', 'ElasticSearch' => 'ElasticSearchRuleActionDto', 'Email' => 'EmailRuleActionDto', @@ -97,7 +96,6 @@ class RuleActionDto implements ModelInterface, ArrayAccess, \JsonSerializable 'AzureQueueRuleActionDto' => 'AzureQueue', 'CommentRuleActionDto' => 'Comment', 'CreateContentRuleActionDto' => 'CreateContent', - 'DeepDetectRuleActionDto' => 'DeepDetect', 'DiscourseRuleActionDto' => 'Discourse', 'ElasticSearchRuleActionDto' => 'ElasticSearch', 'EmailRuleActionDto' => 'Email', diff --git a/lib/Model/RuleDto.php b/lib/Model/RuleDto.php index 4470744..8505722 100644 --- a/lib/Model/RuleDto.php +++ b/lib/Model/RuleDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RuleElementDto.php b/lib/Model/RuleElementDto.php index 48c7827..6d006ff 100644 --- a/lib/Model/RuleElementDto.php +++ b/lib/Model/RuleElementDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RuleElementPropertyDto.php b/lib/Model/RuleElementPropertyDto.php index 4f6cd1d..07761c2 100644 --- a/lib/Model/RuleElementPropertyDto.php +++ b/lib/Model/RuleElementPropertyDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RuleEventDto.php b/lib/Model/RuleEventDto.php index 9203e59..1cf4932 100644 --- a/lib/Model/RuleEventDto.php +++ b/lib/Model/RuleEventDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RuleEventsDto.php b/lib/Model/RuleEventsDto.php index 41b8d26..57c7156 100644 --- a/lib/Model/RuleEventsDto.php +++ b/lib/Model/RuleEventsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RuleFieldEditor.php b/lib/Model/RuleFieldEditor.php index fc690be..b0c0bfd 100644 --- a/lib/Model/RuleFieldEditor.php +++ b/lib/Model/RuleFieldEditor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RuleJobResult.php b/lib/Model/RuleJobResult.php index a507b1c..514cead 100644 --- a/lib/Model/RuleJobResult.php +++ b/lib/Model/RuleJobResult.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RuleResult.php b/lib/Model/RuleResult.php index 12a94e0..f161714 100644 --- a/lib/Model/RuleResult.php +++ b/lib/Model/RuleResult.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RuleTriggerDto.php b/lib/Model/RuleTriggerDto.php index da35393..1a29af4 100644 --- a/lib/Model/RuleTriggerDto.php +++ b/lib/Model/RuleTriggerDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/RulesDto.php b/lib/Model/RulesDto.php index 2d7a8d5..86adf2d 100644 --- a/lib/Model/RulesDto.php +++ b/lib/Model/RulesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ScheduleJobDto.php b/lib/Model/ScheduleJobDto.php index 3c2f6ae..405efb7 100644 --- a/lib/Model/ScheduleJobDto.php +++ b/lib/Model/ScheduleJobDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SchemaChangedRuleTriggerDto.php b/lib/Model/SchemaChangedRuleTriggerDto.php index c2de15a..544618b 100644 --- a/lib/Model/SchemaChangedRuleTriggerDto.php +++ b/lib/Model/SchemaChangedRuleTriggerDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SchemaCondition.php b/lib/Model/SchemaCondition.php index 47427f6..e416c6b 100644 --- a/lib/Model/SchemaCondition.php +++ b/lib/Model/SchemaCondition.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SchemaDto.php b/lib/Model/SchemaDto.php index e93c2ec..5b514b0 100644 --- a/lib/Model/SchemaDto.php +++ b/lib/Model/SchemaDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -434,17 +434,9 @@ public function listInvalidProperties() if ($this->container['created_by'] === null) { $invalidProperties[] = "'created_by' can't be null"; } - if ((mb_strlen($this->container['created_by']) < 1)) { - $invalidProperties[] = "invalid value for 'created_by', the character length must be bigger than or equal to 1."; - } - if ($this->container['last_modified_by'] === null) { $invalidProperties[] = "'last_modified_by' can't be null"; } - if ((mb_strlen($this->container['last_modified_by']) < 1)) { - $invalidProperties[] = "invalid value for 'last_modified_by', the character length must be bigger than or equal to 1."; - } - if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } @@ -586,8 +578,6 @@ public function setCreatedBy($created_by) if (is_null($created_by)) { throw new \InvalidArgumentException('non-nullable created_by cannot be null'); } - - $this->container['created_by'] = $created_by; return $this; @@ -615,8 +605,6 @@ public function setLastModifiedBy($last_modified_by) if (is_null($last_modified_by)) { throw new \InvalidArgumentException('non-nullable last_modified_by cannot be null'); } - - $this->container['last_modified_by'] = $last_modified_by; return $this; diff --git a/lib/Model/SchemaPropertiesDto.php b/lib/Model/SchemaPropertiesDto.php index 727f0d5..c0905a2 100644 --- a/lib/Model/SchemaPropertiesDto.php +++ b/lib/Model/SchemaPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -62,6 +62,8 @@ class SchemaPropertiesDto implements ModelInterface, ArrayAccess, \JsonSerializa 'contents_sidebar_url' => 'string', 'content_sidebar_url' => 'string', 'content_editor_url' => 'string', + 'contents_editor_url' => 'string', + 'contents_list_url' => 'string', 'validate_on_publish' => 'bool', 'tags' => 'string[]' ]; @@ -93,6 +95,8 @@ class SchemaPropertiesDto implements ModelInterface, ArrayAccess, \JsonSerializa 'contents_sidebar_url' => null, 'content_sidebar_url' => null, 'content_editor_url' => null, + 'contents_editor_url' => null, + 'contents_list_url' => null, 'validate_on_publish' => null, 'tags' => null ]; @@ -108,6 +112,8 @@ class SchemaPropertiesDto implements ModelInterface, ArrayAccess, \JsonSerializa 'contents_sidebar_url' => true, 'content_sidebar_url' => true, 'content_editor_url' => true, + 'contents_editor_url' => true, + 'contents_list_url' => true, 'validate_on_publish' => false, 'tags' => true ]; @@ -213,6 +219,8 @@ public function isNullableSetToNull(string $property): bool 'contents_sidebar_url' => 'contentsSidebarUrl', 'content_sidebar_url' => 'contentSidebarUrl', 'content_editor_url' => 'contentEditorUrl', + 'contents_editor_url' => 'contentsEditorUrl', + 'contents_list_url' => 'contentsListUrl', 'validate_on_publish' => 'validateOnPublish', 'tags' => 'tags' ]; @@ -228,6 +236,8 @@ public function isNullableSetToNull(string $property): bool 'contents_sidebar_url' => 'setContentsSidebarUrl', 'content_sidebar_url' => 'setContentSidebarUrl', 'content_editor_url' => 'setContentEditorUrl', + 'contents_editor_url' => 'setContentsEditorUrl', + 'contents_list_url' => 'setContentsListUrl', 'validate_on_publish' => 'setValidateOnPublish', 'tags' => 'setTags' ]; @@ -243,6 +253,8 @@ public function isNullableSetToNull(string $property): bool 'contents_sidebar_url' => 'getContentsSidebarUrl', 'content_sidebar_url' => 'getContentSidebarUrl', 'content_editor_url' => 'getContentEditorUrl', + 'contents_editor_url' => 'getContentsEditorUrl', + 'contents_list_url' => 'getContentsListUrl', 'validate_on_publish' => 'getValidateOnPublish', 'tags' => 'getTags' ]; @@ -309,6 +321,8 @@ public function __construct(array $data = null) $this->setIfExists('contents_sidebar_url', $data ?? [], null); $this->setIfExists('content_sidebar_url', $data ?? [], null); $this->setIfExists('content_editor_url', $data ?? [], null); + $this->setIfExists('contents_editor_url', $data ?? [], null); + $this->setIfExists('contents_list_url', $data ?? [], null); $this->setIfExists('validate_on_publish', $data ?? [], null); $this->setIfExists('tags', $data ?? [], null); @@ -553,6 +567,74 @@ public function setContentEditorUrl($content_editor_url) return $this; } + /** + * Gets contents_editor_url + * + * @return string|null + */ + public function getContentsEditorUrl() + { + return $this->container['contents_editor_url']; + } + + /** + * Sets contents_editor_url + * + * @param string|null $contents_editor_url The url to the editor plugin. + * + * @return self + */ + public function setContentsEditorUrl($contents_editor_url) + { + if (is_null($contents_editor_url)) { + array_push($this->openAPINullablesSetToNull, 'contents_editor_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contents_editor_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['contents_editor_url'] = $contents_editor_url; + + return $this; + } + + /** + * Gets contents_list_url + * + * @return string|null + */ + public function getContentsListUrl() + { + return $this->container['contents_list_url']; + } + + /** + * Sets contents_list_url + * + * @param string|null $contents_list_url The url to the content list plugin. + * + * @return self + */ + public function setContentsListUrl($contents_list_url) + { + if (is_null($contents_list_url)) { + array_push($this->openAPINullablesSetToNull, 'contents_list_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('contents_list_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['contents_list_url'] = $contents_list_url; + + return $this; + } + /** * Gets validate_on_publish * diff --git a/lib/Model/SchemaScriptsDto.php b/lib/Model/SchemaScriptsDto.php index e1a632a..207d246 100644 --- a/lib/Model/SchemaScriptsDto.php +++ b/lib/Model/SchemaScriptsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SchemaType.php b/lib/Model/SchemaType.php index e151f1b..efb25ef 100644 --- a/lib/Model/SchemaType.php +++ b/lib/Model/SchemaType.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SchemasDto.php b/lib/Model/SchemasDto.php index c3790b4..29e41a4 100644 --- a/lib/Model/SchemasDto.php +++ b/lib/Model/SchemasDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/ScriptRuleActionDto.php b/lib/Model/ScriptRuleActionDto.php index f24bad1..183498b 100644 --- a/lib/Model/ScriptRuleActionDto.php +++ b/lib/Model/ScriptRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SearchResultDto.php b/lib/Model/SearchResultDto.php index f634b89..c54580f 100644 --- a/lib/Model/SearchResultDto.php +++ b/lib/Model/SearchResultDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SearchResultType.php b/lib/Model/SearchResultType.php index 5973d14..829fd77 100644 --- a/lib/Model/SearchResultType.php +++ b/lib/Model/SearchResultType.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SignalRRuleActionDto.php b/lib/Model/SignalRRuleActionDto.php index 9c90145..65e6f4c 100644 --- a/lib/Model/SignalRRuleActionDto.php +++ b/lib/Model/SignalRRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SimulatedRuleEventDto.php b/lib/Model/SimulatedRuleEventDto.php index ae1bede..380dadc 100644 --- a/lib/Model/SimulatedRuleEventDto.php +++ b/lib/Model/SimulatedRuleEventDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SimulatedRuleEventsDto.php b/lib/Model/SimulatedRuleEventsDto.php index f5d0c47..294e09f 100644 --- a/lib/Model/SimulatedRuleEventsDto.php +++ b/lib/Model/SimulatedRuleEventsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SkipReason.php b/lib/Model/SkipReason.php index 5f44543..64e0b1a 100644 --- a/lib/Model/SkipReason.php +++ b/lib/Model/SkipReason.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SlackRuleActionDto.php b/lib/Model/SlackRuleActionDto.php index 964f8fb..794a867 100644 --- a/lib/Model/SlackRuleActionDto.php +++ b/lib/Model/SlackRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/SortNode.php b/lib/Model/SortNode.php index c491129..23397e3 100644 --- a/lib/Model/SortNode.php +++ b/lib/Model/SortNode.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -57,7 +57,7 @@ class SortNode implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'path' => 'string[]', + 'path' => 'string', 'order' => '\Squidex\Client\Model\SortOrder' ]; @@ -330,7 +330,7 @@ public function valid() /** * Gets path * - * @return string[] + * @return string */ public function getPath() { @@ -340,7 +340,7 @@ public function getPath() /** * Sets path * - * @param string[] $path path + * @param string $path path * * @return self */ diff --git a/lib/Model/SortOrder.php b/lib/Model/SortOrder.php index a0004a5..8765c12 100644 --- a/lib/Model/SortOrder.php +++ b/lib/Model/SortOrder.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/StatusInfoDto.php b/lib/Model/StatusInfoDto.php index dbd909e..3fccc5e 100644 --- a/lib/Model/StatusInfoDto.php +++ b/lib/Model/StatusInfoDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/StorageUsagePerDateDto.php b/lib/Model/StorageUsagePerDateDto.php index 4de3a4a..0400d58 100644 --- a/lib/Model/StorageUsagePerDateDto.php +++ b/lib/Model/StorageUsagePerDateDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/StringContentType.php b/lib/Model/StringContentType.php index 32ebcee..3adec61 100644 --- a/lib/Model/StringContentType.php +++ b/lib/Model/StringContentType.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/StringFieldEditor.php b/lib/Model/StringFieldEditor.php index 3a6c844..1d40b75 100644 --- a/lib/Model/StringFieldEditor.php +++ b/lib/Model/StringFieldEditor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/StringFieldPropertiesDto.php b/lib/Model/StringFieldPropertiesDto.php index 49af263..5584b57 100644 --- a/lib/Model/StringFieldPropertiesDto.php +++ b/lib/Model/StringFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -66,6 +66,7 @@ class StringFieldPropertiesDto extends FieldPropertiesDto 'max_characters' => 'int', 'min_words' => 'int', 'max_words' => 'int', + 'class_names' => 'string[]', 'allowed_values' => 'string[]', 'schema_ids' => 'string[]', 'is_unique' => 'bool', @@ -109,6 +110,7 @@ class StringFieldPropertiesDto extends FieldPropertiesDto 'max_characters' => 'int32', 'min_words' => 'int32', 'max_words' => 'int32', + 'class_names' => null, 'allowed_values' => null, 'schema_ids' => null, 'is_unique' => null, @@ -136,6 +138,7 @@ class StringFieldPropertiesDto extends FieldPropertiesDto 'max_characters' => true, 'min_words' => true, 'max_words' => true, + 'class_names' => true, 'allowed_values' => true, 'schema_ids' => true, 'is_unique' => false, @@ -253,6 +256,7 @@ public function isNullableSetToNull(string $property): bool 'max_characters' => 'maxCharacters', 'min_words' => 'minWords', 'max_words' => 'maxWords', + 'class_names' => 'classNames', 'allowed_values' => 'allowedValues', 'schema_ids' => 'schemaIds', 'is_unique' => 'isUnique', @@ -280,6 +284,7 @@ public function isNullableSetToNull(string $property): bool 'max_characters' => 'setMaxCharacters', 'min_words' => 'setMinWords', 'max_words' => 'setMaxWords', + 'class_names' => 'setClassNames', 'allowed_values' => 'setAllowedValues', 'schema_ids' => 'setSchemaIds', 'is_unique' => 'setIsUnique', @@ -307,6 +312,7 @@ public function isNullableSetToNull(string $property): bool 'max_characters' => 'getMaxCharacters', 'min_words' => 'getMinWords', 'max_words' => 'getMaxWords', + 'class_names' => 'getClassNames', 'allowed_values' => 'getAllowedValues', 'schema_ids' => 'getSchemaIds', 'is_unique' => 'getIsUnique', @@ -381,6 +387,7 @@ public function __construct(array $data = null) $this->setIfExists('max_characters', $data ?? [], null); $this->setIfExists('min_words', $data ?? [], null); $this->setIfExists('max_words', $data ?? [], null); + $this->setIfExists('class_names', $data ?? [], null); $this->setIfExists('allowed_values', $data ?? [], null); $this->setIfExists('schema_ids', $data ?? [], null); $this->setIfExists('is_unique', $data ?? [], null); @@ -804,6 +811,40 @@ public function setMaxWords($max_words) return $this; } + /** + * Gets class_names + * + * @return string[]|null + */ + public function getClassNames() + { + return $this->container['class_names']; + } + + /** + * Sets class_names + * + * @param string[]|null $class_names The class names for the editor. + * + * @return self + */ + public function setClassNames($class_names) + { + if (is_null($class_names)) { + array_push($this->openAPINullablesSetToNull, 'class_names'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('class_names', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['class_names'] = $class_names; + + return $this; + } + /** * Gets allowed_values * diff --git a/lib/Model/SynchronizeSchemaDto.php b/lib/Model/SynchronizeSchemaDto.php index 9dfb5be..bc9af70 100644 --- a/lib/Model/SynchronizeSchemaDto.php +++ b/lib/Model/SynchronizeSchemaDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TagsFieldEditor.php b/lib/Model/TagsFieldEditor.php index f4f28eb..e63234d 100644 --- a/lib/Model/TagsFieldEditor.php +++ b/lib/Model/TagsFieldEditor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TagsFieldPropertiesDto.php b/lib/Model/TagsFieldPropertiesDto.php index ace73c1..8700eb4 100644 --- a/lib/Model/TagsFieldPropertiesDto.php +++ b/lib/Model/TagsFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TeamDto.php b/lib/Model/TeamDto.php index da10a8c..6f0a0e0 100644 --- a/lib/Model/TeamDto.php +++ b/lib/Model/TeamDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TemplateDetailsDto.php b/lib/Model/TemplateDetailsDto.php index cc851f0..4b5e1e2 100644 --- a/lib/Model/TemplateDetailsDto.php +++ b/lib/Model/TemplateDetailsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TemplateDto.php b/lib/Model/TemplateDto.php index 154091c..014be81 100644 --- a/lib/Model/TemplateDto.php +++ b/lib/Model/TemplateDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TemplatesDto.php b/lib/Model/TemplatesDto.php index e88d9fd..7da1477 100644 --- a/lib/Model/TemplatesDto.php +++ b/lib/Model/TemplatesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TransferToTeamDto.php b/lib/Model/TransferToTeamDto.php index 73bb27b..7f5f99d 100644 --- a/lib/Model/TransferToTeamDto.php +++ b/lib/Model/TransferToTeamDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TranslateDto.php b/lib/Model/TranslateDto.php index 07ca4cd..6c8b404 100644 --- a/lib/Model/TranslateDto.php +++ b/lib/Model/TranslateDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -323,10 +323,6 @@ public function listInvalidProperties() if ($this->container['target_language'] === null) { $invalidProperties[] = "'target_language' can't be null"; } - if ((mb_strlen($this->container['target_language']) < 1)) { - $invalidProperties[] = "invalid value for 'target_language', the character length must be bigger than or equal to 1."; - } - return $invalidProperties; } @@ -393,8 +389,6 @@ public function setTargetLanguage($target_language) if (is_null($target_language)) { throw new \InvalidArgumentException('non-nullable target_language cannot be null'); } - - $this->container['target_language'] = $target_language; return $this; diff --git a/lib/Model/TranslationDto.php b/lib/Model/TranslationDto.php index 4a48c27..d86f77b 100644 --- a/lib/Model/TranslationDto.php +++ b/lib/Model/TranslationDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TranslationStatus.php b/lib/Model/TranslationStatus.php index 13f0f6b..8f7246b 100644 --- a/lib/Model/TranslationStatus.php +++ b/lib/Model/TranslationStatus.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TweetRuleActionDto.php b/lib/Model/TweetRuleActionDto.php index b71c1e3..dbc37bc 100644 --- a/lib/Model/TweetRuleActionDto.php +++ b/lib/Model/TweetRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/TypesenseRuleActionDto.php b/lib/Model/TypesenseRuleActionDto.php index 50e8519..52f2e09 100644 --- a/lib/Model/TypesenseRuleActionDto.php +++ b/lib/Model/TypesenseRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UIFieldEditor.php b/lib/Model/UIFieldEditor.php index 2d2da8f..7118fc9 100644 --- a/lib/Model/UIFieldEditor.php +++ b/lib/Model/UIFieldEditor.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UIFieldPropertiesDto.php b/lib/Model/UIFieldPropertiesDto.php index e80366b..8b7ef27 100644 --- a/lib/Model/UIFieldPropertiesDto.php +++ b/lib/Model/UIFieldPropertiesDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateAppDto.php b/lib/Model/UpdateAppDto.php index 3d4cb5c..650e076 100644 --- a/lib/Model/UpdateAppDto.php +++ b/lib/Model/UpdateAppDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateAppSettingsDto.php b/lib/Model/UpdateAppSettingsDto.php index f22eac7..68a6c84 100644 --- a/lib/Model/UpdateAppSettingsDto.php +++ b/lib/Model/UpdateAppSettingsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateAssetScriptsDto.php b/lib/Model/UpdateAssetScriptsDto.php index 85f8a9c..c6b7562 100644 --- a/lib/Model/UpdateAssetScriptsDto.php +++ b/lib/Model/UpdateAssetScriptsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateClientDto.php b/lib/Model/UpdateClientDto.php index 3460887..4eb6506 100644 --- a/lib/Model/UpdateClientDto.php +++ b/lib/Model/UpdateClientDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateFieldDto.php b/lib/Model/UpdateFieldDto.php index 4d3b01c..146240c 100644 --- a/lib/Model/UpdateFieldDto.php +++ b/lib/Model/UpdateFieldDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateLanguageDto.php b/lib/Model/UpdateLanguageDto.php index d8474dc..f762700 100644 --- a/lib/Model/UpdateLanguageDto.php +++ b/lib/Model/UpdateLanguageDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateProfileDto.php b/lib/Model/UpdateProfileDto.php index c89156e..7cc53f2 100644 --- a/lib/Model/UpdateProfileDto.php +++ b/lib/Model/UpdateProfileDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateRoleDto.php b/lib/Model/UpdateRoleDto.php index a6dd3f1..cc9bf6a 100644 --- a/lib/Model/UpdateRoleDto.php +++ b/lib/Model/UpdateRoleDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateRuleDto.php b/lib/Model/UpdateRuleDto.php index 8517968..757fae0 100644 --- a/lib/Model/UpdateRuleDto.php +++ b/lib/Model/UpdateRuleDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateSchemaDto.php b/lib/Model/UpdateSchemaDto.php index 9bf4826..42a28c3 100644 --- a/lib/Model/UpdateSchemaDto.php +++ b/lib/Model/UpdateSchemaDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -61,7 +61,7 @@ class UpdateSchemaDto implements ModelInterface, ArrayAccess, \JsonSerializable 'hints' => 'string', 'contents_sidebar_url' => 'string', 'content_sidebar_url' => 'string', - 'content_editor_url' => 'string', + 'contents_list_url' => 'string', 'validate_on_publish' => 'bool', 'tags' => 'string[]' ]; @@ -92,7 +92,7 @@ class UpdateSchemaDto implements ModelInterface, ArrayAccess, \JsonSerializable 'hints' => null, 'contents_sidebar_url' => null, 'content_sidebar_url' => null, - 'content_editor_url' => null, + 'contents_list_url' => null, 'validate_on_publish' => null, 'tags' => null ]; @@ -107,7 +107,7 @@ class UpdateSchemaDto implements ModelInterface, ArrayAccess, \JsonSerializable 'hints' => true, 'contents_sidebar_url' => true, 'content_sidebar_url' => true, - 'content_editor_url' => true, + 'contents_list_url' => true, 'validate_on_publish' => false, 'tags' => true ]; @@ -212,7 +212,7 @@ public function isNullableSetToNull(string $property): bool 'hints' => 'hints', 'contents_sidebar_url' => 'contentsSidebarUrl', 'content_sidebar_url' => 'contentSidebarUrl', - 'content_editor_url' => 'contentEditorUrl', + 'contents_list_url' => 'contentsListUrl', 'validate_on_publish' => 'validateOnPublish', 'tags' => 'tags' ]; @@ -227,7 +227,7 @@ public function isNullableSetToNull(string $property): bool 'hints' => 'setHints', 'contents_sidebar_url' => 'setContentsSidebarUrl', 'content_sidebar_url' => 'setContentSidebarUrl', - 'content_editor_url' => 'setContentEditorUrl', + 'contents_list_url' => 'setContentsListUrl', 'validate_on_publish' => 'setValidateOnPublish', 'tags' => 'setTags' ]; @@ -242,7 +242,7 @@ public function isNullableSetToNull(string $property): bool 'hints' => 'getHints', 'contents_sidebar_url' => 'getContentsSidebarUrl', 'content_sidebar_url' => 'getContentSidebarUrl', - 'content_editor_url' => 'getContentEditorUrl', + 'contents_list_url' => 'getContentsListUrl', 'validate_on_publish' => 'getValidateOnPublish', 'tags' => 'getTags' ]; @@ -308,7 +308,7 @@ public function __construct(array $data = null) $this->setIfExists('hints', $data ?? [], null); $this->setIfExists('contents_sidebar_url', $data ?? [], null); $this->setIfExists('content_sidebar_url', $data ?? [], null); - $this->setIfExists('content_editor_url', $data ?? [], null); + $this->setIfExists('contents_list_url', $data ?? [], null); $this->setIfExists('validate_on_publish', $data ?? [], null); $this->setIfExists('tags', $data ?? [], null); @@ -517,35 +517,35 @@ public function setContentSidebarUrl($content_sidebar_url) } /** - * Gets content_editor_url + * Gets contents_list_url * * @return string|null */ - public function getContentEditorUrl() + public function getContentsListUrl() { - return $this->container['content_editor_url']; + return $this->container['contents_list_url']; } /** - * Sets content_editor_url + * Sets contents_list_url * - * @param string|null $content_editor_url The url to the editor plugin. + * @param string|null $contents_list_url The url to the content list plugin. * * @return self */ - public function setContentEditorUrl($content_editor_url) + public function setContentsListUrl($contents_list_url) { - if (is_null($content_editor_url)) { - array_push($this->openAPINullablesSetToNull, 'content_editor_url'); + if (is_null($contents_list_url)) { + array_push($this->openAPINullablesSetToNull, 'contents_list_url'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('content_editor_url', $nullablesSetToNull); + $index = array_search('contents_list_url', $nullablesSetToNull); if ($index !== FALSE) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['content_editor_url'] = $content_editor_url; + $this->container['contents_list_url'] = $contents_list_url; return $this; } diff --git a/lib/Model/UpdateSettingDto.php b/lib/Model/UpdateSettingDto.php index 5e76091..e7a3557 100644 --- a/lib/Model/UpdateSettingDto.php +++ b/lib/Model/UpdateSettingDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateTeamDto.php b/lib/Model/UpdateTeamDto.php index 8899b16..f86b9de 100644 --- a/lib/Model/UpdateTeamDto.php +++ b/lib/Model/UpdateTeamDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateUserDto.php b/lib/Model/UpdateUserDto.php index 87a531b..97f8ee3 100644 --- a/lib/Model/UpdateUserDto.php +++ b/lib/Model/UpdateUserDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpdateWorkflowDto.php b/lib/Model/UpdateWorkflowDto.php index 81fea87..a769a66 100644 --- a/lib/Model/UpdateWorkflowDto.php +++ b/lib/Model/UpdateWorkflowDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** @@ -326,10 +326,6 @@ public function listInvalidProperties() if ($this->container['initial'] === null) { $invalidProperties[] = "'initial' can't be null"; } - if ((mb_strlen($this->container['initial']) < 1)) { - $invalidProperties[] = "invalid value for 'initial', the character length must be bigger than or equal to 1."; - } - return $invalidProperties; } @@ -462,8 +458,6 @@ public function setInitial($initial) if (is_null($initial)) { throw new \InvalidArgumentException('non-nullable initial cannot be null'); } - - $this->container['initial'] = $initial; return $this; diff --git a/lib/Model/UpsertSchemaDto.php b/lib/Model/UpsertSchemaDto.php index 57b0b3e..e770177 100644 --- a/lib/Model/UpsertSchemaDto.php +++ b/lib/Model/UpsertSchemaDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpsertSchemaFieldDto.php b/lib/Model/UpsertSchemaFieldDto.php index abaa669..3cefea7 100644 --- a/lib/Model/UpsertSchemaFieldDto.php +++ b/lib/Model/UpsertSchemaFieldDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UpsertSchemaNestedFieldDto.php b/lib/Model/UpsertSchemaNestedFieldDto.php index b375cb0..49ea194 100644 --- a/lib/Model/UpsertSchemaNestedFieldDto.php +++ b/lib/Model/UpsertSchemaNestedFieldDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UsageRuleTriggerDto.php b/lib/Model/UsageRuleTriggerDto.php index 62e9ccb..fbe4552 100644 --- a/lib/Model/UsageRuleTriggerDto.php +++ b/lib/Model/UsageRuleTriggerDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UserDto.php b/lib/Model/UserDto.php index d7dfec3..5c4542f 100644 --- a/lib/Model/UserDto.php +++ b/lib/Model/UserDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UserProperty.php b/lib/Model/UserProperty.php index 6092bda..c51862d 100644 --- a/lib/Model/UserProperty.php +++ b/lib/Model/UserProperty.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/UsersDto.php b/lib/Model/UsersDto.php index c27c8dd..944aaae 100644 --- a/lib/Model/UsersDto.php +++ b/lib/Model/UsersDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/WebhookMethod.php b/lib/Model/WebhookMethod.php index 0e0297c..da22a29 100644 --- a/lib/Model/WebhookMethod.php +++ b/lib/Model/WebhookMethod.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/WebhookRuleActionDto.php b/lib/Model/WebhookRuleActionDto.php index 0ffbd95..b940cf8 100644 --- a/lib/Model/WebhookRuleActionDto.php +++ b/lib/Model/WebhookRuleActionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/WorkflowDto.php b/lib/Model/WorkflowDto.php index 249527c..3cd31a8 100644 --- a/lib/Model/WorkflowDto.php +++ b/lib/Model/WorkflowDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/WorkflowStepDto.php b/lib/Model/WorkflowStepDto.php index 13de39b..f7398fe 100644 --- a/lib/Model/WorkflowStepDto.php +++ b/lib/Model/WorkflowStepDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/WorkflowTransitionDto.php b/lib/Model/WorkflowTransitionDto.php index 5571b21..f7b66df 100644 --- a/lib/Model/WorkflowTransitionDto.php +++ b/lib/Model/WorkflowTransitionDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/Model/WorkflowsDto.php b/lib/Model/WorkflowsDto.php index 7e396d0..55285da 100644 --- a/lib/Model/WorkflowsDto.php +++ b/lib/Model/WorkflowsDto.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 36b6df9..7cf7c89 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 7.0.1-SNAPSHOT + * Generator version: 7.8.0 */ /** diff --git a/openapi.json b/openapi.json index 5c43195..64a45c3 100644 --- a/openapi.json +++ b/openapi.json @@ -1,5 +1,5 @@ { - "x-generator": "NSwag v13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))", + "x-generator": "NSwag v14.0.8.0 (NJsonSchema v11.0.1.0 (Newtonsoft.Json v13.0.0.0))", "openapi": "3.0.0", "info": { "title": "Squidex API", @@ -762,7 +762,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -821,85 +822,6 @@ "x-fern-sdk-method-name": "postTranslation" } }, - "/api/apps/{app}/ask": { - "post": { - "tags": [ - "Translations" - ], - "summary": "Asks the chatbot a question a text.", - "operationId": "Translations_PostQuestion", - "parameters": [ - { - "name": "app", - "in": "path", - "required": true, - "description": "The name of the app.", - "schema": { - "type": "string" - }, - "x-position": 1, - "x-fern-sdk-variable": "appName" - } - ], - "requestBody": { - "x-name": "request", - "description": "The question request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AskDto" - } - } - }, - "required": true, - "x-position": 2 - }, - "responses": { - "200": { - "description": "Question asked.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "400": { - "description": "Validation error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "500": { - "description": "Operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - } - }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.translate" - ] - } - ], - "x-fern-sdk-group-name": "translations", - "x-fern-sdk-method-name": "postQuestion" - } - }, "/api/templates": { "get": { "tags": [ @@ -1342,16 +1264,6 @@ } } }, - "409": { - "description": "Team name is already in use.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, "500": { "description": "Operation failed.", "content": { @@ -1377,14 +1289,14 @@ "tags": [ "Teams" ], - "summary": "Get an team by name.", + "summary": "Get an team by ID.", "operationId": "Teams_GetTeam", "parameters": [ { "name": "team", "in": "path", "required": true, - "description": "The name of the team.", + "description": "The ID of the team.", "schema": { "type": "string" }, @@ -1435,7 +1347,7 @@ "name": "team", "in": "path", "required": true, - "description": "The name of the team to update.", + "description": "The ID of the team to update.", "schema": { "type": "string" }, @@ -1499,6 +1411,193 @@ ], "x-fern-sdk-group-name": "teams", "x-fern-sdk-method-name": "putTeam" + }, + "delete": { + "tags": [ + "Teams" + ], + "summary": "Delete the team.", + "operationId": "Teams_DeleteTeam", + "parameters": [ + { + "name": "team", + "in": "path", + "required": true, + "description": "The ID of the team to delete.", + "schema": { + "type": "string" + }, + "x-position": 1 + } + ], + "responses": { + "204": { + "description": "Team deleted." + }, + "404": { + "description": "Team not found." + }, + "400": { + "description": "Validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "500": { + "description": "Operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + } + }, + "security": [ + { + "squidex-oauth-auth": [ + "squidex.teams.{team}.delete" + ] + } + ], + "x-fern-sdk-group-name": "teams", + "x-fern-sdk-method-name": "deleteTeam" + } + }, + "/api/teams/{team}/auth": { + "get": { + "tags": [ + "Teams" + ], + "summary": "Get the team auth settings.", + "operationId": "Teams_GetTeamAuth", + "parameters": [ + { + "name": "team", + "in": "path", + "required": true, + "description": "The ID of the team.", + "schema": { + "type": "string" + }, + "x-position": 1 + } + ], + "responses": { + "200": { + "description": "Teams returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthSchemeResponseDto" + } + } + } + }, + "404": { + "description": "Team not found." + }, + "500": { + "description": "Operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + } + }, + "security": [ + { + "squidex-oauth-auth": [ + "squidex.teams.{team}.auth.read" + ] + } + ], + "x-fern-sdk-group-name": "teams", + "x-fern-sdk-method-name": "getTeamAuth" + }, + "put": { + "tags": [ + "Teams" + ], + "summary": "Update the team auth.", + "operationId": "Teams_PutTeamAuth", + "parameters": [ + { + "name": "team", + "in": "path", + "required": true, + "description": "The ID of the team to update.", + "schema": { + "type": "string" + }, + "x-position": 1 + } + ], + "requestBody": { + "x-name": "request", + "description": "The values to update.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthSchemeValueDto" + } + } + }, + "required": true, + "x-position": 2 + }, + "responses": { + "200": { + "description": "Team updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthSchemeResponseDto" + } + } + } + }, + "400": { + "description": "Team request not valid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Team not found." + }, + "500": { + "description": "Operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + } + }, + "security": [ + { + "squidex-oauth-auth": [ + "squidex.teams.{team}.auth.change" + ] + } + ], + "x-fern-sdk-group-name": "teams", + "x-fern-sdk-method-name": "putTeamAuth" } }, "/api/apps/{app}/usages/log": { @@ -1518,7 +1617,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -1562,7 +1662,7 @@ "tags": [ "Statistics" ], - "summary": "Get api calls in date range.", + "summary": "Get api calls in date range for app.", "operationId": "Usages_GetUsages", "parameters": [ { @@ -1574,7 +1674,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "fromDate", @@ -1717,7 +1818,7 @@ "tags": [ "Statistics" ], - "summary": "Get total asset size.", + "summary": "Get total asset size for app.", "operationId": "Usages_GetCurrentStorageSize", "parameters": [ { @@ -1729,7 +1830,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -1773,7 +1875,7 @@ "tags": [ "Statistics" ], - "summary": "Get total asset size by team.", + "summary": "Get total asset size for team.", "operationId": "Usages_GetTeamCurrentStorageSizeForTeam", "parameters": [ { @@ -1828,7 +1930,7 @@ "tags": [ "Statistics" ], - "summary": "Get asset usage by date.", + "summary": "Get asset usage by date for app.", "operationId": "Usages_GetStorageSizes", "parameters": [ { @@ -1840,7 +1942,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "fromDate", @@ -2001,7 +2104,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "query", @@ -2070,7 +2174,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -2169,7 +2274,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -2279,7 +2385,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -2368,7 +2475,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -2457,7 +2565,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -2557,7 +2666,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -2655,7 +2765,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -2742,7 +2853,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -2851,7 +2963,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -2950,7 +3063,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3038,7 +3152,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3137,7 +3252,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3225,7 +3341,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3324,7 +3441,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3412,7 +3530,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3511,7 +3630,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3599,7 +3719,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3698,7 +3819,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3786,7 +3908,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -3884,7 +4007,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -3938,7 +4062,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -4024,7 +4149,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4088,7 +4214,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4175,7 +4302,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4244,7 +4372,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4333,7 +4462,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4422,7 +4552,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4511,7 +4642,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4600,7 +4732,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4689,7 +4822,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4765,7 +4899,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -4882,7 +5017,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -4936,7 +5072,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -5015,7 +5152,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -5071,7 +5209,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -5158,7 +5297,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -5227,7 +5367,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -5303,7 +5444,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -5379,7 +5521,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -5448,7 +5591,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -5524,7 +5668,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -5590,7 +5735,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -5669,7 +5815,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -5735,7 +5882,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "ruleId", @@ -5821,7 +5969,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -5877,7 +6026,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -5944,7 +6094,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -6095,7 +6246,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -6151,7 +6303,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -6424,7 +6577,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -6546,24 +6700,210 @@ "x-fern-sdk-method-name": "getLanguages" } }, - "/api/apps/{app}/history": { + "/api/apps/jobs/{id}": { "get": { "tags": [ - "History" + "Jobs" ], - "summary": "Get historical events.", - "operationId": "History_GetAppHistory", + "summary": "Get the job content.", + "operationId": "JobsContent_GetJobContent", "parameters": [ { - "name": "app", + "name": "id", "in": "path", "required": true, - "description": "The name of the app.", + "description": "The ID of the job.", + "schema": { + "type": "string" + }, + "x-position": 1 + }, + { + "name": "appId", + "in": "query", + "description": "The ID of the app.", + "schema": { + "type": "string" + }, + "x-position": 2 + } + ], + "responses": { + "200": { + "description": "Job found and content returned.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Job or app not found." + }, + "500": { + "description": "Operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + } + }, + "x-fern-sdk-group-name": "jobs", + "x-fern-sdk-method-name": "getJobContent" + } + }, + "/api/apps/{app}/jobs": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Get all jobs.", + "operationId": "Jobs_GetJobs", + "parameters": [ + { + "name": "app", + "in": "path", + "required": true, + "description": "The name of the app.", + "schema": { + "type": "string" + }, + "x-position": 1, + "x-fern-sdk-variable": "appName", + "x-hidden": "true" + } + ], + "responses": { + "200": { + "description": "Jobs returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobsDto" + } + } + } + }, + "404": { + "description": "App not found." + }, + "500": { + "description": "Operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + } + }, + "security": [ + { + "squidex-oauth-auth": [ + "squidex.apps.{app}.jobs.read" + ] + } + ], + "x-fern-sdk-group-name": "jobs", + "x-fern-sdk-method-name": "getJobs" + } + }, + "/api/apps/{app}/jobs/{id}": { + "delete": { + "tags": [ + "Jobs" + ], + "summary": "Delete a job.", + "operationId": "Jobs_DeleteJob", + "parameters": [ + { + "name": "app", + "in": "path", + "required": true, + "description": "The name of the app.", + "schema": { + "type": "string" + }, + "x-position": 1, + "x-fern-sdk-variable": "appName", + "x-hidden": "true" + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the jobs to delete.", + "schema": { + "type": "string" + }, + "x-position": 2 + } + ], + "responses": { + "204": { + "description": "Job deleted." + }, + "404": { + "description": "Job or app not found." + }, + "400": { + "description": "Validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "500": { + "description": "Operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + } + }, + "security": [ + { + "squidex-oauth-auth": [ + "squidex.apps.{app}.jobs.delete" + ] + } + ], + "x-fern-sdk-group-name": "jobs", + "x-fern-sdk-method-name": "deleteJob" + } + }, + "/api/apps/{app}/history": { + "get": { + "tags": [ + "History" + ], + "summary": "Get the app history.", + "operationId": "History_GetAppHistory", + "parameters": [ + { + "name": "app", + "in": "path", + "required": true, + "description": "The name of the app.", "schema": { "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "channel", @@ -6619,7 +6959,7 @@ "tags": [ "History" ], - "summary": "Get historical events for a team.", + "summary": "Get the team history.", "operationId": "History_GetTeamHistory", "parameters": [ { @@ -7020,7 +7360,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -7202,7 +7543,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -7339,7 +7681,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -7481,7 +7824,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -7601,7 +7945,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -7642,6 +7987,15 @@ }, "x-position": 5 }, + { + "name": "enrichDefaults", + "in": "query", + "description": "Enrich the content with defaults.", + "schema": { + "type": "boolean" + }, + "x-position": 6 + }, { "name": "publish", "in": "query", @@ -7649,7 +8003,7 @@ "schema": { "type": "boolean" }, - "x-position": 6 + "x-position": 7 }, { "name": "X-Unpublished", @@ -7658,7 +8012,7 @@ "schema": { "type": "boolean" }, - "x-position": 7 + "x-position": 8 }, { "name": "X-Languages", @@ -7667,7 +8021,7 @@ "schema": { "type": "string" }, - "x-position": 8 + "x-position": 9 } ], "requestBody": { @@ -7745,7 +8099,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -7767,6 +8122,15 @@ }, "x-position": 2 }, + { + "name": "enrichDefaults", + "in": "query", + "description": "Enrich the content with defaults.", + "schema": { + "type": "boolean" + }, + "x-position": 4 + }, { "name": "X-Unpublished", "in": "header", @@ -7774,7 +8138,7 @@ "schema": { "type": "boolean" }, - "x-position": 4 + "x-position": 5 }, { "name": "X-Languages", @@ -7783,11 +8147,11 @@ "schema": { "type": "string" }, - "x-position": 5 + "x-position": 6 } ], "requestBody": { - "x-name": "request", + "x-name": "Data", "description": "The full data for the content item.", "content": { "application/json": { @@ -7861,7 +8225,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -7977,7 +8342,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -8075,7 +8441,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -8153,7 +8520,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -8292,7 +8660,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -8431,7 +8800,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -8539,7 +8909,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -8633,7 +9004,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -8708,14 +9080,14 @@ "x-fern-sdk-method-name": "bulkUpdateContents" } }, - "/api/content/{app}/{schema}/{id}/status": { + "/api/content/{app}/{schema}/{id}/defaults": { "put": { "tags": [ "Contents" ], - "summary": "Change status of a content item.", + "summary": "Enrich a content item with defaults.", "description": "You can read the generated documentation for your app at /api/content/{appName}/docs.", - "operationId": "Contents_PutContentStatus", + "operationId": "Contents_PutContentDefaults", "parameters": [ { "name": "app", @@ -8726,7 +9098,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -8742,12 +9115,21 @@ "name": "id", "in": "path", "required": true, - "description": "The ID of the content item to change.", + "description": "The ID of the content item to update.", "schema": { "type": "string" }, "x-position": 2 }, + { + "name": "enrichRequiredFields", + "in": "query", + "description": "True, to also enrich required fields. Default: false.\n ", + "schema": { + "type": "boolean" + }, + "x-position": 3 + }, { "name": "X-Unpublished", "in": "header", @@ -8767,22 +9149,9 @@ "x-position": 5 } ], - "requestBody": { - "x-name": "request", - "description": "The status request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChangeStatusDto" - } - } - }, - "required": true, - "x-position": 3 - }, "responses": { "200": { - "description": "Content status changed.", + "description": "Content updated.", "content": { "application/json": { "schema": { @@ -8791,8 +9160,11 @@ } } }, + "404": { + "description": "Content references, schema or app not found." + }, "400": { - "description": "Content request not valid.", + "description": "Validation error.", "content": { "application/json": { "schema": { @@ -8801,9 +9173,6 @@ } } }, - "404": { - "description": "Content, schema or app not found." - }, "500": { "description": "Operation failed.", "content": { @@ -8818,20 +9187,22 @@ "security": [ { "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.changestatus.own" + "squidex.apps.{app}.contents.{schema}.update.own" ] } ], "x-fern-sdk-group-name": "contents", - "x-fern-sdk-method-name": "putContentStatus" - }, - "delete": { + "x-fern-sdk-method-name": "putContentDefaults" + } + }, + "/api/content/{app}/{schema}/{id}/status": { + "put": { "tags": [ "Contents" ], - "summary": "Cancel status change of a content item.", + "summary": "Change status of a content item.", "description": "You can read the generated documentation for your app at /api/content/{appName}/docs.", - "operationId": "Contents_DeleteContentStatus", + "operationId": "Contents_PutContentStatus", "parameters": [ { "name": "app", @@ -8842,7 +9213,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -8858,7 +9230,7 @@ "name": "id", "in": "path", "required": true, - "description": "The ID of the content item to cancel.", + "description": "The ID of the content item to change.", "schema": { "type": "string" }, @@ -8871,7 +9243,7 @@ "schema": { "type": "boolean" }, - "x-position": 3 + "x-position": 4 }, { "name": "X-Languages", @@ -8880,12 +9252,25 @@ "schema": { "type": "string" }, - "x-position": 4 + "x-position": 5 } ], + "requestBody": { + "x-name": "request", + "description": "The status request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeStatusDto" + } + } + }, + "required": true, + "x-position": 3 + }, "responses": { "200": { - "description": "Content status change cancelled.", + "description": "Content status changed.", "content": { "application/json": { "schema": { @@ -8926,10 +9311,114 @@ } ], "x-fern-sdk-group-name": "contents", - "x-fern-sdk-method-name": "deleteContentStatus" - } - }, - "/api/content/{app}/{schema}/{id}/draft": { + "x-fern-sdk-method-name": "putContentStatus" + }, + "delete": { + "tags": [ + "Contents" + ], + "summary": "Cancel status change of a content item.", + "description": "You can read the generated documentation for your app at /api/content/{appName}/docs.", + "operationId": "Contents_DeleteContentStatus", + "parameters": [ + { + "name": "app", + "in": "path", + "required": true, + "description": "The name of the app.", + "schema": { + "type": "string" + }, + "x-position": 0, + "x-fern-sdk-variable": "appName", + "x-hidden": "true" + }, + { + "name": "schema", + "in": "path", + "required": true, + "description": "The name of the schema.", + "schema": { + "type": "string" + }, + "x-position": 1 + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "The ID of the content item to cancel.", + "schema": { + "type": "string" + }, + "x-position": 2 + }, + { + "name": "X-Unpublished", + "in": "header", + "description": "Return unpublished content items.", + "schema": { + "type": "boolean" + }, + "x-position": 3 + }, + { + "name": "X-Languages", + "in": "header", + "description": "The list of languages to resolve (comma-separated).", + "schema": { + "type": "string" + }, + "x-position": 4 + } + ], + "responses": { + "200": { + "description": "Content status change cancelled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContentDto" + } + } + } + }, + "400": { + "description": "Content request not valid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Content, schema or app not found." + }, + "500": { + "description": "Operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + } + }, + "security": [ + { + "squidex-oauth-auth": [ + "squidex.apps.{app}.contents.{schema}.changestatus.own" + ] + } + ], + "x-fern-sdk-group-name": "contents", + "x-fern-sdk-method-name": "deleteContentStatus" + } + }, + "/api/content/{app}/{schema}/{id}/draft": { "post": { "tags": [ "Contents" @@ -8947,7 +9436,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -9050,7 +9540,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "schema", @@ -9155,7 +9646,37 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" + }, + { + "name": "The query string", + "in": "query", + "description": "The optional version of the asset.", + "schema": { + "type": "string" + }, + "x-position": 1 + }, + { + "name": "variables", + "in": "query", + "description": "The optional operation variables.", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 2 + }, + { + "name": "operationName", + "in": "query", + "description": "The optional operation name.", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 3 }, { "name": "X-Unpublished", @@ -9164,18 +9685,15 @@ "schema": { "type": "boolean" }, - "x-position": 1 + "x-position": 4 } ], "responses": { "200": { "description": "Contents returned or mutated.", "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } + "application/json": { + "schema": {} } } }, @@ -9200,16 +9718,14 @@ ], "x-fern-sdk-group-name": "contents", "x-fern-sdk-method-name": "getGraphQL" - } - }, - "/api/content/{app}/graphql/batch": { - "get": { + }, + "post": { "tags": [ "Contents" ], "summary": "GraphQL endpoint.", "description": "You can read the generated documentation for your app at /api/content/{appName}/docs.", - "operationId": "ContentsShared_GetGraphQL2", + "operationId": "ContentsShared_PostGraphQL", "parameters": [ { "name": "app", @@ -9220,7 +9736,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "X-Unpublished", @@ -9229,24 +9746,41 @@ "schema": { "type": "boolean" }, - "x-position": 1 + "x-position": 2 } ], + "requestBody": { + "x-name": "request", + "description": "The graphql request.", + "content": { + "application/json": { + "schema": {} + } + }, + "x-position": 1 + }, "responses": { "200": { "description": "Contents returned or mutated.", "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } + "application/json": { + "schema": {} } } }, "404": { "description": "App not found." }, + "400": { + "description": "Validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, "500": { "description": "Operation failed.", "content": { @@ -9264,17 +9798,17 @@ } ], "x-fern-sdk-group-name": "contents", - "x-fern-sdk-method-name": "getGraphQL2" + "x-fern-sdk-method-name": "postGraphQL" } }, - "/api/content/{app}": { + "/api/content/{app}/graphql/batch": { "get": { "tags": [ "Contents" ], - "summary": "Queries contents.", + "summary": "GraphQL batch endpoint.", "description": "You can read the generated documentation for your app at /api/content/{appName}/docs.", - "operationId": "ContentsShared_GetAllContents", + "operationId": "ContentsShared_GetGraphQLBatch", "parameters": [ { "name": "app", @@ -9285,72 +9819,246 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { - "name": "ids", + "name": "The query string", "in": "query", - "description": "The list of ids to query.", + "description": "The optional version of the asset.", "schema": { - "type": "string", - "nullable": true + "type": "string" }, "x-position": 1 }, { - "name": "scheduleFrom", + "name": "variables", "in": "query", - "description": "The start of the schedule.", + "description": "The optional operation variables.", "schema": { "type": "string", - "format": "date-time", "nullable": true }, "x-position": 2 }, { - "name": "scheduleTo", + "name": "operationName", "in": "query", - "description": "The end of the schedule.", + "description": "The optional operation name.", "schema": { "type": "string", - "format": "date-time", "nullable": true }, "x-position": 3 }, { - "name": "referencing", - "in": "query", - "description": "The ID of the referencing content item.", + "name": "X-Unpublished", + "in": "header", + "description": "Return unpublished content items.", "schema": { - "type": "string", - "nullable": true + "type": "boolean" }, "x-position": 4 + } + ], + "responses": { + "200": { + "description": "Contents returned or mutated.", + "content": { + "application/json": { + "schema": {} + } + } }, - { - "name": "references", - "in": "query", - "description": "The ID of the reference content item.", - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 5 + "404": { + "description": "App not found." }, + "500": { + "description": "Operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + } + }, + "security": [ { - "name": "q", - "in": "query", - "description": "The optional json query.", + "squidex-oauth-auth": [] + } + ], + "x-fern-sdk-group-name": "contents", + "x-fern-sdk-method-name": "getGraphQLBatch" + }, + "post": { + "tags": [ + "Contents" + ], + "summary": "GraphQL batch endpoint.", + "description": "You can read the generated documentation for your app at /api/content/{appName}/docs.", + "operationId": "ContentsShared_PostGraphQLBatch", + "parameters": [ + { + "name": "app", + "in": "path", + "required": true, + "description": "The name of the app.", "schema": { - "type": "string", - "nullable": true + "type": "string" }, - "x-position": 6 + "x-position": 0, + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { - "name": "X-Fields", + "name": "X-Unpublished", + "in": "header", + "description": "Return unpublished content items.", + "schema": { + "type": "boolean" + }, + "x-position": 2 + } + ], + "requestBody": { + "x-name": "request", + "description": "The graphql request.", + "content": { + "application/json": { + "schema": {} + } + }, + "x-position": 1 + }, + "responses": { + "200": { + "description": "Contents returned or mutated.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "App not found." + }, + "400": { + "description": "Validation error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "500": { + "description": "Operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + } + }, + "security": [ + { + "squidex-oauth-auth": [] + } + ], + "x-fern-sdk-group-name": "contents", + "x-fern-sdk-method-name": "postGraphQLBatch" + } + }, + "/api/content/{app}": { + "get": { + "tags": [ + "Contents" + ], + "summary": "Queries contents.", + "description": "You can read the generated documentation for your app at /api/content/{appName}/docs.", + "operationId": "ContentsShared_GetAllContents", + "parameters": [ + { + "name": "app", + "in": "path", + "required": true, + "description": "The name of the app.", + "schema": { + "type": "string" + }, + "x-position": 0, + "x-fern-sdk-variable": "appName", + "x-hidden": "true" + }, + { + "name": "ids", + "in": "query", + "description": "The list of ids to query.", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 1 + }, + { + "name": "scheduleFrom", + "in": "query", + "description": "The start of the schedule.", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "x-position": 2 + }, + { + "name": "scheduleTo", + "in": "query", + "description": "The end of the schedule.", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "x-position": 3 + }, + { + "name": "referencing", + "in": "query", + "description": "The ID of the referencing content item.", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 4 + }, + { + "name": "references", + "in": "query", + "description": "The ID of the reference content item.", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 5 + }, + { + "name": "q", + "in": "query", + "description": "The optional json query.", + "schema": { + "type": "string", + "nullable": true + }, + "x-position": 6 + }, + { + "name": "X-Fields", "in": "header", "description": "The list of content fields (comma-separated).", "schema": { @@ -9454,7 +10162,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "X-Fields", @@ -9533,501 +10242,10 @@ "$ref": "#/components/schemas/ContentsDto" } } - } - }, - "404": { - "description": "App not found." - }, - "400": { - "description": "Validation error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "500": { - "description": "Operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - } - }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], - "x-fern-sdk-group-name": "contents", - "x-fern-sdk-method-name": "getAllContentsPost" - } - }, - "/api/content/{app}/bulk": { - "post": { - "tags": [ - "Contents" - ], - "summary": "Bulk update content items.", - "description": "You can read the generated documentation for your app at /api/content/{appName}/docs.", - "operationId": "ContentsShared_BulkUpdateContents", - "parameters": [ - { - "name": "app", - "in": "path", - "required": true, - "description": "The name of the app.", - "schema": { - "type": "string" - }, - "x-position": 1, - "x-fern-sdk-variable": "appName" - }, - { - "name": "schema", - "in": "query", - "description": "The name of the schema.", - "schema": { - "type": "string" - }, - "x-position": 2 - } - ], - "requestBody": { - "x-name": "request", - "description": "The bulk update request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkUpdateContentsDto" - } - } - }, - "required": true, - "x-position": 3 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BulkResultDto" - } - } - } - } - }, - "400": { - "description": "Contents request not valid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "404": { - "description": "Contents references, schema or app not found." - }, - "500": { - "description": "Operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - } - }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.contents.{schema}.read.own" - ] - } - ], - "x-fern-sdk-group-name": "contents", - "x-fern-sdk-method-name": "bulkUpdateContents" - } - }, - "/api/apps/{app}/watching/{resource}": { - "get": { - "tags": [ - "Comments" - ], - "summary": "Get all watching users..", - "operationId": "Comments_GetWatchingUsers", - "parameters": [ - { - "name": "app", - "in": "path", - "required": true, - "description": "The name of the app.", - "schema": { - "type": "string" - }, - "x-position": 1, - "x-fern-sdk-variable": "appName" - }, - { - "name": "resource", - "in": "path", - "required": true, - "description": "The path to the resource.", - "schema": { - "type": "string" - }, - "x-position": 2 - } - ], - "responses": { - "200": { - "description": "Watching users returned.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "404": { - "description": "App not found." - }, - "500": { - "description": "Operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - } - }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], - "x-fern-sdk-group-name": "comments", - "x-fern-sdk-method-name": "getWatchingUsers" - } - }, - "/api/apps/{app}/comments/{commentsId}": { - "get": { - "tags": [ - "Comments" - ], - "summary": "Get all comments.", - "description": "When passing in a version you can retrieve all updates since then.", - "operationId": "Comments_GetComments", - "parameters": [ - { - "name": "app", - "in": "path", - "required": true, - "description": "The name of the app.", - "schema": { - "type": "string" - }, - "x-position": 1, - "x-fern-sdk-variable": "appName" - }, - { - "name": "commentsId", - "in": "path", - "required": true, - "description": "The ID of the comments.", - "schema": { - "type": "string" - }, - "x-position": 2 - }, - { - "name": "version", - "in": "query", - "description": "The current version.", - "schema": { - "type": "integer", - "format": "int64", - "default": -2 - }, - "x-position": 3 - } - ], - "responses": { - "200": { - "description": "Comments returned.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommentsDto" - } - } - } - }, - "404": { - "description": "App not found." - }, - "500": { - "description": "Operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - } - }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.comments.read" - ] - } - ], - "x-fern-sdk-group-name": "comments", - "x-fern-sdk-method-name": "getComments" - }, - "post": { - "tags": [ - "Comments" - ], - "summary": "Create a new comment.", - "operationId": "Comments_PostComment", - "parameters": [ - { - "name": "app", - "in": "path", - "required": true, - "description": "The name of the app.", - "schema": { - "type": "string" - }, - "x-position": 1, - "x-fern-sdk-variable": "appName" - }, - { - "name": "commentsId", - "in": "path", - "required": true, - "description": "The ID of the comments.", - "schema": { - "type": "string" - }, - "x-position": 2 - } - ], - "requestBody": { - "x-name": "request", - "description": "The comment object that needs to created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpsertCommentDto" - } - } - }, - "required": true, - "x-position": 3 - }, - "responses": { - "201": { - "description": "Comment created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommentDto" - } - } - } - }, - "400": { - "description": "Comment request not valid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "404": { - "description": "App not found." - }, - "500": { - "description": "Operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - } - }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.comments.create" - ] - } - ], - "x-fern-sdk-group-name": "comments", - "x-fern-sdk-method-name": "postComment" - } - }, - "/api/apps/{app}/comments/{commentsId}/{commentId}": { - "put": { - "tags": [ - "Comments" - ], - "summary": "Update a comment.", - "operationId": "Comments_PutComment", - "parameters": [ - { - "name": "app", - "in": "path", - "required": true, - "description": "The name of the app.", - "schema": { - "type": "string" - }, - "x-position": 1, - "x-fern-sdk-variable": "appName" - }, - { - "name": "commentsId", - "in": "path", - "required": true, - "description": "The ID of the comments.", - "schema": { - "type": "string" - }, - "x-position": 2 - }, - { - "name": "commentId", - "in": "path", - "required": true, - "description": "The ID of the comment.", - "schema": { - "type": "string" - }, - "x-position": 3 - } - ], - "requestBody": { - "x-name": "request", - "description": "The comment object that needs to updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpsertCommentDto" - } - } - }, - "required": true, - "x-position": 4 - }, - "responses": { - "204": { - "description": "Comment updated." - }, - "400": { - "description": "Comment request not valid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - }, - "404": { - "description": "Comment or app not found." - }, - "500": { - "description": "Operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorDto" - } - } - } - } - }, - "security": [ - { - "squidex-oauth-auth": [ - "squidex.apps.{app}.comments.update" - ] - } - ], - "x-fern-sdk-group-name": "comments", - "x-fern-sdk-method-name": "putComment" - }, - "delete": { - "tags": [ - "Comments" - ], - "summary": "Delete a comment.", - "operationId": "Comments_DeleteComment", - "parameters": [ - { - "name": "app", - "in": "path", - "required": true, - "description": "The name of the app.", - "schema": { - "type": "string" - }, - "x-position": 1, - "x-fern-sdk-variable": "appName" - }, - { - "name": "commentsId", - "in": "path", - "required": true, - "description": "The ID of the comments.", - "schema": { - "type": "string" - }, - "x-position": 2 - }, - { - "name": "commentId", - "in": "path", - "required": true, - "description": "The ID of the comment.", - "schema": { - "type": "string" - }, - "x-position": 3 - } - ], - "responses": { - "204": { - "description": "Comment deleted." + } }, "404": { - "description": "Comment or app not found." + "description": "App not found." }, "400": { "description": "Validation error.", @@ -10052,115 +10270,73 @@ }, "security": [ { - "squidex-oauth-auth": [ - "squidex.apps.{app}.comments.delete" - ] + "squidex-oauth-auth": [] } ], - "x-fern-sdk-group-name": "comments", - "x-fern-sdk-method-name": "deleteComment" + "x-fern-sdk-group-name": "contents", + "x-fern-sdk-method-name": "getAllContentsPost" } }, - "/api/users/{userId}/notifications": { - "get": { + "/api/content/{app}/bulk": { + "post": { "tags": [ - "Notifications" + "Contents" ], - "summary": "Get all notifications.", - "description": "When passing in a version you can retrieve all updates since then.", - "operationId": "UserNotifications_GetNotifications", + "summary": "Bulk update content items.", + "description": "You can read the generated documentation for your app at /api/content/{appName}/docs.", + "operationId": "ContentsShared_BulkUpdateAllContents", "parameters": [ { - "name": "userId", + "name": "app", "in": "path", "required": true, - "description": "The user id.", + "description": "The name of the app.", "schema": { "type": "string" }, - "x-position": 1 + "x-position": 1, + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { - "name": "version", + "name": "schema", "in": "query", - "description": "The current version.", + "description": "The name of the schema.", "schema": { - "type": "integer", - "format": "int64", - "default": -2 + "type": "string" }, "x-position": 2 } ], - "responses": { - "200": { - "description": "All comments returned.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CommentsDto" - } + "requestBody": { + "x-name": "request", + "description": "The bulk update request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkUpdateContentsDto" } } }, - "500": { - "description": "Operation failed.", + "required": true, + "x-position": 3 + }, + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/BulkResultDto" + } } } } - } - }, - "security": [ - { - "squidex-oauth-auth": [] - } - ], - "x-fern-sdk-group-name": "notifications", - "x-fern-sdk-method-name": "getNotifications" - } - }, - "/api/users/{userId}/notifications/{commentId}": { - "delete": { - "tags": [ - "Notifications" - ], - "summary": "Delete a notification.", - "operationId": "UserNotifications_DeleteComment", - "parameters": [ - { - "name": "userId", - "in": "path", - "required": true, - "description": "The user id.", - "schema": { - "type": "string" - }, - "x-position": 1 - }, - { - "name": "commentId", - "in": "path", - "required": true, - "description": "The ID of the comment.", - "schema": { - "type": "string" - }, - "x-position": 2 - } - ], - "responses": { - "204": { - "description": "Comment deleted." - }, - "404": { - "description": "Comment not found." }, "400": { - "description": "Validation error.", + "description": "Contents request not valid.", "content": { "application/json": { "schema": { @@ -10169,6 +10345,9 @@ } } }, + "404": { + "description": "Contents references, schema or app not found." + }, "500": { "description": "Operation failed.", "content": { @@ -10182,11 +10361,13 @@ }, "security": [ { - "squidex-oauth-auth": [] + "squidex-oauth-auth": [ + "squidex.apps.{app}.contents.{schema}.read.own" + ] } ], - "x-fern-sdk-group-name": "notifications", - "x-fern-sdk-method-name": "deleteComment" + "x-fern-sdk-group-name": "contents", + "x-fern-sdk-method-name": "bulkUpdateAllContents" } }, "/api/apps/{app}/backups/{id}": { @@ -10206,7 +10387,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -10245,6 +10427,7 @@ } } }, + "deprecated": true, "x-fern-sdk-group-name": "backups", "x-fern-sdk-method-name": "getBackupContent" }, @@ -10264,7 +10447,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -10305,10 +10489,11 @@ } } }, + "deprecated": true, "security": [ { "squidex-oauth-auth": [ - "squidex.apps.{app}.backups.delete" + "squidex.apps.{app}.jobs.delete" ] } ], @@ -10380,6 +10565,7 @@ } } }, + "deprecated": true, "x-fern-sdk-group-name": "backups", "x-fern-sdk-method-name": "getBackupContentV2" } @@ -10401,7 +10587,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -10429,10 +10616,11 @@ } } }, + "deprecated": true, "security": [ { "squidex-oauth-auth": [ - "squidex.apps.{app}.backups.read" + "squidex.apps.{app}.jobs.read" ] } ], @@ -10455,7 +10643,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -10489,7 +10678,7 @@ "security": [ { "squidex-oauth-auth": [ - "squidex.apps.{app}.backups.create" + "squidex.apps.{app}.jobs.create" ] } ], @@ -10608,7 +10797,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "idOrSlug", @@ -11041,7 +11231,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "parentId", @@ -11115,7 +11306,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -11194,7 +11386,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -11281,7 +11474,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -11350,7 +11544,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -11440,7 +11635,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -11500,7 +11696,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "name", @@ -11594,7 +11791,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "parentId", @@ -11733,10 +11931,11 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { - "name": "parentId", + "name": "ParentId", "in": "query", "description": "The optional parent folder id.", "schema": { @@ -11773,6 +11972,12 @@ "file": { "type": "string", "format": "binary" + }, + "fileUrl": { + "type": "string" + }, + "fileName": { + "type": "string" } } } @@ -11853,7 +12058,8 @@ "type": "string" }, "x-position": 0, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "X-NoTotal", @@ -11950,7 +12156,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -12015,7 +12222,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -12055,6 +12263,12 @@ "file": { "type": "string", "format": "binary" + }, + "fileUrl": { + "type": "string" + }, + "fileName": { + "type": "string" } } } @@ -12132,7 +12346,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -12219,7 +12434,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -12306,7 +12522,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -12389,7 +12606,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -12411,6 +12629,12 @@ "file": { "type": "string", "format": "binary" + }, + "fileUrl": { + "type": "string" + }, + "fileName": { + "type": "string" } } } @@ -12490,7 +12714,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -12579,7 +12804,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -12621,7 +12847,7 @@ "tags": [ "Apps" ], - "summary": "Update the app asset scripts.", + "summary": "Update the asset scripts.", "operationId": "AppAssets_PutAssetScripts", "parameters": [ { @@ -12633,7 +12859,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -12713,7 +12940,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -12768,7 +12996,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -12848,7 +13077,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -12936,7 +13166,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -13012,7 +13243,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -13066,7 +13298,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -13145,7 +13378,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -13209,7 +13443,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -13285,7 +13520,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -13333,7 +13569,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -13345,6 +13582,12 @@ "file": { "type": "string", "format": "binary" + }, + "fileUrl": { + "type": "string" + }, + "fileName": { + "type": "string" } } } @@ -13412,7 +13655,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -13478,7 +13722,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -13520,7 +13765,7 @@ "tags": [ "Apps" ], - "summary": "Attaches an app language.", + "summary": "Add an app language.", "operationId": "AppLanguages_PostLanguage", "parameters": [ { @@ -13532,7 +13777,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -13611,7 +13857,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "language", @@ -13698,7 +13945,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "language", @@ -13774,7 +14022,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -13828,7 +14077,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -13907,7 +14157,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -13966,7 +14217,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "roleName", @@ -14053,7 +14305,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "roleName", @@ -14295,7 +14548,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -14347,7 +14601,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -14424,7 +14679,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -14483,7 +14739,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -14562,7 +14819,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -14602,7 +14860,7 @@ "tags": [ "Apps" ], - "summary": "Update the app settings.", + "summary": "Update the settings.", "operationId": "AppSettings_PutSettings", "parameters": [ { @@ -14614,7 +14872,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -14693,7 +14952,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "responses": { @@ -14747,7 +15007,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" } ], "requestBody": { @@ -14826,7 +15087,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -14913,7 +15175,8 @@ "type": "string" }, "x-position": 1, - "x-fern-sdk-variable": "appName" + "x-fern-sdk-variable": "appName", + "x-hidden": "true" }, { "name": "id", @@ -15315,8 +15578,7 @@ }, "targetLanguage": { "type": "string", - "description": "The target language.", - "minLength": 1 + "description": "The target language." }, "sourceLanguage": { "type": "string", @@ -15324,20 +15586,6 @@ } } }, - "AskDto": { - "type": "object", - "additionalProperties": false, - "required": [ - "prompt" - ], - "properties": { - "prompt": { - "type": "string", - "description": "The text to ask.", - "minLength": 1 - } - } - }, "TemplatesDto": { "allOf": [ { @@ -15597,6 +15845,78 @@ } } }, + "AuthSchemeResponseDto": { + "allOf": [ + { + "$ref": "#/components/schemas/Resource" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "scheme": { + "description": "The auth scheme if configured.", + "nullable": true, + "$ref": "#/components/schemas/AuthSchemeDto" + } + } + } + ] + }, + "AuthSchemeDto": { + "type": "object", + "additionalProperties": false, + "required": [ + "domain", + "displayName", + "clientId", + "clientSecret", + "authority" + ], + "properties": { + "domain": { + "type": "string", + "description": "The domain name of your user accounts.", + "minLength": 1 + }, + "displayName": { + "type": "string", + "description": "The display name for buttons.", + "minLength": 1 + }, + "clientId": { + "type": "string", + "description": "The client ID.", + "minLength": 1 + }, + "clientSecret": { + "type": "string", + "description": "The client secret.", + "minLength": 1 + }, + "authority": { + "type": "string", + "description": "The authority URL.", + "minLength": 1 + }, + "signoutRedirectUrl": { + "type": "string", + "description": "The URL to redirect after a signout.", + "nullable": true + } + } + }, + "AuthSchemeValueDto": { + "type": "object", + "additionalProperties": false, + "properties": { + "scheme": { + "description": "The auth scheme if configured.", + "nullable": true, + "$ref": "#/components/schemas/AuthSchemeDto" + } + } + }, "LogDownloadDto": { "type": "object", "additionalProperties": false, @@ -15837,13 +16157,11 @@ }, "createdBy": { "type": "string", - "description": "The user that has created the schema.", - "minLength": 1 + "description": "The user that has created the schema." }, "lastModifiedBy": { "type": "string", - "description": "The user that has updated the schema.", - "minLength": 1 + "description": "The user that has updated the schema." }, "name": { "type": "string", @@ -15982,6 +16300,16 @@ "description": "The url to the editor plugin.", "nullable": true }, + "contentsEditorUrl": { + "type": "string", + "description": "The url to the editor plugin.", + "nullable": true + }, + "contentsListUrl": { + "type": "string", + "description": "The url to the content list plugin.", + "nullable": true + }, "validateOnPublish": { "type": "boolean", "description": "True to validate the content items on publish." @@ -16147,6 +16475,7 @@ "Json": "#/components/schemas/JsonFieldPropertiesDto", "Number": "#/components/schemas/NumberFieldPropertiesDto", "References": "#/components/schemas/ReferencesFieldPropertiesDto", + "RichText": "#/components/schemas/RichTextFieldPropertiesDto", "String": "#/components/schemas/StringFieldPropertiesDto", "Tags": "#/components/schemas/TagsFieldPropertiesDto", "UI": "#/components/schemas/UIFieldPropertiesDto" @@ -16811,7 +17140,97 @@ }, "schemaIds": { "type": "array", - "description": "The ID of the referenced schemas.", + "description": "The ID of the referenced schemas.", + "nullable": true, + "items": { + "type": "string" + } + } + } + } + ] + }, + "ReferencesFieldEditor": { + "type": "string", + "description": "", + "x-enumNames": [ + "List", + "Dropdown", + "Tags", + "Checkboxes", + "Input", + "Radio" + ], + "enum": [ + "List", + "Dropdown", + "Tags", + "Checkboxes", + "Input", + "Radio" + ] + }, + "RichTextFieldPropertiesDto": { + "allOf": [ + { + "$ref": "#/components/schemas/FieldPropertiesDto" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "folderId": { + "type": "string", + "description": "The initial id to the folder when the control supports file uploads.", + "nullable": true + }, + "minLength": { + "type": "integer", + "description": "The minimum allowed length for the field value.", + "format": "int32", + "nullable": true + }, + "maxLength": { + "type": "integer", + "description": "The maximum allowed length for the field value.", + "format": "int32", + "nullable": true + }, + "minCharacters": { + "type": "integer", + "description": "The minimum allowed of normal characters for the field value.", + "format": "int32", + "nullable": true + }, + "maxCharacters": { + "type": "integer", + "description": "The maximum allowed of normal characters for the field value.", + "format": "int32", + "nullable": true + }, + "minWords": { + "type": "integer", + "description": "The minimum allowed number of words for the field value.", + "format": "int32", + "nullable": true + }, + "maxWords": { + "type": "integer", + "description": "The maximum allowed number of words for the field value.", + "format": "int32", + "nullable": true + }, + "classNames": { + "type": "array", + "description": "The class names for the editor.", + "nullable": true, + "items": { + "type": "string" + } + }, + "schemaIds": { + "type": "array", + "description": "The allowed schema ids that can be embedded.", "nullable": true, "items": { "type": "string" @@ -16821,24 +17240,6 @@ } ] }, - "ReferencesFieldEditor": { - "type": "string", - "description": "", - "x-enumNames": [ - "List", - "Dropdown", - "Tags", - "Checkboxes", - "Input" - ], - "enum": [ - "List", - "Dropdown", - "Tags", - "Checkboxes", - "Input" - ] - }, "StringFieldPropertiesDto": { "allOf": [ { @@ -16909,6 +17310,14 @@ "format": "int32", "nullable": true }, + "classNames": { + "type": "array", + "description": "The class names for the editor.", + "nullable": true, + "items": { + "type": "string" + } + }, "allowedValues": { "type": "array", "description": "The allowed values for the field value.", @@ -17447,9 +17856,9 @@ "description": "The url to a the sidebar plugin for content items.", "nullable": true }, - "contentEditorUrl": { + "contentsListUrl": { "type": "string", - "description": "The url to the editor plugin.", + "description": "The url to the content list plugin.", "nullable": true }, "validateOnPublish": { @@ -17931,7 +18340,6 @@ "AzureQueue": "#/components/schemas/AzureQueueRuleActionDto", "Comment": "#/components/schemas/CommentRuleActionDto", "CreateContent": "#/components/schemas/CreateContentRuleActionDto", - "DeepDetect": "#/components/schemas/DeepDetectRuleActionDto", "Discourse": "#/components/schemas/DiscourseRuleActionDto", "ElasticSearch": "#/components/schemas/ElasticSearchRuleActionDto", "Email": "#/components/schemas/EmailRuleActionDto", @@ -18111,35 +18519,6 @@ } ] }, - "DeepDetectRuleActionDto": { - "allOf": [ - { - "$ref": "#/components/schemas/RuleActionDto" - }, - { - "type": "object", - "additionalProperties": false, - "required": [ - "minimumProbability", - "maximumTags" - ], - "properties": { - "minimumProbability": { - "title": "Min Probability", - "type": "integer", - "description": "The minimum probability for objects to be recognized (0 - 100).", - "format": "int64" - }, - "maximumTags": { - "title": "Max Tags", - "type": "integer", - "description": "The maximum number of tags to use.", - "format": "int64" - } - } - } - ] - }, "DiscourseRuleActionDto": { "allOf": [ { @@ -18269,12 +18648,12 @@ "required": [ "serverHost", "serverPort", - "serverUsername", - "serverPassword", "messageFrom", "messageTo", "messageSubject", - "messageBody" + "messageBody", + "serverUsername", + "serverPassword" ], "properties": { "serverHost": { @@ -18292,14 +18671,12 @@ "serverUsername": { "title": "Username", "type": "string", - "description": "The username for the SMTP server.", - "minLength": 1 + "description": "The username for the SMTP server." }, "serverPassword": { "title": "Password", "type": "string", - "description": "The password for the SMTP server.", - "minLength": 1 + "description": "The password for the SMTP server." }, "messageFrom": { "title": "From Address", @@ -19344,6 +19721,134 @@ } } }, + "JobsDto": { + "allOf": [ + { + "$ref": "#/components/schemas/Resource" + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "description": "The jobs.", + "items": { + "$ref": "#/components/schemas/JobDto" + } + } + } + } + ] + }, + "JobDto": { + "allOf": [ + { + "$ref": "#/components/schemas/Resource" + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "started", + "status", + "taskName", + "description", + "taskArguments", + "log", + "canDownload" + ], + "properties": { + "id": { + "type": "string", + "description": "The ID of the job." + }, + "started": { + "type": "string", + "description": "The time when the job has been started.", + "format": "date-time" + }, + "stopped": { + "type": "string", + "description": "The time when the job has been stopped.", + "format": "date-time", + "nullable": true + }, + "status": { + "description": "The status of the operation.", + "$ref": "#/components/schemas/JobStatus" + }, + "taskName": { + "type": "string", + "description": "The name of the task." + }, + "description": { + "type": "string", + "description": "The description of the job." + }, + "taskArguments": { + "type": "object", + "description": "The arguments for the job.", + "additionalProperties": { + "type": "string" + } + }, + "log": { + "type": "array", + "description": "The list of log items.", + "items": { + "$ref": "#/components/schemas/JobLogMessageDto" + } + }, + "canDownload": { + "type": "boolean", + "description": "Indicates whether the job can be downloaded." + } + } + } + ] + }, + "JobStatus": { + "type": "string", + "description": "", + "x-enumNames": [ + "Created", + "Started", + "Completed", + "Cancelled", + "Failed" + ], + "enum": [ + "Created", + "Started", + "Completed", + "Cancelled", + "Failed" + ] + }, + "JobLogMessageDto": { + "type": "object", + "additionalProperties": false, + "required": [ + "timestamp", + "message" + ], + "properties": { + "timestamp": { + "type": "string", + "description": "The timestamp.", + "format": "date-time" + }, + "message": { + "type": "string", + "description": "The log message." + } + } + }, "HistoryEventDto": { "type": "object", "additionalProperties": false, @@ -19782,6 +20287,10 @@ "type": "boolean", "description": "True to turn off scripting for faster inserts. Default: true." }, + "enrichRequiredFields": { + "type": "boolean", + "description": "True, to also enrich required fields. Default: false.\n " + }, "doNotValidate": { "type": "boolean", "description": "True to turn off validation for faster inserts. Default: false." @@ -19847,6 +20356,10 @@ "type": "boolean", "description": "True to delete the content permanently." }, + "enrichDefaults": { + "type": "boolean", + "description": "Enrich the data with the default values when updating a content item." + }, "expectedCount": { "type": "integer", "description": "The number of expected items. Set it to a higher number to update multiple items when a query is defined.", @@ -19910,19 +20423,13 @@ ], "properties": { "path": { - "$ref": "#/components/schemas/PropertyPath" + "type": "string" }, "order": { "$ref": "#/components/schemas/SortOrder" } } }, - "PropertyPath": { - "type": "array", - "items": { - "type": "string" - } - }, "SortOrder": { "type": "string", "description": "", @@ -19945,7 +20452,8 @@ "Delete", "Patch", "Update", - "Validate" + "Validate", + "EnrichDefaults" ], "enum": [ "Upsert", @@ -19954,7 +20462,8 @@ "Delete", "Patch", "Update", - "Validate" + "Validate", + "EnrichDefaults" ] }, "ChangeStatusDto": { @@ -19966,8 +20475,7 @@ "properties": { "status": { "type": "string", - "description": "The new status.", - "minLength": 1 + "description": "The new status." }, "dueTime": { "type": "string", @@ -20026,99 +20534,6 @@ } } }, - "CommentsDto": { - "type": "object", - "additionalProperties": false, - "required": [ - "version" - ], - "properties": { - "createdComments": { - "type": "array", - "description": "The created comments including the updates.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/CommentDto" - } - }, - "updatedComments": { - "type": "array", - "description": "The updates comments since the last version.", - "nullable": true, - "items": { - "$ref": "#/components/schemas/CommentDto" - } - }, - "deletedComments": { - "type": "array", - "description": "The deleted comments since the last version.", - "nullable": true, - "items": { - "type": "string" - } - }, - "version": { - "type": "integer", - "description": "The current version.", - "format": "int64" - } - } - }, - "CommentDto": { - "type": "object", - "additionalProperties": false, - "required": [ - "id", - "time", - "user", - "text" - ], - "properties": { - "id": { - "type": "string", - "description": "The ID of the comment." - }, - "time": { - "type": "string", - "description": "The time when the comment was created or updated last.", - "format": "date-time" - }, - "user": { - "type": "string", - "description": "The user who created or updated the comment." - }, - "text": { - "type": "string", - "description": "The text of the comment." - }, - "url": { - "type": "string", - "description": "The url where the comment is created.", - "format": "uri", - "nullable": true - } - } - }, - "UpsertCommentDto": { - "type": "object", - "additionalProperties": false, - "required": [ - "text" - ], - "properties": { - "text": { - "type": "string", - "description": "The comment text.", - "minLength": 1 - }, - "url": { - "type": "string", - "description": "The url where the comment is created.", - "format": "uri", - "nullable": true - } - } - }, "BackupJobsDto": { "allOf": [ { @@ -20126,6 +20541,8 @@ }, { "type": "object", + "deprecated": true, + "x-deprecatedMessage": "Use Jobs endpoint.", "additionalProperties": false, "required": [ "items" @@ -20149,6 +20566,8 @@ }, { "type": "object", + "deprecated": true, + "x-deprecatedMessage": "Use Jobs endpoint.", "additionalProperties": false, "required": [ "id", @@ -20191,22 +20610,6 @@ } ] }, - "JobStatus": { - "type": "string", - "description": "", - "x-enumNames": [ - "Created", - "Started", - "Completed", - "Failed" - ], - "enum": [ - "Created", - "Started", - "Completed", - "Failed" - ] - }, "RestoreJobDto": { "type": "object", "additionalProperties": false, @@ -21094,8 +21497,7 @@ "properties": { "language": { "type": "string", - "description": "The language to add.", - "minLength": 1 + "description": "The language to add." } } }, @@ -21673,8 +22075,7 @@ }, "initial": { "type": "string", - "description": "The initial step.", - "minLength": 1 + "description": "The initial step." } } } diff --git a/templates/ApiException.mustache b/templates/ApiException.mustache deleted file mode 100644 index e9d6544..0000000 --- a/templates/ApiException.mustache +++ /dev/null @@ -1,110 +0,0 @@ -partial_header}} -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace {{invokerPackage}}; - -use \Exception; - -/** - * ApiException Class Doc Comment - * - * @category Class - * @package {{invokerPackage}} - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - */ -class ApiException extends Exception -{ - /** - * The HTTP body of the server response either as Json or string. - * - * @var \stdClass|string|null - */ - protected $responseBody; - - /** - * The HTTP header of the server response. - * - * @var string[]|null - */ - protected $responseHeaders; - - /** - * The deserialized response object - * - * @var \stdClass|string|null - */ - protected $responseObject; - - /** - * Constructor - * - * @param string $message Error message - * @param int $code HTTP status code - * @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) - { - parent::__construct($message, $code); - $this->responseHeaders = $responseHeaders; - $this->responseBody = $responseBody; - } - - /** - * Gets the HTTP response header - * - * @return string[]|null HTTP response header - */ - public function getResponseHeaders() - { - return $this->responseHeaders; - } - - /** - * Gets the HTTP body of the server response either as Json or string - * - * @return \stdClass|string|null HTTP body of the server response either as \stdClass or string - */ - public function getResponseBody() - { - return $this->responseBody; - } - - /** - * Sets the deserialized response object (during deserialization) - * - * @param mixed $obj Deserialized response object - * - * @return void - */ - public function setResponseObject($obj) - { - $this->responseObject = $obj; - } - - /** - * Gets the deserialized response object (during deserialization) - * - * @return mixed the deserialized response object - */ - public function getResponseObject() - { - return $this->responseObject; - } -} diff --git a/templates/HeaderSelector.mustache b/templates/HeaderSelector.mustache deleted file mode 100644 index 1921b06..0000000 --- a/templates/HeaderSelector.mustache +++ /dev/null @@ -1,236 +0,0 @@ -partial_header}} -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace {{invokerPackage}}; - -/** - * HeaderSelector Class Doc Comment - * - * @category Class - * @package {{invokerPackage}} - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - */ -class HeaderSelector -{ - /** - * @param string[] $accept - * @param string $contentType - * @param bool $isMultipart - * @return string[] - */ - public function selectHeaders(array $accept, string $contentType, bool $isMultipart): array - { - $headers = []; - - $accept = $this->selectAcceptHeader($accept); - if ($accept !== null) { - $headers['Accept'] = $accept; - } - - if (!$isMultipart) { - if($contentType === '') { - $contentType = 'application/json'; - } - - $headers['Content-Type'] = $contentType; - } - - return $headers; - } - - /** - * Return the header 'Accept' based on an array of Accept provided. - * - * @param string[] $accept Array of header - * - * @return null|string Accept (e.g. application/json) - */ - private function selectAcceptHeader(array $accept): ?string - { - # filter out empty entries - $accept = array_filter($accept); - - if (count($accept) === 0) { - return null; - } - - # If there's only one Accept header, just use it - if (count($accept) === 1) { - return reset($accept); - } - - # 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); - if (count($headersWithJson) === 0) { - return implode(',', $accept); - } - - # If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1, - # to give the highest priority to json-like headers - recalculating the existing ones, if needed - return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); - } - - /** - * Create an Accept header string from the given "Accept" headers array, recalculating all weights - * - * @param string[] $accept Array of Accept Headers - * @param string[] $headersWithJson Array of Accept Headers of type "json" - * - * @return string "Accept" Header (e.g. "application/json, text/html; q=0.9") - */ - private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string - { - $processedHeaders = [ - 'withApplicationJson' => [], - 'withJson' => [], - 'withoutJson' => [], - ]; - - foreach ($accept as $header) { - - $headerData = $this->getHeaderAndWeight($header); - - if (stripos($headerData['header'], 'application/json') === 0) { - $processedHeaders['withApplicationJson'][] = $headerData; - } elseif (in_array($header, $headersWithJson, true)) { - $processedHeaders['withJson'][] = $headerData; - } else { - $processedHeaders['withoutJson'][] = $headerData; - } - } - - $acceptHeaders = []; - $currentWeight = 1000; - - $hasMoreThan28Headers = count($accept) > 28; - - foreach($processedHeaders as $headers) { - if (count($headers) > 0) { - $acceptHeaders[] = $this->adjustWeight($headers, $currentWeight, $hasMoreThan28Headers); - } - } - - $acceptHeaders = array_merge(...$acceptHeaders); - - return implode(',', $acceptHeaders); - } - - /** - * Given an Accept header, returns an associative array splitting the header and its weight - * - * @param string $header "Accept" Header - * - * @return array with the header and its weight - */ - private function getHeaderAndWeight(string $header): array - { - # matches headers with weight, splitting the header and the weight in $outputArray - if (preg_match('/(.*);\s*q=(1(?:\.0+)?|0\.\d+)$/', $header, $outputArray) === 1) { - $headerData = [ - 'header' => $outputArray[1], - 'weight' => (int)($outputArray[2] * 1000), - ]; - } else { - $headerData = [ - 'header' => trim($header), - 'weight' => 1000, - ]; - } - - return $headerData; - } - - /** - * @param array[] $headers - * @param float $currentWeight - * @param bool $hasMoreThan28Headers - * @return string[] array of adjusted "Accept" headers - */ - private function adjustWeight(array $headers, float &$currentWeight, bool $hasMoreThan28Headers): array - { - usort($headers, function (array $a, array $b) { - return $b['weight'] - $a['weight']; - }); - - $acceptHeaders = []; - foreach ($headers as $index => $header) { - if($index > 0 && $headers[$index - 1]['weight'] > $header['weight']) - { - $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); - } - - $weight = $currentWeight; - - $acceptHeaders[] = $this->buildAcceptHeader($header['header'], $weight); - } - - $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); - - return $acceptHeaders; - } - - /** - * @param string $header - * @param int $weight - * @return string - */ - private function buildAcceptHeader(string $header, int $weight): string - { - if($weight === 1000) { - return $header; - } - - return trim($header, '; ') . ';q=' . rtrim(sprintf('%0.3f', $weight / 1000), '0'); - } - - /** - * Calculate the next weight, based on the current one. - * - * If there are less than 28 "Accept" headers, the weights will be decreased by 1 on its highest significant digit, using the - * following formula: - * - * next weight = current weight - 10 ^ (floor(log(current weight - 1))) - * - * ( current weight minus ( 10 raised to the power of ( floor of (log to the base 10 of ( current weight minus 1 ) ) ) ) ) - * - * Starting from 1000, this generates the following series: - * - * 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 - * - * The resulting quality codes are closer to the average "normal" usage of them (like "q=0.9", "q=0.8" and so on), but it only works - * if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1 - * decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc. - * - * @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value) - * @param bool $hasMoreThan28Headers - * @return int - */ - public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): int - { - if ($currentWeight <= 1) { - return 1; - } - - if ($hasMoreThan28Headers) { - return $currentWeight - 1; - } - - return $currentWeight - 10 ** floor( log10($currentWeight - 1) ); - } -} diff --git a/templates/ModelInterface.mustache b/templates/ModelInterface.mustache deleted file mode 100644 index 805db43..0000000 --- a/templates/ModelInterface.mustache +++ /dev/null @@ -1,102 +0,0 @@ -partial_header}} -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace {{modelPackage}}; - -/** - * Interface abstracting model access. - * - * @package {{modelPackage}} - * @author OpenAPI Generator team - */ -interface ModelInterface -{ - /** - * The original name of the model. - * - * @return string - */ - public function getModelName(); - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes(); - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats(); - - /** - * Array of attributes where the key is the local name, and the value is the original name - * - * @return array - */ - public static function attributeMap(); - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters(); - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters(); - - /** - * Show all the invalid properties with reasons. - * - * @return array - */ - public function listInvalidProperties(); - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool - */ - public function valid(); - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool; - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool; -} diff --git a/templates/api_doc.mustache b/templates/api_doc.mustache deleted file mode 100644 index db04fa5..0000000 --- a/templates/api_doc.mustache +++ /dev/null @@ -1,104 +0,0 @@ -# {{invokerPackage}}\{{classname}}{{#description}} - -{{.}}{{/description}} - -All URIs are relative to {{basePath}}, except if the operation defines another base path. - -| Method | HTTP request | Description | -| ------------- | ------------- | ------------- | -{{#operations}}{{#operation}}| [**{{operationId}}()**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} | -{{/operation}}{{/operations}}{{#operations}}{{#operation}} - -## `{{{operationId}}}()` - -```php -{{{operationId}}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}: {{{.}}}{{/returnType}} -``` -{{#servers}} -{{#-first}} -### URI(s): -{{/-first}} -- {{{url}}} {{#description}}{{.}}{{/description}}{{#variables}} -{{#-first}} - - Variables: -{{/-first}} - - {{{name}}}: {{{description}}}{{^description}} No description provided{{/description}}{{#enumValues}} -{{#-first}} - - Allowed values: -{{/-first}} - - {{{.}}}{{/enumValues}}{{#defaultValue}} - - Default value: {{{.}}} -{{/defaultValue}}{{/variables}}{{/servers}} -{{{summary}}}{{#notes}} - -{{{.}}}{{/notes}} - -### Example - -```php - php_doc_auth_partial}} -$apiInstance = new {{invokerPackage}}\Api\{{classname}}( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(){{#hasAuthMethods}}, - $config{{/hasAuthMethods}} -); -{{^vendorExtensions.x-group-parameters}} -{{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} -{{/allParams}}{{#servers}}{{#-first}} -$hostIndex = 0; -$variables = [{{#variables}} - '{{{name}}}' => '{{{default}}}{{^default}}YOUR_VALUE{{/default}}',{{/variables}} -]; -{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}} -$associative_array = [ -{{#allParams}} '{{paramName}}' => {{{example}}}, // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} -{{/allParams}} -{{#servers}}{{#-first}} - 'hostIndex' => 0, - $variables = [{{#variables}} - '{{{name}}}' => '{{{default}}}{{^default}}YOUR_VALUE{{/default}}',{{/variables}} - ], -{{/-first}}{{/servers}}]; -{{/vendorExtensions.x-group-parameters}} - -try { - {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#servers}}{{#-first}}{{#allParams}}{{#-first}}, {{/-first}}{{/allParams}}$hostIndex, $variables{{/-first}}{{/servers}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associate_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} - print_r($result);{{/returnType}} -} catch (Exception $e) { - echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -{{#vendorExtensions.x-group-parameters}} -Note: the input parameter is an associative array with the keys listed as the parameter names below. - -{{/vendorExtensions.x-group-parameters}} -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- |{{/-last}}{{/allParams}} -{{#allParams}}| **{{paramName}}** | {{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{{dataType}}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{.}}]{{/defaultValue}} | -{{/allParams}}{{#servers}}{{#-first}}| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | -| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] |{{/-first}} -{{/servers}} - -### Return type - -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} - -### Authorization - -{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} - -### HTTP request headers - -- **Content-Type**: {{#consumes}}`{{{mediaType}}}`{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} -- **Accept**: {{#produces}}`{{{mediaType}}}`{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md){{/operation}}{{/operations}} diff --git a/templates/api_test.mustache b/templates/api_test.mustache deleted file mode 100644 index 86a534a..0000000 --- a/templates/api_test.mustache +++ /dev/null @@ -1,79 +0,0 @@ -partial_header}} -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Please update the test case below to test the endpoint. - */ - -namespace {{invokerPackage}}\Test\Api; - -use \{{invokerPackage}}\Configuration; -use \{{invokerPackage}}\ApiException; -use \{{invokerPackage}}\ObjectSerializer; -use PHPUnit\Framework\TestCase; - -/** - * {{classname}}Test Class Doc Comment - * - * @category Class - * @package {{invokerPackage}} - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - */ -{{#operations}}class {{classname}}Test extends TestCase -{ - - /** - * Setup before running any test cases - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - {{#operation}} - - /** - * Test case for {{{operationId}}} - * - * {{{summary}}}. - * - */ - public function test{{vendorExtensions.x-test-operation-id}}() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - {{/operation}} -} -{{/operations}} diff --git a/templates/git_push.sh.mustache b/templates/git_push.sh.mustache deleted file mode 100644 index 0e3776a..0000000 --- a/templates/git_push.sh.mustache +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="{{{gitHost}}}" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/templates/model.mustache b/templates/model.mustache deleted file mode 100644 index fe57ed7..0000000 --- a/templates/model.mustache +++ /dev/null @@ -1,46 +0,0 @@ -partial_header}} -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -namespace {{modelPackage}}; -{{^isEnum}} -{{^parentSchema}} - -use \ArrayAccess; -{{/parentSchema}} -{{/isEnum}} -use \{{invokerPackage}}\ObjectSerializer; - -/** - * {{classname}} Class Doc Comment - * - * @category Class -{{#description}} - * @description {{.}} -{{/description}} - * @package {{invokerPackage}} - * @author OpenAPI Generator team - * @link https://openapi-generator.tech -{{^isEnum}} - * @implements \ArrayAccess -{{/isEnum}} - */ -{{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}} -{{/model}}{{/models}} diff --git a/templates/model_doc.mustache b/templates/model_doc.mustache deleted file mode 100644 index 43b0ab6..0000000 --- a/templates/model_doc.mustache +++ /dev/null @@ -1,10 +0,0 @@ -# {{#models}}{{#model}}# {{classname}} - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} |{{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}}{{#defaultValue}} [default to {{{.}}}]{{/defaultValue}} -{{/vars}} - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md){{/model}}{{/models}} diff --git a/templates/model_enum.mustache b/templates/model_enum.mustache deleted file mode 100644 index 77001f2..0000000 --- a/templates/model_enum.mustache +++ /dev/null @@ -1,28 +0,0 @@ -class {{classname}} -{ - /** - * Possible values of this enum - */ - {{#allowableValues}} - {{#enumVars}} - public const {{^isString}}NUMBER_{{/isString}}{{{name}}} = {{{value}}}; - - {{/enumVars}} - {{/allowableValues}} - /** - * Gets allowable values of the enum - * @return string[] - */ - public static function getAllowableEnumValues() - { - return [ - {{#allowableValues}} - {{#enumVars}} - self::{{^isString}}NUMBER_{{/isString}}{{{name}}}{{^-last}}, - {{/-last}} - {{/enumVars}} - {{/allowableValues}} - - ]; - } -} diff --git a/templates/model_test.mustache b/templates/model_test.mustache deleted file mode 100644 index e9b0743..0000000 --- a/templates/model_test.mustache +++ /dev/null @@ -1,87 +0,0 @@ -partial_header}} -/** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Please update the test case below to test the model. - */ - -namespace {{invokerPackage}}\Test\Model; - -use PHPUnit\Framework\TestCase; - -/** - * {{classname}}Test Class Doc Comment - * - * @category Class - * @description {{description}}{{^description}}{{classname}}{{/description}} - * @package {{invokerPackage}} - * @author OpenAPI Generator team - * @link https://openapi-generator.tech - */ -class {{classname}}Test extends TestCase -{ - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - - /** - * Test "{{classname}}" - */ - public function test{{classname}}() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -{{#vars}} - - /** - * Test attribute "{{name}}" - */ - public function testProperty{{nameInCamelCase}}() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -{{/vars}} -} -{{/model}} -{{/models}} diff --git a/templates/partial_header.mustache b/templates/partial_header.mustache deleted file mode 100644 index ef3530a..0000000 --- a/templates/partial_header.mustache +++ /dev/null @@ -1,18 +0,0 @@ -/** - {{#appName}} - * {{{.}}} - * - {{/appName}} - {{#appDescription}} - * {{{.}}} - * - {{/appDescription}} - {{#version}} - * The version of the OpenAPI document: {{{.}}} - {{/version}} - {{#infoEmail}} - * Contact: {{{.}}} - {{/infoEmail}} - * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: {{{generatorVersion}}} - */ diff --git a/templates/php_doc_auth_partial.mustache b/templates/php_doc_auth_partial.mustache deleted file mode 100644 index 2821506..0000000 --- a/templates/php_doc_auth_partial.mustache +++ /dev/null @@ -1,23 +0,0 @@ -{{#hasAuthMethods}}{{#authMethods}} -{{#isBasic}} -{{#isBasicBasic}} -// Configure HTTP basic authorization: {{{name}}} -$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration() - ->setUsername('YOUR_USERNAME') - ->setPassword('YOUR_PASSWORD'); -{{/isBasicBasic}} -{{#isBasicBearer}} -// Configure Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} authorization: {{{name}}} -$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -{{/isBasicBearer}} -{{/isBasic}} -{{#isApiKey}} -// Configure API key authorization: {{{name}}} -$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKey('{{{keyParamName}}}', 'YOUR_API_KEY'); -// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -// $config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setApiKeyPrefix('{{{keyParamName}}}', 'Bearer'); -{{/isApiKey}} -{{#isOAuth}} -// Configure OAuth2 access token for authorization: {{{name}}} -$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -{{/isOAuth}}{{/authMethods}}{{/hasAuthMethods}} diff --git a/tests/ContentsTest.php b/tests/ContentsTest.php index e310a4a..3fdc193 100644 --- a/tests/ContentsTest.php +++ b/tests/ContentsTest.php @@ -69,7 +69,7 @@ public function testCreateAndFetchUnpublishedContent() ] ]); - $content = $this->client->contents()->getContent(static::$schema->getName(), $createdContent->getId(), -2, null, null, true); + $content = $this->client->contents()->getContent(static::$schema->getName(), $createdContent->getId(), -2, null, null, null, true); $this->assertEquals($value, $content->getData()->field1->iv); $this->assertTrue($content->getLastModified() != null); $this->assertTrue($content->getLastModifiedBy() != null);