Skip to content

feat(api): manual updates #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions src/gitpod/types/environment_create_from_project_response.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,5 +8,5 @@


class EnvironmentCreateFromProjectResponse(BaseModel):
environment: Optional[Environment] = None
environment: Environment
"""+resource get environment"""
3 changes: 1 addition & 2 deletions src/gitpod/types/environment_create_logs_token_response.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
"""
3 changes: 1 addition & 2 deletions src/gitpod/types/environment_create_response.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,5 +8,5 @@


class EnvironmentCreateResponse(BaseModel):
environment: Optional[Environment] = None
environment: Environment
"""+resource get environment"""
3 changes: 1 addition & 2 deletions src/gitpod/types/environment_retrieve_response.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,5 +8,5 @@


class EnvironmentRetrieveResponse(BaseModel):
environment: Optional[Environment] = None
environment: Environment
"""+resource get environment"""
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class ServiceCreateResponse(BaseModel):
service: Optional[Service] = None
service: Service
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class ServiceRetrieveResponse(BaseModel):
service: Optional[Service] = None
service: Service
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class TaskCreateResponse(BaseModel):
task: Optional[Task] = None
task: Task
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class TaskRetrieveResponse(BaseModel):
task: Optional[Task] = None
task: Task
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -11,4 +10,4 @@


class TaskStartResponse(BaseModel):
task_execution: Optional[TaskExecution] = FieldInfo(alias="taskExecution", default=None)
task_execution: TaskExecution = FieldInfo(alias="taskExecution")
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -11,4 +10,4 @@


class ExecutionRetrieveResponse(BaseModel):
task_execution: Optional[TaskExecution] = FieldInfo(alias="taskExecution", default=None)
task_execution: TaskExecution = FieldInfo(alias="taskExecution")
4 changes: 2 additions & 2 deletions src/gitpod/types/runner_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand All @@ -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
3 changes: 1 addition & 2 deletions src/gitpod/types/runner_retrieve_response.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class RunnerRetrieveResponse(BaseModel):
runner: Optional[Runner] = None
runner: Runner
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


class HostAuthenticationToken(BaseModel):
id: Optional[str] = None
id: str

expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None)
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class HostAuthenticationTokenCreateResponse(BaseModel):
token: Optional[HostAuthenticationToken] = None
token: HostAuthenticationToken
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class HostAuthenticationTokenRetrieveResponse(BaseModel):
token: Optional[HostAuthenticationToken] = None
token: HostAuthenticationToken
3 changes: 1 addition & 2 deletions src/gitpod/types/runners/policy_create_response.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class PolicyCreateResponse(BaseModel):
policy: Optional[RunnerPolicy] = None
policy: RunnerPolicy
3 changes: 1 addition & 2 deletions src/gitpod/types/runners/policy_update_response.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class PolicyUpdateResponse(BaseModel):
policy: Optional[RunnerPolicy] = None
policy: RunnerPolicy
12 changes: 6 additions & 6 deletions src/gitpod/types/shared/environment_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""

Expand All @@ -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
"""
2 changes: 1 addition & 1 deletion src/gitpod/types/shared/task_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class TaskExecution(BaseModel):
id: Optional[str] = None
id: str

metadata: Optional[TaskExecutionMetadata] = None

Expand Down
12 changes: 6 additions & 6 deletions src/gitpod/types/shared_params/environment_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""

Expand All @@ -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
"""
3 changes: 1 addition & 2 deletions src/gitpod/types/user_get_authenticated_user_response.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class UserGetAuthenticatedUserResponse(BaseModel):
user: Optional[User] = None
user: User
3 changes: 1 addition & 2 deletions src/gitpod/types/users/pat_get_response.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -9,4 +8,4 @@


class PatGetResponse(BaseModel):
pat: Optional[PersonalAccessToken] = None
pat: PersonalAccessToken
4 changes: 2 additions & 2 deletions tests/api_resources/runners/test_configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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={
Expand Down Expand Up @@ -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",
Expand All @@ -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={
Expand Down