Skip to content

feat(api): update to latest changes #10

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 7, 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: 106
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-2410f189970eeb715e79976f13eeca7259b602809e27a84820da8c794dcf00cb.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-da4c36c6b1d973f481abb8eefdeb085d88eaf37eeaba30d276cb3daa405b6f0c.yml
152 changes: 102 additions & 50 deletions api.md

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions src/gitpod/resources/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing import Optional

import httpx

from ..types import (
Expand All @@ -25,9 +27,9 @@
)
from ..pagination import SyncLoginProvidersPage, AsyncLoginProvidersPage
from .._base_client import AsyncPaginator, make_request_options
from ..types.login_provider import LoginProvider
from ..types.account_retrieve_response import AccountRetrieveResponse
from ..types.account_get_sso_login_url_response import AccountGetSSOLoginURLResponse
from ..types.account_list_login_providers_response import AccountListLoginProvidersResponse

__all__ = ["AccountsResource", "AsyncAccountsResource"]

Expand Down Expand Up @@ -121,8 +123,8 @@ def delete(
def get_sso_login_url(
self,
*,
return_to: str,
email: str | NotGiven = NOT_GIVEN,
return_to: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -134,10 +136,10 @@ def get_sso_login_url(
GetSSOLoginURL returns the URL to redirect the user to for SSO login.

Args:
return_to: return_to is the URL the user will be redirected to after login

email: email is the email the user wants to login with

return_to: return_to is the URL the user will be redirected to after login

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -150,8 +152,8 @@ def get_sso_login_url(
"/gitpod.v1.AccountService/GetSSOLoginURL",
body=maybe_transform(
{
"return_to": return_to,
"email": email,
"return_to": return_to,
},
account_get_sso_login_url_params.AccountGetSSOLoginURLParams,
),
Expand All @@ -174,7 +176,7 @@ def list_login_providers(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncLoginProvidersPage[AccountListLoginProvidersResponse]:
) -> SyncLoginProvidersPage[LoginProvider]:
"""
ListLoginProviders returns the list of login providers matching the provided
filters.
Expand All @@ -194,7 +196,7 @@ def list_login_providers(
"""
return self._get_api_list(
"/gitpod.v1.AccountService/ListLoginProviders",
page=SyncLoginProvidersPage[AccountListLoginProvidersResponse],
page=SyncLoginProvidersPage[LoginProvider],
body=maybe_transform(
{
"filter": filter,
Expand All @@ -215,7 +217,7 @@ def list_login_providers(
account_list_login_providers_params.AccountListLoginProvidersParams,
),
),
model=AccountListLoginProvidersResponse,
model=LoginProvider,
method="post",
)

Expand Down Expand Up @@ -309,8 +311,8 @@ async def delete(
async def get_sso_login_url(
self,
*,
return_to: str,
email: str | NotGiven = NOT_GIVEN,
return_to: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -322,10 +324,10 @@ async def get_sso_login_url(
GetSSOLoginURL returns the URL to redirect the user to for SSO login.

Args:
return_to: return_to is the URL the user will be redirected to after login

email: email is the email the user wants to login with

return_to: return_to is the URL the user will be redirected to after login

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -338,8 +340,8 @@ async def get_sso_login_url(
"/gitpod.v1.AccountService/GetSSOLoginURL",
body=await async_maybe_transform(
{
"return_to": return_to,
"email": email,
"return_to": return_to,
},
account_get_sso_login_url_params.AccountGetSSOLoginURLParams,
),
Expand All @@ -362,7 +364,7 @@ def list_login_providers(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[AccountListLoginProvidersResponse, AsyncLoginProvidersPage[AccountListLoginProvidersResponse]]:
) -> AsyncPaginator[LoginProvider, AsyncLoginProvidersPage[LoginProvider]]:
"""
ListLoginProviders returns the list of login providers matching the provided
filters.
Expand All @@ -382,7 +384,7 @@ def list_login_providers(
"""
return self._get_api_list(
"/gitpod.v1.AccountService/ListLoginProviders",
page=AsyncLoginProvidersPage[AccountListLoginProvidersResponse],
page=AsyncLoginProvidersPage[LoginProvider],
body=maybe_transform(
{
"filter": filter,
Expand All @@ -403,7 +405,7 @@ def list_login_providers(
account_list_login_providers_params.AccountListLoginProvidersParams,
),
),
model=AccountListLoginProvidersResponse,
model=LoginProvider,
method="post",
)

Expand Down
14 changes: 7 additions & 7 deletions src/gitpod/resources/editors.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
from ..pagination import SyncEditorsPage, AsyncEditorsPage
from .._base_client import AsyncPaginator, make_request_options
from ..types.editor_list_response import EditorListResponse
from ..types.editor import Editor
from ..types.editor_retrieve_response import EditorRetrieveResponse
from ..types.editor_resolve_url_response import EditorResolveURLResponse

Expand Down Expand Up @@ -93,7 +93,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncEditorsPage[EditorListResponse]:
) -> SyncEditorsPage[Editor]:
"""
ListEditors lists all editors available to the caller

Expand All @@ -110,7 +110,7 @@ def list(
"""
return self._get_api_list(
"/gitpod.v1.EditorService/ListEditors",
page=SyncEditorsPage[EditorListResponse],
page=SyncEditorsPage[Editor],
body=maybe_transform({"pagination": pagination}, editor_list_params.EditorListParams),
options=make_request_options(
extra_headers=extra_headers,
Expand All @@ -125,7 +125,7 @@ def list(
editor_list_params.EditorListParams,
),
),
model=EditorListResponse,
model=Editor,
method="post",
)

Expand Down Expand Up @@ -243,7 +243,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[EditorListResponse, AsyncEditorsPage[EditorListResponse]]:
) -> AsyncPaginator[Editor, AsyncEditorsPage[Editor]]:
"""
ListEditors lists all editors available to the caller

Expand All @@ -260,7 +260,7 @@ def list(
"""
return self._get_api_list(
"/gitpod.v1.EditorService/ListEditors",
page=AsyncEditorsPage[EditorListResponse],
page=AsyncEditorsPage[Editor],
body=maybe_transform({"pagination": pagination}, editor_list_params.EditorListParams),
options=make_request_options(
extra_headers=extra_headers,
Expand All @@ -275,7 +275,7 @@ def list(
editor_list_params.EditorListParams,
),
),
model=EditorListResponse,
model=Editor,
method="post",
)

Expand Down
5 changes: 3 additions & 2 deletions src/gitpod/resources/environments/automations/automations.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
)
from ...._base_client import make_request_options
from ....types.environments import automation_upsert_params
from ....types.environments.automations_file_param import AutomationsFileParam
from ....types.environments.automation_upsert_response import AutomationUpsertResponse

__all__ = ["AutomationsResource", "AsyncAutomationsResource"]
Expand Down Expand Up @@ -71,7 +72,7 @@ def with_streaming_response(self) -> AutomationsResourceWithStreamingResponse:
def upsert(
self,
*,
automations_file: automation_upsert_params.AutomationsFile | NotGiven = NOT_GIVEN,
automations_file: AutomationsFileParam | NotGiven = NOT_GIVEN,
environment_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -144,7 +145,7 @@ def with_streaming_response(self) -> AsyncAutomationsResourceWithStreamingRespon
async def upsert(
self,
*,
automations_file: automation_upsert_params.AutomationsFile | NotGiven = NOT_GIVEN,
automations_file: AutomationsFileParam | NotGiven = NOT_GIVEN,
environment_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down
24 changes: 13 additions & 11 deletions src/gitpod/resources/environments/automations/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
service_update_params,
service_retrieve_params,
)
from ....types.environments.automations.service_list_response import ServiceListResponse
from ....types.environments.automations.service import Service
from ....types.environments.automations.service_spec_param import ServiceSpecParam
from ....types.environments.automations.service_metadata_param import ServiceMetadataParam
from ....types.environments.automations.service_create_response import ServiceCreateResponse
from ....types.environments.automations.service_retrieve_response import ServiceRetrieveResponse

Expand Down Expand Up @@ -59,8 +61,8 @@ def create(
self,
*,
environment_id: str | NotGiven = NOT_GIVEN,
metadata: service_create_params.Metadata | NotGiven = NOT_GIVEN,
spec: service_create_params.Spec | NotGiven = NOT_GIVEN,
metadata: ServiceMetadataParam | NotGiven = NOT_GIVEN,
spec: ServiceSpecParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -192,7 +194,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncServicesPage[ServiceListResponse]:
) -> SyncServicesPage[Service]:
"""
ListServices

Expand All @@ -211,7 +213,7 @@ def list(
"""
return self._get_api_list(
"/gitpod.v1.EnvironmentAutomationService/ListServices",
page=SyncServicesPage[ServiceListResponse],
page=SyncServicesPage[Service],
body=maybe_transform(
{
"filter": filter,
Expand All @@ -232,7 +234,7 @@ def list(
service_list_params.ServiceListParams,
),
),
model=ServiceListResponse,
model=Service,
method="post",
)

Expand Down Expand Up @@ -372,8 +374,8 @@ async def create(
self,
*,
environment_id: str | NotGiven = NOT_GIVEN,
metadata: service_create_params.Metadata | NotGiven = NOT_GIVEN,
spec: service_create_params.Spec | NotGiven = NOT_GIVEN,
metadata: ServiceMetadataParam | NotGiven = NOT_GIVEN,
spec: ServiceSpecParam | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -505,7 +507,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[ServiceListResponse, AsyncServicesPage[ServiceListResponse]]:
) -> AsyncPaginator[Service, AsyncServicesPage[Service]]:
"""
ListServices

Expand All @@ -524,7 +526,7 @@ def list(
"""
return self._get_api_list(
"/gitpod.v1.EnvironmentAutomationService/ListServices",
page=AsyncServicesPage[ServiceListResponse],
page=AsyncServicesPage[Service],
body=maybe_transform(
{
"filter": filter,
Expand All @@ -545,7 +547,7 @@ def list(
service_list_params.ServiceListParams,
),
),
model=ServiceListResponse,
model=Service,
method="post",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
)
from .....pagination import SyncTaskExecutionsPage, AsyncTaskExecutionsPage
from ....._base_client import AsyncPaginator, make_request_options
from .....types.shared.task_execution import TaskExecution
from .....types.environments.automations.tasks import (
execution_list_params,
execution_stop_params,
execution_retrieve_params,
)
from .....types.environments.automations.tasks.execution_list_response import ExecutionListResponse
from .....types.environments.automations.tasks.execution_retrieve_response import ExecutionRetrieveResponse

__all__ = ["ExecutionsResource", "AsyncExecutionsResource"]
Expand Down Expand Up @@ -95,7 +95,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncTaskExecutionsPage[ExecutionListResponse]:
) -> SyncTaskExecutionsPage[TaskExecution]:
"""
ListTaskExecutions

Expand All @@ -114,7 +114,7 @@ def list(
"""
return self._get_api_list(
"/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions",
page=SyncTaskExecutionsPage[ExecutionListResponse],
page=SyncTaskExecutionsPage[TaskExecution],
body=maybe_transform(
{
"filter": filter,
Expand All @@ -135,7 +135,7 @@ def list(
execution_list_params.ExecutionListParams,
),
),
model=ExecutionListResponse,
model=TaskExecution,
method="post",
)

Expand Down Expand Up @@ -237,7 +237,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[ExecutionListResponse, AsyncTaskExecutionsPage[ExecutionListResponse]]:
) -> AsyncPaginator[TaskExecution, AsyncTaskExecutionsPage[TaskExecution]]:
"""
ListTaskExecutions

Expand All @@ -256,7 +256,7 @@ def list(
"""
return self._get_api_list(
"/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions",
page=AsyncTaskExecutionsPage[ExecutionListResponse],
page=AsyncTaskExecutionsPage[TaskExecution],
body=maybe_transform(
{
"filter": filter,
Expand All @@ -277,7 +277,7 @@ def list(
execution_list_params.ExecutionListParams,
),
),
model=ExecutionListResponse,
model=TaskExecution,
method="post",
)

Expand Down
Loading