Skip to content

Commit cec21eb

Browse files
feat(api): update to latest changes (#10)
1 parent 83e7e59 commit cec21eb

File tree

234 files changed

+6242
-18790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+6242
-18790
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-2410f189970eeb715e79976f13eeca7259b602809e27a84820da8c794dcf00cb.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-da4c36c6b1d973f481abb8eefdeb085d88eaf37eeaba30d276cb3daa405b6f0c.yml

Diff for: api.md

+102-50
Large diffs are not rendered by default.

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

+17-15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
6+
57
import httpx
68

79
from ..types import (
@@ -25,9 +27,9 @@
2527
)
2628
from ..pagination import SyncLoginProvidersPage, AsyncLoginProvidersPage
2729
from .._base_client import AsyncPaginator, make_request_options
30+
from ..types.login_provider import LoginProvider
2831
from ..types.account_retrieve_response import AccountRetrieveResponse
2932
from ..types.account_get_sso_login_url_response import AccountGetSSOLoginURLResponse
30-
from ..types.account_list_login_providers_response import AccountListLoginProvidersResponse
3133

3234
__all__ = ["AccountsResource", "AsyncAccountsResource"]
3335

@@ -121,8 +123,8 @@ def delete(
121123
def get_sso_login_url(
122124
self,
123125
*,
124-
return_to: str,
125126
email: str | NotGiven = NOT_GIVEN,
127+
return_to: Optional[str] | NotGiven = NOT_GIVEN,
126128
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
127129
# The extra values given here take precedence over values defined on the client or passed to this method.
128130
extra_headers: Headers | None = None,
@@ -134,10 +136,10 @@ def get_sso_login_url(
134136
GetSSOLoginURL returns the URL to redirect the user to for SSO login.
135137
136138
Args:
137-
return_to: return_to is the URL the user will be redirected to after login
138-
139139
email: email is the email the user wants to login with
140140
141+
return_to: return_to is the URL the user will be redirected to after login
142+
141143
extra_headers: Send extra headers
142144
143145
extra_query: Add additional query parameters to the request
@@ -150,8 +152,8 @@ def get_sso_login_url(
150152
"/gitpod.v1.AccountService/GetSSOLoginURL",
151153
body=maybe_transform(
152154
{
153-
"return_to": return_to,
154155
"email": email,
156+
"return_to": return_to,
155157
},
156158
account_get_sso_login_url_params.AccountGetSSOLoginURLParams,
157159
),
@@ -174,7 +176,7 @@ def list_login_providers(
174176
extra_query: Query | None = None,
175177
extra_body: Body | None = None,
176178
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
177-
) -> SyncLoginProvidersPage[AccountListLoginProvidersResponse]:
179+
) -> SyncLoginProvidersPage[LoginProvider]:
178180
"""
179181
ListLoginProviders returns the list of login providers matching the provided
180182
filters.
@@ -194,7 +196,7 @@ def list_login_providers(
194196
"""
195197
return self._get_api_list(
196198
"/gitpod.v1.AccountService/ListLoginProviders",
197-
page=SyncLoginProvidersPage[AccountListLoginProvidersResponse],
199+
page=SyncLoginProvidersPage[LoginProvider],
198200
body=maybe_transform(
199201
{
200202
"filter": filter,
@@ -215,7 +217,7 @@ def list_login_providers(
215217
account_list_login_providers_params.AccountListLoginProvidersParams,
216218
),
217219
),
218-
model=AccountListLoginProvidersResponse,
220+
model=LoginProvider,
219221
method="post",
220222
)
221223

@@ -309,8 +311,8 @@ async def delete(
309311
async def get_sso_login_url(
310312
self,
311313
*,
312-
return_to: str,
313314
email: str | NotGiven = NOT_GIVEN,
315+
return_to: Optional[str] | NotGiven = NOT_GIVEN,
314316
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
315317
# The extra values given here take precedence over values defined on the client or passed to this method.
316318
extra_headers: Headers | None = None,
@@ -322,10 +324,10 @@ async def get_sso_login_url(
322324
GetSSOLoginURL returns the URL to redirect the user to for SSO login.
323325
324326
Args:
325-
return_to: return_to is the URL the user will be redirected to after login
326-
327327
email: email is the email the user wants to login with
328328
329+
return_to: return_to is the URL the user will be redirected to after login
330+
329331
extra_headers: Send extra headers
330332
331333
extra_query: Add additional query parameters to the request
@@ -338,8 +340,8 @@ async def get_sso_login_url(
338340
"/gitpod.v1.AccountService/GetSSOLoginURL",
339341
body=await async_maybe_transform(
340342
{
341-
"return_to": return_to,
342343
"email": email,
344+
"return_to": return_to,
343345
},
344346
account_get_sso_login_url_params.AccountGetSSOLoginURLParams,
345347
),
@@ -362,7 +364,7 @@ def list_login_providers(
362364
extra_query: Query | None = None,
363365
extra_body: Body | None = None,
364366
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
365-
) -> AsyncPaginator[AccountListLoginProvidersResponse, AsyncLoginProvidersPage[AccountListLoginProvidersResponse]]:
367+
) -> AsyncPaginator[LoginProvider, AsyncLoginProvidersPage[LoginProvider]]:
366368
"""
367369
ListLoginProviders returns the list of login providers matching the provided
368370
filters.
@@ -382,7 +384,7 @@ def list_login_providers(
382384
"""
383385
return self._get_api_list(
384386
"/gitpod.v1.AccountService/ListLoginProviders",
385-
page=AsyncLoginProvidersPage[AccountListLoginProvidersResponse],
387+
page=AsyncLoginProvidersPage[LoginProvider],
386388
body=maybe_transform(
387389
{
388390
"filter": filter,
@@ -403,7 +405,7 @@ def list_login_providers(
403405
account_list_login_providers_params.AccountListLoginProvidersParams,
404406
),
405407
),
406-
model=AccountListLoginProvidersResponse,
408+
model=LoginProvider,
407409
method="post",
408410
)
409411

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)
2121
from ..pagination import SyncEditorsPage, AsyncEditorsPage
2222
from .._base_client import AsyncPaginator, make_request_options
23-
from ..types.editor_list_response import EditorListResponse
23+
from ..types.editor import Editor
2424
from ..types.editor_retrieve_response import EditorRetrieveResponse
2525
from ..types.editor_resolve_url_response import EditorResolveURLResponse
2626

@@ -93,7 +93,7 @@ def list(
9393
extra_query: Query | None = None,
9494
extra_body: Body | None = None,
9595
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
96-
) -> SyncEditorsPage[EditorListResponse]:
96+
) -> SyncEditorsPage[Editor]:
9797
"""
9898
ListEditors lists all editors available to the caller
9999
@@ -110,7 +110,7 @@ def list(
110110
"""
111111
return self._get_api_list(
112112
"/gitpod.v1.EditorService/ListEditors",
113-
page=SyncEditorsPage[EditorListResponse],
113+
page=SyncEditorsPage[Editor],
114114
body=maybe_transform({"pagination": pagination}, editor_list_params.EditorListParams),
115115
options=make_request_options(
116116
extra_headers=extra_headers,
@@ -125,7 +125,7 @@ def list(
125125
editor_list_params.EditorListParams,
126126
),
127127
),
128-
model=EditorListResponse,
128+
model=Editor,
129129
method="post",
130130
)
131131

@@ -243,7 +243,7 @@ def list(
243243
extra_query: Query | None = None,
244244
extra_body: Body | None = None,
245245
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
246-
) -> AsyncPaginator[EditorListResponse, AsyncEditorsPage[EditorListResponse]]:
246+
) -> AsyncPaginator[Editor, AsyncEditorsPage[Editor]]:
247247
"""
248248
ListEditors lists all editors available to the caller
249249
@@ -260,7 +260,7 @@ def list(
260260
"""
261261
return self._get_api_list(
262262
"/gitpod.v1.EditorService/ListEditors",
263-
page=AsyncEditorsPage[EditorListResponse],
263+
page=AsyncEditorsPage[Editor],
264264
body=maybe_transform({"pagination": pagination}, editor_list_params.EditorListParams),
265265
options=make_request_options(
266266
extra_headers=extra_headers,
@@ -275,7 +275,7 @@ def list(
275275
editor_list_params.EditorListParams,
276276
),
277277
),
278-
model=EditorListResponse,
278+
model=Editor,
279279
method="post",
280280
)
281281

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
)
3636
from ...._base_client import make_request_options
3737
from ....types.environments import automation_upsert_params
38+
from ....types.environments.automations_file_param import AutomationsFileParam
3839
from ....types.environments.automation_upsert_response import AutomationUpsertResponse
3940

4041
__all__ = ["AutomationsResource", "AsyncAutomationsResource"]
@@ -71,7 +72,7 @@ def with_streaming_response(self) -> AutomationsResourceWithStreamingResponse:
7172
def upsert(
7273
self,
7374
*,
74-
automations_file: automation_upsert_params.AutomationsFile | NotGiven = NOT_GIVEN,
75+
automations_file: AutomationsFileParam | NotGiven = NOT_GIVEN,
7576
environment_id: str | NotGiven = NOT_GIVEN,
7677
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7778
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -144,7 +145,7 @@ def with_streaming_response(self) -> AsyncAutomationsResourceWithStreamingRespon
144145
async def upsert(
145146
self,
146147
*,
147-
automations_file: automation_upsert_params.AutomationsFile | NotGiven = NOT_GIVEN,
148+
automations_file: AutomationsFileParam | NotGiven = NOT_GIVEN,
148149
environment_id: str | NotGiven = NOT_GIVEN,
149150
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
150151
# The extra values given here take precedence over values defined on the client or passed to this method.

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

+13-11
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
service_update_params,
2929
service_retrieve_params,
3030
)
31-
from ....types.environments.automations.service_list_response import ServiceListResponse
31+
from ....types.environments.automations.service import Service
32+
from ....types.environments.automations.service_spec_param import ServiceSpecParam
33+
from ....types.environments.automations.service_metadata_param import ServiceMetadataParam
3234
from ....types.environments.automations.service_create_response import ServiceCreateResponse
3335
from ....types.environments.automations.service_retrieve_response import ServiceRetrieveResponse
3436

@@ -59,8 +61,8 @@ def create(
5961
self,
6062
*,
6163
environment_id: str | NotGiven = NOT_GIVEN,
62-
metadata: service_create_params.Metadata | NotGiven = NOT_GIVEN,
63-
spec: service_create_params.Spec | NotGiven = NOT_GIVEN,
64+
metadata: ServiceMetadataParam | NotGiven = NOT_GIVEN,
65+
spec: ServiceSpecParam | NotGiven = NOT_GIVEN,
6466
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6567
# The extra values given here take precedence over values defined on the client or passed to this method.
6668
extra_headers: Headers | None = None,
@@ -192,7 +194,7 @@ def list(
192194
extra_query: Query | None = None,
193195
extra_body: Body | None = None,
194196
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
195-
) -> SyncServicesPage[ServiceListResponse]:
197+
) -> SyncServicesPage[Service]:
196198
"""
197199
ListServices
198200
@@ -211,7 +213,7 @@ def list(
211213
"""
212214
return self._get_api_list(
213215
"/gitpod.v1.EnvironmentAutomationService/ListServices",
214-
page=SyncServicesPage[ServiceListResponse],
216+
page=SyncServicesPage[Service],
215217
body=maybe_transform(
216218
{
217219
"filter": filter,
@@ -232,7 +234,7 @@ def list(
232234
service_list_params.ServiceListParams,
233235
),
234236
),
235-
model=ServiceListResponse,
237+
model=Service,
236238
method="post",
237239
)
238240

@@ -372,8 +374,8 @@ async def create(
372374
self,
373375
*,
374376
environment_id: str | NotGiven = NOT_GIVEN,
375-
metadata: service_create_params.Metadata | NotGiven = NOT_GIVEN,
376-
spec: service_create_params.Spec | NotGiven = NOT_GIVEN,
377+
metadata: ServiceMetadataParam | NotGiven = NOT_GIVEN,
378+
spec: ServiceSpecParam | NotGiven = NOT_GIVEN,
377379
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
378380
# The extra values given here take precedence over values defined on the client or passed to this method.
379381
extra_headers: Headers | None = None,
@@ -505,7 +507,7 @@ def list(
505507
extra_query: Query | None = None,
506508
extra_body: Body | None = None,
507509
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
508-
) -> AsyncPaginator[ServiceListResponse, AsyncServicesPage[ServiceListResponse]]:
510+
) -> AsyncPaginator[Service, AsyncServicesPage[Service]]:
509511
"""
510512
ListServices
511513
@@ -524,7 +526,7 @@ def list(
524526
"""
525527
return self._get_api_list(
526528
"/gitpod.v1.EnvironmentAutomationService/ListServices",
527-
page=AsyncServicesPage[ServiceListResponse],
529+
page=AsyncServicesPage[Service],
528530
body=maybe_transform(
529531
{
530532
"filter": filter,
@@ -545,7 +547,7 @@ def list(
545547
service_list_params.ServiceListParams,
546548
),
547549
),
548-
model=ServiceListResponse,
550+
model=Service,
549551
method="post",
550552
)
551553

Diff for: src/gitpod/resources/environments/automations/tasks/executions.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
)
2020
from .....pagination import SyncTaskExecutionsPage, AsyncTaskExecutionsPage
2121
from ....._base_client import AsyncPaginator, make_request_options
22+
from .....types.shared.task_execution import TaskExecution
2223
from .....types.environments.automations.tasks import (
2324
execution_list_params,
2425
execution_stop_params,
2526
execution_retrieve_params,
2627
)
27-
from .....types.environments.automations.tasks.execution_list_response import ExecutionListResponse
2828
from .....types.environments.automations.tasks.execution_retrieve_response import ExecutionRetrieveResponse
2929

3030
__all__ = ["ExecutionsResource", "AsyncExecutionsResource"]
@@ -95,7 +95,7 @@ def list(
9595
extra_query: Query | None = None,
9696
extra_body: Body | None = None,
9797
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
98-
) -> SyncTaskExecutionsPage[ExecutionListResponse]:
98+
) -> SyncTaskExecutionsPage[TaskExecution]:
9999
"""
100100
ListTaskExecutions
101101
@@ -114,7 +114,7 @@ def list(
114114
"""
115115
return self._get_api_list(
116116
"/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions",
117-
page=SyncTaskExecutionsPage[ExecutionListResponse],
117+
page=SyncTaskExecutionsPage[TaskExecution],
118118
body=maybe_transform(
119119
{
120120
"filter": filter,
@@ -135,7 +135,7 @@ def list(
135135
execution_list_params.ExecutionListParams,
136136
),
137137
),
138-
model=ExecutionListResponse,
138+
model=TaskExecution,
139139
method="post",
140140
)
141141

@@ -237,7 +237,7 @@ def list(
237237
extra_query: Query | None = None,
238238
extra_body: Body | None = None,
239239
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
240-
) -> AsyncPaginator[ExecutionListResponse, AsyncTaskExecutionsPage[ExecutionListResponse]]:
240+
) -> AsyncPaginator[TaskExecution, AsyncTaskExecutionsPage[TaskExecution]]:
241241
"""
242242
ListTaskExecutions
243243
@@ -256,7 +256,7 @@ def list(
256256
"""
257257
return self._get_api_list(
258258
"/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions",
259-
page=AsyncTaskExecutionsPage[ExecutionListResponse],
259+
page=AsyncTaskExecutionsPage[TaskExecution],
260260
body=maybe_transform(
261261
{
262262
"filter": filter,
@@ -277,7 +277,7 @@ def list(
277277
execution_list_params.ExecutionListParams,
278278
),
279279
),
280-
model=ExecutionListResponse,
280+
model=TaskExecution,
281281
method="post",
282282
)
283283

0 commit comments

Comments
 (0)