diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4c5a1a0..a43290c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.3" + ".": "0.1.4" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index df3a2f0..296014e 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-0c37e687e2a070abfe49501156af6d906ff166b6eaad779ee6c2b568515f2b7e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f6598ab5d6827f66b642201769e92590ea32af84ebbf24b18cc32b33dee5107e.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index f3fe7e9..c28ce87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.4 (2025-02-18) + +Full Changelog: [v0.1.3...v0.1.4](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.3...v0.1.4) + +### Features + +* **api:** manual updates ([#46](https://github.com/gitpod-io/gitpod-sdk-python/issues/46)) ([50e6697](https://github.com/gitpod-io/gitpod-sdk-python/commit/50e669758fceea61ffd62bd0e463f9b588c11000)) + ## 0.1.3 (2025-02-14) Full Changelog: [v0.1.2...v0.1.3](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.2...v0.1.3) diff --git a/pyproject.toml b/pyproject.toml index c1a5709..a4130df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gitpod-sdk" -version = "0.1.3" +version = "0.1.4" description = "The official Python library for the gitpod API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/gitpod/_version.py b/src/gitpod/_version.py index a4b0bd6..1540254 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.3" # x-release-please-version +__version__ = "0.1.4" # x-release-please-version diff --git a/src/gitpod/resources/accounts.py b/src/gitpod/resources/accounts.py index aa8d501..7f3c4f7 100644 --- a/src/gitpod/resources/accounts.py +++ b/src/gitpod/resources/accounts.py @@ -66,7 +66,24 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountRetrieveResponse: """ - GetAccount retrieves a single Account. + Gets information about the currently authenticated account. + + Use this method to: + + - Retrieve account profile information + - Check organization memberships + - View account settings + - Get joinable organizations + + ### Examples + + - Get account details: + + Retrieves information about the authenticated account. + + ```yaml + {} + ``` Args: extra_headers: Send extra headers @@ -97,10 +114,26 @@ def delete( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """DeleteAccount deletes an Account. + """ + Deletes an account permanently. + + Use this method to: - To Delete an Account, the Account must not be - an active member of any Organization. + - Remove unused accounts + - Clean up test accounts + - Complete account deletion requests + + The account must not be an active member of any organization. + + ### Examples + + - Delete account: + + Permanently removes an account. + + ```yaml + accountId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + ``` Args: extra_headers: Send extra headers @@ -133,7 +166,32 @@ def get_sso_login_url( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountGetSSOLoginURLResponse: """ - GetSSOLoginURL returns the URL to redirect the user to for SSO login. + Gets the SSO login URL for a specific email domain. + + Use this method to: + + - Initiate SSO authentication + - Get organization-specific login URLs + - Handle SSO redirects + + ### Examples + + - Get login URL: + + Retrieves SSO URL for email domain. + + ```yaml + email: "user@company.com" + ``` + + - Get URL with return path: + + Gets SSO URL with specific return location. + + ```yaml + email: "user@company.com" + returnTo: "https://gitpod.io/workspaces" + ``` Args: email: email is the email the user wants to login with @@ -178,8 +236,35 @@ def list_login_providers( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncLoginProvidersPage[LoginProvider]: """ - ListLoginProviders returns the list of login providers matching the provided - filters. + Lists available login providers with optional filtering. + + Use this method to: + + - View supported authentication methods + - Get provider-specific login URLs + - Filter providers by invite + + ### Examples + + - List all providers: + + Shows all available login providers. + + ```yaml + pagination: + pageSize: 20 + ``` + + - List for specific invite: + + Shows providers available for an invite. + + ```yaml + filter: + inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + pagination: + pageSize: 20 + ``` Args: filter: filter contains the filter options for listing login methods @@ -254,7 +339,24 @@ async def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountRetrieveResponse: """ - GetAccount retrieves a single Account. + Gets information about the currently authenticated account. + + Use this method to: + + - Retrieve account profile information + - Check organization memberships + - View account settings + - Get joinable organizations + + ### Examples + + - Get account details: + + Retrieves information about the authenticated account. + + ```yaml + {} + ``` Args: extra_headers: Send extra headers @@ -285,10 +387,26 @@ async def delete( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """DeleteAccount deletes an Account. + """ + Deletes an account permanently. + + Use this method to: - To Delete an Account, the Account must not be - an active member of any Organization. + - Remove unused accounts + - Clean up test accounts + - Complete account deletion requests + + The account must not be an active member of any organization. + + ### Examples + + - Delete account: + + Permanently removes an account. + + ```yaml + accountId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + ``` Args: extra_headers: Send extra headers @@ -321,7 +439,32 @@ async def get_sso_login_url( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountGetSSOLoginURLResponse: """ - GetSSOLoginURL returns the URL to redirect the user to for SSO login. + Gets the SSO login URL for a specific email domain. + + Use this method to: + + - Initiate SSO authentication + - Get organization-specific login URLs + - Handle SSO redirects + + ### Examples + + - Get login URL: + + Retrieves SSO URL for email domain. + + ```yaml + email: "user@company.com" + ``` + + - Get URL with return path: + + Gets SSO URL with specific return location. + + ```yaml + email: "user@company.com" + returnTo: "https://gitpod.io/workspaces" + ``` Args: email: email is the email the user wants to login with @@ -366,8 +509,35 @@ def list_login_providers( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[LoginProvider, AsyncLoginProvidersPage[LoginProvider]]: """ - ListLoginProviders returns the list of login providers matching the provided - filters. + Lists available login providers with optional filtering. + + Use this method to: + + - View supported authentication methods + - Get provider-specific login URLs + - Filter providers by invite + + ### Examples + + - List all providers: + + Shows all available login providers. + + ```yaml + pagination: + pageSize: 20 + ``` + + - List for specific invite: + + Shows providers available for an invite. + + ```yaml + filter: + inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + pagination: + pageSize: 20 + ``` Args: filter: filter contains the filter options for listing login methods diff --git a/src/gitpod/resources/editors.py b/src/gitpod/resources/editors.py index 78e0ba2..3ea08ba 100644 --- a/src/gitpod/resources/editors.py +++ b/src/gitpod/resources/editors.py @@ -59,7 +59,22 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EditorRetrieveResponse: """ - GetEditor returns the editor with the given ID + Gets details about a specific editor. + + Use this method to: + + - View editor information + - Get editor configuration + + ### Examples + + - Get editor details: + + Retrieves information about a specific editor. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: id: id is the ID of the editor to get @@ -95,7 +110,25 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncEditorsPage[Editor]: """ - ListEditors lists all editors available to the caller + Lists all available code editors. + + Use this method to: + + - View supported editors + - Get editor capabilities + - Browse editor options + - Check editor availability + + ### Examples + + - List editors: + + Shows all available editors with pagination. + + ```yaml + pagination: + pageSize: 20 + ``` Args: pagination: pagination contains the pagination options for listing environments @@ -143,7 +176,26 @@ def resolve_url( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EditorResolveURLResponse: """ - ResolveEditorURL resolves the editor's URL for an environment + Resolves the URL for accessing an editor in a specific environment. + + Use this method to: + + - Get editor access URLs + - Launch editors for environments + - Set up editor connections + - Configure editor access + + ### Examples + + - Resolve editor URL: + + Gets the URL for accessing an editor in an environment. + + ```yaml + editorId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` Args: editor_id: editorId is the ID of the editor to resolve the URL for @@ -209,7 +261,22 @@ async def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EditorRetrieveResponse: """ - GetEditor returns the editor with the given ID + Gets details about a specific editor. + + Use this method to: + + - View editor information + - Get editor configuration + + ### Examples + + - Get editor details: + + Retrieves information about a specific editor. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: id: id is the ID of the editor to get @@ -245,7 +312,25 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Editor, AsyncEditorsPage[Editor]]: """ - ListEditors lists all editors available to the caller + Lists all available code editors. + + Use this method to: + + - View supported editors + - Get editor capabilities + - Browse editor options + - Check editor availability + + ### Examples + + - List editors: + + Shows all available editors with pagination. + + ```yaml + pagination: + pageSize: 20 + ``` Args: pagination: pagination contains the pagination options for listing environments @@ -293,7 +378,26 @@ async def resolve_url( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EditorResolveURLResponse: """ - ResolveEditorURL resolves the editor's URL for an environment + Resolves the URL for accessing an editor in a specific environment. + + Use this method to: + + - Get editor access URLs + - Launch editors for environments + - Set up editor connections + - Configure editor access + + ### Examples + + - Resolve editor URL: + + Gets the URL for accessing an editor in an environment. + + ```yaml + editorId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` Args: editor_id: editorId is the ID of the editor to resolve the URL for diff --git a/src/gitpod/resources/environments/automations/automations.py b/src/gitpod/resources/environments/automations/automations.py index 16cacc4..d7816c3 100644 --- a/src/gitpod/resources/environments/automations/automations.py +++ b/src/gitpod/resources/environments/automations/automations.py @@ -82,7 +82,40 @@ def upsert( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AutomationUpsertResponse: """ - UpsertAutomationsFile upserts the automations file for the given environment. + Upserts the automations file for the given environment. + + Use this method to: + + - Configure environment automations + - Update automation settings + - Manage automation files + + ### Examples + + - Update automations file: + + Updates or creates the automations configuration. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + automationsFile: + services: + web-server: + name: "Web Server" + description: "Development web server" + commands: + start: "npm run dev" + ready: "curl -s http://localhost:3000" + triggeredBy: + - postDevcontainerStart + tasks: + build: + name: "Build Project" + description: "Builds the project artifacts" + command: "npm run build" + triggeredBy: + - postEnvironmentStart + ``` Args: automations_file: WARN: Do not remove any field here, as it will break reading automation yaml @@ -155,7 +188,40 @@ async def upsert( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AutomationUpsertResponse: """ - UpsertAutomationsFile upserts the automations file for the given environment. + Upserts the automations file for the given environment. + + Use this method to: + + - Configure environment automations + - Update automation settings + - Manage automation files + + ### Examples + + - Update automations file: + + Updates or creates the automations configuration. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + automationsFile: + services: + web-server: + name: "Web Server" + description: "Development web server" + commands: + start: "npm run dev" + ready: "curl -s http://localhost:3000" + triggeredBy: + - postDevcontainerStart + tasks: + build: + name: "Build Project" + description: "Builds the project artifacts" + command: "npm run build" + triggeredBy: + - postEnvironmentStart + ``` Args: automations_file: WARN: Do not remove any field here, as it will break reading automation yaml diff --git a/src/gitpod/resources/environments/automations/services.py b/src/gitpod/resources/environments/automations/services.py index 9fe9716..c48e96c 100644 --- a/src/gitpod/resources/environments/automations/services.py +++ b/src/gitpod/resources/environments/automations/services.py @@ -71,7 +71,52 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ServiceCreateResponse: """ - CreateService + Creates a new automation service for an environment. + + Use this method to: + + - Set up long-running services + - Configure service triggers + - Define service dependencies + - Specify runtime environments + + ### Examples + + - Create basic service: + + Creates a simple service with start command. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + metadata: + reference: "web-server" + name: "Web Server" + description: "Runs the development web server" + triggeredBy: + - postDevcontainerStart: true + spec: + commands: + start: "npm run dev" + ready: "curl -s http://localhost:3000" + ``` + + - Create Docker-based service: + + Creates a service running in a specific container. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + metadata: + reference: "redis" + name: "Redis Server" + description: "Redis cache service" + spec: + commands: + start: "redis-server" + runsOn: + docker: + image: "redis:7" + ``` Args: extra_headers: Send extra headers @@ -110,7 +155,24 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ServiceRetrieveResponse: """ - GetService + Gets details about a specific automation service. + + Use this method to: + + - Check service status + - View service configuration + - Monitor service health + - Retrieve service metadata + + ### Examples + + - Get service details: + + Retrieves information about a specific service. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -145,7 +207,41 @@ def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateService + Updates an automation service configuration. + + Use this method to: + + - Modify service commands + - Update triggers + - Change runtime settings + - Adjust dependencies + + ### Examples + + - Update commands: + + Changes service start and ready commands. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + spec: + commands: + start: "npm run start:dev" + ready: "curl -s http://localhost:8080" + ``` + + - Update triggers: + + Modifies when the service starts. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + metadata: + triggeredBy: + trigger: + - postDevcontainerStart: true + - manual: true + ``` Args: spec: Changing the spec of a service is a complex operation. The spec of a service can @@ -196,7 +292,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncServicesPage[Service]: """ - ListServices + Lists automation services with optional filtering. + + Use this method to: + + - View all services in an environment + - Filter services by reference + - Monitor service status + + ### Examples + + - List environment services: + + Shows all services for an environment. + + ```yaml + filter: + environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] + pagination: + pageSize: 20 + ``` + + - Filter by reference: + + Lists services matching specific references. + + ```yaml + filter: + references: ["web-server", "database"] + pagination: + pageSize: 20 + ``` Args: filter: filter contains the filter options for listing services @@ -250,11 +376,37 @@ def delete( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """DeleteService deletes a service. + """Deletes an automation service. This call does not block until the service is deleted. If the service is not stopped it will be stopped before deletion. + Use this method to: + + - Remove unused services + - Clean up service configurations + - Stop and delete services + + ### Examples + + - Delete service: + + Removes a service after stopping it. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + force: false + ``` + + - Force delete: + + Immediately removes a service. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + force: true + ``` + Args: extra_headers: Send extra headers @@ -290,12 +442,28 @@ def start( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """StartService starts a service. + """Starts an automation service. This call does not block until the service is started. This call will not error if the service is already running or has been started. + Use this method to: + + - Start stopped services + - Resume service operations + - Trigger service initialization + + ### Examples + + - Start service: + + Starts a previously stopped service. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + Args: extra_headers: Send extra headers @@ -325,12 +493,28 @@ def stop( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """StopService stops a service. + """Stops an automation service. This call does not block until the service is stopped. This call will not error if the service is already stopped or has been stopped. + Use this method to: + + - Pause service operations + - Gracefully stop services + - Prepare for updates + + ### Examples + + - Stop service: + + Gracefully stops a running service. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + Args: extra_headers: Send extra headers @@ -384,7 +568,52 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ServiceCreateResponse: """ - CreateService + Creates a new automation service for an environment. + + Use this method to: + + - Set up long-running services + - Configure service triggers + - Define service dependencies + - Specify runtime environments + + ### Examples + + - Create basic service: + + Creates a simple service with start command. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + metadata: + reference: "web-server" + name: "Web Server" + description: "Runs the development web server" + triggeredBy: + - postDevcontainerStart: true + spec: + commands: + start: "npm run dev" + ready: "curl -s http://localhost:3000" + ``` + + - Create Docker-based service: + + Creates a service running in a specific container. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + metadata: + reference: "redis" + name: "Redis Server" + description: "Redis cache service" + spec: + commands: + start: "redis-server" + runsOn: + docker: + image: "redis:7" + ``` Args: extra_headers: Send extra headers @@ -423,7 +652,24 @@ async def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ServiceRetrieveResponse: """ - GetService + Gets details about a specific automation service. + + Use this method to: + + - Check service status + - View service configuration + - Monitor service health + - Retrieve service metadata + + ### Examples + + - Get service details: + + Retrieves information about a specific service. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -458,7 +704,41 @@ async def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateService + Updates an automation service configuration. + + Use this method to: + + - Modify service commands + - Update triggers + - Change runtime settings + - Adjust dependencies + + ### Examples + + - Update commands: + + Changes service start and ready commands. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + spec: + commands: + start: "npm run start:dev" + ready: "curl -s http://localhost:8080" + ``` + + - Update triggers: + + Modifies when the service starts. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + metadata: + triggeredBy: + trigger: + - postDevcontainerStart: true + - manual: true + ``` Args: spec: Changing the spec of a service is a complex operation. The spec of a service can @@ -509,7 +789,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Service, AsyncServicesPage[Service]]: """ - ListServices + Lists automation services with optional filtering. + + Use this method to: + + - View all services in an environment + - Filter services by reference + - Monitor service status + + ### Examples + + - List environment services: + + Shows all services for an environment. + + ```yaml + filter: + environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] + pagination: + pageSize: 20 + ``` + + - Filter by reference: + + Lists services matching specific references. + + ```yaml + filter: + references: ["web-server", "database"] + pagination: + pageSize: 20 + ``` Args: filter: filter contains the filter options for listing services @@ -563,11 +873,37 @@ async def delete( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """DeleteService deletes a service. + """Deletes an automation service. This call does not block until the service is deleted. If the service is not stopped it will be stopped before deletion. + Use this method to: + + - Remove unused services + - Clean up service configurations + - Stop and delete services + + ### Examples + + - Delete service: + + Removes a service after stopping it. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + force: false + ``` + + - Force delete: + + Immediately removes a service. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + force: true + ``` + Args: extra_headers: Send extra headers @@ -603,12 +939,28 @@ async def start( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """StartService starts a service. + """Starts an automation service. This call does not block until the service is started. This call will not error if the service is already running or has been started. + Use this method to: + + - Start stopped services + - Resume service operations + - Trigger service initialization + + ### Examples + + - Start service: + + Starts a previously stopped service. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + Args: extra_headers: Send extra headers @@ -638,12 +990,28 @@ async def stop( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: - """StopService stops a service. + """Stops an automation service. This call does not block until the service is stopped. This call will not error if the service is already stopped or has been stopped. + Use this method to: + + - Pause service operations + - Gracefully stop services + - Prepare for updates + + ### Examples + + - Stop service: + + Gracefully stops a running service. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + Args: extra_headers: Send extra headers diff --git a/src/gitpod/resources/environments/automations/tasks/executions.py b/src/gitpod/resources/environments/automations/tasks/executions.py index a2a887e..62181fe 100644 --- a/src/gitpod/resources/environments/automations/tasks/executions.py +++ b/src/gitpod/resources/environments/automations/tasks/executions.py @@ -62,7 +62,24 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ExecutionRetrieveResponse: """ - GetTaskExecution + Gets details about a specific task execution. + + Use this method to: + + - Monitor execution progress + - View execution logs + - Check execution status + - Debug failed executions + + ### Examples + + - Get execution details: + + Retrieves information about a specific task execution. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -97,7 +114,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncTaskExecutionsPage[TaskExecution]: """ - ListTaskExecutions + Lists executions of automation tasks. + + Use this method to: + + - View task execution history + - Monitor running tasks + - Track task completion status + + ### Examples + + - List all executions: + + Shows execution history for all tasks. + + ```yaml + filter: + environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] + pagination: + pageSize: 20 + ``` + + - Filter by phase: + + Lists executions in specific phases. + + ```yaml + filter: + phases: ["TASK_EXECUTION_PHASE_RUNNING", "TASK_EXECUTION_PHASE_FAILED"] + pagination: + pageSize: 20 + ``` Args: filter: filter contains the filter options for listing task runs @@ -151,7 +198,23 @@ def stop( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - StopTaskExecution + Stops a running task execution. + + Use this method to: + + - Cancel long-running tasks + - Stop failed executions + - Interrupt task processing + + ### Examples + + - Stop execution: + + Stops a running task execution. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -204,7 +267,24 @@ async def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ExecutionRetrieveResponse: """ - GetTaskExecution + Gets details about a specific task execution. + + Use this method to: + + - Monitor execution progress + - View execution logs + - Check execution status + - Debug failed executions + + ### Examples + + - Get execution details: + + Retrieves information about a specific task execution. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -239,7 +319,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[TaskExecution, AsyncTaskExecutionsPage[TaskExecution]]: """ - ListTaskExecutions + Lists executions of automation tasks. + + Use this method to: + + - View task execution history + - Monitor running tasks + - Track task completion status + + ### Examples + + - List all executions: + + Shows execution history for all tasks. + + ```yaml + filter: + environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] + pagination: + pageSize: 20 + ``` + + - Filter by phase: + + Lists executions in specific phases. + + ```yaml + filter: + phases: ["TASK_EXECUTION_PHASE_RUNNING", "TASK_EXECUTION_PHASE_FAILED"] + pagination: + pageSize: 20 + ``` Args: filter: filter contains the filter options for listing task runs @@ -293,7 +403,23 @@ async def stop( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - StopTaskExecution + Stops a running task execution. + + Use this method to: + + - Cancel long-running tasks + - Stop failed executions + - Interrupt task processing + + ### Examples + + - Stop execution: + + Stops a running task execution. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers diff --git a/src/gitpod/resources/environments/automations/tasks/tasks.py b/src/gitpod/resources/environments/automations/tasks/tasks.py index 9858163..782b917 100644 --- a/src/gitpod/resources/environments/automations/tasks/tasks.py +++ b/src/gitpod/resources/environments/automations/tasks/tasks.py @@ -86,7 +86,47 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> TaskCreateResponse: """ - CreateTask + Creates a new automation task. + + Use this method to: + + - Define one-off or scheduled tasks + - Set up build or test automation + - Configure task dependencies + - Specify execution environments + + ### Examples + + - Create basic task: + + Creates a simple build task. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + metadata: + reference: "build" + name: "Build Project" + description: "Builds the project artifacts" + triggeredBy: + - postEnvironmentStart: true + spec: + command: "npm run build" + ``` + + - Create task with dependencies: + + Creates a task that depends on other services. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + metadata: + reference: "test" + name: "Run Tests" + description: "Runs the test suite" + spec: + command: "npm test" + dependsOn: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"] + ``` Args: extra_headers: Send extra headers @@ -126,7 +166,23 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> TaskRetrieveResponse: """ - GetTask + Gets details about a specific automation task. + + Use this method to: + + - Check task configuration + - View task dependencies + - Monitor task status + + ### Examples + + - Get task details: + + Retrieves information about a specific task. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -161,7 +217,38 @@ def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateTask + Updates an automation task configuration. + + Use this method to: + + - Modify task commands + - Update task triggers + - Change dependencies + - Adjust execution settings + + ### Examples + + - Update command: + + Changes the task's command. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + spec: + command: "npm run test:coverage" + ``` + + - Update triggers: + + Modifies when the task runs. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + metadata: + triggeredBy: + trigger: + - postEnvironmentStart: true + ``` Args: depends_on: dependencies specifies the IDs of the automations this task depends on. @@ -206,7 +293,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncTasksPage[Task]: """ - ListTasks + Lists automation tasks with optional filtering. + + Use this method to: + + - View all tasks in an environment + - Filter tasks by reference + - Monitor task status + + ### Examples + + - List environment tasks: + + Shows all tasks for an environment. + + ```yaml + filter: + environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] + pagination: + pageSize: 20 + ``` + + - Filter by reference: + + Lists tasks matching specific references. + + ```yaml + filter: + references: ["build", "test"] + pagination: + pageSize: 20 + ``` Args: filter: filter contains the filter options for listing tasks @@ -260,7 +377,23 @@ def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteTask + Deletes an automation task. + + Use this method to: + + - Remove unused tasks + - Clean up task configurations + - Delete obsolete automations + + ### Examples + + - Delete task: + + Removes a task and its configuration. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -291,10 +424,26 @@ def start( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> TaskStartResponse: - """StartTask starts a task, i.e. + """Starts a task by creating a new task execution. + + This call does not block until + the task is started; the task will be started asynchronously. + + Use this method to: + + - Trigger task execution + - Run one-off tasks + - Start scheduled tasks immediately + + ### Examples + + - Start task: + + Creates a new execution of a task. - creates a task execution. This call does not block - until the task is started; the task will be started asynchronously. + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -354,7 +503,47 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> TaskCreateResponse: """ - CreateTask + Creates a new automation task. + + Use this method to: + + - Define one-off or scheduled tasks + - Set up build or test automation + - Configure task dependencies + - Specify execution environments + + ### Examples + + - Create basic task: + + Creates a simple build task. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + metadata: + reference: "build" + name: "Build Project" + description: "Builds the project artifacts" + triggeredBy: + - postEnvironmentStart: true + spec: + command: "npm run build" + ``` + + - Create task with dependencies: + + Creates a task that depends on other services. + + ```yaml + environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" + metadata: + reference: "test" + name: "Run Tests" + description: "Runs the test suite" + spec: + command: "npm test" + dependsOn: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"] + ``` Args: extra_headers: Send extra headers @@ -394,7 +583,23 @@ async def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> TaskRetrieveResponse: """ - GetTask + Gets details about a specific automation task. + + Use this method to: + + - Check task configuration + - View task dependencies + - Monitor task status + + ### Examples + + - Get task details: + + Retrieves information about a specific task. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -429,7 +634,38 @@ async def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateTask + Updates an automation task configuration. + + Use this method to: + + - Modify task commands + - Update task triggers + - Change dependencies + - Adjust execution settings + + ### Examples + + - Update command: + + Changes the task's command. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + spec: + command: "npm run test:coverage" + ``` + + - Update triggers: + + Modifies when the task runs. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + metadata: + triggeredBy: + trigger: + - postEnvironmentStart: true + ``` Args: depends_on: dependencies specifies the IDs of the automations this task depends on. @@ -474,7 +710,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Task, AsyncTasksPage[Task]]: """ - ListTasks + Lists automation tasks with optional filtering. + + Use this method to: + + - View all tasks in an environment + - Filter tasks by reference + - Monitor task status + + ### Examples + + - List environment tasks: + + Shows all tasks for an environment. + + ```yaml + filter: + environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"] + pagination: + pageSize: 20 + ``` + + - Filter by reference: + + Lists tasks matching specific references. + + ```yaml + filter: + references: ["build", "test"] + pagination: + pageSize: 20 + ``` Args: filter: filter contains the filter options for listing tasks @@ -528,7 +794,23 @@ async def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteTask + Deletes an automation task. + + Use this method to: + + - Remove unused tasks + - Clean up task configurations + - Delete obsolete automations + + ### Examples + + - Delete task: + + Removes a task and its configuration. + + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -559,10 +841,26 @@ async def start( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> TaskStartResponse: - """StartTask starts a task, i.e. + """Starts a task by creating a new task execution. + + This call does not block until + the task is started; the task will be started asynchronously. + + Use this method to: + + - Trigger task execution + - Run one-off tasks + - Start scheduled tasks immediately + + ### Examples + + - Start task: + + Creates a new execution of a task. - creates a task execution. This call does not block - until the task is started; the task will be started asynchronously. + ```yaml + id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers diff --git a/src/gitpod/resources/identity.py b/src/gitpod/resources/identity.py index 6635c4b..736e308 100644 --- a/src/gitpod/resources/identity.py +++ b/src/gitpod/resources/identity.py @@ -64,7 +64,23 @@ def exchange_token( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> IdentityExchangeTokenResponse: """ - ExchangeToken trades an exchange token for a new access token. + Exchanges an exchange token for a new access token. + + Use this method to: + + - Convert exchange tokens to access tokens + - Obtain new access credentials + - Complete token exchange flows + + ### Examples + + - Exchange token: + + Trades an exchange token for an access token. + + ```yaml + exchangeToken: "exchange-token-value" + ``` Args: exchange_token: exchange_token is the token to exchange @@ -100,7 +116,24 @@ def get_authenticated_identity( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> IdentityGetAuthenticatedIdentityResponse: """ - GetAuthenticatedIdentity allows to retrieve the current identity. + Retrieves information about the currently authenticated identity. + + Use this method to: + + - Get current user information + - Check authentication status + - Retrieve organization context + - Validate authentication principal + + ### Examples + + - Get current identity: + + Retrieves details about the authenticated user. + + ```yaml + {} + ``` Args: extra_headers: Send extra headers @@ -134,8 +167,34 @@ def get_id_token( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> IdentityGetIDTokenResponse: """ - GetIDToken returns a token that can be used to authenticate the user against the - other services. + Gets an ID token for authenticating with other services. + + Use this method to: + + - Obtain authentication tokens for service-to-service calls + - Access protected resources + - Generate scoped access tokens + + ### Examples + + - Get token for single service: + + Retrieves a token for authenticating with one service. + + ```yaml + audience: + - "https://api.gitpod.io" + ``` + + - Get token for multiple services: + + Retrieves a token valid for multiple services. + + ```yaml + audience: + - "https://api.gitpod.io" + - "https://ws.gitpod.io" + ``` Args: extra_headers: Send extra headers @@ -188,7 +247,23 @@ async def exchange_token( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> IdentityExchangeTokenResponse: """ - ExchangeToken trades an exchange token for a new access token. + Exchanges an exchange token for a new access token. + + Use this method to: + + - Convert exchange tokens to access tokens + - Obtain new access credentials + - Complete token exchange flows + + ### Examples + + - Exchange token: + + Trades an exchange token for an access token. + + ```yaml + exchangeToken: "exchange-token-value" + ``` Args: exchange_token: exchange_token is the token to exchange @@ -224,7 +299,24 @@ async def get_authenticated_identity( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> IdentityGetAuthenticatedIdentityResponse: """ - GetAuthenticatedIdentity allows to retrieve the current identity. + Retrieves information about the currently authenticated identity. + + Use this method to: + + - Get current user information + - Check authentication status + - Retrieve organization context + - Validate authentication principal + + ### Examples + + - Get current identity: + + Retrieves details about the authenticated user. + + ```yaml + {} + ``` Args: extra_headers: Send extra headers @@ -258,8 +350,34 @@ async def get_id_token( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> IdentityGetIDTokenResponse: """ - GetIDToken returns a token that can be used to authenticate the user against the - other services. + Gets an ID token for authenticating with other services. + + Use this method to: + + - Obtain authentication tokens for service-to-service calls + - Access protected resources + - Generate scoped access tokens + + ### Examples + + - Get token for single service: + + Retrieves a token for authenticating with one service. + + ```yaml + audience: + - "https://api.gitpod.io" + ``` + + - Get token for multiple services: + + Retrieves a token valid for multiple services. + + ```yaml + audience: + - "https://api.gitpod.io" + - "https://ws.gitpod.io" + ``` Args: extra_headers: Send extra headers diff --git a/src/gitpod/resources/secrets.py b/src/gitpod/resources/secrets.py index bcd0b7f..53c051b 100644 --- a/src/gitpod/resources/secrets.py +++ b/src/gitpod/resources/secrets.py @@ -70,7 +70,49 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SecretCreateResponse: """ - CreateSecret creates a new secret. + Creates a new secret for a project. + + Use this method to: + + - Store sensitive configuration values + - Set up environment variables + - Configure registry authentication + - Add file-based secrets + + ### Examples + + - Create environment variable: + + Creates a secret that will be available as an environment variable. + + ```yaml + name: "DATABASE_URL" + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + value: "postgresql://user:pass@localhost:5432/db" + environmentVariable: true + ``` + + - Create file secret: + + Creates a secret that will be mounted as a file. + + ```yaml + name: "SSH_KEY" + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + value: "-----BEGIN RSA PRIVATE KEY-----\n..." + filePath: "/home/gitpod/.ssh/id_rsa" + ``` + + - Create registry auth: + + Creates credentials for private container registry. + + ```yaml + name: "DOCKER_AUTH" + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + value: "username:password" + containerRegistryBasicAuthHost: "https://registry.example.com" + ``` Args: container_registry_basic_auth_host: secret will be mounted as a docker config in the environment VM, mount will have @@ -132,7 +174,25 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSecretsPage[Secret]: """ - ListSecrets lists secrets. + Lists secrets with optional filtering. + + Use this method to: + + - View all project secrets + - Filter secrets by project + + ### Examples + + - List project secrets: + + Shows all secrets for a project. + + ```yaml + filter: + projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"] + pagination: + pageSize: 20 + ``` Args: pagination: pagination contains the pagination options for listing environments @@ -184,7 +244,22 @@ def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteSecret deletes a secret. + Deletes a secret permanently. + + Use this method to: + + - Remove unused secrets + - Clean up old credentials + + ### Examples + + - Delete secret: + + Permanently removes a secret. + + ```yaml + secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -215,9 +290,25 @@ def get_value( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SecretGetValueResponse: - """ - GetSecretValue retrieves the value of a secret Only Environments can perform - this operation, and only for secrets specified on the EnvironmentSpec. + """Gets the value of a secret. + + Only available to environments that are authorized + to access the secret. + + Use this method to: + + - Retrieve secret values + - Access credentials + + ### Examples + + - Get secret value: + + Retrieves the value of a specific secret. + + ```yaml + secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -250,7 +341,23 @@ def update_value( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateSecretValue updates the value of a secret. + Updates the value of an existing secret. + + Use this method to: + + - Rotate secret values + - Update credentials + + ### Examples + + - Update secret value: + + Changes the value of an existing secret. + + ```yaml + secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + value: "new-secret-value" + ``` Args: value: value is the plaintext value of the secret @@ -316,7 +423,49 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SecretCreateResponse: """ - CreateSecret creates a new secret. + Creates a new secret for a project. + + Use this method to: + + - Store sensitive configuration values + - Set up environment variables + - Configure registry authentication + - Add file-based secrets + + ### Examples + + - Create environment variable: + + Creates a secret that will be available as an environment variable. + + ```yaml + name: "DATABASE_URL" + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + value: "postgresql://user:pass@localhost:5432/db" + environmentVariable: true + ``` + + - Create file secret: + + Creates a secret that will be mounted as a file. + + ```yaml + name: "SSH_KEY" + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + value: "-----BEGIN RSA PRIVATE KEY-----\n..." + filePath: "/home/gitpod/.ssh/id_rsa" + ``` + + - Create registry auth: + + Creates credentials for private container registry. + + ```yaml + name: "DOCKER_AUTH" + projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + value: "username:password" + containerRegistryBasicAuthHost: "https://registry.example.com" + ``` Args: container_registry_basic_auth_host: secret will be mounted as a docker config in the environment VM, mount will have @@ -378,7 +527,25 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Secret, AsyncSecretsPage[Secret]]: """ - ListSecrets lists secrets. + Lists secrets with optional filtering. + + Use this method to: + + - View all project secrets + - Filter secrets by project + + ### Examples + + - List project secrets: + + Shows all secrets for a project. + + ```yaml + filter: + projectIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"] + pagination: + pageSize: 20 + ``` Args: pagination: pagination contains the pagination options for listing environments @@ -430,7 +597,22 @@ async def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteSecret deletes a secret. + Deletes a secret permanently. + + Use this method to: + + - Remove unused secrets + - Clean up old credentials + + ### Examples + + - Delete secret: + + Permanently removes a secret. + + ```yaml + secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -461,9 +643,25 @@ async def get_value( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SecretGetValueResponse: - """ - GetSecretValue retrieves the value of a secret Only Environments can perform - this operation, and only for secrets specified on the EnvironmentSpec. + """Gets the value of a secret. + + Only available to environments that are authorized + to access the secret. + + Use this method to: + + - Retrieve secret values + - Access credentials + + ### Examples + + - Get secret value: + + Retrieves the value of a specific secret. + + ```yaml + secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -496,7 +694,23 @@ async def update_value( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateSecretValue updates the value of a secret. + Updates the value of an existing secret. + + Use this method to: + + - Rotate secret values + - Update credentials + + ### Examples + + - Update secret value: + + Changes the value of an existing secret. + + ```yaml + secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + value: "new-secret-value" + ``` Args: value: value is the plaintext value of the secret diff --git a/src/gitpod/resources/users/pats.py b/src/gitpod/resources/users/pats.py index a276f0e..1253895 100644 --- a/src/gitpod/resources/users/pats.py +++ b/src/gitpod/resources/users/pats.py @@ -61,7 +61,26 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncPersonalAccessTokensPage[PersonalAccessToken]: """ - ListPersonalAccessTokens + Lists personal access tokens with optional filtering. + + Use this method to: + + - View all active tokens + - Audit token usage + - Manage token lifecycle + + ### Examples + + - List user tokens: + + Shows all tokens for specific users. + + ```yaml + filter: + userIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"] + pagination: + pageSize: 20 + ``` Args: extra_headers: Send extra headers @@ -111,7 +130,23 @@ def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeletePersonalAccessToken + Deletes a personal access token. + + Use this method to: + + - Revoke token access + - Remove unused tokens + - Rotate credentials + + ### Examples + + - Delete token: + + Permanently revokes a token. + + ```yaml + personalAccessTokenId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -145,7 +180,23 @@ def get( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> PatGetResponse: """ - GetPersonalAccessToken + Gets details about a specific personal access token. + + Use this method to: + + - View token metadata + - Check token expiration + - Monitor token usage + + ### Examples + + - Get token details: + + Retrieves information about a specific token. + + ```yaml + personalAccessTokenId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -201,7 +252,26 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[PersonalAccessToken, AsyncPersonalAccessTokensPage[PersonalAccessToken]]: """ - ListPersonalAccessTokens + Lists personal access tokens with optional filtering. + + Use this method to: + + - View all active tokens + - Audit token usage + - Manage token lifecycle + + ### Examples + + - List user tokens: + + Shows all tokens for specific users. + + ```yaml + filter: + userIds: ["f53d2330-3795-4c5d-a1f3-453121af9c60"] + pagination: + pageSize: 20 + ``` Args: extra_headers: Send extra headers @@ -251,7 +321,23 @@ async def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeletePersonalAccessToken + Deletes a personal access token. + + Use this method to: + + - Revoke token access + - Remove unused tokens + - Rotate credentials + + ### Examples + + - Delete token: + + Permanently revokes a token. + + ```yaml + personalAccessTokenId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -285,7 +371,23 @@ async def get( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> PatGetResponse: """ - GetPersonalAccessToken + Gets details about a specific personal access token. + + Use this method to: + + - View token metadata + - Check token expiration + - Monitor token usage + + ### Examples + + - Get token details: + + Retrieves information about a specific token. + + ```yaml + personalAccessTokenId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers diff --git a/src/gitpod/resources/users/users.py b/src/gitpod/resources/users/users.py index 03d30ab..ab3e3c9 100644 --- a/src/gitpod/resources/users/users.py +++ b/src/gitpod/resources/users/users.py @@ -68,7 +68,24 @@ def get_authenticated_user( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> UserGetAuthenticatedUserResponse: """ - GetAuthenticatedUser allows to retrieve the current user. + Gets information about the currently authenticated user. + + Use this method to: + + - Get user profile information + - Check authentication status + - Retrieve user settings + - Verify account details + + ### Examples + + - Get current user: + + Retrieves details about the authenticated user. + + ```yaml + {} + ``` Args: extra_headers: Send extra headers @@ -101,7 +118,33 @@ def set_suspended( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - SetSuspended sets the suspended state of the user. + Sets whether a user account is suspended. + + Use this method to: + + - Suspend problematic users + - Reactivate suspended accounts + - Manage user access + + ### Examples + + - Suspend user: + + Suspends a user account. + + ```yaml + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + suspended: true + ``` + + - Reactivate user: + + Removes suspension from a user account. + + ```yaml + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + suspended: false + ``` Args: extra_headers: Send extra headers @@ -164,7 +207,24 @@ async def get_authenticated_user( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> UserGetAuthenticatedUserResponse: """ - GetAuthenticatedUser allows to retrieve the current user. + Gets information about the currently authenticated user. + + Use this method to: + + - Get user profile information + - Check authentication status + - Retrieve user settings + - Verify account details + + ### Examples + + - Get current user: + + Retrieves details about the authenticated user. + + ```yaml + {} + ``` Args: extra_headers: Send extra headers @@ -199,7 +259,33 @@ async def set_suspended( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - SetSuspended sets the suspended state of the user. + Sets whether a user account is suspended. + + Use this method to: + + - Suspend problematic users + - Reactivate suspended accounts + - Manage user access + + ### Examples + + - Suspend user: + + Suspends a user account. + + ```yaml + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + suspended: true + ``` + + - Reactivate user: + + Removes suspension from a user account. + + ```yaml + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + suspended: false + ``` Args: extra_headers: Send extra headers diff --git a/src/gitpod/types/environment.py b/src/gitpod/types/environment.py index 0be34ff..5dd6728 100644 --- a/src/gitpod/types/environment.py +++ b/src/gitpod/types/environment.py @@ -11,7 +11,7 @@ class Environment(BaseModel): - id: Optional[str] = None + id: str """ID is a unique identifier of this environment. No other environment with the same name must be managed by this environment diff --git a/src/gitpod/types/environments/automations/service.py b/src/gitpod/types/environments/automations/service.py index 337562b..9dbb5aa 100644 --- a/src/gitpod/types/environments/automations/service.py +++ b/src/gitpod/types/environments/automations/service.py @@ -13,7 +13,7 @@ class Service(BaseModel): - id: Optional[str] = None + id: str environment_id: Optional[str] = FieldInfo(alias="environmentId", default=None) diff --git a/src/gitpod/types/runner_capability.py b/src/gitpod/types/runner_capability.py index 256e893..261e033 100644 --- a/src/gitpod/types/runner_capability.py +++ b/src/gitpod/types/runner_capability.py @@ -4,4 +4,8 @@ __all__ = ["RunnerCapability"] -RunnerCapability: TypeAlias = Literal["RUNNER_CAPABILITY_UNSPECIFIED", "RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS"] +RunnerCapability: TypeAlias = Literal[ + "RUNNER_CAPABILITY_UNSPECIFIED", + "RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS", + "RUNNER_CAPABILITY_SECRET_CONTAINER_REGISTRY", +] diff --git a/src/gitpod/types/runner_check_authentication_for_host_response.py b/src/gitpod/types/runner_check_authentication_for_host_response.py index fe73a2a..273d871 100644 --- a/src/gitpod/types/runner_check_authentication_for_host_response.py +++ b/src/gitpod/types/runner_check_authentication_for_host_response.py @@ -1,12 +1,37 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import List, Optional from pydantic import Field as FieldInfo from .._models import BaseModel -__all__ = ["RunnerCheckAuthenticationForHostResponse"] +__all__ = ["RunnerCheckAuthenticationForHostResponse", "SupportsOauth2", "SupportsPat"] + + +class SupportsOauth2(BaseModel): + auth_url: Optional[str] = FieldInfo(alias="authUrl", default=None) + """auth_url is the URL where users can authenticate""" + + docs_url: Optional[str] = FieldInfo(alias="docsUrl", default=None) + """docs_url is the URL to the documentation explaining this authentication method""" + + +class SupportsPat(BaseModel): + create_url: Optional[str] = FieldInfo(alias="createUrl", default=None) + """create_url is the URL where users can create a new Personal Access Token""" + + docs_url: Optional[str] = FieldInfo(alias="docsUrl", default=None) + """docs_url is the URL to the documentation explaining PAT usage for this host""" + + example: Optional[str] = None + """example is an example of a Personal Access Token""" + + required_scopes: Optional[List[str]] = FieldInfo(alias="requiredScopes", default=None) + """ + required_scopes is the list of permissions required for the Personal Access + Token + """ class RunnerCheckAuthenticationForHostResponse(BaseModel): @@ -17,3 +42,19 @@ class RunnerCheckAuthenticationForHostResponse(BaseModel): pat_supported: Optional[bool] = FieldInfo(alias="patSupported", default=None) scm_id: Optional[str] = FieldInfo(alias="scmId", default=None) + """scm_id is the unique identifier of the SCM provider""" + + scm_name: Optional[str] = FieldInfo(alias="scmName", default=None) + """ + scm_name is the human-readable name of the SCM provider (e.g., "GitHub", + "GitLab") + """ + + supports_oauth2: Optional[SupportsOauth2] = FieldInfo(alias="supportsOauth2", default=None) + """supports_oauth2 indicates that the host supports OAuth2 authentication""" + + supports_pat: Optional[SupportsPat] = FieldInfo(alias="supportsPat", default=None) + """ + supports_pat indicates that the host supports Personal Access Token + authentication + """ diff --git a/src/gitpod/types/shared/environment_class.py b/src/gitpod/types/shared/environment_class.py index 24f66bb..2bc2621 100644 --- a/src/gitpod/types/shared/environment_class.py +++ b/src/gitpod/types/shared/environment_class.py @@ -11,7 +11,7 @@ class EnvironmentClass(BaseModel): - id: Optional[str] = None + id: str """id is the unique identifier of the environment class""" configuration: Optional[List[FieldValue]] = None diff --git a/src/gitpod/types/shared/task.py b/src/gitpod/types/shared/task.py index 95e8566..c45bfa6 100644 --- a/src/gitpod/types/shared/task.py +++ b/src/gitpod/types/shared/task.py @@ -12,7 +12,7 @@ class Task(BaseModel): - id: Optional[str] = None + id: str depends_on: Optional[List[str]] = FieldInfo(alias="dependsOn", default=None) """dependencies specifies the IDs of the automations this task depends on.""" diff --git a/src/gitpod/types/shared_params/environment_class.py b/src/gitpod/types/shared_params/environment_class.py index 17e43a4..7493d54 100644 --- a/src/gitpod/types/shared_params/environment_class.py +++ b/src/gitpod/types/shared_params/environment_class.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Iterable -from typing_extensions import Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo from .field_value import FieldValue @@ -12,7 +12,7 @@ class EnvironmentClass(TypedDict, total=False): - id: str + id: Required[str] """id is the unique identifier of the environment class""" configuration: Iterable[FieldValue] diff --git a/tests/api_resources/environments/automations/tasks/test_executions.py b/tests/api_resources/environments/automations/tasks/test_executions.py index 45ce226..722a618 100644 --- a/tests/api_resources/environments/automations/tasks/test_executions.py +++ b/tests/api_resources/environments/automations/tasks/test_executions.py @@ -31,7 +31,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: execution = client.environments.automations.tasks.executions.retrieve( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(ExecutionRetrieveResponse, execution, path=["response"]) @@ -71,13 +71,13 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: page_size=0, filter={ "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - "phases": ["TASK_EXECUTION_PHASE_UNSPECIFIED"], + "phases": ["TASK_EXECUTION_PHASE_UNSPECIFIED", "TASK_EXECUTION_PHASE_PENDING"], "task_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], "task_references": ["string"], }, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncTaskExecutionsPage[TaskExecution], execution, path=["response"]) @@ -114,7 +114,7 @@ def test_method_stop(self, client: Gitpod) -> None: @parametrize def test_method_stop_with_all_params(self, client: Gitpod) -> None: execution = client.environments.automations.tasks.executions.stop( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, execution, path=["response"]) @@ -154,7 +154,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: execution = await async_client.environments.automations.tasks.executions.retrieve( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(ExecutionRetrieveResponse, execution, path=["response"]) @@ -196,13 +196,13 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N page_size=0, filter={ "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - "phases": ["TASK_EXECUTION_PHASE_UNSPECIFIED"], + "phases": ["TASK_EXECUTION_PHASE_UNSPECIFIED", "TASK_EXECUTION_PHASE_PENDING"], "task_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], "task_references": ["string"], }, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncTaskExecutionsPage[TaskExecution], execution, path=["response"]) @@ -239,7 +239,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: execution = await async_client.environments.automations.tasks.executions.stop( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, execution, path=["response"]) diff --git a/tests/api_resources/environments/automations/test_services.py b/tests/api_resources/environments/automations/test_services.py index 9c90a24..ea60aba 100644 --- a/tests/api_resources/environments/automations/test_services.py +++ b/tests/api_resources/environments/automations/test_services.py @@ -33,16 +33,16 @@ def test_method_create(self, client: Gitpod) -> None: @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.create( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", metadata={ "created_at": parse_datetime("2019-12-27T18:11:19.117Z"), "creator": { "id": "id", "principal": "PRINCIPAL_UNSPECIFIED", }, - "description": "description", - "name": "x", - "reference": "reference", + "description": "Runs the development web server", + "name": "Web Server", + "reference": "web-server", "triggered_by": [ { "manual": True, @@ -53,8 +53,8 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: }, spec={ "commands": { - "ready": "ready", - "start": "x", + "ready": "curl -s http://localhost:3000", + "start": "npm run dev", "stop": "stop", }, "desired_phase": "SERVICE_PHASE_UNSPECIFIED", @@ -102,7 +102,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.retrieve( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(ServiceRetrieveResponse, service, path=["response"]) @@ -138,7 +138,7 @@ def test_method_update(self, client: Gitpod) -> None: @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.update( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", metadata={ "description": "description", "name": "x", @@ -154,8 +154,8 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: }, spec={ "commands": { - "ready": "ready", - "start": "start", + "ready": "curl -s http://localhost:8080", + "start": "npm run start:dev", "stop": "stop", }, "runs_on": { @@ -210,12 +210,12 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: page_size=0, filter={ "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - "references": ["x"], + "references": ["web-server", "database"], "service_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], }, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncServicesPage[Service], service, path=["response"]) @@ -252,8 +252,8 @@ def test_method_delete(self, client: Gitpod) -> None: @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.delete( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - force=True, + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + force=False, ) assert_matches_type(object, service, path=["response"]) @@ -289,7 +289,7 @@ def test_method_start(self, client: Gitpod) -> None: @parametrize def test_method_start_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.start( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, service, path=["response"]) @@ -325,7 +325,7 @@ def test_method_stop(self, client: Gitpod) -> None: @parametrize def test_method_stop_with_all_params(self, client: Gitpod) -> None: service = client.environments.automations.services.stop( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, service, path=["response"]) @@ -365,16 +365,16 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.create( - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", metadata={ "created_at": parse_datetime("2019-12-27T18:11:19.117Z"), "creator": { "id": "id", "principal": "PRINCIPAL_UNSPECIFIED", }, - "description": "description", - "name": "x", - "reference": "reference", + "description": "Runs the development web server", + "name": "Web Server", + "reference": "web-server", "triggered_by": [ { "manual": True, @@ -385,8 +385,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> }, spec={ "commands": { - "ready": "ready", - "start": "x", + "ready": "curl -s http://localhost:3000", + "start": "npm run dev", "stop": "stop", }, "desired_phase": "SERVICE_PHASE_UNSPECIFIED", @@ -434,7 +434,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: service = await async_client.environments.automations.services.retrieve( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(ServiceRetrieveResponse, service, path=["response"]) @@ -470,7 +470,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: service = await async_client.environments.automations.services.update( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", metadata={ "description": "description", "name": "x", @@ -486,8 +486,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> }, spec={ "commands": { - "ready": "ready", - "start": "start", + "ready": "curl -s http://localhost:8080", + "start": "npm run start:dev", "stop": "stop", }, "runs_on": { @@ -542,12 +542,12 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N page_size=0, filter={ "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - "references": ["x"], + "references": ["web-server", "database"], "service_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], }, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncServicesPage[Service], service, path=["response"]) @@ -584,8 +584,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: service = await async_client.environments.automations.services.delete( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - force=True, + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + force=False, ) assert_matches_type(object, service, path=["response"]) @@ -621,7 +621,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: service = await async_client.environments.automations.services.start( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, service, path=["response"]) @@ -657,7 +657,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: service = await async_client.environments.automations.services.stop( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, service, path=["response"]) diff --git a/tests/api_resources/environments/automations/test_tasks.py b/tests/api_resources/environments/automations/test_tasks.py index adcf14f..d9b63d4 100644 --- a/tests/api_resources/environments/automations/test_tasks.py +++ b/tests/api_resources/environments/automations/test_tasks.py @@ -35,16 +35,16 @@ def test_method_create(self, client: Gitpod) -> None: def test_method_create_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.create( depends_on=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", metadata={ "created_at": parse_datetime("2019-12-27T18:11:19.117Z"), "creator": { "id": "id", "principal": "PRINCIPAL_UNSPECIFIED", }, - "description": "description", - "name": "x", - "reference": "reference", + "description": "Builds the project artifacts", + "name": "Build Project", + "reference": "build", "triggered_by": [ { "manual": True, @@ -54,7 +54,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: ], }, spec={ - "command": "command", + "command": "npm run build", "runs_on": { "docker": { "environment": ["string"], @@ -97,7 +97,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: @parametrize def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.retrieve( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(TaskRetrieveResponse, task, path=["response"]) @@ -133,7 +133,7 @@ def test_method_update(self, client: Gitpod) -> None: @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.update( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", depends_on=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], metadata={ "description": "description", @@ -149,7 +149,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: }, }, spec={ - "command": "command", + "command": "npm run test:coverage", "runs_on": { "docker": { "environment": ["string"], @@ -196,12 +196,12 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: page_size=0, filter={ "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - "references": ["x"], + "references": ["build", "test"], "task_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], }, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncTasksPage[Task], task, path=["response"]) @@ -238,7 +238,7 @@ def test_method_delete(self, client: Gitpod) -> None: @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.delete( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, task, path=["response"]) @@ -274,7 +274,7 @@ def test_method_start(self, client: Gitpod) -> None: @parametrize def test_method_start_with_all_params(self, client: Gitpod) -> None: task = client.environments.automations.tasks.start( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(TaskStartResponse, task, path=["response"]) @@ -315,16 +315,16 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.create( depends_on=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", metadata={ "created_at": parse_datetime("2019-12-27T18:11:19.117Z"), "creator": { "id": "id", "principal": "PRINCIPAL_UNSPECIFIED", }, - "description": "description", - "name": "x", - "reference": "reference", + "description": "Builds the project artifacts", + "name": "Build Project", + "reference": "build", "triggered_by": [ { "manual": True, @@ -334,7 +334,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> ], }, spec={ - "command": "command", + "command": "npm run build", "runs_on": { "docker": { "environment": ["string"], @@ -377,7 +377,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.retrieve( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(TaskRetrieveResponse, task, path=["response"]) @@ -413,7 +413,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: task = await async_client.environments.automations.tasks.update( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", depends_on=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], metadata={ "description": "description", @@ -429,7 +429,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> }, }, spec={ - "command": "command", + "command": "npm run test:coverage", "runs_on": { "docker": { "environment": ["string"], @@ -476,12 +476,12 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N page_size=0, filter={ "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], - "references": ["x"], + "references": ["build", "test"], "task_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], }, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncTasksPage[Task], task, path=["response"]) @@ -518,7 +518,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.environments.automations.tasks.delete( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, task, path=["response"]) @@ -554,7 +554,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: task = await async_client.environments.automations.tasks.start( - id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(TaskStartResponse, task, path=["response"]) diff --git a/tests/api_resources/environments/test_automations.py b/tests/api_resources/environments/test_automations.py index e4c8ffd..52ebff8 100644 --- a/tests/api_resources/environments/test_automations.py +++ b/tests/api_resources/environments/test_automations.py @@ -29,14 +29,14 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None: automation = client.environments.automations.upsert( automations_file={ "services": { - "foo": { + "web-server": { "commands": { - "ready": "ready", - "start": "x", + "ready": "curl -s http://localhost:3000", + "start": "npm run dev", "stop": "stop", }, - "description": "description", - "name": "x", + "description": "Development web server", + "name": "Web Server", "runs_on": { "docker": { "environment": ["string"], @@ -47,11 +47,11 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None: } }, "tasks": { - "foo": { - "command": "x", + "build": { + "command": "npm run build", "depends_on": ["string"], - "description": "description", - "name": "x", + "description": "Builds the project artifacts", + "name": "Build Project", "runs_on": { "docker": { "environment": ["string"], @@ -62,7 +62,7 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None: } }, }, - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(AutomationUpsertResponse, automation, path=["response"]) @@ -104,14 +104,14 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> automation = await async_client.environments.automations.upsert( automations_file={ "services": { - "foo": { + "web-server": { "commands": { - "ready": "ready", - "start": "x", + "ready": "curl -s http://localhost:3000", + "start": "npm run dev", "stop": "stop", }, - "description": "description", - "name": "x", + "description": "Development web server", + "name": "Web Server", "runs_on": { "docker": { "environment": ["string"], @@ -122,11 +122,11 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> } }, "tasks": { - "foo": { - "command": "x", + "build": { + "command": "npm run build", "depends_on": ["string"], - "description": "description", - "name": "x", + "description": "Builds the project artifacts", + "name": "Build Project", "runs_on": { "docker": { "environment": ["string"], @@ -137,7 +137,7 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> } }, }, - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) assert_matches_type(AutomationUpsertResponse, automation, path=["response"]) diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index c9f4d5a..7aee8ed 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -62,7 +62,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @parametrize def test_method_delete(self, client: Gitpod) -> None: account = client.accounts.delete( - account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert_matches_type(object, account, path=["response"]) @@ -70,7 +70,7 @@ def test_method_delete(self, client: Gitpod) -> None: @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.accounts.with_raw_response.delete( - account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert response.is_closed is True @@ -82,7 +82,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.accounts.with_streaming_response.delete( - account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -96,7 +96,7 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: @parametrize def test_method_get_sso_login_url(self, client: Gitpod) -> None: account = client.accounts.get_sso_login_url( - email="dev@stainlessapi.com", + email="user@company.com", ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) @@ -104,7 +104,7 @@ def test_method_get_sso_login_url(self, client: Gitpod) -> None: @parametrize def test_method_get_sso_login_url_with_all_params(self, client: Gitpod) -> None: account = client.accounts.get_sso_login_url( - email="dev@stainlessapi.com", + email="user@company.com", return_to="https://example.com", ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) @@ -113,7 +113,7 @@ def test_method_get_sso_login_url_with_all_params(self, client: Gitpod) -> None: @parametrize def test_raw_response_get_sso_login_url(self, client: Gitpod) -> None: response = client.accounts.with_raw_response.get_sso_login_url( - email="dev@stainlessapi.com", + email="user@company.com", ) assert response.is_closed is True @@ -125,7 +125,7 @@ def test_raw_response_get_sso_login_url(self, client: Gitpod) -> None: @parametrize def test_streaming_response_get_sso_login_url(self, client: Gitpod) -> None: with client.accounts.with_streaming_response.get_sso_login_url( - email="dev@stainlessapi.com", + email="user@company.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -150,7 +150,7 @@ def test_method_list_login_providers_with_all_params(self, client: Gitpod) -> No filter={"invite_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncLoginProvidersPage[LoginProvider], account, path=["response"]) @@ -221,7 +221,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.delete( - account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert_matches_type(object, account, path=["response"]) @@ -229,7 +229,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.accounts.with_raw_response.delete( - account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert response.is_closed is True @@ -241,7 +241,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.accounts.with_streaming_response.delete( - account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -255,7 +255,7 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non @parametrize async def test_method_get_sso_login_url(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.get_sso_login_url( - email="dev@stainlessapi.com", + email="user@company.com", ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) @@ -263,7 +263,7 @@ async def test_method_get_sso_login_url(self, async_client: AsyncGitpod) -> None @parametrize async def test_method_get_sso_login_url_with_all_params(self, async_client: AsyncGitpod) -> None: account = await async_client.accounts.get_sso_login_url( - email="dev@stainlessapi.com", + email="user@company.com", return_to="https://example.com", ) assert_matches_type(AccountGetSSOLoginURLResponse, account, path=["response"]) @@ -272,7 +272,7 @@ async def test_method_get_sso_login_url_with_all_params(self, async_client: Asyn @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( - email="dev@stainlessapi.com", + email="user@company.com", ) assert response.is_closed is True @@ -284,7 +284,7 @@ async def test_raw_response_get_sso_login_url(self, async_client: AsyncGitpod) - @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( - email="dev@stainlessapi.com", + email="user@company.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -309,7 +309,7 @@ async def test_method_list_login_providers_with_all_params(self, async_client: A filter={"invite_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncLoginProvidersPage[LoginProvider], account, path=["response"]) diff --git a/tests/api_resources/test_editors.py b/tests/api_resources/test_editors.py index c8aa524..ecf5819 100644 --- a/tests/api_resources/test_editors.py +++ b/tests/api_resources/test_editors.py @@ -26,7 +26,7 @@ class TestEditors: @parametrize def test_method_retrieve(self, client: Gitpod) -> None: editor = client.editors.retrieve( - id="id", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(EditorRetrieveResponse, editor, path=["response"]) @@ -34,7 +34,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.editors.with_raw_response.retrieve( - id="id", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.editors.with_streaming_response.retrieve( - id="id", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -70,7 +70,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncEditorsPage[Editor], editor, path=["response"]) @@ -101,9 +101,9 @@ def test_streaming_response_list(self, client: Gitpod) -> None: @parametrize def test_method_resolve_url(self, client: Gitpod) -> None: editor = client.editors.resolve_url( - editor_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + editor_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(EditorResolveURLResponse, editor, path=["response"]) @@ -111,9 +111,9 @@ def test_method_resolve_url(self, client: Gitpod) -> None: @parametrize def test_raw_response_resolve_url(self, client: Gitpod) -> None: 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", + editor_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -125,9 +125,9 @@ def test_raw_response_resolve_url(self, client: Gitpod) -> None: @parametrize def test_streaming_response_resolve_url(self, client: Gitpod) -> None: 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", + editor_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,7 +145,7 @@ class TestAsyncEditors: @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: editor = await async_client.editors.retrieve( - id="id", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(EditorRetrieveResponse, editor, path=["response"]) @@ -153,7 +153,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.editors.with_raw_response.retrieve( - id="id", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -165,7 +165,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.editors.with_streaming_response.retrieve( - id="id", + id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -189,7 +189,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncEditorsPage[Editor], editor, path=["response"]) @@ -220,9 +220,9 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_resolve_url(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", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + editor_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(EditorResolveURLResponse, editor, path=["response"]) @@ -230,9 +230,9 @@ async def test_method_resolve_url(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_resolve_url(self, async_client: AsyncGitpod) -> None: 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", + editor_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -244,9 +244,9 @@ async def test_raw_response_resolve_url(self, async_client: AsyncGitpod) -> None @parametrize async def test_streaming_response_resolve_url(self, async_client: AsyncGitpod) -> None: 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", + editor_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + environment_id="07e03a28-65a5-4d98-b532-8ea67b188048", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_identity.py b/tests/api_resources/test_identity.py index 2991dc8..46cfd41 100644 --- a/tests/api_resources/test_identity.py +++ b/tests/api_resources/test_identity.py @@ -31,7 +31,7 @@ def test_method_exchange_token(self, client: Gitpod) -> None: @parametrize def test_method_exchange_token_with_all_params(self, client: Gitpod) -> None: identity = client.identity.exchange_token( - exchange_token="exchangeToken", + exchange_token="exchange-token-value", ) assert_matches_type(IdentityExchangeTokenResponse, identity, path=["response"]) @@ -103,7 +103,7 @@ def test_method_get_id_token(self, client: Gitpod) -> None: @parametrize def test_method_get_id_token_with_all_params(self, client: Gitpod) -> None: identity = client.identity.get_id_token( - audience=["string"], + audience=["https://api.gitpod.io", "https://ws.gitpod.io"], ) assert_matches_type(IdentityGetIDTokenResponse, identity, path=["response"]) @@ -143,7 +143,7 @@ async def test_method_exchange_token(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_exchange_token_with_all_params(self, async_client: AsyncGitpod) -> None: identity = await async_client.identity.exchange_token( - exchange_token="exchangeToken", + exchange_token="exchange-token-value", ) assert_matches_type(IdentityExchangeTokenResponse, identity, path=["response"]) @@ -215,7 +215,7 @@ async def test_method_get_id_token(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_get_id_token_with_all_params(self, async_client: AsyncGitpod) -> None: identity = await async_client.identity.get_id_token( - audience=["string"], + audience=["https://api.gitpod.io", "https://ws.gitpod.io"], ) assert_matches_type(IdentityGetIDTokenResponse, identity, path=["response"]) diff --git a/tests/api_resources/test_secrets.py b/tests/api_resources/test_secrets.py index dfe5cd1..414aab0 100644 --- a/tests/api_resources/test_secrets.py +++ b/tests/api_resources/test_secrets.py @@ -35,9 +35,9 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: container_registry_basic_auth_host="https://example.com", environment_variable=True, file_path="filePath", - name="name", - project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - value="x", + name="DATABASE_URL", + project_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + value="postgresql://user:pass@localhost:5432/db", ) assert_matches_type(SecretCreateResponse, secret, path=["response"]) @@ -75,10 +75,10 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.list( token="token", page_size=0, - filter={"project_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, + filter={"project_ids": ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"]}, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncSecretsPage[Secret], secret, path=["response"]) @@ -115,7 +115,7 @@ def test_method_delete(self, client: Gitpod) -> None: @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.delete( - secret_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + secret_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, secret, path=["response"]) @@ -151,7 +151,7 @@ def test_method_get_value(self, client: Gitpod) -> None: @parametrize def test_method_get_value_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.get_value( - secret_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + secret_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(SecretGetValueResponse, secret, path=["response"]) @@ -187,8 +187,8 @@ def test_method_update_value(self, client: Gitpod) -> None: @parametrize def test_method_update_value_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.update_value( - secret_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - value="x", + secret_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + value="new-secret-value", ) assert_matches_type(object, secret, path=["response"]) @@ -231,9 +231,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> container_registry_basic_auth_host="https://example.com", environment_variable=True, file_path="filePath", - name="name", - project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - value="x", + name="DATABASE_URL", + project_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + value="postgresql://user:pass@localhost:5432/db", ) assert_matches_type(SecretCreateResponse, secret, path=["response"]) @@ -271,10 +271,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N secret = await async_client.secrets.list( token="token", page_size=0, - filter={"project_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, + filter={"project_ids": ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"]}, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncSecretsPage[Secret], secret, path=["response"]) @@ -311,7 +311,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.delete( - secret_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + secret_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, secret, path=["response"]) @@ -347,7 +347,7 @@ async def test_method_get_value(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_get_value_with_all_params(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.get_value( - secret_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + secret_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(SecretGetValueResponse, secret, path=["response"]) @@ -383,8 +383,8 @@ async def test_method_update_value(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_update_value_with_all_params(self, async_client: AsyncGitpod) -> None: secret = await async_client.secrets.update_value( - secret_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - value="x", + secret_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + value="new-secret-value", ) assert_matches_type(object, secret, path=["response"]) diff --git a/tests/api_resources/test_users.py b/tests/api_resources/test_users.py index f3707ef..b587536 100644 --- a/tests/api_resources/test_users.py +++ b/tests/api_resources/test_users.py @@ -63,8 +63,8 @@ def test_method_set_suspended(self, client: Gitpod) -> None: @parametrize def test_method_set_suspended_with_all_params(self, client: Gitpod) -> None: user = client.users.set_suspended( - suspended=True, - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + suspended=False, + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert_matches_type(object, user, path=["response"]) @@ -140,8 +140,8 @@ async def test_method_set_suspended(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_set_suspended_with_all_params(self, async_client: AsyncGitpod) -> None: user = await async_client.users.set_suspended( - suspended=True, - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + suspended=False, + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert_matches_type(object, user, path=["response"]) diff --git a/tests/api_resources/users/test_pats.py b/tests/api_resources/users/test_pats.py index bf3ea01..3461162 100644 --- a/tests/api_resources/users/test_pats.py +++ b/tests/api_resources/users/test_pats.py @@ -30,10 +30,10 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: pat = client.users.pats.list( token="token", page_size=0, - filter={"user_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, + filter={"user_ids": ["f53d2330-3795-4c5d-a1f3-453121af9c60"]}, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncPersonalAccessTokensPage[PersonalAccessToken], pat, path=["response"]) @@ -70,7 +70,7 @@ def test_method_delete(self, client: Gitpod) -> None: @parametrize def test_method_delete_with_all_params(self, client: Gitpod) -> None: pat = client.users.pats.delete( - personal_access_token_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + personal_access_token_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, pat, path=["response"]) @@ -106,7 +106,7 @@ def test_method_get(self, client: Gitpod) -> None: @parametrize def test_method_get_with_all_params(self, client: Gitpod) -> None: pat = client.users.pats.get( - personal_access_token_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + personal_access_token_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(PatGetResponse, pat, path=["response"]) @@ -148,10 +148,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N pat = await async_client.users.pats.list( token="token", page_size=0, - filter={"user_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, + filter={"user_ids": ["f53d2330-3795-4c5d-a1f3-453121af9c60"]}, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncPersonalAccessTokensPage[PersonalAccessToken], pat, path=["response"]) @@ -188,7 +188,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: pat = await async_client.users.pats.delete( - personal_access_token_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + personal_access_token_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, pat, path=["response"]) @@ -224,7 +224,7 @@ async def test_method_get(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncGitpod) -> None: pat = await async_client.users.pats.get( - personal_access_token_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + personal_access_token_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(PatGetResponse, pat, path=["response"])