diff --git a/.stats.yml b/.stats.yml index 8371fbe..21d6a3d 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-410f762771ac58738f3d165b19c5e2e9377ebbfa3f090f041e269142cfa2e7f4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-bef0e79f204c51c91f5dca61e621e5e31c7494dccccb200e51da0c7654340816.yml diff --git a/src/gitpod/types/environment_spec.py b/src/gitpod/types/environment_spec.py index d65c166..b001bdc 100644 --- a/src/gitpod/types/environment_spec.py +++ b/src/gitpod/types/environment_spec.py @@ -14,6 +14,7 @@ "AutomationsFile", "Content", "Devcontainer", + "DevcontainerDotfiles", "Machine", "Port", "Secret", @@ -50,6 +51,25 @@ class Content(BaseModel): session: Optional[str] = None +class DevcontainerDotfiles(BaseModel): + repository: str + """URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)""" + + install_command: Optional[str] = FieldInfo(alias="installCommand", default=None) + """install_command is the command to run after cloning the dotfiles repository. + + Defaults to run the first file of `install.sh`, `install`, `bootstrap.sh`, + `bootstrap`, `setup.sh` and `setup` found in the dotfiles repository's root + folder. + """ + + target_path: Optional[str] = FieldInfo(alias="targetPath", default=None) + """target_path is the path to clone the dotfiles repository to. + + Defaults to `~/dotfiles`. + """ + + class Devcontainer(BaseModel): devcontainer_file_path: Optional[str] = FieldInfo(alias="devcontainerFilePath", default=None) """ @@ -61,6 +81,9 @@ class Devcontainer(BaseModel): ``` """ + dotfiles: Optional[DevcontainerDotfiles] = None + """Experimental: dotfiles is the dotfiles configuration of the devcontainer""" + session: Optional[str] = None diff --git a/src/gitpod/types/environment_spec_param.py b/src/gitpod/types/environment_spec_param.py index cad8f65..4853ee8 100644 --- a/src/gitpod/types/environment_spec_param.py +++ b/src/gitpod/types/environment_spec_param.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Iterable -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo from .admission_level import AdmissionLevel @@ -15,6 +15,7 @@ "AutomationsFile", "Content", "Devcontainer", + "DevcontainerDotfiles", "Machine", "Port", "Secret", @@ -51,6 +52,25 @@ class Content(TypedDict, total=False): session: str +class DevcontainerDotfiles(TypedDict, total=False): + repository: Required[str] + """URL of a dotfiles Git repository (e.g. https://github.com/owner/repository)""" + + install_command: Annotated[str, PropertyInfo(alias="installCommand")] + """install_command is the command to run after cloning the dotfiles repository. + + Defaults to run the first file of `install.sh`, `install`, `bootstrap.sh`, + `bootstrap`, `setup.sh` and `setup` found in the dotfiles repository's root + folder. + """ + + target_path: Annotated[str, PropertyInfo(alias="targetPath")] + """target_path is the path to clone the dotfiles repository to. + + Defaults to `~/dotfiles`. + """ + + class Devcontainer(TypedDict, total=False): devcontainer_file_path: Annotated[str, PropertyInfo(alias="devcontainerFilePath")] """ @@ -62,6 +82,9 @@ class Devcontainer(TypedDict, total=False): ``` """ + dotfiles: DevcontainerDotfiles + """Experimental: dotfiles is the dotfiles configuration of the devcontainer""" + session: str diff --git a/src/gitpod/types/user.py b/src/gitpod/types/user.py index 47c3be9..f6c16cb 100644 --- a/src/gitpod/types/user.py +++ b/src/gitpod/types/user.py @@ -12,7 +12,7 @@ class User(BaseModel): - id: Optional[str] = None + id: str """id is a UUID of the user""" avatar_url: Optional[str] = FieldInfo(alias="avatarUrl", default=None) diff --git a/tests/api_resources/test_environments.py b/tests/api_resources/test_environments.py index 3441d9f..9733680 100644 --- a/tests/api_resources/test_environments.py +++ b/tests/api_resources/test_environments.py @@ -63,6 +63,11 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "desired_phase": "ENVIRONMENT_PHASE_UNSPECIFIED", "devcontainer": { "devcontainer_file_path": "devcontainerFilePath", + "dotfiles": { + "repository": "https://example.com", + "install_command": "installCommand", + "target_path": "targetPath", + }, "session": "session", }, "machine": { @@ -360,6 +365,11 @@ def test_method_create_from_project_with_all_params(self, client: Gitpod) -> Non "desired_phase": "ENVIRONMENT_PHASE_UNSPECIFIED", "devcontainer": { "devcontainer_file_path": "devcontainerFilePath", + "dotfiles": { + "repository": "https://example.com", + "install_command": "installCommand", + "target_path": "targetPath", + }, "session": "session", }, "machine": { @@ -609,6 +619,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "desired_phase": "ENVIRONMENT_PHASE_UNSPECIFIED", "devcontainer": { "devcontainer_file_path": "devcontainerFilePath", + "dotfiles": { + "repository": "https://example.com", + "install_command": "installCommand", + "target_path": "targetPath", + }, "session": "session", }, "machine": { @@ -906,6 +921,11 @@ async def test_method_create_from_project_with_all_params(self, async_client: As "desired_phase": "ENVIRONMENT_PHASE_UNSPECIFIED", "devcontainer": { "devcontainer_file_path": "devcontainerFilePath", + "dotfiles": { + "repository": "https://example.com", + "install_command": "installCommand", + "target_path": "targetPath", + }, "session": "session", }, "machine": {