diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f14b480..aaf968a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.2" + ".": "0.1.0-alpha.3" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 87b67de..c57d3dc 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-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-988164042da1361feb3d28364c6f14fee775ceab496b9d79d048141c0fa6da19.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d13bc0..1de3746 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## 0.1.0-alpha.3 (2025-02-14) + +Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.0-alpha.2...v0.1.0-alpha.3) + +### Features + +* **api:** manual updates ([#24](https://github.com/gitpod-io/gitpod-sdk-python/issues/24)) ([b14af5b](https://github.com/gitpod-io/gitpod-sdk-python/commit/b14af5b14f013a2d966b6dca24abcc45975555e5)) +* **api:** manual updates ([#25](https://github.com/gitpod-io/gitpod-sdk-python/issues/25)) ([a13ae46](https://github.com/gitpod-io/gitpod-sdk-python/commit/a13ae465471d0323a2151fc904c8214f295e5a90)) +* **api:** manual updates ([#28](https://github.com/gitpod-io/gitpod-sdk-python/issues/28)) ([b763659](https://github.com/gitpod-io/gitpod-sdk-python/commit/b763659e5a226b94311d5f898534794879b279f8)) +* **api:** manual updates ([#30](https://github.com/gitpod-io/gitpod-sdk-python/issues/30)) ([45bdb31](https://github.com/gitpod-io/gitpod-sdk-python/commit/45bdb315c9e912833b335244ac1fdb7737c423c2)) +* **api:** update examples ([#22](https://github.com/gitpod-io/gitpod-sdk-python/issues/22)) ([a3a0b9d](https://github.com/gitpod-io/gitpod-sdk-python/commit/a3a0b9dbb81bc5915ca65948fc570b406b2b587e)) +* **api:** update with latest API spec ([#27](https://github.com/gitpod-io/gitpod-sdk-python/issues/27)) ([80f6e19](https://github.com/gitpod-io/gitpod-sdk-python/commit/80f6e194b049fa48e82fe310c9c56e632588bfb9)) + + +### Bug Fixes + +* asyncify on non-asyncio runtimes ([#31](https://github.com/gitpod-io/gitpod-sdk-python/issues/31)) ([507a01e](https://github.com/gitpod-io/gitpod-sdk-python/commit/507a01eb2eaed68da316448a12a98d13034b57f7)) + + +### Chores + +* **internal:** update client tests ([#26](https://github.com/gitpod-io/gitpod-sdk-python/issues/26)) ([e4040d1](https://github.com/gitpod-io/gitpod-sdk-python/commit/e4040d15067dea4ce6eb57742e6857bd8c227c4b)) +* **internal:** update client tests ([#32](https://github.com/gitpod-io/gitpod-sdk-python/issues/32)) ([47d7150](https://github.com/gitpod-io/gitpod-sdk-python/commit/47d715021c3ca29e930c5b9e928e2f4aeb201ecc)) + ## 0.1.0-alpha.2 (2025-02-12) Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.0-alpha.1...v0.1.0-alpha.2) diff --git a/README.md b/README.md index 7cb4c28..d89ac53 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/). ## Documentation -The REST API documentation can be found on [docs.gitpod.com](https://docs.gitpod.com). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found on [docs.gitpod.io](https://docs.gitpod.io). The full API of this library can be found in [api.md](api.md). ## Installation @@ -31,8 +31,8 @@ client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) -runner = client.runners.create() -print(runner.access_token) +response = client.identity.get_authenticated_identity() +print(response.organization_id) ``` While you can provide a `bearer_token` keyword argument, @@ -55,8 +55,8 @@ client = AsyncGitpod( async def main() -> None: - runner = await client.runners.create() - print(runner.access_token) + response = await client.identity.get_authenticated_identity() + print(response.organization_id) asyncio.run(main()) @@ -84,12 +84,12 @@ from gitpod import Gitpod client = Gitpod() -all_services = [] +all_environments = [] # Automatically fetches more pages as needed. -for service in client.environments.automations.services.list(): - # Do something with service here - all_services.append(service) -print(all_services) +for environment in client.environments.list(): + # Do something with environment here + all_environments.append(environment) +print(all_environments) ``` Or, asynchronously: @@ -102,11 +102,11 @@ client = AsyncGitpod() async def main() -> None: - all_services = [] + all_environments = [] # Iterate through items across all pages, issuing requests as needed. - async for service in client.environments.automations.services.list(): - all_services.append(service) - print(all_services) + async for environment in client.environments.list(): + all_environments.append(environment) + print(all_environments) asyncio.run(main()) @@ -115,11 +115,11 @@ asyncio.run(main()) Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages: ```python -first_page = await client.environments.automations.services.list() +first_page = await client.environments.list() if first_page.has_next_page(): print(f"will fetch next page using these details: {first_page.next_page_info()}") next_page = await first_page.get_next_page() - print(f"number of items we just fetched: {len(next_page.services)}") + print(f"number of items we just fetched: {len(next_page.environments)}") # Remove `await` for non-async usage. ``` @@ -127,11 +127,11 @@ if first_page.has_next_page(): Or just work directly with the returned data: ```python -first_page = await client.environments.automations.services.list() +first_page = await client.environments.list() print(f"next page cursor: {first_page.pagination.next_token}") # => "next page cursor: ..." -for service in first_page.services: - print(service.id) +for environment in first_page.environments: + print(environment.id) # Remove `await` for non-async usage. ``` @@ -152,7 +152,7 @@ from gitpod import Gitpod client = Gitpod() try: - client.runners.create() + client.identity.get_authenticated_identity() except gitpod.APIConnectionError as e: print("The server could not be reached") print(e.__cause__) # an underlying Exception, likely raised within httpx. @@ -195,7 +195,7 @@ client = Gitpod( ) # Or, configure per-request: -client.with_options(max_retries=5).runners.create() +client.with_options(max_retries=5).identity.get_authenticated_identity() ``` ### Timeouts @@ -218,7 +218,7 @@ client = Gitpod( ) # Override per-request: -client.with_options(timeout=5.0).runners.create() +client.with_options(timeout=5.0).identity.get_authenticated_identity() ``` On timeout, an `APITimeoutError` is thrown. @@ -259,11 +259,11 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to from gitpod import Gitpod client = Gitpod() -response = client.runners.with_raw_response.create() +response = client.identity.with_raw_response.get_authenticated_identity() print(response.headers.get('X-My-Header')) -runner = response.parse() # get the object that `runners.create()` would have returned -print(runner.access_token) +identity = response.parse() # get the object that `identity.get_authenticated_identity()` would have returned +print(identity.organization_id) ``` These methods return an [`APIResponse`](https://github.com/gitpod-io/gitpod-sdk-python/tree/main/src/gitpod/_response.py) object. @@ -277,7 +277,7 @@ The above interface eagerly reads the full response body when you make the reque To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods. ```python -with client.runners.with_streaming_response.create() as response: +with client.identity.with_streaming_response.get_authenticated_identity() as response: print(response.headers.get("X-My-Header")) for line in response.iter_lines(): diff --git a/pyproject.toml b/pyproject.toml index 76c3f69..988b9c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gitpod-sdk" -version = "0.1.0-alpha.2" +version = "0.1.0-alpha.3" description = "The official Python library for the gitpod API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/gitpod/_utils/_sync.py b/src/gitpod/_utils/_sync.py index 8b3aaf2..ad7ec71 100644 --- a/src/gitpod/_utils/_sync.py +++ b/src/gitpod/_utils/_sync.py @@ -7,16 +7,20 @@ from typing import Any, TypeVar, Callable, Awaitable from typing_extensions import ParamSpec +import anyio +import sniffio +import anyio.to_thread + T_Retval = TypeVar("T_Retval") T_ParamSpec = ParamSpec("T_ParamSpec") if sys.version_info >= (3, 9): - to_thread = asyncio.to_thread + _asyncio_to_thread = asyncio.to_thread else: # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread # for Python 3.8 support - async def to_thread( + async def _asyncio_to_thread( func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs ) -> Any: """Asynchronously run function *func* in a separate thread. @@ -34,6 +38,17 @@ async def to_thread( return await loop.run_in_executor(None, func_call) +async def to_thread( + func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs +) -> T_Retval: + if sniffio.current_async_library() == "asyncio": + return await _asyncio_to_thread(func, *args, **kwargs) + + return await anyio.to_thread.run_sync( + functools.partial(func, *args, **kwargs), + ) + + # inspired by `asyncer`, https://github.com/tiangolo/asyncer def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]: """ diff --git a/src/gitpod/_version.py b/src/gitpod/_version.py index ad57910..a02d208 100644 --- a/src/gitpod/_version.py +++ b/src/gitpod/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "gitpod" -__version__ = "0.1.0-alpha.2" # x-release-please-version +__version__ = "0.1.0-alpha.3" # x-release-please-version diff --git a/src/gitpod/resources/accounts.py b/src/gitpod/resources/accounts.py index 1712f20..aa8d501 100644 --- a/src/gitpod/resources/accounts.py +++ b/src/gitpod/resources/accounts.py @@ -89,7 +89,7 @@ def retrieve( def delete( self, *, - account_id: str | NotGiven = NOT_GIVEN, + account_id: str, # 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, @@ -123,7 +123,7 @@ def delete( def get_sso_login_url( self, *, - email: str | NotGiven = NOT_GIVEN, + email: str, 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. @@ -277,7 +277,7 @@ async def retrieve( async def delete( self, *, - account_id: str | NotGiven = NOT_GIVEN, + account_id: str, # 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, @@ -311,7 +311,7 @@ async def delete( async def get_sso_login_url( self, *, - email: str | NotGiven = NOT_GIVEN, + email: str, 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. diff --git a/src/gitpod/resources/editors.py b/src/gitpod/resources/editors.py index 1a910b7..78e0ba2 100644 --- a/src/gitpod/resources/editors.py +++ b/src/gitpod/resources/editors.py @@ -50,7 +50,7 @@ def with_streaming_response(self) -> EditorsResourceWithStreamingResponse: def retrieve( self, *, - id: str | NotGiven = NOT_GIVEN, + id: str, # 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, @@ -132,9 +132,9 @@ def list( def resolve_url( self, *, - editor_id: str | NotGiven = NOT_GIVEN, - environment_id: str | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, + editor_id: str, + environment_id: str, + organization_id: str, # 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, @@ -200,7 +200,7 @@ def with_streaming_response(self) -> AsyncEditorsResourceWithStreamingResponse: async def retrieve( self, *, - id: str | NotGiven = NOT_GIVEN, + id: str, # 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, @@ -282,9 +282,9 @@ def list( async def resolve_url( self, *, - editor_id: str | NotGiven = NOT_GIVEN, - environment_id: str | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, + editor_id: str, + environment_id: str, + organization_id: str, # 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, diff --git a/src/gitpod/resources/environments/classes.py b/src/gitpod/resources/environments/classes.py index 1a64f8a..ffe58db 100644 --- a/src/gitpod/resources/environments/classes.py +++ b/src/gitpod/resources/environments/classes.py @@ -57,9 +57,24 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncEnvironmentClassesPage[EnvironmentClass]: """ - ListEnvironmentClasses returns the list of environment classes with runner - details a user is able to use based on the query buf:lint:ignore - RPC_REQUEST_RESPONSE_UNIQUE + Lists available environment classes with their specifications and resource + limits. + + Use this method to understand what types of environments you can create and + their capabilities. Environment classes define the compute resources and + features available to your environments. + + ### Examples + + - List all available classes: + + Retrieves a list of all environment classes with their specifications. + + ```yaml + {} + ``` + + buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE Args: pagination: pagination contains the pagination options for listing environment classes @@ -135,9 +150,24 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[EnvironmentClass, AsyncEnvironmentClassesPage[EnvironmentClass]]: """ - ListEnvironmentClasses returns the list of environment classes with runner - details a user is able to use based on the query buf:lint:ignore - RPC_REQUEST_RESPONSE_UNIQUE + Lists available environment classes with their specifications and resource + limits. + + Use this method to understand what types of environments you can create and + their capabilities. Environment classes define the compute resources and + features available to your environments. + + ### Examples + + - List all available classes: + + Retrieves a list of all environment classes with their specifications. + + ```yaml + {} + ``` + + buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE Args: pagination: pagination contains the pagination options for listing environment classes diff --git a/src/gitpod/resources/environments/environments.py b/src/gitpod/resources/environments/environments.py index 091b00c..c5e250f 100644 --- a/src/gitpod/resources/environments/environments.py +++ b/src/gitpod/resources/environments/environments.py @@ -99,22 +99,24 @@ def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EnvironmentCreateResponse: - """ - CreateEnvironment creates a new environment and starts it. + """Creates a development environment from a context URL (e.g. + + Git repository) and + starts it. The `class` field must be a valid environment class ID. You can find a list of available environment classes with the `ListEnvironmentClasses` method. ### Examples - - from context URL: + - Create from context URL: - Creates an environment from a context URL, e.g. a GitHub repository. + Creates an environment from a Git repository URL with default settings. ```yaml spec: machine: - class: "61000000-0000-0000-0000-000000000000" + class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: @@ -122,15 +124,14 @@ def create( url: "https://github.com/gitpod-io/gitpod" ``` - - from Git repository: + - Create from Git repository: - Creates an environment from a Git repository directly. While less convenient, - this is useful if you want to specify a specific branch, commit, etc. + Creates an environment from a Git repository with specific branch targeting. ```yaml spec: machine: - class: "61000000-0000-0000-0000-000000000000" + class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: @@ -140,6 +141,28 @@ def create( targetMode: "CLONE_TARGET_MODE_REMOTE_BRANCH" ``` + - Create with custom timeout and ports: + + Creates an environment with custom inactivity timeout and exposed port + configuration. + + ```yaml + spec: + machine: + class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + content: + initializer: + specs: + - contextUrl: + url: "https://github.com/gitpod-io/gitpod" + timeout: + disconnected: "7200s" # 2 hours in seconds + ports: + - port: 3000 + admission: "ADMISSION_LEVEL_EVERYONE" + name: "Web App" + ``` + Args: spec: EnvironmentSpec specifies the configuration of an environment for an environment start @@ -164,7 +187,7 @@ def create( def retrieve( self, *, - environment_id: str | NotGiven = NOT_GIVEN, + environment_id: str, # 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, @@ -173,7 +196,26 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EnvironmentRetrieveResponse: """ - GetEnvironment returns a single environment. + Gets details about a specific environment including its status, configuration, + and context URL. + + Use this method to: + + - Check if an environment is ready to use + - Get connection details for IDE and exposed ports + - Monitor environment health and resource usage + - Debug environment setup issues + + ### Examples + + - Get environment details: + + Retrieves detailed information about a specific environment using its unique + identifier. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + ``` Args: environment_id: environment_id specifies the environment to get @@ -211,7 +253,56 @@ def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateEnvironment updates the environment partially. + Updates an environment's configuration while it is running. + + Updates are limited to: + + - Git credentials (username, email) + - SSH public keys + - Content initialization + - Port configurations + - Automation files + - Environment timeouts + + ### Examples + + - Update Git credentials: + + Updates the Git configuration for the environment. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + spec: + content: + gitUsername: "example-user" + gitEmail: "user@example.com" + ``` + + - Add SSH public key: + + Adds a new SSH public key for authentication. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + spec: + sshPublicKeys: + - id: "0194b7c1-c954-718d-91a4-9a742aa5fc11" + value: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI..." + ``` + + - Update content session: + + Updates the content session identifier for the environment. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + spec: + content: + session: "0194b7c1-c954-718d-91a4-9a742aa5fc11" + ``` + + Note: Machine class changes require stopping the environment and creating a new + one. Args: environment_id: environment_id specifies which environment should be updated. @@ -257,7 +348,43 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncEnvironmentsPage[Environment]: """ - ListEnvironments returns a list of environments that match the query. + Lists all environments matching the specified criteria. + + Use this method to find and monitor environments across your organization. + Results are ordered by creation time with newest environments first. + + ### Examples + + - List running environments for a project: + + Retrieves all running environments for a specific project with pagination. + + ```yaml + filter: + statusPhases: ["ENVIRONMENT_PHASE_RUNNING"] + projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"] + pagination: + pageSize: 10 + ``` + + - List all environments for a specific runner: + + Filters environments by runner ID and creator ID. + + ```yaml + filter: + runnerIds: ["e6aa9c54-89d3-42c1-ac31-bd8d8f1concentrate"] + creatorIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"] + ``` + + - List stopped and deleted environments: + + Retrieves all environments in stopped or deleted state. + + ```yaml + filter: + statusPhases: ["ENVIRONMENT_PHASE_STOPPED", "ENVIRONMENT_PHASE_DELETED"] + ``` Args: pagination: pagination contains the pagination options for listing environments @@ -309,10 +436,31 @@ def delete( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """DeleteEnvironment deletes an environment. + """ + Permanently deletes an environment. + + Running environments are automatically stopped before deletion. If force is + true, the environment is deleted immediately without graceful shutdown. + + ### Examples + + - Delete with graceful shutdown: - When the environment is running, it - will be stopped as well. Deleted environments cannot be started again. + Deletes an environment after gracefully stopping it. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + force: false + ``` + + - Force delete: + + Immediately deletes an environment without waiting for graceful shutdown. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + force: true + ``` Args: environment_id: environment_id specifies the environment that is going to delete. @@ -360,8 +508,36 @@ def create_from_project( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EnvironmentCreateFromProjectResponse: """ - CreateAbdStartEnvironmentFromProject creates a new environment from a project - and starts it. + Creates an environment from an existing project configuration and starts it. + + This method uses project settings as defaults but allows overriding specific + configurations. Project settings take precedence over default configurations, + while custom specifications in the request override project settings. + + ### Examples + + - Create with project defaults: + + Creates an environment using all default settings from the project + configuration. + + ```yaml + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` + + - Create with custom compute resources: + + Creates an environment from project with custom machine class and timeout + settings. + + ```yaml + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + spec: + machine: + class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + timeout: + disconnected: "14400s" # 4 hours in seconds + ``` Args: spec: EnvironmentSpec specifies the configuration of an environment for an environment @@ -402,8 +578,20 @@ def create_logs_token( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EnvironmentCreateLogsTokenResponse: """ - CreateEnvironmentLogsToken creates a token that can be used to access the logs - of an environment. + Creates an access token for retrieving environment logs. + + Generated tokens are valid for one hour and provide read-only access to the + environment's logs. + + ### Examples + + - Generate logs token: + + Creates a temporary access token for retrieving environment logs. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + ``` Args: environment_id: environment_id specifies the environment for which the logs token should be @@ -444,7 +632,23 @@ def mark_active( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - MarkEnvironmentActive allows tools to signal activity for an environment. + Records environment activity to prevent automatic shutdown. + + Activity signals should be sent every 5 minutes while the environment is + actively being used. The source must be between 3-80 characters. + + ### Examples + + - Signal VS Code activity: + + Records VS Code editor activity to prevent environment shutdown. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + activitySignal: + source: "VS Code" + timestamp: "2025-02-12T14:30:00Z" + ``` Args: activity_signal: EnvironmentActivitySignal used to signal activity for an environment. @@ -485,10 +689,22 @@ def start( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """StartEnvironment starts an environment. + """ + Starts a stopped environment. - This function is idempotent, i.e. if the - environment is already running no error is returned. + Use this method to resume work on a previously stopped environment. The + environment retains its configuration and workspace content from when it was + stopped. + + ### Examples + + - Start an environment: + + Resumes a previously stopped environment with its existing configuration. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + ``` Args: environment_id: environment_id specifies which environment should be started. @@ -522,7 +738,20 @@ def stop( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - StopEnvironment stops a running environment. + Stops a running environment. + + Use this method to pause work while preserving the environment's state. The + environment can be resumed later using StartEnvironment. + + ### Examples + + - Stop an environment: + + Gracefully stops a running environment while preserving its state. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + ``` Args: environment_id: environment_id specifies which environment should be stopped. @@ -586,22 +815,24 @@ async def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EnvironmentCreateResponse: - """ - CreateEnvironment creates a new environment and starts it. + """Creates a development environment from a context URL (e.g. + + Git repository) and + starts it. The `class` field must be a valid environment class ID. You can find a list of available environment classes with the `ListEnvironmentClasses` method. ### Examples - - from context URL: + - Create from context URL: - Creates an environment from a context URL, e.g. a GitHub repository. + Creates an environment from a Git repository URL with default settings. ```yaml spec: machine: - class: "61000000-0000-0000-0000-000000000000" + class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: @@ -609,15 +840,14 @@ async def create( url: "https://github.com/gitpod-io/gitpod" ``` - - from Git repository: + - Create from Git repository: - Creates an environment from a Git repository directly. While less convenient, - this is useful if you want to specify a specific branch, commit, etc. + Creates an environment from a Git repository with specific branch targeting. ```yaml spec: machine: - class: "61000000-0000-0000-0000-000000000000" + class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" content: initializer: specs: @@ -627,6 +857,28 @@ async def create( targetMode: "CLONE_TARGET_MODE_REMOTE_BRANCH" ``` + - Create with custom timeout and ports: + + Creates an environment with custom inactivity timeout and exposed port + configuration. + + ```yaml + spec: + machine: + class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + content: + initializer: + specs: + - contextUrl: + url: "https://github.com/gitpod-io/gitpod" + timeout: + disconnected: "7200s" # 2 hours in seconds + ports: + - port: 3000 + admission: "ADMISSION_LEVEL_EVERYONE" + name: "Web App" + ``` + Args: spec: EnvironmentSpec specifies the configuration of an environment for an environment start @@ -651,7 +903,7 @@ async def create( async def retrieve( self, *, - environment_id: str | NotGiven = NOT_GIVEN, + environment_id: str, # 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, @@ -660,7 +912,26 @@ async def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EnvironmentRetrieveResponse: """ - GetEnvironment returns a single environment. + Gets details about a specific environment including its status, configuration, + and context URL. + + Use this method to: + + - Check if an environment is ready to use + - Get connection details for IDE and exposed ports + - Monitor environment health and resource usage + - Debug environment setup issues + + ### Examples + + - Get environment details: + + Retrieves detailed information about a specific environment using its unique + identifier. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + ``` Args: environment_id: environment_id specifies the environment to get @@ -698,7 +969,56 @@ async def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateEnvironment updates the environment partially. + Updates an environment's configuration while it is running. + + Updates are limited to: + + - Git credentials (username, email) + - SSH public keys + - Content initialization + - Port configurations + - Automation files + - Environment timeouts + + ### Examples + + - Update Git credentials: + + Updates the Git configuration for the environment. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + spec: + content: + gitUsername: "example-user" + gitEmail: "user@example.com" + ``` + + - Add SSH public key: + + Adds a new SSH public key for authentication. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + spec: + sshPublicKeys: + - id: "0194b7c1-c954-718d-91a4-9a742aa5fc11" + value: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI..." + ``` + + - Update content session: + + Updates the content session identifier for the environment. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + spec: + content: + session: "0194b7c1-c954-718d-91a4-9a742aa5fc11" + ``` + + Note: Machine class changes require stopping the environment and creating a new + one. Args: environment_id: environment_id specifies which environment should be updated. @@ -744,7 +1064,43 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Environment, AsyncEnvironmentsPage[Environment]]: """ - ListEnvironments returns a list of environments that match the query. + Lists all environments matching the specified criteria. + + Use this method to find and monitor environments across your organization. + Results are ordered by creation time with newest environments first. + + ### Examples + + - List running environments for a project: + + Retrieves all running environments for a specific project with pagination. + + ```yaml + filter: + statusPhases: ["ENVIRONMENT_PHASE_RUNNING"] + projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"] + pagination: + pageSize: 10 + ``` + + - List all environments for a specific runner: + + Filters environments by runner ID and creator ID. + + ```yaml + filter: + runnerIds: ["e6aa9c54-89d3-42c1-ac31-bd8d8f1concentrate"] + creatorIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"] + ``` + + - List stopped and deleted environments: + + Retrieves all environments in stopped or deleted state. + + ```yaml + filter: + statusPhases: ["ENVIRONMENT_PHASE_STOPPED", "ENVIRONMENT_PHASE_DELETED"] + ``` Args: pagination: pagination contains the pagination options for listing environments @@ -796,10 +1152,31 @@ async def delete( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """DeleteEnvironment deletes an environment. + """ + Permanently deletes an environment. + + Running environments are automatically stopped before deletion. If force is + true, the environment is deleted immediately without graceful shutdown. + + ### Examples + + - Delete with graceful shutdown: - When the environment is running, it - will be stopped as well. Deleted environments cannot be started again. + Deletes an environment after gracefully stopping it. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + force: false + ``` + + - Force delete: + + Immediately deletes an environment without waiting for graceful shutdown. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + force: true + ``` Args: environment_id: environment_id specifies the environment that is going to delete. @@ -847,8 +1224,36 @@ async def create_from_project( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EnvironmentCreateFromProjectResponse: """ - CreateAbdStartEnvironmentFromProject creates a new environment from a project - and starts it. + Creates an environment from an existing project configuration and starts it. + + This method uses project settings as defaults but allows overriding specific + configurations. Project settings take precedence over default configurations, + while custom specifications in the request override project settings. + + ### Examples + + - Create with project defaults: + + Creates an environment using all default settings from the project + configuration. + + ```yaml + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` + + - Create with custom compute resources: + + Creates an environment from project with custom machine class and timeout + settings. + + ```yaml + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + spec: + machine: + class: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + timeout: + disconnected: "14400s" # 4 hours in seconds + ``` Args: spec: EnvironmentSpec specifies the configuration of an environment for an environment @@ -889,8 +1294,20 @@ async def create_logs_token( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EnvironmentCreateLogsTokenResponse: """ - CreateEnvironmentLogsToken creates a token that can be used to access the logs - of an environment. + Creates an access token for retrieving environment logs. + + Generated tokens are valid for one hour and provide read-only access to the + environment's logs. + + ### Examples + + - Generate logs token: + + Creates a temporary access token for retrieving environment logs. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + ``` Args: environment_id: environment_id specifies the environment for which the logs token should be @@ -931,7 +1348,23 @@ async def mark_active( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - MarkEnvironmentActive allows tools to signal activity for an environment. + Records environment activity to prevent automatic shutdown. + + Activity signals should be sent every 5 minutes while the environment is + actively being used. The source must be between 3-80 characters. + + ### Examples + + - Signal VS Code activity: + + Records VS Code editor activity to prevent environment shutdown. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + activitySignal: + source: "VS Code" + timestamp: "2025-02-12T14:30:00Z" + ``` Args: activity_signal: EnvironmentActivitySignal used to signal activity for an environment. @@ -972,10 +1405,22 @@ async def start( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """StartEnvironment starts an environment. + """ + Starts a stopped environment. - This function is idempotent, i.e. if the - environment is already running no error is returned. + Use this method to resume work on a previously stopped environment. The + environment retains its configuration and workspace content from when it was + stopped. + + ### Examples + + - Start an environment: + + Resumes a previously stopped environment with its existing configuration. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + ``` Args: environment_id: environment_id specifies which environment should be started. @@ -1011,7 +1456,20 @@ async def stop( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - StopEnvironment stops a running environment. + Stops a running environment. + + Use this method to pause work while preserving the environment's state. The + environment can be resumed later using StartEnvironment. + + ### Examples + + - Stop an environment: + + Gracefully stops a running environment while preserving its state. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + ``` Args: environment_id: environment_id specifies which environment should be stopped. diff --git a/src/gitpod/resources/organizations/domain_verifications.py b/src/gitpod/resources/organizations/domain_verifications.py index 3761289..079f837 100644 --- a/src/gitpod/resources/organizations/domain_verifications.py +++ b/src/gitpod/resources/organizations/domain_verifications.py @@ -57,8 +57,8 @@ def with_streaming_response(self) -> DomainVerificationsResourceWithStreamingRes def create( self, *, - domain: str | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, + domain: str, + organization_id: str, # 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, @@ -96,7 +96,7 @@ def create( def retrieve( self, *, - domain_verification_id: str | NotGiven = NOT_GIVEN, + domain_verification_id: str, # 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, @@ -131,9 +131,9 @@ def retrieve( def list( self, *, + organization_id: str, token: str | NotGiven = NOT_GIVEN, page_size: int | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, pagination: domain_verification_list_params.Pagination | 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. @@ -184,7 +184,7 @@ def list( def delete( self, *, - domain_verification_id: str | NotGiven = NOT_GIVEN, + domain_verification_id: str, # 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, @@ -219,7 +219,7 @@ def delete( def verify( self, *, - domain_verification_id: str | NotGiven = NOT_GIVEN, + domain_verification_id: str, # 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, @@ -275,8 +275,8 @@ def with_streaming_response(self) -> AsyncDomainVerificationsResourceWithStreami async def create( self, *, - domain: str | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, + domain: str, + organization_id: str, # 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, @@ -314,7 +314,7 @@ async def create( async def retrieve( self, *, - domain_verification_id: str | NotGiven = NOT_GIVEN, + domain_verification_id: str, # 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, @@ -349,9 +349,9 @@ async def retrieve( def list( self, *, + organization_id: str, token: str | NotGiven = NOT_GIVEN, page_size: int | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, pagination: domain_verification_list_params.Pagination | 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. @@ -402,7 +402,7 @@ def list( async def delete( self, *, - domain_verification_id: str | NotGiven = NOT_GIVEN, + domain_verification_id: str, # 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, @@ -437,7 +437,7 @@ async def delete( async def verify( self, *, - domain_verification_id: str | NotGiven = NOT_GIVEN, + domain_verification_id: str, # 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, diff --git a/src/gitpod/resources/organizations/invites.py b/src/gitpod/resources/organizations/invites.py index 131a39b..2c080ce 100644 --- a/src/gitpod/resources/organizations/invites.py +++ b/src/gitpod/resources/organizations/invites.py @@ -49,7 +49,7 @@ def with_streaming_response(self) -> InvitesResourceWithStreamingResponse: def create( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, # 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, @@ -83,7 +83,7 @@ def create( def retrieve( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, # 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, @@ -117,7 +117,7 @@ def retrieve( def get_summary( self, *, - invite_id: str | NotGiven = NOT_GIVEN, + invite_id: str, # 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, @@ -171,7 +171,7 @@ def with_streaming_response(self) -> AsyncInvitesResourceWithStreamingResponse: async def create( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, # 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, @@ -207,7 +207,7 @@ async def create( async def retrieve( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, # 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, @@ -243,7 +243,7 @@ async def retrieve( async def get_summary( self, *, - invite_id: str | NotGiven = NOT_GIVEN, + invite_id: str, # 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, diff --git a/src/gitpod/resources/organizations/organizations.py b/src/gitpod/resources/organizations/organizations.py index 8707b72..b7e0957 100644 --- a/src/gitpod/resources/organizations/organizations.py +++ b/src/gitpod/resources/organizations/organizations.py @@ -105,9 +105,9 @@ def with_streaming_response(self) -> OrganizationsResourceWithStreamingResponse: def create( self, *, + name: str, invite_accounts_with_matching_domain: bool | NotGiven = NOT_GIVEN, join_organization: bool | NotGiven = NOT_GIVEN, - name: 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, @@ -119,14 +119,14 @@ def create( CreateOrganization creates a new Organization. Args: + name: name is the organization name + invite_accounts_with_matching_domain: Should other Accounts with the same domain be automatically invited to the organization? join_organization: join_organization decides whether the Identity issuing this request joins the org on creation - name: name is the organization name - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -139,9 +139,9 @@ def create( "/gitpod.v1.OrganizationService/CreateOrganization", body=maybe_transform( { + "name": name, "invite_accounts_with_matching_domain": invite_accounts_with_matching_domain, "join_organization": join_organization, - "name": name, }, organization_create_params.OrganizationCreateParams, ), @@ -154,7 +154,7 @@ def create( def retrieve( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, # 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, @@ -190,9 +190,9 @@ def retrieve( def update( self, *, + organization_id: str, invite_domains: Optional[InviteDomainsParam] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, - organization_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. extra_headers: Headers | None = None, @@ -204,12 +204,12 @@ def update( UpdateOrganization updates the properties of an Organization. Args: + organization_id: organization_id is the ID of the organization to update the settings for. + invite_domains: invite_domains is the domain allowlist of the organization name: name is the new name of the organization - organization_id: organization_id is the ID of the organization to update the settings for. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -222,9 +222,9 @@ def update( "/gitpod.v1.OrganizationService/UpdateOrganization", body=maybe_transform( { + "organization_id": organization_id, "invite_domains": invite_domains, "name": name, - "organization_id": organization_id, }, organization_update_params.OrganizationUpdateParams, ), @@ -294,7 +294,7 @@ def list( def delete( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, # 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, @@ -373,7 +373,7 @@ def join( def leave( self, *, - user_id: str | NotGiven = NOT_GIVEN, + user_id: str, # 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, @@ -405,9 +405,9 @@ def leave( def list_members( self, *, + organization_id: str, token: str | NotGiven = NOT_GIVEN, page_size: int | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, pagination: organization_list_members_params.Pagination | 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. @@ -462,9 +462,9 @@ def list_members( def set_role( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, + user_id: str, role: OrganizationRole | NotGiven = NOT_GIVEN, - user_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. extra_headers: Headers | None = None, @@ -489,8 +489,8 @@ def set_role( body=maybe_transform( { "organization_id": organization_id, - "role": role, "user_id": user_id, + "role": role, }, organization_set_role_params.OrganizationSetRoleParams, ), @@ -536,9 +536,9 @@ def with_streaming_response(self) -> AsyncOrganizationsResourceWithStreamingResp async def create( self, *, + name: str, invite_accounts_with_matching_domain: bool | NotGiven = NOT_GIVEN, join_organization: bool | NotGiven = NOT_GIVEN, - name: 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, @@ -550,14 +550,14 @@ async def create( CreateOrganization creates a new Organization. Args: + name: name is the organization name + invite_accounts_with_matching_domain: Should other Accounts with the same domain be automatically invited to the organization? join_organization: join_organization decides whether the Identity issuing this request joins the org on creation - name: name is the organization name - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -570,9 +570,9 @@ async def create( "/gitpod.v1.OrganizationService/CreateOrganization", body=await async_maybe_transform( { + "name": name, "invite_accounts_with_matching_domain": invite_accounts_with_matching_domain, "join_organization": join_organization, - "name": name, }, organization_create_params.OrganizationCreateParams, ), @@ -585,7 +585,7 @@ async def create( async def retrieve( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, # 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, @@ -621,9 +621,9 @@ async def retrieve( async def update( self, *, + organization_id: str, invite_domains: Optional[InviteDomainsParam] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, - organization_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. extra_headers: Headers | None = None, @@ -635,12 +635,12 @@ async def update( UpdateOrganization updates the properties of an Organization. Args: + organization_id: organization_id is the ID of the organization to update the settings for. + invite_domains: invite_domains is the domain allowlist of the organization name: name is the new name of the organization - organization_id: organization_id is the ID of the organization to update the settings for. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -653,9 +653,9 @@ async def update( "/gitpod.v1.OrganizationService/UpdateOrganization", body=await async_maybe_transform( { + "organization_id": organization_id, "invite_domains": invite_domains, "name": name, - "organization_id": organization_id, }, organization_update_params.OrganizationUpdateParams, ), @@ -725,7 +725,7 @@ def list( async def delete( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, # 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, @@ -804,7 +804,7 @@ async def join( async def leave( self, *, - user_id: str | NotGiven = NOT_GIVEN, + user_id: str, # 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, @@ -836,9 +836,9 @@ async def leave( def list_members( self, *, + organization_id: str, token: str | NotGiven = NOT_GIVEN, page_size: int | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, pagination: organization_list_members_params.Pagination | 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. @@ -893,9 +893,9 @@ def list_members( async def set_role( self, *, - organization_id: str | NotGiven = NOT_GIVEN, + organization_id: str, + user_id: str, role: OrganizationRole | NotGiven = NOT_GIVEN, - user_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. extra_headers: Headers | None = None, @@ -920,8 +920,8 @@ async def set_role( body=await async_maybe_transform( { "organization_id": organization_id, - "role": role, "user_id": user_id, + "role": role, }, organization_set_role_params.OrganizationSetRoleParams, ), diff --git a/src/gitpod/resources/organizations/sso_configurations.py b/src/gitpod/resources/organizations/sso_configurations.py index ab984fe..57a8010 100644 --- a/src/gitpod/resources/organizations/sso_configurations.py +++ b/src/gitpod/resources/organizations/sso_configurations.py @@ -60,11 +60,11 @@ def with_streaming_response(self) -> SSOConfigurationsResourceWithStreamingRespo def create( self, *, - client_id: str | NotGiven = NOT_GIVEN, - client_secret: str | NotGiven = NOT_GIVEN, - email_domain: str | NotGiven = NOT_GIVEN, - issuer_url: str | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, + client_id: str, + client_secret: str, + email_domain: str, + issuer_url: str, + organization_id: str, # 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, @@ -113,7 +113,7 @@ def create( def retrieve( self, *, - sso_configuration_id: str | NotGiven = NOT_GIVEN, + sso_configuration_id: str, # 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, @@ -150,12 +150,12 @@ def retrieve( def update( self, *, + sso_configuration_id: str, claims: Dict[str, str] | NotGiven = NOT_GIVEN, client_id: Optional[str] | NotGiven = NOT_GIVEN, client_secret: Optional[str] | NotGiven = NOT_GIVEN, email_domain: Optional[str] | NotGiven = NOT_GIVEN, issuer_url: Optional[str] | NotGiven = NOT_GIVEN, - sso_configuration_id: str | NotGiven = NOT_GIVEN, state: Optional[SSOConfigurationState] | 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. @@ -168,6 +168,8 @@ def update( UpdateSSOConfiguration updates the SSO configuration for the organization. Args: + sso_configuration_id: sso_configuration_id is the ID of the SSO configuration to update + claims: claims are key/value pairs that defines a mapping of claims issued by the IdP. client_id: client_id is the client ID of the SSO provider @@ -176,8 +178,6 @@ def update( issuer_url: issuer_url is the URL of the IdP issuer - sso_configuration_id: sso_configuration_id is the ID of the SSO configuration to update - state: state is the state of the SSO configuration extra_headers: Send extra headers @@ -192,12 +192,12 @@ def update( "/gitpod.v1.OrganizationService/UpdateSSOConfiguration", body=maybe_transform( { + "sso_configuration_id": sso_configuration_id, "claims": claims, "client_id": client_id, "client_secret": client_secret, "email_domain": email_domain, "issuer_url": issuer_url, - "sso_configuration_id": sso_configuration_id, "state": state, }, sso_configuration_update_params.SSOConfigurationUpdateParams, @@ -211,9 +211,9 @@ def update( def list( self, *, + organization_id: str, token: str | NotGiven = NOT_GIVEN, page_size: int | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, pagination: sso_configuration_list_params.Pagination | 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. @@ -266,7 +266,7 @@ def list( def delete( self, *, - sso_configuration_id: str | NotGiven = NOT_GIVEN, + sso_configuration_id: str, # 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, @@ -322,11 +322,11 @@ def with_streaming_response(self) -> AsyncSSOConfigurationsResourceWithStreaming async def create( self, *, - client_id: str | NotGiven = NOT_GIVEN, - client_secret: str | NotGiven = NOT_GIVEN, - email_domain: str | NotGiven = NOT_GIVEN, - issuer_url: str | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, + client_id: str, + client_secret: str, + email_domain: str, + issuer_url: str, + organization_id: str, # 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, @@ -375,7 +375,7 @@ async def create( async def retrieve( self, *, - sso_configuration_id: str | NotGiven = NOT_GIVEN, + sso_configuration_id: str, # 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, @@ -412,12 +412,12 @@ async def retrieve( async def update( self, *, + sso_configuration_id: str, claims: Dict[str, str] | NotGiven = NOT_GIVEN, client_id: Optional[str] | NotGiven = NOT_GIVEN, client_secret: Optional[str] | NotGiven = NOT_GIVEN, email_domain: Optional[str] | NotGiven = NOT_GIVEN, issuer_url: Optional[str] | NotGiven = NOT_GIVEN, - sso_configuration_id: str | NotGiven = NOT_GIVEN, state: Optional[SSOConfigurationState] | 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. @@ -430,6 +430,8 @@ async def update( UpdateSSOConfiguration updates the SSO configuration for the organization. Args: + sso_configuration_id: sso_configuration_id is the ID of the SSO configuration to update + claims: claims are key/value pairs that defines a mapping of claims issued by the IdP. client_id: client_id is the client ID of the SSO provider @@ -438,8 +440,6 @@ async def update( issuer_url: issuer_url is the URL of the IdP issuer - sso_configuration_id: sso_configuration_id is the ID of the SSO configuration to update - state: state is the state of the SSO configuration extra_headers: Send extra headers @@ -454,12 +454,12 @@ async def update( "/gitpod.v1.OrganizationService/UpdateSSOConfiguration", body=await async_maybe_transform( { + "sso_configuration_id": sso_configuration_id, "claims": claims, "client_id": client_id, "client_secret": client_secret, "email_domain": email_domain, "issuer_url": issuer_url, - "sso_configuration_id": sso_configuration_id, "state": state, }, sso_configuration_update_params.SSOConfigurationUpdateParams, @@ -473,9 +473,9 @@ async def update( def list( self, *, + organization_id: str, token: str | NotGiven = NOT_GIVEN, page_size: int | NotGiven = NOT_GIVEN, - organization_id: str | NotGiven = NOT_GIVEN, pagination: sso_configuration_list_params.Pagination | 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. @@ -528,7 +528,7 @@ def list( async def delete( self, *, - sso_configuration_id: str | NotGiven = NOT_GIVEN, + sso_configuration_id: str, # 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, diff --git a/src/gitpod/resources/runners/configurations/environment_classes.py b/src/gitpod/resources/runners/configurations/environment_classes.py index 50e5f95..e790fe7 100644 --- a/src/gitpod/resources/runners/configurations/environment_classes.py +++ b/src/gitpod/resources/runners/configurations/environment_classes.py @@ -191,8 +191,8 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncEnvironmentClassesPage[EnvironmentClass]: """ - ListEnvironmentClasses returns all environment classes configured for a runner. - buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ListEnvironmentClasses returns all + environment classes configured for a runner. Args: pagination: pagination contains the pagination options for listing environment classes @@ -389,8 +389,8 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[EnvironmentClass, AsyncEnvironmentClassesPage[EnvironmentClass]]: """ - ListEnvironmentClasses returns all environment classes configured for a runner. - buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE + buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ListEnvironmentClasses returns all + environment classes configured for a runner. Args: pagination: pagination contains the pagination options for listing environment classes diff --git a/src/gitpod/types/account.py b/src/gitpod/types/account.py index 417f6c8..251e6bd 100644 --- a/src/gitpod/types/account.py +++ b/src/gitpod/types/account.py @@ -13,11 +13,9 @@ class Account(BaseModel): - id: Optional[str] = None + id: str - avatar_url: Optional[str] = FieldInfo(alias="avatarUrl", default=None) - - created_at: Optional[datetime] = FieldInfo(alias="createdAt", default=None) + created_at: datetime = FieldInfo(alias="createdAt") """ A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond @@ -109,27 +107,17 @@ class Account(BaseModel): to obtain a formatter capable of generating timestamps in this format. """ - email: Optional[str] = None - - joinables: Optional[List[JoinableOrganization]] = None - - memberships: Optional[List[AccountMembership]] = None - - name: Optional[str] = None + email: str - organization_id: Optional[str] = FieldInfo(alias="organizationId", default=None) - """ - organization_id is the ID of the organization the account is owned by if it's - created through custom SSO - """ + name: str - public_email_provider: Optional[bool] = FieldInfo(alias="publicEmailProvider", default=None) + public_email_provider: bool = FieldInfo(alias="publicEmailProvider") """ public_email_provider is true if the email for the Account matches a known public email provider """ - updated_at: Optional[datetime] = FieldInfo(alias="updatedAt", default=None) + updated_at: datetime = FieldInfo(alias="updatedAt") """ A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond @@ -220,3 +208,15 @@ class Account(BaseModel): [`ISODateTimeFormat.dateTime()`]() to obtain a formatter capable of generating timestamps in this format. """ + + avatar_url: Optional[str] = FieldInfo(alias="avatarUrl", default=None) + + joinables: Optional[List[JoinableOrganization]] = None + + memberships: Optional[List[AccountMembership]] = None + + organization_id: Optional[str] = FieldInfo(alias="organizationId", default=None) + """ + organization_id is the ID of the organization the account is owned by if it's + created through custom SSO + """ diff --git a/src/gitpod/types/account_delete_params.py b/src/gitpod/types/account_delete_params.py index 93e5bf1..a049132 100644 --- a/src/gitpod/types/account_delete_params.py +++ b/src/gitpod/types/account_delete_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -10,4 +10,4 @@ class AccountDeleteParams(TypedDict, total=False): - account_id: Annotated[str, PropertyInfo(alias="accountId")] + account_id: Required[Annotated[str, PropertyInfo(alias="accountId")]] diff --git a/src/gitpod/types/account_get_sso_login_url_params.py b/src/gitpod/types/account_get_sso_login_url_params.py index 7689a8d..4551e59 100644 --- a/src/gitpod/types/account_get_sso_login_url_params.py +++ b/src/gitpod/types/account_get_sso_login_url_params.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Optional -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -11,7 +11,7 @@ class AccountGetSSOLoginURLParams(TypedDict, total=False): - email: str + email: Required[str] """email is the email the user wants to login with""" return_to: Annotated[Optional[str], PropertyInfo(alias="returnTo")] diff --git a/src/gitpod/types/account_get_sso_login_url_response.py b/src/gitpod/types/account_get_sso_login_url_response.py index e0cb613..192a5fc 100644 --- a/src/gitpod/types/account_get_sso_login_url_response.py +++ b/src/gitpod/types/account_get_sso_login_url_response.py @@ -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 @@ -10,5 +9,5 @@ class AccountGetSSOLoginURLResponse(BaseModel): - login_url: Optional[str] = FieldInfo(alias="loginUrl", default=None) + login_url: str = FieldInfo(alias="loginUrl") """login_url is the URL to redirect the user to for SSO login""" diff --git a/src/gitpod/types/account_membership.py b/src/gitpod/types/account_membership.py index c0e606d..cd27512 100644 --- a/src/gitpod/types/account_membership.py +++ b/src/gitpod/types/account_membership.py @@ -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 @@ -11,20 +10,20 @@ class AccountMembership(BaseModel): - organization_id: Optional[str] = FieldInfo(alias="organizationId", default=None) + organization_id: str = FieldInfo(alias="organizationId") """organization_id is the id of the organization the user is a member of""" - organization_member_count: Optional[int] = FieldInfo(alias="organizationMemberCount", default=None) + organization_member_count: int = FieldInfo(alias="organizationMemberCount") """ organization_name is the member count of the organization the user is a member of """ - organization_name: Optional[str] = FieldInfo(alias="organizationName", default=None) + organization_name: str = FieldInfo(alias="organizationName") """organization_name is the name of the organization the user is a member of""" - user_id: Optional[str] = FieldInfo(alias="userId", default=None) + user_id: str = FieldInfo(alias="userId") """user_id is the ID the user has in the organization""" - user_role: Optional[OrganizationRole] = FieldInfo(alias="userRole", default=None) + user_role: OrganizationRole = FieldInfo(alias="userRole") """user_role is the role the user has in the organization""" diff --git a/src/gitpod/types/account_retrieve_response.py b/src/gitpod/types/account_retrieve_response.py index 529e42b..2768a2d 100644 --- a/src/gitpod/types/account_retrieve_response.py +++ b/src/gitpod/types/account_retrieve_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from .account import Account from .._models import BaseModel @@ -9,4 +8,4 @@ class AccountRetrieveResponse(BaseModel): - account: Optional[Account] = None + account: Account diff --git a/src/gitpod/types/editor.py b/src/gitpod/types/editor.py index b5ea9d0..6395cc7 100644 --- a/src/gitpod/types/editor.py +++ b/src/gitpod/types/editor.py @@ -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 @@ -10,16 +9,16 @@ class Editor(BaseModel): - id: Optional[str] = None + id: str - alias: Optional[str] = None + alias: str - icon_url: Optional[str] = FieldInfo(alias="iconUrl", default=None) + icon_url: str = FieldInfo(alias="iconUrl") - installation_instructions: Optional[str] = FieldInfo(alias="installationInstructions", default=None) + installation_instructions: str = FieldInfo(alias="installationInstructions") - name: Optional[str] = None + name: str - short_description: Optional[str] = FieldInfo(alias="shortDescription", default=None) + short_description: str = FieldInfo(alias="shortDescription") - url_template: Optional[str] = FieldInfo(alias="urlTemplate", default=None) + url_template: str = FieldInfo(alias="urlTemplate") diff --git a/src/gitpod/types/editor_resolve_url_params.py b/src/gitpod/types/editor_resolve_url_params.py index a4a34df..de698ba 100644 --- a/src/gitpod/types/editor_resolve_url_params.py +++ b/src/gitpod/types/editor_resolve_url_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -10,11 +10,11 @@ class EditorResolveURLParams(TypedDict, total=False): - editor_id: Annotated[str, PropertyInfo(alias="editorId")] + editor_id: Required[Annotated[str, PropertyInfo(alias="editorId")]] """editorId is the ID of the editor to resolve the URL for""" - environment_id: Annotated[str, PropertyInfo(alias="environmentId")] + environment_id: Required[Annotated[str, PropertyInfo(alias="environmentId")]] """environmentId is the ID of the environment to resolve the URL for""" - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] """organizationId is the ID of the organization to resolve the URL for""" diff --git a/src/gitpod/types/editor_resolve_url_response.py b/src/gitpod/types/editor_resolve_url_response.py index b0ee8eb..f22f8cb 100644 --- a/src/gitpod/types/editor_resolve_url_response.py +++ b/src/gitpod/types/editor_resolve_url_response.py @@ -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 @@ -8,5 +7,5 @@ class EditorResolveURLResponse(BaseModel): - url: Optional[str] = None + url: str """url is the resolved editor URL""" diff --git a/src/gitpod/types/editor_retrieve_params.py b/src/gitpod/types/editor_retrieve_params.py index 9b01102..f9f5194 100644 --- a/src/gitpod/types/editor_retrieve_params.py +++ b/src/gitpod/types/editor_retrieve_params.py @@ -2,11 +2,11 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing_extensions import Required, TypedDict __all__ = ["EditorRetrieveParams"] class EditorRetrieveParams(TypedDict, total=False): - id: str + id: Required[str] """id is the ID of the editor to get""" diff --git a/src/gitpod/types/editor_retrieve_response.py b/src/gitpod/types/editor_retrieve_response.py index 4f962cd..fa5bbe9 100644 --- a/src/gitpod/types/editor_retrieve_response.py +++ b/src/gitpod/types/editor_retrieve_response.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from .editor import Editor from .._models import BaseModel @@ -9,5 +8,5 @@ class EditorRetrieveResponse(BaseModel): - editor: Optional[Editor] = None + editor: Editor """editor contains the editor""" diff --git a/src/gitpod/types/environment_retrieve_params.py b/src/gitpod/types/environment_retrieve_params.py index 7be510e..f470b6c 100644 --- a/src/gitpod/types/environment_retrieve_params.py +++ b/src/gitpod/types/environment_retrieve_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -10,5 +10,5 @@ class EnvironmentRetrieveParams(TypedDict, total=False): - environment_id: Annotated[str, PropertyInfo(alias="environmentId")] + environment_id: Required[Annotated[str, PropertyInfo(alias="environmentId")]] """environment_id specifies the environment to get""" diff --git a/src/gitpod/types/joinable_organization.py b/src/gitpod/types/joinable_organization.py index f2fa957..3368601 100644 --- a/src/gitpod/types/joinable_organization.py +++ b/src/gitpod/types/joinable_organization.py @@ -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 @@ -10,14 +9,14 @@ class JoinableOrganization(BaseModel): - organization_id: Optional[str] = FieldInfo(alias="organizationId", default=None) + organization_id: str = FieldInfo(alias="organizationId") """organization_id is the id of the organization the user can join""" - organization_member_count: Optional[int] = FieldInfo(alias="organizationMemberCount", default=None) + organization_member_count: int = FieldInfo(alias="organizationMemberCount") """ organization_member_count is the member count of the organization the user can join """ - organization_name: Optional[str] = FieldInfo(alias="organizationName", default=None) + organization_name: str = FieldInfo(alias="organizationName") """organization_name is the name of the organization the user can join""" diff --git a/src/gitpod/types/login_provider.py b/src/gitpod/types/login_provider.py index 1a3b194..7ff022b 100644 --- a/src/gitpod/types/login_provider.py +++ b/src/gitpod/types/login_provider.py @@ -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 @@ -10,10 +9,10 @@ class LoginProvider(BaseModel): - login_url: Optional[str] = FieldInfo(alias="loginUrl", default=None) + login_url: str = FieldInfo(alias="loginUrl") """login_url is the URL to redirect the browser agent to for login""" - provider: Optional[str] = None + provider: str """provider is the provider used by this login method, e.g. "github", "google", "custom" diff --git a/src/gitpod/types/organization.py b/src/gitpod/types/organization.py index 4fd832b..4d5eaee 100644 --- a/src/gitpod/types/organization.py +++ b/src/gitpod/types/organization.py @@ -12,9 +12,9 @@ class Organization(BaseModel): - id: Optional[str] = None + id: str - created_at: Optional[datetime] = FieldInfo(alias="createdAt", default=None) + created_at: datetime = FieldInfo(alias="createdAt") """ A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond @@ -106,11 +106,9 @@ class Organization(BaseModel): to obtain a formatter capable of generating timestamps in this format. """ - invite_domains: Optional[InviteDomains] = FieldInfo(alias="inviteDomains", default=None) - - name: Optional[str] = None + name: str - updated_at: Optional[datetime] = FieldInfo(alias="updatedAt", default=None) + updated_at: datetime = FieldInfo(alias="updatedAt") """ A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond @@ -201,3 +199,5 @@ class Organization(BaseModel): [`ISODateTimeFormat.dateTime()`]() to obtain a formatter capable of generating timestamps in this format. """ + + invite_domains: Optional[InviteDomains] = FieldInfo(alias="inviteDomains", default=None) diff --git a/src/gitpod/types/organization_create_params.py b/src/gitpod/types/organization_create_params.py index d31cc89..8251342 100644 --- a/src/gitpod/types/organization_create_params.py +++ b/src/gitpod/types/organization_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -10,6 +10,9 @@ class OrganizationCreateParams(TypedDict, total=False): + name: Required[str] + """name is the organization name""" + invite_accounts_with_matching_domain: Annotated[bool, PropertyInfo(alias="inviteAccountsWithMatchingDomain")] """ Should other Accounts with the same domain be automatically invited to the @@ -21,6 +24,3 @@ class OrganizationCreateParams(TypedDict, total=False): join_organization decides whether the Identity issuing this request joins the org on creation """ - - name: str - """name is the organization name""" diff --git a/src/gitpod/types/organization_create_response.py b/src/gitpod/types/organization_create_response.py index a716cae..51cb8f7 100644 --- a/src/gitpod/types/organization_create_response.py +++ b/src/gitpod/types/organization_create_response.py @@ -10,11 +10,11 @@ class OrganizationCreateResponse(BaseModel): + organization: Organization + """organization is the created organization""" + member: Optional[OrganizationMember] = None """member is the member that joined the org on creation. Only set if specified "join_organization" is "true" in the request. """ - - organization: Optional[Organization] = None - """organization is the created organization""" diff --git a/src/gitpod/types/organization_delete_params.py b/src/gitpod/types/organization_delete_params.py index c391556..8402335 100644 --- a/src/gitpod/types/organization_delete_params.py +++ b/src/gitpod/types/organization_delete_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -10,5 +10,5 @@ class OrganizationDeleteParams(TypedDict, total=False): - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] """organization_id is the ID of the organization to delete""" diff --git a/src/gitpod/types/organization_join_response.py b/src/gitpod/types/organization_join_response.py index 880a93d..f6a4f3d 100644 --- a/src/gitpod/types/organization_join_response.py +++ b/src/gitpod/types/organization_join_response.py @@ -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 .organization_member import OrganizationMember @@ -9,5 +8,5 @@ class OrganizationJoinResponse(BaseModel): - member: Optional[OrganizationMember] = None + member: OrganizationMember """member is the member that was created by joining the organization.""" diff --git a/src/gitpod/types/organization_leave_params.py b/src/gitpod/types/organization_leave_params.py index c2c2993..f875644 100644 --- a/src/gitpod/types/organization_leave_params.py +++ b/src/gitpod/types/organization_leave_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -10,4 +10,4 @@ class OrganizationLeaveParams(TypedDict, total=False): - user_id: Annotated[str, PropertyInfo(alias="userId")] + user_id: Required[Annotated[str, PropertyInfo(alias="userId")]] diff --git a/src/gitpod/types/organization_list_members_params.py b/src/gitpod/types/organization_list_members_params.py index 9c03562..aa85f58 100644 --- a/src/gitpod/types/organization_list_members_params.py +++ b/src/gitpod/types/organization_list_members_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -10,13 +10,13 @@ class OrganizationListMembersParams(TypedDict, total=False): + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + """organization_id is the ID of the organization to list members for""" + token: str page_size: Annotated[int, PropertyInfo(alias="pageSize")] - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] - """organization_id is the ID of the organization to list members for""" - pagination: Pagination """pagination contains the pagination options for listing members""" diff --git a/src/gitpod/types/organization_member.py b/src/gitpod/types/organization_member.py index b1a0109..6745f0b 100644 --- a/src/gitpod/types/organization_member.py +++ b/src/gitpod/types/organization_member.py @@ -13,16 +13,14 @@ class OrganizationMember(BaseModel): - avatar_url: Optional[str] = FieldInfo(alias="avatarUrl", default=None) - - email: Optional[str] = None + email: str - full_name: Optional[str] = FieldInfo(alias="fullName", default=None) + full_name: str = FieldInfo(alias="fullName") - login_provider: Optional[str] = FieldInfo(alias="loginProvider", default=None) + login_provider: str = FieldInfo(alias="loginProvider") """login_provider is the login provider the user uses to sign in""" - member_since: Optional[datetime] = FieldInfo(alias="memberSince", default=None) + member_since: datetime = FieldInfo(alias="memberSince") """ A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond @@ -114,8 +112,10 @@ class OrganizationMember(BaseModel): to obtain a formatter capable of generating timestamps in this format. """ - role: Optional[OrganizationRole] = None + role: OrganizationRole - status: Optional[UserStatus] = None + status: UserStatus - user_id: Optional[str] = FieldInfo(alias="userId", default=None) + user_id: str = FieldInfo(alias="userId") + + avatar_url: Optional[str] = FieldInfo(alias="avatarUrl", default=None) diff --git a/src/gitpod/types/organization_retrieve_params.py b/src/gitpod/types/organization_retrieve_params.py index 6994719..e81f1f3 100644 --- a/src/gitpod/types/organization_retrieve_params.py +++ b/src/gitpod/types/organization_retrieve_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -10,5 +10,5 @@ class OrganizationRetrieveParams(TypedDict, total=False): - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] """organization_id is the unique identifier of the Organization to retreive.""" diff --git a/src/gitpod/types/organization_retrieve_response.py b/src/gitpod/types/organization_retrieve_response.py index 4cb085e..064ba4a 100644 --- a/src/gitpod/types/organization_retrieve_response.py +++ b/src/gitpod/types/organization_retrieve_response.py @@ -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 .organization import Organization @@ -9,5 +8,5 @@ class OrganizationRetrieveResponse(BaseModel): - organization: Optional[Organization] = None + organization: Organization """organization is the requested organization""" diff --git a/src/gitpod/types/organization_set_role_params.py b/src/gitpod/types/organization_set_role_params.py index fd565ec..9c9d4b8 100644 --- a/src/gitpod/types/organization_set_role_params.py +++ b/src/gitpod/types/organization_set_role_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo from .shared.organization_role import OrganizationRole @@ -11,8 +11,8 @@ class OrganizationSetRoleParams(TypedDict, total=False): - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] - role: OrganizationRole + user_id: Required[Annotated[str, PropertyInfo(alias="userId")]] - user_id: Annotated[str, PropertyInfo(alias="userId")] + role: OrganizationRole diff --git a/src/gitpod/types/organization_update_params.py b/src/gitpod/types/organization_update_params.py index 90e4d51..b6018bf 100644 --- a/src/gitpod/types/organization_update_params.py +++ b/src/gitpod/types/organization_update_params.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Optional -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo from .invite_domains_param import InviteDomainsParam @@ -12,11 +12,11 @@ class OrganizationUpdateParams(TypedDict, total=False): + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + """organization_id is the ID of the organization to update the settings for.""" + invite_domains: Annotated[Optional[InviteDomainsParam], PropertyInfo(alias="inviteDomains")] """invite_domains is the domain allowlist of the organization""" name: Optional[str] """name is the new name of the organization""" - - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] - """organization_id is the ID of the organization to update the settings for.""" diff --git a/src/gitpod/types/organization_update_response.py b/src/gitpod/types/organization_update_response.py index fed05e6..f5fcb1b 100644 --- a/src/gitpod/types/organization_update_response.py +++ b/src/gitpod/types/organization_update_response.py @@ -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 .organization import Organization @@ -9,5 +8,5 @@ class OrganizationUpdateResponse(BaseModel): - organization: Optional[Organization] = None + organization: Organization """organization is the updated organization""" diff --git a/src/gitpod/types/organizations/domain_verification.py b/src/gitpod/types/organizations/domain_verification.py index 04d9847..693e613 100644 --- a/src/gitpod/types/organizations/domain_verification.py +++ b/src/gitpod/types/organizations/domain_verification.py @@ -1,6 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional from datetime import datetime from pydantic import Field as FieldInfo @@ -12,15 +11,15 @@ class DomainVerification(BaseModel): - id: Optional[str] = None + id: str - domain: Optional[str] = None + domain: str - organization_id: Optional[str] = FieldInfo(alias="organizationId", default=None) + organization_id: str = FieldInfo(alias="organizationId") - state: Optional[DomainVerificationState] = None + state: DomainVerificationState - verified_at: Optional[datetime] = FieldInfo(alias="verifiedAt", default=None) + verified_at: datetime = FieldInfo(alias="verifiedAt") """ A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond diff --git a/src/gitpod/types/organizations/domain_verification_create_params.py b/src/gitpod/types/organizations/domain_verification_create_params.py index 317c158..cfd882a 100644 --- a/src/gitpod/types/organizations/domain_verification_create_params.py +++ b/src/gitpod/types/organizations/domain_verification_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,6 +10,6 @@ class DomainVerificationCreateParams(TypedDict, total=False): - domain: str + domain: Required[str] - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] diff --git a/src/gitpod/types/organizations/domain_verification_create_response.py b/src/gitpod/types/organizations/domain_verification_create_response.py index c42eb64..548d08a 100644 --- a/src/gitpod/types/organizations/domain_verification_create_response.py +++ b/src/gitpod/types/organizations/domain_verification_create_response.py @@ -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 @@ -11,4 +10,4 @@ class DomainVerificationCreateResponse(BaseModel): - domain_verification: Optional[DomainVerification] = FieldInfo(alias="domainVerification", default=None) + domain_verification: DomainVerification = FieldInfo(alias="domainVerification") diff --git a/src/gitpod/types/organizations/domain_verification_delete_params.py b/src/gitpod/types/organizations/domain_verification_delete_params.py index 15025b9..d8f6a81 100644 --- a/src/gitpod/types/organizations/domain_verification_delete_params.py +++ b/src/gitpod/types/organizations/domain_verification_delete_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,4 +10,4 @@ class DomainVerificationDeleteParams(TypedDict, total=False): - domain_verification_id: Annotated[str, PropertyInfo(alias="domainVerificationId")] + domain_verification_id: Required[Annotated[str, PropertyInfo(alias="domainVerificationId")]] diff --git a/src/gitpod/types/organizations/domain_verification_list_params.py b/src/gitpod/types/organizations/domain_verification_list_params.py index dfa94c2..26573f6 100644 --- a/src/gitpod/types/organizations/domain_verification_list_params.py +++ b/src/gitpod/types/organizations/domain_verification_list_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,12 +10,12 @@ class DomainVerificationListParams(TypedDict, total=False): + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + token: str page_size: Annotated[int, PropertyInfo(alias="pageSize")] - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] - pagination: Pagination diff --git a/src/gitpod/types/organizations/domain_verification_retrieve_params.py b/src/gitpod/types/organizations/domain_verification_retrieve_params.py index c471720..7910e1f 100644 --- a/src/gitpod/types/organizations/domain_verification_retrieve_params.py +++ b/src/gitpod/types/organizations/domain_verification_retrieve_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,4 +10,4 @@ class DomainVerificationRetrieveParams(TypedDict, total=False): - domain_verification_id: Annotated[str, PropertyInfo(alias="domainVerificationId")] + domain_verification_id: Required[Annotated[str, PropertyInfo(alias="domainVerificationId")]] diff --git a/src/gitpod/types/organizations/domain_verification_retrieve_response.py b/src/gitpod/types/organizations/domain_verification_retrieve_response.py index 06d2737..88577d6 100644 --- a/src/gitpod/types/organizations/domain_verification_retrieve_response.py +++ b/src/gitpod/types/organizations/domain_verification_retrieve_response.py @@ -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 @@ -11,4 +10,4 @@ class DomainVerificationRetrieveResponse(BaseModel): - domain_verification: Optional[DomainVerification] = FieldInfo(alias="domainVerification", default=None) + domain_verification: DomainVerification = FieldInfo(alias="domainVerification") diff --git a/src/gitpod/types/organizations/domain_verification_verify_params.py b/src/gitpod/types/organizations/domain_verification_verify_params.py index 7f96c20..1f0c3e8 100644 --- a/src/gitpod/types/organizations/domain_verification_verify_params.py +++ b/src/gitpod/types/organizations/domain_verification_verify_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,4 +10,4 @@ class DomainVerificationVerifyParams(TypedDict, total=False): - domain_verification_id: Annotated[str, PropertyInfo(alias="domainVerificationId")] + domain_verification_id: Required[Annotated[str, PropertyInfo(alias="domainVerificationId")]] diff --git a/src/gitpod/types/organizations/domain_verification_verify_response.py b/src/gitpod/types/organizations/domain_verification_verify_response.py index 91c0053..8d2c649 100644 --- a/src/gitpod/types/organizations/domain_verification_verify_response.py +++ b/src/gitpod/types/organizations/domain_verification_verify_response.py @@ -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 @@ -11,4 +10,4 @@ class DomainVerificationVerifyResponse(BaseModel): - domain_verification: Optional[DomainVerification] = FieldInfo(alias="domainVerification", default=None) + domain_verification: DomainVerification = FieldInfo(alias="domainVerification") diff --git a/src/gitpod/types/organizations/invite_create_params.py b/src/gitpod/types/organizations/invite_create_params.py index 7caa9f4..32455ba 100644 --- a/src/gitpod/types/organizations/invite_create_params.py +++ b/src/gitpod/types/organizations/invite_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,4 +10,4 @@ class InviteCreateParams(TypedDict, total=False): - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] diff --git a/src/gitpod/types/organizations/invite_create_response.py b/src/gitpod/types/organizations/invite_create_response.py index 95c8bd7..36297d0 100644 --- a/src/gitpod/types/organizations/invite_create_response.py +++ b/src/gitpod/types/organizations/invite_create_response.py @@ -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 .organization_invite import OrganizationInvite @@ -9,4 +8,4 @@ class InviteCreateResponse(BaseModel): - invite: Optional[OrganizationInvite] = None + invite: OrganizationInvite diff --git a/src/gitpod/types/organizations/invite_get_summary_params.py b/src/gitpod/types/organizations/invite_get_summary_params.py index 9cbd5c9..5b57656 100644 --- a/src/gitpod/types/organizations/invite_get_summary_params.py +++ b/src/gitpod/types/organizations/invite_get_summary_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,4 +10,4 @@ class InviteGetSummaryParams(TypedDict, total=False): - invite_id: Annotated[str, PropertyInfo(alias="inviteId")] + invite_id: Required[Annotated[str, PropertyInfo(alias="inviteId")]] diff --git a/src/gitpod/types/organizations/invite_get_summary_response.py b/src/gitpod/types/organizations/invite_get_summary_response.py index 16c355a..786ae36 100644 --- a/src/gitpod/types/organizations/invite_get_summary_response.py +++ b/src/gitpod/types/organizations/invite_get_summary_response.py @@ -10,7 +10,7 @@ class InviteGetSummaryResponse(BaseModel): - organization_id: Optional[str] = FieldInfo(alias="organizationId", default=None) + organization_id: str = FieldInfo(alias="organizationId") organization_member_count: Optional[int] = FieldInfo(alias="organizationMemberCount", default=None) diff --git a/src/gitpod/types/organizations/invite_retrieve_params.py b/src/gitpod/types/organizations/invite_retrieve_params.py index 3a6a5fd..a181214 100644 --- a/src/gitpod/types/organizations/invite_retrieve_params.py +++ b/src/gitpod/types/organizations/invite_retrieve_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,4 +10,4 @@ class InviteRetrieveParams(TypedDict, total=False): - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] diff --git a/src/gitpod/types/organizations/invite_retrieve_response.py b/src/gitpod/types/organizations/invite_retrieve_response.py index bbdcdc8..aa4239f 100644 --- a/src/gitpod/types/organizations/invite_retrieve_response.py +++ b/src/gitpod/types/organizations/invite_retrieve_response.py @@ -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 .organization_invite import OrganizationInvite @@ -9,4 +8,4 @@ class InviteRetrieveResponse(BaseModel): - invite: Optional[OrganizationInvite] = None + invite: OrganizationInvite diff --git a/src/gitpod/types/organizations/organization_invite.py b/src/gitpod/types/organizations/organization_invite.py index d31f882..3f8e7f1 100644 --- a/src/gitpod/types/organizations/organization_invite.py +++ b/src/gitpod/types/organizations/organization_invite.py @@ -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 @@ -10,7 +9,7 @@ class OrganizationInvite(BaseModel): - invite_id: Optional[str] = FieldInfo(alias="inviteId", default=None) + invite_id: str = FieldInfo(alias="inviteId") """ invite_id is the unique identifier of the invite to join the organization. Use JoinOrganization with this ID to join the organization. diff --git a/src/gitpod/types/organizations/sso_configuration.py b/src/gitpod/types/organizations/sso_configuration.py index fec9955..c12bf7c 100644 --- a/src/gitpod/types/organizations/sso_configuration.py +++ b/src/gitpod/types/organizations/sso_configuration.py @@ -12,24 +12,24 @@ class SSOConfiguration(BaseModel): - id: Optional[str] = None + id: str """id is the unique identifier of the SSO configuration""" - claims: Optional[Dict[str, str]] = None - """claims are key/value pairs that defines a mapping of claims issued by the IdP.""" - - client_id: Optional[str] = FieldInfo(alias="clientId", default=None) + client_id: str = FieldInfo(alias="clientId") """client_id is the client ID of the OIDC application set on the IdP""" - email_domain: Optional[str] = FieldInfo(alias="emailDomain", default=None) + email_domain: str = FieldInfo(alias="emailDomain") - issuer_url: Optional[str] = FieldInfo(alias="issuerUrl", default=None) + issuer_url: str = FieldInfo(alias="issuerUrl") """issuer_url is the URL of the IdP issuer""" - organization_id: Optional[str] = FieldInfo(alias="organizationId", default=None) + organization_id: str = FieldInfo(alias="organizationId") - provider_type: Optional[ProviderType] = FieldInfo(alias="providerType", default=None) + provider_type: ProviderType = FieldInfo(alias="providerType") """provider_type defines the type of the SSO configuration""" - state: Optional[SSOConfigurationState] = None + state: SSOConfigurationState """state is the state of the SSO configuration""" + + claims: Optional[Dict[str, str]] = None + """claims are key/value pairs that defines a mapping of claims issued by the IdP.""" diff --git a/src/gitpod/types/organizations/sso_configuration_create_params.py b/src/gitpod/types/organizations/sso_configuration_create_params.py index 7257b9b..cd14f5c 100644 --- a/src/gitpod/types/organizations/sso_configuration_create_params.py +++ b/src/gitpod/types/organizations/sso_configuration_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,16 +10,16 @@ class SSOConfigurationCreateParams(TypedDict, total=False): - client_id: Annotated[str, PropertyInfo(alias="clientId")] + client_id: Required[Annotated[str, PropertyInfo(alias="clientId")]] """client_id is the client ID of the OIDC application set on the IdP""" - client_secret: Annotated[str, PropertyInfo(alias="clientSecret")] + client_secret: Required[Annotated[str, PropertyInfo(alias="clientSecret")]] """client_secret is the client secret of the OIDC application set on the IdP""" - email_domain: Annotated[str, PropertyInfo(alias="emailDomain")] + email_domain: Required[Annotated[str, PropertyInfo(alias="emailDomain")]] """email_domain is the domain that is allowed to sign in to the organization""" - issuer_url: Annotated[str, PropertyInfo(alias="issuerUrl")] + issuer_url: Required[Annotated[str, PropertyInfo(alias="issuerUrl")]] """issuer_url is the URL of the IdP issuer""" - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] diff --git a/src/gitpod/types/organizations/sso_configuration_create_response.py b/src/gitpod/types/organizations/sso_configuration_create_response.py index 962038c..0a2da39 100644 --- a/src/gitpod/types/organizations/sso_configuration_create_response.py +++ b/src/gitpod/types/organizations/sso_configuration_create_response.py @@ -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 @@ -11,5 +10,5 @@ class SSOConfigurationCreateResponse(BaseModel): - sso_configuration: Optional[SSOConfiguration] = FieldInfo(alias="ssoConfiguration", default=None) + sso_configuration: SSOConfiguration = FieldInfo(alias="ssoConfiguration") """sso_configuration is the created SSO configuration""" diff --git a/src/gitpod/types/organizations/sso_configuration_delete_params.py b/src/gitpod/types/organizations/sso_configuration_delete_params.py index 889b543..0e3f7b0 100644 --- a/src/gitpod/types/organizations/sso_configuration_delete_params.py +++ b/src/gitpod/types/organizations/sso_configuration_delete_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,4 +10,4 @@ class SSOConfigurationDeleteParams(TypedDict, total=False): - sso_configuration_id: Annotated[str, PropertyInfo(alias="ssoConfigurationId")] + sso_configuration_id: Required[Annotated[str, PropertyInfo(alias="ssoConfigurationId")]] diff --git a/src/gitpod/types/organizations/sso_configuration_list_params.py b/src/gitpod/types/organizations/sso_configuration_list_params.py index 3174a67..1f4b3a6 100644 --- a/src/gitpod/types/organizations/sso_configuration_list_params.py +++ b/src/gitpod/types/organizations/sso_configuration_list_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,13 +10,13 @@ class SSOConfigurationListParams(TypedDict, total=False): + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + """organization_id is the ID of the organization to list SSO configurations for.""" + token: str page_size: Annotated[int, PropertyInfo(alias="pageSize")] - organization_id: Annotated[str, PropertyInfo(alias="organizationId")] - """organization_id is the ID of the organization to list SSO configurations for.""" - pagination: Pagination diff --git a/src/gitpod/types/organizations/sso_configuration_retrieve_params.py b/src/gitpod/types/organizations/sso_configuration_retrieve_params.py index a8afe6e..25aa634 100644 --- a/src/gitpod/types/organizations/sso_configuration_retrieve_params.py +++ b/src/gitpod/types/organizations/sso_configuration_retrieve_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -10,5 +10,5 @@ class SSOConfigurationRetrieveParams(TypedDict, total=False): - sso_configuration_id: Annotated[str, PropertyInfo(alias="ssoConfigurationId")] + sso_configuration_id: Required[Annotated[str, PropertyInfo(alias="ssoConfigurationId")]] """sso_configuration_id is the ID of the SSO configuration to get""" diff --git a/src/gitpod/types/organizations/sso_configuration_retrieve_response.py b/src/gitpod/types/organizations/sso_configuration_retrieve_response.py index 20aa128..9a1da1a 100644 --- a/src/gitpod/types/organizations/sso_configuration_retrieve_response.py +++ b/src/gitpod/types/organizations/sso_configuration_retrieve_response.py @@ -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 @@ -11,5 +10,5 @@ class SSOConfigurationRetrieveResponse(BaseModel): - sso_configuration: Optional[SSOConfiguration] = FieldInfo(alias="ssoConfiguration", default=None) + sso_configuration: SSOConfiguration = FieldInfo(alias="ssoConfiguration") """sso_configuration is the SSO configuration identified by the ID""" diff --git a/src/gitpod/types/organizations/sso_configuration_update_params.py b/src/gitpod/types/organizations/sso_configuration_update_params.py index 129ce2c..4af2dab 100644 --- a/src/gitpod/types/organizations/sso_configuration_update_params.py +++ b/src/gitpod/types/organizations/sso_configuration_update_params.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Dict, Optional -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo from .sso_configuration_state import SSOConfigurationState @@ -12,6 +12,9 @@ class SSOConfigurationUpdateParams(TypedDict, total=False): + sso_configuration_id: Required[Annotated[str, PropertyInfo(alias="ssoConfigurationId")]] + """sso_configuration_id is the ID of the SSO configuration to update""" + claims: Dict[str, str] """claims are key/value pairs that defines a mapping of claims issued by the IdP.""" @@ -26,8 +29,5 @@ class SSOConfigurationUpdateParams(TypedDict, total=False): issuer_url: Annotated[Optional[str], PropertyInfo(alias="issuerUrl")] """issuer_url is the URL of the IdP issuer""" - sso_configuration_id: Annotated[str, PropertyInfo(alias="ssoConfigurationId")] - """sso_configuration_id is the ID of the SSO configuration to update""" - state: Optional[SSOConfigurationState] """state is the state of the SSO configuration""" diff --git a/tests/api_resources/organizations/test_domain_verifications.py b/tests/api_resources/organizations/test_domain_verifications.py index 9a170cf..2b12ebf 100644 --- a/tests/api_resources/organizations/test_domain_verifications.py +++ b/tests/api_resources/organizations/test_domain_verifications.py @@ -26,12 +26,6 @@ class TestDomainVerifications: @pytest.mark.skip() @parametrize def test_method_create(self, client: Gitpod) -> None: - domain_verification = client.organizations.domain_verifications.create() - assert_matches_type(DomainVerificationCreateResponse, domain_verification, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_create_with_all_params(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.create( domain="xxxx", organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -41,7 +35,10 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Gitpod) -> None: - response = client.organizations.domain_verifications.with_raw_response.create() + response = client.organizations.domain_verifications.with_raw_response.create( + domain="xxxx", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -51,7 +48,10 @@ def test_raw_response_create(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: - with client.organizations.domain_verifications.with_streaming_response.create() as response: + with client.organizations.domain_verifications.with_streaming_response.create( + domain="xxxx", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -63,12 +63,6 @@ def test_streaming_response_create(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Gitpod) -> None: - domain_verification = client.organizations.domain_verifications.retrieve() - assert_matches_type(DomainVerificationRetrieveResponse, domain_verification, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.retrieve( domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -77,7 +71,9 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: - response = client.organizations.domain_verifications.with_raw_response.retrieve() + response = client.organizations.domain_verifications.with_raw_response.retrieve( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,7 +83,9 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: - with client.organizations.domain_verifications.with_streaming_response.retrieve() as response: + with client.organizations.domain_verifications.with_streaming_response.retrieve( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -99,16 +97,18 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_list(self, client: Gitpod) -> None: - domain_verification = client.organizations.domain_verifications.list() + domain_verification = client.organizations.domain_verifications.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(SyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", token="token", page_size=0, - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", pagination={ "token": "token", "page_size": 100, @@ -119,7 +119,9 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Gitpod) -> None: - response = client.organizations.domain_verifications.with_raw_response.list() + response = client.organizations.domain_verifications.with_raw_response.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -129,7 +131,9 @@ def test_raw_response_list(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: - with client.organizations.domain_verifications.with_streaming_response.list() as response: + with client.organizations.domain_verifications.with_streaming_response.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -141,12 +145,6 @@ def test_streaming_response_list(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_delete(self, client: Gitpod) -> None: - domain_verification = client.organizations.domain_verifications.delete() - assert_matches_type(object, domain_verification, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_delete_with_all_params(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.delete( domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -155,7 +153,9 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: - response = client.organizations.domain_verifications.with_raw_response.delete() + response = client.organizations.domain_verifications.with_raw_response.delete( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -165,7 +165,9 @@ def test_raw_response_delete(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: - with client.organizations.domain_verifications.with_streaming_response.delete() as response: + with client.organizations.domain_verifications.with_streaming_response.delete( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -177,12 +179,6 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_verify(self, client: Gitpod) -> None: - domain_verification = client.organizations.domain_verifications.verify() - assert_matches_type(DomainVerificationVerifyResponse, domain_verification, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_verify_with_all_params(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.verify( domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -191,7 +187,9 @@ def test_method_verify_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_verify(self, client: Gitpod) -> None: - response = client.organizations.domain_verifications.with_raw_response.verify() + response = client.organizations.domain_verifications.with_raw_response.verify( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -201,7 +199,9 @@ def test_raw_response_verify(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_verify(self, client: Gitpod) -> None: - with client.organizations.domain_verifications.with_streaming_response.verify() as response: + with client.organizations.domain_verifications.with_streaming_response.verify( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,12 +217,6 @@ class TestAsyncDomainVerifications: @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: - domain_verification = await async_client.organizations.domain_verifications.create() - assert_matches_type(DomainVerificationCreateResponse, domain_verification, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.create( domain="xxxx", organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -232,7 +226,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.domain_verifications.with_raw_response.create() + response = await async_client.organizations.domain_verifications.with_raw_response.create( + domain="xxxx", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -242,7 +239,10 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.domain_verifications.with_streaming_response.create() as response: + async with async_client.organizations.domain_verifications.with_streaming_response.create( + domain="xxxx", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -254,12 +254,6 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: - domain_verification = await async_client.organizations.domain_verifications.retrieve() - assert_matches_type(DomainVerificationRetrieveResponse, domain_verification, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.retrieve( domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -268,7 +262,9 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.domain_verifications.with_raw_response.retrieve() + response = await async_client.organizations.domain_verifications.with_raw_response.retrieve( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -278,7 +274,9 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.domain_verifications.with_streaming_response.retrieve() as response: + async with async_client.organizations.domain_verifications.with_streaming_response.retrieve( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -290,16 +288,18 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: - domain_verification = await async_client.organizations.domain_verifications.list() + domain_verification = await async_client.organizations.domain_verifications.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(AsyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", token="token", page_size=0, - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", pagination={ "token": "token", "page_size": 100, @@ -310,7 +310,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.domain_verifications.with_raw_response.list() + response = await async_client.organizations.domain_verifications.with_raw_response.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -320,7 +322,9 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.domain_verifications.with_streaming_response.list() as response: + async with async_client.organizations.domain_verifications.with_streaming_response.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -334,12 +338,6 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: - domain_verification = await async_client.organizations.domain_verifications.delete() - assert_matches_type(object, domain_verification, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.delete( domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -348,7 +346,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.domain_verifications.with_raw_response.delete() + response = await async_client.organizations.domain_verifications.with_raw_response.delete( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -358,7 +358,9 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.domain_verifications.with_streaming_response.delete() as response: + async with async_client.organizations.domain_verifications.with_streaming_response.delete( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -370,12 +372,6 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non @pytest.mark.skip() @parametrize async def test_method_verify(self, async_client: AsyncGitpod) -> None: - domain_verification = await async_client.organizations.domain_verifications.verify() - assert_matches_type(DomainVerificationVerifyResponse, domain_verification, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_verify_with_all_params(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.verify( domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -384,7 +380,9 @@ async def test_method_verify_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_verify(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.domain_verifications.with_raw_response.verify() + response = await async_client.organizations.domain_verifications.with_raw_response.verify( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -394,7 +392,9 @@ async def test_raw_response_verify(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_verify(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.domain_verifications.with_streaming_response.verify() as response: + async with async_client.organizations.domain_verifications.with_streaming_response.verify( + domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/organizations/test_invites.py b/tests/api_resources/organizations/test_invites.py index b158bc4..2b426d6 100644 --- a/tests/api_resources/organizations/test_invites.py +++ b/tests/api_resources/organizations/test_invites.py @@ -24,12 +24,6 @@ class TestInvites: @pytest.mark.skip() @parametrize def test_method_create(self, client: Gitpod) -> None: - invite = client.organizations.invites.create() - assert_matches_type(InviteCreateResponse, invite, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_create_with_all_params(self, client: Gitpod) -> None: invite = client.organizations.invites.create( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -38,7 +32,9 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Gitpod) -> None: - response = client.organizations.invites.with_raw_response.create() + response = client.organizations.invites.with_raw_response.create( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -48,7 +44,9 @@ def test_raw_response_create(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: - with client.organizations.invites.with_streaming_response.create() as response: + with client.organizations.invites.with_streaming_response.create( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,12 +58,6 @@ def test_streaming_response_create(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Gitpod) -> None: - invite = client.organizations.invites.retrieve() - assert_matches_type(InviteRetrieveResponse, invite, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: invite = client.organizations.invites.retrieve( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -74,7 +66,9 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: - response = client.organizations.invites.with_raw_response.retrieve() + response = client.organizations.invites.with_raw_response.retrieve( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -84,7 +78,9 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: - with client.organizations.invites.with_streaming_response.retrieve() as response: + with client.organizations.invites.with_streaming_response.retrieve( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -96,12 +92,6 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_get_summary(self, client: Gitpod) -> None: - invite = client.organizations.invites.get_summary() - assert_matches_type(InviteGetSummaryResponse, invite, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_get_summary_with_all_params(self, client: Gitpod) -> None: invite = client.organizations.invites.get_summary( invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -110,7 +100,9 @@ def test_method_get_summary_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_get_summary(self, client: Gitpod) -> None: - response = client.organizations.invites.with_raw_response.get_summary() + response = client.organizations.invites.with_raw_response.get_summary( + invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -120,7 +112,9 @@ def test_raw_response_get_summary(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_get_summary(self, client: Gitpod) -> None: - with client.organizations.invites.with_streaming_response.get_summary() as response: + with client.organizations.invites.with_streaming_response.get_summary( + invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -136,12 +130,6 @@ class TestAsyncInvites: @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: - invite = await async_client.organizations.invites.create() - assert_matches_type(InviteCreateResponse, invite, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: invite = await async_client.organizations.invites.create( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -150,7 +138,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.invites.with_raw_response.create() + response = await async_client.organizations.invites.with_raw_response.create( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -160,7 +150,9 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.invites.with_streaming_response.create() as response: + async with async_client.organizations.invites.with_streaming_response.create( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -172,12 +164,6 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: - invite = await async_client.organizations.invites.retrieve() - assert_matches_type(InviteRetrieveResponse, invite, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: invite = await async_client.organizations.invites.retrieve( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -186,7 +172,9 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.invites.with_raw_response.retrieve() + response = await async_client.organizations.invites.with_raw_response.retrieve( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -196,7 +184,9 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.invites.with_streaming_response.retrieve() as response: + async with async_client.organizations.invites.with_streaming_response.retrieve( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -208,12 +198,6 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @pytest.mark.skip() @parametrize async def test_method_get_summary(self, async_client: AsyncGitpod) -> None: - invite = await async_client.organizations.invites.get_summary() - assert_matches_type(InviteGetSummaryResponse, invite, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_get_summary_with_all_params(self, async_client: AsyncGitpod) -> None: invite = await async_client.organizations.invites.get_summary( invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -222,7 +206,9 @@ async def test_method_get_summary_with_all_params(self, async_client: AsyncGitpo @pytest.mark.skip() @parametrize async def test_raw_response_get_summary(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.invites.with_raw_response.get_summary() + response = await async_client.organizations.invites.with_raw_response.get_summary( + invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -232,7 +218,9 @@ async def test_raw_response_get_summary(self, async_client: AsyncGitpod) -> None @pytest.mark.skip() @parametrize async def test_streaming_response_get_summary(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.invites.with_streaming_response.get_summary() as response: + async with async_client.organizations.invites.with_streaming_response.get_summary( + invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/organizations/test_sso_configurations.py b/tests/api_resources/organizations/test_sso_configurations.py index c8f45ad..09f440f 100644 --- a/tests/api_resources/organizations/test_sso_configurations.py +++ b/tests/api_resources/organizations/test_sso_configurations.py @@ -25,12 +25,6 @@ class TestSSOConfigurations: @pytest.mark.skip() @parametrize def test_method_create(self, client: Gitpod) -> None: - sso_configuration = client.organizations.sso_configurations.create() - assert_matches_type(SSOConfigurationCreateResponse, sso_configuration, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_create_with_all_params(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.create( client_id="x", client_secret="x", @@ -43,7 +37,13 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Gitpod) -> None: - response = client.organizations.sso_configurations.with_raw_response.create() + response = client.organizations.sso_configurations.with_raw_response.create( + client_id="x", + client_secret="x", + email_domain="xxxx", + issuer_url="https://example.com", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -53,7 +53,13 @@ def test_raw_response_create(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: - with client.organizations.sso_configurations.with_streaming_response.create() as response: + with client.organizations.sso_configurations.with_streaming_response.create( + client_id="x", + client_secret="x", + email_domain="xxxx", + issuer_url="https://example.com", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,12 +71,6 @@ def test_streaming_response_create(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Gitpod) -> None: - sso_configuration = client.organizations.sso_configurations.retrieve() - assert_matches_type(SSOConfigurationRetrieveResponse, sso_configuration, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.retrieve( sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -79,7 +79,9 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: - response = client.organizations.sso_configurations.with_raw_response.retrieve() + response = client.organizations.sso_configurations.with_raw_response.retrieve( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -89,7 +91,9 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: - with client.organizations.sso_configurations.with_streaming_response.retrieve() as response: + with client.organizations.sso_configurations.with_streaming_response.retrieve( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -101,19 +105,21 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_update(self, client: Gitpod) -> None: - sso_configuration = client.organizations.sso_configurations.update() + sso_configuration = client.organizations.sso_configurations.update( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(object, sso_configuration, path=["response"]) @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.update( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", claims={"foo": "string"}, client_id="x", client_secret="x", email_domain="xxxx", issuer_url="https://example.com", - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", state="SSO_CONFIGURATION_STATE_UNSPECIFIED", ) assert_matches_type(object, sso_configuration, path=["response"]) @@ -121,7 +127,9 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Gitpod) -> None: - response = client.organizations.sso_configurations.with_raw_response.update() + response = client.organizations.sso_configurations.with_raw_response.update( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -131,7 +139,9 @@ def test_raw_response_update(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: - with client.organizations.sso_configurations.with_streaming_response.update() as response: + with client.organizations.sso_configurations.with_streaming_response.update( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -143,16 +153,18 @@ def test_streaming_response_update(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_list(self, client: Gitpod) -> None: - sso_configuration = client.organizations.sso_configurations.list() + sso_configuration = client.organizations.sso_configurations.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(SyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) @pytest.mark.skip() @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", token="token", page_size=0, - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", pagination={ "token": "token", "page_size": 100, @@ -163,7 +175,9 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Gitpod) -> None: - response = client.organizations.sso_configurations.with_raw_response.list() + response = client.organizations.sso_configurations.with_raw_response.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -173,7 +187,9 @@ def test_raw_response_list(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: - with client.organizations.sso_configurations.with_streaming_response.list() as response: + with client.organizations.sso_configurations.with_streaming_response.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -185,12 +201,6 @@ def test_streaming_response_list(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_delete(self, client: Gitpod) -> None: - sso_configuration = client.organizations.sso_configurations.delete() - assert_matches_type(object, sso_configuration, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_delete_with_all_params(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.delete( sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -199,7 +209,9 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: - response = client.organizations.sso_configurations.with_raw_response.delete() + response = client.organizations.sso_configurations.with_raw_response.delete( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -209,7 +221,9 @@ def test_raw_response_delete(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: - with client.organizations.sso_configurations.with_streaming_response.delete() as response: + with client.organizations.sso_configurations.with_streaming_response.delete( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -225,12 +239,6 @@ class TestAsyncSSOConfigurations: @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: - sso_configuration = await async_client.organizations.sso_configurations.create() - assert_matches_type(SSOConfigurationCreateResponse, sso_configuration, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.create( client_id="x", client_secret="x", @@ -243,7 +251,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.sso_configurations.with_raw_response.create() + response = await async_client.organizations.sso_configurations.with_raw_response.create( + client_id="x", + client_secret="x", + email_domain="xxxx", + issuer_url="https://example.com", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -253,7 +267,13 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.sso_configurations.with_streaming_response.create() as response: + async with async_client.organizations.sso_configurations.with_streaming_response.create( + client_id="x", + client_secret="x", + email_domain="xxxx", + issuer_url="https://example.com", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -265,12 +285,6 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: - sso_configuration = await async_client.organizations.sso_configurations.retrieve() - assert_matches_type(SSOConfigurationRetrieveResponse, sso_configuration, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.retrieve( sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -279,7 +293,9 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.sso_configurations.with_raw_response.retrieve() + response = await async_client.organizations.sso_configurations.with_raw_response.retrieve( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -289,7 +305,9 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.sso_configurations.with_streaming_response.retrieve() as response: + async with async_client.organizations.sso_configurations.with_streaming_response.retrieve( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -301,19 +319,21 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: - sso_configuration = await async_client.organizations.sso_configurations.update() + sso_configuration = await async_client.organizations.sso_configurations.update( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(object, sso_configuration, path=["response"]) @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.update( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", claims={"foo": "string"}, client_id="x", client_secret="x", email_domain="xxxx", issuer_url="https://example.com", - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", state="SSO_CONFIGURATION_STATE_UNSPECIFIED", ) assert_matches_type(object, sso_configuration, path=["response"]) @@ -321,7 +341,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.sso_configurations.with_raw_response.update() + response = await async_client.organizations.sso_configurations.with_raw_response.update( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -331,7 +353,9 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.sso_configurations.with_streaming_response.update() as response: + async with async_client.organizations.sso_configurations.with_streaming_response.update( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -343,16 +367,18 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non @pytest.mark.skip() @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: - sso_configuration = await async_client.organizations.sso_configurations.list() + sso_configuration = await async_client.organizations.sso_configurations.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(AsyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) @pytest.mark.skip() @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", token="token", page_size=0, - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", pagination={ "token": "token", "page_size": 100, @@ -363,7 +389,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.sso_configurations.with_raw_response.list() + response = await async_client.organizations.sso_configurations.with_raw_response.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -373,7 +401,9 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.sso_configurations.with_streaming_response.list() as response: + async with async_client.organizations.sso_configurations.with_streaming_response.list( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -385,12 +415,6 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: - sso_configuration = await async_client.organizations.sso_configurations.delete() - assert_matches_type(object, sso_configuration, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.delete( sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -399,7 +423,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.sso_configurations.with_raw_response.delete() + response = await async_client.organizations.sso_configurations.with_raw_response.delete( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -409,7 +435,9 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.sso_configurations.with_streaming_response.delete() as response: + async with async_client.organizations.sso_configurations.with_streaming_response.delete( + sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 94b1a9f..c9f4d5a 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -61,12 +61,6 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_delete(self, client: Gitpod) -> None: - account = client.accounts.delete() - assert_matches_type(object, account, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_delete_with_all_params(self, client: Gitpod) -> None: account = client.accounts.delete( account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -75,7 +69,9 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: - response = client.accounts.with_raw_response.delete() + response = client.accounts.with_raw_response.delete( + account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -85,7 +81,9 @@ def test_raw_response_delete(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: - with client.accounts.with_streaming_response.delete() as response: + with client.accounts.with_streaming_response.delete( + account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -97,7 +95,9 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_get_sso_login_url(self, client: Gitpod) -> None: - account = client.accounts.get_sso_login_url() + account = client.accounts.get_sso_login_url( + email="dev@stainlessapi.com", + ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) @pytest.mark.skip() @@ -112,7 +112,9 @@ def test_method_get_sso_login_url_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_get_sso_login_url(self, client: Gitpod) -> None: - response = client.accounts.with_raw_response.get_sso_login_url() + response = client.accounts.with_raw_response.get_sso_login_url( + email="dev@stainlessapi.com", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -122,7 +124,9 @@ def test_raw_response_get_sso_login_url(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_get_sso_login_url(self, client: Gitpod) -> None: - with client.accounts.with_streaming_response.get_sso_login_url() as response: + with client.accounts.with_streaming_response.get_sso_login_url( + email="dev@stainlessapi.com", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -216,12 +220,6 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: - account = await async_client.accounts.delete() - assert_matches_type(object, account, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.delete( account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -230,7 +228,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: - response = await async_client.accounts.with_raw_response.delete() + response = await async_client.accounts.with_raw_response.delete( + account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -240,7 +240,9 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: - async with async_client.accounts.with_streaming_response.delete() as response: + async with async_client.accounts.with_streaming_response.delete( + account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -252,7 +254,9 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non @pytest.mark.skip() @parametrize async def test_method_get_sso_login_url(self, async_client: AsyncGitpod) -> None: - account = await async_client.accounts.get_sso_login_url() + account = await async_client.accounts.get_sso_login_url( + email="dev@stainlessapi.com", + ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) @pytest.mark.skip() @@ -267,7 +271,9 @@ async def test_method_get_sso_login_url_with_all_params(self, async_client: Asyn @pytest.mark.skip() @parametrize async def test_raw_response_get_sso_login_url(self, async_client: AsyncGitpod) -> None: - response = await async_client.accounts.with_raw_response.get_sso_login_url() + response = await async_client.accounts.with_raw_response.get_sso_login_url( + email="dev@stainlessapi.com", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -277,7 +283,9 @@ async def test_raw_response_get_sso_login_url(self, async_client: AsyncGitpod) - @pytest.mark.skip() @parametrize async def test_streaming_response_get_sso_login_url(self, async_client: AsyncGitpod) -> None: - async with async_client.accounts.with_streaming_response.get_sso_login_url() as response: + async with async_client.accounts.with_streaming_response.get_sso_login_url( + email="dev@stainlessapi.com", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_editors.py b/tests/api_resources/test_editors.py index 9ef5526..c8aa524 100644 --- a/tests/api_resources/test_editors.py +++ b/tests/api_resources/test_editors.py @@ -25,12 +25,6 @@ class TestEditors: @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Gitpod) -> None: - editor = client.editors.retrieve() - assert_matches_type(EditorRetrieveResponse, editor, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: editor = client.editors.retrieve( id="id", ) @@ -39,7 +33,9 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: - response = client.editors.with_raw_response.retrieve() + response = client.editors.with_raw_response.retrieve( + id="id", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -49,7 +45,9 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: - with client.editors.with_streaming_response.retrieve() as response: + with client.editors.with_streaming_response.retrieve( + id="id", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -102,12 +100,6 @@ def test_streaming_response_list(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_resolve_url(self, client: Gitpod) -> None: - editor = client.editors.resolve_url() - assert_matches_type(EditorResolveURLResponse, editor, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_resolve_url_with_all_params(self, client: Gitpod) -> None: editor = client.editors.resolve_url( editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -118,7 +110,11 @@ def test_method_resolve_url_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_resolve_url(self, client: Gitpod) -> None: - response = client.editors.with_raw_response.resolve_url() + response = client.editors.with_raw_response.resolve_url( + editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,7 +124,11 @@ def test_raw_response_resolve_url(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_resolve_url(self, client: Gitpod) -> None: - with client.editors.with_streaming_response.resolve_url() as response: + with client.editors.with_streaming_response.resolve_url( + editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -144,12 +144,6 @@ class TestAsyncEditors: @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: - editor = await async_client.editors.retrieve() - assert_matches_type(EditorRetrieveResponse, editor, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: editor = await async_client.editors.retrieve( id="id", ) @@ -158,7 +152,9 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: - response = await async_client.editors.with_raw_response.retrieve() + response = await async_client.editors.with_raw_response.retrieve( + id="id", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -168,7 +164,9 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: - async with async_client.editors.with_streaming_response.retrieve() as response: + async with async_client.editors.with_streaming_response.retrieve( + id="id", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,12 +219,6 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_method_resolve_url(self, async_client: AsyncGitpod) -> None: - editor = await async_client.editors.resolve_url() - assert_matches_type(EditorResolveURLResponse, editor, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_resolve_url_with_all_params(self, async_client: AsyncGitpod) -> None: editor = await async_client.editors.resolve_url( editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -237,7 +229,11 @@ async def test_method_resolve_url_with_all_params(self, async_client: AsyncGitpo @pytest.mark.skip() @parametrize async def test_raw_response_resolve_url(self, async_client: AsyncGitpod) -> None: - response = await async_client.editors.with_raw_response.resolve_url() + response = await async_client.editors.with_raw_response.resolve_url( + editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -247,7 +243,11 @@ async def test_raw_response_resolve_url(self, async_client: AsyncGitpod) -> None @pytest.mark.skip() @parametrize async def test_streaming_response_resolve_url(self, async_client: AsyncGitpod) -> None: - async with async_client.editors.with_streaming_response.resolve_url() as response: + async with async_client.editors.with_streaming_response.resolve_url( + editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_environments.py b/tests/api_resources/test_environments.py index 811daf8..3441d9f 100644 --- a/tests/api_resources/test_environments.py +++ b/tests/api_resources/test_environments.py @@ -66,7 +66,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "session": "session", }, "machine": { - "class": "61000000-0000-0000-0000-000000000000", + "class": "d2c94c27-3b76-4a42-b88c-95a85e392c68", "session": "session", }, "ports": [ @@ -125,21 +125,17 @@ def test_streaming_response_create(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Gitpod) -> None: - environment = client.environments.retrieve() - assert_matches_type(EnvironmentRetrieveResponse, environment, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: environment = client.environments.retrieve( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(EnvironmentRetrieveResponse, environment, path=["response"]) @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: - response = client.environments.with_raw_response.retrieve() + response = client.environments.with_raw_response.retrieve( + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -149,7 +145,9 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: - with client.environments.with_streaming_response.retrieve() as response: + with client.environments.with_streaming_response.retrieve( + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -168,7 +166,7 @@ def test_method_update(self, client: Gitpod) -> None: @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: environment = client.environments.update( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", metadata={}, spec={ "automations_file": { @@ -207,8 +205,8 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ], "ssh_public_keys": [ { - "id": "id", - "value": "value", + "id": "0194b7c1-c954-718d-91a4-9a742aa5fc11", + "value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI...", } ], "timeout": {"disconnected": "+9125115.360s"}, @@ -251,9 +249,9 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: token="token", page_size=0, filter={ - "creator_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "creator_ids": ["f53d2330-3795-4c5d-a1f3-453121af9c60"], "project_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - "runner_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "runner_ids": ["e6aa9c54-89d3-42c1-ac31-bd8d8f1concentrate"], "runner_kinds": ["RUNNER_KIND_UNSPECIFIED"], "status_phases": ["ENVIRONMENT_PHASE_UNSPECIFIED"], }, @@ -296,8 +294,8 @@ def test_method_delete(self, client: Gitpod) -> None: @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: environment = client.environments.delete( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - force=True, + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + force=False, ) assert_matches_type(object, environment, path=["response"]) @@ -333,7 +331,7 @@ def test_method_create_from_project(self, client: Gitpod) -> None: @parametrize def test_method_create_from_project_with_all_params(self, client: Gitpod) -> None: environment = client.environments.create_from_project( - project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + project_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", spec={ "admission": "ADMISSION_LEVEL_UNSPECIFIED", "automations_file": { @@ -365,7 +363,7 @@ def test_method_create_from_project_with_all_params(self, client: Gitpod) -> Non "session": "session", }, "machine": { - "class": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "class": "d2c94c27-3b76-4a42-b88c-95a85e392c68", "session": "session", }, "ports": [ @@ -394,7 +392,7 @@ def test_method_create_from_project_with_all_params(self, client: Gitpod) -> Non "value": "value", } ], - "timeout": {"disconnected": "+9125115.360s"}, + "timeout": {"disconnected": "14400s"}, }, ) assert_matches_type(EnvironmentCreateFromProjectResponse, environment, path=["response"]) @@ -431,7 +429,7 @@ def test_method_create_logs_token(self, client: Gitpod) -> None: @parametrize def test_method_create_logs_token_with_all_params(self, client: Gitpod) -> None: environment = client.environments.create_logs_token( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(EnvironmentCreateLogsTokenResponse, environment, path=["response"]) @@ -468,10 +466,10 @@ def test_method_mark_active(self, client: Gitpod) -> None: def test_method_mark_active_with_all_params(self, client: Gitpod) -> None: environment = client.environments.mark_active( activity_signal={ - "source": "xxx", - "timestamp": parse_datetime("2019-12-27T18:11:19.117Z"), + "source": "VS Code", + "timestamp": parse_datetime("2025-02-12T14:30:00Z"), }, - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(object, environment, path=["response"]) @@ -507,7 +505,7 @@ def test_method_start(self, client: Gitpod) -> None: @parametrize def test_method_start_with_all_params(self, client: Gitpod) -> None: environment = client.environments.start( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(object, environment, path=["response"]) @@ -543,7 +541,7 @@ def test_method_stop(self, client: Gitpod) -> None: @parametrize def test_method_stop_with_all_params(self, client: Gitpod) -> None: environment = client.environments.stop( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(object, environment, path=["response"]) @@ -614,7 +612,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "session": "session", }, "machine": { - "class": "61000000-0000-0000-0000-000000000000", + "class": "d2c94c27-3b76-4a42-b88c-95a85e392c68", "session": "session", }, "ports": [ @@ -673,21 +671,17 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: - environment = await async_client.environments.retrieve() - assert_matches_type(EnvironmentRetrieveResponse, environment, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.retrieve( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(EnvironmentRetrieveResponse, environment, path=["response"]) @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: - response = await async_client.environments.with_raw_response.retrieve() + response = await async_client.environments.with_raw_response.retrieve( + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -697,7 +691,9 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: - async with async_client.environments.with_streaming_response.retrieve() as response: + async with async_client.environments.with_streaming_response.retrieve( + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -716,7 +712,7 @@ async def test_method_update(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.update( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", metadata={}, spec={ "automations_file": { @@ -755,8 +751,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ], "ssh_public_keys": [ { - "id": "id", - "value": "value", + "id": "0194b7c1-c954-718d-91a4-9a742aa5fc11", + "value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI...", } ], "timeout": {"disconnected": "+9125115.360s"}, @@ -799,9 +795,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N token="token", page_size=0, filter={ - "creator_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "creator_ids": ["f53d2330-3795-4c5d-a1f3-453121af9c60"], "project_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - "runner_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "runner_ids": ["e6aa9c54-89d3-42c1-ac31-bd8d8f1concentrate"], "runner_kinds": ["RUNNER_KIND_UNSPECIFIED"], "status_phases": ["ENVIRONMENT_PHASE_UNSPECIFIED"], }, @@ -844,8 +840,8 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.delete( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - force=True, + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + force=False, ) assert_matches_type(object, environment, path=["response"]) @@ -881,7 +877,7 @@ async def test_method_create_from_project(self, async_client: AsyncGitpod) -> No @parametrize async def test_method_create_from_project_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.create_from_project( - project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + project_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", spec={ "admission": "ADMISSION_LEVEL_UNSPECIFIED", "automations_file": { @@ -913,7 +909,7 @@ async def test_method_create_from_project_with_all_params(self, async_client: As "session": "session", }, "machine": { - "class": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "class": "d2c94c27-3b76-4a42-b88c-95a85e392c68", "session": "session", }, "ports": [ @@ -942,7 +938,7 @@ async def test_method_create_from_project_with_all_params(self, async_client: As "value": "value", } ], - "timeout": {"disconnected": "+9125115.360s"}, + "timeout": {"disconnected": "14400s"}, }, ) assert_matches_type(EnvironmentCreateFromProjectResponse, environment, path=["response"]) @@ -979,7 +975,7 @@ async def test_method_create_logs_token(self, async_client: AsyncGitpod) -> None @parametrize async def test_method_create_logs_token_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.create_logs_token( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(EnvironmentCreateLogsTokenResponse, environment, path=["response"]) @@ -1016,10 +1012,10 @@ async def test_method_mark_active(self, async_client: AsyncGitpod) -> None: async def test_method_mark_active_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.mark_active( activity_signal={ - "source": "xxx", - "timestamp": parse_datetime("2019-12-27T18:11:19.117Z"), + "source": "VS Code", + "timestamp": parse_datetime("2025-02-12T14:30:00Z"), }, - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(object, environment, path=["response"]) @@ -1055,7 +1051,7 @@ async def test_method_start(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_start_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.start( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(object, environment, path=["response"]) @@ -1091,7 +1087,7 @@ async def test_method_stop(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_stop_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.environments.stop( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(object, environment, path=["response"]) diff --git a/tests/api_resources/test_organizations.py b/tests/api_resources/test_organizations.py index 8dbf451..d869861 100644 --- a/tests/api_resources/test_organizations.py +++ b/tests/api_resources/test_organizations.py @@ -28,23 +28,27 @@ class TestOrganizations: @pytest.mark.skip() @parametrize def test_method_create(self, client: Gitpod) -> None: - organization = client.organizations.create() + organization = client.organizations.create( + name="xxx", + ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) @pytest.mark.skip() @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.create( + name="xxx", invite_accounts_with_matching_domain=True, join_organization=True, - name="xxx", ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) @pytest.mark.skip() @parametrize def test_raw_response_create(self, client: Gitpod) -> None: - response = client.organizations.with_raw_response.create() + response = client.organizations.with_raw_response.create( + name="xxx", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -54,7 +58,9 @@ def test_raw_response_create(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: - with client.organizations.with_streaming_response.create() as response: + with client.organizations.with_streaming_response.create( + name="xxx", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,12 +72,6 @@ def test_streaming_response_create(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_retrieve(self, client: Gitpod) -> None: - organization = client.organizations.retrieve() - assert_matches_type(OrganizationRetrieveResponse, organization, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.retrieve( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -80,7 +80,9 @@ def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: - response = client.organizations.with_raw_response.retrieve() + response = client.organizations.with_raw_response.retrieve( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -90,7 +92,9 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: - with client.organizations.with_streaming_response.retrieve() as response: + with client.organizations.with_streaming_response.retrieve( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -102,23 +106,27 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_update(self, client: Gitpod) -> None: - organization = client.organizations.update() + organization = client.organizations.update( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) @pytest.mark.skip() @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.update( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", invite_domains={"domains": ["sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB"]}, name="name", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) @pytest.mark.skip() @parametrize def test_raw_response_update(self, client: Gitpod) -> None: - response = client.organizations.with_raw_response.update() + response = client.organizations.with_raw_response.update( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,7 +136,9 @@ def test_raw_response_update(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: - with client.organizations.with_streaming_response.update() as response: + with client.organizations.with_streaming_response.update( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -182,12 +192,6 @@ def test_streaming_response_list(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_delete(self, client: Gitpod) -> None: - organization = client.organizations.delete() - assert_matches_type(object, organization, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_delete_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.delete( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -196,7 +200,9 @@ def test_method_delete_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: - response = client.organizations.with_raw_response.delete() + response = client.organizations.with_raw_response.delete( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -206,7 +212,9 @@ def test_raw_response_delete(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: - with client.organizations.with_streaming_response.delete() as response: + with client.organizations.with_streaming_response.delete( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -255,12 +263,6 @@ def test_streaming_response_join(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_leave(self, client: Gitpod) -> None: - organization = client.organizations.leave() - assert_matches_type(object, organization, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_leave_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.leave( user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -269,7 +271,9 @@ def test_method_leave_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_leave(self, client: Gitpod) -> None: - response = client.organizations.with_raw_response.leave() + response = client.organizations.with_raw_response.leave( + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -279,7 +283,9 @@ def test_raw_response_leave(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_leave(self, client: Gitpod) -> None: - with client.organizations.with_streaming_response.leave() as response: + with client.organizations.with_streaming_response.leave( + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -291,16 +297,18 @@ def test_streaming_response_leave(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_list_members(self, client: Gitpod) -> None: - organization = client.organizations.list_members() + organization = client.organizations.list_members( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(SyncMembersPage[OrganizationMember], organization, path=["response"]) @pytest.mark.skip() @parametrize def test_method_list_members_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.list_members( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", token="token", page_size=0, - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", pagination={ "token": "token", "page_size": 100, @@ -311,7 +319,9 @@ def test_method_list_members_with_all_params(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_raw_response_list_members(self, client: Gitpod) -> None: - response = client.organizations.with_raw_response.list_members() + response = client.organizations.with_raw_response.list_members( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -321,7 +331,9 @@ def test_raw_response_list_members(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_list_members(self, client: Gitpod) -> None: - with client.organizations.with_streaming_response.list_members() as response: + with client.organizations.with_streaming_response.list_members( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -333,7 +345,10 @@ def test_streaming_response_list_members(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_method_set_role(self, client: Gitpod) -> None: - organization = client.organizations.set_role() + organization = client.organizations.set_role( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(object, organization, path=["response"]) @pytest.mark.skip() @@ -341,15 +356,18 @@ def test_method_set_role(self, client: Gitpod) -> None: def test_method_set_role_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.set_role( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - role="ORGANIZATION_ROLE_UNSPECIFIED", user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + role="ORGANIZATION_ROLE_UNSPECIFIED", ) assert_matches_type(object, organization, path=["response"]) @pytest.mark.skip() @parametrize def test_raw_response_set_role(self, client: Gitpod) -> None: - response = client.organizations.with_raw_response.set_role() + response = client.organizations.with_raw_response.set_role( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -359,7 +377,10 @@ def test_raw_response_set_role(self, client: Gitpod) -> None: @pytest.mark.skip() @parametrize def test_streaming_response_set_role(self, client: Gitpod) -> None: - with client.organizations.with_streaming_response.set_role() as response: + with client.organizations.with_streaming_response.set_role( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -375,23 +396,27 @@ class TestAsyncOrganizations: @pytest.mark.skip() @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: - organization = await async_client.organizations.create() + organization = await async_client.organizations.create( + name="xxx", + ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) @pytest.mark.skip() @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.create( + name="xxx", invite_accounts_with_matching_domain=True, join_organization=True, - name="xxx", ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) @pytest.mark.skip() @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.with_raw_response.create() + response = await async_client.organizations.with_raw_response.create( + name="xxx", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -401,7 +426,9 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.with_streaming_response.create() as response: + async with async_client.organizations.with_streaming_response.create( + name="xxx", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -413,12 +440,6 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non @pytest.mark.skip() @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: - organization = await async_client.organizations.retrieve() - assert_matches_type(OrganizationRetrieveResponse, organization, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.retrieve( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -427,7 +448,9 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) @pytest.mark.skip() @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.with_raw_response.retrieve() + response = await async_client.organizations.with_raw_response.retrieve( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -437,7 +460,9 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.with_streaming_response.retrieve() as response: + async with async_client.organizations.with_streaming_response.retrieve( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -449,23 +474,27 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: - organization = await async_client.organizations.update() + organization = await async_client.organizations.update( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) @pytest.mark.skip() @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.update( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", invite_domains={"domains": ["sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB"]}, name="name", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) @pytest.mark.skip() @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.with_raw_response.update() + response = await async_client.organizations.with_raw_response.update( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -475,7 +504,9 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.with_streaming_response.update() as response: + async with async_client.organizations.with_streaming_response.update( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -529,12 +560,6 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: - organization = await async_client.organizations.delete() - assert_matches_type(object, organization, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.delete( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -543,7 +568,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.with_raw_response.delete() + response = await async_client.organizations.with_raw_response.delete( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -553,7 +580,9 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.with_streaming_response.delete() as response: + async with async_client.organizations.with_streaming_response.delete( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -602,12 +631,6 @@ async def test_streaming_response_join(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_method_leave(self, async_client: AsyncGitpod) -> None: - organization = await async_client.organizations.leave() - assert_matches_type(object, organization, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_leave_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.leave( user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) @@ -616,7 +639,9 @@ async def test_method_leave_with_all_params(self, async_client: AsyncGitpod) -> @pytest.mark.skip() @parametrize async def test_raw_response_leave(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.with_raw_response.leave() + response = await async_client.organizations.with_raw_response.leave( + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -626,7 +651,9 @@ async def test_raw_response_leave(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_leave(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.with_streaming_response.leave() as response: + async with async_client.organizations.with_streaming_response.leave( + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -638,16 +665,18 @@ async def test_streaming_response_leave(self, async_client: AsyncGitpod) -> None @pytest.mark.skip() @parametrize async def test_method_list_members(self, async_client: AsyncGitpod) -> None: - organization = await async_client.organizations.list_members() + organization = await async_client.organizations.list_members( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(AsyncMembersPage[OrganizationMember], organization, path=["response"]) @pytest.mark.skip() @parametrize async def test_method_list_members_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.list_members( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", token="token", page_size=0, - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", pagination={ "token": "token", "page_size": 100, @@ -658,7 +687,9 @@ async def test_method_list_members_with_all_params(self, async_client: AsyncGitp @pytest.mark.skip() @parametrize async def test_raw_response_list_members(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.with_raw_response.list_members() + response = await async_client.organizations.with_raw_response.list_members( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -668,7 +699,9 @@ async def test_raw_response_list_members(self, async_client: AsyncGitpod) -> Non @pytest.mark.skip() @parametrize async def test_streaming_response_list_members(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.with_streaming_response.list_members() as response: + async with async_client.organizations.with_streaming_response.list_members( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -680,7 +713,10 @@ async def test_streaming_response_list_members(self, async_client: AsyncGitpod) @pytest.mark.skip() @parametrize async def test_method_set_role(self, async_client: AsyncGitpod) -> None: - organization = await async_client.organizations.set_role() + organization = await async_client.organizations.set_role( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert_matches_type(object, organization, path=["response"]) @pytest.mark.skip() @@ -688,15 +724,18 @@ async def test_method_set_role(self, async_client: AsyncGitpod) -> None: async def test_method_set_role_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.set_role( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - role="ORGANIZATION_ROLE_UNSPECIFIED", user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + role="ORGANIZATION_ROLE_UNSPECIFIED", ) assert_matches_type(object, organization, path=["response"]) @pytest.mark.skip() @parametrize async def test_raw_response_set_role(self, async_client: AsyncGitpod) -> None: - response = await async_client.organizations.with_raw_response.set_role() + response = await async_client.organizations.with_raw_response.set_role( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -706,7 +745,10 @@ async def test_raw_response_set_role(self, async_client: AsyncGitpod) -> None: @pytest.mark.skip() @parametrize async def test_streaming_response_set_role(self, async_client: AsyncGitpod) -> None: - async with async_client.organizations.with_streaming_response.set_role() as response: + async with async_client.organizations.with_streaming_response.set_role( + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/test_client.py b/tests/test_client.py index 10ecf0c..c3fd3ca 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -23,10 +23,12 @@ from gitpod import Gitpod, AsyncGitpod, APIResponseValidationError from gitpod._types import Omit +from gitpod._utils import maybe_transform from gitpod._models import BaseModel, FinalRequestOptions from gitpod._constants import RAW_RESPONSE_HEADER from gitpod._exceptions import GitpodError, APIStatusError, APITimeoutError, APIResponseValidationError from gitpod._base_client import DEFAULT_TIMEOUT, HTTPX_DEFAULT_TIMEOUT, BaseClient, make_request_options +from gitpod.types.identity_get_authenticated_identity_params import IdentityGetAuthenticatedIdentityParams from .utils import update_env @@ -735,14 +737,14 @@ def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str @mock.patch("gitpod._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock( + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock( side_effect=httpx.TimeoutException("Test timeout error") ) with pytest.raises(APITimeoutError): self.client.post( - "/gitpod.v1.RunnerService/CreateRunner", - body=cast(object, dict()), + "/gitpod.v1.IdentityService/GetAuthenticatedIdentity", + body=cast(object, maybe_transform({}, IdentityGetAuthenticatedIdentityParams)), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -752,12 +754,12 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No @mock.patch("gitpod._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock(return_value=httpx.Response(500)) + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): self.client.post( - "/gitpod.v1.RunnerService/CreateRunner", - body=cast(object, dict()), + "/gitpod.v1.IdentityService/GetAuthenticatedIdentity", + body=cast(object, maybe_transform({}, IdentityGetAuthenticatedIdentityParams)), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -788,9 +790,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock(side_effect=retry_handler) + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(side_effect=retry_handler) - response = client.runners.with_raw_response.create() + response = client.identity.with_raw_response.get_authenticated_identity() assert response.retries_taken == failures_before_success assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success @@ -812,9 +814,11 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock(side_effect=retry_handler) + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(side_effect=retry_handler) - response = client.runners.with_raw_response.create(extra_headers={"x-stainless-retry-count": Omit()}) + response = client.identity.with_raw_response.get_authenticated_identity( + extra_headers={"x-stainless-retry-count": Omit()} + ) assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0 @@ -835,9 +839,11 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock(side_effect=retry_handler) + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(side_effect=retry_handler) - response = client.runners.with_raw_response.create(extra_headers={"x-stainless-retry-count": "42"}) + response = client.identity.with_raw_response.get_authenticated_identity( + extra_headers={"x-stainless-retry-count": "42"} + ) assert response.http_request.headers.get("x-stainless-retry-count") == "42" @@ -1531,14 +1537,14 @@ async def test_parse_retry_after_header(self, remaining_retries: int, retry_afte @mock.patch("gitpod._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock( + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock( side_effect=httpx.TimeoutException("Test timeout error") ) with pytest.raises(APITimeoutError): await self.client.post( - "/gitpod.v1.RunnerService/CreateRunner", - body=cast(object, dict()), + "/gitpod.v1.IdentityService/GetAuthenticatedIdentity", + body=cast(object, maybe_transform({}, IdentityGetAuthenticatedIdentityParams)), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -1548,12 +1554,12 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) @mock.patch("gitpod._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock(return_value=httpx.Response(500)) + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): await self.client.post( - "/gitpod.v1.RunnerService/CreateRunner", - body=cast(object, dict()), + "/gitpod.v1.IdentityService/GetAuthenticatedIdentity", + body=cast(object, maybe_transform({}, IdentityGetAuthenticatedIdentityParams)), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -1585,9 +1591,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock(side_effect=retry_handler) + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(side_effect=retry_handler) - response = await client.runners.with_raw_response.create() + response = await client.identity.with_raw_response.get_authenticated_identity() assert response.retries_taken == failures_before_success assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success @@ -1610,9 +1616,11 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock(side_effect=retry_handler) + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(side_effect=retry_handler) - response = await client.runners.with_raw_response.create(extra_headers={"x-stainless-retry-count": Omit()}) + response = await client.identity.with_raw_response.get_authenticated_identity( + extra_headers={"x-stainless-retry-count": Omit()} + ) assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0 @@ -1634,9 +1642,11 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/gitpod.v1.RunnerService/CreateRunner").mock(side_effect=retry_handler) + respx_mock.post("/gitpod.v1.IdentityService/GetAuthenticatedIdentity").mock(side_effect=retry_handler) - response = await client.runners.with_raw_response.create(extra_headers={"x-stainless-retry-count": "42"}) + response = await client.identity.with_raw_response.get_authenticated_identity( + extra_headers={"x-stainless-retry-count": "42"} + ) assert response.http_request.headers.get("x-stainless-retry-count") == "42"