From f4a790b70fef85757f3adcb9ae95aa0f6daea321 Mon Sep 17 00:00:00 2001 From: Phrase Date: Tue, 3 Sep 2024 09:11:13 +0000 Subject: [PATCH] Deploying from phrase/openapi@b8121547 --- docs/Api/TagsApi.md | 6 ++++-- lib/Api/TagsApi.php | 34 +++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/docs/Api/TagsApi.md b/docs/Api/TagsApi.md index f0b7d56..ce43e79 100644 --- a/docs/Api/TagsApi.md +++ b/docs/Api/TagsApi.md @@ -205,7 +205,7 @@ Name | Type | Description | Notes ## tagsList -> \Phrase\Model\Tag[] tagsList($project_id, $x_phrase_app_otp, $page, $per_page, $branch) +> \Phrase\Model\Tag[] tagsList($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch) List tags @@ -230,10 +230,11 @@ $project_id = 'project_id_example'; // string | Project ID $x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional) $page = 1; // int | Page number $per_page = 25; // int | Limit on the number of objects to be returned, between 1 and 100. 25 by default +$exclude_system_tags = true; // bool | excludes tags generated by the system, e.g. job, upload or figma tags $branch = my-feature-branch; // string | specify the branch to use try { - $result = $apiInstance->tagsList($project_id, $x_phrase_app_otp, $page, $per_page, $branch); + $result = $apiInstance->tagsList($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch); print_r($result); } catch (Exception $e) { echo 'Exception when calling TagsApi->tagsList: ', $e->getMessage(), PHP_EOL; @@ -250,6 +251,7 @@ Name | Type | Description | Notes **x_phrase_app_otp** | **string**| Two-Factor-Authentication token (optional) | [optional] **page** | **int**| Page number | [optional] **per_page** | **int**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional] + **exclude_system_tags** | **bool**| excludes tags generated by the system, e.g. job, upload or figma tags | [optional] **branch** | **string**| specify the branch to use | [optional] ### Return type diff --git a/lib/Api/TagsApi.php b/lib/Api/TagsApi.php index 3df3a0c..e72c450 100644 --- a/lib/Api/TagsApi.php +++ b/lib/Api/TagsApi.php @@ -1031,15 +1031,16 @@ protected function tagShowRequest($project_id, $name, $x_phrase_app_otp = null, * @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional) * @param int $page Page number (optional) * @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional) + * @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional) * @param string $branch specify the branch to use (optional) * * @throws \Phrase\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Phrase\Model\Tag[] */ - public function tagsList($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null) + public function tagsList($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null) { - list($response) = $this->tagsListWithHttpInfo($project_id, $x_phrase_app_otp, $page, $per_page, $branch); + list($response) = $this->tagsListWithHttpInfo($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch); return $response; } @@ -1052,15 +1053,16 @@ public function tagsList($project_id, $x_phrase_app_otp = null, $page = null, $p * @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional) * @param int $page Page number (optional) * @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional) + * @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional) * @param string $branch specify the branch to use (optional) * * @throws \Phrase\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Phrase\Model\Tag[], HTTP status code, HTTP response headers (array of strings) */ - public function tagsListWithHttpInfo($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null) + public function tagsListWithHttpInfo($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null) { - $request = $this->tagsListRequest($project_id, $x_phrase_app_otp, $page, $per_page, $branch); + $request = $this->tagsListRequest($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch); try { $options = $this->createHttpClientOption(); @@ -1144,14 +1146,15 @@ public function tagsListWithHttpInfo($project_id, $x_phrase_app_otp = null, $pag * @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional) * @param int $page Page number (optional) * @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional) + * @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional) * @param string $branch specify the branch to use (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function tagsListAsync($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null) + public function tagsListAsync($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null) { - return $this->tagsListAsyncWithHttpInfo($project_id, $x_phrase_app_otp, $page, $per_page, $branch) + return $this->tagsListAsyncWithHttpInfo($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch) ->then( function ($response) { return $response[0]; @@ -1168,15 +1171,16 @@ function ($response) { * @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional) * @param int $page Page number (optional) * @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional) + * @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional) * @param string $branch specify the branch to use (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function tagsListAsyncWithHttpInfo($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null) + public function tagsListAsyncWithHttpInfo($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null) { $returnType = '\Phrase\Model\Tag[]'; - $request = $this->tagsListRequest($project_id, $x_phrase_app_otp, $page, $per_page, $branch); + $request = $this->tagsListRequest($project_id, $x_phrase_app_otp, $page, $per_page, $exclude_system_tags, $branch); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1219,12 +1223,13 @@ function ($exception) { * @param string $x_phrase_app_otp Two-Factor-Authentication token (optional) (optional) * @param int $page Page number (optional) * @param int $per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default (optional) + * @param bool $exclude_system_tags excludes tags generated by the system, e.g. job, upload or figma tags (optional) * @param string $branch specify the branch to use (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function tagsListRequest($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $branch = null) + protected function tagsListRequest($project_id, $x_phrase_app_otp = null, $page = null, $per_page = null, $exclude_system_tags = null, $branch = null) { // verify the required parameter 'project_id' is set if ($project_id === null || (is_array($project_id) && count($project_id) === 0)) { @@ -1263,6 +1268,17 @@ protected function tagsListRequest($project_id, $x_phrase_app_otp = null, $page } } // query params + if ($exclude_system_tags !== null) { + if('form' === 'form' && is_array($exclude_system_tags)) { + foreach($exclude_system_tags as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['exclude_system_tags'] = $exclude_system_tags; + } + } + // query params if ($branch !== null) { if('form' === 'form' && is_array($branch)) { foreach($branch as $key => $value) {