Skip to content

Commit 06b6d24

Browse files
feat(api): manual updates (#18)
1 parent daa1308 commit 06b6d24

16 files changed

+110
-15
lines changed

Diff for: .stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 106
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-da4c36c6b1d973f481abb8eefdeb085d88eaf37eeaba30d276cb3daa405b6f0c.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml

Diff for: src/gitpod/resources/environments/environments.py

-8
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ def list(
248248
token: str | NotGiven = NOT_GIVEN,
249249
page_size: int | NotGiven = NOT_GIVEN,
250250
filter: environment_list_params.Filter | NotGiven = NOT_GIVEN,
251-
organization_id: str | NotGiven = NOT_GIVEN,
252251
pagination: environment_list_params.Pagination | NotGiven = NOT_GIVEN,
253252
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
254253
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -261,8 +260,6 @@ def list(
261260
ListEnvironments returns a list of environments that match the query.
262261
263262
Args:
264-
organization_id: organization_id is the ID of the organization that contains the environments
265-
266263
pagination: pagination contains the pagination options for listing environments
267264
268265
extra_headers: Send extra headers
@@ -279,7 +276,6 @@ def list(
279276
body=maybe_transform(
280277
{
281278
"filter": filter,
282-
"organization_id": organization_id,
283279
"pagination": pagination,
284280
},
285281
environment_list_params.EnvironmentListParams,
@@ -739,7 +735,6 @@ def list(
739735
token: str | NotGiven = NOT_GIVEN,
740736
page_size: int | NotGiven = NOT_GIVEN,
741737
filter: environment_list_params.Filter | NotGiven = NOT_GIVEN,
742-
organization_id: str | NotGiven = NOT_GIVEN,
743738
pagination: environment_list_params.Pagination | NotGiven = NOT_GIVEN,
744739
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
745740
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -752,8 +747,6 @@ def list(
752747
ListEnvironments returns a list of environments that match the query.
753748
754749
Args:
755-
organization_id: organization_id is the ID of the organization that contains the environments
756-
757750
pagination: pagination contains the pagination options for listing environments
758751
759752
extra_headers: Send extra headers
@@ -770,7 +763,6 @@ def list(
770763
body=maybe_transform(
771764
{
772765
"filter": filter,
773-
"organization_id": organization_id,
774766
"pagination": pagination,
775767
},
776768
environment_list_params.EnvironmentListParams,

Diff for: src/gitpod/resources/secrets.py

+18
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def with_streaming_response(self) -> SecretsResourceWithStreamingResponse:
5656
def create(
5757
self,
5858
*,
59+
container_registry_basic_auth_host: str | NotGiven = NOT_GIVEN,
5960
environment_variable: bool | NotGiven = NOT_GIVEN,
6061
file_path: str | NotGiven = NOT_GIVEN,
6162
name: str | NotGiven = NOT_GIVEN,
@@ -72,6 +73,13 @@ def create(
7273
CreateSecret creates a new secret.
7374
7475
Args:
76+
container_registry_basic_auth_host: secret will be mounted as a docker config in the environment VM, mount will have
77+
the docker host value must be a valid registry hostname with optional port:
78+
79+
```
80+
this.matches("^[a-zA-Z0-9][a-zA-Z0-9.-]*[a-zA-Z0-9](:[0-9]+)?$")
81+
```
82+
7583
environment_variable: secret will be created as an Environment Variable with the same name as the
7684
secret
7785
@@ -98,6 +106,7 @@ def create(
98106
"/gitpod.v1.SecretService/CreateSecret",
99107
body=maybe_transform(
100108
{
109+
"container_registry_basic_auth_host": container_registry_basic_auth_host,
101110
"environment_variable": environment_variable,
102111
"file_path": file_path,
103112
"name": name,
@@ -297,6 +306,7 @@ def with_streaming_response(self) -> AsyncSecretsResourceWithStreamingResponse:
297306
async def create(
298307
self,
299308
*,
309+
container_registry_basic_auth_host: str | NotGiven = NOT_GIVEN,
300310
environment_variable: bool | NotGiven = NOT_GIVEN,
301311
file_path: str | NotGiven = NOT_GIVEN,
302312
name: str | NotGiven = NOT_GIVEN,
@@ -313,6 +323,13 @@ async def create(
313323
CreateSecret creates a new secret.
314324
315325
Args:
326+
container_registry_basic_auth_host: secret will be mounted as a docker config in the environment VM, mount will have
327+
the docker host value must be a valid registry hostname with optional port:
328+
329+
```
330+
this.matches("^[a-zA-Z0-9][a-zA-Z0-9.-]*[a-zA-Z0-9](:[0-9]+)?$")
331+
```
332+
316333
environment_variable: secret will be created as an Environment Variable with the same name as the
317334
secret
318335
@@ -339,6 +356,7 @@ async def create(
339356
"/gitpod.v1.SecretService/CreateSecret",
340357
body=await async_maybe_transform(
341358
{
359+
"container_registry_basic_auth_host": container_registry_basic_auth_host,
342360
"environment_variable": environment_variable,
343361
"file_path": file_path,
344362
"name": name,

Diff for: src/gitpod/types/environment_list_params.py

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ class EnvironmentListParams(TypedDict, total=False):
1919

2020
filter: Filter
2121

22-
organization_id: Annotated[str, PropertyInfo(alias="organizationId")]
23-
"""organization_id is the ID of the organization that contains the environments"""
24-
2522
pagination: Pagination
2623
"""pagination contains the pagination options for listing environments"""
2724

Diff for: src/gitpod/types/environment_spec.py

+6
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ class Port(BaseModel):
8383

8484

8585
class Secret(BaseModel):
86+
container_registry_basic_auth_host: Optional[str] = FieldInfo(alias="containerRegistryBasicAuthHost", default=None)
87+
"""
88+
container_registry_basic_auth_host is the hostname of the container registry
89+
that supports basic auth
90+
"""
91+
8692
environment_variable: Optional[str] = FieldInfo(alias="environmentVariable", default=None)
8793

8894
file_path: Optional[str] = FieldInfo(alias="filePath", default=None)

Diff for: src/gitpod/types/environment_spec_param.py

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ class Port(TypedDict, total=False):
9090

9191

9292
class Secret(TypedDict, total=False):
93+
container_registry_basic_auth_host: Annotated[str, PropertyInfo(alias="containerRegistryBasicAuthHost")]
94+
"""
95+
container_registry_basic_auth_host is the hostname of the container registry
96+
that supports basic auth
97+
"""
98+
9399
environment_variable: Annotated[str, PropertyInfo(alias="environmentVariable")]
94100

95101
file_path: Annotated[str, PropertyInfo(alias="filePath")]

Diff for: src/gitpod/types/environments/class_list_params.py

+22
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from typing_extensions import Annotated, TypedDict
77

88
from ..._utils import PropertyInfo
9+
from ..runner_kind import RunnerKind
10+
from ..runner_provider import RunnerProvider
911

1012
__all__ = ["ClassListParams", "Filter", "Pagination"]
1113

@@ -22,6 +24,14 @@ class ClassListParams(TypedDict, total=False):
2224

2325

2426
class Filter(TypedDict, total=False):
27+
can_create_environments: Annotated[Optional[bool], PropertyInfo(alias="canCreateEnvironments")]
28+
"""
29+
can_create_environments filters the response to only environment classes that
30+
can be used to create new environments by the caller. Unlike enabled, which
31+
indicates general availability, this ensures the caller only sees environment
32+
classes they are allowed to use.
33+
"""
34+
2535
enabled: Optional[bool]
2636
"""
2737
enabled filters the response to only enabled or disabled environment classes. If
@@ -31,6 +41,18 @@ class Filter(TypedDict, total=False):
3141
runner_ids: Annotated[List[str], PropertyInfo(alias="runnerIds")]
3242
"""runner_ids filters the response to only EnvironmentClasses of these Runner IDs"""
3343

44+
runner_kinds: Annotated[List[RunnerKind], PropertyInfo(alias="runnerKinds")]
45+
"""
46+
runner_kind filters the response to only environment classes from runners of
47+
these kinds.
48+
"""
49+
50+
runner_providers: Annotated[List[RunnerProvider], PropertyInfo(alias="runnerProviders")]
51+
"""
52+
runner_providers filters the response to only environment classes from runners
53+
of these providers.
54+
"""
55+
3456

3557
class Pagination(TypedDict, total=False):
3658
token: str

Diff for: src/gitpod/types/projects/project_role.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
__all__ = ["ProjectRole"]
66

7-
ProjectRole: TypeAlias = Literal["PROJECT_ROLE_UNSPECIFIED", "PROJECT_ROLE_ADMIN", "PROJECT_ROLE_USER"]
7+
ProjectRole: TypeAlias = Literal[
8+
"PROJECT_ROLE_UNSPECIFIED", "PROJECT_ROLE_ADMIN", "PROJECT_ROLE_USER", "PROJECT_ROLE_EDITOR"
9+
]

Diff for: src/gitpod/types/resource_type.py

+1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@
2323
"RESOURCE_TYPE_SERVICE_ACCOUNT",
2424
"RESOURCE_TYPE_SECRET",
2525
"RESOURCE_TYPE_SSO_CONFIG",
26+
"RESOURCE_TYPE_DOMAIN_VERIFICATION",
2627
]

Diff for: src/gitpod/types/runners/configurations/environment_class_list_params.py

+22
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from typing_extensions import Annotated, TypedDict
77

88
from ...._utils import PropertyInfo
9+
from ...runner_kind import RunnerKind
10+
from ...runner_provider import RunnerProvider
911

1012
__all__ = ["EnvironmentClassListParams", "Filter", "Pagination"]
1113

@@ -22,6 +24,14 @@ class EnvironmentClassListParams(TypedDict, total=False):
2224

2325

2426
class Filter(TypedDict, total=False):
27+
can_create_environments: Annotated[Optional[bool], PropertyInfo(alias="canCreateEnvironments")]
28+
"""
29+
can_create_environments filters the response to only environment classes that
30+
can be used to create new environments by the caller. Unlike enabled, which
31+
indicates general availability, this ensures the caller only sees environment
32+
classes they are allowed to use.
33+
"""
34+
2535
enabled: Optional[bool]
2636
"""
2737
enabled filters the response to only enabled or disabled environment classes. If
@@ -31,6 +41,18 @@ class Filter(TypedDict, total=False):
3141
runner_ids: Annotated[List[str], PropertyInfo(alias="runnerIds")]
3242
"""runner_ids filters the response to only EnvironmentClasses of these Runner IDs"""
3343

44+
runner_kinds: Annotated[List[RunnerKind], PropertyInfo(alias="runnerKinds")]
45+
"""
46+
runner_kind filters the response to only environment classes from runners of
47+
these kinds.
48+
"""
49+
50+
runner_providers: Annotated[List[RunnerProvider], PropertyInfo(alias="runnerProviders")]
51+
"""
52+
runner_providers filters the response to only environment classes from runners
53+
of these providers.
54+
"""
55+
3456

3557
class Pagination(TypedDict, total=False):
3658
token: str

Diff for: src/gitpod/types/secret.py

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
class Secret(BaseModel):
1515
id: Optional[str] = None
1616

17+
container_registry_basic_auth_host: Optional[str] = FieldInfo(alias="containerRegistryBasicAuthHost", default=None)
18+
"""secret will be mounted as a registry secret"""
19+
1720
created_at: Optional[datetime] = FieldInfo(alias="createdAt", default=None)
1821
"""
1922
A Timestamp represents a point in time independent of any time zone or local

Diff for: src/gitpod/types/secret_create_params.py

+10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010

1111

1212
class SecretCreateParams(TypedDict, total=False):
13+
container_registry_basic_auth_host: Annotated[str, PropertyInfo(alias="containerRegistryBasicAuthHost")]
14+
"""
15+
secret will be mounted as a docker config in the environment VM, mount will have
16+
the docker host value must be a valid registry hostname with optional port:
17+
18+
```
19+
this.matches('^[a-zA-Z0-9][a-zA-Z0-9.-]*[a-zA-Z0-9](:[0-9]+)?$')
20+
```
21+
"""
22+
1323
environment_variable: Annotated[bool, PropertyInfo(alias="environmentVariable")]
1424
"""
1525
secret will be created as an Environment Variable with the same name as the

Diff for: tests/api_resources/environments/test_classes.py

+6
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None:
3131
token="token",
3232
page_size=0,
3333
filter={
34+
"can_create_environments": True,
3435
"enabled": True,
3536
"runner_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
37+
"runner_kinds": ["RUNNER_KIND_UNSPECIFIED"],
38+
"runner_providers": ["RUNNER_PROVIDER_UNSPECIFIED"],
3639
},
3740
pagination={
3841
"token": "token",
@@ -80,8 +83,11 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N
8083
token="token",
8184
page_size=0,
8285
filter={
86+
"can_create_environments": True,
8387
"enabled": True,
8488
"runner_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
89+
"runner_kinds": ["RUNNER_KIND_UNSPECIFIED"],
90+
"runner_providers": ["RUNNER_PROVIDER_UNSPECIFIED"],
8591
},
8692
pagination={
8793
"token": "token",

Diff for: tests/api_resources/runners/configurations/test_environment_classes.py

+6
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None:
154154
token="token",
155155
page_size=0,
156156
filter={
157+
"can_create_environments": True,
157158
"enabled": True,
158159
"runner_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
160+
"runner_kinds": ["RUNNER_KIND_UNSPECIFIED"],
161+
"runner_providers": ["RUNNER_PROVIDER_UNSPECIFIED"],
159162
},
160163
pagination={
161164
"token": "token",
@@ -324,8 +327,11 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N
324327
token="token",
325328
page_size=0,
326329
filter={
330+
"can_create_environments": True,
327331
"enabled": True,
328332
"runner_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
333+
"runner_kinds": ["RUNNER_KIND_UNSPECIFIED"],
334+
"runner_providers": ["RUNNER_PROVIDER_UNSPECIFIED"],
329335
},
330336
pagination={
331337
"token": "token",

Diff for: tests/api_resources/test_environments.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None:
7878
],
7979
"secrets": [
8080
{
81+
"container_registry_basic_auth_host": "containerRegistryBasicAuthHost",
8182
"environment_variable": "environmentVariable",
8283
"file_path": "filePath",
8384
"git_credential_host": "gitCredentialHost",
@@ -256,7 +257,6 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None:
256257
"runner_kinds": ["RUNNER_KIND_UNSPECIFIED"],
257258
"status_phases": ["ENVIRONMENT_PHASE_UNSPECIFIED"],
258259
},
259-
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
260260
pagination={
261261
"token": "token",
262262
"page_size": 100,
@@ -377,6 +377,7 @@ def test_method_create_from_project_with_all_params(self, client: Gitpod) -> Non
377377
],
378378
"secrets": [
379379
{
380+
"container_registry_basic_auth_host": "containerRegistryBasicAuthHost",
380381
"environment_variable": "environmentVariable",
381382
"file_path": "filePath",
382383
"git_credential_host": "gitCredentialHost",
@@ -625,6 +626,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) ->
625626
],
626627
"secrets": [
627628
{
629+
"container_registry_basic_auth_host": "containerRegistryBasicAuthHost",
628630
"environment_variable": "environmentVariable",
629631
"file_path": "filePath",
630632
"git_credential_host": "gitCredentialHost",
@@ -803,7 +805,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N
803805
"runner_kinds": ["RUNNER_KIND_UNSPECIFIED"],
804806
"status_phases": ["ENVIRONMENT_PHASE_UNSPECIFIED"],
805807
},
806-
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
807808
pagination={
808809
"token": "token",
809810
"page_size": 100,
@@ -924,6 +925,7 @@ async def test_method_create_from_project_with_all_params(self, async_client: As
924925
],
925926
"secrets": [
926927
{
928+
"container_registry_basic_auth_host": "containerRegistryBasicAuthHost",
927929
"environment_variable": "environmentVariable",
928930
"file_path": "filePath",
929931
"git_credential_host": "gitCredentialHost",

Diff for: tests/api_resources/test_secrets.py

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def test_method_create(self, client: Gitpod) -> None:
3232
@parametrize
3333
def test_method_create_with_all_params(self, client: Gitpod) -> None:
3434
secret = client.secrets.create(
35+
container_registry_basic_auth_host="containerRegistryBasicAuthHost",
3536
environment_variable=True,
3637
file_path="filePath",
3738
name="name",
@@ -227,6 +228,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None:
227228
@parametrize
228229
async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None:
229230
secret = await async_client.secrets.create(
231+
container_registry_basic_auth_host="containerRegistryBasicAuthHost",
230232
environment_variable=True,
231233
file_path="filePath",
232234
name="name",

0 commit comments

Comments
 (0)