From 3e29d910f0c75eacbe0693cc82c68063f2782fc2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 10:43:44 +0000 Subject: [PATCH 1/2] feat(api): manual updates (#49) --- .stats.yml | 2 +- .../environment_create_from_project_response.py | 3 +-- .../types/environment_create_logs_token_response.py | 3 +-- src/gitpod/types/environment_create_response.py | 3 +-- src/gitpod/types/environment_retrieve_response.py | 3 +-- .../automations/service_create_response.py | 3 +-- .../automations/service_retrieve_response.py | 3 +-- .../environments/automations/task_create_response.py | 3 +-- .../automations/task_retrieve_response.py | 3 +-- .../environments/automations/task_start_response.py | 3 +-- .../automations/tasks/execution_retrieve_response.py | 3 +-- src/gitpod/types/runner_create_response.py | 4 ++-- src/gitpod/types/runner_retrieve_response.py | 3 +-- .../configurations/host_authentication_token.py | 2 +- .../host_authentication_token_create_response.py | 3 +-- .../host_authentication_token_retrieve_response.py | 3 +-- src/gitpod/types/runners/policy_create_response.py | 3 +-- src/gitpod/types/runners/policy_update_response.py | 3 +-- src/gitpod/types/shared/environment_class.py | 12 ++++++------ src/gitpod/types/shared/task_execution.py | 2 +- src/gitpod/types/shared_params/environment_class.py | 12 ++++++------ .../types/user_get_authenticated_user_response.py | 3 +-- src/gitpod/types/users/pat_get_response.py | 3 +-- tests/api_resources/runners/test_configurations.py | 4 ++-- 24 files changed, 36 insertions(+), 53 deletions(-) diff --git a/.stats.yml b/.stats.yml index 296014e..8371fbe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 111 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f6598ab5d6827f66b642201769e92590ea32af84ebbf24b18cc32b33dee5107e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-410f762771ac58738f3d165b19c5e2e9377ebbfa3f090f041e269142cfa2e7f4.yml diff --git a/src/gitpod/types/environment_create_from_project_response.py b/src/gitpod/types/environment_create_from_project_response.py index 55275c1..7c66870 100644 --- a/src/gitpod/types/environment_create_from_project_response.py +++ b/src/gitpod/types/environment_create_from_project_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from .._models import BaseModel from .environment import Environment @@ -9,5 +8,5 @@ class EnvironmentCreateFromProjectResponse(BaseModel): - environment: Optional[Environment] = None + environment: Environment """+resource get environment""" diff --git a/src/gitpod/types/environment_create_logs_token_response.py b/src/gitpod/types/environment_create_logs_token_response.py index fb1aca3..70f9c6a 100644 --- a/src/gitpod/types/environment_create_logs_token_response.py +++ b/src/gitpod/types/environment_create_logs_token_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from pydantic import Field as FieldInfo @@ -10,7 +9,7 @@ class EnvironmentCreateLogsTokenResponse(BaseModel): - access_token: Optional[str] = FieldInfo(alias="accessToken", default=None) + access_token: str = FieldInfo(alias="accessToken") """ access_token is the token that can be used to access the logs of the environment """ diff --git a/src/gitpod/types/environment_create_response.py b/src/gitpod/types/environment_create_response.py index 3fb02bb..ac25a62 100644 --- a/src/gitpod/types/environment_create_response.py +++ b/src/gitpod/types/environment_create_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from .._models import BaseModel from .environment import Environment @@ -9,5 +8,5 @@ class EnvironmentCreateResponse(BaseModel): - environment: Optional[Environment] = None + environment: Environment """+resource get environment""" diff --git a/src/gitpod/types/environment_retrieve_response.py b/src/gitpod/types/environment_retrieve_response.py index 1c55b33..0a3963b 100644 --- a/src/gitpod/types/environment_retrieve_response.py +++ b/src/gitpod/types/environment_retrieve_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from .._models import BaseModel from .environment import Environment @@ -9,5 +8,5 @@ class EnvironmentRetrieveResponse(BaseModel): - environment: Optional[Environment] = None + environment: Environment """+resource get environment""" diff --git a/src/gitpod/types/environments/automations/service_create_response.py b/src/gitpod/types/environments/automations/service_create_response.py index 1242a11..79ceb84 100644 --- a/src/gitpod/types/environments/automations/service_create_response.py +++ b/src/gitpod/types/environments/automations/service_create_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from .service import Service from ...._models import BaseModel @@ -9,4 +8,4 @@ class ServiceCreateResponse(BaseModel): - service: Optional[Service] = None + service: Service diff --git a/src/gitpod/types/environments/automations/service_retrieve_response.py b/src/gitpod/types/environments/automations/service_retrieve_response.py index e916c00..ecf9035 100644 --- a/src/gitpod/types/environments/automations/service_retrieve_response.py +++ b/src/gitpod/types/environments/automations/service_retrieve_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from .service import Service from ...._models import BaseModel @@ -9,4 +8,4 @@ class ServiceRetrieveResponse(BaseModel): - service: Optional[Service] = None + service: Service diff --git a/src/gitpod/types/environments/automations/task_create_response.py b/src/gitpod/types/environments/automations/task_create_response.py index 4845e6b..5fbdae6 100644 --- a/src/gitpod/types/environments/automations/task_create_response.py +++ b/src/gitpod/types/environments/automations/task_create_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from ...._models import BaseModel from ...shared.task import Task @@ -9,4 +8,4 @@ class TaskCreateResponse(BaseModel): - task: Optional[Task] = None + task: Task diff --git a/src/gitpod/types/environments/automations/task_retrieve_response.py b/src/gitpod/types/environments/automations/task_retrieve_response.py index 0f01e7b..e65439b 100644 --- a/src/gitpod/types/environments/automations/task_retrieve_response.py +++ b/src/gitpod/types/environments/automations/task_retrieve_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from ...._models import BaseModel from ...shared.task import Task @@ -9,4 +8,4 @@ class TaskRetrieveResponse(BaseModel): - task: Optional[Task] = None + task: Task diff --git a/src/gitpod/types/environments/automations/task_start_response.py b/src/gitpod/types/environments/automations/task_start_response.py index 3b7caf2..93ee370 100644 --- a/src/gitpod/types/environments/automations/task_start_response.py +++ b/src/gitpod/types/environments/automations/task_start_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from pydantic import Field as FieldInfo @@ -11,4 +10,4 @@ class TaskStartResponse(BaseModel): - task_execution: Optional[TaskExecution] = FieldInfo(alias="taskExecution", default=None) + task_execution: TaskExecution = FieldInfo(alias="taskExecution") diff --git a/src/gitpod/types/environments/automations/tasks/execution_retrieve_response.py b/src/gitpod/types/environments/automations/tasks/execution_retrieve_response.py index 40f3dc4..58c5baa 100644 --- a/src/gitpod/types/environments/automations/tasks/execution_retrieve_response.py +++ b/src/gitpod/types/environments/automations/tasks/execution_retrieve_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from pydantic import Field as FieldInfo @@ -11,4 +10,4 @@ class ExecutionRetrieveResponse(BaseModel): - task_execution: Optional[TaskExecution] = FieldInfo(alias="taskExecution", default=None) + task_execution: TaskExecution = FieldInfo(alias="taskExecution") diff --git a/src/gitpod/types/runner_create_response.py b/src/gitpod/types/runner_create_response.py index 7a2bbd4..2f6821f 100644 --- a/src/gitpod/types/runner_create_response.py +++ b/src/gitpod/types/runner_create_response.py @@ -11,6 +11,8 @@ class RunnerCreateResponse(BaseModel): + runner: Runner + access_token: Optional[str] = FieldInfo(alias="accessToken", default=None) """deprecated, will be removed. Use exchange_token instead.""" @@ -20,5 +22,3 @@ class RunnerCreateResponse(BaseModel): for an access token, using the IdentityService.ExchangeToken rpc. The token expires after 24 hours. """ - - runner: Optional[Runner] = None diff --git a/src/gitpod/types/runner_retrieve_response.py b/src/gitpod/types/runner_retrieve_response.py index 6877822..1bda9f3 100644 --- a/src/gitpod/types/runner_retrieve_response.py +++ b/src/gitpod/types/runner_retrieve_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from .runner import Runner from .._models import BaseModel @@ -9,4 +8,4 @@ class RunnerRetrieveResponse(BaseModel): - runner: Optional[Runner] = None + runner: Runner diff --git a/src/gitpod/types/runners/configurations/host_authentication_token.py b/src/gitpod/types/runners/configurations/host_authentication_token.py index 6ebf74a..22e5760 100644 --- a/src/gitpod/types/runners/configurations/host_authentication_token.py +++ b/src/gitpod/types/runners/configurations/host_authentication_token.py @@ -12,7 +12,7 @@ class HostAuthenticationToken(BaseModel): - id: Optional[str] = None + id: str expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None) """ diff --git a/src/gitpod/types/runners/configurations/host_authentication_token_create_response.py b/src/gitpod/types/runners/configurations/host_authentication_token_create_response.py index b351bfe..3d9900d 100644 --- a/src/gitpod/types/runners/configurations/host_authentication_token_create_response.py +++ b/src/gitpod/types/runners/configurations/host_authentication_token_create_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from ...._models import BaseModel from .host_authentication_token import HostAuthenticationToken @@ -9,4 +8,4 @@ class HostAuthenticationTokenCreateResponse(BaseModel): - token: Optional[HostAuthenticationToken] = None + token: HostAuthenticationToken diff --git a/src/gitpod/types/runners/configurations/host_authentication_token_retrieve_response.py b/src/gitpod/types/runners/configurations/host_authentication_token_retrieve_response.py index 50e478b..4f348a0 100644 --- a/src/gitpod/types/runners/configurations/host_authentication_token_retrieve_response.py +++ b/src/gitpod/types/runners/configurations/host_authentication_token_retrieve_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from ...._models import BaseModel from .host_authentication_token import HostAuthenticationToken @@ -9,4 +8,4 @@ class HostAuthenticationTokenRetrieveResponse(BaseModel): - token: Optional[HostAuthenticationToken] = None + token: HostAuthenticationToken diff --git a/src/gitpod/types/runners/policy_create_response.py b/src/gitpod/types/runners/policy_create_response.py index 0520b58..d97d8e1 100644 --- a/src/gitpod/types/runners/policy_create_response.py +++ b/src/gitpod/types/runners/policy_create_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from ..._models import BaseModel from .runner_policy import RunnerPolicy @@ -9,4 +8,4 @@ class PolicyCreateResponse(BaseModel): - policy: Optional[RunnerPolicy] = None + policy: RunnerPolicy diff --git a/src/gitpod/types/runners/policy_update_response.py b/src/gitpod/types/runners/policy_update_response.py index b5c96d6..5f441dc 100644 --- a/src/gitpod/types/runners/policy_update_response.py +++ b/src/gitpod/types/runners/policy_update_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from ..._models import BaseModel from .runner_policy import RunnerPolicy @@ -9,4 +8,4 @@ class PolicyUpdateResponse(BaseModel): - policy: Optional[RunnerPolicy] = None + policy: RunnerPolicy diff --git a/src/gitpod/types/shared/environment_class.py b/src/gitpod/types/shared/environment_class.py index 2bc2621..7539415 100644 --- a/src/gitpod/types/shared/environment_class.py +++ b/src/gitpod/types/shared/environment_class.py @@ -14,6 +14,12 @@ class EnvironmentClass(BaseModel): id: str """id is the unique identifier of the environment class""" + runner_id: str = FieldInfo(alias="runnerId") + """ + runner_id is the unique identifier of the runner the environment class belongs + to + """ + configuration: Optional[List[FieldValue]] = None """configuration describes the configuration of the environment class""" @@ -28,9 +34,3 @@ class EnvironmentClass(BaseModel): enabled indicates whether the environment class can be used to create new environments. """ - - runner_id: Optional[str] = FieldInfo(alias="runnerId", default=None) - """ - runner_id is the unique identifier of the runner the environment class belongs - to - """ diff --git a/src/gitpod/types/shared/task_execution.py b/src/gitpod/types/shared/task_execution.py index 072f66c..3274176 100644 --- a/src/gitpod/types/shared/task_execution.py +++ b/src/gitpod/types/shared/task_execution.py @@ -11,7 +11,7 @@ class TaskExecution(BaseModel): - id: Optional[str] = None + id: str metadata: Optional[TaskExecutionMetadata] = None diff --git a/src/gitpod/types/shared_params/environment_class.py b/src/gitpod/types/shared_params/environment_class.py index 7493d54..b310694 100644 --- a/src/gitpod/types/shared_params/environment_class.py +++ b/src/gitpod/types/shared_params/environment_class.py @@ -15,6 +15,12 @@ class EnvironmentClass(TypedDict, total=False): id: Required[str] """id is the unique identifier of the environment class""" + runner_id: Required[Annotated[str, PropertyInfo(alias="runnerId")]] + """ + runner_id is the unique identifier of the runner the environment class belongs + to + """ + configuration: Iterable[FieldValue] """configuration describes the configuration of the environment class""" @@ -29,9 +35,3 @@ class EnvironmentClass(TypedDict, total=False): enabled indicates whether the environment class can be used to create new environments. """ - - runner_id: Annotated[str, PropertyInfo(alias="runnerId")] - """ - runner_id is the unique identifier of the runner the environment class belongs - to - """ diff --git a/src/gitpod/types/user_get_authenticated_user_response.py b/src/gitpod/types/user_get_authenticated_user_response.py index 7760c4a..d4e06c6 100644 --- a/src/gitpod/types/user_get_authenticated_user_response.py +++ b/src/gitpod/types/user_get_authenticated_user_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from .user import User from .._models import BaseModel @@ -9,4 +8,4 @@ class UserGetAuthenticatedUserResponse(BaseModel): - user: Optional[User] = None + user: User diff --git a/src/gitpod/types/users/pat_get_response.py b/src/gitpod/types/users/pat_get_response.py index 6be85d5..54933a4 100644 --- a/src/gitpod/types/users/pat_get_response.py +++ b/src/gitpod/types/users/pat_get_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from ..._models import BaseModel from .personal_access_token import PersonalAccessToken @@ -9,4 +8,4 @@ class PatGetResponse(BaseModel): - pat: Optional[PersonalAccessToken] = None + pat: PersonalAccessToken diff --git a/tests/api_resources/runners/test_configurations.py b/tests/api_resources/runners/test_configurations.py index e917ea8..7184caf 100644 --- a/tests/api_resources/runners/test_configurations.py +++ b/tests/api_resources/runners/test_configurations.py @@ -29,6 +29,7 @@ def test_method_validate_with_all_params(self, client: Gitpod) -> None: configuration = client.runners.configurations.validate( environment_class={ "id": "id", + "runner_id": "runnerId", "configuration": [ { "key": "key", @@ -38,7 +39,6 @@ def test_method_validate_with_all_params(self, client: Gitpod) -> None: "description": "xxx", "display_name": "xxx", "enabled": True, - "runner_id": "runnerId", }, runner_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", scm_integration={ @@ -91,6 +91,7 @@ async def test_method_validate_with_all_params(self, async_client: AsyncGitpod) configuration = await async_client.runners.configurations.validate( environment_class={ "id": "id", + "runner_id": "runnerId", "configuration": [ { "key": "key", @@ -100,7 +101,6 @@ async def test_method_validate_with_all_params(self, async_client: AsyncGitpod) "description": "xxx", "display_name": "xxx", "enabled": True, - "runner_id": "runnerId", }, runner_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", scm_integration={ From 8dcf39382df42ecf62b5326c11ac751341ed50ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 10:46:50 +0000 Subject: [PATCH 2/2] release: 0.1.5 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/gitpod/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a43290c..ab67d0f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.4" + ".": "0.1.5" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c28ce87..49a47a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.5 (2025-02-18) + +Full Changelog: [v0.1.4...v0.1.5](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.4...v0.1.5) + +### Features + +* **api:** manual updates ([#49](https://github.com/gitpod-io/gitpod-sdk-python/issues/49)) ([3e29d91](https://github.com/gitpod-io/gitpod-sdk-python/commit/3e29d910f0c75eacbe0693cc82c68063f2782fc2)) + ## 0.1.4 (2025-02-18) Full Changelog: [v0.1.3...v0.1.4](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.3...v0.1.4) diff --git a/pyproject.toml b/pyproject.toml index a4130df..abfda7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gitpod-sdk" -version = "0.1.4" +version = "0.1.5" description = "The official Python library for the gitpod API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/gitpod/_version.py b/src/gitpod/_version.py index 1540254..057cab2 100644 --- a/src/gitpod/_version.py +++ b/src/gitpod/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "gitpod" -__version__ = "0.1.4" # x-release-please-version +__version__ = "0.1.5" # x-release-please-version