From d3b837ff28793c39fabad5ae37540554f1ac2602 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 01:11:12 +0000 Subject: [PATCH 001/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e93723a0..ab885989 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3dcdbd68ce4b336149d28d17ab08f211538ed6630112ae4883af2f6680643159.yml -openapi_spec_hash: 7e4333995b65cf32663166801e2444bb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-1122bbd6558bb1ce02f8dfc967697900cd32a18ef62481537f4f5a6ad5932260.yml +openapi_spec_hash: e5a3f1cb78e8eac5e0d4ac0bdb2c73a6 config_hash: 8d7b241284195a8c51f5d670fbbe0ab4 From da8b4a6e37bd3c6a9243a2bac3b80869f94b253c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 23:48:29 +0000 Subject: [PATCH 002/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ab885989..f39bf498 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-1122bbd6558bb1ce02f8dfc967697900cd32a18ef62481537f4f5a6ad5932260.yml -openapi_spec_hash: e5a3f1cb78e8eac5e0d4ac0bdb2c73a6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-bb01d257acff1b3c58a570307eff6c618f2eb1c2740a8149736c644341504031.yml +openapi_spec_hash: f1a73aad352f34b1162560eb00ce2abe config_hash: 8d7b241284195a8c51f5d670fbbe0ab4 From 3e12437695a48d7ebc66ce018eea955203b7c743 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 10:19:10 +0000 Subject: [PATCH 003/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index f39bf498..d93c13eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-bb01d257acff1b3c58a570307eff6c618f2eb1c2740a8149736c644341504031.yml -openapi_spec_hash: f1a73aad352f34b1162560eb00ce2abe -config_hash: 8d7b241284195a8c51f5d670fbbe0ab4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ee5c1f5d47838a4ee7e114173d3b37b65abc3b3714615a0b9f06c16e3bbea076.yml +openapi_spec_hash: 4c08bb9223c4537e9bdc985a7937ad07 +config_hash: 6d27da09c9efc26556069dbefd693a37 From b7f0b1d27ef51872bf81541dd7f81a8101f856af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 16:12:08 +0000 Subject: [PATCH 004/211] fix(client): preserve hardcoded query params when merging with user params --- src/gitpod/_base_client.py | 4 ++++ tests/test_client.py | 48 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/gitpod/_base_client.py b/src/gitpod/_base_client.py index cc7f8af2..a9da58f9 100644 --- a/src/gitpod/_base_client.py +++ b/src/gitpod/_base_client.py @@ -540,6 +540,10 @@ def _build_request( files = cast(HttpxRequestFiles, ForceMultipartDict()) prepared_url = self._prepare_url(options.url) + # preserve hard-coded query params from the url + if params and prepared_url.query: + params = {**dict(prepared_url.params.items()), **params} + prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0]) if "_" in prepared_url.host: # work around https://github.com/encode/httpx/discussions/2880 kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")} diff --git a/tests/test_client.py b/tests/test_client.py index 92b0eea3..c105b4d9 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -438,6 +438,30 @@ def test_default_query_option(self) -> None: client.close() + def test_hardcoded_query_params_in_url(self, client: Gitpod) -> None: + request = client._build_request(FinalRequestOptions(method="get", url="/foo?beta=true")) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true"} + + request = client._build_request( + FinalRequestOptions( + method="get", + url="/foo?beta=true", + params={"limit": "10", "page": "abc"}, + ) + ) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true", "limit": "10", "page": "abc"} + + request = client._build_request( + FinalRequestOptions( + method="get", + url="/files/a%2Fb?beta=true", + params={"limit": "10"}, + ) + ) + assert request.url.raw_path == b"/files/a%2Fb?beta=true&limit=10" + def test_request_extra_json(self, client: Gitpod) -> None: request = client._build_request( FinalRequestOptions( @@ -1363,6 +1387,30 @@ async def test_default_query_option(self) -> None: await client.close() + async def test_hardcoded_query_params_in_url(self, async_client: AsyncGitpod) -> None: + request = async_client._build_request(FinalRequestOptions(method="get", url="/foo?beta=true")) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true"} + + request = async_client._build_request( + FinalRequestOptions( + method="get", + url="/foo?beta=true", + params={"limit": "10", "page": "abc"}, + ) + ) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true", "limit": "10", "page": "abc"} + + request = async_client._build_request( + FinalRequestOptions( + method="get", + url="/files/a%2Fb?beta=true", + params={"limit": "10"}, + ) + ) + assert request.url.raw_path == b"/files/a%2Fb?beta=true&limit=10" + def test_request_extra_json(self, client: Gitpod) -> None: request = client._build_request( FinalRequestOptions( From 9bbf63390cb0bf91661950d37c068409d2850eec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 20:38:37 +0000 Subject: [PATCH 005/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d93c13eb..5284245e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ee5c1f5d47838a4ee7e114173d3b37b65abc3b3714615a0b9f06c16e3bbea076.yml -openapi_spec_hash: 4c08bb9223c4537e9bdc985a7937ad07 -config_hash: 6d27da09c9efc26556069dbefd693a37 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-7366f3114f6f2fae72e3141480d2b2a67094d37391b5a068210e69ead83045f2.yml +openapi_spec_hash: aa2198d5846e9e12e09c823f64b65dca +config_hash: 843d5f356bfb6295862722a8d71d08e0 From 897c6658f1864958dfa034116f5923a7d7f4defc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 11:54:00 +0000 Subject: [PATCH 006/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5284245e..a75e53d1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-7366f3114f6f2fae72e3141480d2b2a67094d37391b5a068210e69ead83045f2.yml -openapi_spec_hash: aa2198d5846e9e12e09c823f64b65dca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-35cd7fa73c7adecfbdc71193bb6d59e34a427dae598401575870571ec220cd70.yml +openapi_spec_hash: 65118e845e2ad858c647c58016355820 config_hash: 843d5f356bfb6295862722a8d71d08e0 From 308ce72ede2ea2989619af0ac162ed76d356c6dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:18:08 +0000 Subject: [PATCH 007/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a75e53d1..0e153d52 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-35cd7fa73c7adecfbdc71193bb6d59e34a427dae598401575870571ec220cd70.yml -openapi_spec_hash: 65118e845e2ad858c647c58016355820 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-9b7fd2030480921db661aeb8eb6c454e8b53accf4bddecc66e740383ab7ad074.yml +openapi_spec_hash: deb597c2dbac0fddcdd136aae19aba44 config_hash: 843d5f356bfb6295862722a8d71d08e0 From faca2b27b88f17a759bd91c305e5ea2a856a1e2c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 16:22:17 +0000 Subject: [PATCH 008/211] feat(api): remove terminal field from RunsOn type --- .stats.yml | 4 ++-- src/gitpod/types/shared/runs_on.py | 6 ------ src/gitpod/types/shared_params/runs_on.py | 6 ------ .../api_resources/environments/automations/test_services.py | 4 ---- tests/api_resources/environments/automations/test_tasks.py | 4 ---- tests/api_resources/environments/test_automations.py | 4 ---- 6 files changed, 2 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0e153d52..45335695 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-9b7fd2030480921db661aeb8eb6c454e8b53accf4bddecc66e740383ab7ad074.yml -openapi_spec_hash: deb597c2dbac0fddcdd136aae19aba44 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ffc8cf0ed565636356f70cba5521094ee367d0b30bacb266a70f4ea98889c74c.yml +openapi_spec_hash: bf1abc17445dd410c3c3f8607c5a4937 config_hash: 843d5f356bfb6295862722a8d71d08e0 diff --git a/src/gitpod/types/shared/runs_on.py b/src/gitpod/types/shared/runs_on.py index 5f26ef47..33cf1bd5 100644 --- a/src/gitpod/types/shared/runs_on.py +++ b/src/gitpod/types/shared/runs_on.py @@ -18,9 +18,3 @@ class RunsOn(BaseModel): machine: Optional[object] = None """Machine runs the service/task directly on the VM/machine level.""" - - terminal: Optional[object] = None - """ - Terminal runs the service inside a managed PTY terminal in the devcontainer. - Users can attach to the terminal interactively via the terminal API. - """ diff --git a/src/gitpod/types/shared_params/runs_on.py b/src/gitpod/types/shared_params/runs_on.py index 0182710a..8fc0fd3c 100644 --- a/src/gitpod/types/shared_params/runs_on.py +++ b/src/gitpod/types/shared_params/runs_on.py @@ -20,9 +20,3 @@ class RunsOn(TypedDict, total=False): machine: object """Machine runs the service/task directly on the VM/machine level.""" - - terminal: object - """ - Terminal runs the service inside a managed PTY terminal in the devcontainer. - Users can attach to the terminal interactively via the terminal API. - """ diff --git a/tests/api_resources/environments/automations/test_services.py b/tests/api_resources/environments/automations/test_services.py index 3a80cc01..3d1ccf73 100644 --- a/tests/api_resources/environments/automations/test_services.py +++ b/tests/api_resources/environments/automations/test_services.py @@ -75,7 +75,6 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "image": "x", }, "machine": {}, - "terminal": {}, }, "session": "session", "spec_version": "specVersion", @@ -188,7 +187,6 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: "image": "x", }, "machine": {}, - "terminal": {}, }, }, status={ @@ -437,7 +435,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "image": "x", }, "machine": {}, - "terminal": {}, }, "session": "session", "spec_version": "specVersion", @@ -550,7 +547,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> "image": "x", }, "machine": {}, - "terminal": {}, }, }, status={ diff --git a/tests/api_resources/environments/automations/test_tasks.py b/tests/api_resources/environments/automations/test_tasks.py index 29599ec1..242dc25e 100644 --- a/tests/api_resources/environments/automations/test_tasks.py +++ b/tests/api_resources/environments/automations/test_tasks.py @@ -71,7 +71,6 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "image": "x", }, "machine": {}, - "terminal": {}, }, }, ) @@ -178,7 +177,6 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: "image": "x", }, "machine": {}, - "terminal": {}, }, }, ) @@ -377,7 +375,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "image": "x", }, "machine": {}, - "terminal": {}, }, }, ) @@ -484,7 +481,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> "image": "x", }, "machine": {}, - "terminal": {}, }, }, ) diff --git a/tests/api_resources/environments/test_automations.py b/tests/api_resources/environments/test_automations.py index bed1aa5a..15f3fe3a 100644 --- a/tests/api_resources/environments/test_automations.py +++ b/tests/api_resources/environments/test_automations.py @@ -44,7 +44,6 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None: "image": "x", }, "machine": {}, - "terminal": {}, }, "triggered_by": ["postDevcontainerStart"], } @@ -61,7 +60,6 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None: "image": "x", }, "machine": {}, - "terminal": {}, }, "triggered_by": ["postEnvironmentStart"], } @@ -126,7 +124,6 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> "image": "x", }, "machine": {}, - "terminal": {}, }, "triggered_by": ["postDevcontainerStart"], } @@ -143,7 +140,6 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> "image": "x", }, "machine": {}, - "terminal": {}, }, "triggered_by": ["postEnvironmentStart"], } From 368d727b1704acb0d8438dce44ec4d8947054aaa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 16:18:51 +0000 Subject: [PATCH 009/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 45335695..4764b18b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ffc8cf0ed565636356f70cba5521094ee367d0b30bacb266a70f4ea98889c74c.yml -openapi_spec_hash: bf1abc17445dd410c3c3f8607c5a4937 -config_hash: 843d5f356bfb6295862722a8d71d08e0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-b9c344a37f60a4c5459a97503d3a06356209ebc50086ffef43305e85be508183.yml +openapi_spec_hash: 3e2a15c9cc346e05f8e6406acb4d0549 +config_hash: 93d77fe2271e1d5867977aa102e3c944 From 23bc7c313ba3f0d6e6b34802b2de17439a7befe0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 16:57:58 +0000 Subject: [PATCH 010/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4764b18b..14a1d63c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-b9c344a37f60a4c5459a97503d3a06356209ebc50086ffef43305e85be508183.yml -openapi_spec_hash: 3e2a15c9cc346e05f8e6406acb4d0549 -config_hash: 93d77fe2271e1d5867977aa102e3c944 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5ffe9b518bd3a240d0262f71b53b207da01ef03d7532ce3c906ec42401efec96.yml +openapi_spec_hash: 4abaf13d8709ebb1af302ecab14f74df +config_hash: 459bd8a85f3cca1801bd9d5c3462cee9 From 4a1affd0a6f9b13ebd30894bcbfecd4ce9597725 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 17:47:40 +0000 Subject: [PATCH 011/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 14a1d63c..e293ff0a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5ffe9b518bd3a240d0262f71b53b207da01ef03d7532ce3c906ec42401efec96.yml -openapi_spec_hash: 4abaf13d8709ebb1af302ecab14f74df -config_hash: 459bd8a85f3cca1801bd9d5c3462cee9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5899adbe0e83d93afad45dbe14d4c83c92ed9a68021602f2b6a567b00471c190.yml +openapi_spec_hash: d851857366f97e4f4e9562bbea1b2219 +config_hash: d73914a733b27d121d59aa43bc7c710e From eeedd00d580a6ef1f9536751a9130b84665fed70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 05:44:24 +0000 Subject: [PATCH 012/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e293ff0a..7ff68c57 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5899adbe0e83d93afad45dbe14d4c83c92ed9a68021602f2b6a567b00471c190.yml -openapi_spec_hash: d851857366f97e4f4e9562bbea1b2219 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-e6bd64d0391186862b785448f5a2dd781a89415c8edf2d7a365eed6ce7870812.yml +openapi_spec_hash: eab33ae9c929dead86c0c04598c5c71c config_hash: d73914a733b27d121d59aa43bc7c710e From db5b24c5f4260914ab0d5583562bb7e8388eaca5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 08:06:35 +0000 Subject: [PATCH 013/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7ff68c57..bb79b8b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-e6bd64d0391186862b785448f5a2dd781a89415c8edf2d7a365eed6ce7870812.yml -openapi_spec_hash: eab33ae9c929dead86c0c04598c5c71c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c96c88897f8d19fbdbc198611166980daa0448074a92a083b3db2014e670c474.yml +openapi_spec_hash: 4a1f0f6bbd23a8943700da97162255ab config_hash: d73914a733b27d121d59aa43bc7c710e From d79d4d49ef41a889a81a0d484616fca442849356 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 09:39:46 +0000 Subject: [PATCH 014/211] feat(api): add old_path field to ContentGitChangedFile --- .stats.yml | 4 ++-- src/gitpod/types/environment_status.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bb79b8b0..d879ff20 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c96c88897f8d19fbdbc198611166980daa0448074a92a083b3db2014e670c474.yml -openapi_spec_hash: 4a1f0f6bbd23a8943700da97162255ab +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-95aec32d54661e6522d78deca8c182908b30bae1db5762b365a3ef338dbaccfa.yml +openapi_spec_hash: cd08bb12843c15e0fe783957866deb83 config_hash: d73914a733b27d121d59aa43bc7c710e diff --git a/src/gitpod/types/environment_status.py b/src/gitpod/types/environment_status.py index 45ad12ca..d5ed5c65 100644 --- a/src/gitpod/types/environment_status.py +++ b/src/gitpod/types/environment_status.py @@ -91,6 +91,12 @@ class ContentGitChangedFile(BaseModel): ] = FieldInfo(alias="changeType", default=None) """ChangeType is the type of change that happened to the file""" + old_path: Optional[str] = FieldInfo(alias="oldPath", default=None) + """ + old_path is the previous path of the file before a rename or copy. Only set when + change_type is RENAMED or COPIED. + """ + path: Optional[str] = None """path is the path of the file""" From 5c02854efdc2874535d3d7867823048d5e8d4693 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:57:23 +0000 Subject: [PATCH 015/211] fix: ensure file data are only sent as 1 parameter --- src/gitpod/_utils/_utils.py | 5 +++-- tests/test_extract_files.py | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/gitpod/_utils/_utils.py b/src/gitpod/_utils/_utils.py index eec7f4a1..63b8cd60 100644 --- a/src/gitpod/_utils/_utils.py +++ b/src/gitpod/_utils/_utils.py @@ -86,8 +86,9 @@ def _extract_items( index += 1 if is_dict(obj): try: - # We are at the last entry in the path so we must remove the field - if (len(path)) == index: + # Remove the field if there are no more dict keys in the path, + # only "" traversal markers or end. + if all(p == "" for p in path[index:]): item = obj.pop(key) else: item = obj[key] diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index 0ca5a8dc..a9d8b167 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -35,6 +35,15 @@ def test_multiple_files() -> None: assert query == {"documents": [{}, {}]} +def test_top_level_file_array() -> None: + query = {"files": [b"file one", b"file two"], "title": "hello"} + assert extract_files(query, paths=[["files", ""]]) == [ + ("files[]", b"file one"), + ("files[]", b"file two"), + ] + assert query == {"title": "hello"} + + @pytest.mark.parametrize( "query,paths,expected", [ From 5a292cb1ef87a0dd73d93445707412d25c0e95e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:59:08 +0000 Subject: [PATCH 016/211] docs(api): update trigger usage note in AutomationTrigger --- .stats.yml | 4 ++-- src/gitpod/types/shared/automation_trigger.py | 2 +- src/gitpod/types/shared_params/automation_trigger.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index d879ff20..f0b85f43 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-95aec32d54661e6522d78deca8c182908b30bae1db5762b365a3ef338dbaccfa.yml -openapi_spec_hash: cd08bb12843c15e0fe783957866deb83 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-803e9a382bb3f4d9b6ef7b1dd12c5541bf93608d3f4c240e99054929130f260b.yml +openapi_spec_hash: e2eae7e0a5a1fc83f3af40662b1ffbd1 config_hash: d73914a733b27d121d59aa43bc7c710e diff --git a/src/gitpod/types/shared/automation_trigger.py b/src/gitpod/types/shared/automation_trigger.py index 8ffd732b..3d1fafb8 100644 --- a/src/gitpod/types/shared/automation_trigger.py +++ b/src/gitpod/types/shared/automation_trigger.py @@ -20,7 +20,7 @@ class AutomationTrigger(BaseModel): The `prebuild` field starts the automation during a prebuild of an environment. This phase does not have user secrets available. The `before_snapshot` field triggers the automation after all prebuild tasks complete but before the snapshot is taken. This is used for tasks that need to run last during prebuilds, such as IDE warmup. - Note: The prebuild and before_snapshot triggers can only be used with tasks, not services. + Note: The before_snapshot trigger can only be used with tasks, not services. """ before_snapshot: Optional[bool] = FieldInfo(alias="beforeSnapshot", default=None) diff --git a/src/gitpod/types/shared_params/automation_trigger.py b/src/gitpod/types/shared_params/automation_trigger.py index 27dc462b..1020f005 100644 --- a/src/gitpod/types/shared_params/automation_trigger.py +++ b/src/gitpod/types/shared_params/automation_trigger.py @@ -20,7 +20,7 @@ class AutomationTrigger(TypedDict, total=False): The `prebuild` field starts the automation during a prebuild of an environment. This phase does not have user secrets available. The `before_snapshot` field triggers the automation after all prebuild tasks complete but before the snapshot is taken. This is used for tasks that need to run last during prebuilds, such as IDE warmup. - Note: The prebuild and before_snapshot triggers can only be used with tasks, not services. + Note: The before_snapshot trigger can only be used with tasks, not services. """ before_snapshot: Annotated[bool, PropertyInfo(alias="beforeSnapshot")] From af2c44e64fac19bf848c4325e0b39b183c998e74 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 09:38:45 +0000 Subject: [PATCH 017/211] feat(api): add prebuild trigger value to environments automations --- .stats.yml | 4 ++-- src/gitpod/types/environments/automations_file_param.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index f0b85f43..71f636ca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-803e9a382bb3f4d9b6ef7b1dd12c5541bf93608d3f4c240e99054929130f260b.yml -openapi_spec_hash: e2eae7e0a5a1fc83f3af40662b1ffbd1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0c7c44116a92283a25ed199143e085b16a97dd804e0199e0058ec8ba61fa82a6.yml +openapi_spec_hash: 52646ebb63427df86c33aca56688b9a7 config_hash: d73914a733b27d121d59aa43bc7c710e diff --git a/src/gitpod/types/environments/automations_file_param.py b/src/gitpod/types/environments/automations_file_param.py index 226782ce..68deffa5 100644 --- a/src/gitpod/types/environments/automations_file_param.py +++ b/src/gitpod/types/environments/automations_file_param.py @@ -54,7 +54,8 @@ class Services(TypedDict, total=False): runs_on: Annotated[RunsOn, PropertyInfo(alias="runsOn")] triggered_by: Annotated[ - List[Literal["manual", "postEnvironmentStart", "postDevcontainerStart"]], PropertyInfo(alias="triggeredBy") + List[Literal["manual", "postEnvironmentStart", "postDevcontainerStart", "prebuild"]], + PropertyInfo(alias="triggeredBy"), ] From 201d9c6afdcc6f550f9bb0a7ba012ad70b754776 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 12:37:27 +0000 Subject: [PATCH 018/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 71f636ca..c99a6553 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0c7c44116a92283a25ed199143e085b16a97dd804e0199e0058ec8ba61fa82a6.yml -openapi_spec_hash: 52646ebb63427df86c33aca56688b9a7 -config_hash: d73914a733b27d121d59aa43bc7c710e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-eb884d2b7e612a947d702820ae4cb60dbb9fa1b4127982ae8df8bc31cfe2222e.yml +openapi_spec_hash: 9a49114388edad25943a8660407db780 +config_hash: 25c7c72de891ed240ee62c4fb9a99756 From ad622d8589ad7caa87621919ec2d0217c21791cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 05:20:51 +0000 Subject: [PATCH 019/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c99a6553..9cc0d2e6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-eb884d2b7e612a947d702820ae4cb60dbb9fa1b4127982ae8df8bc31cfe2222e.yml -openapi_spec_hash: 9a49114388edad25943a8660407db780 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c148bac55f33b187604bab867c9b75124734cc8e4e72d4087e5a8e9b7472adff.yml +openapi_spec_hash: b98efd1fad1247c31ca39e482a151040 config_hash: 25c7c72de891ed240ee62c4fb9a99756 From 077b6622dc4e21a2033c8275c46716286a6515b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:43:06 +0000 Subject: [PATCH 020/211] feat(api): add integration_id field, make webhook_id required in pull_request trigger --- .stats.yml | 4 ++-- src/gitpod/types/workflow_trigger.py | 7 +++++++ src/gitpod/types/workflow_trigger_param.py | 7 +++++++ tests/api_resources/test_automations.py | 4 ++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9cc0d2e6..96f9664b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c148bac55f33b187604bab867c9b75124734cc8e4e72d4087e5a8e9b7472adff.yml -openapi_spec_hash: b98efd1fad1247c31ca39e482a151040 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5f25564854b84c1757f66d81caaa50f47db40dc697d4cc91877c2f4e59fa16aa.yml +openapi_spec_hash: 132db01aff2713a9a0a4d9e858ec1bba config_hash: 25c7c72de891ed240ee62c4fb9a99756 diff --git a/src/gitpod/types/workflow_trigger.py b/src/gitpod/types/workflow_trigger.py index 4b044761..f0a3f0e9 100644 --- a/src/gitpod/types/workflow_trigger.py +++ b/src/gitpod/types/workflow_trigger.py @@ -31,6 +31,13 @@ class PullRequest(BaseModel): ] ] = None + integration_id: Optional[str] = FieldInfo(alias="integrationId", default=None) + """ + integration_id is the optional ID of an integration that acts as the source of + webhook events. When set, the trigger will be activated when the webhook + receives events. + """ + webhook_id: Optional[str] = FieldInfo(alias="webhookId", default=None) """ webhook_id is the optional ID of a webhook that this trigger is bound to. When diff --git a/src/gitpod/types/workflow_trigger_param.py b/src/gitpod/types/workflow_trigger_param.py index ed28c9f8..362991a5 100644 --- a/src/gitpod/types/workflow_trigger_param.py +++ b/src/gitpod/types/workflow_trigger_param.py @@ -29,6 +29,13 @@ class PullRequest(TypedDict, total=False): ] ] + integration_id: Annotated[Optional[str], PropertyInfo(alias="integrationId")] + """ + integration_id is the optional ID of an integration that acts as the source of + webhook events. When set, the trigger will be activated when the webhook + receives events. + """ + webhook_id: Annotated[Optional[str], PropertyInfo(alias="webhookId")] """ webhook_id is the optional ID of a webhook that this trigger is bound to. When diff --git a/tests/api_resources/test_automations.py b/tests/api_resources/test_automations.py index f1412921..943c0d0a 100644 --- a/tests/api_resources/test_automations.py +++ b/tests/api_resources/test_automations.py @@ -113,6 +113,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "manual": {}, "pull_request": { "events": ["PULL_REQUEST_EVENT_UNSPECIFIED"], + "integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, "time": {"cron_expression": "cronExpression"}, @@ -256,6 +257,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: "manual": {}, "pull_request": { "events": ["PULL_REQUEST_EVENT_UNSPECIFIED"], + "integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, "time": {"cron_expression": "cronExpression"}, @@ -793,6 +795,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "manual": {}, "pull_request": { "events": ["PULL_REQUEST_EVENT_UNSPECIFIED"], + "integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, "time": {"cron_expression": "cronExpression"}, @@ -936,6 +939,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> "manual": {}, "pull_request": { "events": ["PULL_REQUEST_EVENT_UNSPECIFIED"], + "integration_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "webhook_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, "time": {"cron_expression": "cronExpression"}, From 59fa709bbf30705ae1aadf99bc784a79334d2438 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 07:01:45 +0000 Subject: [PATCH 021/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 96f9664b..4ed0bd13 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5f25564854b84c1757f66d81caaa50f47db40dc697d4cc91877c2f4e59fa16aa.yml -openapi_spec_hash: 132db01aff2713a9a0a4d9e858ec1bba +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-baa75e208ad1eecd8764ebbf015adb7b94e929910b0f4d5520710ec7b3555a5e.yml +openapi_spec_hash: 01b460f045b05da799c85a5813321605 config_hash: 25c7c72de891ed240ee62c4fb9a99756 From c7f52384568a1bd3fd36e5616b81a3b1599154bf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 07:49:24 +0000 Subject: [PATCH 022/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4ed0bd13..3043de41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-baa75e208ad1eecd8764ebbf015adb7b94e929910b0f4d5520710ec7b3555a5e.yml -openapi_spec_hash: 01b460f045b05da799c85a5813321605 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-6ec0a3dc7648f06e6ab5f66e8b441dae208e3664646194942afab30c2838d754.yml +openapi_spec_hash: 666f25bc2bafe875f1816feb0efab84f config_hash: 25c7c72de891ed240ee62c4fb9a99756 From e77b613ace22d0bf6e795719ea42efbb49cdc58b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 18:32:32 +0000 Subject: [PATCH 023/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3043de41..1d52292c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-6ec0a3dc7648f06e6ab5f66e8b441dae208e3664646194942afab30c2838d754.yml -openapi_spec_hash: 666f25bc2bafe875f1816feb0efab84f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f570506d82942fdb3a9f4b7a5d132ed844382dd75805f29dfeeeaf5204053301.yml +openapi_spec_hash: cd8bd23d7ff803f061fce04b772d9466 config_hash: 25c7c72de891ed240ee62c4fb9a99756 From c29b09596d2d87caaea047e61613a333c2fe4e31 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 07:13:29 +0000 Subject: [PATCH 024/211] feat(api): add port_authentication capability to runner_capability --- .stats.yml | 4 ++-- src/gitpod/types/runner_capability.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1d52292c..2b98967d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f570506d82942fdb3a9f4b7a5d132ed844382dd75805f29dfeeeaf5204053301.yml -openapi_spec_hash: cd8bd23d7ff803f061fce04b772d9466 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f3b2ada71e17af494850c3c8b1b00cf5c6625b26f19f22d289ba37173f3019f5.yml +openapi_spec_hash: efd6b17f7ccf946e8888236ea24111d2 config_hash: 25c7c72de891ed240ee62c4fb9a99756 diff --git a/src/gitpod/types/runner_capability.py b/src/gitpod/types/runner_capability.py index c2e50b46..2e473ac1 100644 --- a/src/gitpod/types/runner_capability.py +++ b/src/gitpod/types/runner_capability.py @@ -18,4 +18,5 @@ "RUNNER_CAPABILITY_RUNNER_SIDE_AGENT", "RUNNER_CAPABILITY_WARM_POOL", "RUNNER_CAPABILITY_ASG_WARM_POOL", + "RUNNER_CAPABILITY_PORT_AUTHENTICATION", ] From 0352b9bee9b4a2aa8c132c934711a9a98d44b356 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 09:39:47 +0000 Subject: [PATCH 025/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2b98967d..8ba66106 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f3b2ada71e17af494850c3c8b1b00cf5c6625b26f19f22d289ba37173f3019f5.yml -openapi_spec_hash: efd6b17f7ccf946e8888236ea24111d2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-aaa301821ff7b0f6e0a55a197a2cc86f27b8117cc5011fef261eccde7fd64928.yml +openapi_spec_hash: ed6ad2ad221e8abfef79ac7f3f2667c3 config_hash: 25c7c72de891ed240ee62c4fb9a99756 From 72091d606c9087409ad26fcb8d4ff18ea8929eef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:34:41 +0000 Subject: [PATCH 026/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8ba66106..3684387f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-aaa301821ff7b0f6e0a55a197a2cc86f27b8117cc5011fef261eccde7fd64928.yml -openapi_spec_hash: ed6ad2ad221e8abfef79ac7f3f2667c3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-83988f0b809f1fac483b4a3600397960b51b588aad5bc2483ec1234b72e4cff7.yml +openapi_spec_hash: 0c46d3bd9c1354e06feed3a85651c406 config_hash: 25c7c72de891ed240ee62c4fb9a99756 From 443b04e44954bb5a1ee26ad1bc71e92e7df44921 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 22:34:03 +0000 Subject: [PATCH 027/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3684387f..d8395430 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-83988f0b809f1fac483b4a3600397960b51b588aad5bc2483ec1234b72e4cff7.yml -openapi_spec_hash: 0c46d3bd9c1354e06feed3a85651c406 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5136c01edc5507b8b534b7239a1f70e53b1860cbab729a99e33d65a114cb8097.yml +openapi_spec_hash: ca515ab45b8858fbc806f73ce6270702 config_hash: 25c7c72de891ed240ee62c4fb9a99756 From 242a3ab60ed3580fd9488858727294ed86568ccf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 12:30:55 +0000 Subject: [PATCH 028/211] feat(api): add PULL_REQUEST_EVENT_REVIEW_REQUESTED to workflow_trigger events --- .stats.yml | 4 ++-- src/gitpod/types/workflow_trigger.py | 1 + src/gitpod/types/workflow_trigger_param.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d8395430..983ecb08 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-5136c01edc5507b8b534b7239a1f70e53b1860cbab729a99e33d65a114cb8097.yml -openapi_spec_hash: ca515ab45b8858fbc806f73ce6270702 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-2cf38267930eaef11e8ba7d229c924d43f3e22d614aa586ad1ddffe65b9b4548.yml +openapi_spec_hash: e2ffe61e23fa87d7f8932b8d7764ee76 config_hash: 25c7c72de891ed240ee62c4fb9a99756 diff --git a/src/gitpod/types/workflow_trigger.py b/src/gitpod/types/workflow_trigger.py index f0a3f0e9..cefa42fc 100644 --- a/src/gitpod/types/workflow_trigger.py +++ b/src/gitpod/types/workflow_trigger.py @@ -27,6 +27,7 @@ class PullRequest(BaseModel): "PULL_REQUEST_EVENT_MERGED", "PULL_REQUEST_EVENT_CLOSED", "PULL_REQUEST_EVENT_READY_FOR_REVIEW", + "PULL_REQUEST_EVENT_REVIEW_REQUESTED", ] ] ] = None diff --git a/src/gitpod/types/workflow_trigger_param.py b/src/gitpod/types/workflow_trigger_param.py index 362991a5..ee1ef3c1 100644 --- a/src/gitpod/types/workflow_trigger_param.py +++ b/src/gitpod/types/workflow_trigger_param.py @@ -26,6 +26,7 @@ class PullRequest(TypedDict, total=False): "PULL_REQUEST_EVENT_MERGED", "PULL_REQUEST_EVENT_CLOSED", "PULL_REQUEST_EVENT_READY_FOR_REVIEW", + "PULL_REQUEST_EVENT_REVIEW_REQUESTED", ] ] From 74af5338d7f6447df5a6464a2b2ef893c3bf4f6e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 12:32:29 +0000 Subject: [PATCH 029/211] feat(api): add SUPPORTED_MODEL_OPUS_4_7 to agent_execution Status --- .stats.yml | 4 ++-- src/gitpod/types/agent_execution.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 983ecb08..b0ef81ab 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-2cf38267930eaef11e8ba7d229c924d43f3e22d614aa586ad1ddffe65b9b4548.yml -openapi_spec_hash: e2ffe61e23fa87d7f8932b8d7764ee76 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0e20f536f7f833dd7205eaadd72826bd527a3ed91fcb006323e3232550abb04e.yml +openapi_spec_hash: 7a96aca1a75735a1664edd091b277940 config_hash: 25c7c72de891ed240ee62c4fb9a99756 diff --git a/src/gitpod/types/agent_execution.py b/src/gitpod/types/agent_execution.py index 07f02eda..02be3ac1 100644 --- a/src/gitpod/types/agent_execution.py +++ b/src/gitpod/types/agent_execution.py @@ -455,6 +455,7 @@ class Status(BaseModel): "SUPPORTED_MODEL_OPUS_4_5_EXTENDED", "SUPPORTED_MODEL_OPUS_4_6", "SUPPORTED_MODEL_OPUS_4_6_EXTENDED", + "SUPPORTED_MODEL_OPUS_4_7", "SUPPORTED_MODEL_HAIKU_4_5", "SUPPORTED_MODEL_OPENAI_4O", "SUPPORTED_MODEL_OPENAI_4O_MINI", From cb792b633104ff26eb799d8c32703920213ec23e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Apr 2026 17:38:13 +0000 Subject: [PATCH 030/211] perf(client): optimize file structure copying in multipart requests --- src/gitpod/_files.py | 56 ++++++++++++++++++-- src/gitpod/_utils/__init__.py | 1 - src/gitpod/_utils/_utils.py | 15 ------ tests/test_deepcopy.py | 58 -------------------- tests/test_files.py | 99 ++++++++++++++++++++++++++++++++++- 5 files changed, 151 insertions(+), 78 deletions(-) delete mode 100644 tests/test_deepcopy.py diff --git a/src/gitpod/_files.py b/src/gitpod/_files.py index cc14c14f..0fdce17b 100644 --- a/src/gitpod/_files.py +++ b/src/gitpod/_files.py @@ -3,8 +3,8 @@ import io import os import pathlib -from typing import overload -from typing_extensions import TypeGuard +from typing import Sequence, cast, overload +from typing_extensions import TypeVar, TypeGuard import anyio @@ -17,7 +17,9 @@ HttpxFileContent, HttpxRequestFiles, ) -from ._utils import is_tuple_t, is_mapping_t, is_sequence_t +from ._utils import is_list, is_mapping, is_tuple_t, is_mapping_t, is_sequence_t + +_T = TypeVar("_T") def is_base64_file_input(obj: object) -> TypeGuard[Base64FileInput]: @@ -121,3 +123,51 @@ async def async_read_file_content(file: FileContent) -> HttpxFileContent: return await anyio.Path(file).read_bytes() return file + + +def deepcopy_with_paths(item: _T, paths: Sequence[Sequence[str]]) -> _T: + """Copy only the containers along the given paths. + + Used to guard against mutation by extract_files without copying the entire structure. + Only dicts and lists that lie on a path are copied; everything else + is returned by reference. + + For example, given paths=[["foo", "files", "file"]] and the structure: + { + "foo": { + "bar": {"baz": {}}, + "files": {"file": } + } + } + The root dict, "foo", and "files" are copied (they lie on the path). + "bar" and "baz" are returned by reference (off the path). + """ + return _deepcopy_with_paths(item, paths, 0) + + +def _deepcopy_with_paths(item: _T, paths: Sequence[Sequence[str]], index: int) -> _T: + if not paths: + return item + if is_mapping(item): + key_to_paths: dict[str, list[Sequence[str]]] = {} + for path in paths: + if index < len(path): + key_to_paths.setdefault(path[index], []).append(path) + + # if no path continues through this mapping, it won't be mutated and copying it is redundant + if not key_to_paths: + return item + + result = dict(item) + for key, subpaths in key_to_paths.items(): + if key in result: + result[key] = _deepcopy_with_paths(result[key], subpaths, index + 1) + return cast(_T, result) + if is_list(item): + array_paths = [path for path in paths if index < len(path) and path[index] == ""] + + # if no path expects a list here, nothing will be mutated inside it - return by reference + if not array_paths: + return cast(_T, item) + return cast(_T, [_deepcopy_with_paths(entry, array_paths, index + 1) for entry in item]) + return item diff --git a/src/gitpod/_utils/__init__.py b/src/gitpod/_utils/__init__.py index 10cb66d2..1c090e51 100644 --- a/src/gitpod/_utils/__init__.py +++ b/src/gitpod/_utils/__init__.py @@ -24,7 +24,6 @@ coerce_integer as coerce_integer, file_from_path as file_from_path, strip_not_given as strip_not_given, - deepcopy_minimal as deepcopy_minimal, get_async_library as get_async_library, maybe_coerce_float as maybe_coerce_float, get_required_header as get_required_header, diff --git a/src/gitpod/_utils/_utils.py b/src/gitpod/_utils/_utils.py index 63b8cd60..771859f5 100644 --- a/src/gitpod/_utils/_utils.py +++ b/src/gitpod/_utils/_utils.py @@ -177,21 +177,6 @@ def is_iterable(obj: object) -> TypeGuard[Iterable[object]]: return isinstance(obj, Iterable) -def deepcopy_minimal(item: _T) -> _T: - """Minimal reimplementation of copy.deepcopy() that will only copy certain object types: - - - mappings, e.g. `dict` - - list - - This is done for performance reasons. - """ - if is_mapping(item): - return cast(_T, {k: deepcopy_minimal(v) for k, v in item.items()}) - if is_list(item): - return cast(_T, [deepcopy_minimal(entry) for entry in item]) - return item - - # copied from https://github.com/Rapptz/RoboDanny def human_join(seq: Sequence[str], *, delim: str = ", ", final: str = "or") -> str: size = len(seq) diff --git a/tests/test_deepcopy.py b/tests/test_deepcopy.py deleted file mode 100644 index c498f531..00000000 --- a/tests/test_deepcopy.py +++ /dev/null @@ -1,58 +0,0 @@ -from gitpod._utils import deepcopy_minimal - - -def assert_different_identities(obj1: object, obj2: object) -> None: - assert obj1 == obj2 - assert id(obj1) != id(obj2) - - -def test_simple_dict() -> None: - obj1 = {"foo": "bar"} - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - - -def test_nested_dict() -> None: - obj1 = {"foo": {"bar": True}} - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - assert_different_identities(obj1["foo"], obj2["foo"]) - - -def test_complex_nested_dict() -> None: - obj1 = {"foo": {"bar": [{"hello": "world"}]}} - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - assert_different_identities(obj1["foo"], obj2["foo"]) - assert_different_identities(obj1["foo"]["bar"], obj2["foo"]["bar"]) - assert_different_identities(obj1["foo"]["bar"][0], obj2["foo"]["bar"][0]) - - -def test_simple_list() -> None: - obj1 = ["a", "b", "c"] - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - - -def test_nested_list() -> None: - obj1 = ["a", [1, 2, 3]] - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - assert_different_identities(obj1[1], obj2[1]) - - -class MyObject: ... - - -def test_ignores_other_types() -> None: - # custom classes - my_obj = MyObject() - obj1 = {"foo": my_obj} - obj2 = deepcopy_minimal(obj1) - assert_different_identities(obj1, obj2) - assert obj1["foo"] is my_obj - - # tuples - obj3 = ("a", "b") - obj4 = deepcopy_minimal(obj3) - assert obj3 is obj4 diff --git a/tests/test_files.py b/tests/test_files.py index efde0d4e..2e09e8a4 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -4,7 +4,8 @@ import pytest from dirty_equals import IsDict, IsList, IsBytes, IsTuple -from gitpod._files import to_httpx_files, async_to_httpx_files +from gitpod._files import to_httpx_files, deepcopy_with_paths, async_to_httpx_files +from gitpod._utils import extract_files readme_path = Path(__file__).parent.parent.joinpath("README.md") @@ -49,3 +50,99 @@ def test_string_not_allowed() -> None: "file": "foo", # type: ignore } ) + + +def assert_different_identities(obj1: object, obj2: object) -> None: + assert obj1 == obj2 + assert obj1 is not obj2 + + +class TestDeepcopyWithPaths: + def test_copies_top_level_dict(self) -> None: + original = {"file": b"data", "other": "value"} + result = deepcopy_with_paths(original, [["file"]]) + assert_different_identities(result, original) + + def test_file_value_is_same_reference(self) -> None: + file_bytes = b"contents" + original = {"file": file_bytes} + result = deepcopy_with_paths(original, [["file"]]) + assert_different_identities(result, original) + assert result["file"] is file_bytes + + def test_list_popped_wholesale(self) -> None: + files = [b"f1", b"f2"] + original = {"files": files, "title": "t"} + result = deepcopy_with_paths(original, [["files", ""]]) + assert_different_identities(result, original) + result_files = result["files"] + assert isinstance(result_files, list) + assert_different_identities(result_files, files) + + def test_nested_array_path_copies_list_and_elements(self) -> None: + elem1 = {"file": b"f1", "extra": 1} + elem2 = {"file": b"f2", "extra": 2} + original = {"items": [elem1, elem2]} + result = deepcopy_with_paths(original, [["items", "", "file"]]) + assert_different_identities(result, original) + result_items = result["items"] + assert isinstance(result_items, list) + assert_different_identities(result_items, original["items"]) + assert_different_identities(result_items[0], elem1) + assert_different_identities(result_items[1], elem2) + + def test_empty_paths_returns_same_object(self) -> None: + original = {"foo": "bar"} + result = deepcopy_with_paths(original, []) + assert result is original + + def test_multiple_paths(self) -> None: + f1 = b"file1" + f2 = b"file2" + original = {"a": f1, "b": f2, "c": "unchanged"} + result = deepcopy_with_paths(original, [["a"], ["b"]]) + assert_different_identities(result, original) + assert result["a"] is f1 + assert result["b"] is f2 + assert result["c"] is original["c"] + + def test_extract_files_does_not_mutate_original_top_level(self) -> None: + file_bytes = b"contents" + original = {"file": file_bytes, "other": "value"} + + copied = deepcopy_with_paths(original, [["file"]]) + extracted = extract_files(copied, paths=[["file"]]) + + assert extracted == [("file", file_bytes)] + assert original == {"file": file_bytes, "other": "value"} + assert copied == {"other": "value"} + + def test_extract_files_does_not_mutate_original_nested_array_path(self) -> None: + file1 = b"f1" + file2 = b"f2" + original = { + "items": [ + {"file": file1, "extra": 1}, + {"file": file2, "extra": 2}, + ], + "title": "example", + } + + copied = deepcopy_with_paths(original, [["items", "", "file"]]) + extracted = extract_files(copied, paths=[["items", "", "file"]]) + + assert extracted == [("items[][file]", file1), ("items[][file]", file2)] + assert original == { + "items": [ + {"file": file1, "extra": 1}, + {"file": file2, "extra": 2}, + ], + "title": "example", + } + assert copied == { + "items": [ + {"extra": 1}, + {"extra": 2}, + ], + "title": "example", + } From ea300f4314c14529c02ffec1e38f474d8a426844 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:51:47 +0000 Subject: [PATCH 031/211] feat(api): add UserInputMetadata type --- .stats.yml | 6 +++--- api.md | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index b0ef81ab..340b6728 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0e20f536f7f833dd7205eaadd72826bd527a3ed91fcb006323e3232550abb04e.yml -openapi_spec_hash: 7a96aca1a75735a1664edd091b277940 -config_hash: 25c7c72de891ed240ee62c4fb9a99756 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ac173b64bb40160fa60a528c250b18b70b60676d8d639d22065a430a40e6406a.yml +openapi_spec_hash: 10763c4df593dae81fe9729e8a6ff799 +config_hash: d579aac01b686dadf777791467e135dd diff --git a/api.md b/api.md index dbd40b76..178c06b3 100644 --- a/api.md +++ b/api.md @@ -75,6 +75,7 @@ from gitpod.types import ( Role, Type, UserInputBlock, + UserInputMetadata, WakeEvent, AgentCreateExecutionConversationTokenResponse, AgentCreatePromptResponse, From 5c7fa85594b4a9ce34dcbbe112e31ffa51c1757b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 14:10:07 +0000 Subject: [PATCH 032/211] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 340b6728..41e21590 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ac173b64bb40160fa60a528c250b18b70b60676d8d639d22065a430a40e6406a.yml openapi_spec_hash: 10763c4df593dae81fe9729e8a6ff799 -config_hash: d579aac01b686dadf777791467e135dd +config_hash: bb4b1641dcadc46913d9be1cb461ad7b From 7eb2fad98d3dfc8024197ef3e86c89b9f5483ffe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 16:09:14 +0000 Subject: [PATCH 033/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 41e21590..c44ca440 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-ac173b64bb40160fa60a528c250b18b70b60676d8d639d22065a430a40e6406a.yml -openapi_spec_hash: 10763c4df593dae81fe9729e8a6ff799 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0eca3ab72da589e2e8bfb64d2e635db971bf98d990d8c6d36d61c2937571622c.yml +openapi_spec_hash: cc41f33b3befb78916300882eeb44b72 config_hash: bb4b1641dcadc46913d9be1cb461ad7b From 54503f5295a703ee855eac4c11694d2bbe465d13 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 10:41:02 +0000 Subject: [PATCH 034/211] feat(api): add SUPPORTED_MODEL_OPENAI_AUTO to agent_execution status --- .stats.yml | 6 +++--- src/gitpod/types/agent_execution.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index c44ca440..f1758b6f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0eca3ab72da589e2e8bfb64d2e635db971bf98d990d8c6d36d61c2937571622c.yml -openapi_spec_hash: cc41f33b3befb78916300882eeb44b72 -config_hash: bb4b1641dcadc46913d9be1cb461ad7b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-e7101c6bd027d5c69246e02062396cecbe9eb5655e7a9e9f34d57ebdea6a9c1b.yml +openapi_spec_hash: 9ea4f9272509d3c8867735933d371070 +config_hash: d579aac01b686dadf777791467e135dd diff --git a/src/gitpod/types/agent_execution.py b/src/gitpod/types/agent_execution.py index 02be3ac1..102b08ca 100644 --- a/src/gitpod/types/agent_execution.py +++ b/src/gitpod/types/agent_execution.py @@ -461,6 +461,7 @@ class Status(BaseModel): "SUPPORTED_MODEL_OPENAI_4O_MINI", "SUPPORTED_MODEL_OPENAI_O1", "SUPPORTED_MODEL_OPENAI_O1_MINI", + "SUPPORTED_MODEL_OPENAI_AUTO", ] ] = FieldInfo(alias="supportedModel", default=None) """supported_model is the LLM model being used by the agent execution.""" From 5f05caacfd1a55617d435845771e28503eff687c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:56:05 +0000 Subject: [PATCH 035/211] chore(internal): more robust bootstrap script --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index b430fee3..fe8451e4 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd "$(dirname "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response From 846c6f80300f40a4ea96b8096888ba7638d43350 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 16:53:14 +0000 Subject: [PATCH 036/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f1758b6f..e9f120d7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-e7101c6bd027d5c69246e02062396cecbe9eb5655e7a9e9f34d57ebdea6a9c1b.yml -openapi_spec_hash: 9ea4f9272509d3c8867735933d371070 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-513d76e17d0237b8a068d7aaa38427429b88432ebdf379dcef8bc12e45391471.yml +openapi_spec_hash: 82fb97ed0d6bf7515e79b442eedf1028 config_hash: d579aac01b686dadf777791467e135dd From d0d62cf61bd20912adb9cbb6f0f32a67065a566b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 05:21:18 +0000 Subject: [PATCH 037/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e9f120d7..c6cf393d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-513d76e17d0237b8a068d7aaa38427429b88432ebdf379dcef8bc12e45391471.yml -openapi_spec_hash: 82fb97ed0d6bf7515e79b442eedf1028 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-626284323060c0fad499fdb2041944dfb24eafe88ef53bb29aa637664aa0b619.yml +openapi_spec_hash: ad17546e9e0a56aee371b9a7bfc38eb4 config_hash: d579aac01b686dadf777791467e135dd From 5e7b9f3d7dd7af385ca75b17f01c1cab87da8cb6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 12:26:34 +0000 Subject: [PATCH 038/211] docs(types): mark is_admin deprecated in Organization model --- .stats.yml | 4 ++-- .../types/runner_list_scm_organizations_response.py | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6cf393d..49223517 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-626284323060c0fad499fdb2041944dfb24eafe88ef53bb29aa637664aa0b619.yml -openapi_spec_hash: ad17546e9e0a56aee371b9a7bfc38eb4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-efe85a39b9b9cde6b97eba5ee4d437231be5e730c682122a475cbce3c0b8afab.yml +openapi_spec_hash: 251284ebeda328cabe9120cb0041dc87 config_hash: d579aac01b686dadf777791467e135dd diff --git a/src/gitpod/types/runner_list_scm_organizations_response.py b/src/gitpod/types/runner_list_scm_organizations_response.py index 8e9db077..d089df57 100644 --- a/src/gitpod/types/runner_list_scm_organizations_response.py +++ b/src/gitpod/types/runner_list_scm_organizations_response.py @@ -12,8 +12,13 @@ class Organization(BaseModel): is_admin: Optional[bool] = FieldInfo(alias="isAdmin", default=None) """ - Whether the user has admin permissions in this organization. Admin permissions - typically allow creating organization-level webhooks. + Deprecated: this field is unused by all known consumers and is scheduled for + removal in a future release. Do not read it. + + Originally intended to gate organization-level webhook creation in the + dashboard, but that gating was never implemented. Populating this field on the + GitLab path requires a second fully-paginated ListGroups call, which is the main + reason we are deprecating it. """ name: Optional[str] = None From 14ad30a251e4f2819b245b96d7bab197131b4196 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 17:29:47 +0000 Subject: [PATCH 039/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 49223517..bc7328f9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-efe85a39b9b9cde6b97eba5ee4d437231be5e730c682122a475cbce3c0b8afab.yml -openapi_spec_hash: 251284ebeda328cabe9120cb0041dc87 -config_hash: d579aac01b686dadf777791467e135dd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-715182a0b2eb7ec05e17eaa8a5df88b5b4a1c42cb972cc1d17cdd5a059e22787.yml +openapi_spec_hash: 9ef9c72cb9727ac343d250c377627dee +config_hash: f35dbcdcd0d739add7d045e3ea0a7003 From 9236eb4173504e1205261bfc7a9c51a450b3a59c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 20:17:43 +0000 Subject: [PATCH 040/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bc7328f9..8aefc1e4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-715182a0b2eb7ec05e17eaa8a5df88b5b4a1c42cb972cc1d17cdd5a059e22787.yml -openapi_spec_hash: 9ef9c72cb9727ac343d250c377627dee +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-dcabf4f75cca898f84c8b5faac6dfd6a0bbbe653bb3b3b64f027de1e0c6a6cfc.yml +openapi_spec_hash: 2e8df4e214a2fdef1a3f690fa6765dfd config_hash: f35dbcdcd0d739add7d045e3ea0a7003 From c318e03c64b18ffdbb7e79a975f0a19d7f07685f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 06:38:20 +0000 Subject: [PATCH 041/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8aefc1e4..b207c5a7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-dcabf4f75cca898f84c8b5faac6dfd6a0bbbe653bb3b3b64f027de1e0c6a6cfc.yml -openapi_spec_hash: 2e8df4e214a2fdef1a3f690fa6765dfd -config_hash: f35dbcdcd0d739add7d045e3ea0a7003 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-2e21ce480356fd18cc413421d9d85ef46d7ebd7961518933cfb5b469799c57d7.yml +openapi_spec_hash: f558f68f695c3c21bf10252e3505fdf1 +config_hash: 52dce9b7b86eca30b5b126335592f962 From 333311aebaefb657861e2a9f6e8adb0f2abdd4dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 11:51:02 +0000 Subject: [PATCH 042/211] feat(api): add pagination and query parameter to runners.list_scm_organizations --- .stats.yml | 6 +- api.md | 2 +- src/gitpod/pagination.py | 53 +++++++++++++ src/gitpod/resources/runners/runners.py | 76 ++++++++++++++++--- .../runner_list_scm_organizations_params.py | 38 +++++++++- .../runner_list_scm_organizations_response.py | 11 +-- tests/api_resources/test_runners.py | 28 ++++--- 7 files changed, 182 insertions(+), 32 deletions(-) diff --git a/.stats.yml b/.stats.yml index b207c5a7..f88f2981 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-2e21ce480356fd18cc413421d9d85ef46d7ebd7961518933cfb5b469799c57d7.yml -openapi_spec_hash: f558f68f695c3c21bf10252e3505fdf1 -config_hash: 52dce9b7b86eca30b5b126335592f962 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-162fdc304a6f1f8e282b49c7cde2e2aa282e58045ac814869491340f932982d4.yml +openapi_spec_hash: 017607fc78184b5a49249ed134e1ad7c +config_hash: 4447d1e1149a80d1bec70d353fb8acbf diff --git a/api.md b/api.md index 178c06b3..0bc97406 100644 --- a/api.md +++ b/api.md @@ -710,7 +710,7 @@ Methods: - client.runners.check_repository_access(\*\*params) -> RunnerCheckRepositoryAccessResponse - client.runners.create_logs_token(\*\*params) -> RunnerCreateLogsTokenResponse - client.runners.create_runner_token(\*\*params) -> RunnerCreateRunnerTokenResponse -- client.runners.list_scm_organizations(\*\*params) -> RunnerListScmOrganizationsResponse +- client.runners.list_scm_organizations(\*\*params) -> SyncOrganizationsPage[RunnerListScmOrganizationsResponse] - client.runners.parse_context_url(\*\*params) -> RunnerParseContextURLResponse - client.runners.search_repositories(\*\*params) -> RunnerSearchRepositoriesResponse diff --git a/src/gitpod/pagination.py b/src/gitpod/pagination.py index b55ecc60..83771ae0 100644 --- a/src/gitpod/pagination.py +++ b/src/gitpod/pagination.py @@ -51,6 +51,9 @@ "MembersPagePagination", "SyncMembersPage", "AsyncMembersPage", + "OrganizationsPagePagination", + "SyncOrganizationsPage", + "AsyncOrganizationsPage", "OutputsPagePagination", "SyncOutputsPage", "AsyncOutputsPage", @@ -819,6 +822,56 @@ def next_page_info(self) -> Optional[PageInfo]: return PageInfo(params={"token": next_token}) +class OrganizationsPagePagination(BaseModel): + next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) + + +class SyncOrganizationsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): + organizations: List[_T] + pagination: Optional[OrganizationsPagePagination] = None + + @override + def _get_page_items(self) -> List[_T]: + organizations = self.organizations + if not organizations: + return [] + return organizations + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_token = None + if self.pagination is not None: + if self.pagination.next_token is not None: + next_token = self.pagination.next_token + if not next_token: + return None + + return PageInfo(params={"token": next_token}) + + +class AsyncOrganizationsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): + organizations: List[_T] + pagination: Optional[OrganizationsPagePagination] = None + + @override + def _get_page_items(self) -> List[_T]: + organizations = self.organizations + if not organizations: + return [] + return organizations + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_token = None + if self.pagination is not None: + if self.pagination.next_token is not None: + next_token = self.pagination.next_token + if not next_token: + return None + + return PageInfo(params={"token": next_token}) + + class OutputsPagePagination(BaseModel): next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) diff --git a/src/gitpod/resources/runners/runners.py b/src/gitpod/resources/runners/runners.py index 5a0ee2e4..1d92c061 100644 --- a/src/gitpod/resources/runners/runners.py +++ b/src/gitpod/resources/runners/runners.py @@ -41,7 +41,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...pagination import SyncRunnersPage, AsyncRunnersPage +from ...pagination import SyncRunnersPage, AsyncRunnersPage, SyncOrganizationsPage, AsyncOrganizationsPage from ..._base_client import AsyncPaginator, make_request_options from ...types.runner import Runner from ...types.runner_kind import RunnerKind @@ -681,6 +681,8 @@ def list_scm_organizations( *, token: str | Omit = omit, page_size: int | Omit = omit, + pagination: runner_list_scm_organizations_params.Pagination | Omit = omit, + query: str | Omit = omit, runner_id: str | Omit = omit, scm_host: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -689,7 +691,7 @@ def list_scm_organizations( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> RunnerListScmOrganizationsResponse: + ) -> SyncOrganizationsPage[RunnerListScmOrganizationsResponse]: """ Lists SCM organizations the user belongs to. @@ -709,7 +711,29 @@ def list_scm_organizations( scmHost: "github.com" ``` + - Search GitLab groups: + + Returns the first page of GitLab groups matching the substring. + + ```yaml + runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + scmHost: "gitlab.com" + query: "platform" + pagination: + pageSize: 25 + ``` + Args: + pagination: Pagination parameters. When unset, defaults to the standard PaginationRequest + defaults (page_size 25, max 100). Tokens are opaque and provider-specific. + + query: Optional substring filter applied to the organization name. + + - GitLab: forwarded to the upstream `search` parameter (server-side, + case-insensitive substring on name/path). + - GitHub and Bitbucket: not implemented as they don't support searching Empty + value means no filter. + scm_host: The SCM host to list organizations from (e.g., "github.com", "gitlab.com") extra_headers: Send extra headers @@ -720,10 +744,13 @@ def list_scm_organizations( timeout: Override the client-level default timeout for this request, in seconds """ - return self._post( + return self._get_api_list( "/gitpod.v1.RunnerService/ListSCMOrganizations", + page=SyncOrganizationsPage[RunnerListScmOrganizationsResponse], body=maybe_transform( { + "pagination": pagination, + "query": query, "runner_id": runner_id, "scm_host": scm_host, }, @@ -742,7 +769,8 @@ def list_scm_organizations( runner_list_scm_organizations_params.RunnerListScmOrganizationsParams, ), ), - cast_to=RunnerListScmOrganizationsResponse, + model=RunnerListScmOrganizationsResponse, + method="post", ) def parse_context_url( @@ -1505,11 +1533,13 @@ async def create_runner_token( cast_to=RunnerCreateRunnerTokenResponse, ) - async def list_scm_organizations( + def list_scm_organizations( self, *, token: str | Omit = omit, page_size: int | Omit = omit, + pagination: runner_list_scm_organizations_params.Pagination | Omit = omit, + query: str | Omit = omit, runner_id: str | Omit = omit, scm_host: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1518,7 +1548,7 @@ async def list_scm_organizations( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> RunnerListScmOrganizationsResponse: + ) -> AsyncPaginator[RunnerListScmOrganizationsResponse, AsyncOrganizationsPage[RunnerListScmOrganizationsResponse]]: """ Lists SCM organizations the user belongs to. @@ -1538,7 +1568,29 @@ async def list_scm_organizations( scmHost: "github.com" ``` + - Search GitLab groups: + + Returns the first page of GitLab groups matching the substring. + + ```yaml + runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + scmHost: "gitlab.com" + query: "platform" + pagination: + pageSize: 25 + ``` + Args: + pagination: Pagination parameters. When unset, defaults to the standard PaginationRequest + defaults (page_size 25, max 100). Tokens are opaque and provider-specific. + + query: Optional substring filter applied to the organization name. + + - GitLab: forwarded to the upstream `search` parameter (server-side, + case-insensitive substring on name/path). + - GitHub and Bitbucket: not implemented as they don't support searching Empty + value means no filter. + scm_host: The SCM host to list organizations from (e.g., "github.com", "gitlab.com") extra_headers: Send extra headers @@ -1549,10 +1601,13 @@ async def list_scm_organizations( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._post( + return self._get_api_list( "/gitpod.v1.RunnerService/ListSCMOrganizations", - body=await async_maybe_transform( + page=AsyncOrganizationsPage[RunnerListScmOrganizationsResponse], + body=maybe_transform( { + "pagination": pagination, + "query": query, "runner_id": runner_id, "scm_host": scm_host, }, @@ -1563,7 +1618,7 @@ async def list_scm_organizations( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "token": token, "page_size": page_size, @@ -1571,7 +1626,8 @@ async def list_scm_organizations( runner_list_scm_organizations_params.RunnerListScmOrganizationsParams, ), ), - cast_to=RunnerListScmOrganizationsResponse, + model=RunnerListScmOrganizationsResponse, + method="post", ) async def parse_context_url( diff --git a/src/gitpod/types/runner_list_scm_organizations_params.py b/src/gitpod/types/runner_list_scm_organizations_params.py index bd1f788b..a852d57b 100644 --- a/src/gitpod/types/runner_list_scm_organizations_params.py +++ b/src/gitpod/types/runner_list_scm_organizations_params.py @@ -6,7 +6,7 @@ from .._utils import PropertyInfo -__all__ = ["RunnerListScmOrganizationsParams"] +__all__ = ["RunnerListScmOrganizationsParams", "Pagination"] class RunnerListScmOrganizationsParams(TypedDict, total=False): @@ -14,7 +14,43 @@ class RunnerListScmOrganizationsParams(TypedDict, total=False): page_size: Annotated[int, PropertyInfo(alias="pageSize")] + pagination: Pagination + """Pagination parameters. + + When unset, defaults to the standard PaginationRequest defaults (page_size 25, + max 100). Tokens are opaque and provider-specific. + """ + + query: str + """Optional substring filter applied to the organization name. + + - GitLab: forwarded to the upstream `search` parameter (server-side, + case-insensitive substring on name/path). + - GitHub and Bitbucket: not implemented as they don't support searching Empty + value means no filter. + """ + runner_id: Annotated[str, PropertyInfo(alias="runnerId")] scm_host: Annotated[str, PropertyInfo(alias="scmHost")] """The SCM host to list organizations from (e.g., "github.com", "gitlab.com")""" + + +class Pagination(TypedDict, total=False): + """Pagination parameters. + + When unset, defaults to the standard PaginationRequest defaults + (page_size 25, max 100). Tokens are opaque and provider-specific. + """ + + token: str + """ + Token for the next set of results that was returned as next_token of a + PaginationResponse + """ + + page_size: Annotated[int, PropertyInfo(alias="pageSize")] + """Page size is the maximum number of results to retrieve per page. Defaults to 25. + + Maximum 100. + """ diff --git a/src/gitpod/types/runner_list_scm_organizations_response.py b/src/gitpod/types/runner_list_scm_organizations_response.py index d089df57..8c8c50e8 100644 --- a/src/gitpod/types/runner_list_scm_organizations_response.py +++ b/src/gitpod/types/runner_list_scm_organizations_response.py @@ -1,15 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from pydantic import Field as FieldInfo from .._models import BaseModel -__all__ = ["RunnerListScmOrganizationsResponse", "Organization"] +__all__ = ["RunnerListScmOrganizationsResponse"] -class Organization(BaseModel): +class RunnerListScmOrganizationsResponse(BaseModel): is_admin: Optional[bool] = FieldInfo(alias="isAdmin", default=None) """ Deprecated: this field is unused by all known consumers and is scheduled for @@ -26,8 +26,3 @@ class Organization(BaseModel): url: Optional[str] = None """Organization URL (e.g., "https://github.com/gitpod-io")""" - - -class RunnerListScmOrganizationsResponse(BaseModel): - organizations: Optional[List[Organization]] = None - """List of organizations the user belongs to""" diff --git a/tests/api_resources/test_runners.py b/tests/api_resources/test_runners.py index 3a7c4506..dad788c8 100644 --- a/tests/api_resources/test_runners.py +++ b/tests/api_resources/test_runners.py @@ -21,7 +21,7 @@ RunnerCheckRepositoryAccessResponse, RunnerCheckAuthenticationForHostResponse, ) -from gitpod.pagination import SyncRunnersPage, AsyncRunnersPage +from gitpod.pagination import SyncRunnersPage, AsyncRunnersPage, SyncOrganizationsPage, AsyncOrganizationsPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -416,7 +416,7 @@ def test_streaming_response_create_runner_token(self, client: Gitpod) -> None: @parametrize def test_method_list_scm_organizations(self, client: Gitpod) -> None: runner = client.runners.list_scm_organizations() - assert_matches_type(RunnerListScmOrganizationsResponse, runner, path=["response"]) + assert_matches_type(SyncOrganizationsPage[RunnerListScmOrganizationsResponse], runner, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -424,10 +424,15 @@ def test_method_list_scm_organizations_with_all_params(self, client: Gitpod) -> runner = client.runners.list_scm_organizations( token="token", page_size=0, + pagination={ + "token": "token", + "page_size": 100, + }, + query="query", runner_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", scm_host="github.com", ) - assert_matches_type(RunnerListScmOrganizationsResponse, runner, path=["response"]) + assert_matches_type(SyncOrganizationsPage[RunnerListScmOrganizationsResponse], runner, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -437,7 +442,7 @@ def test_raw_response_list_scm_organizations(self, client: Gitpod) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" runner = response.parse() - assert_matches_type(RunnerListScmOrganizationsResponse, runner, path=["response"]) + assert_matches_type(SyncOrganizationsPage[RunnerListScmOrganizationsResponse], runner, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -447,7 +452,7 @@ def test_streaming_response_list_scm_organizations(self, client: Gitpod) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" runner = response.parse() - assert_matches_type(RunnerListScmOrganizationsResponse, runner, path=["response"]) + assert_matches_type(SyncOrganizationsPage[RunnerListScmOrganizationsResponse], runner, path=["response"]) assert cast(Any, response.is_closed) is True @@ -925,7 +930,7 @@ async def test_streaming_response_create_runner_token(self, async_client: AsyncG @parametrize async def test_method_list_scm_organizations(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.list_scm_organizations() - assert_matches_type(RunnerListScmOrganizationsResponse, runner, path=["response"]) + assert_matches_type(AsyncOrganizationsPage[RunnerListScmOrganizationsResponse], runner, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -933,10 +938,15 @@ async def test_method_list_scm_organizations_with_all_params(self, async_client: runner = await async_client.runners.list_scm_organizations( token="token", page_size=0, + pagination={ + "token": "token", + "page_size": 100, + }, + query="query", runner_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", scm_host="github.com", ) - assert_matches_type(RunnerListScmOrganizationsResponse, runner, path=["response"]) + assert_matches_type(AsyncOrganizationsPage[RunnerListScmOrganizationsResponse], runner, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -946,7 +956,7 @@ async def test_raw_response_list_scm_organizations(self, async_client: AsyncGitp assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" runner = await response.parse() - assert_matches_type(RunnerListScmOrganizationsResponse, runner, path=["response"]) + assert_matches_type(AsyncOrganizationsPage[RunnerListScmOrganizationsResponse], runner, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -956,7 +966,7 @@ async def test_streaming_response_list_scm_organizations(self, async_client: Asy assert response.http_request.headers.get("X-Stainless-Lang") == "python" runner = await response.parse() - assert_matches_type(RunnerListScmOrganizationsResponse, runner, path=["response"]) + assert_matches_type(AsyncOrganizationsPage[RunnerListScmOrganizationsResponse], runner, path=["response"]) assert cast(Any, response.is_closed) is True From 8d2d67efea7fe30dba14c8d12eb40fc392ec8fe5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 12:47:02 +0000 Subject: [PATCH 043/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f88f2981..31cb8c27 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-162fdc304a6f1f8e282b49c7cde2e2aa282e58045ac814869491340f932982d4.yml -openapi_spec_hash: 017607fc78184b5a49249ed134e1ad7c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3648b39143360cbfc8c544ee90a300a57e2da09d9a7153cf5e003ae29164664d.yml +openapi_spec_hash: 1206eef2a61f6fba496715f1fabacb47 config_hash: 4447d1e1149a80d1bec70d353fb8acbf From e2b45a600764d642191eeb482af8dd5cc82ae6b1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 12:56:47 +0000 Subject: [PATCH 044/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 31cb8c27..2a5eaf4a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3648b39143360cbfc8c544ee90a300a57e2da09d9a7153cf5e003ae29164664d.yml -openapi_spec_hash: 1206eef2a61f6fba496715f1fabacb47 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c5b3669c8db150b04d14f02596f3fd59076b7ac971fbb66583231a1189a8c91b.yml +openapi_spec_hash: a4114b38d47f0696fdf23bfe64dc446c config_hash: 4447d1e1149a80d1bec70d353fb8acbf From 8ddb8c8e3b4e635f8ad6a22e0db738df8236a21c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 12:07:57 +0000 Subject: [PATCH 045/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2a5eaf4a..957e8bd3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c5b3669c8db150b04d14f02596f3fd59076b7ac971fbb66583231a1189a8c91b.yml -openapi_spec_hash: a4114b38d47f0696fdf23bfe64dc446c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-e8c1d2dbde2a6b9f6064c7dc2bd3b9429a834131660e0826c49a1d620d807b78.yml +openapi_spec_hash: f770f8bfb695c692341c74e79930fe61 config_hash: 4447d1e1149a80d1bec70d353fb8acbf From 974e4d0d003712103f37fa1ac10ec05e566c3da1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 13:58:14 +0000 Subject: [PATCH 046/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 957e8bd3..97339761 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-e8c1d2dbde2a6b9f6064c7dc2bd3b9429a834131660e0826c49a1d620d807b78.yml -openapi_spec_hash: f770f8bfb695c692341c74e79930fe61 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-439cda23bbab7cb3207b4350637971f50e98624270abba0e636cef39b54d34bd.yml +openapi_spec_hash: 5b2ead9eced70d525d4348b2ed3f1387 config_hash: 4447d1e1149a80d1bec70d353fb8acbf From c731392aa36e5a3bba895d4e52a7d50addab326a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 15:03:21 +0000 Subject: [PATCH 047/211] fix: use correct field name format for multipart file arrays --- src/gitpod/_qs.py | 8 ++----- src/gitpod/_types.py | 3 +++ src/gitpod/_utils/_utils.py | 42 ++++++++++++++++++++++++++++++------- tests/test_extract_files.py | 28 ++++++++++++++++++++----- tests/test_files.py | 2 +- 5 files changed, 63 insertions(+), 20 deletions(-) diff --git a/src/gitpod/_qs.py b/src/gitpod/_qs.py index de8c99bc..4127c19c 100644 --- a/src/gitpod/_qs.py +++ b/src/gitpod/_qs.py @@ -2,17 +2,13 @@ from typing import Any, List, Tuple, Union, Mapping, TypeVar from urllib.parse import parse_qs, urlencode -from typing_extensions import Literal, get_args +from typing_extensions import get_args -from ._types import NotGiven, not_given +from ._types import NotGiven, ArrayFormat, NestedFormat, not_given from ._utils import flatten _T = TypeVar("_T") - -ArrayFormat = Literal["comma", "repeat", "indices", "brackets"] -NestedFormat = Literal["dots", "brackets"] - PrimitiveData = Union[str, int, float, bool, None] # this should be Data = Union[PrimitiveData, "List[Data]", "Tuple[Data]", "Mapping[str, Data]"] # https://github.com/microsoft/pyright/issues/3555 diff --git a/src/gitpod/_types.py b/src/gitpod/_types.py index dbebac09..8a15cebe 100644 --- a/src/gitpod/_types.py +++ b/src/gitpod/_types.py @@ -47,6 +47,9 @@ ModelT = TypeVar("ModelT", bound=pydantic.BaseModel) _T = TypeVar("_T") +ArrayFormat = Literal["comma", "repeat", "indices", "brackets"] +NestedFormat = Literal["dots", "brackets"] + # Approximates httpx internal ProxiesTypes and RequestFiles types # while adding support for `PathLike` instances diff --git a/src/gitpod/_utils/_utils.py b/src/gitpod/_utils/_utils.py index 771859f5..199cd231 100644 --- a/src/gitpod/_utils/_utils.py +++ b/src/gitpod/_utils/_utils.py @@ -17,11 +17,11 @@ ) from pathlib import Path from datetime import date, datetime -from typing_extensions import TypeGuard +from typing_extensions import TypeGuard, get_args import sniffio -from .._types import Omit, NotGiven, FileTypes, HeadersLike +from .._types import Omit, NotGiven, FileTypes, ArrayFormat, HeadersLike _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) @@ -40,25 +40,45 @@ def extract_files( query: Mapping[str, object], *, paths: Sequence[Sequence[str]], + array_format: ArrayFormat = "brackets", ) -> list[tuple[str, FileTypes]]: """Recursively extract files from the given dictionary based on specified paths. A path may look like this ['foo', 'files', '', 'data']. + ``array_format`` controls how ```` segments contribute to the emitted + field name. Supported values: ``"brackets"`` (``foo[]``), ``"repeat"`` and + ``"comma"`` (``foo``), ``"indices"`` (``foo[0]``, ``foo[1]``). + Note: this mutates the given dictionary. """ files: list[tuple[str, FileTypes]] = [] for path in paths: - files.extend(_extract_items(query, path, index=0, flattened_key=None)) + files.extend(_extract_items(query, path, index=0, flattened_key=None, array_format=array_format)) return files +def _array_suffix(array_format: ArrayFormat, array_index: int) -> str: + if array_format == "brackets": + return "[]" + if array_format == "indices": + return f"[{array_index}]" + if array_format == "repeat" or array_format == "comma": + # Both repeat the bare field name for each file part; there is no + # meaningful way to comma-join binary parts. + return "" + raise NotImplementedError( + f"Unknown array_format value: {array_format}, choose from {', '.join(get_args(ArrayFormat))}" + ) + + def _extract_items( obj: object, path: Sequence[str], *, index: int, flattened_key: str | None, + array_format: ArrayFormat, ) -> list[tuple[str, FileTypes]]: try: key = path[index] @@ -75,9 +95,11 @@ def _extract_items( if is_list(obj): files: list[tuple[str, FileTypes]] = [] - for entry in obj: - assert_is_file_content(entry, key=flattened_key + "[]" if flattened_key else "") - files.append((flattened_key + "[]", cast(FileTypes, entry))) + for array_index, entry in enumerate(obj): + suffix = _array_suffix(array_format, array_index) + emitted_key = (flattened_key + suffix) if flattened_key else suffix + assert_is_file_content(entry, key=emitted_key) + files.append((emitted_key, cast(FileTypes, entry))) return files assert_is_file_content(obj, key=flattened_key) @@ -106,6 +128,7 @@ def _extract_items( path, index=index, flattened_key=flattened_key, + array_format=array_format, ) elif is_list(obj): if key != "": @@ -117,9 +140,12 @@ def _extract_items( item, path, index=index, - flattened_key=flattened_key + "[]" if flattened_key is not None else "[]", + flattened_key=( + (flattened_key if flattened_key is not None else "") + _array_suffix(array_format, array_index) + ), + array_format=array_format, ) - for item in obj + for array_index, item in enumerate(obj) ] ) diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index a9d8b167..4a107218 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -4,7 +4,7 @@ import pytest -from gitpod._types import FileTypes +from gitpod._types import FileTypes, ArrayFormat from gitpod._utils import extract_files @@ -37,10 +37,7 @@ def test_multiple_files() -> None: def test_top_level_file_array() -> None: query = {"files": [b"file one", b"file two"], "title": "hello"} - assert extract_files(query, paths=[["files", ""]]) == [ - ("files[]", b"file one"), - ("files[]", b"file two"), - ] + assert extract_files(query, paths=[["files", ""]]) == [("files[]", b"file one"), ("files[]", b"file two")] assert query == {"title": "hello"} @@ -71,3 +68,24 @@ def test_ignores_incorrect_paths( expected: list[tuple[str, FileTypes]], ) -> None: assert extract_files(query, paths=paths) == expected + + +@pytest.mark.parametrize( + "array_format,expected_top_level,expected_nested", + [ + ("brackets", [("files[]", b"a"), ("files[]", b"b")], [("items[][file]", b"a"), ("items[][file]", b"b")]), + ("repeat", [("files", b"a"), ("files", b"b")], [("items[file]", b"a"), ("items[file]", b"b")]), + ("comma", [("files", b"a"), ("files", b"b")], [("items[file]", b"a"), ("items[file]", b"b")]), + ("indices", [("files[0]", b"a"), ("files[1]", b"b")], [("items[0][file]", b"a"), ("items[1][file]", b"b")]), + ], +) +def test_array_format_controls_file_field_names( + array_format: ArrayFormat, + expected_top_level: list[tuple[str, FileTypes]], + expected_nested: list[tuple[str, FileTypes]], +) -> None: + top_level = {"files": [b"a", b"b"]} + assert extract_files(top_level, paths=[["files", ""]], array_format=array_format) == expected_top_level + + nested = {"items": [{"file": b"a"}, {"file": b"b"}]} + assert extract_files(nested, paths=[["items", "", "file"]], array_format=array_format) == expected_nested diff --git a/tests/test_files.py b/tests/test_files.py index 2e09e8a4..d8f636ba 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -131,7 +131,7 @@ def test_extract_files_does_not_mutate_original_nested_array_path(self) -> None: copied = deepcopy_with_paths(original, [["items", "", "file"]]) extracted = extract_files(copied, paths=[["items", "", "file"]]) - assert extracted == [("items[][file]", file1), ("items[][file]", file2)] + assert [entry for _, entry in extracted] == [file1, file2] assert original == { "items": [ {"file": file1, "extra": 1}, From 8786477b21152c9040f3281d5b2cb17f3eada5f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 17:47:39 +0000 Subject: [PATCH 048/211] feat(api): add readiness_timeout field to service spec types --- .stats.yml | 4 +- .../environments/automations/service_spec.py | 6 ++ .../automations/service_spec_param.py | 6 ++ .../automations/service_update_params.py | 61 +++++++++++++++++++ .../environments/automations_file_param.py | 61 +++++++++++++++++++ .../environments/automations/test_services.py | 4 ++ .../environments/test_automations.py | 2 + 7 files changed, 142 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 97339761..ef9a2135 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-439cda23bbab7cb3207b4350637971f50e98624270abba0e636cef39b54d34bd.yml -openapi_spec_hash: 5b2ead9eced70d525d4348b2ed3f1387 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c1f318f2e8413e0195faf5e4216a17cf106cf942e2c51c5174476e801c097e2b.yml +openapi_spec_hash: d6ec53f1cd8364bb6261cd3c0a5d2869 config_hash: 4447d1e1149a80d1bec70d353fb8acbf diff --git a/src/gitpod/types/environments/automations/service_spec.py b/src/gitpod/types/environments/automations/service_spec.py index 98b9b1f6..4f451cd8 100644 --- a/src/gitpod/types/environments/automations/service_spec.py +++ b/src/gitpod/types/environments/automations/service_spec.py @@ -62,6 +62,12 @@ class ServiceSpec(BaseModel): env: Optional[List[EnvironmentVariableItem]] = None """env specifies environment variables for the service.""" + readiness_timeout: Optional[str] = FieldInfo(alias="readinessTimeout", default=None) + """ + readiness_timeout is the maximum duration a service may remain in the Starting + phase while readiness checks run. 0s disables the timeout. + """ + runs_on: Optional[RunsOn] = FieldInfo(alias="runsOn", default=None) """runs_on specifies the environment the service should run on.""" diff --git a/src/gitpod/types/environments/automations/service_spec_param.py b/src/gitpod/types/environments/automations/service_spec_param.py index 93bed6a8..dc93d720 100644 --- a/src/gitpod/types/environments/automations/service_spec_param.py +++ b/src/gitpod/types/environments/automations/service_spec_param.py @@ -63,6 +63,12 @@ class ServiceSpecParam(TypedDict, total=False): env: Iterable[EnvironmentVariableItem] """env specifies environment variables for the service.""" + readiness_timeout: Annotated[str, PropertyInfo(alias="readinessTimeout")] + """ + readiness_timeout is the maximum duration a service may remain in the Starting + phase while readiness checks run. 0s disables the timeout. + """ + runs_on: Annotated[RunsOn, PropertyInfo(alias="runsOn")] """runs_on specifies the environment the service should run on.""" diff --git a/src/gitpod/types/environments/automations/service_update_params.py b/src/gitpod/types/environments/automations/service_update_params.py index 7ec0e436..bbcef01e 100644 --- a/src/gitpod/types/environments/automations/service_update_params.py +++ b/src/gitpod/types/environments/automations/service_update_params.py @@ -69,6 +69,67 @@ class Spec(TypedDict, total=False): env: Iterable[EnvironmentVariableItem] + readiness_timeout: Annotated[str, PropertyInfo(alias="readinessTimeout")] + """ + A Duration represents a signed, fixed-length span of time represented as a count + of seconds and fractions of seconds at nanosecond resolution. It is independent + of any calendar and concepts like "day" or "month". It is related to Timestamp + in that the difference between two Timestamp values is a Duration and it can be + added or subtracted from a Timestamp. Range is approximately +-10,000 years. + + # Examples + + Example 1: Compute Duration from two Timestamps in pseudo code. + + Timestamp start = ...; + Timestamp end = ...; + Duration duration = ...; + + duration.seconds = end.seconds - start.seconds; + duration.nanos = end.nanos - start.nanos; + + if (duration.seconds < 0 && duration.nanos > 0) { + duration.seconds += 1; + duration.nanos -= 1000000000; + } else if (duration.seconds > 0 && duration.nanos < 0) { + duration.seconds -= 1; + duration.nanos += 1000000000; + } + + Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + + Timestamp start = ...; + Duration duration = ...; + Timestamp end = ...; + + end.seconds = start.seconds + duration.seconds; + end.nanos = start.nanos + duration.nanos; + + if (end.nanos < 0) { + end.seconds -= 1; + end.nanos += 1000000000; + } else if (end.nanos >= 1000000000) { + end.seconds += 1; + end.nanos -= 1000000000; + } + + Example 3: Compute Duration from datetime.timedelta in Python. + + td = datetime.timedelta(days=3, minutes=10) + duration = Duration() + duration.FromTimedelta(td) + + # JSON Mapping + + In JSON format, the Duration type is encoded as a string rather than an object, + where the string ends in the suffix "s" (indicating seconds) and is preceded by + the number of seconds, with nanoseconds expressed as fractional seconds. For + example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", + while 3 seconds and 1 nanosecond should be expressed in JSON format as + "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON + format as "3.000001s". + """ + runs_on: Annotated[Optional[RunsOn], PropertyInfo(alias="runsOn")] diff --git a/src/gitpod/types/environments/automations_file_param.py b/src/gitpod/types/environments/automations_file_param.py index 68deffa5..71161a2e 100644 --- a/src/gitpod/types/environments/automations_file_param.py +++ b/src/gitpod/types/environments/automations_file_param.py @@ -49,6 +49,67 @@ class Services(TypedDict, total=False): name: str + readiness_timeout: Annotated[str, PropertyInfo(alias="readinessTimeout")] + """ + A Duration represents a signed, fixed-length span of time represented as a count + of seconds and fractions of seconds at nanosecond resolution. It is independent + of any calendar and concepts like "day" or "month". It is related to Timestamp + in that the difference between two Timestamp values is a Duration and it can be + added or subtracted from a Timestamp. Range is approximately +-10,000 years. + + # Examples + + Example 1: Compute Duration from two Timestamps in pseudo code. + + Timestamp start = ...; + Timestamp end = ...; + Duration duration = ...; + + duration.seconds = end.seconds - start.seconds; + duration.nanos = end.nanos - start.nanos; + + if (duration.seconds < 0 && duration.nanos > 0) { + duration.seconds += 1; + duration.nanos -= 1000000000; + } else if (duration.seconds > 0 && duration.nanos < 0) { + duration.seconds -= 1; + duration.nanos += 1000000000; + } + + Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + + Timestamp start = ...; + Duration duration = ...; + Timestamp end = ...; + + end.seconds = start.seconds + duration.seconds; + end.nanos = start.nanos + duration.nanos; + + if (end.nanos < 0) { + end.seconds -= 1; + end.nanos += 1000000000; + } else if (end.nanos >= 1000000000) { + end.seconds += 1; + end.nanos -= 1000000000; + } + + Example 3: Compute Duration from datetime.timedelta in Python. + + td = datetime.timedelta(days=3, minutes=10) + duration = Duration() + duration.FromTimedelta(td) + + # JSON Mapping + + In JSON format, the Duration type is encoded as a string rather than an object, + where the string ends in the suffix "s" (indicating seconds) and is preceded by + the number of seconds, with nanoseconds expressed as fractional seconds. For + example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", + while 3 seconds and 1 nanosecond should be expressed in JSON format as + "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON + format as "3.000001s". + """ + role: Literal["", "default", "editor", "ai-agent"] runs_on: Annotated[RunsOn, PropertyInfo(alias="runsOn")] diff --git a/tests/api_resources/environments/automations/test_services.py b/tests/api_resources/environments/automations/test_services.py index 3d1ccf73..daa24e8d 100644 --- a/tests/api_resources/environments/automations/test_services.py +++ b/tests/api_resources/environments/automations/test_services.py @@ -69,6 +69,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "value_from": {"secret_ref": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}}, } ], + "readiness_timeout": "+9125115.360s", "runs_on": { "docker": { "environment": ["string"], @@ -181,6 +182,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: "value_from": {"secret_ref": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}}, } ], + "readiness_timeout": "+9125115.360s", "runs_on": { "docker": { "environment": ["string"], @@ -429,6 +431,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "value_from": {"secret_ref": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}}, } ], + "readiness_timeout": "+9125115.360s", "runs_on": { "docker": { "environment": ["string"], @@ -541,6 +544,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> "value_from": {"secret_ref": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}}, } ], + "readiness_timeout": "+9125115.360s", "runs_on": { "docker": { "environment": ["string"], diff --git a/tests/api_resources/environments/test_automations.py b/tests/api_resources/environments/test_automations.py index 15f3fe3a..0f1eb63c 100644 --- a/tests/api_resources/environments/test_automations.py +++ b/tests/api_resources/environments/test_automations.py @@ -37,6 +37,7 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None: }, "description": "Development web server", "name": "Web Server", + "readiness_timeout": "+9125115.360s", "role": "", "runs_on": { "docker": { @@ -117,6 +118,7 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> }, "description": "Development web server", "name": "Web Server", + "readiness_timeout": "+9125115.360s", "role": "", "runs_on": { "docker": { From c5ebbf3904c0ba986ee583bd27d098e1e63051eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 18:29:55 +0000 Subject: [PATCH 049/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ef9a2135..d4935d18 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-c1f318f2e8413e0195faf5e4216a17cf106cf942e2c51c5174476e801c097e2b.yml -openapi_spec_hash: d6ec53f1cd8364bb6261cd3c0a5d2869 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-174838e2894923e3ff69ca22fed3c1588b9578d0f38f286a58a038b16ba9db81.yml +openapi_spec_hash: 5b2b0e06a471629508cd4402b9450a6c config_hash: 4447d1e1149a80d1bec70d353fb8acbf From c544eaff18707e01f379a7df1b915c89c6e4ab7e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:08:29 +0000 Subject: [PATCH 050/211] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d4935d18..a50613a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-174838e2894923e3ff69ca22fed3c1588b9578d0f38f286a58a038b16ba9db81.yml -openapi_spec_hash: 5b2b0e06a471629508cd4402b9450a6c +openapi_spec_hash: 5331987cbc46299f3170b063b9bf06c1 config_hash: 4447d1e1149a80d1bec70d353fb8acbf From 4e4f3fe4d03901b3b63bccd13012197be6cc50ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:32:01 +0000 Subject: [PATCH 051/211] feat: support setting headers via env --- src/gitpod/_client.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/gitpod/_client.py b/src/gitpod/_client.py index dddc11d8..454815c2 100644 --- a/src/gitpod/_client.py +++ b/src/gitpod/_client.py @@ -19,7 +19,11 @@ RequestOptions, not_given, ) -from ._utils import is_given, get_async_library +from ._utils import ( + is_given, + is_mapping_t, + get_async_library, +) from ._compat import cached_property from ._version import __version__ from ._streaming import Stream as Stream, AsyncStream as AsyncStream @@ -115,6 +119,15 @@ def __init__( if base_url is None: base_url = f"https://app.gitpod.io/api" + custom_headers_env = os.environ.get("GITPOD_CUSTOM_HEADERS") + if custom_headers_env is not None: + parsed: dict[str, str] = {} + for line in custom_headers_env.split("\n"): + colon = line.find(":") + if colon >= 0: + parsed[line[:colon].strip()] = line[colon + 1 :].strip() + default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})} + super().__init__( version=__version__, base_url=base_url, @@ -396,6 +409,15 @@ def __init__( if base_url is None: base_url = f"https://app.gitpod.io/api" + custom_headers_env = os.environ.get("GITPOD_CUSTOM_HEADERS") + if custom_headers_env is not None: + parsed: dict[str, str] = {} + for line in custom_headers_env.split("\n"): + colon = line.find(":") + if colon >= 0: + parsed[line[:colon].strip()] = line[colon + 1 :].strip() + default_headers = {**parsed, **(default_headers if is_mapping_t(default_headers) else {})} + super().__init__( version=__version__, base_url=base_url, From 4942a703b999261d0b0935f4db63e76c8db5d103 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 15:52:55 +0000 Subject: [PATCH 052/211] feat(api): add max_port_admission_level to organizations policies --- .stats.yml | 4 ++-- src/gitpod/resources/organizations/policies.py | 16 ++++++++++++++++ .../types/organizations/policy_update_params.py | 9 +++++++++ .../api_resources/organizations/test_policies.py | 2 ++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a50613a8..50f4f10b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-174838e2894923e3ff69ca22fed3c1588b9578d0f38f286a58a038b16ba9db81.yml -openapi_spec_hash: 5331987cbc46299f3170b063b9bf06c1 -config_hash: 4447d1e1149a80d1bec70d353fb8acbf +openapi_spec_hash: 805193dd7418d079e23e6cdb594e4e59 +config_hash: a2977efc262539c5e31ba0e6dfb6a0a1 diff --git a/src/gitpod/resources/organizations/policies.py b/src/gitpod/resources/organizations/policies.py index a9d30bfb..5e21ea52 100644 --- a/src/gitpod/resources/organizations/policies.py +++ b/src/gitpod/resources/organizations/policies.py @@ -6,6 +6,7 @@ import httpx +from ...types import AdmissionLevel from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property @@ -18,6 +19,7 @@ ) from ..._base_client import make_request_options from ...types.organizations import policy_update_params, policy_retrieve_params +from ...types.admission_level import AdmissionLevel from ...types.organizations.veto_exec_policy_param import VetoExecPolicyParam from ...types.organizations.policy_retrieve_response import PolicyRetrieveResponse @@ -109,6 +111,7 @@ def update( maximum_environments_per_user: Optional[str] | Omit = omit, maximum_environment_timeout: Optional[str] | Omit = omit, maximum_running_environments_per_user: Optional[str] | Omit = omit, + max_port_admission_level: Optional[AdmissionLevel] | Omit = omit, members_create_projects: Optional[bool] | Omit = omit, members_require_projects: Optional[bool] | Omit = omit, port_sharing_disabled: Optional[bool] | Omit = omit, @@ -201,6 +204,11 @@ def update( maximum_running_environments_per_user: maximum_running_environments_per_user limits simultaneously running environments per user + max_port_admission_level: max_port_admission_level caps the maximum admission level a user-opened port may + use. UNSPECIFIED means no cap (any AdmissionLevel value is allowed). System + ports (VS Code Browser, agents) are exempt. The legacy port_sharing_disabled + field, when true, takes precedence and blocks all user-initiated port sharing. + members_create_projects: members_create_projects controls whether members can create projects members_require_projects: members_require_projects controls whether environments can only be created from @@ -245,6 +253,7 @@ def update( "maximum_environments_per_user": maximum_environments_per_user, "maximum_environment_timeout": maximum_environment_timeout, "maximum_running_environments_per_user": maximum_running_environments_per_user, + "max_port_admission_level": max_port_admission_level, "members_create_projects": members_create_projects, "members_require_projects": members_require_projects, "port_sharing_disabled": port_sharing_disabled, @@ -349,6 +358,7 @@ async def update( maximum_environments_per_user: Optional[str] | Omit = omit, maximum_environment_timeout: Optional[str] | Omit = omit, maximum_running_environments_per_user: Optional[str] | Omit = omit, + max_port_admission_level: Optional[AdmissionLevel] | Omit = omit, members_create_projects: Optional[bool] | Omit = omit, members_require_projects: Optional[bool] | Omit = omit, port_sharing_disabled: Optional[bool] | Omit = omit, @@ -441,6 +451,11 @@ async def update( maximum_running_environments_per_user: maximum_running_environments_per_user limits simultaneously running environments per user + max_port_admission_level: max_port_admission_level caps the maximum admission level a user-opened port may + use. UNSPECIFIED means no cap (any AdmissionLevel value is allowed). System + ports (VS Code Browser, agents) are exempt. The legacy port_sharing_disabled + field, when true, takes precedence and blocks all user-initiated port sharing. + members_create_projects: members_create_projects controls whether members can create projects members_require_projects: members_require_projects controls whether environments can only be created from @@ -485,6 +500,7 @@ async def update( "maximum_environments_per_user": maximum_environments_per_user, "maximum_environment_timeout": maximum_environment_timeout, "maximum_running_environments_per_user": maximum_running_environments_per_user, + "max_port_admission_level": max_port_admission_level, "members_create_projects": members_create_projects, "members_require_projects": members_require_projects, "port_sharing_disabled": port_sharing_disabled, diff --git a/src/gitpod/types/organizations/policy_update_params.py b/src/gitpod/types/organizations/policy_update_params.py index e0776802..a953b488 100644 --- a/src/gitpod/types/organizations/policy_update_params.py +++ b/src/gitpod/types/organizations/policy_update_params.py @@ -7,6 +7,7 @@ from ..._types import SequenceNotStr from ..._utils import PropertyInfo +from ..admission_level import AdmissionLevel from .veto_exec_policy_param import VetoExecPolicyParam from .conversation_sharing_policy import ConversationSharingPolicy @@ -98,6 +99,14 @@ class PolicyUpdateParams(TypedDict, total=False): per user """ + max_port_admission_level: Annotated[Optional[AdmissionLevel], PropertyInfo(alias="maxPortAdmissionLevel")] + """ + max_port_admission_level caps the maximum admission level a user-opened port may + use. UNSPECIFIED means no cap (any AdmissionLevel value is allowed). System + ports (VS Code Browser, agents) are exempt. The legacy port_sharing_disabled + field, when true, takes precedence and blocks all user-initiated port sharing. + """ + members_create_projects: Annotated[Optional[bool], PropertyInfo(alias="membersCreateProjects")] """members_create_projects controls whether members can create projects""" diff --git a/tests/api_resources/organizations/test_policies.py b/tests/api_resources/organizations/test_policies.py index 56814db9..8ad83019 100644 --- a/tests/api_resources/organizations/test_policies.py +++ b/tests/api_resources/organizations/test_policies.py @@ -84,6 +84,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: maximum_environments_per_user="20", maximum_environment_timeout="3600s", maximum_running_environments_per_user="5", + max_port_admission_level="ADMISSION_LEVEL_UNSPECIFIED", members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, @@ -203,6 +204,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> maximum_environments_per_user="20", maximum_environment_timeout="3600s", maximum_running_environments_per_user="5", + max_port_admission_level="ADMISSION_LEVEL_UNSPECIFIED", members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, From 3bddede119602e39cc0fc40d37ec336807d33e7d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:02:16 +0000 Subject: [PATCH 053/211] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 50f4f10b..ccd7f9e4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-174838e2894923e3ff69ca22fed3c1588b9578d0f38f286a58a038b16ba9db81.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-733dd06e091046fb3d5c5f612a4231e5c2d9da46dc16dcfb42ce5b7af8c32c1d.yml openapi_spec_hash: 805193dd7418d079e23e6cdb594e4e59 config_hash: a2977efc262539c5e31ba0e6dfb6a0a1 From e99dc409933596ef561dbd6784e7041d4d64a084 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 13:22:09 +0000 Subject: [PATCH 054/211] feat(api): add RESOURCE_ROLE_ORG_ENVIRONMENTS_READER to resource_role --- .stats.yml | 4 ++-- src/gitpod/types/shared/resource_role.py | 1 + src/gitpod/types/shared_params/resource_role.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ccd7f9e4..b5bc25ec 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-733dd06e091046fb3d5c5f612a4231e5c2d9da46dc16dcfb42ce5b7af8c32c1d.yml -openapi_spec_hash: 805193dd7418d079e23e6cdb594e4e59 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-683cfb7a7ed700a43cac2852fe1e616d44d8112a5729739e2eb011a6ef79e1e0.yml +openapi_spec_hash: c0d0010ffe278692a0f5236a64a3d259 config_hash: a2977efc262539c5e31ba0e6dfb6a0a1 diff --git a/src/gitpod/types/shared/resource_role.py b/src/gitpod/types/shared/resource_role.py index 45759abb..1f0241d7 100644 --- a/src/gitpod/types/shared/resource_role.py +++ b/src/gitpod/types/shared/resource_role.py @@ -12,6 +12,7 @@ "RESOURCE_ROLE_ORG_PROJECTS_ADMIN", "RESOURCE_ROLE_ORG_AUTOMATIONS_ADMIN", "RESOURCE_ROLE_ORG_GROUPS_ADMIN", + "RESOURCE_ROLE_ORG_ENVIRONMENTS_READER", "RESOURCE_ROLE_ORG_AUDIT_LOG_READER", "RESOURCE_ROLE_GROUP_ADMIN", "RESOURCE_ROLE_GROUP_VIEWER", diff --git a/src/gitpod/types/shared_params/resource_role.py b/src/gitpod/types/shared_params/resource_role.py index 94f5abcc..71f2a545 100644 --- a/src/gitpod/types/shared_params/resource_role.py +++ b/src/gitpod/types/shared_params/resource_role.py @@ -14,6 +14,7 @@ "RESOURCE_ROLE_ORG_PROJECTS_ADMIN", "RESOURCE_ROLE_ORG_AUTOMATIONS_ADMIN", "RESOURCE_ROLE_ORG_GROUPS_ADMIN", + "RESOURCE_ROLE_ORG_ENVIRONMENTS_READER", "RESOURCE_ROLE_ORG_AUDIT_LOG_READER", "RESOURCE_ROLE_GROUP_ADMIN", "RESOURCE_ROLE_GROUP_VIEWER", From bcfef9389c66ed0dbb2c8402df42c0c9f28ba288 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 13:59:38 +0000 Subject: [PATCH 055/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b5bc25ec..1e9cf56c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-683cfb7a7ed700a43cac2852fe1e616d44d8112a5729739e2eb011a6ef79e1e0.yml -openapi_spec_hash: c0d0010ffe278692a0f5236a64a3d259 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f283069cd64e780428f84f28d9b3515a349f06b19cd8ec7f8e241cf9e6202b8f.yml +openapi_spec_hash: a5928ad32b13eec97e5e6b036604c126 config_hash: a2977efc262539c5e31ba0e6dfb6a0a1 From 4bf1bad2f66425302ae214d66c936c832da93ba3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 14:42:26 +0000 Subject: [PATCH 056/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1e9cf56c..57b7fd59 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f283069cd64e780428f84f28d9b3515a349f06b19cd8ec7f8e241cf9e6202b8f.yml -openapi_spec_hash: a5928ad32b13eec97e5e6b036604c126 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-7740ccd8e1f202fa72fb98622e311c5906694a66263b2f9f68e7dbb637769661.yml +openapi_spec_hash: 65ba2769da436db7d521a8fa169a16ec config_hash: a2977efc262539c5e31ba0e6dfb6a0a1 From 1dd064f2aa964dd461befa80ef03d0aef37dc509 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 18:18:17 +0000 Subject: [PATCH 057/211] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 57b7fd59..ad88f2fc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-7740ccd8e1f202fa72fb98622e311c5906694a66263b2f9f68e7dbb637769661.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7740ccd8e1f202fa72fb98622e311c5906694a66263b2f9f68e7dbb637769661.yml openapi_spec_hash: 65ba2769da436db7d521a8fa169a16ec config_hash: a2977efc262539c5e31ba0e6dfb6a0a1 From 1314feb43ddcada3148a176fc566f6171b4c2b98 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 20:21:01 +0000 Subject: [PATCH 058/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index ad88f2fc..63252a1b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7740ccd8e1f202fa72fb98622e311c5906694a66263b2f9f68e7dbb637769661.yml -openapi_spec_hash: 65ba2769da436db7d521a8fa169a16ec -config_hash: a2977efc262539c5e31ba0e6dfb6a0a1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-34d4634f81e22d3e86c32a5c5c9a4ceab861dad6c7fed70bb761bd5d10c49f61.yml +openapi_spec_hash: f4891aac3517e486b0634de9ca73ff62 +config_hash: b14a6ba343ae97ee0281ea63762fa26d From 9cabb50f0bf4a6b3de5c9be3c0acd1aec5b7d235 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 16:25:44 +0000 Subject: [PATCH 059/211] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 63252a1b..050a108f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-34d4634f81e22d3e86c32a5c5c9a4ceab861dad6c7fed70bb761bd5d10c49f61.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c08dba5cc76752c58c15fd6fa6511697467595ea10837588e06d7a8406f54987.yml openapi_spec_hash: f4891aac3517e486b0634de9ca73ff62 config_hash: b14a6ba343ae97ee0281ea63762fa26d From b061deb38573beb2771beb0dfe92a5c3ba09b9d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 21:00:55 +0000 Subject: [PATCH 060/211] chore(internal): reformat pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5d1671eb..f278fc4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -171,7 +171,7 @@ show_error_codes = true # # We also exclude our `tests` as mypy doesn't always infer # types correctly and Pyright will still catch any type errors. -exclude = ['src/gitpod/_files.py', '_dev/.*.py', 'tests/.*'] +exclude = ["src/gitpod/_files.py", "_dev/.*.py", "tests/.*"] strict_equality = true implicit_reexport = true From 00538d2159cdc6d4bff72b51fc113309ba77ff67 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 12:09:58 +0000 Subject: [PATCH 061/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 050a108f..2a356b30 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c08dba5cc76752c58c15fd6fa6511697467595ea10837588e06d7a8406f54987.yml -openapi_spec_hash: f4891aac3517e486b0634de9ca73ff62 -config_hash: b14a6ba343ae97ee0281ea63762fa26d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-cb731bb078ce83c206e64e6d32f5d9364dad6384161c3a229e20e02a24c6df61.yml +openapi_spec_hash: 2bd8bc5a1af393eb35d85c51ebe5089e +config_hash: 80140724b84647203353ddc02da48816 From 003cd7dcac020428985564e76c2bb6e45acd434c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 12:13:08 +0000 Subject: [PATCH 062/211] feat(api): remove deprecated access_token from runner responses --- .stats.yml | 4 ++-- src/gitpod/types/runner_create_response.py | 3 --- src/gitpod/types/runner_create_runner_token_response.py | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2a356b30..e1b4c816 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-cb731bb078ce83c206e64e6d32f5d9364dad6384161c3a229e20e02a24c6df61.yml -openapi_spec_hash: 2bd8bc5a1af393eb35d85c51ebe5089e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-d8d06d7ffc04df2d9941889b28db92f1a9c6554214411ed68a939d94e149507a.yml +openapi_spec_hash: 82c005c96e438a429717d51f24596467 config_hash: 80140724b84647203353ddc02da48816 diff --git a/src/gitpod/types/runner_create_response.py b/src/gitpod/types/runner_create_response.py index 2f6821f7..6272114c 100644 --- a/src/gitpod/types/runner_create_response.py +++ b/src/gitpod/types/runner_create_response.py @@ -13,9 +13,6 @@ class RunnerCreateResponse(BaseModel): runner: Runner - access_token: Optional[str] = FieldInfo(alias="accessToken", default=None) - """deprecated, will be removed. Use exchange_token instead.""" - exchange_token: Optional[str] = FieldInfo(alias="exchangeToken", default=None) """ exchange_token is a one-time use token that should be exchanged by the runner diff --git a/src/gitpod/types/runner_create_runner_token_response.py b/src/gitpod/types/runner_create_runner_token_response.py index 0f793a38..c6e0c84e 100644 --- a/src/gitpod/types/runner_create_runner_token_response.py +++ b/src/gitpod/types/runner_create_runner_token_response.py @@ -10,9 +10,6 @@ class RunnerCreateRunnerTokenResponse(BaseModel): - access_token: Optional[str] = FieldInfo(alias="accessToken", default=None) - """deprecated, will be removed. Use exchange_token instead.""" - exchange_token: Optional[str] = FieldInfo(alias="exchangeToken", default=None) """ exchange_token is a one-time use token that should be exchanged by the runner From c53496334c33f9cffca9393fb0ae9e55810de7c7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 15:07:47 +0000 Subject: [PATCH 063/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e1b4c816..1e2e9715 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-d8d06d7ffc04df2d9941889b28db92f1a9c6554214411ed68a939d94e149507a.yml -openapi_spec_hash: 82c005c96e438a429717d51f24596467 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3ca2980a02d73847672b67d021301839bfd63392fc1691c05236925840ade238.yml +openapi_spec_hash: 51110b8f63252ea5e955f6950594cab7 config_hash: 80140724b84647203353ddc02da48816 From 92e400aed0761bf0330b0f9f4e62ddfc44cc47e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 15:08:43 +0000 Subject: [PATCH 064/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1e2e9715..e95a8022 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3ca2980a02d73847672b67d021301839bfd63392fc1691c05236925840ade238.yml -openapi_spec_hash: 51110b8f63252ea5e955f6950594cab7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c84a131403106388b12f346da2ec96f1b9f687eea6863b0ffc65c5222661ebbc.yml +openapi_spec_hash: 3c8dda12e37b547f69e8d02b9e507f3a config_hash: 80140724b84647203353ddc02da48816 From da146994610311e55ea39d60865a0460c4b1d99f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 17:07:36 +0000 Subject: [PATCH 065/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e95a8022..3f8356db 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c84a131403106388b12f346da2ec96f1b9f687eea6863b0ffc65c5222661ebbc.yml -openapi_spec_hash: 3c8dda12e37b547f69e8d02b9e507f3a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f8b7dff8b795ac883b8879e286fc37bd3086b1777d9f22643cebe2631802c0c9.yml +openapi_spec_hash: c2a56f79f49e488d7bade92b125c9d23 config_hash: 80140724b84647203353ddc02da48816 From e8c04d4181f2fce65ab04c9ebc24f711bc8116ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 09:05:32 +0000 Subject: [PATCH 066/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3f8356db..e05cc61b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f8b7dff8b795ac883b8879e286fc37bd3086b1777d9f22643cebe2631802c0c9.yml -openapi_spec_hash: c2a56f79f49e488d7bade92b125c9d23 -config_hash: 80140724b84647203353ddc02da48816 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-493f18eda7390617e5fd5216d7285f5e608fc0ca9aab5bb2c96d5f0b20c4546d.yml +openapi_spec_hash: a2032a891fbc06a3d7395b3e44b285f2 +config_hash: 3db4a1c922cee0f16b8dad0da31c341f From 5e90f8ae3d12d2acf8f1eaab330b5a9d8a39fea0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 12:53:54 +0000 Subject: [PATCH 067/211] feat(api): add incident trigger support to workflow_trigger and workflow_execution --- .stats.yml | 6 +++--- src/gitpod/types/workflow_trigger.py | 2 ++ src/gitpod/types/workflow_trigger_context.py | 1 + src/gitpod/types/workflow_trigger_context_param.py | 1 + src/gitpod/types/workflow_trigger_param.py | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index e05cc61b..8815384e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-493f18eda7390617e5fd5216d7285f5e608fc0ca9aab5bb2c96d5f0b20c4546d.yml -openapi_spec_hash: a2032a891fbc06a3d7395b3e44b285f2 -config_hash: 3db4a1c922cee0f16b8dad0da31c341f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3b6c63dbf36b52a89f73a4f66b8ab0b624608c8bda8cfa5b1baa60e59950b7ff.yml +openapi_spec_hash: bc7fbb5f2e95ac70868022387557008f +config_hash: 173a6e0a8069a38a997548c7f5f8a5e3 diff --git a/src/gitpod/types/workflow_trigger.py b/src/gitpod/types/workflow_trigger.py index cefa42fc..8d7b81ec 100644 --- a/src/gitpod/types/workflow_trigger.py +++ b/src/gitpod/types/workflow_trigger.py @@ -92,6 +92,8 @@ class WorkflowTrigger(BaseModel): - Manual: Can use any context type - Time: Typically uses Projects or Repositories context - PullRequest: Can use any context, FromTrigger uses PR repository context + - Incident: Typically uses Projects or Repositories context (no inherent repo + context) """ manual: Optional[object] = None diff --git a/src/gitpod/types/workflow_trigger_context.py b/src/gitpod/types/workflow_trigger_context.py index 6d82400e..769acdb0 100644 --- a/src/gitpod/types/workflow_trigger_context.py +++ b/src/gitpod/types/workflow_trigger_context.py @@ -103,6 +103,7 @@ class WorkflowTriggerContext(BaseModel): - Manual: Can use any context type - Time: Typically uses Projects or Repositories context - PullRequest: Can use any context, FromTrigger uses PR repository context + - Incident: Typically uses Projects or Repositories context (no inherent repo context) """ agent: Optional[Agent] = None diff --git a/src/gitpod/types/workflow_trigger_context_param.py b/src/gitpod/types/workflow_trigger_context_param.py index 4ebb2e49..1522f619 100644 --- a/src/gitpod/types/workflow_trigger_context_param.py +++ b/src/gitpod/types/workflow_trigger_context_param.py @@ -104,6 +104,7 @@ class WorkflowTriggerContextParam(TypedDict, total=False): - Manual: Can use any context type - Time: Typically uses Projects or Repositories context - PullRequest: Can use any context, FromTrigger uses PR repository context + - Incident: Typically uses Projects or Repositories context (no inherent repo context) """ agent: Agent diff --git a/src/gitpod/types/workflow_trigger_param.py b/src/gitpod/types/workflow_trigger_param.py index ee1ef3c1..0753a773 100644 --- a/src/gitpod/types/workflow_trigger_param.py +++ b/src/gitpod/types/workflow_trigger_param.py @@ -90,6 +90,8 @@ class WorkflowTriggerParam(TypedDict, total=False): - Manual: Can use any context type - Time: Typically uses Projects or Repositories context - PullRequest: Can use any context, FromTrigger uses PR repository context + - Incident: Typically uses Projects or Repositories context (no inherent repo + context) """ manual: object From bc55c04c099fc01db291827586c6ad292d973596 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 16:14:04 +0000 Subject: [PATCH 068/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8815384e..9d1708a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3b6c63dbf36b52a89f73a4f66b8ab0b624608c8bda8cfa5b1baa60e59950b7ff.yml -openapi_spec_hash: bc7fbb5f2e95ac70868022387557008f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-4870c4a1239ec91e7208abe28cd87290284b739c343900f463830afea4689849.yml +openapi_spec_hash: 210df8ac2d6594e968e9488a92264ba0 config_hash: 173a6e0a8069a38a997548c7f5f8a5e3 From 957eb60ea90eb7ed188da2cbfb0cd43838b0affd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 18:04:42 +0000 Subject: [PATCH 069/211] feat(api): add access_token field to runner create response models --- .stats.yml | 4 ++-- src/gitpod/types/runner_create_response.py | 3 +++ src/gitpod/types/runner_create_runner_token_response.py | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9d1708a8..3aa3af98 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-4870c4a1239ec91e7208abe28cd87290284b739c343900f463830afea4689849.yml -openapi_spec_hash: 210df8ac2d6594e968e9488a92264ba0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9011dcb1591f4dec81232db8d8d4dff1962ff419990c80413a132166a98d5011.yml +openapi_spec_hash: 569a080670e5f7cb2ce42739661cbb45 config_hash: 173a6e0a8069a38a997548c7f5f8a5e3 diff --git a/src/gitpod/types/runner_create_response.py b/src/gitpod/types/runner_create_response.py index 6272114c..2f6821f7 100644 --- a/src/gitpod/types/runner_create_response.py +++ b/src/gitpod/types/runner_create_response.py @@ -13,6 +13,9 @@ class RunnerCreateResponse(BaseModel): runner: Runner + access_token: Optional[str] = FieldInfo(alias="accessToken", default=None) + """deprecated, will be removed. Use exchange_token instead.""" + exchange_token: Optional[str] = FieldInfo(alias="exchangeToken", default=None) """ exchange_token is a one-time use token that should be exchanged by the runner diff --git a/src/gitpod/types/runner_create_runner_token_response.py b/src/gitpod/types/runner_create_runner_token_response.py index c6e0c84e..0f793a38 100644 --- a/src/gitpod/types/runner_create_runner_token_response.py +++ b/src/gitpod/types/runner_create_runner_token_response.py @@ -10,6 +10,9 @@ class RunnerCreateRunnerTokenResponse(BaseModel): + access_token: Optional[str] = FieldInfo(alias="accessToken", default=None) + """deprecated, will be removed. Use exchange_token instead.""" + exchange_token: Optional[str] = FieldInfo(alias="exchangeToken", default=None) """ exchange_token is a one-time use token that should be exchanged by the runner From ffae09882fb95038cefb3733da85b8da942ddfbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 07:13:55 +0000 Subject: [PATCH 070/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3aa3af98..7831331a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9011dcb1591f4dec81232db8d8d4dff1962ff419990c80413a132166a98d5011.yml -openapi_spec_hash: 569a080670e5f7cb2ce42739661cbb45 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ea04ed78f478f5c9cceff71f17c10f838ddd3a4ec798173fccb4bb69445c771a.yml +openapi_spec_hash: 9bca4cbda69b57e95b2bbcb1041c5f8f config_hash: 173a6e0a8069a38a997548c7f5f8a5e3 From 3eaf974366c729314f17f1f67a9fcbf501ddd8ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 11:51:37 +0000 Subject: [PATCH 071/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7831331a..cff0229f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ea04ed78f478f5c9cceff71f17c10f838ddd3a4ec798173fccb4bb69445c771a.yml -openapi_spec_hash: 9bca4cbda69b57e95b2bbcb1041c5f8f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a9e518013923ec8fb9410a567307fcaef855a1f03e4329c8e7865dfcafa0b1ff.yml +openapi_spec_hash: 965f15bf7fb0cecf141406b3d2046ef8 config_hash: 173a6e0a8069a38a997548c7f5f8a5e3 From 42cb37722d860ef18c6fccc43827f2059cfe8146 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 13:04:08 +0000 Subject: [PATCH 072/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cff0229f..77d31442 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a9e518013923ec8fb9410a567307fcaef855a1f03e4329c8e7865dfcafa0b1ff.yml -openapi_spec_hash: 965f15bf7fb0cecf141406b3d2046ef8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-02dbff9c3dc18fcb065524419461a61d4dbde9caf9c38e9cae75bbb56a43b86f.yml +openapi_spec_hash: 0dd7f437820130b0ca91324d12f58634 config_hash: 173a6e0a8069a38a997548c7f5f8a5e3 From af35365e4ba05cba876ec7eb1d90451ec1943e90 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 16:52:54 +0000 Subject: [PATCH 073/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 77d31442..2bb8cde1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-02dbff9c3dc18fcb065524419461a61d4dbde9caf9c38e9cae75bbb56a43b86f.yml -openapi_spec_hash: 0dd7f437820130b0ca91324d12f58634 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-5160be627260fd872d0f4936cf0bcbb12910b6d5685348fae9c16df784b43e84.yml +openapi_spec_hash: c56c8a59c5c57c48e3f480d07bfecf1b config_hash: 173a6e0a8069a38a997548c7f5f8a5e3 From 290c69d3959c3e686a47cc2b77bb166f44cbb436 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 08:31:43 +0000 Subject: [PATCH 074/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2bb8cde1..491e2739 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-5160be627260fd872d0f4936cf0bcbb12910b6d5685348fae9c16df784b43e84.yml -openapi_spec_hash: c56c8a59c5c57c48e3f480d07bfecf1b -config_hash: 173a6e0a8069a38a997548c7f5f8a5e3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-2c826f16ee44cc15c6309755aff37a31c91bc7437bb863a598587c0b998b55a5.yml +openapi_spec_hash: 0d94a05e7220eaa0b3f1f04559612416 +config_hash: a5dff404dcc41293fdc9d3a131a6f2e3 From 2dc3c8dbe693a77dc985066501d9bc9afacac347 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 14:05:04 +0000 Subject: [PATCH 075/211] chore(internal): regenerate SDK with no functional changes --- .stats.yml | 4 ++-- src/gitpod/types/runner_capability.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 491e2739..596b02e2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-2c826f16ee44cc15c6309755aff37a31c91bc7437bb863a598587c0b998b55a5.yml -openapi_spec_hash: 0d94a05e7220eaa0b3f1f04559612416 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-771a93472886d9a5ad2f4322a3585a6006eeea484e04d9e610a6b6f5afc12c7b.yml +openapi_spec_hash: f44f26ac4d487d9831848a729032dc51 config_hash: a5dff404dcc41293fdc9d3a131a6f2e3 diff --git a/src/gitpod/types/runner_capability.py b/src/gitpod/types/runner_capability.py index 2e473ac1..26a572c1 100644 --- a/src/gitpod/types/runner_capability.py +++ b/src/gitpod/types/runner_capability.py @@ -19,4 +19,5 @@ "RUNNER_CAPABILITY_WARM_POOL", "RUNNER_CAPABILITY_ASG_WARM_POOL", "RUNNER_CAPABILITY_PORT_AUTHENTICATION", + "RUNNER_CAPABILITY_HORIZONTAL_SCALING", ] From 349a1bab3893da2900dad96fe92213c0d79c3c92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 10:58:36 +0000 Subject: [PATCH 076/211] feat(api): add credential_proxy to secrets, remove format from environment spec --- .stats.yml | 4 +-- src/gitpod/resources/secrets.py | 18 +++++++++++ src/gitpod/types/environment_spec.py | 6 ---- src/gitpod/types/environment_spec_param.py | 6 ---- src/gitpod/types/secret.py | 35 ++++++++++++++++++++-- src/gitpod/types/secret_create_params.py | 34 ++++++++++++++++++++- tests/api_resources/test_environments.py | 4 --- tests/api_resources/test_secrets.py | 8 +++++ 8 files changed, 94 insertions(+), 21 deletions(-) diff --git a/.stats.yml b/.stats.yml index 596b02e2..e8a97e56 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-771a93472886d9a5ad2f4322a3585a6006eeea484e04d9e610a6b6f5afc12c7b.yml -openapi_spec_hash: f44f26ac4d487d9831848a729032dc51 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-22142c64382973b366500f7fd197f8baa74d441cc7418b74306700c23031ff21.yml +openapi_spec_hash: 2d481c6c65d22f4de3c52beb496cb0bd config_hash: a5dff404dcc41293fdc9d3a131a6f2e3 diff --git a/src/gitpod/resources/secrets.py b/src/gitpod/resources/secrets.py index 915a0c79..4ba66df7 100644 --- a/src/gitpod/resources/secrets.py +++ b/src/gitpod/resources/secrets.py @@ -56,6 +56,7 @@ def create( *, api_only: bool | Omit = omit, container_registry_basic_auth_host: str | Omit = omit, + credential_proxy: secret_create_params.CredentialProxy | Omit = omit, environment_variable: bool | Omit = omit, file_path: str | Omit = omit, name: str | Omit = omit, @@ -122,6 +123,13 @@ def create( container_registry_basic_auth_host: secret will be mounted as a docker config in the environment VM, mount will have the docker registry host + credential_proxy: credential_proxy configures transparent credential injection when environments + materialize this secret. When set, the credential proxy intercepts HTTPS traffic + to the target hosts and replaces the dummy mounted value with the real value in + the specified HTTP header. The real secret value is never exposed in the + environment. This field is orthogonal to mount — a secret can be both mounted + and proxied at the same time. + environment_variable: secret will be created as an Environment Variable with the same name as the secret @@ -152,6 +160,7 @@ def create( { "api_only": api_only, "container_registry_basic_auth_host": container_registry_basic_auth_host, + "credential_proxy": credential_proxy, "environment_variable": environment_variable, "file_path": file_path, "name": name, @@ -432,6 +441,7 @@ async def create( *, api_only: bool | Omit = omit, container_registry_basic_auth_host: str | Omit = omit, + credential_proxy: secret_create_params.CredentialProxy | Omit = omit, environment_variable: bool | Omit = omit, file_path: str | Omit = omit, name: str | Omit = omit, @@ -498,6 +508,13 @@ async def create( container_registry_basic_auth_host: secret will be mounted as a docker config in the environment VM, mount will have the docker registry host + credential_proxy: credential_proxy configures transparent credential injection when environments + materialize this secret. When set, the credential proxy intercepts HTTPS traffic + to the target hosts and replaces the dummy mounted value with the real value in + the specified HTTP header. The real secret value is never exposed in the + environment. This field is orthogonal to mount — a secret can be both mounted + and proxied at the same time. + environment_variable: secret will be created as an Environment Variable with the same name as the secret @@ -528,6 +545,7 @@ async def create( { "api_only": api_only, "container_registry_basic_auth_host": container_registry_basic_auth_host, + "credential_proxy": credential_proxy, "environment_variable": environment_variable, "file_path": file_path, "name": name, diff --git a/src/gitpod/types/environment_spec.py b/src/gitpod/types/environment_spec.py index 798637b0..3118aa0e 100644 --- a/src/gitpod/types/environment_spec.py +++ b/src/gitpod/types/environment_spec.py @@ -144,12 +144,6 @@ class SecretCredentialProxy(BaseModel): as a git credential) and proxied at the same time. """ - format: Optional[Literal["FORMAT_UNSPECIFIED", "FORMAT_PLAIN", "FORMAT_BASE64"]] = None - """format describes how the secret value is encoded. - - The proxy uses this to decode the value before injecting it into the header. - """ - header: Optional[str] = None """header is the HTTP header name to inject (e.g. "Authorization").""" diff --git a/src/gitpod/types/environment_spec_param.py b/src/gitpod/types/environment_spec_param.py index 783a9330..dfad7957 100644 --- a/src/gitpod/types/environment_spec_param.py +++ b/src/gitpod/types/environment_spec_param.py @@ -152,12 +152,6 @@ class SecretCredentialProxy(TypedDict, total=False): as a git credential) and proxied at the same time. """ - format: Literal["FORMAT_UNSPECIFIED", "FORMAT_PLAIN", "FORMAT_BASE64"] - """format describes how the secret value is encoded. - - The proxy uses this to decode the value before injecting it into the header. - """ - header: str """header is the HTTP header name to inject (e.g. "Authorization").""" diff --git a/src/gitpod/types/secret.py b/src/gitpod/types/secret.py index 052d62a9..92a977c6 100644 --- a/src/gitpod/types/secret.py +++ b/src/gitpod/types/secret.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import List, Optional from datetime import datetime from pydantic import Field as FieldInfo @@ -9,7 +9,28 @@ from .secret_scope import SecretScope from .shared.subject import Subject -__all__ = ["Secret"] +__all__ = ["Secret", "CredentialProxy"] + + +class CredentialProxy(BaseModel): + """ + credential_proxy configures transparent credential injection via the + credential proxy. When set, the credential proxy intercepts HTTPS + traffic to the target hosts and replaces the dummy mounted value with + the real value in the specified HTTP header. The real secret value is + never exposed in the environment. + This field is orthogonal to mount — a secret can be both mounted and + proxied at the same time. + """ + + header: Optional[str] = None + """header is the HTTP header name to inject (e.g. "Authorization").""" + + target_hosts: Optional[List[str]] = FieldInfo(alias="targetHosts", default=None) + """ + target_hosts lists the hostnames to intercept (for example "github.com" or + "\\**.github.com"). Wildcards are subdomain-only and do not match the apex domain. + """ class Secret(BaseModel): @@ -116,6 +137,16 @@ class Secret(BaseModel): creator: Optional[Subject] = None """creator is the identity of the creator of the secret""" + credential_proxy: Optional[CredentialProxy] = FieldInfo(alias="credentialProxy", default=None) + """ + credential_proxy configures transparent credential injection via the credential + proxy. When set, the credential proxy intercepts HTTPS traffic to the target + hosts and replaces the dummy mounted value with the real value in the specified + HTTP header. The real secret value is never exposed in the environment. This + field is orthogonal to mount — a secret can be both mounted and proxied at the + same time. + """ + environment_variable: Optional[bool] = FieldInfo(alias="environmentVariable", default=None) """ secret will be created as an Environment Variable with the same name as the diff --git a/src/gitpod/types/secret_create_params.py b/src/gitpod/types/secret_create_params.py index 99e545f3..a00660b1 100644 --- a/src/gitpod/types/secret_create_params.py +++ b/src/gitpod/types/secret_create_params.py @@ -4,10 +4,11 @@ from typing_extensions import Annotated, TypedDict +from .._types import SequenceNotStr from .._utils import PropertyInfo from .secret_scope_param import SecretScopeParam -__all__ = ["SecretCreateParams"] +__all__ = ["SecretCreateParams", "CredentialProxy"] class SecretCreateParams(TypedDict, total=False): @@ -24,6 +25,16 @@ class SecretCreateParams(TypedDict, total=False): the docker registry host """ + credential_proxy: Annotated[CredentialProxy, PropertyInfo(alias="credentialProxy")] + """ + credential_proxy configures transparent credential injection when environments + materialize this secret. When set, the credential proxy intercepts HTTPS traffic + to the target hosts and replaces the dummy mounted value with the real value in + the specified HTTP header. The real secret value is never exposed in the + environment. This field is orthogonal to mount — a secret can be both mounted + and proxied at the same time. + """ + environment_variable: Annotated[bool, PropertyInfo(alias="environmentVariable")] """ secret will be created as an Environment Variable with the same name as the @@ -52,3 +63,24 @@ class SecretCreateParams(TypedDict, total=False): value: str """value is the plaintext value of the secret""" + + +class CredentialProxy(TypedDict, total=False): + """ + credential_proxy configures transparent credential injection when + environments materialize this secret. When set, the credential proxy + intercepts HTTPS traffic to the target hosts and replaces the dummy + mounted value with the real value in the specified HTTP header. The real + secret value is never exposed in the environment. + This field is orthogonal to mount — a secret can be both mounted and + proxied at the same time. + """ + + header: str + """header is the HTTP header name to inject (e.g. "Authorization").""" + + target_hosts: Annotated[SequenceNotStr[str], PropertyInfo(alias="targetHosts")] + """ + target_hosts lists the hostnames to intercept (for example "github.com" or + "\\**.github.com"). Wildcards are subdomain-only and do not match the apex domain. + """ diff --git a/tests/api_resources/test_environments.py b/tests/api_resources/test_environments.py index 0b44c1c4..969a5688 100644 --- a/tests/api_resources/test_environments.py +++ b/tests/api_resources/test_environments.py @@ -108,7 +108,6 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "api_only": True, "container_registry_basic_auth_host": "containerRegistryBasicAuthHost", "credential_proxy": { - "format": "FORMAT_UNSPECIFIED", "header": "header", "target_hosts": ["string"], }, @@ -487,7 +486,6 @@ def test_method_create_from_project_with_all_params(self, client: Gitpod) -> Non "api_only": True, "container_registry_basic_auth_host": "containerRegistryBasicAuthHost", "credential_proxy": { - "format": "FORMAT_UNSPECIFIED", "header": "header", "target_hosts": ["string"], }, @@ -808,7 +806,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "api_only": True, "container_registry_basic_auth_host": "containerRegistryBasicAuthHost", "credential_proxy": { - "format": "FORMAT_UNSPECIFIED", "header": "header", "target_hosts": ["string"], }, @@ -1187,7 +1184,6 @@ async def test_method_create_from_project_with_all_params(self, async_client: As "api_only": True, "container_registry_basic_auth_host": "containerRegistryBasicAuthHost", "credential_proxy": { - "format": "FORMAT_UNSPECIFIED", "header": "header", "target_hosts": ["string"], }, diff --git a/tests/api_resources/test_secrets.py b/tests/api_resources/test_secrets.py index cbed1cda..694d69ab 100644 --- a/tests/api_resources/test_secrets.py +++ b/tests/api_resources/test_secrets.py @@ -34,6 +34,10 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: secret = client.secrets.create( api_only=True, container_registry_basic_auth_host="containerRegistryBasicAuthHost", + credential_proxy={ + "header": "header", + "target_hosts": ["string"], + }, environment_variable=True, file_path="filePath", name="DATABASE_URL", @@ -247,6 +251,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> secret = await async_client.secrets.create( api_only=True, container_registry_basic_auth_host="containerRegistryBasicAuthHost", + credential_proxy={ + "header": "header", + "target_hosts": ["string"], + }, environment_variable=True, file_path="filePath", name="DATABASE_URL", From 74fd1e99e74f94f7918710631c0971423d14a432 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 12:33:56 +0000 Subject: [PATCH 077/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e8a97e56..1762e462 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-22142c64382973b366500f7fd197f8baa74d441cc7418b74306700c23031ff21.yml -openapi_spec_hash: 2d481c6c65d22f4de3c52beb496cb0bd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f6b1d7cbfe7fad16b662b902bb5fd376d078a7b38bb6a2469dd819061ff42d21.yml +openapi_spec_hash: e93cc2d66be92ae0cde4eb6b3cc19f22 config_hash: a5dff404dcc41293fdc9d3a131a6f2e3 From 9371ec1502be44e4684f8b1e0c7c6d55e8ead8dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 16:26:57 +0000 Subject: [PATCH 078/211] fix(client): add missing f-string prefix in file type error message --- src/gitpod/_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gitpod/_files.py b/src/gitpod/_files.py index 0fdce17b..76da9e08 100644 --- a/src/gitpod/_files.py +++ b/src/gitpod/_files.py @@ -99,7 +99,7 @@ async def async_to_httpx_files(files: RequestFiles | None) -> HttpxRequestFiles elif is_sequence_t(files): files = [(key, await _async_transform_file(file)) for key, file in files] else: - raise TypeError("Unexpected file type input {type(files)}, expected mapping or sequence") + raise TypeError(f"Unexpected file type input {type(files)}, expected mapping or sequence") return files From 45978412c848045243fad9bff931d6e926f9d239 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 May 2026 16:44:36 +0000 Subject: [PATCH 079/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1762e462..399384bc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f6b1d7cbfe7fad16b662b902bb5fd376d078a7b38bb6a2469dd819061ff42d21.yml -openapi_spec_hash: e93cc2d66be92ae0cde4eb6b3cc19f22 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a949083a0698a5eb6edb1ef6a69c5b61e73f7c1d8a4a2310a8a3f77cfffee1c1.yml +openapi_spec_hash: 8741b68a8fc8d4eb469d64fc94dbb1ac config_hash: a5dff404dcc41293fdc9d3a131a6f2e3 From b6d52d578d30eae94498aaab9269a9ab453cd336 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 11:37:03 +0000 Subject: [PATCH 080/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 399384bc..56724890 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a949083a0698a5eb6edb1ef6a69c5b61e73f7c1d8a4a2310a8a3f77cfffee1c1.yml -openapi_spec_hash: 8741b68a8fc8d4eb469d64fc94dbb1ac -config_hash: a5dff404dcc41293fdc9d3a131a6f2e3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-99f6cf5bd360953b173ccda938bd6bd0a45c460aac360dfe31d1a8d03337d264.yml +openapi_spec_hash: 9581f07ffbaf91d67063b97df9ae2634 +config_hash: e7d6e90c037f5d495ae913f3806471fd From 5d1de14cbb890fc4683761b20e5f0100040245c0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 12:27:38 +0000 Subject: [PATCH 081/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 56724890..8b8112ad 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-99f6cf5bd360953b173ccda938bd6bd0a45c460aac360dfe31d1a8d03337d264.yml -openapi_spec_hash: 9581f07ffbaf91d67063b97df9ae2634 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8eba3e5616c1eb60fa1571933e98c3fae7117673404d34535e654808ad69ea00.yml +openapi_spec_hash: 8f9546550548a9b4f3f1e8ffc9bae682 config_hash: e7d6e90c037f5d495ae913f3806471fd From d3051d5556d9d629dc5d46b0ed1bff86426744a1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 13:08:24 +0000 Subject: [PATCH 082/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8b8112ad..27beeef4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8eba3e5616c1eb60fa1571933e98c3fae7117673404d34535e654808ad69ea00.yml -openapi_spec_hash: 8f9546550548a9b4f3f1e8ffc9bae682 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8eb16dd2e26c8fd1ca37ef960aca95069f457ff8bdeca2347a2b157ae096ccd4.yml +openapi_spec_hash: 6c5882382583c7db5824d6438a489724 config_hash: e7d6e90c037f5d495ae913f3806471fd From cbf4bac0498fbc32a85fb3d620ba2d7d551b53d0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 17:42:10 +0000 Subject: [PATCH 083/211] feat(internal/types): support eagerly validating pydantic iterators --- src/gitpod/_models.py | 80 +++++++++++++++++++++++++++++++++++++++++++ tests/test_models.py | 60 ++++++++++++++++++++++++++++++-- 2 files changed, 137 insertions(+), 3 deletions(-) diff --git a/src/gitpod/_models.py b/src/gitpod/_models.py index 29070e05..8c5ab260 100644 --- a/src/gitpod/_models.py +++ b/src/gitpod/_models.py @@ -25,7 +25,9 @@ ClassVar, Protocol, Required, + Annotated, ParamSpec, + TypeAlias, TypedDict, TypeGuard, final, @@ -79,7 +81,15 @@ from ._constants import RAW_RESPONSE_HEADER if TYPE_CHECKING: + from pydantic import GetCoreSchemaHandler, ValidatorFunctionWrapHandler + from pydantic_core import CoreSchema, core_schema from pydantic_core.core_schema import ModelField, ModelSchema, LiteralSchema, ModelFieldsSchema +else: + try: + from pydantic_core import CoreSchema, core_schema + except ImportError: + CoreSchema = None + core_schema = None __all__ = ["BaseModel", "GenericModel"] @@ -396,6 +406,76 @@ def model_dump_json( ) +class _EagerIterable(list[_T], Generic[_T]): + """ + Accepts any Iterable[T] input (including generators), consumes it + eagerly, and validates all items upfront. + + Validation preserves the original container type where possible + (e.g. a set[T] stays a set[T]). Serialization (model_dump / JSON) + always emits a list — round-tripping through model_dump() will not + restore the original container type. + """ + + @classmethod + def __get_pydantic_core_schema__( + cls, + source_type: Any, + handler: GetCoreSchemaHandler, + ) -> CoreSchema: + (item_type,) = get_args(source_type) or (Any,) + item_schema: CoreSchema = handler.generate_schema(item_type) + list_of_items_schema: CoreSchema = core_schema.list_schema(item_schema) + + return core_schema.no_info_wrap_validator_function( + cls._validate, + list_of_items_schema, + serialization=core_schema.plain_serializer_function_ser_schema( + cls._serialize, + info_arg=False, + ), + ) + + @staticmethod + def _validate(v: Iterable[_T], handler: "ValidatorFunctionWrapHandler") -> Any: + original_type: type[Any] = type(v) + + # Normalize to list so list_schema can validate each item + if isinstance(v, list): + items: list[_T] = v + else: + try: + items = list(v) + except TypeError as e: + raise TypeError("Value is not iterable") from e + + # Validate items against the inner schema + validated: list[_T] = handler(items) + + # Reconstruct original container type + if original_type is list: + return validated + # str(list) produces the list's repr, not a string built from items, + # so skip reconstruction for str and its subclasses. + if issubclass(original_type, str): + return validated + try: + return original_type(validated) + except (TypeError, ValueError): + # If the type cannot be reconstructed, just return the validated list + return validated + + @staticmethod + def _serialize(v: Iterable[_T]) -> list[_T]: + """Always serialize as a list so Pydantic's JSON encoder is happy.""" + if isinstance(v, list): + return v + return list(v) + + +EagerIterable: TypeAlias = Annotated[Iterable[_T], _EagerIterable] + + def _construct_field(value: object, field: FieldInfo, key: str) -> object: if value is None: return field_get_default(field) diff --git a/tests/test_models.py b/tests/test_models.py index 47fa9efd..ce2b6d8d 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,7 +1,8 @@ import json -from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast +from typing import TYPE_CHECKING, Any, Dict, List, Union, Iterable, Optional, cast from datetime import datetime, timezone -from typing_extensions import Literal, Annotated, TypeAliasType +from collections import deque +from typing_extensions import Literal, Annotated, TypedDict, TypeAliasType import pytest import pydantic @@ -9,7 +10,7 @@ from gitpod._utils import PropertyInfo from gitpod._compat import PYDANTIC_V1, parse_obj, model_dump, model_json -from gitpod._models import DISCRIMINATOR_CACHE, BaseModel, construct_type +from gitpod._models import DISCRIMINATOR_CACHE, BaseModel, EagerIterable, construct_type class BasicModel(BaseModel): @@ -961,3 +962,56 @@ def __getattr__(self, attr: str) -> Item: ... assert model.a.prop == 1 assert isinstance(model.a, Item) assert model.other == "foo" + + +# NOTE: Workaround for Pydantic Iterable behavior. +# Iterable fields are replaced with a ValidatorIterator and may be consumed +# during serialization, which can cause subsequent dumps to return empty data. +# See: https://github.com/pydantic/pydantic/issues/9541 +@pytest.mark.parametrize( + "data, expected_validated", + [ + ([1, 2, 3], [1, 2, 3]), + ((1, 2, 3), (1, 2, 3)), + (set([1, 2, 3]), set([1, 2, 3])), + (iter([1, 2, 3]), [1, 2, 3]), + ([], []), + ((x for x in [1, 2, 3]), [1, 2, 3]), + (map(lambda x: x, [1, 2, 3]), [1, 2, 3]), + (frozenset([1, 2, 3]), frozenset([1, 2, 3])), + (deque([1, 2, 3]), deque([1, 2, 3])), + ], + ids=["list", "tuple", "set", "iterator", "empty", "generator", "map", "frozenset", "deque"], +) +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2") +def test_iterable_construction(data: Iterable[int], expected_validated: Iterable[int]) -> None: + class TypeWithIterable(TypedDict): + items: EagerIterable[int] + + class Model(BaseModel): + data: TypeWithIterable + + m = Model.model_validate({"data": {"items": data}}) + assert m.data["items"] == expected_validated + + # Verify repeated dumps don't lose data (the original bug) + assert m.model_dump()["data"]["items"] == list(expected_validated) + assert m.model_dump()["data"]["items"] == list(expected_validated) + + +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2") +def test_iterable_construction_str_falls_back_to_list() -> None: + # str is iterable (over chars), but str(list_of_chars) produces the list's repr + # rather than reconstructing a string from items. We special-case str to fall + # back to list instead of attempting reconstruction. + class TypeWithIterable(TypedDict): + items: EagerIterable[str] + + class Model(BaseModel): + data: TypeWithIterable + + m = Model.model_validate({"data": {"items": "hello"}}) + + # falls back to list of chars rather than calling str(["h", "e", "l", "l", "o"]) + assert m.data["items"] == ["h", "e", "l", "l", "o"] + assert m.model_dump()["data"]["items"] == ["h", "e", "l", "l", "o"] From e1bba7667f79b870c55096a00f18032bda03a65d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 18:26:32 +0000 Subject: [PATCH 084/211] feat(api): add allow_unverified_email_scim_fallback_match to scim_configurations --- .stats.yml | 4 ++-- .../organizations/scim_configurations.py | 24 +++++++++++++++++++ .../types/organizations/scim_configuration.py | 9 +++++++ .../scim_configuration_create_params.py | 9 +++++++ .../scim_configuration_update_params.py | 9 +++++++ .../organizations/test_scim_configurations.py | 4 ++++ 6 files changed, 57 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 27beeef4..3c14460f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8eb16dd2e26c8fd1ca37ef960aca95069f457ff8bdeca2347a2b157ae096ccd4.yml -openapi_spec_hash: 6c5882382583c7db5824d6438a489724 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-17898495c070ff2b83528ccf268ff3a7426ccabe697c19ca5fe034daa7f76ed0.yml +openapi_spec_hash: fc0b1da285521ddbb5293a228b31b51f config_hash: e7d6e90c037f5d495ae913f3806471fd diff --git a/src/gitpod/resources/organizations/scim_configurations.py b/src/gitpod/resources/organizations/scim_configurations.py index 6176c402..4cfd9f5e 100644 --- a/src/gitpod/resources/organizations/scim_configurations.py +++ b/src/gitpod/resources/organizations/scim_configurations.py @@ -60,6 +60,7 @@ def create( *, organization_id: str, sso_configuration_id: str, + allow_unverified_email_account_linking: Optional[bool] | Omit = omit, name: Optional[str] | Omit = omit, token_expires_in: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -107,6 +108,10 @@ def create( sso_configuration_id: sso_configuration_id is the SSO configuration to link (required for user provisioning) + allow_unverified_email_account_linking: allow_unverified_email_account_linking allows SCIM to link provisioned users to + existing accounts when the identity provider does not mark the email address as + verified + name: name is a human-readable name for the SCIM configuration token_expires_in: token_expires_in is the duration until the token expires. Defaults to 1 year. @@ -126,6 +131,7 @@ def create( { "organization_id": organization_id, "sso_configuration_id": sso_configuration_id, + "allow_unverified_email_account_linking": allow_unverified_email_account_linking, "name": name, "token_expires_in": token_expires_in, }, @@ -194,6 +200,7 @@ def update( self, *, scim_configuration_id: str, + allow_unverified_email_account_linking: Optional[bool] | Omit = omit, enabled: Optional[bool] | Omit = omit, name: Optional[str] | Omit = omit, sso_configuration_id: Optional[str] | Omit = omit, @@ -236,6 +243,10 @@ def update( Args: scim_configuration_id: scim_configuration_id is the ID of the SCIM configuration to update + allow_unverified_email_account_linking: allow_unverified_email_account_linking allows SCIM to link provisioned users to + existing accounts when the identity provider does not mark the email address as + verified + enabled: enabled controls whether SCIM provisioning is active name: name is a human-readable name for the SCIM configuration @@ -255,6 +266,7 @@ def update( body=maybe_transform( { "scim_configuration_id": scim_configuration_id, + "allow_unverified_email_account_linking": allow_unverified_email_account_linking, "enabled": enabled, "name": name, "sso_configuration_id": sso_configuration_id, @@ -482,6 +494,7 @@ async def create( *, organization_id: str, sso_configuration_id: str, + allow_unverified_email_account_linking: Optional[bool] | Omit = omit, name: Optional[str] | Omit = omit, token_expires_in: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -529,6 +542,10 @@ async def create( sso_configuration_id: sso_configuration_id is the SSO configuration to link (required for user provisioning) + allow_unverified_email_account_linking: allow_unverified_email_account_linking allows SCIM to link provisioned users to + existing accounts when the identity provider does not mark the email address as + verified + name: name is a human-readable name for the SCIM configuration token_expires_in: token_expires_in is the duration until the token expires. Defaults to 1 year. @@ -548,6 +565,7 @@ async def create( { "organization_id": organization_id, "sso_configuration_id": sso_configuration_id, + "allow_unverified_email_account_linking": allow_unverified_email_account_linking, "name": name, "token_expires_in": token_expires_in, }, @@ -616,6 +634,7 @@ async def update( self, *, scim_configuration_id: str, + allow_unverified_email_account_linking: Optional[bool] | Omit = omit, enabled: Optional[bool] | Omit = omit, name: Optional[str] | Omit = omit, sso_configuration_id: Optional[str] | Omit = omit, @@ -658,6 +677,10 @@ async def update( Args: scim_configuration_id: scim_configuration_id is the ID of the SCIM configuration to update + allow_unverified_email_account_linking: allow_unverified_email_account_linking allows SCIM to link provisioned users to + existing accounts when the identity provider does not mark the email address as + verified + enabled: enabled controls whether SCIM provisioning is active name: name is a human-readable name for the SCIM configuration @@ -677,6 +700,7 @@ async def update( body=await async_maybe_transform( { "scim_configuration_id": scim_configuration_id, + "allow_unverified_email_account_linking": allow_unverified_email_account_linking, "enabled": enabled, "name": name, "sso_configuration_id": sso_configuration_id, diff --git a/src/gitpod/types/organizations/scim_configuration.py b/src/gitpod/types/organizations/scim_configuration.py index 8b12ff05..f3879104 100644 --- a/src/gitpod/types/organizations/scim_configuration.py +++ b/src/gitpod/types/organizations/scim_configuration.py @@ -30,6 +30,15 @@ class ScimConfiguration(BaseModel): updated_at: datetime = FieldInfo(alias="updatedAt") """updated_at is when the SCIM configuration was last updated""" + allow_unverified_email_account_linking: Optional[bool] = FieldInfo( + alias="allowUnverifiedEmailAccountLinking", default=None + ) + """ + allow_unverified_email_account_linking allows SCIM to link provisioned users to + existing accounts when the identity provider does not mark the email address as + verified + """ + enabled: Optional[bool] = None """enabled indicates if SCIM provisioning is active""" diff --git a/src/gitpod/types/organizations/scim_configuration_create_params.py b/src/gitpod/types/organizations/scim_configuration_create_params.py index e8f5a2ee..225662ca 100644 --- a/src/gitpod/types/organizations/scim_configuration_create_params.py +++ b/src/gitpod/types/organizations/scim_configuration_create_params.py @@ -23,6 +23,15 @@ class ScimConfigurationCreateParams(TypedDict, total=False): provisioning) """ + allow_unverified_email_account_linking: Annotated[ + Optional[bool], PropertyInfo(alias="allowUnverifiedEmailAccountLinking") + ] + """ + allow_unverified_email_account_linking allows SCIM to link provisioned users to + existing accounts when the identity provider does not mark the email address as + verified + """ + name: Optional[str] """name is a human-readable name for the SCIM configuration""" diff --git a/src/gitpod/types/organizations/scim_configuration_update_params.py b/src/gitpod/types/organizations/scim_configuration_update_params.py index da919176..d0c0862f 100644 --- a/src/gitpod/types/organizations/scim_configuration_update_params.py +++ b/src/gitpod/types/organizations/scim_configuration_update_params.py @@ -14,6 +14,15 @@ class ScimConfigurationUpdateParams(TypedDict, total=False): scim_configuration_id: Required[Annotated[str, PropertyInfo(alias="scimConfigurationId")]] """scim_configuration_id is the ID of the SCIM configuration to update""" + allow_unverified_email_account_linking: Annotated[ + Optional[bool], PropertyInfo(alias="allowUnverifiedEmailAccountLinking") + ] + """ + allow_unverified_email_account_linking allows SCIM to link provisioned users to + existing accounts when the identity provider does not mark the email address as + verified + """ + enabled: Optional[bool] """enabled controls whether SCIM provisioning is active""" diff --git a/tests/api_resources/organizations/test_scim_configurations.py b/tests/api_resources/organizations/test_scim_configurations.py index 2bd96136..03411ef3 100644 --- a/tests/api_resources/organizations/test_scim_configurations.py +++ b/tests/api_resources/organizations/test_scim_configurations.py @@ -39,6 +39,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: scim_configuration = client.organizations.scim_configurations.create( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + allow_unverified_email_account_linking=True, name="name", token_expires_in="+9125115.360s", ) @@ -119,6 +120,7 @@ def test_method_update(self, client: Gitpod) -> None: def test_method_update_with_all_params(self, client: Gitpod) -> None: scim_configuration = client.organizations.scim_configurations.update( scim_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + allow_unverified_email_account_linking=True, enabled=False, name="name", sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -290,6 +292,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> scim_configuration = await async_client.organizations.scim_configurations.create( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + allow_unverified_email_account_linking=True, name="name", token_expires_in="+9125115.360s", ) @@ -370,6 +373,7 @@ async def test_method_update(self, async_client: AsyncGitpod) -> None: async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: scim_configuration = await async_client.organizations.scim_configurations.update( scim_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + allow_unverified_email_account_linking=True, enabled=False, name="name", sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", From 3a521b2a8292e6351117379a4c0c5d6e82e592cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 09:31:09 +0000 Subject: [PATCH 085/211] feat(api): add AGENT_EXECUTION_CNF capability to RunnerCapability --- .stats.yml | 4 ++-- src/gitpod/types/runner_capability.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3c14460f..2b0e31ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-17898495c070ff2b83528ccf268ff3a7426ccabe697c19ca5fe034daa7f76ed0.yml -openapi_spec_hash: fc0b1da285521ddbb5293a228b31b51f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-163329b61609d5c35f782faa460b99ad014584f1f0746d863c5612d6ee6e2c4b.yml +openapi_spec_hash: 97bfee064dda4a0e940140c91fec5206 config_hash: e7d6e90c037f5d495ae913f3806471fd diff --git a/src/gitpod/types/runner_capability.py b/src/gitpod/types/runner_capability.py index 26a572c1..c2df28c5 100644 --- a/src/gitpod/types/runner_capability.py +++ b/src/gitpod/types/runner_capability.py @@ -20,4 +20,5 @@ "RUNNER_CAPABILITY_ASG_WARM_POOL", "RUNNER_CAPABILITY_PORT_AUTHENTICATION", "RUNNER_CAPABILITY_HORIZONTAL_SCALING", + "RUNNER_CAPABILITY_AGENT_EXECUTION_CNF", ] From 5d8545fa2691bb59b0acf8ca0121300d48349a1e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 11:31:26 +0000 Subject: [PATCH 086/211] feat(api): add project_creation_defaults to organizations policies --- .stats.yml | 6 +++--- api.md | 1 + .../resources/organizations/policies.py | 10 +++++++++ src/gitpod/types/organizations/__init__.py | 1 + .../organizations/organization_policies.py | 9 ++++++++ .../organizations/policy_update_params.py | 21 +++++++++++++++++++ .../project_creation_defaults.py | 21 +++++++++++++++++++ .../organizations/test_policies.py | 2 ++ 8 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 src/gitpod/types/organizations/project_creation_defaults.py diff --git a/.stats.yml b/.stats.yml index 2b0e31ce..9aad6c52 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-163329b61609d5c35f782faa460b99ad014584f1f0746d863c5612d6ee6e2c4b.yml -openapi_spec_hash: 97bfee064dda4a0e940140c91fec5206 -config_hash: e7d6e90c037f5d495ae913f3806471fd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b9c1a7558d4dda4b0e58729d1c14b130d19262615d63ce6c78340daeca76188e.yml +openapi_spec_hash: a91da1453dbfb8aceccb085665b3b21d +config_hash: 9052d3b03d620cf6871184b15487e020 diff --git a/api.md b/api.md index 0bc97406..cf05aa37 100644 --- a/api.md +++ b/api.md @@ -507,6 +507,7 @@ from gitpod.types.organizations import ( CustomSecurityAgent, KernelControlsAction, OrganizationPolicies, + ProjectCreationDefaults, SecurityAgentPolicy, VetoExecPolicy, PolicyRetrieveResponse, diff --git a/src/gitpod/resources/organizations/policies.py b/src/gitpod/resources/organizations/policies.py index 5e21ea52..5e5f9877 100644 --- a/src/gitpod/resources/organizations/policies.py +++ b/src/gitpod/resources/organizations/policies.py @@ -115,6 +115,7 @@ def update( members_create_projects: Optional[bool] | Omit = omit, members_require_projects: Optional[bool] | Omit = omit, port_sharing_disabled: Optional[bool] | Omit = omit, + project_creation_defaults: Optional[policy_update_params.ProjectCreationDefaults] | Omit = omit, require_custom_domain_access: Optional[bool] | Omit = omit, restrict_account_creation_to_scim: Optional[bool] | Omit = omit, security_agent_policy: Optional[policy_update_params.SecurityAgentPolicy] | Omit = omit, @@ -218,6 +219,9 @@ def update( in the organization. System ports (VS Code Browser, agents) are always exempt from this policy. + project_creation_defaults: project_creation_defaults contains updates to default settings applied to newly + created projects. + require_custom_domain_access: require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked. @@ -257,6 +261,7 @@ def update( "members_create_projects": members_create_projects, "members_require_projects": members_require_projects, "port_sharing_disabled": port_sharing_disabled, + "project_creation_defaults": project_creation_defaults, "require_custom_domain_access": require_custom_domain_access, "restrict_account_creation_to_scim": restrict_account_creation_to_scim, "security_agent_policy": security_agent_policy, @@ -362,6 +367,7 @@ async def update( members_create_projects: Optional[bool] | Omit = omit, members_require_projects: Optional[bool] | Omit = omit, port_sharing_disabled: Optional[bool] | Omit = omit, + project_creation_defaults: Optional[policy_update_params.ProjectCreationDefaults] | Omit = omit, require_custom_domain_access: Optional[bool] | Omit = omit, restrict_account_creation_to_scim: Optional[bool] | Omit = omit, security_agent_policy: Optional[policy_update_params.SecurityAgentPolicy] | Omit = omit, @@ -465,6 +471,9 @@ async def update( in the organization. System ports (VS Code Browser, agents) are always exempt from this policy. + project_creation_defaults: project_creation_defaults contains updates to default settings applied to newly + created projects. + require_custom_domain_access: require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked. @@ -504,6 +513,7 @@ async def update( "members_create_projects": members_create_projects, "members_require_projects": members_require_projects, "port_sharing_disabled": port_sharing_disabled, + "project_creation_defaults": project_creation_defaults, "require_custom_domain_access": require_custom_domain_access, "restrict_account_creation_to_scim": restrict_account_creation_to_scim, "security_agent_policy": security_agent_policy, diff --git a/src/gitpod/types/organizations/__init__.py b/src/gitpod/types/organizations/__init__.py index 6787a9a4..2dd4f126 100644 --- a/src/gitpod/types/organizations/__init__.py +++ b/src/gitpod/types/organizations/__init__.py @@ -27,6 +27,7 @@ from .policy_retrieve_response import PolicyRetrieveResponse as PolicyRetrieveResponse from .domain_verification_state import DomainVerificationState as DomainVerificationState from .invite_get_summary_params import InviteGetSummaryParams as InviteGetSummaryParams +from .project_creation_defaults import ProjectCreationDefaults as ProjectCreationDefaults from .conversation_sharing_policy import ConversationSharingPolicy as ConversationSharingPolicy from .custom_domain_create_params import CustomDomainCreateParams as CustomDomainCreateParams from .custom_domain_delete_params import CustomDomainDeleteParams as CustomDomainDeleteParams diff --git a/src/gitpod/types/organizations/organization_policies.py b/src/gitpod/types/organizations/organization_policies.py index 0816b40f..a988d81e 100644 --- a/src/gitpod/types/organizations/organization_policies.py +++ b/src/gitpod/types/organizations/organization_policies.py @@ -8,6 +8,7 @@ from .agent_policy import AgentPolicy from .veto_exec_policy import VetoExecPolicy from .security_agent_policy import SecurityAgentPolicy +from .project_creation_defaults import ProjectCreationDefaults __all__ = ["OrganizationPolicies", "EditorVersionRestrictions"] @@ -132,6 +133,14 @@ class OrganizationPolicies(BaseModel): ``` """ + project_creation_defaults: Optional[ProjectCreationDefaults] = FieldInfo( + alias="projectCreationDefaults", default=None + ) + """ + project_creation_defaults contains default settings applied to newly created + projects. + """ + security_agent_policy: Optional[SecurityAgentPolicy] = FieldInfo(alias="securityAgentPolicy", default=None) """ security_agent_policy contains security agent configuration for the diff --git a/src/gitpod/types/organizations/policy_update_params.py b/src/gitpod/types/organizations/policy_update_params.py index a953b488..3c1046c9 100644 --- a/src/gitpod/types/organizations/policy_update_params.py +++ b/src/gitpod/types/organizations/policy_update_params.py @@ -15,6 +15,7 @@ "PolicyUpdateParams", "AgentPolicy", "EditorVersionRestrictions", + "ProjectCreationDefaults", "SecurityAgentPolicy", "SecurityAgentPolicyCrowdstrike", ] @@ -123,6 +124,14 @@ class PolicyUpdateParams(TypedDict, total=False): from this policy. """ + project_creation_defaults: Annotated[ + Optional[ProjectCreationDefaults], PropertyInfo(alias="projectCreationDefaults") + ] + """ + project_creation_defaults contains updates to default settings applied to newly + created projects. + """ + require_custom_domain_access: Annotated[Optional[bool], PropertyInfo(alias="requireCustomDomainAccess")] """ require_custom_domain_access controls whether users must access via custom @@ -195,6 +204,18 @@ class EditorVersionRestrictions(TypedDict, total=False): """ +class ProjectCreationDefaults(TypedDict, total=False): + """ + project_creation_defaults contains updates to default settings applied to newly created projects. + """ + + insights_enabled: Annotated[Optional[bool], PropertyInfo(alias="insightsEnabled")] + """ + insights_enabled controls whether Insights (co-author attribution) is + automatically enabled on newly created projects. + """ + + class SecurityAgentPolicyCrowdstrike(TypedDict, total=False): """crowdstrike contains CrowdStrike Falcon configuration updates""" diff --git a/src/gitpod/types/organizations/project_creation_defaults.py b/src/gitpod/types/organizations/project_creation_defaults.py new file mode 100644 index 00000000..96b610e0 --- /dev/null +++ b/src/gitpod/types/organizations/project_creation_defaults.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["ProjectCreationDefaults"] + + +class ProjectCreationDefaults(BaseModel): + """ + ProjectCreationDefaults contains default settings applied to newly created projects. + """ + + insights_enabled: Optional[bool] = FieldInfo(alias="insightsEnabled", default=None) + """ + insights_enabled controls whether Insights (co-author attribution) is + automatically enabled on newly created projects. + """ diff --git a/tests/api_resources/organizations/test_policies.py b/tests/api_resources/organizations/test_policies.py index 8ad83019..74257ac2 100644 --- a/tests/api_resources/organizations/test_policies.py +++ b/tests/api_resources/organizations/test_policies.py @@ -88,6 +88,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, + project_creation_defaults={"insights_enabled": True}, require_custom_domain_access=True, restrict_account_creation_to_scim=True, security_agent_policy={ @@ -208,6 +209,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, + project_creation_defaults={"insights_enabled": True}, require_custom_domain_access=True, restrict_account_creation_to_scim=True, security_agent_policy={ From 3d37569f37337919926bbf799e1069aa585eef49 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 13:58:14 +0000 Subject: [PATCH 087/211] feat(api): add StatusGoal model and goal field to agent_execution --- .stats.yml | 4 ++-- src/gitpod/types/agent_execution.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9aad6c52..6550d7c4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b9c1a7558d4dda4b0e58729d1c14b130d19262615d63ce6c78340daeca76188e.yml -openapi_spec_hash: a91da1453dbfb8aceccb085665b3b21d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c98c46c0408dfba7bdd2887afe0c58542113d05999d7ea1c34519f513e9a5fdf.yml +openapi_spec_hash: 6a9e3377c0df786e5e88be2dfad93f66 config_hash: 9052d3b03d620cf6871184b15487e020 diff --git a/src/gitpod/types/agent_execution.py b/src/gitpod/types/agent_execution.py index 102b08ca..206c3faf 100644 --- a/src/gitpod/types/agent_execution.py +++ b/src/gitpod/types/agent_execution.py @@ -21,6 +21,7 @@ "StatusCurrentOperation", "StatusCurrentOperationLlm", "StatusCurrentOperationToolUse", + "StatusGoal", "StatusMcpIntegrationStatus", "StatusOutputs", "StatusUsedEnvironment", @@ -308,6 +309,30 @@ class StatusCurrentOperation(BaseModel): tool_use: Optional[StatusCurrentOperationToolUse] = FieldInfo(alias="toolUse", default=None) +class StatusGoal(BaseModel): + """goal projects the current native Codex thread goal, if any.""" + + objective: Optional[str] = None + """ + objective is the current goal text tracked by the native Codex thread-goal + subsystem. + """ + + status: Optional[ + Literal[ + "GOAL_STATUS_UNSPECIFIED", + "GOAL_STATUS_ACTIVE", + "GOAL_STATUS_PAUSED", + "GOAL_STATUS_COMPLETED", + "GOAL_STATUS_BUDGET_EXHAUSTED", + ] + ] = None + """status is the lifecycle state of the current goal.""" + + updated_at: Optional[datetime] = FieldInfo(alias="updatedAt", default=None) + """updated_at is the most recent native goal update timestamp, when available.""" + + class StatusMcpIntegrationStatus(BaseModel): """ MCPIntegrationStatus represents the status of a single MCP integration @@ -393,6 +418,9 @@ class Status(BaseModel): ] = FieldInfo(alias="failureReason", default=None) """failure_reason contains a structured reason code for the failure.""" + goal: Optional[StatusGoal] = None + """goal projects the current native Codex thread goal, if any.""" + input_tokens_used: Optional[str] = FieldInfo(alias="inputTokensUsed", default=None) iterations: Optional[str] = None From baa77bf6be376ec80ae617baebc2b54d6c29fee1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 15:57:02 +0000 Subject: [PATCH 088/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6550d7c4..c248682d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c98c46c0408dfba7bdd2887afe0c58542113d05999d7ea1c34519f513e9a5fdf.yml -openapi_spec_hash: 6a9e3377c0df786e5e88be2dfad93f66 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-5c5e706fd0877a91f01455f03ef01c45106b1fad3b4aef5967807bce81bcdd53.yml +openapi_spec_hash: 9d64ab76ba1843ae85b5c719c2a90a3c config_hash: 9052d3b03d620cf6871184b15487e020 From 657b97b2f1c6c872e150b39386424c9d64f82c8e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 17:13:47 +0000 Subject: [PATCH 089/211] ci: pin GitHub Actions to commit SHAs Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run. --- .github/workflows/ci.yml | 14 +- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 21 + .stats.yml | 8 +- api.md | 140 +- src/gitpod/_client.py | 144 +- src/gitpod/pagination.py | 159 ++ src/gitpod/resources/__init__.py | 42 +- src/gitpod/resources/agents.py | 27 + src/gitpod/resources/automations.py | 21 + src/gitpod/resources/billing.py | 1592 +++++++++++++++++ src/gitpod/resources/errors.py | 209 --- src/gitpod/resources/events.py | 111 +- .../resources/organizations/policies.py | 46 +- src/gitpod/resources/runners/runners.py | 48 +- src/gitpod/resources/secrets.py | 14 +- src/gitpod/resources/security_policies.py | 779 ++++++++ src/gitpod/resources/usage.py | 1243 ++++++++++++- src/gitpod/types/__init__.py | 135 +- src/gitpod/types/agent_execution.py | 75 +- .../types/agent_execution_credit_usage.py | 23 + .../types/agent_list_executions_params.py | 6 + src/gitpod/types/agent_mode.py | 7 +- .../types/agent_send_to_execution_params.py | 7 + .../types/agent_start_execution_params.py | 9 + .../types/agent_trace_model_breakdown.py | 26 + src/gitpod/types/agent_trace_summary.py | 39 + src/gitpod/types/agent_trace_time_bucket.py | 30 + src/gitpod/types/audit_log_entry_details.py | 51 + src/gitpod/types/automation_create_params.py | 10 +- src/gitpod/types/automation_update_params.py | 7 + src/gitpod/types/billing_currency.py | 9 + .../billing_get_credit_usage_export_params.py | 25 + ...illing_get_credit_usage_export_response.py | 17 + .../billing_get_credit_usage_report_params.py | 37 + ...illing_get_credit_usage_report_response.py | 25 + ...ling_get_cumulative_credit_usage_params.py | 22 + ...ng_get_cumulative_credit_usage_response.py | 41 + ..._get_enterprise_ai_usage_summary_params.py | 24 + ...et_enterprise_ai_usage_summary_response.py | 28 + ..._enterprise_ai_usage_time_series_params.py | 27 + ...nterprise_ai_usage_time_series_response.py | 21 + ...ng_list_enterprise_ai_team_usage_params.py | 51 + ...ng_list_enterprise_ai_user_usage_params.py | 86 + ...ist_enterprise_user_credit_usage_params.py | 60 + src/gitpod/types/breadcrumb_param.py | 34 - src/gitpod/types/byok_rate_card_token_type.py | 13 + src/gitpod/types/co_author_summary.py | 45 + src/gitpod/types/co_author_time_bucket.py | 36 + src/gitpod/types/co_author_tool.py | 17 + .../types/credit_usage_export_group_by.py | 11 + .../types/credit_usage_report_filter_param.py | 36 + src/gitpod/types/credits_by_type.py | 19 + src/gitpod/types/cumulative_credit_usage.py | 20 + src/gitpod/types/daily_credit_usage.py | 50 + src/gitpod/types/daily_enterprise_ai_usage.py | 124 ++ src/gitpod/types/enterprise_ai_token_usage.py | 19 + src/gitpod/types/enterprise_ai_usage.py | 21 + .../types/enterprise_ai_usage_budget.py | 26 + .../enterprise_ai_usage_budget_source.py | 11 + .../types/enterprise_ai_usage_by_model.py | 28 + .../enterprise_ai_usage_by_token_type.py | 17 + ...prise_ai_usage_time_series_filter_param.py | 15 + ...enterprise_ai_user_budget_policy_source.py | 12 + src/gitpod/types/environment_credit_usage.py | 23 + src/gitpod/types/environment_role.py | 6 +- .../automations/task_update_params.py | 2 + .../environments/automations_file_param.py | 8 + src/gitpod/types/error_event_param.py | 74 - src/gitpod/types/error_level.py | 14 - .../types/error_report_errors_params.py | 15 - src/gitpod/types/event_list_response.py | 16 + src/gitpod/types/event_retrieve_params.py | 14 + src/gitpod/types/event_retrieve_response.py | 148 ++ src/gitpod/types/exception_info_param.py | 34 - src/gitpod/types/exception_mechanism_param.py | 27 - src/gitpod/types/goal_status.py | 15 + src/gitpod/types/organizations/__init__.py | 4 +- .../types/organizations/agent_policy.py | 41 + .../types/organizations/codex_model_policy.py | 29 + .../organizations/codex_model_policy_param.py | 30 + .../organizations/organization_policies.py | 30 +- .../organizations/policy_update_params.py | 84 +- .../project_creation_defaults.py | 21 - .../types/organizations/veto_exec_policy.py | 2 +- .../organizations/veto_exec_policy_param.py | 2 +- src/gitpod/types/pr_summary.py | 52 + src/gitpod/types/pr_time_bucket.py | 32 + src/gitpod/types/process.py | 42 + src/gitpod/types/request_info_param.py | 29 - src/gitpod/types/resolution.py | 9 + src/gitpod/types/runner_capability.py | 3 + src/gitpod/types/secret.py | 25 +- src/gitpod/types/secret_create_params.py | 30 +- src/gitpod/types/security_policy.py | 260 +++ .../types/security_policy_create_params.py | 74 + .../types/security_policy_create_response.py | 12 + .../types/security_policy_delete_params.py | 13 + .../types/security_policy_list_params.py | 42 + .../types/security_policy_retrieve_params.py | 13 + .../security_policy_retrieve_response.py | 12 + .../types/security_policy_update_params.py | 74 + .../types/security_policy_update_response.py | 12 + src/gitpod/types/shared/__init__.py | 6 + src/gitpod/types/shared/codex_openai_model.py | 18 + .../types/shared/codex_reasoning_effort.py | 13 + src/gitpod/types/shared/codex_service_tier.py | 7 + src/gitpod/types/shared/codex_settings.py | 34 + src/gitpod/types/shared/date_range.py | 19 + .../kernel_controls_action.py | 0 src/gitpod/types/shared/resource_role.py | 5 + src/gitpod/types/shared/resource_type.py | 3 + src/gitpod/types/shared/task_spec.py | 9 + src/gitpod/types/shared_params/__init__.py | 6 + .../types/shared_params/codex_openai_model.py | 20 + .../shared_params/codex_reasoning_effort.py | 15 + .../types/shared_params/codex_service_tier.py | 9 + .../types/shared_params/codex_settings.py | 34 + src/gitpod/types/shared_params/date_range.py | 21 + .../shared_params/kernel_controls_action.py | 11 + .../types/shared_params/resource_role.py | 5 + .../types/shared_params/resource_type.py | 3 + src/gitpod/types/shared_params/task_spec.py | 9 + src/gitpod/types/stack_frame_param.py | 43 - src/gitpod/types/supported_model.py | 33 + src/gitpod/types/team_credit_usage.py | 23 + .../types/team_cumulative_credit_usage.py | 29 + src/gitpod/types/team_enterprise_ai_usage.py | 27 + src/gitpod/types/time_series_point.py | 16 + src/gitpod/types/tool_breakdown.py | 29 + ...usage_get_adoption_usage_summary_params.py | 26 + ...age_get_adoption_usage_summary_response.py | 57 + .../usage_get_agent_trace_summary_params.py | 30 + .../usage_get_agent_trace_summary_response.py | 17 + ...sage_get_agent_trace_time_series_params.py | 34 + ...ge_get_agent_trace_time_series_response.py | 15 + .../usage_get_co_author_summary_params.py | 30 + .../usage_get_co_author_summary_response.py | 17 + .../usage_get_co_author_time_series_params.py | 34 + ...sage_get_co_author_time_series_response.py | 15 + .../types/usage_get_pr_summary_params.py | 30 + .../types/usage_get_pr_summary_response.py | 17 + .../types/usage_get_pr_time_series_params.py | 34 + .../usage_get_pr_time_series_response.py | 15 + ...list_environment_runtime_records_params.py | 17 +- src/gitpod/types/usage_type.py | 7 + src/gitpod/types/user_cost_budget_usage.py | 39 + src/gitpod/types/user_credit_budget_usage.py | 40 + src/gitpod/types/user_credit_usage.py | 25 + src/gitpod/types/user_enterprise_ai_usage.py | 19 + src/gitpod/types/veto.py | 2 +- src/gitpod/types/veto_param.py | 2 +- src/gitpod/types/wake_event_param.py | 22 +- .../environments/automations/test_tasks.py | 4 + .../environments/test_automations.py | 2 + .../organizations/test_policies.py | 18 +- tests/api_resources/test_agents.py | 34 + tests/api_resources/test_automations.py | 20 + tests/api_resources/test_billing.py | 1005 +++++++++++ tests/api_resources/test_errors.py | 224 --- tests/api_resources/test_events.py | 74 +- tests/api_resources/test_runners.py | 12 +- tests/api_resources/test_secrets.py | 14 + tests/api_resources/test_security_policies.py | 492 +++++ tests/api_resources/test_usage.py | 815 ++++++++- 165 files changed, 10088 insertions(+), 1062 deletions(-) create mode 100644 .github/workflows/release-doctor.yml create mode 100644 src/gitpod/resources/billing.py delete mode 100644 src/gitpod/resources/errors.py create mode 100644 src/gitpod/resources/security_policies.py create mode 100644 src/gitpod/types/agent_execution_credit_usage.py create mode 100644 src/gitpod/types/agent_trace_model_breakdown.py create mode 100644 src/gitpod/types/agent_trace_summary.py create mode 100644 src/gitpod/types/agent_trace_time_bucket.py create mode 100644 src/gitpod/types/audit_log_entry_details.py create mode 100644 src/gitpod/types/billing_currency.py create mode 100644 src/gitpod/types/billing_get_credit_usage_export_params.py create mode 100644 src/gitpod/types/billing_get_credit_usage_export_response.py create mode 100644 src/gitpod/types/billing_get_credit_usage_report_params.py create mode 100644 src/gitpod/types/billing_get_credit_usage_report_response.py create mode 100644 src/gitpod/types/billing_get_cumulative_credit_usage_params.py create mode 100644 src/gitpod/types/billing_get_cumulative_credit_usage_response.py create mode 100644 src/gitpod/types/billing_get_enterprise_ai_usage_summary_params.py create mode 100644 src/gitpod/types/billing_get_enterprise_ai_usage_summary_response.py create mode 100644 src/gitpod/types/billing_get_enterprise_ai_usage_time_series_params.py create mode 100644 src/gitpod/types/billing_get_enterprise_ai_usage_time_series_response.py create mode 100644 src/gitpod/types/billing_list_enterprise_ai_team_usage_params.py create mode 100644 src/gitpod/types/billing_list_enterprise_ai_user_usage_params.py create mode 100644 src/gitpod/types/billing_list_enterprise_user_credit_usage_params.py delete mode 100644 src/gitpod/types/breadcrumb_param.py create mode 100644 src/gitpod/types/byok_rate_card_token_type.py create mode 100644 src/gitpod/types/co_author_summary.py create mode 100644 src/gitpod/types/co_author_time_bucket.py create mode 100644 src/gitpod/types/co_author_tool.py create mode 100644 src/gitpod/types/credit_usage_export_group_by.py create mode 100644 src/gitpod/types/credit_usage_report_filter_param.py create mode 100644 src/gitpod/types/credits_by_type.py create mode 100644 src/gitpod/types/cumulative_credit_usage.py create mode 100644 src/gitpod/types/daily_credit_usage.py create mode 100644 src/gitpod/types/daily_enterprise_ai_usage.py create mode 100644 src/gitpod/types/enterprise_ai_token_usage.py create mode 100644 src/gitpod/types/enterprise_ai_usage.py create mode 100644 src/gitpod/types/enterprise_ai_usage_budget.py create mode 100644 src/gitpod/types/enterprise_ai_usage_budget_source.py create mode 100644 src/gitpod/types/enterprise_ai_usage_by_model.py create mode 100644 src/gitpod/types/enterprise_ai_usage_by_token_type.py create mode 100644 src/gitpod/types/enterprise_ai_usage_time_series_filter_param.py create mode 100644 src/gitpod/types/enterprise_ai_user_budget_policy_source.py create mode 100644 src/gitpod/types/environment_credit_usage.py delete mode 100644 src/gitpod/types/error_event_param.py delete mode 100644 src/gitpod/types/error_level.py delete mode 100644 src/gitpod/types/error_report_errors_params.py create mode 100644 src/gitpod/types/event_retrieve_params.py create mode 100644 src/gitpod/types/event_retrieve_response.py delete mode 100644 src/gitpod/types/exception_info_param.py delete mode 100644 src/gitpod/types/exception_mechanism_param.py create mode 100644 src/gitpod/types/goal_status.py create mode 100644 src/gitpod/types/organizations/codex_model_policy.py create mode 100644 src/gitpod/types/organizations/codex_model_policy_param.py delete mode 100644 src/gitpod/types/organizations/project_creation_defaults.py create mode 100644 src/gitpod/types/pr_summary.py create mode 100644 src/gitpod/types/pr_time_bucket.py create mode 100644 src/gitpod/types/process.py delete mode 100644 src/gitpod/types/request_info_param.py create mode 100644 src/gitpod/types/resolution.py create mode 100644 src/gitpod/types/security_policy.py create mode 100644 src/gitpod/types/security_policy_create_params.py create mode 100644 src/gitpod/types/security_policy_create_response.py create mode 100644 src/gitpod/types/security_policy_delete_params.py create mode 100644 src/gitpod/types/security_policy_list_params.py create mode 100644 src/gitpod/types/security_policy_retrieve_params.py create mode 100644 src/gitpod/types/security_policy_retrieve_response.py create mode 100644 src/gitpod/types/security_policy_update_params.py create mode 100644 src/gitpod/types/security_policy_update_response.py create mode 100644 src/gitpod/types/shared/codex_openai_model.py create mode 100644 src/gitpod/types/shared/codex_reasoning_effort.py create mode 100644 src/gitpod/types/shared/codex_service_tier.py create mode 100644 src/gitpod/types/shared/codex_settings.py create mode 100644 src/gitpod/types/shared/date_range.py rename src/gitpod/types/{organizations => shared}/kernel_controls_action.py (100%) create mode 100644 src/gitpod/types/shared_params/codex_openai_model.py create mode 100644 src/gitpod/types/shared_params/codex_reasoning_effort.py create mode 100644 src/gitpod/types/shared_params/codex_service_tier.py create mode 100644 src/gitpod/types/shared_params/codex_settings.py create mode 100644 src/gitpod/types/shared_params/date_range.py create mode 100644 src/gitpod/types/shared_params/kernel_controls_action.py delete mode 100644 src/gitpod/types/stack_frame_param.py create mode 100644 src/gitpod/types/supported_model.py create mode 100644 src/gitpod/types/team_credit_usage.py create mode 100644 src/gitpod/types/team_cumulative_credit_usage.py create mode 100644 src/gitpod/types/team_enterprise_ai_usage.py create mode 100644 src/gitpod/types/time_series_point.py create mode 100644 src/gitpod/types/tool_breakdown.py create mode 100644 src/gitpod/types/usage_get_adoption_usage_summary_params.py create mode 100644 src/gitpod/types/usage_get_adoption_usage_summary_response.py create mode 100644 src/gitpod/types/usage_get_agent_trace_summary_params.py create mode 100644 src/gitpod/types/usage_get_agent_trace_summary_response.py create mode 100644 src/gitpod/types/usage_get_agent_trace_time_series_params.py create mode 100644 src/gitpod/types/usage_get_agent_trace_time_series_response.py create mode 100644 src/gitpod/types/usage_get_co_author_summary_params.py create mode 100644 src/gitpod/types/usage_get_co_author_summary_response.py create mode 100644 src/gitpod/types/usage_get_co_author_time_series_params.py create mode 100644 src/gitpod/types/usage_get_co_author_time_series_response.py create mode 100644 src/gitpod/types/usage_get_pr_summary_params.py create mode 100644 src/gitpod/types/usage_get_pr_summary_response.py create mode 100644 src/gitpod/types/usage_get_pr_time_series_params.py create mode 100644 src/gitpod/types/usage_get_pr_time_series_response.py create mode 100644 src/gitpod/types/usage_type.py create mode 100644 src/gitpod/types/user_cost_budget_usage.py create mode 100644 src/gitpod/types/user_credit_budget_usage.py create mode 100644 src/gitpod/types/user_credit_usage.py create mode 100644 src/gitpod/types/user_enterprise_ai_usage.py create mode 100644 tests/api_resources/test_billing.py delete mode 100644 tests/api_resources/test_errors.py create mode 100644 tests/api_resources/test_security_policies.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ce6a99c..e929a7d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,10 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/gitpod-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rye run: | @@ -44,9 +44,9 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/gitpod-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rye run: | @@ -67,7 +67,7 @@ jobs: github.repository == 'stainless-sdks/gitpod-python' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 with: script: core.setOutput('github_token', await core.getIDToken()); @@ -84,10 +84,10 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ${{ github.repository == 'stainless-sdks/gitpod-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rye run: | diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 0c20e7db..b2d28661 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -17,7 +17,7 @@ jobs: id-token: write steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install Rye uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8 # v4 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml new file mode 100644 index 00000000..c69ebb25 --- /dev/null +++ b/.github/workflows/release-doctor.yml @@ -0,0 +1,21 @@ +name: Release Doctor +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + release_doctor: + name: release doctor + runs-on: ubuntu-latest + if: github.repository == 'gitpod-io/gitpod-sdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Check release environment + run: | + bash ./bin/check-release-environment + env: + PYPI_TOKEN: ${{ secrets.GITPOD_PYPI_TOKEN || secrets.PYPI_TOKEN }} diff --git a/.stats.yml b/.stats.yml index c248682d..83150193 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-5c5e706fd0877a91f01455f03ef01c45106b1fad3b4aef5967807bce81bcdd53.yml -openapi_spec_hash: 9d64ab76ba1843ae85b5c719c2a90a3c -config_hash: 9052d3b03d620cf6871184b15487e020 +configured_endpoints: 213 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f8271fd3c90de2edf4e8e63bce296f295fb8e54c0522b4d159d1d1f33a902474.yml +openapi_spec_hash: fb7b7d87dc232de2b141c5cc57d16fd1 +config_hash: 3d1af35edc400f59127c3b02ca3ab0ec diff --git a/api.md b/api.md index cf05aa37..d54c829f 100644 --- a/api.md +++ b/api.md @@ -3,13 +3,19 @@ ```python from gitpod.types import ( AutomationTrigger, + CodexOpenAIModel, + CodexReasoningEffort, + CodexServiceTier, + CodexSettings, CountResponseRelation, + DateRange, EnvironmentClass, EnvironmentVariableItem, EnvironmentVariableSource, ErrorCode, FieldValue, Gateway, + KernelControlsAction, OrganizationRole, OrganizationTier, Principal, @@ -69,6 +75,7 @@ from gitpod.types import ( AgentExecution, AgentMessage, AgentMode, + GoalStatus, Prompt, PromptMetadata, PromptSpec, @@ -140,6 +147,57 @@ Methods: - client.automations.retrieve_execution_action(\*\*params) -> AutomationRetrieveExecutionActionResponse - client.automations.start_execution(\*\*params) -> AutomationStartExecutionResponse +# Billing + +Types: + +```python +from gitpod.types import ( + AgentExecutionCreditUsage, + BillingCurrency, + ByokRateCardTokenType, + CreditUsageExportGroupBy, + CreditUsageReportFilter, + CreditsByType, + CumulativeCreditUsage, + DailyCreditUsage, + DailyEnterpriseAIUsage, + EnterpriseAITokenUsage, + EnterpriseAIUsage, + EnterpriseAIUsageBudget, + EnterpriseAIUsageBudgetSource, + EnterpriseAIUsageByModel, + EnterpriseAIUsageByTokenType, + EnterpriseAIUsageTimeSeriesFilter, + EnterpriseAIUserBudgetPolicySource, + EnvironmentCreditUsage, + TeamCreditUsage, + TeamCumulativeCreditUsage, + TeamEnterpriseAIUsage, + UsageType, + UserCostBudgetUsage, + UserCreditBudgetUsage, + UserCreditUsage, + UserEnterpriseAIUsage, + BillingGetCreditUsageExportResponse, + BillingGetCreditUsageReportResponse, + BillingGetCumulativeCreditUsageResponse, + BillingGetEnterpriseAIUsageSummaryResponse, + BillingGetEnterpriseAIUsageTimeSeriesResponse, +) +``` + +Methods: + +- client.billing.get_credit_usage_export(\*\*params) -> BillingGetCreditUsageExportResponse +- client.billing.get_credit_usage_report(\*\*params) -> BillingGetCreditUsageReportResponse +- client.billing.get_cumulative_credit_usage(\*\*params) -> BillingGetCumulativeCreditUsageResponse +- client.billing.get_enterprise_ai_usage_summary(\*\*params) -> BillingGetEnterpriseAIUsageSummaryResponse +- client.billing.get_enterprise_ai_usage_time_series(\*\*params) -> BillingGetEnterpriseAIUsageTimeSeriesResponse +- client.billing.list_enterprise_ai_team_usage(\*\*params) -> SyncTeamUsagePage[TeamEnterpriseAIUsage] +- client.billing.list_enterprise_ai_user_usage(\*\*params) -> SyncUserUsagePage[UserCostBudgetUsage] +- client.billing.list_enterprise_user_credit_usage(\*\*params) -> SyncUserUsagePage[UserCreditBudgetUsage] + # Editors Types: @@ -274,36 +332,24 @@ Methods: - client.environments.classes.list(\*\*params) -> SyncEnvironmentClassesPage[EnvironmentClass] -# Errors +# Events Types: ```python from gitpod.types import ( - Breadcrumb, - ErrorEvent, - ErrorLevel, - ExceptionInfo, - ExceptionMechanism, - RequestInfo, - StackFrame, + AuditLogEntryDetails, + Process, + ResourceOperation, + EventRetrieveResponse, + EventListResponse, + EventWatchResponse, ) ``` Methods: -- client.errors.report_errors(\*\*params) -> object - -# Events - -Types: - -```python -from gitpod.types import ResourceOperation, EventListResponse, EventWatchResponse -``` - -Methods: - +- client.events.retrieve(\*\*params) -> EventRetrieveResponse - client.events.list(\*\*params) -> SyncEntriesPage[EventListResponse] - client.events.watch(\*\*params) -> JSONLDecoder[EventWatchResponse] @@ -501,13 +547,12 @@ Types: ```python from gitpod.types.organizations import ( AgentPolicy, + CodexModelPolicy, ConversationSharingPolicy, CrowdStrikeConfig, CustomAgentEnvMapping, CustomSecurityAgent, - KernelControlsAction, OrganizationPolicies, - ProjectCreationDefaults, SecurityAgentPolicy, VetoExecPolicy, PolicyRetrieveResponse, @@ -840,16 +885,65 @@ Methods: - client.secrets.get_value(\*\*params) -> SecretGetValueResponse - client.secrets.update_value(\*\*params) -> object +# SecurityPolicies + +Types: + +```python +from gitpod.types import ( + SecurityPolicy, + SecurityPolicyCreateResponse, + SecurityPolicyRetrieveResponse, + SecurityPolicyUpdateResponse, +) +``` + +Methods: + +- client.security_policies.create(\*\*params) -> SecurityPolicyCreateResponse +- client.security_policies.retrieve(\*\*params) -> SecurityPolicyRetrieveResponse +- client.security_policies.update(\*\*params) -> SecurityPolicyUpdateResponse +- client.security_policies.list(\*\*params) -> SyncSecurityPoliciesPage[SecurityPolicy] +- client.security_policies.delete(\*\*params) -> object + # Usage Types: ```python -from gitpod.types import EnvironmentUsageRecord +from gitpod.types import ( + AgentTraceModelBreakdown, + AgentTraceSummary, + AgentTraceTimeBucket, + CoAuthorSummary, + CoAuthorTimeBucket, + CoAuthorTool, + EnvironmentUsageRecord, + PrSummary, + PrTimeBucket, + Resolution, + SupportedModel, + TimeSeriesPoint, + ToolBreakdown, + UsageGetAdoptionUsageSummaryResponse, + UsageGetAgentTraceSummaryResponse, + UsageGetAgentTraceTimeSeriesResponse, + UsageGetCoAuthorSummaryResponse, + UsageGetCoAuthorTimeSeriesResponse, + UsageGetPrSummaryResponse, + UsageGetPrTimeSeriesResponse, +) ``` Methods: +- client.usage.get_adoption_usage_summary(\*\*params) -> UsageGetAdoptionUsageSummaryResponse +- client.usage.get_agent_trace_summary(\*\*params) -> UsageGetAgentTraceSummaryResponse +- client.usage.get_agent_trace_time_series(\*\*params) -> UsageGetAgentTraceTimeSeriesResponse +- client.usage.get_co_author_summary(\*\*params) -> UsageGetCoAuthorSummaryResponse +- client.usage.get_co_author_time_series(\*\*params) -> UsageGetCoAuthorTimeSeriesResponse +- client.usage.get_pr_summary(\*\*params) -> UsageGetPrSummaryResponse +- client.usage.get_pr_time_series(\*\*params) -> UsageGetPrTimeSeriesResponse - client.usage.list_environment_runtime_records(\*\*params) -> SyncRecordsPage[EnvironmentUsageRecord] # Users diff --git a/src/gitpod/_client.py b/src/gitpod/_client.py index 454815c2..3bbff998 100644 --- a/src/gitpod/_client.py +++ b/src/gitpod/_client.py @@ -39,9 +39,9 @@ usage, users, agents, - errors, events, groups, + billing, editors, runners, secrets, @@ -53,11 +53,12 @@ automations, environments, organizations, + security_policies, ) from .resources.usage import UsageResource, AsyncUsageResource from .resources.agents import AgentsResource, AsyncAgentsResource - from .resources.errors import ErrorsResource, AsyncErrorsResource from .resources.events import EventsResource, AsyncEventsResource + from .resources.billing import BillingResource, AsyncBillingResource from .resources.editors import EditorsResource, AsyncEditorsResource from .resources.secrets import SecretsResource, AsyncSecretsResource from .resources.accounts import AccountsResource, AsyncAccountsResource @@ -69,6 +70,7 @@ from .resources.groups.groups import GroupsResource, AsyncGroupsResource from .resources.runners.runners import RunnersResource, AsyncRunnersResource from .resources.projects.projects import ProjectsResource, AsyncProjectsResource + from .resources.security_policies import SecurityPoliciesResource, AsyncSecurityPoliciesResource from .resources.environments.environments import EnvironmentsResource, AsyncEnvironmentsResource from .resources.organizations.organizations import OrganizationsResource, AsyncOrganizationsResource @@ -157,6 +159,13 @@ def automations(self) -> AutomationsResource: return AutomationsResource(self) + @cached_property + def billing(self) -> BillingResource: + """BillingService provides billing and subscription management functionality.""" + from .resources.billing import BillingResource + + return BillingResource(self) + @cached_property def editors(self) -> EditorsResource: from .resources.editors import EditorsResource @@ -169,16 +178,6 @@ def environments(self) -> EnvironmentsResource: return EnvironmentsResource(self) - @cached_property - def errors(self) -> ErrorsResource: - """ - ErrorsService provides endpoints for clients to report errors - that will be sent to error reporting systems. - """ - from .resources.errors import ErrorsResource - - return ErrorsResource(self) - @cached_property def events(self) -> EventsResource: from .resources.events import EventsResource @@ -237,6 +236,12 @@ def secrets(self) -> SecretsResource: return SecretsResource(self) + @cached_property + def security_policies(self) -> SecurityPoliciesResource: + from .resources.security_policies import SecurityPoliciesResource + + return SecurityPoliciesResource(self) + @cached_property def usage(self) -> UsageResource: """ @@ -447,6 +452,13 @@ def automations(self) -> AsyncAutomationsResource: return AsyncAutomationsResource(self) + @cached_property + def billing(self) -> AsyncBillingResource: + """BillingService provides billing and subscription management functionality.""" + from .resources.billing import AsyncBillingResource + + return AsyncBillingResource(self) + @cached_property def editors(self) -> AsyncEditorsResource: from .resources.editors import AsyncEditorsResource @@ -459,16 +471,6 @@ def environments(self) -> AsyncEnvironmentsResource: return AsyncEnvironmentsResource(self) - @cached_property - def errors(self) -> AsyncErrorsResource: - """ - ErrorsService provides endpoints for clients to report errors - that will be sent to error reporting systems. - """ - from .resources.errors import AsyncErrorsResource - - return AsyncErrorsResource(self) - @cached_property def events(self) -> AsyncEventsResource: from .resources.events import AsyncEventsResource @@ -527,6 +529,12 @@ def secrets(self) -> AsyncSecretsResource: return AsyncSecretsResource(self) + @cached_property + def security_policies(self) -> AsyncSecurityPoliciesResource: + from .resources.security_policies import AsyncSecurityPoliciesResource + + return AsyncSecurityPoliciesResource(self) + @cached_property def usage(self) -> AsyncUsageResource: """ @@ -679,6 +687,13 @@ def automations(self) -> automations.AutomationsResourceWithRawResponse: return AutomationsResourceWithRawResponse(self._client.automations) + @cached_property + def billing(self) -> billing.BillingResourceWithRawResponse: + """BillingService provides billing and subscription management functionality.""" + from .resources.billing import BillingResourceWithRawResponse + + return BillingResourceWithRawResponse(self._client.billing) + @cached_property def editors(self) -> editors.EditorsResourceWithRawResponse: from .resources.editors import EditorsResourceWithRawResponse @@ -691,16 +706,6 @@ def environments(self) -> environments.EnvironmentsResourceWithRawResponse: return EnvironmentsResourceWithRawResponse(self._client.environments) - @cached_property - def errors(self) -> errors.ErrorsResourceWithRawResponse: - """ - ErrorsService provides endpoints for clients to report errors - that will be sent to error reporting systems. - """ - from .resources.errors import ErrorsResourceWithRawResponse - - return ErrorsResourceWithRawResponse(self._client.errors) - @cached_property def events(self) -> events.EventsResourceWithRawResponse: from .resources.events import EventsResourceWithRawResponse @@ -759,6 +764,12 @@ def secrets(self) -> secrets.SecretsResourceWithRawResponse: return SecretsResourceWithRawResponse(self._client.secrets) + @cached_property + def security_policies(self) -> security_policies.SecurityPoliciesResourceWithRawResponse: + from .resources.security_policies import SecurityPoliciesResourceWithRawResponse + + return SecurityPoliciesResourceWithRawResponse(self._client.security_policies) + @cached_property def usage(self) -> usage.UsageResourceWithRawResponse: """ @@ -799,6 +810,13 @@ def automations(self) -> automations.AsyncAutomationsResourceWithRawResponse: return AsyncAutomationsResourceWithRawResponse(self._client.automations) + @cached_property + def billing(self) -> billing.AsyncBillingResourceWithRawResponse: + """BillingService provides billing and subscription management functionality.""" + from .resources.billing import AsyncBillingResourceWithRawResponse + + return AsyncBillingResourceWithRawResponse(self._client.billing) + @cached_property def editors(self) -> editors.AsyncEditorsResourceWithRawResponse: from .resources.editors import AsyncEditorsResourceWithRawResponse @@ -811,16 +829,6 @@ def environments(self) -> environments.AsyncEnvironmentsResourceWithRawResponse: return AsyncEnvironmentsResourceWithRawResponse(self._client.environments) - @cached_property - def errors(self) -> errors.AsyncErrorsResourceWithRawResponse: - """ - ErrorsService provides endpoints for clients to report errors - that will be sent to error reporting systems. - """ - from .resources.errors import AsyncErrorsResourceWithRawResponse - - return AsyncErrorsResourceWithRawResponse(self._client.errors) - @cached_property def events(self) -> events.AsyncEventsResourceWithRawResponse: from .resources.events import AsyncEventsResourceWithRawResponse @@ -879,6 +887,12 @@ def secrets(self) -> secrets.AsyncSecretsResourceWithRawResponse: return AsyncSecretsResourceWithRawResponse(self._client.secrets) + @cached_property + def security_policies(self) -> security_policies.AsyncSecurityPoliciesResourceWithRawResponse: + from .resources.security_policies import AsyncSecurityPoliciesResourceWithRawResponse + + return AsyncSecurityPoliciesResourceWithRawResponse(self._client.security_policies) + @cached_property def usage(self) -> usage.AsyncUsageResourceWithRawResponse: """ @@ -919,6 +933,13 @@ def automations(self) -> automations.AutomationsResourceWithStreamingResponse: return AutomationsResourceWithStreamingResponse(self._client.automations) + @cached_property + def billing(self) -> billing.BillingResourceWithStreamingResponse: + """BillingService provides billing and subscription management functionality.""" + from .resources.billing import BillingResourceWithStreamingResponse + + return BillingResourceWithStreamingResponse(self._client.billing) + @cached_property def editors(self) -> editors.EditorsResourceWithStreamingResponse: from .resources.editors import EditorsResourceWithStreamingResponse @@ -931,16 +952,6 @@ def environments(self) -> environments.EnvironmentsResourceWithStreamingResponse return EnvironmentsResourceWithStreamingResponse(self._client.environments) - @cached_property - def errors(self) -> errors.ErrorsResourceWithStreamingResponse: - """ - ErrorsService provides endpoints for clients to report errors - that will be sent to error reporting systems. - """ - from .resources.errors import ErrorsResourceWithStreamingResponse - - return ErrorsResourceWithStreamingResponse(self._client.errors) - @cached_property def events(self) -> events.EventsResourceWithStreamingResponse: from .resources.events import EventsResourceWithStreamingResponse @@ -999,6 +1010,12 @@ def secrets(self) -> secrets.SecretsResourceWithStreamingResponse: return SecretsResourceWithStreamingResponse(self._client.secrets) + @cached_property + def security_policies(self) -> security_policies.SecurityPoliciesResourceWithStreamingResponse: + from .resources.security_policies import SecurityPoliciesResourceWithStreamingResponse + + return SecurityPoliciesResourceWithStreamingResponse(self._client.security_policies) + @cached_property def usage(self) -> usage.UsageResourceWithStreamingResponse: """ @@ -1039,6 +1056,13 @@ def automations(self) -> automations.AsyncAutomationsResourceWithStreamingRespon return AsyncAutomationsResourceWithStreamingResponse(self._client.automations) + @cached_property + def billing(self) -> billing.AsyncBillingResourceWithStreamingResponse: + """BillingService provides billing and subscription management functionality.""" + from .resources.billing import AsyncBillingResourceWithStreamingResponse + + return AsyncBillingResourceWithStreamingResponse(self._client.billing) + @cached_property def editors(self) -> editors.AsyncEditorsResourceWithStreamingResponse: from .resources.editors import AsyncEditorsResourceWithStreamingResponse @@ -1051,16 +1075,6 @@ def environments(self) -> environments.AsyncEnvironmentsResourceWithStreamingRes return AsyncEnvironmentsResourceWithStreamingResponse(self._client.environments) - @cached_property - def errors(self) -> errors.AsyncErrorsResourceWithStreamingResponse: - """ - ErrorsService provides endpoints for clients to report errors - that will be sent to error reporting systems. - """ - from .resources.errors import AsyncErrorsResourceWithStreamingResponse - - return AsyncErrorsResourceWithStreamingResponse(self._client.errors) - @cached_property def events(self) -> events.AsyncEventsResourceWithStreamingResponse: from .resources.events import AsyncEventsResourceWithStreamingResponse @@ -1119,6 +1133,12 @@ def secrets(self) -> secrets.AsyncSecretsResourceWithStreamingResponse: return AsyncSecretsResourceWithStreamingResponse(self._client.secrets) + @cached_property + def security_policies(self) -> security_policies.AsyncSecurityPoliciesResourceWithStreamingResponse: + from .resources.security_policies import AsyncSecurityPoliciesResourceWithStreamingResponse + + return AsyncSecurityPoliciesResourceWithStreamingResponse(self._client.security_policies) + @cached_property def usage(self) -> usage.AsyncUsageResourceWithStreamingResponse: """ diff --git a/src/gitpod/pagination.py b/src/gitpod/pagination.py index 83771ae0..a206b2bd 100644 --- a/src/gitpod/pagination.py +++ b/src/gitpod/pagination.py @@ -90,6 +90,9 @@ "SecretsPagePagination", "SyncSecretsPage", "AsyncSecretsPage", + "SecurityPoliciesPagePagination", + "SyncSecurityPoliciesPage", + "AsyncSecurityPoliciesPage", "ServicesPagePagination", "SyncServicesPage", "AsyncServicesPage", @@ -102,9 +105,15 @@ "TasksPagePagination", "SyncTasksPage", "AsyncTasksPage", + "TeamUsagePagePagination", + "SyncTeamUsagePage", + "AsyncTeamUsagePage", "TokensPagePagination", "SyncTokensPage", "AsyncTokensPage", + "UserUsagePagePagination", + "SyncUserUsagePage", + "AsyncUserUsagePage", "WarmPoolsPagePagination", "SyncWarmPoolsPage", "AsyncWarmPoolsPage", @@ -1472,6 +1481,56 @@ def next_page_info(self) -> Optional[PageInfo]: return PageInfo(params={"token": next_token}) +class SecurityPoliciesPagePagination(BaseModel): + next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) + + +class SyncSecurityPoliciesPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): + pagination: Optional[SecurityPoliciesPagePagination] = None + security_policies: List[_T] = FieldInfo(alias="securityPolicies") + + @override + def _get_page_items(self) -> List[_T]: + security_policies = self.security_policies + if not security_policies: + return [] + return security_policies + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_token = None + if self.pagination is not None: + if self.pagination.next_token is not None: + next_token = self.pagination.next_token + if not next_token: + return None + + return PageInfo(params={"token": next_token}) + + +class AsyncSecurityPoliciesPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): + pagination: Optional[SecurityPoliciesPagePagination] = None + security_policies: List[_T] = FieldInfo(alias="securityPolicies") + + @override + def _get_page_items(self) -> List[_T]: + security_policies = self.security_policies + if not security_policies: + return [] + return security_policies + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_token = None + if self.pagination is not None: + if self.pagination.next_token is not None: + next_token = self.pagination.next_token + if not next_token: + return None + + return PageInfo(params={"token": next_token}) + + class ServicesPagePagination(BaseModel): next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) @@ -1672,6 +1731,56 @@ def next_page_info(self) -> Optional[PageInfo]: return PageInfo(params={"token": next_token}) +class TeamUsagePagePagination(BaseModel): + next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) + + +class SyncTeamUsagePage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): + pagination: Optional[TeamUsagePagePagination] = None + team_usage: List[_T] = FieldInfo(alias="teamUsage") + + @override + def _get_page_items(self) -> List[_T]: + team_usage = self.team_usage + if not team_usage: + return [] + return team_usage + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_token = None + if self.pagination is not None: + if self.pagination.next_token is not None: + next_token = self.pagination.next_token + if not next_token: + return None + + return PageInfo(params={"token": next_token}) + + +class AsyncTeamUsagePage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): + pagination: Optional[TeamUsagePagePagination] = None + team_usage: List[_T] = FieldInfo(alias="teamUsage") + + @override + def _get_page_items(self) -> List[_T]: + team_usage = self.team_usage + if not team_usage: + return [] + return team_usage + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_token = None + if self.pagination is not None: + if self.pagination.next_token is not None: + next_token = self.pagination.next_token + if not next_token: + return None + + return PageInfo(params={"token": next_token}) + + class TokensPagePagination(BaseModel): next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) @@ -1722,6 +1831,56 @@ def next_page_info(self) -> Optional[PageInfo]: return PageInfo(params={"token": next_token}) +class UserUsagePagePagination(BaseModel): + next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) + + +class SyncUserUsagePage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): + pagination: Optional[UserUsagePagePagination] = None + user_usage: List[_T] = FieldInfo(alias="userUsage") + + @override + def _get_page_items(self) -> List[_T]: + user_usage = self.user_usage + if not user_usage: + return [] + return user_usage + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_token = None + if self.pagination is not None: + if self.pagination.next_token is not None: + next_token = self.pagination.next_token + if not next_token: + return None + + return PageInfo(params={"token": next_token}) + + +class AsyncUserUsagePage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): + pagination: Optional[UserUsagePagePagination] = None + user_usage: List[_T] = FieldInfo(alias="userUsage") + + @override + def _get_page_items(self) -> List[_T]: + user_usage = self.user_usage + if not user_usage: + return [] + return user_usage + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_token = None + if self.pagination is not None: + if self.pagination.next_token is not None: + next_token = self.pagination.next_token + if not next_token: + return None + + return PageInfo(params={"token": next_token}) + + class WarmPoolsPagePagination(BaseModel): next_token: Optional[str] = FieldInfo(alias="nextToken", default=None) diff --git a/src/gitpod/resources/__init__.py b/src/gitpod/resources/__init__.py index 97c0390c..d322e0b5 100644 --- a/src/gitpod/resources/__init__.py +++ b/src/gitpod/resources/__init__.py @@ -24,14 +24,6 @@ AgentsResourceWithStreamingResponse, AsyncAgentsResourceWithStreamingResponse, ) -from .errors import ( - ErrorsResource, - AsyncErrorsResource, - ErrorsResourceWithRawResponse, - AsyncErrorsResourceWithRawResponse, - ErrorsResourceWithStreamingResponse, - AsyncErrorsResourceWithStreamingResponse, -) from .events import ( EventsResource, AsyncEventsResource, @@ -48,6 +40,14 @@ GroupsResourceWithStreamingResponse, AsyncGroupsResourceWithStreamingResponse, ) +from .billing import ( + BillingResource, + AsyncBillingResource, + BillingResourceWithRawResponse, + AsyncBillingResourceWithRawResponse, + BillingResourceWithStreamingResponse, + AsyncBillingResourceWithStreamingResponse, +) from .editors import ( EditorsResource, AsyncEditorsResource, @@ -136,6 +136,14 @@ OrganizationsResourceWithStreamingResponse, AsyncOrganizationsResourceWithStreamingResponse, ) +from .security_policies import ( + SecurityPoliciesResource, + AsyncSecurityPoliciesResource, + SecurityPoliciesResourceWithRawResponse, + AsyncSecurityPoliciesResourceWithRawResponse, + SecurityPoliciesResourceWithStreamingResponse, + AsyncSecurityPoliciesResourceWithStreamingResponse, +) __all__ = [ "AccountsResource", @@ -156,6 +164,12 @@ "AsyncAutomationsResourceWithRawResponse", "AutomationsResourceWithStreamingResponse", "AsyncAutomationsResourceWithStreamingResponse", + "BillingResource", + "AsyncBillingResource", + "BillingResourceWithRawResponse", + "AsyncBillingResourceWithRawResponse", + "BillingResourceWithStreamingResponse", + "AsyncBillingResourceWithStreamingResponse", "EditorsResource", "AsyncEditorsResource", "EditorsResourceWithRawResponse", @@ -168,12 +182,6 @@ "AsyncEnvironmentsResourceWithRawResponse", "EnvironmentsResourceWithStreamingResponse", "AsyncEnvironmentsResourceWithStreamingResponse", - "ErrorsResource", - "AsyncErrorsResource", - "ErrorsResourceWithRawResponse", - "AsyncErrorsResourceWithRawResponse", - "ErrorsResourceWithStreamingResponse", - "AsyncErrorsResourceWithStreamingResponse", "EventsResource", "AsyncEventsResource", "EventsResourceWithRawResponse", @@ -228,6 +236,12 @@ "AsyncSecretsResourceWithRawResponse", "SecretsResourceWithStreamingResponse", "AsyncSecretsResourceWithStreamingResponse", + "SecurityPoliciesResource", + "AsyncSecurityPoliciesResource", + "SecurityPoliciesResourceWithRawResponse", + "AsyncSecurityPoliciesResourceWithRawResponse", + "SecurityPoliciesResourceWithStreamingResponse", + "AsyncSecurityPoliciesResourceWithStreamingResponse", "UsageResource", "AsyncUsageResource", "UsageResourceWithRawResponse", diff --git a/src/gitpod/resources/agents.py b/src/gitpod/resources/agents.py index b5c22f9e..b68d84e0 100644 --- a/src/gitpod/resources/agents.py +++ b/src/gitpod/resources/agents.py @@ -42,6 +42,7 @@ from ..types.agent_code_context_param import AgentCodeContextParam from ..types.agent_create_prompt_response import AgentCreatePromptResponse from ..types.agent_update_prompt_response import AgentUpdatePromptResponse +from ..types.shared_params.codex_settings import CodexSettings from ..types.agent_retrieve_prompt_response import AgentRetrievePromptResponse from ..types.agent_start_execution_response import AgentStartExecutionResponse from ..types.agent_retrieve_execution_response import AgentRetrieveExecutionResponse @@ -486,6 +487,7 @@ def send_to_execution( *, agent_execution_id: str | Omit = omit, agent_message: AgentMessageParam | Omit = omit, + codex_settings: CodexSettings | Omit = omit, user_input: UserInputBlockParam | Omit = omit, wake_event: WakeEventParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -517,6 +519,9 @@ def send_to_execution( agent_message: AgentMessage is a message sent between agents (e.g. from a parent agent to a child agent execution, or vice versa). + codex_settings: codex_settings contains per-turn desired settings for Codex app user_input + sends. + wake_event: WakeEvent is sent by the backend to wake an agent when a registered interest fires. Delivered via SendToAgentExecution as a new oneof variant. @@ -534,6 +539,7 @@ def send_to_execution( { "agent_execution_id": agent_execution_id, "agent_message": agent_message, + "codex_settings": codex_settings, "user_input": user_input, "wake_event": wake_event, }, @@ -551,6 +557,7 @@ def start_execution( agent_id: str | Omit = omit, annotations: Dict[str, str] | Omit = omit, code_context: AgentCodeContextParam | Omit = omit, + codex_settings: CodexSettings | Omit = omit, mode: AgentMode | Omit = omit, name: str | Omit = omit, runner_id: str | Omit = omit, @@ -581,10 +588,16 @@ def start_execution( ``` Args: + agent_id: agent_id identifies the agent to start. If omitted, the backend uses the + configured default agent ID, or the Ona in-environment agent when no default is + configured. + annotations: annotations are key-value pairs for tracking external context (e.g., integration session IDs, GitHub issue references). Keys should follow domain/name convention (e.g., "agent-client-session/id"). + codex_settings: codex_settings contains desired manual settings for the Codex app agent. + mode: mode specifies the operational mode for this agent execution If not specified, defaults to AGENT_MODE_EXECUTION @@ -613,6 +626,7 @@ def start_execution( "agent_id": agent_id, "annotations": annotations, "code_context": code_context, + "codex_settings": codex_settings, "mode": mode, "name": name, "runner_id": runner_id, @@ -1167,6 +1181,7 @@ async def send_to_execution( *, agent_execution_id: str | Omit = omit, agent_message: AgentMessageParam | Omit = omit, + codex_settings: CodexSettings | Omit = omit, user_input: UserInputBlockParam | Omit = omit, wake_event: WakeEventParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1198,6 +1213,9 @@ async def send_to_execution( agent_message: AgentMessage is a message sent between agents (e.g. from a parent agent to a child agent execution, or vice versa). + codex_settings: codex_settings contains per-turn desired settings for Codex app user_input + sends. + wake_event: WakeEvent is sent by the backend to wake an agent when a registered interest fires. Delivered via SendToAgentExecution as a new oneof variant. @@ -1215,6 +1233,7 @@ async def send_to_execution( { "agent_execution_id": agent_execution_id, "agent_message": agent_message, + "codex_settings": codex_settings, "user_input": user_input, "wake_event": wake_event, }, @@ -1232,6 +1251,7 @@ async def start_execution( agent_id: str | Omit = omit, annotations: Dict[str, str] | Omit = omit, code_context: AgentCodeContextParam | Omit = omit, + codex_settings: CodexSettings | Omit = omit, mode: AgentMode | Omit = omit, name: str | Omit = omit, runner_id: str | Omit = omit, @@ -1262,10 +1282,16 @@ async def start_execution( ``` Args: + agent_id: agent_id identifies the agent to start. If omitted, the backend uses the + configured default agent ID, or the Ona in-environment agent when no default is + configured. + annotations: annotations are key-value pairs for tracking external context (e.g., integration session IDs, GitHub issue references). Keys should follow domain/name convention (e.g., "agent-client-session/id"). + codex_settings: codex_settings contains desired manual settings for the Codex app agent. + mode: mode specifies the operational mode for this agent execution If not specified, defaults to AGENT_MODE_EXECUTION @@ -1294,6 +1320,7 @@ async def start_execution( "agent_id": agent_id, "annotations": annotations, "code_context": code_context, + "codex_settings": codex_settings, "mode": mode, "name": name, "runner_id": runner_id, diff --git a/src/gitpod/resources/automations.py b/src/gitpod/resources/automations.py index 2cbece8b..e5b2bbf8 100644 --- a/src/gitpod/resources/automations.py +++ b/src/gitpod/resources/automations.py @@ -52,6 +52,7 @@ from ..types.automation_create_response import AutomationCreateResponse from ..types.automation_update_response import AutomationUpdateResponse from ..types.automation_retrieve_response import AutomationRetrieveResponse +from ..types.shared_params.codex_settings import CodexSettings from ..types.workflow_trigger_context_param import WorkflowTriggerContextParam from ..types.automation_start_execution_response import AutomationStartExecutionResponse from ..types.automation_retrieve_execution_response import AutomationRetrieveExecutionResponse @@ -85,6 +86,7 @@ def create( self, *, action: WorkflowActionParam, + codex_settings: CodexSettings | Omit = omit, description: str | Omit = omit, executor: Optional[Subject] | Omit = omit, name: str | Omit = omit, @@ -110,6 +112,9 @@ def create( Args: action: WorkflowAction defines the actions to be executed in a workflow. + codex_settings: Codex app agent settings. Only meaningful when agent_id refers to the Codex app + agent. + description: Description must be at most 500 characters: @@ -149,6 +154,7 @@ def create( body=maybe_transform( { "action": action, + "codex_settings": codex_settings, "description": description, "executor": executor, "name": name, @@ -215,6 +221,7 @@ def update( self, *, action: Optional[WorkflowActionParam] | Omit = omit, + codex_settings: Optional[CodexSettings] | Omit = omit, description: Optional[str] | Omit = omit, disabled: Optional[bool] | Omit = omit, executor: Optional[Subject] | Omit = omit, @@ -288,6 +295,9 @@ def update( Args: action: WorkflowAction defines the actions to be executed in a workflow. + codex_settings: Codex app agent settings. Only meaningful when agent_id refers to the Codex app + agent. + description: Description must be at most 500 characters: @@ -327,6 +337,7 @@ def update( body=maybe_transform( { "action": action, + "codex_settings": codex_settings, "description": description, "disabled": disabled, "executor": executor, @@ -987,6 +998,7 @@ async def create( self, *, action: WorkflowActionParam, + codex_settings: CodexSettings | Omit = omit, description: str | Omit = omit, executor: Optional[Subject] | Omit = omit, name: str | Omit = omit, @@ -1012,6 +1024,9 @@ async def create( Args: action: WorkflowAction defines the actions to be executed in a workflow. + codex_settings: Codex app agent settings. Only meaningful when agent_id refers to the Codex app + agent. + description: Description must be at most 500 characters: @@ -1051,6 +1066,7 @@ async def create( body=await async_maybe_transform( { "action": action, + "codex_settings": codex_settings, "description": description, "executor": executor, "name": name, @@ -1119,6 +1135,7 @@ async def update( self, *, action: Optional[WorkflowActionParam] | Omit = omit, + codex_settings: Optional[CodexSettings] | Omit = omit, description: Optional[str] | Omit = omit, disabled: Optional[bool] | Omit = omit, executor: Optional[Subject] | Omit = omit, @@ -1192,6 +1209,9 @@ async def update( Args: action: WorkflowAction defines the actions to be executed in a workflow. + codex_settings: Codex app agent settings. Only meaningful when agent_id refers to the Codex app + agent. + description: Description must be at most 500 characters: @@ -1231,6 +1251,7 @@ async def update( body=await async_maybe_transform( { "action": action, + "codex_settings": codex_settings, "description": description, "disabled": disabled, "executor": executor, diff --git a/src/gitpod/resources/billing.py b/src/gitpod/resources/billing.py new file mode 100644 index 00000000..275ce5cd --- /dev/null +++ b/src/gitpod/resources/billing.py @@ -0,0 +1,1592 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime + +import httpx + +from ..types import ( + CreditUsageExportGroupBy, + billing_get_credit_usage_export_params, + billing_get_credit_usage_report_params, + billing_get_cumulative_credit_usage_params, + billing_list_enterprise_ai_team_usage_params, + billing_list_enterprise_ai_user_usage_params, + billing_get_enterprise_ai_usage_summary_params, + billing_list_enterprise_user_credit_usage_params, + billing_get_enterprise_ai_usage_time_series_params, +) +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncTeamUsagePage, SyncUserUsagePage, AsyncTeamUsagePage, AsyncUserUsagePage +from .._base_client import AsyncPaginator, make_request_options +from ..types.user_cost_budget_usage import UserCostBudgetUsage +from ..types.shared_params.date_range import DateRange +from ..types.team_enterprise_ai_usage import TeamEnterpriseAIUsage +from ..types.user_credit_budget_usage import UserCreditBudgetUsage +from ..types.credit_usage_export_group_by import CreditUsageExportGroupBy +from ..types.credit_usage_report_filter_param import CreditUsageReportFilterParam +from ..types.billing_get_credit_usage_export_response import BillingGetCreditUsageExportResponse +from ..types.billing_get_credit_usage_report_response import BillingGetCreditUsageReportResponse +from ..types.billing_get_cumulative_credit_usage_response import BillingGetCumulativeCreditUsageResponse +from ..types.enterprise_ai_usage_time_series_filter_param import EnterpriseAIUsageTimeSeriesFilterParam +from ..types.billing_get_enterprise_ai_usage_summary_response import BillingGetEnterpriseAIUsageSummaryResponse +from ..types.billing_get_enterprise_ai_usage_time_series_response import BillingGetEnterpriseAIUsageTimeSeriesResponse + +__all__ = ["BillingResource", "AsyncBillingResource"] + + +class BillingResource(SyncAPIResource): + """BillingService provides billing and subscription management functionality.""" + + @cached_property + def with_raw_response(self) -> BillingResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers + """ + return BillingResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> BillingResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response + """ + return BillingResourceWithStreamingResponse(self) + + def get_credit_usage_export( + self, + *, + date_range: DateRange, + organization_id: str, + group_by: CreditUsageExportGroupBy | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetCreditUsageExportResponse: + """ + Returns a signed download URL for a CSV export of credit usage. + + The URL points to an HTTP endpoint that streams gzip-compressed CSV and is valid + for five minutes. The download must be made by the same principal that requested + it, carrying its own bearer token. The export range may cover up to a year. + + For organizations without enterprise credit usage enabled (no billing contract + start date), the export instead contains BYOK cost usage with a different column + set, and groupBy=RESOURCE is rejected. + + Use this method to: + + - Export per-user daily credit usage for external reporting + - Export a per-environment and per-conversation resource breakdown + + ### Examples + + - Export January's daily summary: + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + groupBy: CREDIT_USAGE_EXPORT_GROUP_BY_DAILY_SUMMARY + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + date_range: Date range to export. Both start and end dates are inclusive; time-of-day is + ignored. Unlike GetCreditUsageReport, the range may cover up to a year. + + group_by: How to group the export data. Defaults to DAILY_SUMMARY. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.BillingService/GetCreditUsageExport", + body=maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "group_by": group_by, + }, + billing_get_credit_usage_export_params.BillingGetCreditUsageExportParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetCreditUsageExportResponse, + ) + + def get_credit_usage_report( + self, + *, + date_range: DateRange, + organization_id: str, + filter: CreditUsageReportFilterParam | Omit = omit, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetCreditUsageReportResponse: + """ + Returns a daily credit usage report for an enterprise organization. + + Each day reports org-wide credits by usage type, plus per-user, per-team, + per-environment, and per-conversation breakdowns (top consumers with the + remainder aggregated into an "Others" bucket) and a per-model breakdown of + intelligence usage. + + Use this method to: + + - Chart daily credit consumption over a date range + - Attribute credit usage to users, teams, environments, and conversations + - Restrict the report to a single user or service account + + ### Examples + + - Get the report for January: + + Both dates are inclusive and the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. A user without it + can read their own usage by setting filter.subject to their own user identity; + this self-access path is not available to service accounts. + + Args: + date_range: Date range for the report. Both start and end dates are inclusive. Time-of-day + is ignored; dates are truncated to midnight in the specified timezone. The range + must not exceed 31 days. + + filter: Optional filter narrowing the returned data. When unset or empty, the response + preserves the default behavior (top-N users + "Others"). See + CreditUsageReportFilter for per-field response-scoping semantics. + + timezone: IANA timezone name (e.g. "America/New_York", "Europe/Berlin") used to bucket + daily usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.BillingService/GetCreditUsageReport", + body=maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "filter": filter, + "timezone": timezone, + }, + billing_get_credit_usage_report_params.BillingGetCreditUsageReportParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetCreditUsageReportResponse, + ) + + def get_cumulative_credit_usage( + self, + *, + organization_id: str, + as_of: Union[str, datetime, None] | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetCumulativeCreditUsageResponse: + """ + Returns cumulative credit usage for an organization and its teams. + + Use this method to: + + - Get the total cumulative credit consumption as of a point in time + - Get per-team cumulative usage with credit allocation (budget) comparison + - Display team credit summaries on the usage page and team detail page + - Display user budget utilization when user budgets are enabled + + ### Examples + + - Get current cumulative usage: + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` + + - Get cumulative usage as of a specific date: + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + asOf: "2026-03-31T23:59:59Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + organization_id: organization_id is the ID of the organization to get cumulative usage for. + + as_of: as_of is the point in time to compute cumulative usage up to. Defaults to now if + not set. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.BillingService/GetCumulativeCreditUsage", + body=maybe_transform( + { + "organization_id": organization_id, + "as_of": as_of, + }, + billing_get_cumulative_credit_usage_params.BillingGetCumulativeCreditUsageParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetCumulativeCreditUsageResponse, + ) + + def get_enterprise_ai_usage_summary( + self, + *, + date_range: DateRange, + organization_id: str, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetEnterpriseAIUsageSummaryResponse: + """ + Returns organization-level enterprise AI usage totals for reporting. + + Reports BYOK (bring-your-own-key) token spend: cost in the organization's + billing currency plus token counts, with a per-model breakdown. Credit-based + usage from managed models is not included and the credits field is not populated + by this endpoint. + + Use this method to: + + - Report total BYOK AI spend (cost and tokens) for a date range + - Break down organization usage by model + + Only available for enterprise organizations. + + ### Examples + + - Get usage totals for January: + + Returns organization-wide BYOK spend for the month. Both dates are inclusive + and the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + date_range: Date range for the summary. Both start and end dates are inclusive. Time-of-day + is ignored; dates are truncated to midnight in the specified timezone. + + timezone: IANA timezone name used to bucket usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.BillingService/GetEnterpriseAIUsageSummary", + body=maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "timezone": timezone, + }, + billing_get_enterprise_ai_usage_summary_params.BillingGetEnterpriseAIUsageSummaryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetEnterpriseAIUsageSummaryResponse, + ) + + def get_enterprise_ai_usage_time_series( + self, + *, + date_range: DateRange, + organization_id: str, + filter: EnterpriseAIUsageTimeSeriesFilterParam | Omit = omit, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetEnterpriseAIUsageTimeSeriesResponse: + """ + Returns daily enterprise AI usage totals for the organization. + + Each day reports BYOK token spend (cost and tokens) with per-user, per-team, and + per-model breakdowns. Per-user entries cover the top spenders with the remainder + aggregated into an "Others" bucket; usage not attributed to a user or service + account appears only in the daily totals. The credits field is not populated by + this endpoint. + + When filter.subject is set the response contains only that subject's usage: + daily totals and the team breakdown are omitted, and the model breakdown covers + the subject only. + + Use this method to: + + - Chart daily BYOK AI spend over a date range + - Feed daily per-user usage into external dashboards + - Restrict the response to a single user or service account + + Only available for enterprise organizations. + + ### Examples + + - Get daily usage for January: + + Returns one entry per day with per-user, per-team, and per-model breakdowns. + Both dates are inclusive and the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + date_range: Date range for the daily usage series. Both start and end dates are inclusive. + Time-of-day is ignored; dates are truncated to midnight in the specified + timezone. + + timezone: IANA timezone name used to bucket daily usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.BillingService/GetEnterpriseAIUsageTimeSeries", + body=maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "filter": filter, + "timezone": timezone, + }, + billing_get_enterprise_ai_usage_time_series_params.BillingGetEnterpriseAIUsageTimeSeriesParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetEnterpriseAIUsageTimeSeriesResponse, + ) + + def list_enterprise_ai_team_usage( + self, + *, + date_range: DateRange, + organization_id: str, + token: str | Omit = omit, + page_size: int | Omit = omit, + filter: billing_list_enterprise_ai_team_usage_params.Filter | Omit = omit, + pagination: billing_list_enterprise_ai_team_usage_params.Pagination | Omit = omit, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncTeamUsagePage[TeamEnterpriseAIUsage]: + """ + Lists enterprise AI usage grouped by team. + + Reports BYOK token spend per team (cost and tokens) with each team's monthly + budget when one applies. The credits field is not populated by this endpoint. + + Use this method to: + + - Compare BYOK AI spend across teams + - Track team budget utilization + - Filter usage to specific teams + + Only available for enterprise organizations. + + ### Examples + + - List team usage for January: + + Returns BYOK spend per team with monthly budgets. Both dates are inclusive and + the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + date_range: Date range for the team usage list. Both start and end dates are inclusive. + Time-of-day is ignored; dates are truncated to midnight in the specified + timezone. + + timezone: IANA timezone name used to bucket usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/gitpod.v1.BillingService/ListEnterpriseAITeamUsage", + page=SyncTeamUsagePage[TeamEnterpriseAIUsage], + body=maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "filter": filter, + "pagination": pagination, + "timezone": timezone, + }, + billing_list_enterprise_ai_team_usage_params.BillingListEnterpriseAITeamUsageParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "token": token, + "page_size": page_size, + }, + billing_list_enterprise_ai_team_usage_params.BillingListEnterpriseAITeamUsageParams, + ), + ), + model=TeamEnterpriseAIUsage, + method="post", + ) + + def list_enterprise_ai_user_usage( + self, + *, + date_range: DateRange, + organization_id: str, + token: str | Omit = omit, + page_size: int | Omit = omit, + filter: billing_list_enterprise_ai_user_usage_params.Filter | Omit = omit, + pagination: billing_list_enterprise_ai_user_usage_params.Pagination | Omit = omit, + sort: billing_list_enterprise_ai_user_usage_params.Sort | Omit = omit, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncUserUsagePage[UserCostBudgetUsage]: + """ + Lists enterprise AI usage grouped by user with effective monthly budget data. + + Reports BYOK token spend (cost and tokens) for each user and service account + with attributed usage in the date range, including each subject's effective + monthly budget. Usage not attributed to a user or service account is excluded, + so the sum across subjects can be less than the organization totals from + GetEnterpriseAIUsageSummary. The credits field is not populated by this + endpoint. + + Budget fields (month_to_date_usage, utilization_percent, over_budget) are + computed from usage inside the requested date range measured against the monthly + limit. Send a range that starts on the first day of the month for true + month-to-date figures. + + Use this method to: + + - Export per-user BYOK AI spend to external reporting + - Identify the highest spenders in the organization + - Track per-user budget utilization and over-budget users + + Only available for enterprise organizations. + + ### Examples + + - List user usage for January: + + Returns per-user BYOK spend with effective budgets, highest spend first. Both + dates are inclusive and the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. Callers without it + can read their own usage by setting filter.subject to themselves. + + Args: + date_range: Date range for the user usage list. Both start and end dates are inclusive. + Time-of-day is ignored; dates are truncated to midnight in the specified + timezone. + + filter: Optional filter narrowing the returned user usage. When set to a subject, the + response contains only usage for that user or service account. + + sort: sort controls the ordering of results. Defaults to total spend descending. + + timezone: IANA timezone name used to bucket usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/gitpod.v1.BillingService/ListEnterpriseAIUserUsage", + page=SyncUserUsagePage[UserCostBudgetUsage], + body=maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "filter": filter, + "pagination": pagination, + "sort": sort, + "timezone": timezone, + }, + billing_list_enterprise_ai_user_usage_params.BillingListEnterpriseAIUserUsageParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "token": token, + "page_size": page_size, + }, + billing_list_enterprise_ai_user_usage_params.BillingListEnterpriseAIUserUsageParams, + ), + ), + model=UserCostBudgetUsage, + method="post", + ) + + def list_enterprise_user_credit_usage( + self, + *, + organization_id: str, + token: str | Omit = omit, + page_size: int | Omit = omit, + as_of: Union[str, datetime, None] | Omit = omit, + pagination: billing_list_enterprise_user_credit_usage_params.Pagination | Omit = omit, + sort: billing_list_enterprise_user_credit_usage_params.Sort | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncUserUsagePage[UserCreditBudgetUsage]: + """ + Lists per-user month-to-date credit usage with effective monthly budgets. + + Results are ordered by total credits descending so the highest spenders appear + first, with user_id as a stable tiebreaker. Use cursor pagination to walk the + full set for large organizations. + + The default SORT_FIELD_USAGE ordering supports cursor pagination over any number + of users. Sorting by display name, budget, or budget utilization computes the + order in memory and is limited to organizations with at most 10,000 users; + beyond that, use SORT_FIELD_USAGE. Because month-to-date figures are recomputed + per request, hold a date range stable across a paginated walk to keep page + tokens valid. + + Use this method to: + + - Export per-user credit usage to external reporting + - Identify the highest spenders in the organization + - Track per-user budget utilization and over-budget users + + ### Examples + + - List user usage for the current month: + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 50 + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + organization_id: organization_id is the ID of the organization to list user credit usage for. + + as_of: as_of is the point in time to compute month-to-date usage up to. Defaults to now + if not set. + + sort: sort controls the ordering of results. Defaults to total credits descending. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/gitpod.v1.BillingService/ListEnterpriseUserCreditUsage", + page=SyncUserUsagePage[UserCreditBudgetUsage], + body=maybe_transform( + { + "organization_id": organization_id, + "as_of": as_of, + "pagination": pagination, + "sort": sort, + }, + billing_list_enterprise_user_credit_usage_params.BillingListEnterpriseUserCreditUsageParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "token": token, + "page_size": page_size, + }, + billing_list_enterprise_user_credit_usage_params.BillingListEnterpriseUserCreditUsageParams, + ), + ), + model=UserCreditBudgetUsage, + method="post", + ) + + +class AsyncBillingResource(AsyncAPIResource): + """BillingService provides billing and subscription management functionality.""" + + @cached_property + def with_raw_response(self) -> AsyncBillingResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers + """ + return AsyncBillingResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncBillingResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response + """ + return AsyncBillingResourceWithStreamingResponse(self) + + async def get_credit_usage_export( + self, + *, + date_range: DateRange, + organization_id: str, + group_by: CreditUsageExportGroupBy | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetCreditUsageExportResponse: + """ + Returns a signed download URL for a CSV export of credit usage. + + The URL points to an HTTP endpoint that streams gzip-compressed CSV and is valid + for five minutes. The download must be made by the same principal that requested + it, carrying its own bearer token. The export range may cover up to a year. + + For organizations without enterprise credit usage enabled (no billing contract + start date), the export instead contains BYOK cost usage with a different column + set, and groupBy=RESOURCE is rejected. + + Use this method to: + + - Export per-user daily credit usage for external reporting + - Export a per-environment and per-conversation resource breakdown + + ### Examples + + - Export January's daily summary: + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + groupBy: CREDIT_USAGE_EXPORT_GROUP_BY_DAILY_SUMMARY + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + date_range: Date range to export. Both start and end dates are inclusive; time-of-day is + ignored. Unlike GetCreditUsageReport, the range may cover up to a year. + + group_by: How to group the export data. Defaults to DAILY_SUMMARY. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.BillingService/GetCreditUsageExport", + body=await async_maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "group_by": group_by, + }, + billing_get_credit_usage_export_params.BillingGetCreditUsageExportParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetCreditUsageExportResponse, + ) + + async def get_credit_usage_report( + self, + *, + date_range: DateRange, + organization_id: str, + filter: CreditUsageReportFilterParam | Omit = omit, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetCreditUsageReportResponse: + """ + Returns a daily credit usage report for an enterprise organization. + + Each day reports org-wide credits by usage type, plus per-user, per-team, + per-environment, and per-conversation breakdowns (top consumers with the + remainder aggregated into an "Others" bucket) and a per-model breakdown of + intelligence usage. + + Use this method to: + + - Chart daily credit consumption over a date range + - Attribute credit usage to users, teams, environments, and conversations + - Restrict the report to a single user or service account + + ### Examples + + - Get the report for January: + + Both dates are inclusive and the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. A user without it + can read their own usage by setting filter.subject to their own user identity; + this self-access path is not available to service accounts. + + Args: + date_range: Date range for the report. Both start and end dates are inclusive. Time-of-day + is ignored; dates are truncated to midnight in the specified timezone. The range + must not exceed 31 days. + + filter: Optional filter narrowing the returned data. When unset or empty, the response + preserves the default behavior (top-N users + "Others"). See + CreditUsageReportFilter for per-field response-scoping semantics. + + timezone: IANA timezone name (e.g. "America/New_York", "Europe/Berlin") used to bucket + daily usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.BillingService/GetCreditUsageReport", + body=await async_maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "filter": filter, + "timezone": timezone, + }, + billing_get_credit_usage_report_params.BillingGetCreditUsageReportParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetCreditUsageReportResponse, + ) + + async def get_cumulative_credit_usage( + self, + *, + organization_id: str, + as_of: Union[str, datetime, None] | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetCumulativeCreditUsageResponse: + """ + Returns cumulative credit usage for an organization and its teams. + + Use this method to: + + - Get the total cumulative credit consumption as of a point in time + - Get per-team cumulative usage with credit allocation (budget) comparison + - Display team credit summaries on the usage page and team detail page + - Display user budget utilization when user budgets are enabled + + ### Examples + + - Get current cumulative usage: + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` + + - Get cumulative usage as of a specific date: + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + asOf: "2026-03-31T23:59:59Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + organization_id: organization_id is the ID of the organization to get cumulative usage for. + + as_of: as_of is the point in time to compute cumulative usage up to. Defaults to now if + not set. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.BillingService/GetCumulativeCreditUsage", + body=await async_maybe_transform( + { + "organization_id": organization_id, + "as_of": as_of, + }, + billing_get_cumulative_credit_usage_params.BillingGetCumulativeCreditUsageParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetCumulativeCreditUsageResponse, + ) + + async def get_enterprise_ai_usage_summary( + self, + *, + date_range: DateRange, + organization_id: str, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetEnterpriseAIUsageSummaryResponse: + """ + Returns organization-level enterprise AI usage totals for reporting. + + Reports BYOK (bring-your-own-key) token spend: cost in the organization's + billing currency plus token counts, with a per-model breakdown. Credit-based + usage from managed models is not included and the credits field is not populated + by this endpoint. + + Use this method to: + + - Report total BYOK AI spend (cost and tokens) for a date range + - Break down organization usage by model + + Only available for enterprise organizations. + + ### Examples + + - Get usage totals for January: + + Returns organization-wide BYOK spend for the month. Both dates are inclusive + and the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + date_range: Date range for the summary. Both start and end dates are inclusive. Time-of-day + is ignored; dates are truncated to midnight in the specified timezone. + + timezone: IANA timezone name used to bucket usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.BillingService/GetEnterpriseAIUsageSummary", + body=await async_maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "timezone": timezone, + }, + billing_get_enterprise_ai_usage_summary_params.BillingGetEnterpriseAIUsageSummaryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetEnterpriseAIUsageSummaryResponse, + ) + + async def get_enterprise_ai_usage_time_series( + self, + *, + date_range: DateRange, + organization_id: str, + filter: EnterpriseAIUsageTimeSeriesFilterParam | Omit = omit, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BillingGetEnterpriseAIUsageTimeSeriesResponse: + """ + Returns daily enterprise AI usage totals for the organization. + + Each day reports BYOK token spend (cost and tokens) with per-user, per-team, and + per-model breakdowns. Per-user entries cover the top spenders with the remainder + aggregated into an "Others" bucket; usage not attributed to a user or service + account appears only in the daily totals. The credits field is not populated by + this endpoint. + + When filter.subject is set the response contains only that subject's usage: + daily totals and the team breakdown are omitted, and the model breakdown covers + the subject only. + + Use this method to: + + - Chart daily BYOK AI spend over a date range + - Feed daily per-user usage into external dashboards + - Restrict the response to a single user or service account + + Only available for enterprise organizations. + + ### Examples + + - Get daily usage for January: + + Returns one entry per day with per-user, per-team, and per-model breakdowns. + Both dates are inclusive and the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + date_range: Date range for the daily usage series. Both start and end dates are inclusive. + Time-of-day is ignored; dates are truncated to midnight in the specified + timezone. + + timezone: IANA timezone name used to bucket daily usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.BillingService/GetEnterpriseAIUsageTimeSeries", + body=await async_maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "filter": filter, + "timezone": timezone, + }, + billing_get_enterprise_ai_usage_time_series_params.BillingGetEnterpriseAIUsageTimeSeriesParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BillingGetEnterpriseAIUsageTimeSeriesResponse, + ) + + def list_enterprise_ai_team_usage( + self, + *, + date_range: DateRange, + organization_id: str, + token: str | Omit = omit, + page_size: int | Omit = omit, + filter: billing_list_enterprise_ai_team_usage_params.Filter | Omit = omit, + pagination: billing_list_enterprise_ai_team_usage_params.Pagination | Omit = omit, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[TeamEnterpriseAIUsage, AsyncTeamUsagePage[TeamEnterpriseAIUsage]]: + """ + Lists enterprise AI usage grouped by team. + + Reports BYOK token spend per team (cost and tokens) with each team's monthly + budget when one applies. The credits field is not populated by this endpoint. + + Use this method to: + + - Compare BYOK AI spend across teams + - Track team budget utilization + - Filter usage to specific teams + + Only available for enterprise organizations. + + ### Examples + + - List team usage for January: + + Returns BYOK spend per team with monthly budgets. Both dates are inclusive and + the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + date_range: Date range for the team usage list. Both start and end dates are inclusive. + Time-of-day is ignored; dates are truncated to midnight in the specified + timezone. + + timezone: IANA timezone name used to bucket usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/gitpod.v1.BillingService/ListEnterpriseAITeamUsage", + page=AsyncTeamUsagePage[TeamEnterpriseAIUsage], + body=maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "filter": filter, + "pagination": pagination, + "timezone": timezone, + }, + billing_list_enterprise_ai_team_usage_params.BillingListEnterpriseAITeamUsageParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "token": token, + "page_size": page_size, + }, + billing_list_enterprise_ai_team_usage_params.BillingListEnterpriseAITeamUsageParams, + ), + ), + model=TeamEnterpriseAIUsage, + method="post", + ) + + def list_enterprise_ai_user_usage( + self, + *, + date_range: DateRange, + organization_id: str, + token: str | Omit = omit, + page_size: int | Omit = omit, + filter: billing_list_enterprise_ai_user_usage_params.Filter | Omit = omit, + pagination: billing_list_enterprise_ai_user_usage_params.Pagination | Omit = omit, + sort: billing_list_enterprise_ai_user_usage_params.Sort | Omit = omit, + timezone: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[UserCostBudgetUsage, AsyncUserUsagePage[UserCostBudgetUsage]]: + """ + Lists enterprise AI usage grouped by user with effective monthly budget data. + + Reports BYOK token spend (cost and tokens) for each user and service account + with attributed usage in the date range, including each subject's effective + monthly budget. Usage not attributed to a user or service account is excluded, + so the sum across subjects can be less than the organization totals from + GetEnterpriseAIUsageSummary. The credits field is not populated by this + endpoint. + + Budget fields (month_to_date_usage, utilization_percent, over_budget) are + computed from usage inside the requested date range measured against the monthly + limit. Send a range that starts on the first day of the month for true + month-to-date figures. + + Use this method to: + + - Export per-user BYOK AI spend to external reporting + - Identify the highest spenders in the organization + - Track per-user budget utilization and over-budget users + + Only available for enterprise organizations. + + ### Examples + + - List user usage for January: + + Returns per-user BYOK spend with effective budgets, highest spend first. Both + dates are inclusive and the range must not exceed 31 days. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-31T00:00:00Z" + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. Callers without it + can read their own usage by setting filter.subject to themselves. + + Args: + date_range: Date range for the user usage list. Both start and end dates are inclusive. + Time-of-day is ignored; dates are truncated to midnight in the specified + timezone. + + filter: Optional filter narrowing the returned user usage. When set to a subject, the + response contains only usage for that user or service account. + + sort: sort controls the ordering of results. Defaults to total spend descending. + + timezone: IANA timezone name used to bucket usage. When empty, defaults to "UTC". + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/gitpod.v1.BillingService/ListEnterpriseAIUserUsage", + page=AsyncUserUsagePage[UserCostBudgetUsage], + body=maybe_transform( + { + "date_range": date_range, + "organization_id": organization_id, + "filter": filter, + "pagination": pagination, + "sort": sort, + "timezone": timezone, + }, + billing_list_enterprise_ai_user_usage_params.BillingListEnterpriseAIUserUsageParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "token": token, + "page_size": page_size, + }, + billing_list_enterprise_ai_user_usage_params.BillingListEnterpriseAIUserUsageParams, + ), + ), + model=UserCostBudgetUsage, + method="post", + ) + + def list_enterprise_user_credit_usage( + self, + *, + organization_id: str, + token: str | Omit = omit, + page_size: int | Omit = omit, + as_of: Union[str, datetime, None] | Omit = omit, + pagination: billing_list_enterprise_user_credit_usage_params.Pagination | Omit = omit, + sort: billing_list_enterprise_user_credit_usage_params.Sort | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[UserCreditBudgetUsage, AsyncUserUsagePage[UserCreditBudgetUsage]]: + """ + Lists per-user month-to-date credit usage with effective monthly budgets. + + Results are ordered by total credits descending so the highest spenders appear + first, with user_id as a stable tiebreaker. Use cursor pagination to walk the + full set for large organizations. + + The default SORT_FIELD_USAGE ordering supports cursor pagination over any number + of users. Sorting by display name, budget, or budget utilization computes the + order in memory and is limited to organizations with at most 10,000 users; + beyond that, use SORT_FIELD_USAGE. Because month-to-date figures are recomputed + per request, hold a date range stable across a paginated walk to keep page + tokens valid. + + Use this method to: + + - Export per-user credit usage to external reporting + - Identify the highest spenders in the organization + - Track per-user budget utilization and over-budget users + + ### Examples + + - List user usage for the current month: + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 50 + ``` + + ### Authorization + + Requires `billing:read_usage` permission on the organization. + + Args: + organization_id: organization_id is the ID of the organization to list user credit usage for. + + as_of: as_of is the point in time to compute month-to-date usage up to. Defaults to now + if not set. + + sort: sort controls the ordering of results. Defaults to total credits descending. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/gitpod.v1.BillingService/ListEnterpriseUserCreditUsage", + page=AsyncUserUsagePage[UserCreditBudgetUsage], + body=maybe_transform( + { + "organization_id": organization_id, + "as_of": as_of, + "pagination": pagination, + "sort": sort, + }, + billing_list_enterprise_user_credit_usage_params.BillingListEnterpriseUserCreditUsageParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "token": token, + "page_size": page_size, + }, + billing_list_enterprise_user_credit_usage_params.BillingListEnterpriseUserCreditUsageParams, + ), + ), + model=UserCreditBudgetUsage, + method="post", + ) + + +class BillingResourceWithRawResponse: + def __init__(self, billing: BillingResource) -> None: + self._billing = billing + + self.get_credit_usage_export = to_raw_response_wrapper( + billing.get_credit_usage_export, + ) + self.get_credit_usage_report = to_raw_response_wrapper( + billing.get_credit_usage_report, + ) + self.get_cumulative_credit_usage = to_raw_response_wrapper( + billing.get_cumulative_credit_usage, + ) + self.get_enterprise_ai_usage_summary = to_raw_response_wrapper( + billing.get_enterprise_ai_usage_summary, + ) + self.get_enterprise_ai_usage_time_series = to_raw_response_wrapper( + billing.get_enterprise_ai_usage_time_series, + ) + self.list_enterprise_ai_team_usage = to_raw_response_wrapper( + billing.list_enterprise_ai_team_usage, + ) + self.list_enterprise_ai_user_usage = to_raw_response_wrapper( + billing.list_enterprise_ai_user_usage, + ) + self.list_enterprise_user_credit_usage = to_raw_response_wrapper( + billing.list_enterprise_user_credit_usage, + ) + + +class AsyncBillingResourceWithRawResponse: + def __init__(self, billing: AsyncBillingResource) -> None: + self._billing = billing + + self.get_credit_usage_export = async_to_raw_response_wrapper( + billing.get_credit_usage_export, + ) + self.get_credit_usage_report = async_to_raw_response_wrapper( + billing.get_credit_usage_report, + ) + self.get_cumulative_credit_usage = async_to_raw_response_wrapper( + billing.get_cumulative_credit_usage, + ) + self.get_enterprise_ai_usage_summary = async_to_raw_response_wrapper( + billing.get_enterprise_ai_usage_summary, + ) + self.get_enterprise_ai_usage_time_series = async_to_raw_response_wrapper( + billing.get_enterprise_ai_usage_time_series, + ) + self.list_enterprise_ai_team_usage = async_to_raw_response_wrapper( + billing.list_enterprise_ai_team_usage, + ) + self.list_enterprise_ai_user_usage = async_to_raw_response_wrapper( + billing.list_enterprise_ai_user_usage, + ) + self.list_enterprise_user_credit_usage = async_to_raw_response_wrapper( + billing.list_enterprise_user_credit_usage, + ) + + +class BillingResourceWithStreamingResponse: + def __init__(self, billing: BillingResource) -> None: + self._billing = billing + + self.get_credit_usage_export = to_streamed_response_wrapper( + billing.get_credit_usage_export, + ) + self.get_credit_usage_report = to_streamed_response_wrapper( + billing.get_credit_usage_report, + ) + self.get_cumulative_credit_usage = to_streamed_response_wrapper( + billing.get_cumulative_credit_usage, + ) + self.get_enterprise_ai_usage_summary = to_streamed_response_wrapper( + billing.get_enterprise_ai_usage_summary, + ) + self.get_enterprise_ai_usage_time_series = to_streamed_response_wrapper( + billing.get_enterprise_ai_usage_time_series, + ) + self.list_enterprise_ai_team_usage = to_streamed_response_wrapper( + billing.list_enterprise_ai_team_usage, + ) + self.list_enterprise_ai_user_usage = to_streamed_response_wrapper( + billing.list_enterprise_ai_user_usage, + ) + self.list_enterprise_user_credit_usage = to_streamed_response_wrapper( + billing.list_enterprise_user_credit_usage, + ) + + +class AsyncBillingResourceWithStreamingResponse: + def __init__(self, billing: AsyncBillingResource) -> None: + self._billing = billing + + self.get_credit_usage_export = async_to_streamed_response_wrapper( + billing.get_credit_usage_export, + ) + self.get_credit_usage_report = async_to_streamed_response_wrapper( + billing.get_credit_usage_report, + ) + self.get_cumulative_credit_usage = async_to_streamed_response_wrapper( + billing.get_cumulative_credit_usage, + ) + self.get_enterprise_ai_usage_summary = async_to_streamed_response_wrapper( + billing.get_enterprise_ai_usage_summary, + ) + self.get_enterprise_ai_usage_time_series = async_to_streamed_response_wrapper( + billing.get_enterprise_ai_usage_time_series, + ) + self.list_enterprise_ai_team_usage = async_to_streamed_response_wrapper( + billing.list_enterprise_ai_team_usage, + ) + self.list_enterprise_ai_user_usage = async_to_streamed_response_wrapper( + billing.list_enterprise_ai_user_usage, + ) + self.list_enterprise_user_credit_usage = async_to_streamed_response_wrapper( + billing.list_enterprise_user_credit_usage, + ) diff --git a/src/gitpod/resources/errors.py b/src/gitpod/resources/errors.py deleted file mode 100644 index 68f6e2b4..00000000 --- a/src/gitpod/resources/errors.py +++ /dev/null @@ -1,209 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Iterable - -import httpx - -from ..types import error_report_errors_params -from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from .._base_client import make_request_options -from ..types.error_event_param import ErrorEventParam - -__all__ = ["ErrorsResource", "AsyncErrorsResource"] - - -class ErrorsResource(SyncAPIResource): - """ - ErrorsService provides endpoints for clients to report errors - that will be sent to error reporting systems. - """ - - @cached_property - def with_raw_response(self) -> ErrorsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers - """ - return ErrorsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ErrorsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response - """ - return ErrorsResourceWithStreamingResponse(self) - - def report_errors( - self, - *, - events: Iterable[ErrorEventParam] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> object: - """ - ReportErrors allows clients to report batches of errors that will be sent to - error reporting systems. The structure is fully compatible with Sentry's event - payload format. - - Use this method to: - - - Report client-side errors and exceptions - - Track application crashes and panics - - Send error context and metadata for debugging - - ### Examples - - - Report a JavaScript error with Sentry-compatible structure: The service - accepts events with comprehensive error information including stack traces, - identity context, breadcrumbs, and metadata that align with Sentry's event - payload format. - - Args: - events: Error events to be reported (batch) - now using Sentry-compatible structure - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._post( - "/gitpod.v1.ErrorsService/ReportErrors", - body=maybe_transform({"events": events}, error_report_errors_params.ErrorReportErrorsParams), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class AsyncErrorsResource(AsyncAPIResource): - """ - ErrorsService provides endpoints for clients to report errors - that will be sent to error reporting systems. - """ - - @cached_property - def with_raw_response(self) -> AsyncErrorsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers - """ - return AsyncErrorsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncErrorsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response - """ - return AsyncErrorsResourceWithStreamingResponse(self) - - async def report_errors( - self, - *, - events: Iterable[ErrorEventParam] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> object: - """ - ReportErrors allows clients to report batches of errors that will be sent to - error reporting systems. The structure is fully compatible with Sentry's event - payload format. - - Use this method to: - - - Report client-side errors and exceptions - - Track application crashes and panics - - Send error context and metadata for debugging - - ### Examples - - - Report a JavaScript error with Sentry-compatible structure: The service - accepts events with comprehensive error information including stack traces, - identity context, breadcrumbs, and metadata that align with Sentry's event - payload format. - - Args: - events: Error events to be reported (batch) - now using Sentry-compatible structure - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return await self._post( - "/gitpod.v1.ErrorsService/ReportErrors", - body=await async_maybe_transform({"events": events}, error_report_errors_params.ErrorReportErrorsParams), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=object, - ) - - -class ErrorsResourceWithRawResponse: - def __init__(self, errors: ErrorsResource) -> None: - self._errors = errors - - self.report_errors = to_raw_response_wrapper( - errors.report_errors, - ) - - -class AsyncErrorsResourceWithRawResponse: - def __init__(self, errors: AsyncErrorsResource) -> None: - self._errors = errors - - self.report_errors = async_to_raw_response_wrapper( - errors.report_errors, - ) - - -class ErrorsResourceWithStreamingResponse: - def __init__(self, errors: ErrorsResource) -> None: - self._errors = errors - - self.report_errors = to_streamed_response_wrapper( - errors.report_errors, - ) - - -class AsyncErrorsResourceWithStreamingResponse: - def __init__(self, errors: AsyncErrorsResource) -> None: - self._errors = errors - - self.report_errors = async_to_streamed_response_wrapper( - errors.report_errors, - ) diff --git a/src/gitpod/resources/events.py b/src/gitpod/resources/events.py index 179eb6cb..9164e849 100644 --- a/src/gitpod/resources/events.py +++ b/src/gitpod/resources/events.py @@ -6,7 +6,7 @@ import httpx -from ..types import event_list_params, event_watch_params +from ..types import event_list_params, event_watch_params, event_retrieve_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -23,6 +23,7 @@ from ..types.shared_params.sort import Sort from ..types.event_list_response import EventListResponse from ..types.event_watch_response import EventWatchResponse +from ..types.event_retrieve_response import EventRetrieveResponse __all__ = ["EventsResource", "AsyncEventsResource"] @@ -47,6 +48,53 @@ def with_streaming_response(self) -> EventsResourceWithStreamingResponse: """ return EventsResourceWithStreamingResponse(self) + def retrieve( + self, + *, + audit_log_entry_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> EventRetrieveResponse: + """ + Gets one audit-log entry, including any typed details stored for it. + + Use this method to: + + - Inspect the details of a specific audit-log entry + - Retrieve the evidence associated with a Veto Exec audit event + + ### Examples + + - Get an audit-log entry: + + ```yaml + auditLogEntryId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + audit_log_entry_id: audit_log_entry_id is the ID of the audit-log entry to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.EventService/GetAuditLog", + body=maybe_transform({"audit_log_entry_id": audit_log_entry_id}, event_retrieve_params.EventRetrieveParams), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=EventRetrieveResponse, + ) + def list( self, *, @@ -234,6 +282,55 @@ def with_streaming_response(self) -> AsyncEventsResourceWithStreamingResponse: """ return AsyncEventsResourceWithStreamingResponse(self) + async def retrieve( + self, + *, + audit_log_entry_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> EventRetrieveResponse: + """ + Gets one audit-log entry, including any typed details stored for it. + + Use this method to: + + - Inspect the details of a specific audit-log entry + - Retrieve the evidence associated with a Veto Exec audit event + + ### Examples + + - Get an audit-log entry: + + ```yaml + auditLogEntryId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + audit_log_entry_id: audit_log_entry_id is the ID of the audit-log entry to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.EventService/GetAuditLog", + body=await async_maybe_transform( + {"audit_log_entry_id": audit_log_entry_id}, event_retrieve_params.EventRetrieveParams + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=EventRetrieveResponse, + ) + def list( self, *, @@ -405,6 +502,9 @@ class EventsResourceWithRawResponse: def __init__(self, events: EventsResource) -> None: self._events = events + self.retrieve = to_raw_response_wrapper( + events.retrieve, + ) self.list = to_raw_response_wrapper( events.list, ) @@ -417,6 +517,9 @@ class AsyncEventsResourceWithRawResponse: def __init__(self, events: AsyncEventsResource) -> None: self._events = events + self.retrieve = async_to_raw_response_wrapper( + events.retrieve, + ) self.list = async_to_raw_response_wrapper( events.list, ) @@ -429,6 +532,9 @@ class EventsResourceWithStreamingResponse: def __init__(self, events: EventsResource) -> None: self._events = events + self.retrieve = to_streamed_response_wrapper( + events.retrieve, + ) self.list = to_streamed_response_wrapper( events.list, ) @@ -441,6 +547,9 @@ class AsyncEventsResourceWithStreamingResponse: def __init__(self, events: AsyncEventsResource) -> None: self._events = events + self.retrieve = async_to_streamed_response_wrapper( + events.retrieve, + ) self.list = async_to_streamed_response_wrapper( events.list, ) diff --git a/src/gitpod/resources/organizations/policies.py b/src/gitpod/resources/organizations/policies.py index 5e5f9877..35f8ca23 100644 --- a/src/gitpod/resources/organizations/policies.py +++ b/src/gitpod/resources/organizations/policies.py @@ -106,6 +106,7 @@ def update( default_editor_id: Optional[str] | Omit = omit, default_environment_image: Optional[str] | Omit = omit, delete_archived_environments_after: Optional[str] | Omit = omit, + disable_from_scratch: Optional[bool] | Omit = omit, editor_version_restrictions: Dict[str, policy_update_params.EditorVersionRestrictions] | Omit = omit, maximum_environment_lifetime: Optional[str] | Omit = omit, maximum_environments_per_user: Optional[str] | Omit = omit, @@ -115,11 +116,12 @@ def update( members_create_projects: Optional[bool] | Omit = omit, members_require_projects: Optional[bool] | Omit = omit, port_sharing_disabled: Optional[bool] | Omit = omit, - project_creation_defaults: Optional[policy_update_params.ProjectCreationDefaults] | Omit = omit, require_custom_domain_access: Optional[bool] | Omit = omit, restrict_account_creation_to_scim: Optional[bool] | Omit = omit, security_agent_policy: Optional[policy_update_params.SecurityAgentPolicy] | Omit = omit, + security_policy_id: Optional[str] | Omit = omit, veto_exec_policy: Optional[VetoExecPolicyParam] | Omit = omit, + web_browser_disabled: Optional[bool] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -183,6 +185,9 @@ def update( kept before automatic deletion. 0 means no automatic deletion. Maximum duration is 4 weeks (2419200 seconds). + disable_from_scratch: disable_from_scratch controls whether non-admin users can create blank + environments without a Git or URL initializer. + editor_version_restrictions: editor_version_restrictions restricts which editor versions can be used. Maps editor ID to version policy with allowed major versions. @@ -219,9 +224,6 @@ def update( in the organization. System ports (VS Code Browser, agents) are always exempt from this policy. - project_creation_defaults: project_creation_defaults contains updates to default settings applied to newly - created projects. - require_custom_domain_access: require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked. @@ -231,8 +233,17 @@ def update( security_agent_policy: security_agent_policy contains security agent configuration updates + security_policy_id: security_policy_id assigns a Veto Exec SecurityPolicy to newly created + environments. The public GA contract accepts policies that use only + SecurityPolicy.Spec.executables. Assignment validates materializability and + rejects unsupported executable selectors or effects. Set this field to an empty + string to clear the default assignment. + veto_exec_policy: veto_exec_policy contains the veto exec policy for environments. + web_browser_disabled: web_browser_disabled controls whether users can open the built-in web browser + from environment pages. This does not affect VS Code Browser. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -252,6 +263,7 @@ def update( "default_editor_id": default_editor_id, "default_environment_image": default_environment_image, "delete_archived_environments_after": delete_archived_environments_after, + "disable_from_scratch": disable_from_scratch, "editor_version_restrictions": editor_version_restrictions, "maximum_environment_lifetime": maximum_environment_lifetime, "maximum_environments_per_user": maximum_environments_per_user, @@ -261,11 +273,12 @@ def update( "members_create_projects": members_create_projects, "members_require_projects": members_require_projects, "port_sharing_disabled": port_sharing_disabled, - "project_creation_defaults": project_creation_defaults, "require_custom_domain_access": require_custom_domain_access, "restrict_account_creation_to_scim": restrict_account_creation_to_scim, "security_agent_policy": security_agent_policy, + "security_policy_id": security_policy_id, "veto_exec_policy": veto_exec_policy, + "web_browser_disabled": web_browser_disabled, }, policy_update_params.PolicyUpdateParams, ), @@ -358,6 +371,7 @@ async def update( default_editor_id: Optional[str] | Omit = omit, default_environment_image: Optional[str] | Omit = omit, delete_archived_environments_after: Optional[str] | Omit = omit, + disable_from_scratch: Optional[bool] | Omit = omit, editor_version_restrictions: Dict[str, policy_update_params.EditorVersionRestrictions] | Omit = omit, maximum_environment_lifetime: Optional[str] | Omit = omit, maximum_environments_per_user: Optional[str] | Omit = omit, @@ -367,11 +381,12 @@ async def update( members_create_projects: Optional[bool] | Omit = omit, members_require_projects: Optional[bool] | Omit = omit, port_sharing_disabled: Optional[bool] | Omit = omit, - project_creation_defaults: Optional[policy_update_params.ProjectCreationDefaults] | Omit = omit, require_custom_domain_access: Optional[bool] | Omit = omit, restrict_account_creation_to_scim: Optional[bool] | Omit = omit, security_agent_policy: Optional[policy_update_params.SecurityAgentPolicy] | Omit = omit, + security_policy_id: Optional[str] | Omit = omit, veto_exec_policy: Optional[VetoExecPolicyParam] | Omit = omit, + web_browser_disabled: Optional[bool] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -435,6 +450,9 @@ async def update( kept before automatic deletion. 0 means no automatic deletion. Maximum duration is 4 weeks (2419200 seconds). + disable_from_scratch: disable_from_scratch controls whether non-admin users can create blank + environments without a Git or URL initializer. + editor_version_restrictions: editor_version_restrictions restricts which editor versions can be used. Maps editor ID to version policy with allowed major versions. @@ -471,9 +489,6 @@ async def update( in the organization. System ports (VS Code Browser, agents) are always exempt from this policy. - project_creation_defaults: project_creation_defaults contains updates to default settings applied to newly - created projects. - require_custom_domain_access: require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked. @@ -483,8 +498,17 @@ async def update( security_agent_policy: security_agent_policy contains security agent configuration updates + security_policy_id: security_policy_id assigns a Veto Exec SecurityPolicy to newly created + environments. The public GA contract accepts policies that use only + SecurityPolicy.Spec.executables. Assignment validates materializability and + rejects unsupported executable selectors or effects. Set this field to an empty + string to clear the default assignment. + veto_exec_policy: veto_exec_policy contains the veto exec policy for environments. + web_browser_disabled: web_browser_disabled controls whether users can open the built-in web browser + from environment pages. This does not affect VS Code Browser. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -504,6 +528,7 @@ async def update( "default_editor_id": default_editor_id, "default_environment_image": default_environment_image, "delete_archived_environments_after": delete_archived_environments_after, + "disable_from_scratch": disable_from_scratch, "editor_version_restrictions": editor_version_restrictions, "maximum_environment_lifetime": maximum_environment_lifetime, "maximum_environments_per_user": maximum_environments_per_user, @@ -513,11 +538,12 @@ async def update( "members_create_projects": members_create_projects, "members_require_projects": members_require_projects, "port_sharing_disabled": port_sharing_disabled, - "project_creation_defaults": project_creation_defaults, "require_custom_domain_access": require_custom_domain_access, "restrict_account_creation_to_scim": restrict_account_creation_to_scim, "security_agent_policy": security_agent_policy, + "security_policy_id": security_policy_id, "veto_exec_policy": veto_exec_policy, + "web_browser_disabled": web_browser_disabled, }, policy_update_params.PolicyUpdateParams, ), diff --git a/src/gitpod/resources/runners/runners.py b/src/gitpod/resources/runners/runners.py index 1d92c061..6b2bd4ce 100644 --- a/src/gitpod/resources/runners/runners.py +++ b/src/gitpod/resources/runners/runners.py @@ -126,12 +126,12 @@ def create( ### Examples - - Create cloud runner: + - Create an AWS runner: Creates a new runner in AWS EC2. ```yaml - name: "Production Runner" + name: "AWS Runner" provider: RUNNER_PROVIDER_AWS_EC2 spec: desiredPhase: RUNNER_PHASE_ACTIVE @@ -141,9 +141,25 @@ def create( autoUpdate: true ``` - - Create local runner: + - Create a GCP runner: - Creates a new local runner on Linux. + Creates a new runner on Google Cloud Platform. + + ```yaml + name: "GCP Runner" + provider: RUNNER_PROVIDER_GCP + spec: + desiredPhase: RUNNER_PHASE_ACTIVE + configuration: + region: "us-central1" + releaseChannel: RUNNER_RELEASE_CHANNEL_STABLE + autoUpdate: true + ``` + + - Create local runner (deprecated): + + Creates a new local runner on Linux. Local runners are deprecated; use + RUNNER_PROVIDER_AWS_EC2 or RUNNER_PROVIDER_GCP instead. ```yaml name: "Local Development Runner" @@ -981,12 +997,12 @@ async def create( ### Examples - - Create cloud runner: + - Create an AWS runner: Creates a new runner in AWS EC2. ```yaml - name: "Production Runner" + name: "AWS Runner" provider: RUNNER_PROVIDER_AWS_EC2 spec: desiredPhase: RUNNER_PHASE_ACTIVE @@ -996,9 +1012,25 @@ async def create( autoUpdate: true ``` - - Create local runner: + - Create a GCP runner: + + Creates a new runner on Google Cloud Platform. + + ```yaml + name: "GCP Runner" + provider: RUNNER_PROVIDER_GCP + spec: + desiredPhase: RUNNER_PHASE_ACTIVE + configuration: + region: "us-central1" + releaseChannel: RUNNER_RELEASE_CHANNEL_STABLE + autoUpdate: true + ``` + + - Create local runner (deprecated): - Creates a new local runner on Linux. + Creates a new local runner on Linux. Local runners are deprecated; use + RUNNER_PROVIDER_AWS_EC2 or RUNNER_PROVIDER_GCP instead. ```yaml name: "Local Development Runner" diff --git a/src/gitpod/resources/secrets.py b/src/gitpod/resources/secrets.py index 4ba66df7..4d3f6150 100644 --- a/src/gitpod/resources/secrets.py +++ b/src/gitpod/resources/secrets.py @@ -62,6 +62,7 @@ def create( name: str | Omit = omit, project_id: str | Omit = omit, scope: SecretScopeParam | Omit = omit, + source: secret_create_params.Source | Omit = omit, value: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -144,7 +145,10 @@ def create( scope: scope is the scope of the secret - value: value is the plaintext value of the secret + source: source is the source of the secret, possibly verbatim value + + value: value is the plaintext value of the secret. When set, source must be unset or + verbatim. extra_headers: Send extra headers @@ -166,6 +170,7 @@ def create( "name": name, "project_id": project_id, "scope": scope, + "source": source, "value": value, }, secret_create_params.SecretCreateParams, @@ -447,6 +452,7 @@ async def create( name: str | Omit = omit, project_id: str | Omit = omit, scope: SecretScopeParam | Omit = omit, + source: secret_create_params.Source | Omit = omit, value: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -529,7 +535,10 @@ async def create( scope: scope is the scope of the secret - value: value is the plaintext value of the secret + source: source is the source of the secret, possibly verbatim value + + value: value is the plaintext value of the secret. When set, source must be unset or + verbatim. extra_headers: Send extra headers @@ -551,6 +560,7 @@ async def create( "name": name, "project_id": project_id, "scope": scope, + "source": source, "value": value, }, secret_create_params.SecretCreateParams, diff --git a/src/gitpod/resources/security_policies.py b/src/gitpod/resources/security_policies.py new file mode 100644 index 00000000..0c9a23b9 --- /dev/null +++ b/src/gitpod/resources/security_policies.py @@ -0,0 +1,779 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import ( + security_policy_list_params, + security_policy_create_params, + security_policy_delete_params, + security_policy_update_params, + security_policy_retrieve_params, +) +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncSecurityPoliciesPage, AsyncSecurityPoliciesPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.security_policy import SecurityPolicy +from ..types.security_policy_create_response import SecurityPolicyCreateResponse +from ..types.security_policy_update_response import SecurityPolicyUpdateResponse +from ..types.security_policy_retrieve_response import SecurityPolicyRetrieveResponse + +__all__ = ["SecurityPoliciesResource", "AsyncSecurityPoliciesResource"] + + +class SecurityPoliciesResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> SecurityPoliciesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers + """ + return SecurityPoliciesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> SecurityPoliciesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response + """ + return SecurityPoliciesResourceWithStreamingResponse(self) + + def create( + self, + *, + metadata: security_policy_create_params.Metadata, + spec: security_policy_create_params.Spec, + organization_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SecurityPolicyCreateResponse: + """ + Creates a new security policy. + + Use this method to: + + - Define environment access controls + - Configure audited or blocked operations + - Manage organization security posture + + ### Examples + + - Create security policy: + + Creates an audit-first Veto Exec policy with one audited bare name and one + blocked absolute path. Creation stores an inactive definition; assigning it as + the organization default validates materializability. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + metadata: + name: "Veto Exec audit-first" + spec: + executables: + defaultEffect: EFFECT_ALLOW + rules: + - path: "npx" + effect: EFFECT_AUDIT + - path: "/usr/bin/curl" + effect: EFFECT_BLOCK + ``` + + Args: + spec: Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + security/proxy use. These can be modeled later as explicit fields if needed. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.SecurityService/CreateSecurityPolicy", + body=maybe_transform( + { + "metadata": metadata, + "spec": spec, + "organization_id": organization_id, + }, + security_policy_create_params.SecurityPolicyCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=SecurityPolicyCreateResponse, + ) + + def retrieve( + self, + *, + security_policy_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SecurityPolicyRetrieveResponse: + """ + Gets details about a specific security policy. + + Use this method to: + + - View security policy configuration + - Inspect enforcement rules + + ### Examples + + - Get security policy: + + Retrieves a security policy by ID. + + ```yaml + securityPolicyId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.SecurityService/GetSecurityPolicy", + body=maybe_transform( + {"security_policy_id": security_policy_id}, security_policy_retrieve_params.SecurityPolicyRetrieveParams + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=SecurityPolicyRetrieveResponse, + ) + + def update( + self, + *, + metadata: security_policy_update_params.Metadata | Omit = omit, + security_policy_id: str | Omit = omit, + spec: security_policy_update_params.Spec | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SecurityPolicyUpdateResponse: + """ + Updates a security policy. + + Use this method to: + + - Rename a security policy + - Change enforcement rules + - Update auditing behavior + + ### Examples + + - Update security policy: + + Promotes one executable rule from audit to block while leaving unmatched + executables allowed. Updating an assigned policy validates materializability; + updating an unassigned policy only stores its spec. + + ```yaml + securityPolicyId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + spec: + executables: + defaultEffect: EFFECT_ALLOW + rules: + - path: "npx" + effect: EFFECT_BLOCK + - path: "/usr/bin/curl" + effect: EFFECT_BLOCK + ``` + + Args: + spec: Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + security/proxy use. These can be modeled later as explicit fields if needed. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.SecurityService/UpdateSecurityPolicy", + body=maybe_transform( + { + "metadata": metadata, + "security_policy_id": security_policy_id, + "spec": spec, + }, + security_policy_update_params.SecurityPolicyUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=SecurityPolicyUpdateResponse, + ) + + def list( + self, + *, + token: str | Omit = omit, + page_size: int | Omit = omit, + filter: security_policy_list_params.Filter | Omit = omit, + pagination: security_policy_list_params.Pagination | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncSecurityPoliciesPage[SecurityPolicy]: + """ + Lists security policies. + + Use this method to: + + - View all security policies in an organization + - Audit configured security controls + + ### Examples + + - List organization policies: + + Shows security policies with pagination. + + ```yaml + filter: + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + ``` + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/gitpod.v1.SecurityService/ListSecurityPolicies", + page=SyncSecurityPoliciesPage[SecurityPolicy], + body=maybe_transform( + { + "filter": filter, + "pagination": pagination, + }, + security_policy_list_params.SecurityPolicyListParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "token": token, + "page_size": page_size, + }, + security_policy_list_params.SecurityPolicyListParams, + ), + ), + model=SecurityPolicy, + method="post", + ) + + def delete( + self, + *, + security_policy_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> object: + """ + Deletes a security policy. + + Use this method to: + + - Remove obsolete security policies + - Clean up unused policy definitions + + ### Examples + + - Delete security policy: + + Permanently removes a security policy. + + ```yaml + securityPolicyId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.SecurityService/DeleteSecurityPolicy", + body=maybe_transform( + {"security_policy_id": security_policy_id}, security_policy_delete_params.SecurityPolicyDeleteParams + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class AsyncSecurityPoliciesResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncSecurityPoliciesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers + """ + return AsyncSecurityPoliciesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncSecurityPoliciesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response + """ + return AsyncSecurityPoliciesResourceWithStreamingResponse(self) + + async def create( + self, + *, + metadata: security_policy_create_params.Metadata, + spec: security_policy_create_params.Spec, + organization_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SecurityPolicyCreateResponse: + """ + Creates a new security policy. + + Use this method to: + + - Define environment access controls + - Configure audited or blocked operations + - Manage organization security posture + + ### Examples + + - Create security policy: + + Creates an audit-first Veto Exec policy with one audited bare name and one + blocked absolute path. Creation stores an inactive definition; assigning it as + the organization default validates materializability. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + metadata: + name: "Veto Exec audit-first" + spec: + executables: + defaultEffect: EFFECT_ALLOW + rules: + - path: "npx" + effect: EFFECT_AUDIT + - path: "/usr/bin/curl" + effect: EFFECT_BLOCK + ``` + + Args: + spec: Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + security/proxy use. These can be modeled later as explicit fields if needed. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.SecurityService/CreateSecurityPolicy", + body=await async_maybe_transform( + { + "metadata": metadata, + "spec": spec, + "organization_id": organization_id, + }, + security_policy_create_params.SecurityPolicyCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=SecurityPolicyCreateResponse, + ) + + async def retrieve( + self, + *, + security_policy_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SecurityPolicyRetrieveResponse: + """ + Gets details about a specific security policy. + + Use this method to: + + - View security policy configuration + - Inspect enforcement rules + + ### Examples + + - Get security policy: + + Retrieves a security policy by ID. + + ```yaml + securityPolicyId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.SecurityService/GetSecurityPolicy", + body=await async_maybe_transform( + {"security_policy_id": security_policy_id}, security_policy_retrieve_params.SecurityPolicyRetrieveParams + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=SecurityPolicyRetrieveResponse, + ) + + async def update( + self, + *, + metadata: security_policy_update_params.Metadata | Omit = omit, + security_policy_id: str | Omit = omit, + spec: security_policy_update_params.Spec | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SecurityPolicyUpdateResponse: + """ + Updates a security policy. + + Use this method to: + + - Rename a security policy + - Change enforcement rules + - Update auditing behavior + + ### Examples + + - Update security policy: + + Promotes one executable rule from audit to block while leaving unmatched + executables allowed. Updating an assigned policy validates materializability; + updating an unassigned policy only stores its spec. + + ```yaml + securityPolicyId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + spec: + executables: + defaultEffect: EFFECT_ALLOW + rules: + - path: "npx" + effect: EFFECT_BLOCK + - path: "/usr/bin/curl" + effect: EFFECT_BLOCK + ``` + + Args: + spec: Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + security/proxy use. These can be modeled later as explicit fields if needed. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.SecurityService/UpdateSecurityPolicy", + body=await async_maybe_transform( + { + "metadata": metadata, + "security_policy_id": security_policy_id, + "spec": spec, + }, + security_policy_update_params.SecurityPolicyUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=SecurityPolicyUpdateResponse, + ) + + def list( + self, + *, + token: str | Omit = omit, + page_size: int | Omit = omit, + filter: security_policy_list_params.Filter | Omit = omit, + pagination: security_policy_list_params.Pagination | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[SecurityPolicy, AsyncSecurityPoliciesPage[SecurityPolicy]]: + """ + Lists security policies. + + Use this method to: + + - View all security policies in an organization + - Audit configured security controls + + ### Examples + + - List organization policies: + + Shows security policies with pagination. + + ```yaml + filter: + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + ``` + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/gitpod.v1.SecurityService/ListSecurityPolicies", + page=AsyncSecurityPoliciesPage[SecurityPolicy], + body=maybe_transform( + { + "filter": filter, + "pagination": pagination, + }, + security_policy_list_params.SecurityPolicyListParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "token": token, + "page_size": page_size, + }, + security_policy_list_params.SecurityPolicyListParams, + ), + ), + model=SecurityPolicy, + method="post", + ) + + async def delete( + self, + *, + security_policy_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> object: + """ + Deletes a security policy. + + Use this method to: + + - Remove obsolete security policies + - Clean up unused policy definitions + + ### Examples + + - Delete security policy: + + Permanently removes a security policy. + + ```yaml + securityPolicyId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.SecurityService/DeleteSecurityPolicy", + body=await async_maybe_transform( + {"security_policy_id": security_policy_id}, security_policy_delete_params.SecurityPolicyDeleteParams + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=object, + ) + + +class SecurityPoliciesResourceWithRawResponse: + def __init__(self, security_policies: SecurityPoliciesResource) -> None: + self._security_policies = security_policies + + self.create = to_raw_response_wrapper( + security_policies.create, + ) + self.retrieve = to_raw_response_wrapper( + security_policies.retrieve, + ) + self.update = to_raw_response_wrapper( + security_policies.update, + ) + self.list = to_raw_response_wrapper( + security_policies.list, + ) + self.delete = to_raw_response_wrapper( + security_policies.delete, + ) + + +class AsyncSecurityPoliciesResourceWithRawResponse: + def __init__(self, security_policies: AsyncSecurityPoliciesResource) -> None: + self._security_policies = security_policies + + self.create = async_to_raw_response_wrapper( + security_policies.create, + ) + self.retrieve = async_to_raw_response_wrapper( + security_policies.retrieve, + ) + self.update = async_to_raw_response_wrapper( + security_policies.update, + ) + self.list = async_to_raw_response_wrapper( + security_policies.list, + ) + self.delete = async_to_raw_response_wrapper( + security_policies.delete, + ) + + +class SecurityPoliciesResourceWithStreamingResponse: + def __init__(self, security_policies: SecurityPoliciesResource) -> None: + self._security_policies = security_policies + + self.create = to_streamed_response_wrapper( + security_policies.create, + ) + self.retrieve = to_streamed_response_wrapper( + security_policies.retrieve, + ) + self.update = to_streamed_response_wrapper( + security_policies.update, + ) + self.list = to_streamed_response_wrapper( + security_policies.list, + ) + self.delete = to_streamed_response_wrapper( + security_policies.delete, + ) + + +class AsyncSecurityPoliciesResourceWithStreamingResponse: + def __init__(self, security_policies: AsyncSecurityPoliciesResource) -> None: + self._security_policies = security_policies + + self.create = async_to_streamed_response_wrapper( + security_policies.create, + ) + self.retrieve = async_to_streamed_response_wrapper( + security_policies.retrieve, + ) + self.update = async_to_streamed_response_wrapper( + security_policies.update, + ) + self.list = async_to_streamed_response_wrapper( + security_policies.list, + ) + self.delete = async_to_streamed_response_wrapper( + security_policies.delete, + ) diff --git a/src/gitpod/resources/usage.py b/src/gitpod/resources/usage.py index 6285e304..7cda91dc 100644 --- a/src/gitpod/resources/usage.py +++ b/src/gitpod/resources/usage.py @@ -4,9 +4,19 @@ import httpx -from ..types import usage_list_environment_runtime_records_params +from ..types import ( + Resolution, + usage_get_pr_summary_params, + usage_get_pr_time_series_params, + usage_get_co_author_summary_params, + usage_get_agent_trace_summary_params, + usage_get_co_author_time_series_params, + usage_get_adoption_usage_summary_params, + usage_get_agent_trace_time_series_params, + usage_list_environment_runtime_records_params, +) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -17,78 +27,894 @@ ) from ..pagination import SyncRecordsPage, AsyncRecordsPage from .._base_client import AsyncPaginator, make_request_options +from ..types.resolution import Resolution from ..types.environment_usage_record import EnvironmentUsageRecord +from ..types.shared_params.date_range import DateRange +from ..types.usage_get_pr_summary_response import UsageGetPrSummaryResponse +from ..types.usage_get_pr_time_series_response import UsageGetPrTimeSeriesResponse +from ..types.usage_get_co_author_summary_response import UsageGetCoAuthorSummaryResponse +from ..types.usage_get_agent_trace_summary_response import UsageGetAgentTraceSummaryResponse +from ..types.usage_get_co_author_time_series_response import UsageGetCoAuthorTimeSeriesResponse +from ..types.usage_get_adoption_usage_summary_response import UsageGetAdoptionUsageSummaryResponse +from ..types.usage_get_agent_trace_time_series_response import UsageGetAgentTraceTimeSeriesResponse + +__all__ = ["UsageResource", "AsyncUsageResource"] + + +class UsageResource(SyncAPIResource): + """ + UsageService provides usage information about environments, users, and projects. + """ + + @cached_property + def with_raw_response(self) -> UsageResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers + """ + return UsageResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> UsageResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response + """ + return UsageResourceWithStreamingResponse(self) + + def get_adoption_usage_summary( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetAdoptionUsageSummaryResponse: + """ + Gets a summary of adoption and usage metrics. + + Returns all scalar values, trends, and a sparkline for the Adoption & Usage + insight category. For full-resolution time series, use the individual time + series RPCs. + + Use this method to: + + - Build adoption and usage insight cards + - Filter adoption metrics by project, user, or team + - Compare the requested date range against the previous period + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query metrics within. + + project_id: Optional project ID to filter metrics by. + + team_id: Optional team ID to scope results to members of a specific team. + + user_id: Optional user ID to filter metrics for a specific user (personal insights view). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.UsageService/GetAdoptionUsageSummary", + body=maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_adoption_usage_summary_params.UsageGetAdoptionUsageSummaryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetAdoptionUsageSummaryResponse, + ) + + def get_agent_trace_summary( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetAgentTraceSummaryResponse: + """ + Gets aggregated agent trace summary for the organization or a specific project. + + Use this method to: + + - Measure agent sessions and line changes + - Break down agent activity by model + - Scope agent trace insights to a project, user, or team + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.UsageService/GetAgentTraceSummary", + body=maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_agent_trace_summary_params.UsageGetAgentTraceSummaryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetAgentTraceSummaryResponse, + ) + + def get_agent_trace_time_series( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + resolution: Resolution | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetAgentTraceTimeSeriesResponse: + """ + Gets agent trace data as a time series. + + Use this method to: + + - Chart agent sessions and line changes over time + - Select hourly, daily, weekly, or monthly buckets + - Scope agent trace insights to a project, user, or team + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + resolution: RESOLUTION_WEEKLY + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + resolution: Time resolution for the series data. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.UsageService/GetAgentTraceTimeSeries", + body=maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "resolution": resolution, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_agent_trace_time_series_params.UsageGetAgentTraceTimeSeriesParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetAgentTraceTimeSeriesResponse, + ) + + def get_co_author_summary( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetCoAuthorSummaryResponse: + """ + Gets aggregated co-author summary for the organization or a specific project. + + Use this method to: + + - Measure AI-assisted commits and line changes + - Scope co-author insights to a project, user, or team + - Compare the requested date range against the previous period + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.UsageService/GetCoAuthorSummary", + body=maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_co_author_summary_params.UsageGetCoAuthorSummaryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetCoAuthorSummaryResponse, + ) + + def get_co_author_time_series( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + resolution: Resolution | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetCoAuthorTimeSeriesResponse: + """ + Gets co-author contribution data as a time series. + + Use this method to: + + - Chart AI-assisted commits and line changes over time + - Select hourly, daily, weekly, or monthly buckets + - Scope co-author insights to a project, user, or team + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + resolution: RESOLUTION_WEEKLY + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + resolution: Time resolution for the series data. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.UsageService/GetCoAuthorTimeSeries", + body=maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "resolution": resolution, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_co_author_time_series_params.UsageGetCoAuthorTimeSeriesParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetCoAuthorTimeSeriesResponse, + ) + + def get_pr_summary( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetPrSummaryResponse: + """ + Gets aggregated PR speed summary for the organization or a specific project. + + Use this method to: + + - Measure pull request lead time and review latency + - Calculate deployment frequency from merged pull requests + - Scope PR speed insights to a project, user, or team + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.UsageService/GetPrSummary", + body=maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_pr_summary_params.UsageGetPrSummaryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetPrSummaryResponse, + ) + + def get_pr_time_series( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + resolution: Resolution | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetPrTimeSeriesResponse: + """ + Gets PR speed metrics as a time series. + + Use this method to: + + - Chart pull request lead time, review latency, and deploy counts + - Select hourly, daily, weekly, or monthly buckets + - Scope PR speed insights to a project, user, or team + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + resolution: RESOLUTION_WEEKLY + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + resolution: Time resolution for the series data. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._post( + "/gitpod.v1.UsageService/GetPrTimeSeries", + body=maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "resolution": resolution, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_pr_time_series_params.UsageGetPrTimeSeriesParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetPrTimeSeriesResponse, + ) + + def list_environment_runtime_records( + self, + *, + token: str | Omit = omit, + page_size: int | Omit = omit, + filter: usage_list_environment_runtime_records_params.Filter | Omit = omit, + pagination: usage_list_environment_runtime_records_params.Pagination | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncRecordsPage[EnvironmentUsageRecord]: + """ + Lists completed environment runtime records within a specified date range. + + Returns a list of environment runtime records that were completed within the + specified date range. Records of currently running environments are not + included. + + Use this method to: + + - View environment runtime records + - Filter by project + - Create custom usage reports + + ### Example + + ```yaml + filter: + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-01-02T00:00:00Z" + pagination: + pageSize: 100 + ``` + + Args: + filter: Filter options. + + pagination: Pagination options. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/gitpod.v1.UsageService/ListEnvironmentUsageRecords", + page=SyncRecordsPage[EnvironmentUsageRecord], + body=maybe_transform( + { + "filter": filter, + "pagination": pagination, + }, + usage_list_environment_runtime_records_params.UsageListEnvironmentRuntimeRecordsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "token": token, + "page_size": page_size, + }, + usage_list_environment_runtime_records_params.UsageListEnvironmentRuntimeRecordsParams, + ), + ), + model=EnvironmentUsageRecord, + method="post", + ) + + +class AsyncUsageResource(AsyncAPIResource): + """ + UsageService provides usage information about environments, users, and projects. + """ + + @cached_property + def with_raw_response(self) -> AsyncUsageResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers + """ + return AsyncUsageResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncUsageResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response + """ + return AsyncUsageResourceWithStreamingResponse(self) + + async def get_adoption_usage_summary( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetAdoptionUsageSummaryResponse: + """ + Gets a summary of adoption and usage metrics. + + Returns all scalar values, trends, and a sparkline for the Adoption & Usage + insight category. For full-resolution time series, use the individual time + series RPCs. + + Use this method to: + + - Build adoption and usage insight cards + - Filter adoption metrics by project, user, or team + - Compare the requested date range against the previous period + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query metrics within. + + project_id: Optional project ID to filter metrics by. + + team_id: Optional team ID to scope results to members of a specific team. + + user_id: Optional user ID to filter metrics for a specific user (personal insights view). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.UsageService/GetAdoptionUsageSummary", + body=await async_maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_adoption_usage_summary_params.UsageGetAdoptionUsageSummaryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetAdoptionUsageSummaryResponse, + ) + + async def get_agent_trace_summary( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetAgentTraceSummaryResponse: + """ + Gets aggregated agent trace summary for the organization or a specific project. + + Use this method to: + + - Measure agent sessions and line changes + - Break down agent activity by model + - Scope agent trace insights to a project, user, or team + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. -__all__ = ["UsageResource", "AsyncUsageResource"] + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + extra_headers: Send extra headers -class UsageResource(SyncAPIResource): - """ - UsageService provides usage information about environments, users, and projects. - """ + extra_query: Add additional query parameters to the request - @cached_property - def with_raw_response(self) -> UsageResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. + extra_body: Add additional JSON properties to the request - For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers + timeout: Override the client-level default timeout for this request, in seconds """ - return UsageResourceWithRawResponse(self) + return await self._post( + "/gitpod.v1.UsageService/GetAgentTraceSummary", + body=await async_maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_agent_trace_summary_params.UsageGetAgentTraceSummaryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetAgentTraceSummaryResponse, + ) - @cached_property - def with_streaming_response(self) -> UsageResourceWithStreamingResponse: + async def get_agent_trace_time_series( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + resolution: Resolution | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetAgentTraceTimeSeriesResponse: """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. + Gets agent trace data as a time series. - For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response + Use this method to: + + - Chart agent sessions and line changes over time + - Select hourly, daily, weekly, or monthly buckets + - Scope agent trace insights to a project, user, or team + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + resolution: RESOLUTION_WEEKLY + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + resolution: Time resolution for the series data. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds """ - return UsageResourceWithStreamingResponse(self) + return await self._post( + "/gitpod.v1.UsageService/GetAgentTraceTimeSeries", + body=await async_maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "resolution": resolution, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_agent_trace_time_series_params.UsageGetAgentTraceTimeSeriesParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetAgentTraceTimeSeriesResponse, + ) - def list_environment_runtime_records( + async def get_co_author_summary( self, *, - token: str | Omit = omit, - page_size: int | Omit = omit, - filter: usage_list_environment_runtime_records_params.Filter | Omit = omit, - pagination: usage_list_environment_runtime_records_params.Pagination | Omit = omit, + date_range: DateRange, + project_id: str | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncRecordsPage[EnvironmentUsageRecord]: + ) -> UsageGetCoAuthorSummaryResponse: """ - Lists completed environment runtime records within a specified date range. - - Returns a list of environment runtime records that were completed within the - specified date range. Records of currently running environments are not - included. + Gets aggregated co-author summary for the organization or a specific project. Use this method to: - - View environment runtime records - - Filter by project - - Create custom usage reports + - Measure AI-assisted commits and line changes + - Scope co-author insights to a project, user, or team + - Compare the requested date range against the previous period ### Example ```yaml - filter: - projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" - dateRange: - startTime: "2024-01-01T00:00:00Z" - endTime: "2024-01-02T00:00:00Z" - pagination: - pageSize: 100 + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` Args: - filter: Filter options. + date_range: Date range to query within. - pagination: Pagination options. + project_id: Optional project ID to scope results. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. extra_headers: Send extra headers @@ -98,57 +924,236 @@ def list_environment_runtime_records( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( - "/gitpod.v1.UsageService/ListEnvironmentUsageRecords", - page=SyncRecordsPage[EnvironmentUsageRecord], - body=maybe_transform( + return await self._post( + "/gitpod.v1.UsageService/GetCoAuthorSummary", + body=await async_maybe_transform( { - "filter": filter, - "pagination": pagination, + "date_range": date_range, + "project_id": project_id, + "team_id": team_id, + "user_id": user_id, }, - usage_list_environment_runtime_records_params.UsageListEnvironmentRuntimeRecordsParams, + usage_get_co_author_summary_params.UsageGetCoAuthorSummaryParams, ), options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "token": token, - "page_size": page_size, - }, - usage_list_environment_runtime_records_params.UsageListEnvironmentRuntimeRecordsParams, - ), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - model=EnvironmentUsageRecord, - method="post", + cast_to=UsageGetCoAuthorSummaryResponse, ) + async def get_co_author_time_series( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + resolution: Resolution | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetCoAuthorTimeSeriesResponse: + """ + Gets co-author contribution data as a time series. + + Use this method to: -class AsyncUsageResource(AsyncAPIResource): - """ - UsageService provides usage information about environments, users, and projects. - """ + - Chart AI-assisted commits and line changes over time + - Select hourly, daily, weekly, or monthly buckets + - Scope co-author insights to a project, user, or team - @cached_property - def with_raw_response(self) -> AsyncUsageResourceWithRawResponse: + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + resolution: RESOLUTION_WEEKLY + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + resolution: Time resolution for the series data. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. + return await self._post( + "/gitpod.v1.UsageService/GetCoAuthorTimeSeries", + body=await async_maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "resolution": resolution, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_co_author_time_series_params.UsageGetCoAuthorTimeSeriesParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetCoAuthorTimeSeriesResponse, + ) - For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#accessing-raw-response-data-eg-headers + async def get_pr_summary( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetPrSummaryResponse: """ - return AsyncUsageResourceWithRawResponse(self) + Gets aggregated PR speed summary for the organization or a specific project. - @cached_property - def with_streaming_response(self) -> AsyncUsageResourceWithStreamingResponse: + Use this method to: + + - Measure pull request lead time and review latency + - Calculate deployment frequency from merged pull requests + - Scope PR speed insights to a project, user, or team + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. + return await self._post( + "/gitpod.v1.UsageService/GetPrSummary", + body=await async_maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_pr_summary_params.UsageGetPrSummaryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetPrSummaryResponse, + ) - For more information, see https://www.github.com/gitpod-io/gitpod-sdk-python#with_streaming_response + async def get_pr_time_series( + self, + *, + date_range: DateRange, + project_id: str | Omit = omit, + resolution: Resolution | Omit = omit, + team_id: str | Omit = omit, + user_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> UsageGetPrTimeSeriesResponse: """ - return AsyncUsageResourceWithStreamingResponse(self) + Gets PR speed metrics as a time series. + + Use this method to: + + - Chart pull request lead time, review latency, and deploy counts + - Select hourly, daily, weekly, or monthly buckets + - Scope PR speed insights to a project, user, or team + + ### Example + + ```yaml + dateRange: + startTime: "2024-01-01T00:00:00Z" + endTime: "2024-02-01T00:00:00Z" + resolution: RESOLUTION_WEEKLY + projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` + + Args: + date_range: Date range to query within. + + project_id: Optional project ID to scope results. + + resolution: Time resolution for the series data. + + team_id: Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + + user_id: Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/gitpod.v1.UsageService/GetPrTimeSeries", + body=await async_maybe_transform( + { + "date_range": date_range, + "project_id": project_id, + "resolution": resolution, + "team_id": team_id, + "user_id": user_id, + }, + usage_get_pr_time_series_params.UsageGetPrTimeSeriesParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=UsageGetPrTimeSeriesResponse, + ) def list_environment_runtime_records( self, @@ -234,6 +1239,27 @@ class UsageResourceWithRawResponse: def __init__(self, usage: UsageResource) -> None: self._usage = usage + self.get_adoption_usage_summary = to_raw_response_wrapper( + usage.get_adoption_usage_summary, + ) + self.get_agent_trace_summary = to_raw_response_wrapper( + usage.get_agent_trace_summary, + ) + self.get_agent_trace_time_series = to_raw_response_wrapper( + usage.get_agent_trace_time_series, + ) + self.get_co_author_summary = to_raw_response_wrapper( + usage.get_co_author_summary, + ) + self.get_co_author_time_series = to_raw_response_wrapper( + usage.get_co_author_time_series, + ) + self.get_pr_summary = to_raw_response_wrapper( + usage.get_pr_summary, + ) + self.get_pr_time_series = to_raw_response_wrapper( + usage.get_pr_time_series, + ) self.list_environment_runtime_records = to_raw_response_wrapper( usage.list_environment_runtime_records, ) @@ -243,6 +1269,27 @@ class AsyncUsageResourceWithRawResponse: def __init__(self, usage: AsyncUsageResource) -> None: self._usage = usage + self.get_adoption_usage_summary = async_to_raw_response_wrapper( + usage.get_adoption_usage_summary, + ) + self.get_agent_trace_summary = async_to_raw_response_wrapper( + usage.get_agent_trace_summary, + ) + self.get_agent_trace_time_series = async_to_raw_response_wrapper( + usage.get_agent_trace_time_series, + ) + self.get_co_author_summary = async_to_raw_response_wrapper( + usage.get_co_author_summary, + ) + self.get_co_author_time_series = async_to_raw_response_wrapper( + usage.get_co_author_time_series, + ) + self.get_pr_summary = async_to_raw_response_wrapper( + usage.get_pr_summary, + ) + self.get_pr_time_series = async_to_raw_response_wrapper( + usage.get_pr_time_series, + ) self.list_environment_runtime_records = async_to_raw_response_wrapper( usage.list_environment_runtime_records, ) @@ -252,6 +1299,27 @@ class UsageResourceWithStreamingResponse: def __init__(self, usage: UsageResource) -> None: self._usage = usage + self.get_adoption_usage_summary = to_streamed_response_wrapper( + usage.get_adoption_usage_summary, + ) + self.get_agent_trace_summary = to_streamed_response_wrapper( + usage.get_agent_trace_summary, + ) + self.get_agent_trace_time_series = to_streamed_response_wrapper( + usage.get_agent_trace_time_series, + ) + self.get_co_author_summary = to_streamed_response_wrapper( + usage.get_co_author_summary, + ) + self.get_co_author_time_series = to_streamed_response_wrapper( + usage.get_co_author_time_series, + ) + self.get_pr_summary = to_streamed_response_wrapper( + usage.get_pr_summary, + ) + self.get_pr_time_series = to_streamed_response_wrapper( + usage.get_pr_time_series, + ) self.list_environment_runtime_records = to_streamed_response_wrapper( usage.list_environment_runtime_records, ) @@ -261,6 +1329,27 @@ class AsyncUsageResourceWithStreamingResponse: def __init__(self, usage: AsyncUsageResource) -> None: self._usage = usage + self.get_adoption_usage_summary = async_to_streamed_response_wrapper( + usage.get_adoption_usage_summary, + ) + self.get_agent_trace_summary = async_to_streamed_response_wrapper( + usage.get_agent_trace_summary, + ) + self.get_agent_trace_time_series = async_to_streamed_response_wrapper( + usage.get_agent_trace_time_series, + ) + self.get_co_author_summary = async_to_streamed_response_wrapper( + usage.get_co_author_summary, + ) + self.get_co_author_time_series = async_to_streamed_response_wrapper( + usage.get_co_author_time_series, + ) + self.get_pr_summary = async_to_streamed_response_wrapper( + usage.get_pr_summary, + ) + self.get_pr_time_series = async_to_streamed_response_wrapper( + usage.get_pr_time_series, + ) self.list_environment_runtime_records = async_to_streamed_response_wrapper( usage.list_environment_runtime_records, ) diff --git a/src/gitpod/types/__init__.py b/src/gitpod/types/__init__.py index 4f9dca65..ebfececa 100644 --- a/src/gitpod/types/__init__.py +++ b/src/gitpod/types/__init__.py @@ -19,6 +19,7 @@ Gateway as Gateway, Subject as Subject, TaskSpec as TaskSpec, + DateRange as DateRange, ErrorCode as ErrorCode, Principal as Principal, SecretRef as SecretRef, @@ -28,7 +29,10 @@ ResourceRole as ResourceRole, ResourceType as ResourceType, TaskMetadata as TaskMetadata, + CodexSettings as CodexSettings, TaskExecution as TaskExecution, + CodexOpenAIModel as CodexOpenAIModel, + CodexServiceTier as CodexServiceTier, EnvironmentClass as EnvironmentClass, OrganizationRole as OrganizationRole, OrganizationTier as OrganizationTier, @@ -36,6 +40,8 @@ TaskExecutionSpec as TaskExecutionSpec, TaskExecutionPhase as TaskExecutionPhase, TaskExecutionStatus as TaskExecutionStatus, + CodexReasoningEffort as CodexReasoningEffort, + KernelControlsAction as KernelControlsAction, CountResponseRelation as CountResponseRelation, TaskExecutionMetadata as TaskExecutionMetadata, EnvironmentVariableItem as EnvironmentVariableItem, @@ -43,15 +49,19 @@ EnvironmentVariableSource as EnvironmentVariableSource, ) from .account import Account as Account +from .process import Process as Process from .project import Project as Project from .prebuild import Prebuild as Prebuild from .workflow import Workflow as Workflow from .log_level import LogLevel as LogLevel from .warm_pool import WarmPool as WarmPool from .agent_mode import AgentMode as AgentMode +from .pr_summary import PrSummary as PrSummary +from .resolution import Resolution as Resolution +from .usage_type import UsageType as UsageType from .veto_param import VetoParam as VetoParam from .environment import Environment as Environment -from .error_level import ErrorLevel as ErrorLevel +from .goal_status import GoalStatus as GoalStatus from .prompt_spec import PromptSpec as PromptSpec from .runner_kind import RunnerKind as RunnerKind from .runner_spec import RunnerSpec as RunnerSpec @@ -65,21 +75,27 @@ from .runner_status import RunnerStatus as RunnerStatus from .update_window import UpdateWindow as UpdateWindow from .workflow_step import WorkflowStep as WorkflowStep +from .co_author_tool import CoAuthorTool as CoAuthorTool from .editor_version import EditorVersion as EditorVersion from .invite_domains import InviteDomains as InviteDomains from .login_provider import LoginProvider as LoginProvider +from .pr_time_bucket import PrTimeBucket as PrTimeBucket from .prebuild_phase import PrebuildPhase as PrebuildPhase from .runner_variant import RunnerVariant as RunnerVariant +from .tool_breakdown import ToolBreakdown as ToolBreakdown from .warm_pool_spec import WarmPoolSpec as WarmPoolSpec from .admission_level import AdmissionLevel as AdmissionLevel from .agent_execution import AgentExecution as AgentExecution from .bpf_debug_level import BpfDebugLevel as BpfDebugLevel +from .credits_by_type import CreditsByType as CreditsByType from .prebuild_status import PrebuildStatus as PrebuildStatus from .prompt_metadata import PromptMetadata as PromptMetadata from .runner_provider import RunnerProvider as RunnerProvider +from .security_policy import SecurityPolicy as SecurityPolicy +from .supported_model import SupportedModel as SupportedModel from .warm_pool_phase import WarmPoolPhase as WarmPoolPhase from .workflow_action import WorkflowAction as WorkflowAction -from .breadcrumb_param import BreadcrumbParam as BreadcrumbParam +from .billing_currency import BillingCurrency as BillingCurrency from .environment_role import EnvironmentRole as EnvironmentRole from .environment_spec import EnvironmentSpec as EnvironmentSpec from .id_token_version import IDTokenVersion as IDTokenVersion @@ -88,20 +104,22 @@ from .wake_event_param import WakeEventParam as WakeEventParam from .warm_pool_status import WarmPoolStatus as WarmPoolStatus from .workflow_trigger import WorkflowTrigger as WorkflowTrigger +from .co_author_summary import CoAuthorSummary as CoAuthorSummary from .environment_phase import EnvironmentPhase as EnvironmentPhase -from .error_event_param import ErrorEventParam as ErrorEventParam from .event_list_params import EventListParams as EventListParams from .group_list_params import GroupListParams as GroupListParams from .prebuild_metadata import PrebuildMetadata as PrebuildMetadata from .runner_capability import RunnerCapability as RunnerCapability from .runner_spec_param import RunnerSpecParam as RunnerSpecParam -from .stack_frame_param import StackFrameParam as StackFrameParam +from .team_credit_usage import TeamCreditUsage as TeamCreditUsage +from .time_series_point import TimeSeriesPoint as TimeSeriesPoint +from .user_credit_usage import UserCreditUsage as UserCreditUsage from .account_membership import AccountMembership as AccountMembership from .agent_code_context import AgentCodeContext as AgentCodeContext +from .daily_credit_usage import DailyCreditUsage as DailyCreditUsage from .editor_list_params import EditorListParams as EditorListParams from .environment_status import EnvironmentStatus as EnvironmentStatus from .event_watch_params import EventWatchParams as EventWatchParams -from .request_info_param import RequestInfoParam as RequestInfoParam from .resource_operation import ResourceOperation as ResourceOperation from .runner_list_params import RunnerListParams as RunnerListParams from .secret_list_params import SecretListParams as SecretListParams @@ -109,6 +127,8 @@ from .warm_pool_metadata import WarmPoolMetadata as WarmPoolMetadata from .workflow_execution import WorkflowExecution as WorkflowExecution from .agent_message_param import AgentMessageParam as AgentMessageParam +from .agent_trace_summary import AgentTraceSummary as AgentTraceSummary +from .enterprise_ai_usage import EnterpriseAIUsage as EnterpriseAIUsage from .event_list_response import EventListResponse as EventListResponse from .gateway_list_params import GatewayListParams as GatewayListParams from .group_create_params import GroupCreateParams as GroupCreateParams @@ -122,7 +142,6 @@ from .workflow_step_param import WorkflowStepParam as WorkflowStepParam from .environment_metadata import EnvironmentMetadata as EnvironmentMetadata from .event_watch_response import EventWatchResponse as EventWatchResponse -from .exception_info_param import ExceptionInfoParam as ExceptionInfoParam from .invite_domains_param import InviteDomainsParam as InviteDomainsParam from .prebuild_list_params import PrebuildListParams as PrebuildListParams from .runner_configuration import RunnerConfiguration as RunnerConfiguration @@ -133,6 +152,8 @@ from .secret_delete_params import SecretDeleteParams as SecretDeleteParams from .user_get_user_params import UserGetUserParams as UserGetUserParams from .account_delete_params import AccountDeleteParams as AccountDeleteParams +from .co_author_time_bucket import CoAuthorTimeBucket as CoAuthorTimeBucket +from .event_retrieve_params import EventRetrieveParams as EventRetrieveParams from .group_create_response import GroupCreateResponse as GroupCreateResponse from .group_retrieve_params import GroupRetrieveParams as GroupRetrieveParams from .group_update_response import GroupUpdateResponse as GroupUpdateResponse @@ -153,13 +174,18 @@ from .runner_release_channel import RunnerReleaseChannel as RunnerReleaseChannel from .runner_retrieve_params import RunnerRetrieveParams as RunnerRetrieveParams from .secret_create_response import SecretCreateResponse as SecretCreateResponse +from .user_cost_budget_usage import UserCostBudgetUsage as UserCostBudgetUsage from .user_get_user_response import UserGetUserResponse as UserGetUserResponse from .user_input_block_param import UserInputBlockParam as UserInputBlockParam from .workflow_trigger_param import WorkflowTriggerParam as WorkflowTriggerParam from .account_retrieve_params import AccountRetrieveParams as AccountRetrieveParams +from .agent_trace_time_bucket import AgentTraceTimeBucket as AgentTraceTimeBucket +from .audit_log_entry_details import AuditLogEntryDetails as AuditLogEntryDetails +from .cumulative_credit_usage import CumulativeCreditUsage as CumulativeCreditUsage from .environment_initializer import EnvironmentInitializer as EnvironmentInitializer from .environment_list_params import EnvironmentListParams as EnvironmentListParams from .environment_stop_params import EnvironmentStopParams as EnvironmentStopParams +from .event_retrieve_response import EventRetrieveResponse as EventRetrieveResponse from .group_retrieve_response import GroupRetrieveResponse as GroupRetrieveResponse from .project_create_response import ProjectCreateResponse as ProjectCreateResponse from .project_retrieve_params import ProjectRetrieveParams as ProjectRetrieveParams @@ -171,6 +197,7 @@ from .automation_delete_params import AutomationDeleteParams as AutomationDeleteParams from .automation_update_params import AutomationUpdateParams as AutomationUpdateParams from .editor_retrieve_response import EditorRetrieveResponse as EditorRetrieveResponse +from .environment_credit_usage import EnvironmentCreditUsage as EnvironmentCreditUsage from .environment_start_params import EnvironmentStartParams as EnvironmentStartParams from .environment_usage_record import EnvironmentUsageRecord as EnvironmentUsageRecord from .organization_join_params import OrganizationJoinParams as OrganizationJoinParams @@ -178,14 +205,19 @@ from .prebuild_create_response import PrebuildCreateResponse as PrebuildCreateResponse from .prebuild_retrieve_params import PrebuildRetrieveParams as PrebuildRetrieveParams from .runner_retrieve_response import RunnerRetrieveResponse as RunnerRetrieveResponse +from .team_enterprise_ai_usage import TeamEnterpriseAIUsage as TeamEnterpriseAIUsage +from .user_credit_budget_usage import UserCreditBudgetUsage as UserCreditBudgetUsage +from .user_enterprise_ai_usage import UserEnterpriseAIUsage as UserEnterpriseAIUsage from .workflow_trigger_context import WorkflowTriggerContext as WorkflowTriggerContext from .account_retrieve_response import AccountRetrieveResponse as AccountRetrieveResponse from .agent_list_prompts_params import AgentListPromptsParams as AgentListPromptsParams +from .byok_rate_card_token_type import ByokRateCardTokenType as ByokRateCardTokenType +from .daily_enterprise_ai_usage import DailyEnterpriseAIUsage as DailyEnterpriseAIUsage from .editor_resolve_url_params import EditorResolveURLParams as EditorResolveURLParams +from .enterprise_ai_token_usage import EnterpriseAITokenUsage as EnterpriseAITokenUsage from .environment_create_params import EnvironmentCreateParams as EnvironmentCreateParams from .environment_delete_params import EnvironmentDeleteParams as EnvironmentDeleteParams from .environment_update_params import EnvironmentUpdateParams as EnvironmentUpdateParams -from .exception_mechanism_param import ExceptionMechanismParam as ExceptionMechanismParam from .organization_leave_params import OrganizationLeaveParams as OrganizationLeaveParams from .project_retrieve_response import ProjectRetrieveResponse as ProjectRetrieveResponse from .recommended_editors_param import RecommendedEditorsParam as RecommendedEditorsParam @@ -198,7 +230,7 @@ from .automation_create_response import AutomationCreateResponse as AutomationCreateResponse from .automation_retrieve_params import AutomationRetrieveParams as AutomationRetrieveParams from .automation_update_response import AutomationUpdateResponse as AutomationUpdateResponse -from .error_report_errors_params import ErrorReportErrorsParams as ErrorReportErrorsParams +from .enterprise_ai_usage_budget import EnterpriseAIUsageBudget as EnterpriseAIUsageBudget from .organization_create_params import OrganizationCreateParams as OrganizationCreateParams from .organization_delete_params import OrganizationDeleteParams as OrganizationDeleteParams from .organization_join_response import OrganizationJoinResponse as OrganizationJoinResponse @@ -210,17 +242,23 @@ from .runner_configuration_param import RunnerConfigurationParam as RunnerConfigurationParam from .secret_update_value_params import SecretUpdateValueParams as SecretUpdateValueParams from .agent_stop_execution_params import AgentStopExecutionParams as AgentStopExecutionParams +from .agent_trace_model_breakdown import AgentTraceModelBreakdown as AgentTraceModelBreakdown from .editor_resolve_url_response import EditorResolveURLResponse as EditorResolveURLResponse from .environment_activity_signal import EnvironmentActivitySignal as EnvironmentActivitySignal from .environment_create_response import EnvironmentCreateResponse as EnvironmentCreateResponse from .environment_retrieve_params import EnvironmentRetrieveParams as EnvironmentRetrieveParams from .metrics_configuration_param import MetricsConfigurationParam as MetricsConfigurationParam +from .security_policy_list_params import SecurityPolicyListParams as SecurityPolicyListParams +from .usage_get_pr_summary_params import UsageGetPrSummaryParams as UsageGetPrSummaryParams from .agent_create_prompt_response import AgentCreatePromptResponse as AgentCreatePromptResponse +from .agent_execution_credit_usage import AgentExecutionCreditUsage as AgentExecutionCreditUsage from .agent_list_executions_params import AgentListExecutionsParams as AgentListExecutionsParams from .agent_retrieve_prompt_params import AgentRetrievePromptParams as AgentRetrievePromptParams from .agent_start_execution_params import AgentStartExecutionParams as AgentStartExecutionParams from .agent_update_prompt_response import AgentUpdatePromptResponse as AgentUpdatePromptResponse from .automation_retrieve_response import AutomationRetrieveResponse as AutomationRetrieveResponse +from .credit_usage_export_group_by import CreditUsageExportGroupBy as CreditUsageExportGroupBy +from .enterprise_ai_usage_by_model import EnterpriseAIUsageByModel as EnterpriseAIUsageByModel from .environment_unarchive_params import EnvironmentUnarchiveParams as EnvironmentUnarchiveParams from .identity_get_id_token_params import IdentityGetIDTokenParams as IdentityGetIDTokenParams from .kernel_controls_config_param import KernelControlsConfigParam as KernelControlsConfigParam @@ -231,9 +269,14 @@ from .project_bulk_create_response import ProjectBulkCreateResponse as ProjectBulkCreateResponse from .project_bulk_delete_response import ProjectBulkDeleteResponse as ProjectBulkDeleteResponse from .project_bulk_update_response import ProjectBulkUpdateResponse as ProjectBulkUpdateResponse +from .team_cumulative_credit_usage import TeamCumulativeCreditUsage as TeamCumulativeCreditUsage from .agent_delete_execution_params import AgentDeleteExecutionParams as AgentDeleteExecutionParams from .environment_initializer_param import EnvironmentInitializerParam as EnvironmentInitializerParam from .environment_retrieve_response import EnvironmentRetrieveResponse as EnvironmentRetrieveResponse +from .security_policy_create_params import SecurityPolicyCreateParams as SecurityPolicyCreateParams +from .security_policy_delete_params import SecurityPolicyDeleteParams as SecurityPolicyDeleteParams +from .security_policy_update_params import SecurityPolicyUpdateParams as SecurityPolicyUpdateParams +from .usage_get_pr_summary_response import UsageGetPrSummaryResponse as UsageGetPrSummaryResponse from .account_list_sso_logins_params import AccountListSSOLoginsParams as AccountListSSOLoginsParams from .agent_retrieve_prompt_response import AgentRetrievePromptResponse as AgentRetrievePromptResponse from .agent_send_to_execution_params import AgentSendToExecutionParams as AgentSendToExecutionParams @@ -248,8 +291,13 @@ from .prebuild_list_warm_pools_params import PrebuildListWarmPoolsParams as PrebuildListWarmPoolsParams from .runner_create_logs_token_params import RunnerCreateLogsTokenParams as RunnerCreateLogsTokenParams from .runner_parse_context_url_params import RunnerParseContextURLParams as RunnerParseContextURLParams +from .security_policy_create_response import SecurityPolicyCreateResponse as SecurityPolicyCreateResponse +from .security_policy_retrieve_params import SecurityPolicyRetrieveParams as SecurityPolicyRetrieveParams +from .security_policy_update_response import SecurityPolicyUpdateResponse as SecurityPolicyUpdateResponse +from .usage_get_pr_time_series_params import UsageGetPrTimeSeriesParams as UsageGetPrTimeSeriesParams from .account_get_sso_login_url_params import AccountGetSSOLoginURLParams as AccountGetSSOLoginURLParams from .account_list_sso_logins_response import AccountListSSOLoginsResponse as AccountListSSOLoginsResponse +from .credit_usage_report_filter_param import CreditUsageReportFilterParam as CreditUsageReportFilterParam from .identity_exchange_token_response import IdentityExchangeTokenResponse as IdentityExchangeTokenResponse from .organization_list_members_params import OrganizationListMembersParams as OrganizationListMembersParams from .prebuild_create_warm_pool_params import PrebuildCreateWarmPoolParams as PrebuildCreateWarmPoolParams @@ -258,17 +306,22 @@ from .agent_retrieve_execution_response import AgentRetrieveExecutionResponse as AgentRetrieveExecutionResponse from .automation_list_executions_params import AutomationListExecutionsParams as AutomationListExecutionsParams from .automation_start_execution_params import AutomationStartExecutionParams as AutomationStartExecutionParams +from .enterprise_ai_usage_budget_source import EnterpriseAIUsageBudgetSource as EnterpriseAIUsageBudgetSource +from .enterprise_ai_usage_by_token_type import EnterpriseAIUsageByTokenType as EnterpriseAIUsageByTokenType from .environment_activity_signal_param import EnvironmentActivitySignalParam as EnvironmentActivitySignalParam from .prebuild_create_logs_token_params import PrebuildCreateLogsTokenParams as PrebuildCreateLogsTokenParams from .runner_create_logs_token_response import RunnerCreateLogsTokenResponse as RunnerCreateLogsTokenResponse from .runner_create_runner_token_params import RunnerCreateRunnerTokenParams as RunnerCreateRunnerTokenParams from .runner_parse_context_url_response import RunnerParseContextURLResponse as RunnerParseContextURLResponse from .runner_search_repositories_params import RunnerSearchRepositoriesParams as RunnerSearchRepositoriesParams +from .security_policy_retrieve_response import SecurityPolicyRetrieveResponse as SecurityPolicyRetrieveResponse +from .usage_get_pr_time_series_response import UsageGetPrTimeSeriesResponse as UsageGetPrTimeSeriesResponse from .account_get_sso_login_url_response import AccountGetSSOLoginURLResponse as AccountGetSSOLoginURLResponse from .automation_cancel_execution_params import AutomationCancelExecutionParams as AutomationCancelExecutionParams from .prebuild_create_warm_pool_response import PrebuildCreateWarmPoolResponse as PrebuildCreateWarmPoolResponse from .prebuild_retrieve_warm_pool_params import PrebuildRetrieveWarmPoolParams as PrebuildRetrieveWarmPoolParams from .prebuild_update_warm_pool_response import PrebuildUpdateWarmPoolResponse as PrebuildUpdateWarmPoolResponse +from .usage_get_co_author_summary_params import UsageGetCoAuthorSummaryParams as UsageGetCoAuthorSummaryParams from .user_get_authenticated_user_params import UserGetAuthenticatedUserParams as UserGetAuthenticatedUserParams from .account_list_login_providers_params import AccountListLoginProvidersParams as AccountListLoginProvidersParams from .automation_start_execution_response import AutomationStartExecutionResponse as AutomationStartExecutionResponse @@ -280,6 +333,8 @@ from .prebuild_retrieve_warm_pool_response import PrebuildRetrieveWarmPoolResponse as PrebuildRetrieveWarmPoolResponse from .project_prebuild_configuration_param import ProjectPrebuildConfigurationParam as ProjectPrebuildConfigurationParam from .runner_list_scm_organizations_params import RunnerListScmOrganizationsParams as RunnerListScmOrganizationsParams +from .usage_get_agent_trace_summary_params import UsageGetAgentTraceSummaryParams as UsageGetAgentTraceSummaryParams +from .usage_get_co_author_summary_response import UsageGetCoAuthorSummaryResponse as UsageGetCoAuthorSummaryResponse from .user_get_authenticated_user_response import UserGetAuthenticatedUserResponse as UserGetAuthenticatedUserResponse from .runner_check_repository_access_params import ( RunnerCheckRepositoryAccessParams as RunnerCheckRepositoryAccessParams, @@ -287,6 +342,12 @@ from .automation_retrieve_execution_response import ( AutomationRetrieveExecutionResponse as AutomationRetrieveExecutionResponse, ) +from .billing_get_credit_usage_export_params import ( + BillingGetCreditUsageExportParams as BillingGetCreditUsageExportParams, +) +from .billing_get_credit_usage_report_params import ( + BillingGetCreditUsageReportParams as BillingGetCreditUsageReportParams, +) from .environment_create_from_project_params import ( EnvironmentCreateFromProjectParams as EnvironmentCreateFromProjectParams, ) @@ -299,33 +360,64 @@ from .runner_list_scm_organizations_response import ( RunnerListScmOrganizationsResponse as RunnerListScmOrganizationsResponse, ) +from .usage_get_agent_trace_summary_response import ( + UsageGetAgentTraceSummaryResponse as UsageGetAgentTraceSummaryResponse, +) +from .usage_get_co_author_time_series_params import UsageGetCoAuthorTimeSeriesParams as UsageGetCoAuthorTimeSeriesParams +from .enterprise_ai_user_budget_policy_source import ( + EnterpriseAIUserBudgetPolicySource as EnterpriseAIUserBudgetPolicySource, +) from .runner_check_repository_access_response import ( RunnerCheckRepositoryAccessResponse as RunnerCheckRepositoryAccessResponse, ) +from .usage_get_adoption_usage_summary_params import ( + UsageGetAdoptionUsageSummaryParams as UsageGetAdoptionUsageSummaryParams, +) from .automation_list_execution_actions_params import ( AutomationListExecutionActionsParams as AutomationListExecutionActionsParams, ) from .automation_list_execution_outputs_params import ( AutomationListExecutionOutputsParams as AutomationListExecutionOutputsParams, ) +from .billing_get_credit_usage_export_response import ( + BillingGetCreditUsageExportResponse as BillingGetCreditUsageExportResponse, +) +from .billing_get_credit_usage_report_response import ( + BillingGetCreditUsageReportResponse as BillingGetCreditUsageReportResponse, +) from .environment_create_from_project_response import ( EnvironmentCreateFromProjectResponse as EnvironmentCreateFromProjectResponse, ) from .project_create_from_environment_response import ( ProjectCreateFromEnvironmentResponse as ProjectCreateFromEnvironmentResponse, ) +from .usage_get_agent_trace_time_series_params import ( + UsageGetAgentTraceTimeSeriesParams as UsageGetAgentTraceTimeSeriesParams, +) +from .usage_get_co_author_time_series_response import ( + UsageGetCoAuthorTimeSeriesResponse as UsageGetCoAuthorTimeSeriesResponse, +) from .automation_cancel_execution_action_params import ( AutomationCancelExecutionActionParams as AutomationCancelExecutionActionParams, ) +from .usage_get_adoption_usage_summary_response import ( + UsageGetAdoptionUsageSummaryResponse as UsageGetAdoptionUsageSummaryResponse, +) from .account_list_joinable_organizations_params import ( AccountListJoinableOrganizationsParams as AccountListJoinableOrganizationsParams, ) from .automation_list_execution_outputs_response import ( AutomationListExecutionOutputsResponse as AutomationListExecutionOutputsResponse, ) +from .billing_get_cumulative_credit_usage_params import ( + BillingGetCumulativeCreditUsageParams as BillingGetCumulativeCreditUsageParams, +) from .identity_get_authenticated_identity_params import ( IdentityGetAuthenticatedIdentityParams as IdentityGetAuthenticatedIdentityParams, ) +from .usage_get_agent_trace_time_series_response import ( + UsageGetAgentTraceTimeSeriesResponse as UsageGetAgentTraceTimeSeriesResponse, +) from .automation_retrieve_execution_action_params import ( AutomationRetrieveExecutionActionParams as AutomationRetrieveExecutionActionParams, ) @@ -335,6 +427,18 @@ from .runner_check_authentication_for_host_params import ( RunnerCheckAuthenticationForHostParams as RunnerCheckAuthenticationForHostParams, ) +from .billing_get_cumulative_credit_usage_response import ( + BillingGetCumulativeCreditUsageResponse as BillingGetCumulativeCreditUsageResponse, +) +from .billing_list_enterprise_ai_team_usage_params import ( + BillingListEnterpriseAITeamUsageParams as BillingListEnterpriseAITeamUsageParams, +) +from .billing_list_enterprise_ai_user_usage_params import ( + BillingListEnterpriseAIUserUsageParams as BillingListEnterpriseAIUserUsageParams, +) +from .enterprise_ai_usage_time_series_filter_param import ( + EnterpriseAIUsageTimeSeriesFilterParam as EnterpriseAIUsageTimeSeriesFilterParam, +) from .identity_get_authenticated_identity_response import ( IdentityGetAuthenticatedIdentityResponse as IdentityGetAuthenticatedIdentityResponse, ) @@ -350,9 +454,24 @@ from .usage_list_environment_runtime_records_params import ( UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams, ) +from .billing_get_enterprise_ai_usage_summary_params import ( + BillingGetEnterpriseAIUsageSummaryParams as BillingGetEnterpriseAIUsageSummaryParams, +) from .agent_create_execution_conversation_token_params import ( AgentCreateExecutionConversationTokenParams as AgentCreateExecutionConversationTokenParams, ) +from .billing_get_enterprise_ai_usage_summary_response import ( + BillingGetEnterpriseAIUsageSummaryResponse as BillingGetEnterpriseAIUsageSummaryResponse, +) +from .billing_list_enterprise_user_credit_usage_params import ( + BillingListEnterpriseUserCreditUsageParams as BillingListEnterpriseUserCreditUsageParams, +) from .agent_create_execution_conversation_token_response import ( AgentCreateExecutionConversationTokenResponse as AgentCreateExecutionConversationTokenResponse, ) +from .billing_get_enterprise_ai_usage_time_series_params import ( + BillingGetEnterpriseAIUsageTimeSeriesParams as BillingGetEnterpriseAIUsageTimeSeriesParams, +) +from .billing_get_enterprise_ai_usage_time_series_response import ( + BillingGetEnterpriseAIUsageTimeSeriesResponse as BillingGetEnterpriseAIUsageTimeSeriesResponse, +) diff --git a/src/gitpod/types/agent_execution.py b/src/gitpod/types/agent_execution.py index 206c3faf..50b6a760 100644 --- a/src/gitpod/types/agent_execution.py +++ b/src/gitpod/types/agent_execution.py @@ -8,7 +8,9 @@ from .._models import BaseModel from .agent_mode import AgentMode +from .goal_status import GoalStatus from .shared.subject import Subject +from .supported_model import SupportedModel from .agent_code_context import AgentCodeContext __all__ = [ @@ -16,7 +18,6 @@ "Metadata", "Spec", "SpecLimits", - "SpecLoopCondition", "Status", "StatusCurrentOperation", "StatusCurrentOperationLlm", @@ -248,14 +249,6 @@ class SpecLimits(BaseModel): max_output_tokens: Optional[str] = FieldInfo(alias="maxOutputTokens", default=None) -class SpecLoopCondition(BaseModel): - id: Optional[str] = None - - description: Optional[str] = None - - expression: Optional[str] = None - - class Spec(BaseModel): """ Spec is the configuration of the agent that's required for the @@ -273,8 +266,6 @@ class Spec(BaseModel): limits: Optional[SpecLimits] = None - loop_conditions: Optional[List[SpecLoopCondition]] = FieldInfo(alias="loopConditions", default=None) - session: Optional[str] = None spec_version: Optional[str] = FieldInfo(alias="specVersion", default=None) @@ -310,27 +301,31 @@ class StatusCurrentOperation(BaseModel): class StatusGoal(BaseModel): - """goal projects the current native Codex thread goal, if any.""" + """goal projects the current agent goal, if any.""" + + created_at: Optional[datetime] = FieldInfo(alias="createdAt", default=None) + """created_at is when the current goal was created, when available.""" objective: Optional[str] = None + """objective is the current goal text tracked by the agent.""" + + status: Optional[GoalStatus] = None + """status is the lifecycle state of the current goal.""" + + time_used: Optional[str] = FieldInfo(alias="timeUsed", default=None) + """time_used is the elapsed wall-clock time reported by the agent for this goal.""" + + token_budget: Optional[str] = FieldInfo(alias="tokenBudget", default=None) """ - objective is the current goal text tracked by the native Codex thread-goal - subsystem. + token_budget is the token budget reported by the agent for this goal, when one + exists. """ - status: Optional[ - Literal[ - "GOAL_STATUS_UNSPECIFIED", - "GOAL_STATUS_ACTIVE", - "GOAL_STATUS_PAUSED", - "GOAL_STATUS_COMPLETED", - "GOAL_STATUS_BUDGET_EXHAUSTED", - ] - ] = None - """status is the lifecycle state of the current goal.""" + tokens_used: Optional[str] = FieldInfo(alias="tokensUsed", default=None) + """tokens_used is the token usage reported by the agent for this goal.""" updated_at: Optional[datetime] = FieldInfo(alias="updatedAt", default=None) - """updated_at is the most recent native goal update timestamp, when available.""" + """updated_at is the most recent goal update timestamp, when available.""" class StatusMcpIntegrationStatus(BaseModel): @@ -419,7 +414,7 @@ class Status(BaseModel): """failure_reason contains a structured reason code for the failure.""" goal: Optional[StatusGoal] = None - """goal projects the current native Codex thread goal, if any.""" + """goal projects the current agent goal, if any.""" input_tokens_used: Optional[str] = FieldInfo(alias="inputTokensUsed", default=None) @@ -465,33 +460,7 @@ class Status(BaseModel): b.status_version then a was the status before b. """ - supported_model: Optional[ - Literal[ - "SUPPORTED_MODEL_UNSPECIFIED", - "SUPPORTED_MODEL_SONNET_3_5", - "SUPPORTED_MODEL_SONNET_3_7", - "SUPPORTED_MODEL_SONNET_3_7_EXTENDED", - "SUPPORTED_MODEL_SONNET_4", - "SUPPORTED_MODEL_SONNET_4_EXTENDED", - "SUPPORTED_MODEL_SONNET_4_5", - "SUPPORTED_MODEL_SONNET_4_5_EXTENDED", - "SUPPORTED_MODEL_SONNET_4_6", - "SUPPORTED_MODEL_SONNET_4_6_EXTENDED", - "SUPPORTED_MODEL_OPUS_4", - "SUPPORTED_MODEL_OPUS_4_EXTENDED", - "SUPPORTED_MODEL_OPUS_4_5", - "SUPPORTED_MODEL_OPUS_4_5_EXTENDED", - "SUPPORTED_MODEL_OPUS_4_6", - "SUPPORTED_MODEL_OPUS_4_6_EXTENDED", - "SUPPORTED_MODEL_OPUS_4_7", - "SUPPORTED_MODEL_HAIKU_4_5", - "SUPPORTED_MODEL_OPENAI_4O", - "SUPPORTED_MODEL_OPENAI_4O_MINI", - "SUPPORTED_MODEL_OPENAI_O1", - "SUPPORTED_MODEL_OPENAI_O1_MINI", - "SUPPORTED_MODEL_OPENAI_AUTO", - ] - ] = FieldInfo(alias="supportedModel", default=None) + supported_model: Optional[SupportedModel] = FieldInfo(alias="supportedModel", default=None) """supported_model is the LLM model being used by the agent execution.""" transcript_url: Optional[str] = FieldInfo(alias="transcriptUrl", default=None) diff --git a/src/gitpod/types/agent_execution_credit_usage.py b/src/gitpod/types/agent_execution_credit_usage.py new file mode 100644 index 00000000..bac02f1c --- /dev/null +++ b/src/gitpod/types/agent_execution_credit_usage.py @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .credits_by_type import CreditsByType + +__all__ = ["AgentExecutionCreditUsage"] + + +class AgentExecutionCreditUsage(BaseModel): + """ + AgentExecutionCreditUsage contains a single agent execution's credit usage for a day, broken down by type. + """ + + agent_execution_id: Optional[str] = FieldInfo(alias="agentExecutionId", default=None) + """Empty when representing the "Others" aggregation bucket.""" + + display_name: Optional[str] = FieldInfo(alias="displayName", default=None) + + usage: Optional[List[CreditsByType]] = None diff --git a/src/gitpod/types/agent_list_executions_params.py b/src/gitpod/types/agent_list_executions_params.py index f139d42c..096c97f1 100644 --- a/src/gitpod/types/agent_list_executions_params.py +++ b/src/gitpod/types/agent_list_executions_params.py @@ -22,6 +22,12 @@ class AgentListExecutionsParams(TypedDict, total=False): class Filter(TypedDict, total=False): + agent_execution_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="agentExecutionIds")] + """ + agent_execution_ids filters the response to only the specified executions. + Useful for checking existence of a known set of execution IDs. + """ + agent_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="agentIds")] annotations: Dict[str, str] diff --git a/src/gitpod/types/agent_mode.py b/src/gitpod/types/agent_mode.py index a58c3798..b668b79b 100644 --- a/src/gitpod/types/agent_mode.py +++ b/src/gitpod/types/agent_mode.py @@ -5,5 +5,10 @@ __all__ = ["AgentMode"] AgentMode: TypeAlias = Literal[ - "AGENT_MODE_UNSPECIFIED", "AGENT_MODE_EXECUTION", "AGENT_MODE_PLANNING", "AGENT_MODE_RALPH", "AGENT_MODE_SPEC" + "AGENT_MODE_UNSPECIFIED", + "AGENT_MODE_EXECUTION", + "AGENT_MODE_PLANNING", + "AGENT_MODE_RALPH", + "AGENT_MODE_SPEC", + "AGENT_MODE_GOAL", ] diff --git a/src/gitpod/types/agent_send_to_execution_params.py b/src/gitpod/types/agent_send_to_execution_params.py index 2ad05f82..0ed543e0 100644 --- a/src/gitpod/types/agent_send_to_execution_params.py +++ b/src/gitpod/types/agent_send_to_execution_params.py @@ -8,6 +8,7 @@ from .wake_event_param import WakeEventParam from .agent_message_param import AgentMessageParam from .user_input_block_param import UserInputBlockParam +from .shared_params.codex_settings import CodexSettings __all__ = ["AgentSendToExecutionParams"] @@ -21,6 +22,12 @@ class AgentSendToExecutionParams(TypedDict, total=False): from a parent agent to a child agent execution, or vice versa). """ + codex_settings: Annotated[CodexSettings, PropertyInfo(alias="codexSettings")] + """ + codex_settings contains per-turn desired settings for Codex app user_input + sends. + """ + user_input: Annotated[UserInputBlockParam, PropertyInfo(alias="userInput")] wake_event: Annotated[WakeEventParam, PropertyInfo(alias="wakeEvent")] diff --git a/src/gitpod/types/agent_start_execution_params.py b/src/gitpod/types/agent_start_execution_params.py index 4e3f82b1..29da4adf 100644 --- a/src/gitpod/types/agent_start_execution_params.py +++ b/src/gitpod/types/agent_start_execution_params.py @@ -8,12 +8,18 @@ from .._utils import PropertyInfo from .agent_mode import AgentMode from .agent_code_context_param import AgentCodeContextParam +from .shared_params.codex_settings import CodexSettings __all__ = ["AgentStartExecutionParams"] class AgentStartExecutionParams(TypedDict, total=False): agent_id: Annotated[str, PropertyInfo(alias="agentId")] + """agent_id identifies the agent to start. + + If omitted, the backend uses the configured default agent ID, or the Ona + in-environment agent when no default is configured. + """ annotations: Dict[str, str] """ @@ -24,6 +30,9 @@ class AgentStartExecutionParams(TypedDict, total=False): code_context: Annotated[AgentCodeContextParam, PropertyInfo(alias="codeContext")] + codex_settings: Annotated[CodexSettings, PropertyInfo(alias="codexSettings")] + """codex_settings contains desired manual settings for the Codex app agent.""" + mode: AgentMode """ mode specifies the operational mode for this agent execution If not specified, diff --git a/src/gitpod/types/agent_trace_model_breakdown.py b/src/gitpod/types/agent_trace_model_breakdown.py new file mode 100644 index 00000000..f2f3e44b --- /dev/null +++ b/src/gitpod/types/agent_trace_model_breakdown.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .supported_model import SupportedModel + +__all__ = ["AgentTraceModelBreakdown"] + + +class AgentTraceModelBreakdown(BaseModel): + """AgentTraceModelBreakdown contains stats for a single LLM model.""" + + lines_added: Optional[str] = FieldInfo(alias="linesAdded", default=None) + """Lines added by sessions using this model.""" + + lines_removed: Optional[str] = FieldInfo(alias="linesRemoved", default=None) + """Lines removed by sessions using this model.""" + + model: Optional[SupportedModel] = None + """The model these stats are for.""" + + sessions: Optional[str] = None + """Number of sessions that used this model.""" diff --git a/src/gitpod/types/agent_trace_summary.py b/src/gitpod/types/agent_trace_summary.py new file mode 100644 index 00000000..2a2054c3 --- /dev/null +++ b/src/gitpod/types/agent_trace_summary.py @@ -0,0 +1,39 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .agent_trace_model_breakdown import AgentTraceModelBreakdown + +__all__ = ["AgentTraceSummary"] + + +class AgentTraceSummary(BaseModel): + """AgentTraceSummary contains aggregate totals for a date range.""" + + by_model: Optional[List[AgentTraceModelBreakdown]] = FieldInfo(alias="byModel", default=None) + """Per-model breakdown of session stats.""" + + total_lines_added: Optional[str] = FieldInfo(alias="totalLinesAdded", default=None) + """Total lines added across all sessions.""" + + total_lines_added_trend: Optional[float] = FieldInfo(alias="totalLinesAddedTrend", default=None) + """Fractional change in total_lines_added compared to the previous period.""" + + total_lines_removed: Optional[str] = FieldInfo(alias="totalLinesRemoved", default=None) + """Total lines removed across all sessions.""" + + total_lines_removed_trend: Optional[float] = FieldInfo(alias="totalLinesRemovedTrend", default=None) + """Fractional change in total_lines_removed compared to the previous period.""" + + total_sessions: Optional[str] = FieldInfo(alias="totalSessions", default=None) + """Total number of agent trace sessions in the date range.""" + + total_sessions_trend: Optional[float] = FieldInfo(alias="totalSessionsTrend", default=None) + """ + Fractional change in total_sessions compared to the previous period of equal + length. Computed as (current - previous) / previous. Zero when there is no + previous data. + """ diff --git a/src/gitpod/types/agent_trace_time_bucket.py b/src/gitpod/types/agent_trace_time_bucket.py new file mode 100644 index 00000000..bf3e8880 --- /dev/null +++ b/src/gitpod/types/agent_trace_time_bucket.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .agent_trace_model_breakdown import AgentTraceModelBreakdown + +__all__ = ["AgentTraceTimeBucket"] + + +class AgentTraceTimeBucket(BaseModel): + """AgentTraceTimeBucket contains stats for a single time period.""" + + by_model: Optional[List[AgentTraceModelBreakdown]] = FieldInfo(alias="byModel", default=None) + """Per-model breakdown for this bucket.""" + + start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None) + """Start of this time bucket.""" + + total_lines_added: Optional[str] = FieldInfo(alias="totalLinesAdded", default=None) + """Total lines added in this bucket.""" + + total_lines_removed: Optional[str] = FieldInfo(alias="totalLinesRemoved", default=None) + """Total lines removed in this bucket.""" + + total_sessions: Optional[str] = FieldInfo(alias="totalSessions", default=None) + """Number of agent trace sessions in this bucket.""" diff --git a/src/gitpod/types/audit_log_entry_details.py b/src/gitpod/types/audit_log_entry_details.py new file mode 100644 index 00000000..6f8218b9 --- /dev/null +++ b/src/gitpod/types/audit_log_entry_details.py @@ -0,0 +1,51 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .process import Process +from .._models import BaseModel +from .shared.kernel_controls_action import KernelControlsAction + +__all__ = ["AuditLogEntryDetails", "VetoExec"] + + +class VetoExec(BaseModel): + """veto_exec contains Veto Exec event details without process.cmdline.""" + + process: Process + """process contains metadata about the process that triggered the event.""" + + timestamp: datetime + """timestamp is when the event occurred in the environment.""" + + action: Optional[KernelControlsAction] = None + """action is the enforcement action taken (block or audit).""" + + environment_id: Optional[str] = FieldInfo(alias="environmentId", default=None) + """environment_id is the environment where the event occurred.""" + + executable: Optional[str] = None + """ + executable is the digest of the binary content (e.g., "sha256:a1b2c3d4..."). 256 + allows for longer hash algorithms or prefixed identifiers. May be empty when the + event source cannot compute the hash. + """ + + filename: Optional[str] = None + """ + filename is the kernel-resolved path of the binary. Kernel PATH_MAX = 4096 + (include/uapi/linux/limits.h). May be empty if the event source could not + resolve it. + """ + + +class AuditLogEntryDetails(BaseModel): + """ + AuditLogEntryDetails contains the typed evidence stored with an audit-log entry. + """ + + veto_exec: VetoExec = FieldInfo(alias="vetoExec") + """veto_exec contains Veto Exec event details without process.cmdline.""" diff --git a/src/gitpod/types/automation_create_params.py b/src/gitpod/types/automation_create_params.py index cb8ade23..0aa6cf43 100644 --- a/src/gitpod/types/automation_create_params.py +++ b/src/gitpod/types/automation_create_params.py @@ -3,11 +3,13 @@ from __future__ import annotations from typing import Iterable, Optional -from typing_extensions import Required, TypedDict +from typing_extensions import Required, Annotated, TypedDict +from .._utils import PropertyInfo from .shared_params.subject import Subject from .workflow_action_param import WorkflowActionParam from .workflow_trigger_param import WorkflowTriggerParam +from .shared_params.codex_settings import CodexSettings __all__ = ["AutomationCreateParams"] @@ -16,6 +18,12 @@ class AutomationCreateParams(TypedDict, total=False): action: Required[WorkflowActionParam] """WorkflowAction defines the actions to be executed in a workflow.""" + codex_settings: Annotated[CodexSettings, PropertyInfo(alias="codexSettings")] + """Codex app agent settings. + + Only meaningful when agent_id refers to the Codex app agent. + """ + description: str """Description must be at most 500 characters: diff --git a/src/gitpod/types/automation_update_params.py b/src/gitpod/types/automation_update_params.py index cae3bafb..972ced3f 100644 --- a/src/gitpod/types/automation_update_params.py +++ b/src/gitpod/types/automation_update_params.py @@ -9,6 +9,7 @@ from .shared_params.subject import Subject from .workflow_action_param import WorkflowActionParam from .workflow_trigger_param import WorkflowTriggerParam +from .shared_params.codex_settings import CodexSettings __all__ = ["AutomationUpdateParams"] @@ -17,6 +18,12 @@ class AutomationUpdateParams(TypedDict, total=False): action: Optional[WorkflowActionParam] """WorkflowAction defines the actions to be executed in a workflow.""" + codex_settings: Annotated[Optional[CodexSettings], PropertyInfo(alias="codexSettings")] + """Codex app agent settings. + + Only meaningful when agent_id refers to the Codex app agent. + """ + description: Optional[str] """Description must be at most 500 characters: diff --git a/src/gitpod/types/billing_currency.py b/src/gitpod/types/billing_currency.py new file mode 100644 index 00000000..0f936e88 --- /dev/null +++ b/src/gitpod/types/billing_currency.py @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["BillingCurrency"] + +BillingCurrency: TypeAlias = Literal[ + "BILLING_CURRENCY_UNSPECIFIED", "BILLING_CURRENCY_USD", "BILLING_CURRENCY_EUR", "BILLING_CURRENCY_GBP" +] diff --git a/src/gitpod/types/billing_get_credit_usage_export_params.py b/src/gitpod/types/billing_get_credit_usage_export_params.py new file mode 100644 index 00000000..7fabd832 --- /dev/null +++ b/src/gitpod/types/billing_get_credit_usage_export_params.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared_params.date_range import DateRange +from .credit_usage_export_group_by import CreditUsageExportGroupBy + +__all__ = ["BillingGetCreditUsageExportParams"] + + +class BillingGetCreditUsageExportParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range to export. + + Both start and end dates are inclusive; time-of-day is ignored. Unlike + GetCreditUsageReport, the range may cover up to a year. + """ + + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + + group_by: Annotated[CreditUsageExportGroupBy, PropertyInfo(alias="groupBy")] + """How to group the export data. Defaults to DAILY_SUMMARY.""" diff --git a/src/gitpod/types/billing_get_credit_usage_export_response.py b/src/gitpod/types/billing_get_credit_usage_export_response.py new file mode 100644 index 00000000..316a998d --- /dev/null +++ b/src/gitpod/types/billing_get_credit_usage_export_response.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel + +__all__ = ["BillingGetCreditUsageExportResponse"] + + +class BillingGetCreditUsageExportResponse(BaseModel): + download_url: Optional[str] = FieldInfo(alias="downloadUrl", default=None) + """Signed download URL for the CSV export. + + Valid for five minutes, and only for the principal that requested it. + """ diff --git a/src/gitpod/types/billing_get_credit_usage_report_params.py b/src/gitpod/types/billing_get_credit_usage_report_params.py new file mode 100644 index 00000000..60732312 --- /dev/null +++ b/src/gitpod/types/billing_get_credit_usage_report_params.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared_params.date_range import DateRange +from .credit_usage_report_filter_param import CreditUsageReportFilterParam + +__all__ = ["BillingGetCreditUsageReportParams"] + + +class BillingGetCreditUsageReportParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range for the report. + + Both start and end dates are inclusive. Time-of-day is ignored; dates are + truncated to midnight in the specified timezone. The range must not exceed 31 + days. + """ + + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + + filter: CreditUsageReportFilterParam + """Optional filter narrowing the returned data. + + When unset or empty, the response preserves the default behavior (top-N users + + "Others"). See CreditUsageReportFilter for per-field response-scoping semantics. + """ + + timezone: str + """IANA timezone name (e.g. + + "America/New_York", "Europe/Berlin") used to bucket daily usage. When empty, + defaults to "UTC". + """ diff --git a/src/gitpod/types/billing_get_credit_usage_report_response.py b/src/gitpod/types/billing_get_credit_usage_report_response.py new file mode 100644 index 00000000..be7e3938 --- /dev/null +++ b/src/gitpod/types/billing_get_credit_usage_report_response.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .daily_credit_usage import DailyCreditUsage + +__all__ = ["BillingGetCreditUsageReportResponse"] + + +class BillingGetCreditUsageReportResponse(BaseModel): + daily_usage: Optional[List[DailyCreditUsage]] = FieldInfo(alias="dailyUsage", default=None) + """One entry per day in the requested date range.""" + + period_start: Optional[datetime] = FieldInfo(alias="periodStart", default=None) + """ + Start of the billing period for this organization. Used by the frontend to + filter out months before usage tracking began. + """ + + updated_at: Optional[datetime] = FieldInfo(alias="updatedAt", default=None) + """When the report data was last computed.""" diff --git a/src/gitpod/types/billing_get_cumulative_credit_usage_params.py b/src/gitpod/types/billing_get_cumulative_credit_usage_params.py new file mode 100644 index 00000000..2071f344 --- /dev/null +++ b/src/gitpod/types/billing_get_cumulative_credit_usage_params.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["BillingGetCumulativeCreditUsageParams"] + + +class BillingGetCumulativeCreditUsageParams(TypedDict, total=False): + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + """organization_id is the ID of the organization to get cumulative usage for.""" + + as_of: Annotated[Union[str, datetime, None], PropertyInfo(alias="asOf", format="iso8601")] + """ + as_of is the point in time to compute cumulative usage up to. Defaults to now if + not set. + """ diff --git a/src/gitpod/types/billing_get_cumulative_credit_usage_response.py b/src/gitpod/types/billing_get_cumulative_credit_usage_response.py new file mode 100644 index 00000000..a3dd1b4b --- /dev/null +++ b/src/gitpod/types/billing_get_cumulative_credit_usage_response.py @@ -0,0 +1,41 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .cumulative_credit_usage import CumulativeCreditUsage +from .user_credit_budget_usage import UserCreditBudgetUsage +from .team_cumulative_credit_usage import TeamCumulativeCreditUsage + +__all__ = ["BillingGetCumulativeCreditUsageResponse"] + + +class BillingGetCumulativeCreditUsageResponse(BaseModel): + org_usage: Optional[CumulativeCreditUsage] = FieldInfo(alias="orgUsage", default=None) + """Org-wide cumulative usage, broken down by type and total.""" + + period_start: Optional[datetime] = FieldInfo(alias="periodStart", default=None) + """ + Start of the cumulative calculation period. Cumulative totals are computed from + this date forward. + """ + + team_usage: Optional[List[TeamCumulativeCreditUsage]] = FieldInfo(alias="teamUsage", default=None) + """ + Per-team cumulative usage with credit allocation comparison. Returns all teams + (no top-N limit). + """ + + unteamed_usage: Optional[CumulativeCreditUsage] = FieldInfo(alias="unteamedUsage", default=None) + """Usage by members not assigned to any team.""" + + user_usage: Optional[List[UserCreditBudgetUsage]] = FieldInfo(alias="userUsage", default=None) + """ + Per-user month-to-date usage for every user with usage in the period. The budget + fields on each entry are populated only when a monthly budget applies to that + user. This list is not paginated or capped; for large organizations prefer + ListEnterpriseUserCreditUsage. + """ diff --git a/src/gitpod/types/billing_get_enterprise_ai_usage_summary_params.py b/src/gitpod/types/billing_get_enterprise_ai_usage_summary_params.py new file mode 100644 index 00000000..6bacad25 --- /dev/null +++ b/src/gitpod/types/billing_get_enterprise_ai_usage_summary_params.py @@ -0,0 +1,24 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared_params.date_range import DateRange + +__all__ = ["BillingGetEnterpriseAIUsageSummaryParams"] + + +class BillingGetEnterpriseAIUsageSummaryParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range for the summary. + + Both start and end dates are inclusive. Time-of-day is ignored; dates are + truncated to midnight in the specified timezone. + """ + + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + + timezone: str + """IANA timezone name used to bucket usage. When empty, defaults to "UTC".""" diff --git a/src/gitpod/types/billing_get_enterprise_ai_usage_summary_response.py b/src/gitpod/types/billing_get_enterprise_ai_usage_summary_response.py new file mode 100644 index 00000000..aefcf09f --- /dev/null +++ b/src/gitpod/types/billing_get_enterprise_ai_usage_summary_response.py @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .enterprise_ai_usage import EnterpriseAIUsage +from .enterprise_ai_usage_budget import EnterpriseAIUsageBudget +from .enterprise_ai_usage_by_model import EnterpriseAIUsageByModel + +__all__ = ["BillingGetEnterpriseAIUsageSummaryResponse"] + + +class BillingGetEnterpriseAIUsageSummaryResponse(BaseModel): + budget: Optional[EnterpriseAIUsageBudget] = None + """budget is unset when no monthly budget applies to the organization.""" + + calculated_at: Optional[datetime] = FieldInfo(alias="calculatedAt", default=None) + """ + calculated_at is the time through which usage has been calculated. Usage after + this timestamp may still be processing. + """ + + usage: Optional[EnterpriseAIUsage] = None + + usage_by_model: Optional[List[EnterpriseAIUsageByModel]] = FieldInfo(alias="usageByModel", default=None) diff --git a/src/gitpod/types/billing_get_enterprise_ai_usage_time_series_params.py b/src/gitpod/types/billing_get_enterprise_ai_usage_time_series_params.py new file mode 100644 index 00000000..a3a91138 --- /dev/null +++ b/src/gitpod/types/billing_get_enterprise_ai_usage_time_series_params.py @@ -0,0 +1,27 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared_params.date_range import DateRange +from .enterprise_ai_usage_time_series_filter_param import EnterpriseAIUsageTimeSeriesFilterParam + +__all__ = ["BillingGetEnterpriseAIUsageTimeSeriesParams"] + + +class BillingGetEnterpriseAIUsageTimeSeriesParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range for the daily usage series. + + Both start and end dates are inclusive. Time-of-day is ignored; dates are + truncated to midnight in the specified timezone. + """ + + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + + filter: EnterpriseAIUsageTimeSeriesFilterParam + + timezone: str + """IANA timezone name used to bucket daily usage. When empty, defaults to "UTC".""" diff --git a/src/gitpod/types/billing_get_enterprise_ai_usage_time_series_response.py b/src/gitpod/types/billing_get_enterprise_ai_usage_time_series_response.py new file mode 100644 index 00000000..10b708c8 --- /dev/null +++ b/src/gitpod/types/billing_get_enterprise_ai_usage_time_series_response.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .daily_enterprise_ai_usage import DailyEnterpriseAIUsage + +__all__ = ["BillingGetEnterpriseAIUsageTimeSeriesResponse"] + + +class BillingGetEnterpriseAIUsageTimeSeriesResponse(BaseModel): + calculated_at: Optional[datetime] = FieldInfo(alias="calculatedAt", default=None) + """ + calculated_at is the time through which usage has been calculated. Usage after + this timestamp may still be processing. + """ + + daily_usage: Optional[List[DailyEnterpriseAIUsage]] = FieldInfo(alias="dailyUsage", default=None) diff --git a/src/gitpod/types/billing_list_enterprise_ai_team_usage_params.py b/src/gitpod/types/billing_list_enterprise_ai_team_usage_params.py new file mode 100644 index 00000000..b3374390 --- /dev/null +++ b/src/gitpod/types/billing_list_enterprise_ai_team_usage_params.py @@ -0,0 +1,51 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._types import SequenceNotStr +from .._utils import PropertyInfo +from .shared_params.date_range import DateRange + +__all__ = ["BillingListEnterpriseAITeamUsageParams", "Filter", "Pagination"] + + +class BillingListEnterpriseAITeamUsageParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range for the team usage list. + + Both start and end dates are inclusive. Time-of-day is ignored; dates are + truncated to midnight in the specified timezone. + """ + + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + + token: str + + page_size: Annotated[int, PropertyInfo(alias="pageSize")] + + filter: Filter + + pagination: Pagination + + timezone: str + """IANA timezone name used to bucket usage. When empty, defaults to "UTC".""" + + +class Filter(TypedDict, total=False): + team_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="teamIds")] + + +class Pagination(TypedDict, total=False): + token: str + """ + Token for the next set of results that was returned as next_token of a + PaginationResponse + """ + + page_size: Annotated[int, PropertyInfo(alias="pageSize")] + """Page size is the maximum number of results to retrieve per page. Defaults to 25. + + Maximum 100. + """ diff --git a/src/gitpod/types/billing_list_enterprise_ai_user_usage_params.py b/src/gitpod/types/billing_list_enterprise_ai_user_usage_params.py new file mode 100644 index 00000000..9d375be4 --- /dev/null +++ b/src/gitpod/types/billing_list_enterprise_ai_user_usage_params.py @@ -0,0 +1,86 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared.sort_order import SortOrder +from .shared_params.subject import Subject +from .shared_params.date_range import DateRange + +__all__ = ["BillingListEnterpriseAIUserUsageParams", "Filter", "Pagination", "Sort"] + + +class BillingListEnterpriseAIUserUsageParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range for the user usage list. + + Both start and end dates are inclusive. Time-of-day is ignored; dates are + truncated to midnight in the specified timezone. + """ + + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + + token: str + + page_size: Annotated[int, PropertyInfo(alias="pageSize")] + + filter: Filter + """Optional filter narrowing the returned user usage. + + When set to a subject, the response contains only usage for that user or service + account. + """ + + pagination: Pagination + + sort: Sort + """sort controls the ordering of results. Defaults to total spend descending.""" + + timezone: str + """IANA timezone name used to bucket usage. When empty, defaults to "UTC".""" + + +class Filter(TypedDict, total=False): + """Optional filter narrowing the returned user usage. + + When set to a subject, + the response contains only usage for that user or service account. + """ + + subject: Optional[Subject] + """Restrict the user usage list to a single subject. + + The subject must be PRINCIPAL_USER or PRINCIPAL_SERVICE_ACCOUNT and belong to + the request's organization. + """ + + +class Pagination(TypedDict, total=False): + token: str + """ + Token for the next set of results that was returned as next_token of a + PaginationResponse + """ + + page_size: Annotated[int, PropertyInfo(alias="pageSize")] + """Page size is the maximum number of results to retrieve per page. Defaults to 25. + + Maximum 100. + """ + + +class Sort(TypedDict, total=False): + """sort controls the ordering of results. Defaults to total spend descending.""" + + field: Literal[ + "SORT_FIELD_UNSPECIFIED", + "SORT_FIELD_USAGE", + "SORT_FIELD_DISPLAY_NAME", + "SORT_FIELD_BUDGET", + "SORT_FIELD_BUDGET_USED", + ] + + order: SortOrder diff --git a/src/gitpod/types/billing_list_enterprise_user_credit_usage_params.py b/src/gitpod/types/billing_list_enterprise_user_credit_usage_params.py new file mode 100644 index 00000000..0c77216e --- /dev/null +++ b/src/gitpod/types/billing_list_enterprise_user_credit_usage_params.py @@ -0,0 +1,60 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared.sort_order import SortOrder + +__all__ = ["BillingListEnterpriseUserCreditUsageParams", "Pagination", "Sort"] + + +class BillingListEnterpriseUserCreditUsageParams(TypedDict, total=False): + organization_id: Required[Annotated[str, PropertyInfo(alias="organizationId")]] + """organization_id is the ID of the organization to list user credit usage for.""" + + token: str + + page_size: Annotated[int, PropertyInfo(alias="pageSize")] + + as_of: Annotated[Union[str, datetime, None], PropertyInfo(alias="asOf", format="iso8601")] + """ + as_of is the point in time to compute month-to-date usage up to. Defaults to now + if not set. + """ + + pagination: Pagination + + sort: Sort + """sort controls the ordering of results. Defaults to total credits descending.""" + + +class Pagination(TypedDict, total=False): + token: str + """ + Token for the next set of results that was returned as next_token of a + PaginationResponse + """ + + page_size: Annotated[int, PropertyInfo(alias="pageSize")] + """Page size is the maximum number of results to retrieve per page. Defaults to 25. + + Maximum 100. + """ + + +class Sort(TypedDict, total=False): + """sort controls the ordering of results. Defaults to total credits descending.""" + + field: Literal[ + "SORT_FIELD_UNSPECIFIED", + "SORT_FIELD_USAGE", + "SORT_FIELD_DISPLAY_NAME", + "SORT_FIELD_BUDGET", + "SORT_FIELD_BUDGET_USED", + ] + + order: SortOrder diff --git a/src/gitpod/types/breadcrumb_param.py b/src/gitpod/types/breadcrumb_param.py deleted file mode 100644 index cef8444d..00000000 --- a/src/gitpod/types/breadcrumb_param.py +++ /dev/null @@ -1,34 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Dict, Union -from datetime import datetime -from typing_extensions import Annotated, TypedDict - -from .._utils import PropertyInfo -from .error_level import ErrorLevel - -__all__ = ["BreadcrumbParam"] - - -class BreadcrumbParam(TypedDict, total=False): - """Breadcrumb information (Sentry-compatible)""" - - category: str - """Breadcrumb category""" - - data: Dict[str, str] - """Additional breadcrumb data""" - - level: ErrorLevel - """Breadcrumb level""" - - message: str - """Breadcrumb message""" - - timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """When the breadcrumb occurred""" - - type: str - """Breadcrumb type (e.g., "navigation", "http", "user", "error")""" diff --git a/src/gitpod/types/byok_rate_card_token_type.py b/src/gitpod/types/byok_rate_card_token_type.py new file mode 100644 index 00000000..728ed057 --- /dev/null +++ b/src/gitpod/types/byok_rate_card_token_type.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["ByokRateCardTokenType"] + +ByokRateCardTokenType: TypeAlias = Literal[ + "BYOK_RATE_CARD_TOKEN_TYPE_UNSPECIFIED", + "BYOK_RATE_CARD_TOKEN_TYPE_INPUT", + "BYOK_RATE_CARD_TOKEN_TYPE_OUTPUT", + "BYOK_RATE_CARD_TOKEN_TYPE_CACHE_READ", + "BYOK_RATE_CARD_TOKEN_TYPE_CACHE_WRITE", +] diff --git a/src/gitpod/types/co_author_summary.py b/src/gitpod/types/co_author_summary.py new file mode 100644 index 00000000..ff214ca9 --- /dev/null +++ b/src/gitpod/types/co_author_summary.py @@ -0,0 +1,45 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .tool_breakdown import ToolBreakdown + +__all__ = ["CoAuthorSummary"] + + +class CoAuthorSummary(BaseModel): + """CoAuthorSummary contains aggregate totals for a date range.""" + + by_tool: Optional[List[ToolBreakdown]] = FieldInfo(alias="byTool", default=None) + """Per-tool breakdown of contribution stats.""" + + distinct_authors: Optional[str] = FieldInfo(alias="distinctAuthors", default=None) + """Number of distinct authors (by author_hash).""" + + distinct_authors_trend: Optional[float] = FieldInfo(alias="distinctAuthorsTrend", default=None) + """Fractional change in distinct_authors compared to the previous period.""" + + total_commits: Optional[str] = FieldInfo(alias="totalCommits", default=None) + """Total number of commits in the date range.""" + + total_commits_trend: Optional[float] = FieldInfo(alias="totalCommitsTrend", default=None) + """ + Fractional change in total_commits compared to the previous period of equal + length. Computed as (current - previous) / previous. Zero when there is no + previous data. + """ + + total_lines_added: Optional[str] = FieldInfo(alias="totalLinesAdded", default=None) + """Total lines added across all commits.""" + + total_lines_added_trend: Optional[float] = FieldInfo(alias="totalLinesAddedTrend", default=None) + """Fractional change in total_lines_added compared to the previous period.""" + + total_lines_removed: Optional[str] = FieldInfo(alias="totalLinesRemoved", default=None) + """Total lines removed across all commits.""" + + total_lines_removed_trend: Optional[float] = FieldInfo(alias="totalLinesRemovedTrend", default=None) + """Fractional change in total_lines_removed compared to the previous period.""" diff --git a/src/gitpod/types/co_author_time_bucket.py b/src/gitpod/types/co_author_time_bucket.py new file mode 100644 index 00000000..6a462b87 --- /dev/null +++ b/src/gitpod/types/co_author_time_bucket.py @@ -0,0 +1,36 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .tool_breakdown import ToolBreakdown + +__all__ = ["CoAuthorTimeBucket"] + + +class CoAuthorTimeBucket(BaseModel): + """CoAuthorTimeBucket contains stats for a single time period.""" + + ai_ratio: Optional[float] = FieldInfo(alias="aiRatio", default=None) + """Ratio of AI-assisted lines added to total lines added (0.0–1.0).""" + + by_tool: Optional[List[ToolBreakdown]] = FieldInfo(alias="byTool", default=None) + """Per-tool breakdown for this bucket.""" + + distinct_authors: Optional[str] = FieldInfo(alias="distinctAuthors", default=None) + """Number of distinct authors (by author_hash) in this bucket.""" + + start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None) + """Start of this time bucket.""" + + total_commits: Optional[str] = FieldInfo(alias="totalCommits", default=None) + """Total number of commits in this bucket (across all tools).""" + + total_lines_added: Optional[str] = FieldInfo(alias="totalLinesAdded", default=None) + """Total lines added in this bucket (across all tools).""" + + total_lines_removed: Optional[str] = FieldInfo(alias="totalLinesRemoved", default=None) + """Total lines removed in this bucket (across all tools).""" diff --git a/src/gitpod/types/co_author_tool.py b/src/gitpod/types/co_author_tool.py new file mode 100644 index 00000000..9c713060 --- /dev/null +++ b/src/gitpod/types/co_author_tool.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CoAuthorTool"] + +CoAuthorTool: TypeAlias = Literal[ + "CO_AUTHOR_TOOL_UNSPECIFIED", + "CO_AUTHOR_TOOL_NO_COAUTHOR", + "CO_AUTHOR_TOOL_HUMAN_COAUTHOR", + "CO_AUTHOR_TOOL_ONA", + "CO_AUTHOR_TOOL_GITHUB_COPILOT", + "CO_AUTHOR_TOOL_CURSOR", + "CO_AUTHOR_TOOL_OTHER", + "CO_AUTHOR_TOOL_CLAUDE", + "CO_AUTHOR_TOOL_CODEX", +] diff --git a/src/gitpod/types/credit_usage_export_group_by.py b/src/gitpod/types/credit_usage_export_group_by.py new file mode 100644 index 00000000..a370c4e6 --- /dev/null +++ b/src/gitpod/types/credit_usage_export_group_by.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CreditUsageExportGroupBy"] + +CreditUsageExportGroupBy: TypeAlias = Literal[ + "CREDIT_USAGE_EXPORT_GROUP_BY_UNSPECIFIED", + "CREDIT_USAGE_EXPORT_GROUP_BY_DAILY_SUMMARY", + "CREDIT_USAGE_EXPORT_GROUP_BY_RESOURCE", +] diff --git a/src/gitpod/types/credit_usage_report_filter_param.py b/src/gitpod/types/credit_usage_report_filter_param.py new file mode 100644 index 00000000..fd8ed90b --- /dev/null +++ b/src/gitpod/types/credit_usage_report_filter_param.py @@ -0,0 +1,36 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +from .shared_params.subject import Subject + +__all__ = ["CreditUsageReportFilterParam"] + + +class CreditUsageReportFilterParam(TypedDict, total=False): + """ + CreditUsageReportFilter narrows the data returned by GetCreditUsageReport. + Wrapping filters in a message (rather than adding bare fields) lets future + filters (team, environment, resource kind) be added without further breaking + changes. + """ + + subject: Optional[Subject] + """Restrict the per-user breakdown to a single subject. + + The subject must be PRINCIPAL_USER or PRINCIPAL_SERVICE_ACCOUNT and belong to + the request's organization. When unset, the report returns the default top-N + users + "Others" breakdown. + + When this field is set: + + - daily_usage[*].user_usage contains rows only for the requested subject; no + "Others" aggregation bucket is produced. + - daily_usage[*].org_usage, team_usage, environment_usage, and + conversation_usage are omitted (empty). Callers that need those sections + should issue an unfiltered call. + - period_start and updated_at remain populated. + """ diff --git a/src/gitpod/types/credits_by_type.py b/src/gitpod/types/credits_by_type.py new file mode 100644 index 00000000..53100f22 --- /dev/null +++ b/src/gitpod/types/credits_by_type.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .usage_type import UsageType + +__all__ = ["CreditsByType"] + + +class CreditsByType(BaseModel): + """CreditsByType contains credits consumed for a single usage type.""" + + credits: Optional[float] = None + + usage_type: Optional[UsageType] = FieldInfo(alias="usageType", default=None) + """UsageType identifies the category of usage.""" diff --git a/src/gitpod/types/cumulative_credit_usage.py b/src/gitpod/types/cumulative_credit_usage.py new file mode 100644 index 00000000..5dc5c00a --- /dev/null +++ b/src/gitpod/types/cumulative_credit_usage.py @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .credits_by_type import CreditsByType + +__all__ = ["CumulativeCreditUsage"] + + +class CumulativeCreditUsage(BaseModel): + """CumulativeCreditUsage contains cumulative credit consumption totals.""" + + total_credits: Optional[float] = FieldInfo(alias="totalCredits", default=None) + """Total credits consumed.""" + + usage_by_type: Optional[List[CreditsByType]] = FieldInfo(alias="usageByType", default=None) + """Credits consumed broken down by usage type.""" diff --git a/src/gitpod/types/daily_credit_usage.py b/src/gitpod/types/daily_credit_usage.py new file mode 100644 index 00000000..3248fc28 --- /dev/null +++ b/src/gitpod/types/daily_credit_usage.py @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .credits_by_type import CreditsByType +from .team_credit_usage import TeamCreditUsage +from .user_credit_usage import UserCreditUsage +from .environment_credit_usage import EnvironmentCreditUsage +from .agent_execution_credit_usage import AgentExecutionCreditUsage +from .enterprise_ai_usage_by_model import EnterpriseAIUsageByModel + +__all__ = ["DailyCreditUsage"] + + +class DailyCreditUsage(BaseModel): + """DailyCreditUsage contains credit usage for a single day.""" + + conversation_usage: Optional[List[AgentExecutionCreditUsage]] = FieldInfo(alias="conversationUsage", default=None) + """ + Per-agent-execution usage for this day (top conversations + "Others"). Empty + agent_execution_id represents the "Others" aggregation bucket. + """ + + date: Optional[datetime] = None + """Start of the day (midnight in the requested timezone).""" + + environment_usage: Optional[List[EnvironmentCreditUsage]] = FieldInfo(alias="environmentUsage", default=None) + """ + Per-environment usage for this day (top environments + "Others"). Empty + environment_id represents the "Others" aggregation bucket. + """ + + org_usage: Optional[List[CreditsByType]] = FieldInfo(alias="orgUsage", default=None) + """Org-wide usage broken down by type.""" + + team_usage: Optional[List[TeamCreditUsage]] = FieldInfo(alias="teamUsage", default=None) + """ + Per-team usage for this day (top teams + "Others"). Empty team_id represents the + "Others" aggregation bucket. + """ + + usage_by_model: Optional[List[EnterpriseAIUsageByModel]] = FieldInfo(alias="usageByModel", default=None) + """Org-wide intelligence usage broken down by model.""" + + user_usage: Optional[List[UserCreditUsage]] = FieldInfo(alias="userUsage", default=None) + """Per-user usage for this day (top users + "Others").""" diff --git a/src/gitpod/types/daily_enterprise_ai_usage.py b/src/gitpod/types/daily_enterprise_ai_usage.py new file mode 100644 index 00000000..d69c435e --- /dev/null +++ b/src/gitpod/types/daily_enterprise_ai_usage.py @@ -0,0 +1,124 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .enterprise_ai_usage import EnterpriseAIUsage +from .team_enterprise_ai_usage import TeamEnterpriseAIUsage +from .user_enterprise_ai_usage import UserEnterpriseAIUsage +from .enterprise_ai_usage_budget import EnterpriseAIUsageBudget +from .enterprise_ai_usage_by_model import EnterpriseAIUsageByModel + +__all__ = ["DailyEnterpriseAIUsage"] + + +class DailyEnterpriseAIUsage(BaseModel): + date: datetime + """ + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at nanosecond + resolution. The count is relative to an epoch at UTC midnight on January 1, + 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar + backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a + [24-hour linear smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + Example 5: Compute Timestamp from Java `Instant.now()`. + + Instant now = Instant.now(); + + Timestamp timestamp = + Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + .setNanos(now.getNano()).build(); + + Example 6: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is + "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always + expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are + zero-padded to two digits each. The fractional seconds, which can go up to 9 + digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix + indicates the timezone ("UTC"); the timezone is required. A proto3 JSON + serializer should always use UTC (as indicated by "Z") when printing the + Timestamp type and a proto3 JSON parser should be able to accept both UTC and + other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on + January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted to + this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the + time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the + Joda Time's + [`ISODateTimeFormat.dateTime()`]() + to obtain a formatter capable of generating timestamps in this format. + """ + + budget: Optional[EnterpriseAIUsageBudget] = None + """budget is unset when no monthly budget applies to the organization.""" + + team_usage: Optional[List[TeamEnterpriseAIUsage]] = FieldInfo(alias="teamUsage", default=None) + + usage: Optional[EnterpriseAIUsage] = None + + usage_by_model: Optional[List[EnterpriseAIUsageByModel]] = FieldInfo(alias="usageByModel", default=None) + """Usage for this day broken down by model. + + When the request filters by subject, contains only that subject's model usage. + """ + + user_usage: Optional[List[UserEnterpriseAIUsage]] = FieldInfo(alias="userUsage", default=None) diff --git a/src/gitpod/types/enterprise_ai_token_usage.py b/src/gitpod/types/enterprise_ai_token_usage.py new file mode 100644 index 00000000..a00854cf --- /dev/null +++ b/src/gitpod/types/enterprise_ai_token_usage.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel + +__all__ = ["EnterpriseAITokenUsage"] + + +class EnterpriseAITokenUsage(BaseModel): + cache_tokens: Optional[str] = FieldInfo(alias="cacheTokens", default=None) + + input_tokens: Optional[str] = FieldInfo(alias="inputTokens", default=None) + + output_tokens: Optional[str] = FieldInfo(alias="outputTokens", default=None) + + total_tokens: Optional[str] = FieldInfo(alias="totalTokens", default=None) diff --git a/src/gitpod/types/enterprise_ai_usage.py b/src/gitpod/types/enterprise_ai_usage.py new file mode 100644 index 00000000..70618de5 --- /dev/null +++ b/src/gitpod/types/enterprise_ai_usage.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .billing_currency import BillingCurrency +from .enterprise_ai_token_usage import EnterpriseAITokenUsage + +__all__ = ["EnterpriseAIUsage"] + + +class EnterpriseAIUsage(BaseModel): + cost_microunits: Optional[str] = FieldInfo(alias="costMicrounits", default=None) + + credits: Optional[float] = None + + currency: Optional[BillingCurrency] = None + + tokens: Optional[EnterpriseAITokenUsage] = None diff --git a/src/gitpod/types/enterprise_ai_usage_budget.py b/src/gitpod/types/enterprise_ai_usage_budget.py new file mode 100644 index 00000000..70f4fdd5 --- /dev/null +++ b/src/gitpod/types/enterprise_ai_usage_budget.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .billing_currency import BillingCurrency +from .enterprise_ai_usage import EnterpriseAIUsage +from .enterprise_ai_usage_budget_source import EnterpriseAIUsageBudgetSource + +__all__ = ["EnterpriseAIUsageBudget"] + + +class EnterpriseAIUsageBudget(BaseModel): + currency: Optional[BillingCurrency] = None + + monthly_cost_limit_microunits: Optional[str] = FieldInfo(alias="monthlyCostLimitMicrounits", default=None) + + monthly_credit_limit: Optional[str] = FieldInfo(alias="monthlyCreditLimit", default=None) + + month_to_date_usage: Optional[EnterpriseAIUsage] = FieldInfo(alias="monthToDateUsage", default=None) + + source: Optional[EnterpriseAIUsageBudgetSource] = None + + utilization_percent: Optional[float] = FieldInfo(alias="utilizationPercent", default=None) diff --git a/src/gitpod/types/enterprise_ai_usage_budget_source.py b/src/gitpod/types/enterprise_ai_usage_budget_source.py new file mode 100644 index 00000000..2c35d283 --- /dev/null +++ b/src/gitpod/types/enterprise_ai_usage_budget_source.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["EnterpriseAIUsageBudgetSource"] + +EnterpriseAIUsageBudgetSource: TypeAlias = Literal[ + "ENTERPRISE_AI_USAGE_BUDGET_SOURCE_UNSPECIFIED", + "ENTERPRISE_AI_USAGE_BUDGET_SOURCE_ORGANIZATION", + "ENTERPRISE_AI_USAGE_BUDGET_SOURCE_TEAM", +] diff --git a/src/gitpod/types/enterprise_ai_usage_by_model.py b/src/gitpod/types/enterprise_ai_usage_by_model.py new file mode 100644 index 00000000..4e3182b9 --- /dev/null +++ b/src/gitpod/types/enterprise_ai_usage_by_model.py @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .enterprise_ai_usage import EnterpriseAIUsage +from .enterprise_ai_usage_by_token_type import EnterpriseAIUsageByTokenType + +__all__ = ["EnterpriseAIUsageByModel"] + + +class EnterpriseAIUsageByModel(BaseModel): + model: Optional[str] = None + + unpriced_usage: Optional[EnterpriseAIUsage] = FieldInfo(alias="unpricedUsage", default=None) + """Usage excluded from spend because no matching BYOK rate was configured.""" + + unpriced_usage_by_token_type: Optional[List[EnterpriseAIUsageByTokenType]] = FieldInfo( + alias="unpricedUsageByTokenType", default=None + ) + + usage: Optional[EnterpriseAIUsage] = None + + usage_by_token_type: Optional[List[EnterpriseAIUsageByTokenType]] = FieldInfo( + alias="usageByTokenType", default=None + ) diff --git a/src/gitpod/types/enterprise_ai_usage_by_token_type.py b/src/gitpod/types/enterprise_ai_usage_by_token_type.py new file mode 100644 index 00000000..5adb9de0 --- /dev/null +++ b/src/gitpod/types/enterprise_ai_usage_by_token_type.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .enterprise_ai_usage import EnterpriseAIUsage +from .byok_rate_card_token_type import ByokRateCardTokenType + +__all__ = ["EnterpriseAIUsageByTokenType"] + + +class EnterpriseAIUsageByTokenType(BaseModel): + token_type: Optional[ByokRateCardTokenType] = FieldInfo(alias="tokenType", default=None) + + usage: Optional[EnterpriseAIUsage] = None diff --git a/src/gitpod/types/enterprise_ai_usage_time_series_filter_param.py b/src/gitpod/types/enterprise_ai_usage_time_series_filter_param.py new file mode 100644 index 00000000..9aee6f31 --- /dev/null +++ b/src/gitpod/types/enterprise_ai_usage_time_series_filter_param.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +from .shared_params.subject import Subject + +__all__ = ["EnterpriseAIUsageTimeSeriesFilterParam"] + + +class EnterpriseAIUsageTimeSeriesFilterParam(TypedDict, total=False): + subject: Optional[Subject] + """Restrict the per-user breakdown to a single subject.""" diff --git a/src/gitpod/types/enterprise_ai_user_budget_policy_source.py b/src/gitpod/types/enterprise_ai_user_budget_policy_source.py new file mode 100644 index 00000000..ddf3f42b --- /dev/null +++ b/src/gitpod/types/enterprise_ai_user_budget_policy_source.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["EnterpriseAIUserBudgetPolicySource"] + +EnterpriseAIUserBudgetPolicySource: TypeAlias = Literal[ + "ENTERPRISE_AI_USER_BUDGET_POLICY_SOURCE_UNSPECIFIED", + "ENTERPRISE_AI_USER_BUDGET_POLICY_SOURCE_NONE", + "ENTERPRISE_AI_USER_BUDGET_POLICY_SOURCE_ORGANIZATION", + "ENTERPRISE_AI_USER_BUDGET_POLICY_SOURCE_USER", +] diff --git a/src/gitpod/types/environment_credit_usage.py b/src/gitpod/types/environment_credit_usage.py new file mode 100644 index 00000000..51331dd6 --- /dev/null +++ b/src/gitpod/types/environment_credit_usage.py @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .credits_by_type import CreditsByType + +__all__ = ["EnvironmentCreditUsage"] + + +class EnvironmentCreditUsage(BaseModel): + """ + EnvironmentCreditUsage contains a single environment's credit usage for a day, broken down by type. + """ + + display_name: Optional[str] = FieldInfo(alias="displayName", default=None) + + environment_id: Optional[str] = FieldInfo(alias="environmentId", default=None) + """Empty when representing the "Others" aggregation bucket.""" + + usage: Optional[List[CreditsByType]] = None diff --git a/src/gitpod/types/environment_role.py b/src/gitpod/types/environment_role.py index 2dd22df2..8dead9fc 100644 --- a/src/gitpod/types/environment_role.py +++ b/src/gitpod/types/environment_role.py @@ -5,5 +5,9 @@ __all__ = ["EnvironmentRole"] EnvironmentRole: TypeAlias = Literal[ - "ENVIRONMENT_ROLE_UNSPECIFIED", "ENVIRONMENT_ROLE_DEFAULT", "ENVIRONMENT_ROLE_PREBUILD", "ENVIRONMENT_ROLE_WORKFLOW" + "ENVIRONMENT_ROLE_UNSPECIFIED", + "ENVIRONMENT_ROLE_DEFAULT", + "ENVIRONMENT_ROLE_PREBUILD", + "ENVIRONMENT_ROLE_WORKFLOW", + "ENVIRONMENT_ROLE_BASE_SNAPSHOT_BUILD", ] diff --git a/src/gitpod/types/environments/automations/task_update_params.py b/src/gitpod/types/environments/automations/task_update_params.py index 10f30ca2..6a7555a9 100644 --- a/src/gitpod/types/environments/automations/task_update_params.py +++ b/src/gitpod/types/environments/automations/task_update_params.py @@ -42,4 +42,6 @@ class Spec(TypedDict, total=False): env: Iterable[EnvironmentVariableItem] + prebuild_requires_success: Annotated[Optional[bool], PropertyInfo(alias="prebuildRequiresSuccess")] + runs_on: Annotated[Optional[RunsOn], PropertyInfo(alias="runsOn")] diff --git a/src/gitpod/types/environments/automations_file_param.py b/src/gitpod/types/environments/automations_file_param.py index 71161a2e..eeda8859 100644 --- a/src/gitpod/types/environments/automations_file_param.py +++ b/src/gitpod/types/environments/automations_file_param.py @@ -129,6 +129,14 @@ class Tasks(TypedDict, total=False): name: str + prebuild_requires_success: Annotated[bool, PropertyInfo(alias="prebuildRequiresSuccess")] + """ + prebuild_requires_success controls whether a non-successful outcome of this task + should fail the prebuild. When true and the task is triggered by a prebuild + trigger, any terminal phase other than SUCCEEDED will cause the prebuild to + fail. Defaults to false. + """ + runs_on: Annotated[RunsOn, PropertyInfo(alias="runsOn")] triggered_by: Annotated[ diff --git a/src/gitpod/types/error_event_param.py b/src/gitpod/types/error_event_param.py deleted file mode 100644 index 5b909e4c..00000000 --- a/src/gitpod/types/error_event_param.py +++ /dev/null @@ -1,74 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Dict, Union, Iterable -from datetime import datetime -from typing_extensions import Annotated, TypedDict - -from .._types import SequenceNotStr -from .._utils import PropertyInfo -from .error_level import ErrorLevel -from .breadcrumb_param import BreadcrumbParam -from .request_info_param import RequestInfoParam -from .exception_info_param import ExceptionInfoParam - -__all__ = ["ErrorEventParam"] - - -class ErrorEventParam(TypedDict, total=False): - """ErrorEvent contains comprehensive error information (Sentry-compatible)""" - - breadcrumbs: Iterable[BreadcrumbParam] - """Breadcrumbs leading up to the error""" - - environment: str - """Environment (e.g., "production", "staging", "development")""" - - event_id: Annotated[str, PropertyInfo(alias="eventId")] - """Unique event identifier (required by Sentry)""" - - exceptions: Iterable[ExceptionInfoParam] - """Exception information (primary error data)""" - - extra: Dict[str, str] - """Additional arbitrary metadata""" - - fingerprint: SequenceNotStr[str] - """Custom fingerprint for grouping""" - - identity_id: Annotated[str, PropertyInfo(alias="identityId")] - """Identity ID of the user (UUID)""" - - level: ErrorLevel - """Error severity level""" - - logger: str - """Logger name""" - - modules: Dict[str, str] - """Modules/dependencies information""" - - platform: str - """Platform identifier (required by Sentry)""" - - release: str - """Release version""" - - request: RequestInfoParam - """Request information""" - - sdk: Dict[str, str] - """SDK information""" - - server_name: Annotated[str, PropertyInfo(alias="serverName")] - """Server/host name""" - - tags: Dict[str, str] - """Tags for filtering and grouping""" - - timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """When the event occurred (required by Sentry)""" - - transaction: str - """Transaction name (e.g., route name, function name)""" diff --git a/src/gitpod/types/error_level.py b/src/gitpod/types/error_level.py deleted file mode 100644 index 573d3f85..00000000 --- a/src/gitpod/types/error_level.py +++ /dev/null @@ -1,14 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import Literal, TypeAlias - -__all__ = ["ErrorLevel"] - -ErrorLevel: TypeAlias = Literal[ - "ERROR_LEVEL_UNSPECIFIED", - "ERROR_LEVEL_DEBUG", - "ERROR_LEVEL_INFO", - "ERROR_LEVEL_WARNING", - "ERROR_LEVEL_ERROR", - "ERROR_LEVEL_FATAL", -] diff --git a/src/gitpod/types/error_report_errors_params.py b/src/gitpod/types/error_report_errors_params.py deleted file mode 100644 index 6aa61989..00000000 --- a/src/gitpod/types/error_report_errors_params.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Iterable -from typing_extensions import TypedDict - -from .error_event_param import ErrorEventParam - -__all__ = ["ErrorReportErrorsParams"] - - -class ErrorReportErrorsParams(TypedDict, total=False): - events: Iterable[ErrorEventParam] - """Error events to be reported (batch) - now using Sentry-compatible structure""" diff --git a/src/gitpod/types/event_list_response.py b/src/gitpod/types/event_list_response.py index a5d723d3..91aa3f77 100644 --- a/src/gitpod/types/event_list_response.py +++ b/src/gitpod/types/event_list_response.py @@ -2,6 +2,7 @@ from typing import Optional from datetime import datetime +from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -113,6 +114,21 @@ class EventListResponse(BaseModel): to obtain a formatter capable of generating timestamps in this format. """ + kind: Optional[ + Literal[ + "AUDIT_LOG_ENTRY_KIND_UNSPECIFIED", + "AUDIT_LOG_ENTRY_KIND_AGENT_SECURITY_EXEC_BLOCKED", + "AUDIT_LOG_ENTRY_KIND_AGENT_SECURITY_EXEC_AUDITED", + "AUDIT_LOG_ENTRY_KIND_RESOURCE_CHANGE", + "AUDIT_LOG_ENTRY_KIND_CREDENTIAL_ACCESS", + "AUDIT_LOG_ENTRY_KIND_ENVIRONMENT_VETO", + ] + ] = None + """ + AuditLogEntryKind identifies the coarse query and rendering family of an + audit-log entry. + """ + subject_id: Optional[str] = FieldInfo(alias="subjectId", default=None) subject_type: Optional[ResourceType] = FieldInfo(alias="subjectType", default=None) diff --git a/src/gitpod/types/event_retrieve_params.py b/src/gitpod/types/event_retrieve_params.py new file mode 100644 index 00000000..eec88f8e --- /dev/null +++ b/src/gitpod/types/event_retrieve_params.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["EventRetrieveParams"] + + +class EventRetrieveParams(TypedDict, total=False): + audit_log_entry_id: Required[Annotated[str, PropertyInfo(alias="auditLogEntryId")]] + """audit_log_entry_id is the ID of the audit-log entry to retrieve.""" diff --git a/src/gitpod/types/event_retrieve_response.py b/src/gitpod/types/event_retrieve_response.py new file mode 100644 index 00000000..380669c8 --- /dev/null +++ b/src/gitpod/types/event_retrieve_response.py @@ -0,0 +1,148 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .shared.principal import Principal +from .shared.resource_type import ResourceType +from .audit_log_entry_details import AuditLogEntryDetails + +__all__ = ["EventRetrieveResponse", "Entry"] + + +class Entry(BaseModel): + """entry contains the common audit-log fields also returned by ListAuditLogs.""" + + id: Optional[str] = None + + action: Optional[str] = None + + actor_id: Optional[str] = FieldInfo(alias="actorId", default=None) + + actor_principal: Optional[Principal] = FieldInfo(alias="actorPrincipal", default=None) + + created_at: Optional[datetime] = FieldInfo(alias="createdAt", default=None) + """ + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at nanosecond + resolution. The count is relative to an epoch at UTC midnight on January 1, + 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar + backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a + [24-hour linear smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + Example 5: Compute Timestamp from Java `Instant.now()`. + + Instant now = Instant.now(); + + Timestamp timestamp = + Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + .setNanos(now.getNano()).build(); + + Example 6: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is + "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always + expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are + zero-padded to two digits each. The fractional seconds, which can go up to 9 + digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix + indicates the timezone ("UTC"); the timezone is required. A proto3 JSON + serializer should always use UTC (as indicated by "Z") when printing the + Timestamp type and a proto3 JSON parser should be able to accept both UTC and + other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on + January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted to + this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the + time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the + Joda Time's + [`ISODateTimeFormat.dateTime()`]() + to obtain a formatter capable of generating timestamps in this format. + """ + + kind: Optional[ + Literal[ + "AUDIT_LOG_ENTRY_KIND_UNSPECIFIED", + "AUDIT_LOG_ENTRY_KIND_AGENT_SECURITY_EXEC_BLOCKED", + "AUDIT_LOG_ENTRY_KIND_AGENT_SECURITY_EXEC_AUDITED", + "AUDIT_LOG_ENTRY_KIND_RESOURCE_CHANGE", + "AUDIT_LOG_ENTRY_KIND_CREDENTIAL_ACCESS", + "AUDIT_LOG_ENTRY_KIND_ENVIRONMENT_VETO", + ] + ] = None + """ + AuditLogEntryKind identifies the coarse query and rendering family of an + audit-log entry. + """ + + subject_id: Optional[str] = FieldInfo(alias="subjectId", default=None) + + subject_type: Optional[ResourceType] = FieldInfo(alias="subjectType", default=None) + + +class EventRetrieveResponse(BaseModel): + entry: Entry + """entry contains the common audit-log fields also returned by ListAuditLogs.""" + + details: Optional[AuditLogEntryDetails] = None + """ + details contains typed evidence captured with the audit entry. It is absent when + the entry has no supported, valid details. + """ diff --git a/src/gitpod/types/exception_info_param.py b/src/gitpod/types/exception_info_param.py deleted file mode 100644 index ee6f2291..00000000 --- a/src/gitpod/types/exception_info_param.py +++ /dev/null @@ -1,34 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Iterable -from typing_extensions import Annotated, TypedDict - -from .._utils import PropertyInfo -from .stack_frame_param import StackFrameParam -from .exception_mechanism_param import ExceptionMechanismParam - -__all__ = ["ExceptionInfoParam"] - - -class ExceptionInfoParam(TypedDict, total=False): - """Exception information (Sentry-compatible)""" - - mechanism: ExceptionMechanismParam - """Exception mechanism""" - - module: str - """Module or package where the exception type is defined""" - - stacktrace: Iterable[StackFrameParam] - """Stack trace frames""" - - thread_id: Annotated[str, PropertyInfo(alias="threadId")] - """Thread ID if applicable""" - - type: str - """Exception type/class name""" - - value: str - """Exception message/value""" diff --git a/src/gitpod/types/exception_mechanism_param.py b/src/gitpod/types/exception_mechanism_param.py deleted file mode 100644 index 1fd017ac..00000000 --- a/src/gitpod/types/exception_mechanism_param.py +++ /dev/null @@ -1,27 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Dict -from typing_extensions import TypedDict - -__all__ = ["ExceptionMechanismParam"] - - -class ExceptionMechanismParam(TypedDict, total=False): - """Exception mechanism information (Sentry-compatible)""" - - data: Dict[str, str] - """Additional mechanism-specific data""" - - description: str - """Human-readable description of the mechanism""" - - handled: bool - """Whether the exception was handled by user code""" - - synthetic: bool - """Whether this is a synthetic exception (created by SDK)""" - - type: str - """Type of mechanism (e.g., "generic", "promise", "onerror")""" diff --git a/src/gitpod/types/goal_status.py b/src/gitpod/types/goal_status.py new file mode 100644 index 00000000..b5fd18f1 --- /dev/null +++ b/src/gitpod/types/goal_status.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["GoalStatus"] + +GoalStatus: TypeAlias = Literal[ + "GOAL_STATUS_UNSPECIFIED", + "GOAL_STATUS_ACTIVE", + "GOAL_STATUS_PAUSED", + "GOAL_STATUS_COMPLETED", + "GOAL_STATUS_BUDGET_EXHAUSTED", + "GOAL_STATUS_BLOCKED", + "GOAL_STATUS_USAGE_LIMITED", +] diff --git a/src/gitpod/types/organizations/__init__.py b/src/gitpod/types/organizations/__init__.py index 2dd4f126..8ceaed9c 100644 --- a/src/gitpod/types/organizations/__init__.py +++ b/src/gitpod/types/organizations/__init__.py @@ -7,6 +7,7 @@ from .provider_type import ProviderType as ProviderType from .veto_exec_policy import VetoExecPolicy as VetoExecPolicy from .sso_configuration import SSOConfiguration as SSOConfiguration +from .codex_model_policy import CodexModelPolicy as CodexModelPolicy from .scim_configuration import ScimConfiguration as ScimConfiguration from .announcement_banner import AnnouncementBanner as AnnouncementBanner from .crowd_strike_config import CrowdStrikeConfig as CrowdStrikeConfig @@ -19,15 +20,14 @@ from .custom_domain_provider import CustomDomainProvider as CustomDomainProvider from .invite_create_response import InviteCreateResponse as InviteCreateResponse from .invite_retrieve_params import InviteRetrieveParams as InviteRetrieveParams -from .kernel_controls_action import KernelControlsAction as KernelControlsAction from .policy_retrieve_params import PolicyRetrieveParams as PolicyRetrieveParams from .veto_exec_policy_param import VetoExecPolicyParam as VetoExecPolicyParam from .sso_configuration_state import SSOConfigurationState as SSOConfigurationState +from .codex_model_policy_param import CodexModelPolicyParam as CodexModelPolicyParam from .invite_retrieve_response import InviteRetrieveResponse as InviteRetrieveResponse from .policy_retrieve_response import PolicyRetrieveResponse as PolicyRetrieveResponse from .domain_verification_state import DomainVerificationState as DomainVerificationState from .invite_get_summary_params import InviteGetSummaryParams as InviteGetSummaryParams -from .project_creation_defaults import ProjectCreationDefaults as ProjectCreationDefaults from .conversation_sharing_policy import ConversationSharingPolicy as ConversationSharingPolicy from .custom_domain_create_params import CustomDomainCreateParams as CustomDomainCreateParams from .custom_domain_delete_params import CustomDomainDeleteParams as CustomDomainDeleteParams diff --git a/src/gitpod/types/organizations/agent_policy.py b/src/gitpod/types/organizations/agent_policy.py index 28c4315a..36b4fe4f 100644 --- a/src/gitpod/types/organizations/agent_policy.py +++ b/src/gitpod/types/organizations/agent_policy.py @@ -5,7 +5,11 @@ from pydantic import Field as FieldInfo from ..._models import BaseModel +from .codex_model_policy import CodexModelPolicy +from ..shared.codex_openai_model import CodexOpenAIModel +from ..shared.codex_service_tier import CodexServiceTier from .conversation_sharing_policy import ConversationSharingPolicy +from ..shared.codex_reasoning_effort import CodexReasoningEffort __all__ = ["AgentPolicy"] @@ -31,6 +35,43 @@ class AgentPolicy(BaseModel): disabled for agents """ + allowed_agent_ids: Optional[List[str]] = FieldInfo(alias="allowedAgentIds", default=None) + """ + allowed_agent_ids contains the agent IDs users may select when the codex_rollout + feature flag is enabled. Empty means all agents are allowed. + """ + + allowed_codex_models: Optional[List[CodexOpenAIModel]] = FieldInfo(alias="allowedCodexModels", default=None) + """Deprecated: use codex_model_policy. + + This legacy allowlist cannot distinguish omitted from intentionally empty on + update requests. Empty means all Codex models are allowed. + """ + + allowed_codex_reasoning_efforts: Optional[List[CodexReasoningEffort]] = FieldInfo( + alias="allowedCodexReasoningEfforts", default=None + ) + """ + allowed_codex_reasoning_efforts contains the Codex reasoning efforts users may + select when the codex_rollout feature flag is enabled. Empty means all Codex + reasoning efforts are allowed. + """ + + allowed_codex_service_tiers: Optional[List[CodexServiceTier]] = FieldInfo( + alias="allowedCodexServiceTiers", default=None + ) + """ + allowed_codex_service_tiers contains the Codex service tiers users may select + when the codex_rollout feature flag is enabled. Empty means all Codex service + tiers are allowed. + """ + + codex_model_policy: Optional[CodexModelPolicy] = FieldInfo(alias="codexModelPolicy", default=None) + """ + codex_model_policy contains explicit per-model Codex availability states. + Missing policy or missing model entries mean allowed. + """ + conversation_sharing_policy: Optional[ConversationSharingPolicy] = FieldInfo( alias="conversationSharingPolicy", default=None ) diff --git a/src/gitpod/types/organizations/codex_model_policy.py b/src/gitpod/types/organizations/codex_model_policy.py new file mode 100644 index 00000000..e139d624 --- /dev/null +++ b/src/gitpod/types/organizations/codex_model_policy.py @@ -0,0 +1,29 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, Optional +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["CodexModelPolicy"] + + +class CodexModelPolicy(BaseModel): + """CodexModelPolicy controls per-model availability for Codex.""" + + api_model_states: Optional[ + Dict[ + str, + Literal[ + "CODEX_MODEL_POLICY_STATE_UNSPECIFIED", + "CODEX_MODEL_POLICY_STATE_ALLOWED", + "CODEX_MODEL_POLICY_STATE_DISABLED", + ], + ] + ] = FieldInfo(alias="modelStates", default=None) + """ + model_states maps CodexOpenAIModel enum names to explicit policy states. Missing + entries are treated as allowed. + """ diff --git a/src/gitpod/types/organizations/codex_model_policy_param.py b/src/gitpod/types/organizations/codex_model_policy_param.py new file mode 100644 index 00000000..87a308dc --- /dev/null +++ b/src/gitpod/types/organizations/codex_model_policy_param.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Dict +from typing_extensions import Literal, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["CodexModelPolicyParam"] + + +class CodexModelPolicyParam(TypedDict, total=False): + """CodexModelPolicy controls per-model availability for Codex.""" + + model_states: Annotated[ + Dict[ + str, + Literal[ + "CODEX_MODEL_POLICY_STATE_UNSPECIFIED", + "CODEX_MODEL_POLICY_STATE_ALLOWED", + "CODEX_MODEL_POLICY_STATE_DISABLED", + ], + ], + PropertyInfo(alias="modelStates"), + ] + """ + model_states maps CodexOpenAIModel enum names to explicit policy states. Missing + entries are treated as allowed. + """ diff --git a/src/gitpod/types/organizations/organization_policies.py b/src/gitpod/types/organizations/organization_policies.py index a988d81e..8f99a37a 100644 --- a/src/gitpod/types/organizations/organization_policies.py +++ b/src/gitpod/types/organizations/organization_policies.py @@ -8,7 +8,6 @@ from .agent_policy import AgentPolicy from .veto_exec_policy import VetoExecPolicy from .security_agent_policy import SecurityAgentPolicy -from .project_creation_defaults import ProjectCreationDefaults __all__ = ["OrganizationPolicies", "EditorVersionRestrictions"] @@ -53,6 +52,12 @@ class OrganizationPolicies(BaseModel): repo """ + disable_from_scratch: bool = FieldInfo(alias="disableFromScratch") + """ + disable_from_scratch controls whether non-admin users can create blank + environments without a Git or URL initializer. + """ + maximum_environments_per_user: str = FieldInfo(alias="maximumEnvironmentsPerUser") """ maximum_environments_per_user limits total environments (running or stopped) per @@ -97,6 +102,12 @@ class OrganizationPolicies(BaseModel): the organization, only users provisioned via SCIM can create accounts. """ + web_browser_disabled: bool = FieldInfo(alias="webBrowserDisabled") + """ + web_browser_disabled controls whether users can open the built-in web browser + from environment pages. This does not affect VS Code Browser. + """ + delete_archived_environments_after: Optional[str] = FieldInfo(alias="deleteArchivedEnvironmentsAfter", default=None) """ delete_archived_environments_after controls how long archived environments are @@ -133,14 +144,6 @@ class OrganizationPolicies(BaseModel): ``` """ - project_creation_defaults: Optional[ProjectCreationDefaults] = FieldInfo( - alias="projectCreationDefaults", default=None - ) - """ - project_creation_defaults contains default settings applied to newly created - projects. - """ - security_agent_policy: Optional[SecurityAgentPolicy] = FieldInfo(alias="securityAgentPolicy", default=None) """ security_agent_policy contains security agent configuration for the @@ -148,5 +151,14 @@ class OrganizationPolicies(BaseModel): environments. """ + security_policy_id: Optional[str] = FieldInfo(alias="securityPolicyId", default=None) + """ + security_policy_id references the Veto Exec SecurityPolicy assigned to newly + created environments. The public GA contract accepts policies that use only + SecurityPolicy.Spec.executables. Assignment validates materializability and + rejects unsupported executable selectors or effects. If empty, new environments + have no SecurityPolicy by default. + """ + veto_exec_policy: Optional[VetoExecPolicy] = FieldInfo(alias="vetoExecPolicy", default=None) """veto_exec_policy contains the veto exec policy for environments.""" diff --git a/src/gitpod/types/organizations/policy_update_params.py b/src/gitpod/types/organizations/policy_update_params.py index 3c1046c9..5ab015ad 100644 --- a/src/gitpod/types/organizations/policy_update_params.py +++ b/src/gitpod/types/organizations/policy_update_params.py @@ -2,20 +2,23 @@ from __future__ import annotations -from typing import Dict, Optional +from typing import Dict, List, Optional from typing_extensions import Required, Annotated, TypedDict from ..._types import SequenceNotStr from ..._utils import PropertyInfo from ..admission_level import AdmissionLevel from .veto_exec_policy_param import VetoExecPolicyParam +from .codex_model_policy_param import CodexModelPolicyParam +from ..shared.codex_openai_model import CodexOpenAIModel +from ..shared.codex_service_tier import CodexServiceTier from .conversation_sharing_policy import ConversationSharingPolicy +from ..shared.codex_reasoning_effort import CodexReasoningEffort __all__ = [ "PolicyUpdateParams", "AgentPolicy", "EditorVersionRestrictions", - "ProjectCreationDefaults", "SecurityAgentPolicy", "SecurityAgentPolicyCrowdstrike", ] @@ -59,6 +62,12 @@ class PolicyUpdateParams(TypedDict, total=False): is 4 weeks (2419200 seconds). """ + disable_from_scratch: Annotated[Optional[bool], PropertyInfo(alias="disableFromScratch")] + """ + disable_from_scratch controls whether non-admin users can create blank + environments without a Git or URL initializer. + """ + editor_version_restrictions: Annotated[ Dict[str, EditorVersionRestrictions], PropertyInfo(alias="editorVersionRestrictions") ] @@ -124,14 +133,6 @@ class PolicyUpdateParams(TypedDict, total=False): from this policy. """ - project_creation_defaults: Annotated[ - Optional[ProjectCreationDefaults], PropertyInfo(alias="projectCreationDefaults") - ] - """ - project_creation_defaults contains updates to default settings applied to newly - created projects. - """ - require_custom_domain_access: Annotated[Optional[bool], PropertyInfo(alias="requireCustomDomainAccess")] """ require_custom_domain_access controls whether users must access via custom @@ -148,13 +149,64 @@ class PolicyUpdateParams(TypedDict, total=False): security_agent_policy: Annotated[Optional[SecurityAgentPolicy], PropertyInfo(alias="securityAgentPolicy")] """security_agent_policy contains security agent configuration updates""" + security_policy_id: Annotated[Optional[str], PropertyInfo(alias="securityPolicyId")] + """ + security_policy_id assigns a Veto Exec SecurityPolicy to newly created + environments. The public GA contract accepts policies that use only + SecurityPolicy.Spec.executables. Assignment validates materializability and + rejects unsupported executable selectors or effects. Set this field to an empty + string to clear the default assignment. + """ + veto_exec_policy: Annotated[Optional[VetoExecPolicyParam], PropertyInfo(alias="vetoExecPolicy")] """veto_exec_policy contains the veto exec policy for environments.""" + web_browser_disabled: Annotated[Optional[bool], PropertyInfo(alias="webBrowserDisabled")] + """ + web_browser_disabled controls whether users can open the built-in web browser + from environment pages. This does not affect VS Code Browser. + """ + class AgentPolicy(TypedDict, total=False): """agent_policy contains agent-specific policy settings""" + allowed_agent_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="allowedAgentIds")] + """ + allowed_agent_ids contains the agent IDs users may select when the codex_rollout + feature flag is enabled. Empty means all agents are allowed. + """ + + allowed_codex_models: Annotated[List[CodexOpenAIModel], PropertyInfo(alias="allowedCodexModels")] + """Deprecated: use codex_model_policy. + + This legacy allowlist cannot distinguish omitted from intentionally empty on + update requests. Empty means all Codex models are allowed. + """ + + allowed_codex_reasoning_efforts: Annotated[ + List[CodexReasoningEffort], PropertyInfo(alias="allowedCodexReasoningEfforts") + ] + """ + allowed_codex_reasoning_efforts contains the Codex reasoning efforts users may + select when the codex_rollout feature flag is enabled. Empty means all Codex + reasoning efforts are allowed. + """ + + allowed_codex_service_tiers: Annotated[List[CodexServiceTier], PropertyInfo(alias="allowedCodexServiceTiers")] + """ + allowed_codex_service_tiers contains the Codex service tiers users may select + when the codex_rollout feature flag is enabled. Empty means all Codex service + tiers are allowed. + """ + + codex_model_policy: Annotated[CodexModelPolicyParam, PropertyInfo(alias="codexModelPolicy")] + """ + codex_model_policy contains explicit per-model Codex availability states. Omit + to leave the current model policy unchanged. Send an empty policy to clear + explicit model states. + """ + command_deny_list: Annotated[SequenceNotStr[str], PropertyInfo(alias="commandDenyList")] """ command_deny_list contains a list of commands that agents are not allowed to @@ -204,18 +256,6 @@ class EditorVersionRestrictions(TypedDict, total=False): """ -class ProjectCreationDefaults(TypedDict, total=False): - """ - project_creation_defaults contains updates to default settings applied to newly created projects. - """ - - insights_enabled: Annotated[Optional[bool], PropertyInfo(alias="insightsEnabled")] - """ - insights_enabled controls whether Insights (co-author attribution) is - automatically enabled on newly created projects. - """ - - class SecurityAgentPolicyCrowdstrike(TypedDict, total=False): """crowdstrike contains CrowdStrike Falcon configuration updates""" diff --git a/src/gitpod/types/organizations/project_creation_defaults.py b/src/gitpod/types/organizations/project_creation_defaults.py deleted file mode 100644 index 96b610e0..00000000 --- a/src/gitpod/types/organizations/project_creation_defaults.py +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["ProjectCreationDefaults"] - - -class ProjectCreationDefaults(BaseModel): - """ - ProjectCreationDefaults contains default settings applied to newly created projects. - """ - - insights_enabled: Optional[bool] = FieldInfo(alias="insightsEnabled", default=None) - """ - insights_enabled controls whether Insights (co-author attribution) is - automatically enabled on newly created projects. - """ diff --git a/src/gitpod/types/organizations/veto_exec_policy.py b/src/gitpod/types/organizations/veto_exec_policy.py index 05e22cbd..1bc599e7 100644 --- a/src/gitpod/types/organizations/veto_exec_policy.py +++ b/src/gitpod/types/organizations/veto_exec_policy.py @@ -3,7 +3,7 @@ from typing import List, Optional from ..._models import BaseModel -from .kernel_controls_action import KernelControlsAction +from ..shared.kernel_controls_action import KernelControlsAction __all__ = ["VetoExecPolicy"] diff --git a/src/gitpod/types/organizations/veto_exec_policy_param.py b/src/gitpod/types/organizations/veto_exec_policy_param.py index c328c5c2..03a20812 100644 --- a/src/gitpod/types/organizations/veto_exec_policy_param.py +++ b/src/gitpod/types/organizations/veto_exec_policy_param.py @@ -5,7 +5,7 @@ from typing_extensions import TypedDict from ..._types import SequenceNotStr -from .kernel_controls_action import KernelControlsAction +from ..shared.kernel_controls_action import KernelControlsAction __all__ = ["VetoExecPolicyParam"] diff --git a/src/gitpod/types/pr_summary.py b/src/gitpod/types/pr_summary.py new file mode 100644 index 00000000..4ae37e26 --- /dev/null +++ b/src/gitpod/types/pr_summary.py @@ -0,0 +1,52 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel + +__all__ = ["PrSummary"] + + +class PrSummary(BaseModel): + """PrSummary contains aggregate PR speed metrics for a date range.""" + + deployment_frequency: Optional[float] = FieldInfo(alias="deploymentFrequency", default=None) + """PRs merged to the default branch per week.""" + + deployment_frequency_trend: Optional[float] = FieldInfo(alias="deploymentFrequencyTrend", default=None) + """ + Fractional change in deployment_frequency vs previous period. Computed as + (current - previous) / previous. + """ + + lead_time_seconds: Optional[float] = FieldInfo(alias="leadTimeSeconds", default=None) + """Median lead time for changes in seconds (first commit → merge).""" + + lead_time_trend: Optional[float] = FieldInfo(alias="leadTimeTrend", default=None) + """ + Fractional change in lead_time_seconds vs previous period. Computed as + (current - previous) / previous. + """ + + prs_merged_count: Optional[str] = FieldInfo(alias="prsMergedCount", default=None) + """Total PRs merged in the date range.""" + + prs_merged_trend: Optional[float] = FieldInfo(alias="prsMergedTrend", default=None) + """ + Fractional change in prs_merged_count vs previous period. Computed as (current - + previous) / previous. + """ + + time_to_first_approval_seconds: Optional[float] = FieldInfo(alias="timeToFirstApprovalSeconds", default=None) + """ + Median time to first approval in seconds. Zero when no PRs in the range had + approvals. + """ + + time_to_first_approval_trend: Optional[float] = FieldInfo(alias="timeToFirstApprovalTrend", default=None) + """ + Fractional change in time_to_first_approval_seconds vs previous period. Computed + as (current - previous) / previous. + """ diff --git a/src/gitpod/types/pr_time_bucket.py b/src/gitpod/types/pr_time_bucket.py new file mode 100644 index 00000000..2eefacb3 --- /dev/null +++ b/src/gitpod/types/pr_time_bucket.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel + +__all__ = ["PrTimeBucket"] + + +class PrTimeBucket(BaseModel): + """PrTimeBucket contains PR speed metrics for a single time period.""" + + deploys: Optional[str] = None + """Total number of deploys (merged PRs) in this bucket.""" + + lead_time_seconds: Optional[float] = FieldInfo(alias="leadTimeSeconds", default=None) + """Median lead time in seconds for PRs merged in this bucket.""" + + prs_merged_count: Optional[str] = FieldInfo(alias="prsMergedCount", default=None) + """Number of PRs merged in this bucket.""" + + start_time: Optional[datetime] = FieldInfo(alias="startTime", default=None) + """Start of this time bucket.""" + + time_to_first_approval_seconds: Optional[float] = FieldInfo(alias="timeToFirstApprovalSeconds", default=None) + """ + Median time to first approval in seconds for PRs in this bucket. Zero when no + PRs in the bucket had approvals. + """ diff --git a/src/gitpod/types/process.py b/src/gitpod/types/process.py new file mode 100644 index 00000000..75222167 --- /dev/null +++ b/src/gitpod/types/process.py @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from pydantic import Field as FieldInfo + +from .._models import BaseModel + +__all__ = ["Process"] + + +class Process(BaseModel): + """Process describes process metadata for a security event. + + PID fields use int32 to match the kernel's pid_t (signed int). + Linux PID max is 4,194,304 (2^22), well within int32 range. + Postgres has no unsigned integer type: Ent maps uint32 to bigint + (8 bytes) while int32 maps to integer (4 bytes). Using int32 + aligns proto, Go, and Postgres types without wasting storage. + """ + + name: Optional[str] = None + """name is the process name (comm). 2x kernel TASK_COMM_LEN=16""" + + pgid: Optional[int] = None + """pgid is the process group ID.""" + + pid: Optional[int] = None + """pid is the userspace process ID (kernel thread group ID, tgid).""" + + ppid: Optional[int] = None + """ppid is the parent process ID.""" + + sid: Optional[int] = None + """sid is the session ID.""" + + started_at: Optional[datetime] = FieldInfo(alias="startedAt", default=None) + """started_at is when the process started.""" + + tid: Optional[int] = None + """tid is the userspace thread ID (kernel pid).""" diff --git a/src/gitpod/types/request_info_param.py b/src/gitpod/types/request_info_param.py deleted file mode 100644 index 8e764855..00000000 --- a/src/gitpod/types/request_info_param.py +++ /dev/null @@ -1,29 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Dict -from typing_extensions import Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["RequestInfoParam"] - - -class RequestInfoParam(TypedDict, total=False): - """Request information (Sentry-compatible)""" - - data: str - """Request body (truncated if large)""" - - headers: Dict[str, str] - """Request headers""" - - method: str - """HTTP method""" - - query_string: Annotated[Dict[str, str], PropertyInfo(alias="queryString")] - """Query parameters""" - - url: str - """Request URL""" diff --git a/src/gitpod/types/resolution.py b/src/gitpod/types/resolution.py new file mode 100644 index 00000000..b28e212e --- /dev/null +++ b/src/gitpod/types/resolution.py @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["Resolution"] + +Resolution: TypeAlias = Literal[ + "RESOLUTION_UNSPECIFIED", "RESOLUTION_HOURLY", "RESOLUTION_DAILY", "RESOLUTION_WEEKLY", "RESOLUTION_MONTHLY" +] diff --git a/src/gitpod/types/runner_capability.py b/src/gitpod/types/runner_capability.py index c2df28c5..911a89a7 100644 --- a/src/gitpod/types/runner_capability.py +++ b/src/gitpod/types/runner_capability.py @@ -21,4 +21,7 @@ "RUNNER_CAPABILITY_PORT_AUTHENTICATION", "RUNNER_CAPABILITY_HORIZONTAL_SCALING", "RUNNER_CAPABILITY_AGENT_EXECUTION_CNF", + "RUNNER_CAPABILITY_REDIS_STREAM", + "RUNNER_CAPABILITY_BASE_SNAPSHOT", + "RUNNER_CAPABILITY_DYNAMIC_LLM_REQUEST_HEADERS", ] diff --git a/src/gitpod/types/secret.py b/src/gitpod/types/secret.py index 92a977c6..528bb970 100644 --- a/src/gitpod/types/secret.py +++ b/src/gitpod/types/secret.py @@ -9,7 +9,7 @@ from .secret_scope import SecretScope from .shared.subject import Subject -__all__ = ["Secret", "CredentialProxy"] +__all__ = ["Secret", "CredentialProxy", "Source", "SourceOidcJfrog"] class CredentialProxy(BaseModel): @@ -33,6 +33,26 @@ class CredentialProxy(BaseModel): """ +class SourceOidcJfrog(BaseModel): + host: Optional[str] = None + """host must be a hostname or IP address with optional port: + + ``` + this.matches("^([A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?[.])*[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(:([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$") + ``` + """ + + provider_name: Optional[str] = FieldInfo(alias="providerName", default=None) + + +class Source(BaseModel): + """Source of the secret""" + + oidc_jfrog: Optional[SourceOidcJfrog] = FieldInfo(alias="oidcJfrog", default=None) + + verbatim: Optional[bool] = None + + class Secret(BaseModel): id: Optional[str] = None @@ -164,6 +184,9 @@ class Secret(BaseModel): scope: Optional[SecretScope] = None + source: Optional[Source] = None + """Source of the secret""" + updated_at: Optional[datetime] = FieldInfo(alias="updatedAt", default=None) """ A Timestamp represents a point in time independent of any time zone or local diff --git a/src/gitpod/types/secret_create_params.py b/src/gitpod/types/secret_create_params.py index a00660b1..a72d473b 100644 --- a/src/gitpod/types/secret_create_params.py +++ b/src/gitpod/types/secret_create_params.py @@ -8,7 +8,7 @@ from .._utils import PropertyInfo from .secret_scope_param import SecretScopeParam -__all__ = ["SecretCreateParams", "CredentialProxy"] +__all__ = ["SecretCreateParams", "CredentialProxy", "Source", "SourceOidcJfrog"] class SecretCreateParams(TypedDict, total=False): @@ -61,8 +61,14 @@ class SecretCreateParams(TypedDict, total=False): scope: SecretScopeParam """scope is the scope of the secret""" + source: Source + """source is the source of the secret, possibly verbatim value""" + value: str - """value is the plaintext value of the secret""" + """value is the plaintext value of the secret. + + When set, source must be unset or verbatim. + """ class CredentialProxy(TypedDict, total=False): @@ -84,3 +90,23 @@ class CredentialProxy(TypedDict, total=False): target_hosts lists the hostnames to intercept (for example "github.com" or "\\**.github.com"). Wildcards are subdomain-only and do not match the apex domain. """ + + +class SourceOidcJfrog(TypedDict, total=False): + host: str + """host must be a hostname or IP address with optional port: + + ``` + this.matches("^([A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?[.])*[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(:([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$") + ``` + """ + + provider_name: Annotated[str, PropertyInfo(alias="providerName")] + + +class Source(TypedDict, total=False): + """source is the source of the secret, possibly verbatim value""" + + oidc_jfrog: Annotated[SourceOidcJfrog, PropertyInfo(alias="oidcJfrog")] + + verbatim: bool diff --git a/src/gitpod/types/security_policy.py b/src/gitpod/types/security_policy.py new file mode 100644 index 00000000..1bbe0b7f --- /dev/null +++ b/src/gitpod/types/security_policy.py @@ -0,0 +1,260 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from .._models import BaseModel + +__all__ = ["SecurityPolicy", "Metadata", "Spec", "SpecExecutables", "SpecExecutablesRule"] + + +class Metadata(BaseModel): + name: Optional[str] = None + + +class SpecExecutablesRule(BaseModel): + effect: Optional[Literal["EFFECT_UNSPECIFIED", "EFFECT_ALLOW", "EFFECT_BLOCK", "EFFECT_AUDIT"]] = None + """effect must be EFFECT_AUDIT or EFFECT_BLOCK. + + EFFECT_ALLOW is not supported on an executable rule. + """ + + path: Optional[str] = None + """ + path is either an absolute executable path, such as /usr/bin/curl, or a bare + executable name, such as npx. Bare names are expanded by runtime discovery. + Surrounding whitespace is ignored. Empty or whitespace-only selectors and + relative paths with directory separators are invalid. Enforcement uses + executable content hashes, so different paths with identical content share one + runtime decision and block wins conflicts. + """ + + +class SpecExecutables(BaseModel): + """executables is the public Veto Exec GA policy surface.""" + + default_effect: Optional[Literal["EFFECT_UNSPECIFIED", "EFFECT_ALLOW", "EFFECT_BLOCK", "EFFECT_AUDIT"]] = FieldInfo( + alias="defaultEffect", default=None + ) + """ + default_effect controls executables that do not match a rule. For Veto Exec, + omit this field or set it to EFFECT_ALLOW. EFFECT_UNSPECIFIED is normalized to + EFFECT_ALLOW. + """ + + rules: Optional[List[SpecExecutablesRule]] = None + """rules contains executable-specific audit or block decisions.""" + + +class Spec(BaseModel): + """Mandate/deploy security agents, e.g. + + CrowdStrike. + Mandate credential security/proxy use. + These can be modeled later as explicit fields if needed. + """ + + executables: Optional[SpecExecutables] = None + """executables is the public Veto Exec GA policy surface.""" + + +class SecurityPolicy(BaseModel): + metadata: Metadata + + spec: Spec + """Mandate/deploy security agents, e.g. + + CrowdStrike. Mandate credential security/proxy use. These can be modeled later + as explicit fields if needed. + """ + + id: Optional[str] = None + + created_at: Optional[datetime] = FieldInfo(alias="createdAt", default=None) + """ + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at nanosecond + resolution. The count is relative to an epoch at UTC midnight on January 1, + 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar + backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a + [24-hour linear smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + Example 5: Compute Timestamp from Java `Instant.now()`. + + Instant now = Instant.now(); + + Timestamp timestamp = + Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + .setNanos(now.getNano()).build(); + + Example 6: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is + "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always + expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are + zero-padded to two digits each. The fractional seconds, which can go up to 9 + digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix + indicates the timezone ("UTC"); the timezone is required. A proto3 JSON + serializer should always use UTC (as indicated by "Z") when printing the + Timestamp type and a proto3 JSON parser should be able to accept both UTC and + other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on + January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted to + this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the + time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the + Joda Time's + [`ISODateTimeFormat.dateTime()`]() + to obtain a formatter capable of generating timestamps in this format. + """ + + organization_id: Optional[str] = FieldInfo(alias="organizationId", default=None) + + updated_at: Optional[datetime] = FieldInfo(alias="updatedAt", default=None) + """ + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at nanosecond + resolution. The count is relative to an epoch at UTC midnight on January 1, + 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar + backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a + [24-hour linear smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + Example 5: Compute Timestamp from Java `Instant.now()`. + + Instant now = Instant.now(); + + Timestamp timestamp = + Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + .setNanos(now.getNano()).build(); + + Example 6: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is + "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always + expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are + zero-padded to two digits each. The fractional seconds, which can go up to 9 + digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix + indicates the timezone ("UTC"); the timezone is required. A proto3 JSON + serializer should always use UTC (as indicated by "Z") when printing the + Timestamp type and a proto3 JSON parser should be able to accept both UTC and + other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on + January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted to + this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the + time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the + Joda Time's + [`ISODateTimeFormat.dateTime()`]() + to obtain a formatter capable of generating timestamps in this format. + """ diff --git a/src/gitpod/types/security_policy_create_params.py b/src/gitpod/types/security_policy_create_params.py new file mode 100644 index 00000000..b633c65e --- /dev/null +++ b/src/gitpod/types/security_policy_create_params.py @@ -0,0 +1,74 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["SecurityPolicyCreateParams", "Metadata", "Spec", "SpecExecutables", "SpecExecutablesRule"] + + +class SecurityPolicyCreateParams(TypedDict, total=False): + metadata: Required[Metadata] + + spec: Required[Spec] + """Mandate/deploy security agents, e.g. + + CrowdStrike. Mandate credential security/proxy use. These can be modeled later + as explicit fields if needed. + """ + + organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + + +class Metadata(TypedDict, total=False): + name: str + + +class SpecExecutablesRule(TypedDict, total=False): + effect: Literal["EFFECT_UNSPECIFIED", "EFFECT_ALLOW", "EFFECT_BLOCK", "EFFECT_AUDIT"] + """effect must be EFFECT_AUDIT or EFFECT_BLOCK. + + EFFECT_ALLOW is not supported on an executable rule. + """ + + path: str + """ + path is either an absolute executable path, such as /usr/bin/curl, or a bare + executable name, such as npx. Bare names are expanded by runtime discovery. + Surrounding whitespace is ignored. Empty or whitespace-only selectors and + relative paths with directory separators are invalid. Enforcement uses + executable content hashes, so different paths with identical content share one + runtime decision and block wins conflicts. + """ + + +class SpecExecutables(TypedDict, total=False): + """executables is the public Veto Exec GA policy surface.""" + + default_effect: Annotated[ + Literal["EFFECT_UNSPECIFIED", "EFFECT_ALLOW", "EFFECT_BLOCK", "EFFECT_AUDIT"], + PropertyInfo(alias="defaultEffect"), + ] + """ + default_effect controls executables that do not match a rule. For Veto Exec, + omit this field or set it to EFFECT_ALLOW. EFFECT_UNSPECIFIED is normalized to + EFFECT_ALLOW. + """ + + rules: Iterable[SpecExecutablesRule] + """rules contains executable-specific audit or block decisions.""" + + +class Spec(TypedDict, total=False): + """Mandate/deploy security agents, e.g. + + CrowdStrike. + Mandate credential security/proxy use. + These can be modeled later as explicit fields if needed. + """ + + executables: SpecExecutables + """executables is the public Veto Exec GA policy surface.""" diff --git a/src/gitpod/types/security_policy_create_response.py b/src/gitpod/types/security_policy_create_response.py new file mode 100644 index 00000000..c729e883 --- /dev/null +++ b/src/gitpod/types/security_policy_create_response.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .security_policy import SecurityPolicy + +__all__ = ["SecurityPolicyCreateResponse"] + + +class SecurityPolicyCreateResponse(BaseModel): + security_policy: SecurityPolicy = FieldInfo(alias="securityPolicy") diff --git a/src/gitpod/types/security_policy_delete_params.py b/src/gitpod/types/security_policy_delete_params.py new file mode 100644 index 00000000..ab3f14f9 --- /dev/null +++ b/src/gitpod/types/security_policy_delete_params.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["SecurityPolicyDeleteParams"] + + +class SecurityPolicyDeleteParams(TypedDict, total=False): + security_policy_id: Annotated[str, PropertyInfo(alias="securityPolicyId")] diff --git a/src/gitpod/types/security_policy_list_params.py b/src/gitpod/types/security_policy_list_params.py new file mode 100644 index 00000000..7920e4ea --- /dev/null +++ b/src/gitpod/types/security_policy_list_params.py @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Annotated, TypedDict + +from .._types import SequenceNotStr +from .._utils import PropertyInfo + +__all__ = ["SecurityPolicyListParams", "Filter", "Pagination"] + + +class SecurityPolicyListParams(TypedDict, total=False): + token: str + + page_size: Annotated[int, PropertyInfo(alias="pageSize")] + + filter: Filter + + pagination: Pagination + + +class Filter(TypedDict, total=False): + organization_id: Annotated[str, PropertyInfo(alias="organizationId")] + + search: str + + security_policy_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="securityPolicyIds")] + + +class Pagination(TypedDict, total=False): + token: str + """ + Token for the next set of results that was returned as next_token of a + PaginationResponse + """ + + page_size: Annotated[int, PropertyInfo(alias="pageSize")] + """Page size is the maximum number of results to retrieve per page. Defaults to 25. + + Maximum 100. + """ diff --git a/src/gitpod/types/security_policy_retrieve_params.py b/src/gitpod/types/security_policy_retrieve_params.py new file mode 100644 index 00000000..06180272 --- /dev/null +++ b/src/gitpod/types/security_policy_retrieve_params.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["SecurityPolicyRetrieveParams"] + + +class SecurityPolicyRetrieveParams(TypedDict, total=False): + security_policy_id: Annotated[str, PropertyInfo(alias="securityPolicyId")] diff --git a/src/gitpod/types/security_policy_retrieve_response.py b/src/gitpod/types/security_policy_retrieve_response.py new file mode 100644 index 00000000..c04dd713 --- /dev/null +++ b/src/gitpod/types/security_policy_retrieve_response.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .security_policy import SecurityPolicy + +__all__ = ["SecurityPolicyRetrieveResponse"] + + +class SecurityPolicyRetrieveResponse(BaseModel): + security_policy: SecurityPolicy = FieldInfo(alias="securityPolicy") diff --git a/src/gitpod/types/security_policy_update_params.py b/src/gitpod/types/security_policy_update_params.py new file mode 100644 index 00000000..5bb70e72 --- /dev/null +++ b/src/gitpod/types/security_policy_update_params.py @@ -0,0 +1,74 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Literal, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["SecurityPolicyUpdateParams", "Metadata", "Spec", "SpecExecutables", "SpecExecutablesRule"] + + +class SecurityPolicyUpdateParams(TypedDict, total=False): + metadata: Metadata + + security_policy_id: Annotated[str, PropertyInfo(alias="securityPolicyId")] + + spec: Spec + """Mandate/deploy security agents, e.g. + + CrowdStrike. Mandate credential security/proxy use. These can be modeled later + as explicit fields if needed. + """ + + +class Metadata(TypedDict, total=False): + name: str + + +class SpecExecutablesRule(TypedDict, total=False): + effect: Literal["EFFECT_UNSPECIFIED", "EFFECT_ALLOW", "EFFECT_BLOCK", "EFFECT_AUDIT"] + """effect must be EFFECT_AUDIT or EFFECT_BLOCK. + + EFFECT_ALLOW is not supported on an executable rule. + """ + + path: str + """ + path is either an absolute executable path, such as /usr/bin/curl, or a bare + executable name, such as npx. Bare names are expanded by runtime discovery. + Surrounding whitespace is ignored. Empty or whitespace-only selectors and + relative paths with directory separators are invalid. Enforcement uses + executable content hashes, so different paths with identical content share one + runtime decision and block wins conflicts. + """ + + +class SpecExecutables(TypedDict, total=False): + """executables is the public Veto Exec GA policy surface.""" + + default_effect: Annotated[ + Literal["EFFECT_UNSPECIFIED", "EFFECT_ALLOW", "EFFECT_BLOCK", "EFFECT_AUDIT"], + PropertyInfo(alias="defaultEffect"), + ] + """ + default_effect controls executables that do not match a rule. For Veto Exec, + omit this field or set it to EFFECT_ALLOW. EFFECT_UNSPECIFIED is normalized to + EFFECT_ALLOW. + """ + + rules: Iterable[SpecExecutablesRule] + """rules contains executable-specific audit or block decisions.""" + + +class Spec(TypedDict, total=False): + """Mandate/deploy security agents, e.g. + + CrowdStrike. + Mandate credential security/proxy use. + These can be modeled later as explicit fields if needed. + """ + + executables: SpecExecutables + """executables is the public Veto Exec GA policy surface.""" diff --git a/src/gitpod/types/security_policy_update_response.py b/src/gitpod/types/security_policy_update_response.py new file mode 100644 index 00000000..aa0be7ae --- /dev/null +++ b/src/gitpod/types/security_policy_update_response.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .security_policy import SecurityPolicy + +__all__ = ["SecurityPolicyUpdateResponse"] + + +class SecurityPolicyUpdateResponse(BaseModel): + security_policy: SecurityPolicy = FieldInfo(alias="securityPolicy") diff --git a/src/gitpod/types/shared/__init__.py b/src/gitpod/types/shared/__init__.py index 0d4db91c..ad22c091 100644 --- a/src/gitpod/types/shared/__init__.py +++ b/src/gitpod/types/shared/__init__.py @@ -8,6 +8,7 @@ from .subject import Subject as Subject from .principal import Principal as Principal from .task_spec import TaskSpec as TaskSpec +from .date_range import DateRange as DateRange from .error_code import ErrorCode as ErrorCode from .secret_ref import SecretRef as SecretRef from .sort_order import SortOrder as SortOrder @@ -16,14 +17,19 @@ from .resource_role import ResourceRole as ResourceRole from .resource_type import ResourceType as ResourceType from .task_metadata import TaskMetadata as TaskMetadata +from .codex_settings import CodexSettings as CodexSettings from .task_execution import TaskExecution as TaskExecution from .environment_class import EnvironmentClass as EnvironmentClass from .organization_role import OrganizationRole as OrganizationRole from .organization_tier import OrganizationTier as OrganizationTier from .automation_trigger import AutomationTrigger as AutomationTrigger +from .codex_openai_model import CodexOpenAIModel as CodexOpenAIModel +from .codex_service_tier import CodexServiceTier as CodexServiceTier from .task_execution_spec import TaskExecutionSpec as TaskExecutionSpec from .task_execution_phase import TaskExecutionPhase as TaskExecutionPhase from .task_execution_status import TaskExecutionStatus as TaskExecutionStatus +from .codex_reasoning_effort import CodexReasoningEffort as CodexReasoningEffort +from .kernel_controls_action import KernelControlsAction as KernelControlsAction from .count_response_relation import CountResponseRelation as CountResponseRelation from .task_execution_metadata import TaskExecutionMetadata as TaskExecutionMetadata from .environment_variable_item import EnvironmentVariableItem as EnvironmentVariableItem diff --git a/src/gitpod/types/shared/codex_openai_model.py b/src/gitpod/types/shared/codex_openai_model.py new file mode 100644 index 00000000..c956442a --- /dev/null +++ b/src/gitpod/types/shared/codex_openai_model.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CodexOpenAIModel"] + +CodexOpenAIModel: TypeAlias = Literal[ + "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "CODEX_OPEN_AI_MODEL_GPT_5_5", + "CODEX_OPEN_AI_MODEL_GPT_5_4", + "CODEX_OPEN_AI_MODEL_GPT_5_4_MINI", + "CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX", + "CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK", + "CODEX_OPEN_AI_MODEL_GPT_5_2", + "CODEX_OPEN_AI_MODEL_GPT_5_6_SOL", + "CODEX_OPEN_AI_MODEL_GPT_5_6_TERRA", + "CODEX_OPEN_AI_MODEL_GPT_5_6_LUNA", +] diff --git a/src/gitpod/types/shared/codex_reasoning_effort.py b/src/gitpod/types/shared/codex_reasoning_effort.py new file mode 100644 index 00000000..c686cd5b --- /dev/null +++ b/src/gitpod/types/shared/codex_reasoning_effort.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CodexReasoningEffort"] + +CodexReasoningEffort: TypeAlias = Literal[ + "CODEX_REASONING_EFFORT_UNSPECIFIED", + "CODEX_REASONING_EFFORT_LOW", + "CODEX_REASONING_EFFORT_MEDIUM", + "CODEX_REASONING_EFFORT_HIGH", + "CODEX_REASONING_EFFORT_EXTRA_HIGH", +] diff --git a/src/gitpod/types/shared/codex_service_tier.py b/src/gitpod/types/shared/codex_service_tier.py new file mode 100644 index 00000000..aec3358e --- /dev/null +++ b/src/gitpod/types/shared/codex_service_tier.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CodexServiceTier"] + +CodexServiceTier: TypeAlias = Literal["CODEX_SERVICE_TIER_UNSPECIFIED", "CODEX_SERVICE_TIER_FAST"] diff --git a/src/gitpod/types/shared/codex_settings.py b/src/gitpod/types/shared/codex_settings.py new file mode 100644 index 00000000..e9c961c9 --- /dev/null +++ b/src/gitpod/types/shared/codex_settings.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel +from .codex_openai_model import CodexOpenAIModel +from .codex_service_tier import CodexServiceTier +from .codex_reasoning_effort import CodexReasoningEffort + +__all__ = ["CodexSettings"] + + +class CodexSettings(BaseModel): + """CodexSettings contains settings consumed only by the Codex app agent.""" + + model: Optional[CodexOpenAIModel] = None + """ + CodexOpenAIModel is the static allowlist of concrete OpenAI models that the + Codex app runtime can select through Ona's Codex picker. + """ + + reasoning_effort: Optional[CodexReasoningEffort] = FieldInfo(alias="reasoningEffort", default=None) + """ + CodexReasoningEffort is the static allowlist of reasoning efforts supported by + the Codex app runtime. + """ + + service_tier: Optional[CodexServiceTier] = FieldInfo(alias="serviceTier", default=None) + """ + CodexServiceTier is the static allowlist of service tiers supported by the Codex + app runtime. + """ diff --git a/src/gitpod/types/shared/date_range.py b/src/gitpod/types/shared/date_range.py new file mode 100644 index 00000000..c6c5033a --- /dev/null +++ b/src/gitpod/types/shared/date_range.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from datetime import datetime + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["DateRange"] + + +class DateRange(BaseModel): + """DateRange specifies a time period for queries.""" + + end_time: datetime = FieldInfo(alias="endTime") + """End time of the date range (exclusive).""" + + start_time: datetime = FieldInfo(alias="startTime") + """Start time of the date range (inclusive).""" diff --git a/src/gitpod/types/organizations/kernel_controls_action.py b/src/gitpod/types/shared/kernel_controls_action.py similarity index 100% rename from src/gitpod/types/organizations/kernel_controls_action.py rename to src/gitpod/types/shared/kernel_controls_action.py diff --git a/src/gitpod/types/shared/resource_role.py b/src/gitpod/types/shared/resource_role.py index 1f0241d7..1920fc59 100644 --- a/src/gitpod/types/shared/resource_role.py +++ b/src/gitpod/types/shared/resource_role.py @@ -14,6 +14,9 @@ "RESOURCE_ROLE_ORG_GROUPS_ADMIN", "RESOURCE_ROLE_ORG_ENVIRONMENTS_READER", "RESOURCE_ROLE_ORG_AUDIT_LOG_READER", + "RESOURCE_ROLE_ORG_BILLING_VIEWER", + "RESOURCE_ROLE_ORG_INSIGHTS_VIEWER", + "RESOURCE_ROLE_ORG_SECURITY_ADMIN", "RESOURCE_ROLE_GROUP_ADMIN", "RESOURCE_ROLE_GROUP_VIEWER", "RESOURCE_ROLE_USER_IDENTITY", @@ -68,4 +71,6 @@ "RESOURCE_ROLE_SESSION_USER", "RESOURCE_ROLE_TEAM_ADMIN", "RESOURCE_ROLE_TEAM_VIEWER", + "RESOURCE_ROLE_SECURITY_POLICY_ADMIN", + "RESOURCE_ROLE_SECURITY_POLICY_VIEWER", ] diff --git a/src/gitpod/types/shared/resource_type.py b/src/gitpod/types/shared/resource_type.py index 0debaeda..5c593cac 100644 --- a/src/gitpod/types/shared/resource_type.py +++ b/src/gitpod/types/shared/resource_type.py @@ -55,4 +55,7 @@ "RESOURCE_TYPE_ROLE_ASSIGNMENT", "RESOURCE_TYPE_WARM_POOL", "RESOURCE_TYPE_NOTIFICATION", + "RESOURCE_TYPE_SECURITY_POLICY", + "RESOURCE_TYPE_BASE_SNAPSHOT", + "RESOURCE_TYPE_BASE_SNAPSHOT_CONFIG", ] diff --git a/src/gitpod/types/shared/task_spec.py b/src/gitpod/types/shared/task_spec.py index 9c30234e..cc314415 100644 --- a/src/gitpod/types/shared/task_spec.py +++ b/src/gitpod/types/shared/task_spec.py @@ -18,5 +18,14 @@ class TaskSpec(BaseModel): env: Optional[List[EnvironmentVariableItem]] = None """env specifies environment variables for the task.""" + prebuild_requires_success: Optional[bool] = FieldInfo(alias="prebuildRequiresSuccess", default=None) + """ + prebuild_requires_success controls whether a non-successful outcome of this task + should fail the prebuild. When true and the task is triggered by a prebuild or + before_snapshot trigger, any terminal phase other than SUCCEEDED (i.e. FAILED or + STOPPED) will cause the prebuild to fail instead of just recording a warning. + Defaults to false (existing behavior: task failures produce warnings only). + """ + runs_on: Optional[RunsOn] = FieldInfo(alias="runsOn", default=None) """runs_on specifies the environment the task should run on.""" diff --git a/src/gitpod/types/shared_params/__init__.py b/src/gitpod/types/shared_params/__init__.py index 48b06ca8..20e9b672 100644 --- a/src/gitpod/types/shared_params/__init__.py +++ b/src/gitpod/types/shared_params/__init__.py @@ -6,6 +6,7 @@ from .subject import Subject as Subject from .principal import Principal as Principal from .task_spec import TaskSpec as TaskSpec +from .date_range import DateRange as DateRange from .secret_ref import SecretRef as SecretRef from .sort_order import SortOrder as SortOrder from .field_value import FieldValue as FieldValue @@ -13,10 +14,15 @@ from .resource_role import ResourceRole as ResourceRole from .resource_type import ResourceType as ResourceType from .task_metadata import TaskMetadata as TaskMetadata +from .codex_settings import CodexSettings as CodexSettings from .environment_class import EnvironmentClass as EnvironmentClass from .organization_role import OrganizationRole as OrganizationRole from .automation_trigger import AutomationTrigger as AutomationTrigger +from .codex_openai_model import CodexOpenAIModel as CodexOpenAIModel +from .codex_service_tier import CodexServiceTier as CodexServiceTier from .task_execution_phase import TaskExecutionPhase as TaskExecutionPhase +from .codex_reasoning_effort import CodexReasoningEffort as CodexReasoningEffort +from .kernel_controls_action import KernelControlsAction as KernelControlsAction from .environment_variable_item import EnvironmentVariableItem as EnvironmentVariableItem from .project_environment_class import ProjectEnvironmentClass as ProjectEnvironmentClass from .environment_variable_source import EnvironmentVariableSource as EnvironmentVariableSource diff --git a/src/gitpod/types/shared_params/codex_openai_model.py b/src/gitpod/types/shared_params/codex_openai_model.py new file mode 100644 index 00000000..8ee17cd5 --- /dev/null +++ b/src/gitpod/types/shared_params/codex_openai_model.py @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CodexOpenAIModel"] + +CodexOpenAIModel: TypeAlias = Literal[ + "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "CODEX_OPEN_AI_MODEL_GPT_5_5", + "CODEX_OPEN_AI_MODEL_GPT_5_4", + "CODEX_OPEN_AI_MODEL_GPT_5_4_MINI", + "CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX", + "CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK", + "CODEX_OPEN_AI_MODEL_GPT_5_2", + "CODEX_OPEN_AI_MODEL_GPT_5_6_SOL", + "CODEX_OPEN_AI_MODEL_GPT_5_6_TERRA", + "CODEX_OPEN_AI_MODEL_GPT_5_6_LUNA", +] diff --git a/src/gitpod/types/shared_params/codex_reasoning_effort.py b/src/gitpod/types/shared_params/codex_reasoning_effort.py new file mode 100644 index 00000000..4f64c1d5 --- /dev/null +++ b/src/gitpod/types/shared_params/codex_reasoning_effort.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CodexReasoningEffort"] + +CodexReasoningEffort: TypeAlias = Literal[ + "CODEX_REASONING_EFFORT_UNSPECIFIED", + "CODEX_REASONING_EFFORT_LOW", + "CODEX_REASONING_EFFORT_MEDIUM", + "CODEX_REASONING_EFFORT_HIGH", + "CODEX_REASONING_EFFORT_EXTRA_HIGH", +] diff --git a/src/gitpod/types/shared_params/codex_service_tier.py b/src/gitpod/types/shared_params/codex_service_tier.py new file mode 100644 index 00000000..d9b19a46 --- /dev/null +++ b/src/gitpod/types/shared_params/codex_service_tier.py @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CodexServiceTier"] + +CodexServiceTier: TypeAlias = Literal["CODEX_SERVICE_TIER_UNSPECIFIED", "CODEX_SERVICE_TIER_FAST"] diff --git a/src/gitpod/types/shared_params/codex_settings.py b/src/gitpod/types/shared_params/codex_settings.py new file mode 100644 index 00000000..6d20c8a3 --- /dev/null +++ b/src/gitpod/types/shared_params/codex_settings.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Annotated, TypedDict + +from ..._utils import PropertyInfo +from ..shared.codex_openai_model import CodexOpenAIModel +from ..shared.codex_service_tier import CodexServiceTier +from ..shared.codex_reasoning_effort import CodexReasoningEffort + +__all__ = ["CodexSettings"] + + +class CodexSettings(TypedDict, total=False): + """CodexSettings contains settings consumed only by the Codex app agent.""" + + model: CodexOpenAIModel + """ + CodexOpenAIModel is the static allowlist of concrete OpenAI models that the + Codex app runtime can select through Ona's Codex picker. + """ + + reasoning_effort: Annotated[CodexReasoningEffort, PropertyInfo(alias="reasoningEffort")] + """ + CodexReasoningEffort is the static allowlist of reasoning efforts supported by + the Codex app runtime. + """ + + service_tier: Annotated[CodexServiceTier, PropertyInfo(alias="serviceTier")] + """ + CodexServiceTier is the static allowlist of service tiers supported by the Codex + app runtime. + """ diff --git a/src/gitpod/types/shared_params/date_range.py b/src/gitpod/types/shared_params/date_range.py new file mode 100644 index 00000000..ae103a70 --- /dev/null +++ b/src/gitpod/types/shared_params/date_range.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["DateRange"] + + +class DateRange(TypedDict, total=False): + """DateRange specifies a time period for queries.""" + + end_time: Required[Annotated[Union[str, datetime], PropertyInfo(alias="endTime", format="iso8601")]] + """End time of the date range (exclusive).""" + + start_time: Required[Annotated[Union[str, datetime], PropertyInfo(alias="startTime", format="iso8601")]] + """Start time of the date range (inclusive).""" diff --git a/src/gitpod/types/shared_params/kernel_controls_action.py b/src/gitpod/types/shared_params/kernel_controls_action.py new file mode 100644 index 00000000..3f1009a6 --- /dev/null +++ b/src/gitpod/types/shared_params/kernel_controls_action.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypeAlias + +__all__ = ["KernelControlsAction"] + +KernelControlsAction: TypeAlias = Literal[ + "KERNEL_CONTROLS_ACTION_UNSPECIFIED", "KERNEL_CONTROLS_ACTION_BLOCK", "KERNEL_CONTROLS_ACTION_AUDIT" +] diff --git a/src/gitpod/types/shared_params/resource_role.py b/src/gitpod/types/shared_params/resource_role.py index 71f2a545..f3209840 100644 --- a/src/gitpod/types/shared_params/resource_role.py +++ b/src/gitpod/types/shared_params/resource_role.py @@ -16,6 +16,9 @@ "RESOURCE_ROLE_ORG_GROUPS_ADMIN", "RESOURCE_ROLE_ORG_ENVIRONMENTS_READER", "RESOURCE_ROLE_ORG_AUDIT_LOG_READER", + "RESOURCE_ROLE_ORG_BILLING_VIEWER", + "RESOURCE_ROLE_ORG_INSIGHTS_VIEWER", + "RESOURCE_ROLE_ORG_SECURITY_ADMIN", "RESOURCE_ROLE_GROUP_ADMIN", "RESOURCE_ROLE_GROUP_VIEWER", "RESOURCE_ROLE_USER_IDENTITY", @@ -70,4 +73,6 @@ "RESOURCE_ROLE_SESSION_USER", "RESOURCE_ROLE_TEAM_ADMIN", "RESOURCE_ROLE_TEAM_VIEWER", + "RESOURCE_ROLE_SECURITY_POLICY_ADMIN", + "RESOURCE_ROLE_SECURITY_POLICY_VIEWER", ] diff --git a/src/gitpod/types/shared_params/resource_type.py b/src/gitpod/types/shared_params/resource_type.py index 27b68eae..c59783f0 100644 --- a/src/gitpod/types/shared_params/resource_type.py +++ b/src/gitpod/types/shared_params/resource_type.py @@ -57,4 +57,7 @@ "RESOURCE_TYPE_ROLE_ASSIGNMENT", "RESOURCE_TYPE_WARM_POOL", "RESOURCE_TYPE_NOTIFICATION", + "RESOURCE_TYPE_SECURITY_POLICY", + "RESOURCE_TYPE_BASE_SNAPSHOT", + "RESOURCE_TYPE_BASE_SNAPSHOT_CONFIG", ] diff --git a/src/gitpod/types/shared_params/task_spec.py b/src/gitpod/types/shared_params/task_spec.py index 691ba57b..8ef1ee03 100644 --- a/src/gitpod/types/shared_params/task_spec.py +++ b/src/gitpod/types/shared_params/task_spec.py @@ -19,5 +19,14 @@ class TaskSpec(TypedDict, total=False): env: Iterable[EnvironmentVariableItem] """env specifies environment variables for the task.""" + prebuild_requires_success: Annotated[bool, PropertyInfo(alias="prebuildRequiresSuccess")] + """ + prebuild_requires_success controls whether a non-successful outcome of this task + should fail the prebuild. When true and the task is triggered by a prebuild or + before_snapshot trigger, any terminal phase other than SUCCEEDED (i.e. FAILED or + STOPPED) will cause the prebuild to fail instead of just recording a warning. + Defaults to false (existing behavior: task failures produce warnings only). + """ + runs_on: Annotated[RunsOn, PropertyInfo(alias="runsOn")] """runs_on specifies the environment the task should run on.""" diff --git a/src/gitpod/types/stack_frame_param.py b/src/gitpod/types/stack_frame_param.py deleted file mode 100644 index 6ce75870..00000000 --- a/src/gitpod/types/stack_frame_param.py +++ /dev/null @@ -1,43 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Dict -from typing_extensions import Annotated, TypedDict - -from .._types import SequenceNotStr -from .._utils import PropertyInfo - -__all__ = ["StackFrameParam"] - - -class StackFrameParam(TypedDict, total=False): - """Stack trace frame information (Sentry-compatible)""" - - colno: int - """Column number in the line""" - - context_line: Annotated[str, PropertyInfo(alias="contextLine")] - - filename: str - """File name or path""" - - function: str - """Function name""" - - in_app: Annotated[bool, PropertyInfo(alias="inApp")] - """Whether this frame is in application code (vs library/framework code)""" - - lineno: int - """Line number in the file""" - - module: str - """Module or package name""" - - post_context: Annotated[SequenceNotStr[str], PropertyInfo(alias="postContext")] - - pre_context: Annotated[SequenceNotStr[str], PropertyInfo(alias="preContext")] - """Source code context around the error line""" - - vars: Dict[str, str] - """Additional frame-specific variables/locals""" diff --git a/src/gitpod/types/supported_model.py b/src/gitpod/types/supported_model.py new file mode 100644 index 00000000..434547aa --- /dev/null +++ b/src/gitpod/types/supported_model.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["SupportedModel"] + +SupportedModel: TypeAlias = Literal[ + "SUPPORTED_MODEL_UNSPECIFIED", + "SUPPORTED_MODEL_SONNET_3_5", + "SUPPORTED_MODEL_SONNET_3_7", + "SUPPORTED_MODEL_SONNET_3_7_EXTENDED", + "SUPPORTED_MODEL_SONNET_4", + "SUPPORTED_MODEL_SONNET_4_EXTENDED", + "SUPPORTED_MODEL_SONNET_4_5", + "SUPPORTED_MODEL_SONNET_4_5_EXTENDED", + "SUPPORTED_MODEL_SONNET_4_6", + "SUPPORTED_MODEL_SONNET_4_6_EXTENDED", + "SUPPORTED_MODEL_SONNET_5", + "SUPPORTED_MODEL_OPUS_4", + "SUPPORTED_MODEL_OPUS_4_EXTENDED", + "SUPPORTED_MODEL_OPUS_4_5", + "SUPPORTED_MODEL_OPUS_4_5_EXTENDED", + "SUPPORTED_MODEL_OPUS_4_6", + "SUPPORTED_MODEL_OPUS_4_6_EXTENDED", + "SUPPORTED_MODEL_OPUS_4_7", + "SUPPORTED_MODEL_OPUS_4_8", + "SUPPORTED_MODEL_HAIKU_4_5", + "SUPPORTED_MODEL_OPENAI_4O", + "SUPPORTED_MODEL_OPENAI_4O_MINI", + "SUPPORTED_MODEL_OPENAI_O1", + "SUPPORTED_MODEL_OPENAI_O1_MINI", + "SUPPORTED_MODEL_OPENAI_AUTO", +] diff --git a/src/gitpod/types/team_credit_usage.py b/src/gitpod/types/team_credit_usage.py new file mode 100644 index 00000000..ee28a9a7 --- /dev/null +++ b/src/gitpod/types/team_credit_usage.py @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .credits_by_type import CreditsByType + +__all__ = ["TeamCreditUsage"] + + +class TeamCreditUsage(BaseModel): + """ + TeamCreditUsage contains a single team's credit usage for a day, broken down by type. + """ + + display_name: Optional[str] = FieldInfo(alias="displayName", default=None) + + team_id: Optional[str] = FieldInfo(alias="teamId", default=None) + """Empty when representing the "Others" aggregation bucket.""" + + usage: Optional[List[CreditsByType]] = None diff --git a/src/gitpod/types/team_cumulative_credit_usage.py b/src/gitpod/types/team_cumulative_credit_usage.py new file mode 100644 index 00000000..9f0b5ec2 --- /dev/null +++ b/src/gitpod/types/team_cumulative_credit_usage.py @@ -0,0 +1,29 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .cumulative_credit_usage import CumulativeCreditUsage + +__all__ = ["TeamCumulativeCreditUsage"] + + +class TeamCumulativeCreditUsage(BaseModel): + """ + TeamCumulativeCreditUsage contains a team's cumulative credit usage and allocation. + """ + + credit_budget: Optional[str] = FieldInfo(alias="creditBudget", default=None) + """ + The team's credit allocation (budget) in whole credits, if set. Not set means no + allocation has been configured for this team. + """ + + display_name: Optional[str] = FieldInfo(alias="displayName", default=None) + + team_id: Optional[str] = FieldInfo(alias="teamId", default=None) + + usage: Optional[CumulativeCreditUsage] = None + """Cumulative credit usage for this team.""" diff --git a/src/gitpod/types/team_enterprise_ai_usage.py b/src/gitpod/types/team_enterprise_ai_usage.py new file mode 100644 index 00000000..e7b4932b --- /dev/null +++ b/src/gitpod/types/team_enterprise_ai_usage.py @@ -0,0 +1,27 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .enterprise_ai_usage import EnterpriseAIUsage +from .enterprise_ai_usage_budget import EnterpriseAIUsageBudget +from .enterprise_ai_usage_by_token_type import EnterpriseAIUsageByTokenType + +__all__ = ["TeamEnterpriseAIUsage"] + + +class TeamEnterpriseAIUsage(BaseModel): + budget: Optional[EnterpriseAIUsageBudget] = None + """budget is unset when no monthly budget applies to this team.""" + + display_name: Optional[str] = FieldInfo(alias="displayName", default=None) + + team_id: Optional[str] = FieldInfo(alias="teamId", default=None) + + usage: Optional[EnterpriseAIUsage] = None + + usage_by_token_type: Optional[List[EnterpriseAIUsageByTokenType]] = FieldInfo( + alias="usageByTokenType", default=None + ) diff --git a/src/gitpod/types/time_series_point.py b/src/gitpod/types/time_series_point.py new file mode 100644 index 00000000..a4cbc83c --- /dev/null +++ b/src/gitpod/types/time_series_point.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from .._models import BaseModel + +__all__ = ["TimeSeriesPoint"] + + +class TimeSeriesPoint(BaseModel): + time: Optional[datetime] = None + """Timestamp for this data point.""" + + value: Optional[int] = None + """The numerical value for this data point.""" diff --git a/src/gitpod/types/tool_breakdown.py b/src/gitpod/types/tool_breakdown.py new file mode 100644 index 00000000..9c1f7ef2 --- /dev/null +++ b/src/gitpod/types/tool_breakdown.py @@ -0,0 +1,29 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .co_author_tool import CoAuthorTool + +__all__ = ["ToolBreakdown"] + + +class ToolBreakdown(BaseModel): + """ToolBreakdown contains stats for a single AI tool (or human).""" + + commits: Optional[str] = None + """Number of commits attributed to this tool.""" + + distinct_authors: Optional[str] = FieldInfo(alias="distinctAuthors", default=None) + """Distinct authors who used this tool.""" + + lines_added: Optional[str] = FieldInfo(alias="linesAdded", default=None) + """Lines added by this tool.""" + + lines_removed: Optional[str] = FieldInfo(alias="linesRemoved", default=None) + """Lines removed by this tool.""" + + tool: Optional[CoAuthorTool] = None + """The tool these stats are for.""" diff --git a/src/gitpod/types/usage_get_adoption_usage_summary_params.py b/src/gitpod/types/usage_get_adoption_usage_summary_params.py new file mode 100644 index 00000000..f0698b6b --- /dev/null +++ b/src/gitpod/types/usage_get_adoption_usage_summary_params.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared_params.date_range import DateRange + +__all__ = ["UsageGetAdoptionUsageSummaryParams"] + + +class UsageGetAdoptionUsageSummaryParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range to query metrics within.""" + + project_id: Annotated[str, PropertyInfo(alias="projectId")] + """Optional project ID to filter metrics by.""" + + team_id: Annotated[str, PropertyInfo(alias="teamId")] + """Optional team ID to scope results to members of a specific team.""" + + user_id: Annotated[str, PropertyInfo(alias="userId")] + """ + Optional user ID to filter metrics for a specific user (personal insights view). + """ diff --git a/src/gitpod/types/usage_get_adoption_usage_summary_response.py b/src/gitpod/types/usage_get_adoption_usage_summary_response.py new file mode 100644 index 00000000..ccde3c86 --- /dev/null +++ b/src/gitpod/types/usage_get_adoption_usage_summary_response.py @@ -0,0 +1,57 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .time_series_point import TimeSeriesPoint + +__all__ = ["UsageGetAdoptionUsageSummaryResponse"] + + +class UsageGetAdoptionUsageSummaryResponse(BaseModel): + active_users_count: Optional[str] = FieldInfo(alias="activeUsersCount", default=None) + """Count of active users in the date range.""" + + active_users_trend: Optional[float] = FieldInfo(alias="activeUsersTrend", default=None) + """ + Fractional change in active_users_count vs previous period. Computed as + (current - previous) / previous. + """ + + env_runtime_per_user_seconds: Optional[float] = FieldInfo(alias="envRuntimePerUserSeconds", default=None) + """Average environment runtime in seconds per active user.""" + + env_runtime_per_user_trend: Optional[float] = FieldInfo(alias="envRuntimePerUserTrend", default=None) + """ + Fractional change in env_runtime_per_user_seconds vs previous period. Computed + as (current - previous) / previous. + """ + + power_users_count: Optional[str] = FieldInfo(alias="powerUsersCount", default=None) + """Count of power users in the date range.""" + + power_users_threshold_seconds: Optional[str] = FieldInfo(alias="powerUsersThresholdSeconds", default=None) + """ + Threshold in seconds used to determine power users. Displayed to users so they + understand the definition. + """ + + power_users_trend: Optional[float] = FieldInfo(alias="powerUsersTrend", default=None) + """ + Fractional change in power_users_count vs previous period. Computed as + (current - previous) / previous. + """ + + sessions_count: Optional[str] = FieldInfo(alias="sessionsCount", default=None) + """Count of environment sessions (total starts) in the date range.""" + + sessions_trend: Optional[float] = FieldInfo(alias="sessionsTrend", default=None) + """ + Fractional change in sessions_count vs previous period. Computed as (current - + previous) / previous. + """ + + sparkline: Optional[List[TimeSeriesPoint]] = None + """Sparkline data for the card's trend line (typically ~4 weekly points).""" diff --git a/src/gitpod/types/usage_get_agent_trace_summary_params.py b/src/gitpod/types/usage_get_agent_trace_summary_params.py new file mode 100644 index 00000000..c106353f --- /dev/null +++ b/src/gitpod/types/usage_get_agent_trace_summary_params.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared_params.date_range import DateRange + +__all__ = ["UsageGetAgentTraceSummaryParams"] + + +class UsageGetAgentTraceSummaryParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range to query within.""" + + project_id: Annotated[str, PropertyInfo(alias="projectId")] + """Optional project ID to scope results.""" + + team_id: Annotated[str, PropertyInfo(alias="teamId")] + """ + Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + """ + + user_id: Annotated[str, PropertyInfo(alias="userId")] + """ + Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + """ diff --git a/src/gitpod/types/usage_get_agent_trace_summary_response.py b/src/gitpod/types/usage_get_agent_trace_summary_response.py new file mode 100644 index 00000000..d161a048 --- /dev/null +++ b/src/gitpod/types/usage_get_agent_trace_summary_response.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .._models import BaseModel +from .time_series_point import TimeSeriesPoint +from .agent_trace_summary import AgentTraceSummary + +__all__ = ["UsageGetAgentTraceSummaryResponse"] + + +class UsageGetAgentTraceSummaryResponse(BaseModel): + sparkline: Optional[List[TimeSeriesPoint]] = None + """Sparkline data for card rendering.""" + + summary: Optional[AgentTraceSummary] = None + """Summary totals and trends for the requested date range.""" diff --git a/src/gitpod/types/usage_get_agent_trace_time_series_params.py b/src/gitpod/types/usage_get_agent_trace_time_series_params.py new file mode 100644 index 00000000..e5cd4c66 --- /dev/null +++ b/src/gitpod/types/usage_get_agent_trace_time_series_params.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .resolution import Resolution +from .shared_params.date_range import DateRange + +__all__ = ["UsageGetAgentTraceTimeSeriesParams"] + + +class UsageGetAgentTraceTimeSeriesParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range to query within.""" + + project_id: Annotated[str, PropertyInfo(alias="projectId")] + """Optional project ID to scope results.""" + + resolution: Resolution + """Time resolution for the series data.""" + + team_id: Annotated[str, PropertyInfo(alias="teamId")] + """ + Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + """ + + user_id: Annotated[str, PropertyInfo(alias="userId")] + """ + Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + """ diff --git a/src/gitpod/types/usage_get_agent_trace_time_series_response.py b/src/gitpod/types/usage_get_agent_trace_time_series_response.py new file mode 100644 index 00000000..4e016d85 --- /dev/null +++ b/src/gitpod/types/usage_get_agent_trace_time_series_response.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .agent_trace_time_bucket import AgentTraceTimeBucket + +__all__ = ["UsageGetAgentTraceTimeSeriesResponse"] + + +class UsageGetAgentTraceTimeSeriesResponse(BaseModel): + time_series: Optional[List[AgentTraceTimeBucket]] = FieldInfo(alias="timeSeries", default=None) + """Time series of agent trace stats, bucketed by the requested resolution.""" diff --git a/src/gitpod/types/usage_get_co_author_summary_params.py b/src/gitpod/types/usage_get_co_author_summary_params.py new file mode 100644 index 00000000..96ae9f5b --- /dev/null +++ b/src/gitpod/types/usage_get_co_author_summary_params.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared_params.date_range import DateRange + +__all__ = ["UsageGetCoAuthorSummaryParams"] + + +class UsageGetCoAuthorSummaryParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range to query within.""" + + project_id: Annotated[str, PropertyInfo(alias="projectId")] + """Optional project ID to scope results.""" + + team_id: Annotated[str, PropertyInfo(alias="teamId")] + """ + Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + """ + + user_id: Annotated[str, PropertyInfo(alias="userId")] + """ + Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + """ diff --git a/src/gitpod/types/usage_get_co_author_summary_response.py b/src/gitpod/types/usage_get_co_author_summary_response.py new file mode 100644 index 00000000..988ed92d --- /dev/null +++ b/src/gitpod/types/usage_get_co_author_summary_response.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .._models import BaseModel +from .co_author_summary import CoAuthorSummary +from .time_series_point import TimeSeriesPoint + +__all__ = ["UsageGetCoAuthorSummaryResponse"] + + +class UsageGetCoAuthorSummaryResponse(BaseModel): + sparkline: Optional[List[TimeSeriesPoint]] = None + """Sparkline data for card rendering.""" + + summary: Optional[CoAuthorSummary] = None + """Summary totals and trends for the requested date range.""" diff --git a/src/gitpod/types/usage_get_co_author_time_series_params.py b/src/gitpod/types/usage_get_co_author_time_series_params.py new file mode 100644 index 00000000..6fb8db52 --- /dev/null +++ b/src/gitpod/types/usage_get_co_author_time_series_params.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .resolution import Resolution +from .shared_params.date_range import DateRange + +__all__ = ["UsageGetCoAuthorTimeSeriesParams"] + + +class UsageGetCoAuthorTimeSeriesParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range to query within.""" + + project_id: Annotated[str, PropertyInfo(alias="projectId")] + """Optional project ID to scope results.""" + + resolution: Resolution + """Time resolution for the series data.""" + + team_id: Annotated[str, PropertyInfo(alias="teamId")] + """ + Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + """ + + user_id: Annotated[str, PropertyInfo(alias="userId")] + """ + Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + """ diff --git a/src/gitpod/types/usage_get_co_author_time_series_response.py b/src/gitpod/types/usage_get_co_author_time_series_response.py new file mode 100644 index 00000000..71aef495 --- /dev/null +++ b/src/gitpod/types/usage_get_co_author_time_series_response.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .co_author_time_bucket import CoAuthorTimeBucket + +__all__ = ["UsageGetCoAuthorTimeSeriesResponse"] + + +class UsageGetCoAuthorTimeSeriesResponse(BaseModel): + time_series: Optional[List[CoAuthorTimeBucket]] = FieldInfo(alias="timeSeries", default=None) + """Time series of contribution stats, bucketed by the requested resolution.""" diff --git a/src/gitpod/types/usage_get_pr_summary_params.py b/src/gitpod/types/usage_get_pr_summary_params.py new file mode 100644 index 00000000..93274a16 --- /dev/null +++ b/src/gitpod/types/usage_get_pr_summary_params.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .shared_params.date_range import DateRange + +__all__ = ["UsageGetPrSummaryParams"] + + +class UsageGetPrSummaryParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range to query within.""" + + project_id: Annotated[str, PropertyInfo(alias="projectId")] + """Optional project ID to scope results.""" + + team_id: Annotated[str, PropertyInfo(alias="teamId")] + """ + Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + """ + + user_id: Annotated[str, PropertyInfo(alias="userId")] + """ + Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + """ diff --git a/src/gitpod/types/usage_get_pr_summary_response.py b/src/gitpod/types/usage_get_pr_summary_response.py new file mode 100644 index 00000000..59a742a1 --- /dev/null +++ b/src/gitpod/types/usage_get_pr_summary_response.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .._models import BaseModel +from .pr_summary import PrSummary +from .time_series_point import TimeSeriesPoint + +__all__ = ["UsageGetPrSummaryResponse"] + + +class UsageGetPrSummaryResponse(BaseModel): + sparkline: Optional[List[TimeSeriesPoint]] = None + """Sparkline data for card rendering.""" + + summary: Optional[PrSummary] = None + """Summary totals and trends for the requested date range.""" diff --git a/src/gitpod/types/usage_get_pr_time_series_params.py b/src/gitpod/types/usage_get_pr_time_series_params.py new file mode 100644 index 00000000..4c36f6d2 --- /dev/null +++ b/src/gitpod/types/usage_get_pr_time_series_params.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo +from .resolution import Resolution +from .shared_params.date_range import DateRange + +__all__ = ["UsageGetPrTimeSeriesParams"] + + +class UsageGetPrTimeSeriesParams(TypedDict, total=False): + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] + """Date range to query within.""" + + project_id: Annotated[str, PropertyInfo(alias="projectId")] + """Optional project ID to scope results.""" + + resolution: Resolution + """Time resolution for the series data.""" + + team_id: Annotated[str, PropertyInfo(alias="teamId")] + """ + Optional team ID to scope results to a specific team. Mutually exclusive with + user_id. + """ + + user_id: Annotated[str, PropertyInfo(alias="userId")] + """ + Optional user ID to scope results to a specific user. Mutually exclusive with + team_id. + """ diff --git a/src/gitpod/types/usage_get_pr_time_series_response.py b/src/gitpod/types/usage_get_pr_time_series_response.py new file mode 100644 index 00000000..da95055c --- /dev/null +++ b/src/gitpod/types/usage_get_pr_time_series_response.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .pr_time_bucket import PrTimeBucket + +__all__ = ["UsageGetPrTimeSeriesResponse"] + + +class UsageGetPrTimeSeriesResponse(BaseModel): + time_series: Optional[List[PrTimeBucket]] = FieldInfo(alias="timeSeries", default=None) + """Time series of PR speed metrics, bucketed by the requested resolution.""" diff --git a/src/gitpod/types/usage_list_environment_runtime_records_params.py b/src/gitpod/types/usage_list_environment_runtime_records_params.py index e3459eae..74e22cb1 100644 --- a/src/gitpod/types/usage_list_environment_runtime_records_params.py +++ b/src/gitpod/types/usage_list_environment_runtime_records_params.py @@ -2,13 +2,12 @@ from __future__ import annotations -from typing import Union -from datetime import datetime from typing_extensions import Required, Annotated, TypedDict from .._utils import PropertyInfo +from .shared_params.date_range import DateRange -__all__ = ["UsageListEnvironmentRuntimeRecordsParams", "Filter", "FilterDateRange", "Pagination"] +__all__ = ["UsageListEnvironmentRuntimeRecordsParams", "Filter", "Pagination"] class UsageListEnvironmentRuntimeRecordsParams(TypedDict, total=False): @@ -23,20 +22,10 @@ class UsageListEnvironmentRuntimeRecordsParams(TypedDict, total=False): """Pagination options.""" -class FilterDateRange(TypedDict, total=False): - """Date range to query runtime records within.""" - - end_time: Required[Annotated[Union[str, datetime], PropertyInfo(alias="endTime", format="iso8601")]] - """End time of the date range (exclusive).""" - - start_time: Required[Annotated[Union[str, datetime], PropertyInfo(alias="startTime", format="iso8601")]] - """Start time of the date range (inclusive).""" - - class Filter(TypedDict, total=False): """Filter options.""" - date_range: Required[Annotated[FilterDateRange, PropertyInfo(alias="dateRange")]] + date_range: Required[Annotated[DateRange, PropertyInfo(alias="dateRange")]] """Date range to query runtime records within.""" project_id: Annotated[str, PropertyInfo(alias="projectId")] diff --git a/src/gitpod/types/usage_type.py b/src/gitpod/types/usage_type.py new file mode 100644 index 00000000..9f6d566b --- /dev/null +++ b/src/gitpod/types/usage_type.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["UsageType"] + +UsageType: TypeAlias = Literal["USAGE_TYPE_UNSPECIFIED", "USAGE_TYPE_ENVIRONMENT", "USAGE_TYPE_AGENTIC"] diff --git a/src/gitpod/types/user_cost_budget_usage.py b/src/gitpod/types/user_cost_budget_usage.py new file mode 100644 index 00000000..b3e29df3 --- /dev/null +++ b/src/gitpod/types/user_cost_budget_usage.py @@ -0,0 +1,39 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .billing_currency import BillingCurrency +from .enterprise_ai_usage import EnterpriseAIUsage +from .enterprise_ai_user_budget_policy_source import EnterpriseAIUserBudgetPolicySource + +__all__ = ["UserCostBudgetUsage"] + + +class UserCostBudgetUsage(BaseModel): + budget_source: Optional[EnterpriseAIUserBudgetPolicySource] = FieldInfo(alias="budgetSource", default=None) + + currency: Optional[BillingCurrency] = None + + display_name: Optional[str] = FieldInfo(alias="displayName", default=None) + + is_service_account: Optional[bool] = FieldInfo(alias="isServiceAccount", default=None) + + monthly_cost_limit_microunits: Optional[str] = FieldInfo(alias="monthlyCostLimitMicrounits", default=None) + + month_to_date_usage: Optional[EnterpriseAIUsage] = FieldInfo(alias="monthToDateUsage", default=None) + """Usage within the requested date range. + + Reflects true month-to-date usage when the range starts on the first day of the + month. + """ + + no_cap: Optional[bool] = FieldInfo(alias="noCap", default=None) + + over_budget: Optional[bool] = FieldInfo(alias="overBudget", default=None) + + user_id: Optional[str] = FieldInfo(alias="userId", default=None) + + utilization_percent: Optional[float] = FieldInfo(alias="utilizationPercent", default=None) diff --git a/src/gitpod/types/user_credit_budget_usage.py b/src/gitpod/types/user_credit_budget_usage.py new file mode 100644 index 00000000..6dcccc5d --- /dev/null +++ b/src/gitpod/types/user_credit_budget_usage.py @@ -0,0 +1,40 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .cumulative_credit_usage import CumulativeCreditUsage +from .enterprise_ai_usage_by_model import EnterpriseAIUsageByModel +from .enterprise_ai_user_budget_policy_source import EnterpriseAIUserBudgetPolicySource + +__all__ = ["UserCreditBudgetUsage"] + + +class UserCreditBudgetUsage(BaseModel): + budget_source: Optional[EnterpriseAIUserBudgetPolicySource] = FieldInfo(alias="budgetSource", default=None) + + credit_budget: Optional[str] = FieldInfo(alias="creditBudget", default=None) + + display_name: Optional[str] = FieldInfo(alias="displayName", default=None) + + is_service_account: Optional[bool] = FieldInfo(alias="isServiceAccount", default=None) + """ + True when user_id refers to a service account rather than a human user. The + dashboard uses this to mark non-human accounts in admin tables. + """ + + month_to_date_usage: Optional[CumulativeCreditUsage] = FieldInfo(alias="monthToDateUsage", default=None) + """CumulativeCreditUsage contains cumulative credit consumption totals.""" + + no_cap: Optional[bool] = FieldInfo(alias="noCap", default=None) + + over_budget: Optional[bool] = FieldInfo(alias="overBudget", default=None) + + usage_by_model: Optional[List[EnterpriseAIUsageByModel]] = FieldInfo(alias="usageByModel", default=None) + """Month-to-date intelligence usage broken down by model.""" + + user_id: Optional[str] = FieldInfo(alias="userId", default=None) + + utilization_percent: Optional[float] = FieldInfo(alias="utilizationPercent", default=None) diff --git a/src/gitpod/types/user_credit_usage.py b/src/gitpod/types/user_credit_usage.py new file mode 100644 index 00000000..4aaa4930 --- /dev/null +++ b/src/gitpod/types/user_credit_usage.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .credits_by_type import CreditsByType +from .enterprise_ai_usage_by_model import EnterpriseAIUsageByModel + +__all__ = ["UserCreditUsage"] + + +class UserCreditUsage(BaseModel): + """UserCreditUsage contains a single user's credit usage, broken down by type.""" + + display_name: Optional[str] = FieldInfo(alias="displayName", default=None) + + usage: Optional[List[CreditsByType]] = None + + usage_by_model: Optional[List[EnterpriseAIUsageByModel]] = FieldInfo(alias="usageByModel", default=None) + """Intelligence usage broken down by model.""" + + user_id: Optional[str] = FieldInfo(alias="userId", default=None) + """Empty when representing the "Others" aggregation bucket.""" diff --git a/src/gitpod/types/user_enterprise_ai_usage.py b/src/gitpod/types/user_enterprise_ai_usage.py new file mode 100644 index 00000000..e574352c --- /dev/null +++ b/src/gitpod/types/user_enterprise_ai_usage.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .enterprise_ai_usage import EnterpriseAIUsage + +__all__ = ["UserEnterpriseAIUsage"] + + +class UserEnterpriseAIUsage(BaseModel): + display_name: Optional[str] = FieldInfo(alias="displayName", default=None) + + usage: Optional[EnterpriseAIUsage] = None + + user_id: Optional[str] = FieldInfo(alias="userId", default=None) + """Empty when representing the "Others" aggregation bucket.""" diff --git a/src/gitpod/types/veto.py b/src/gitpod/types/veto.py index 029d97c3..8a5a676f 100644 --- a/src/gitpod/types/veto.py +++ b/src/gitpod/types/veto.py @@ -3,7 +3,7 @@ from typing import List, Optional from .._models import BaseModel -from .organizations.kernel_controls_action import KernelControlsAction +from .shared.kernel_controls_action import KernelControlsAction __all__ = ["Veto", "Exec"] diff --git a/src/gitpod/types/veto_param.py b/src/gitpod/types/veto_param.py index 0234807c..fe38f339 100644 --- a/src/gitpod/types/veto_param.py +++ b/src/gitpod/types/veto_param.py @@ -5,7 +5,7 @@ from typing_extensions import TypedDict from .._types import SequenceNotStr -from .organizations.kernel_controls_action import KernelControlsAction +from .shared.kernel_controls_action import KernelControlsAction __all__ = ["VetoParam", "Exec"] diff --git a/src/gitpod/types/wake_event_param.py b/src/gitpod/types/wake_event_param.py index 0a53c300..48aaa397 100644 --- a/src/gitpod/types/wake_event_param.py +++ b/src/gitpod/types/wake_event_param.py @@ -9,7 +9,25 @@ from .._types import SequenceNotStr from .._utils import PropertyInfo -__all__ = ["WakeEventParam", "Environment", "LoopRetrigger", "LoopRetriggerUnmetCondition", "Timer"] +__all__ = [ + "WakeEventParam", + "DevcontainerRebuild", + "Environment", + "LoopRetrigger", + "LoopRetriggerUnmetCondition", + "Timer", +] + + +class DevcontainerRebuild(TypedDict, total=False): + environment_id: Annotated[str, PropertyInfo(alias="environmentId")] + + failure_message: Annotated[SequenceNotStr[str], PropertyInfo(alias="failureMessage")] + + phase: str + """The devcontainer phase reached by the target session.""" + + session_id: Annotated[str, PropertyInfo(alias="sessionId")] class Environment(TypedDict, total=False): @@ -52,6 +70,8 @@ class WakeEventParam(TypedDict, total=False): Delivered via SendToAgentExecution as a new oneof variant. """ + devcontainer_rebuild: Annotated[DevcontainerRebuild, PropertyInfo(alias="devcontainerRebuild")] + environment: Environment interest_id: Annotated[str, PropertyInfo(alias="interestId")] diff --git a/tests/api_resources/environments/automations/test_tasks.py b/tests/api_resources/environments/automations/test_tasks.py index 242dc25e..a2acfa39 100644 --- a/tests/api_resources/environments/automations/test_tasks.py +++ b/tests/api_resources/environments/automations/test_tasks.py @@ -65,6 +65,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "value_from": {"secret_ref": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}}, } ], + "prebuild_requires_success": True, "runs_on": { "docker": { "environment": ["string"], @@ -171,6 +172,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: "value_from": {"secret_ref": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}}, } ], + "prebuild_requires_success": True, "runs_on": { "docker": { "environment": ["string"], @@ -369,6 +371,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "value_from": {"secret_ref": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}}, } ], + "prebuild_requires_success": True, "runs_on": { "docker": { "environment": ["string"], @@ -475,6 +478,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> "value_from": {"secret_ref": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}}, } ], + "prebuild_requires_success": True, "runs_on": { "docker": { "environment": ["string"], diff --git a/tests/api_resources/environments/test_automations.py b/tests/api_resources/environments/test_automations.py index 0f1eb63c..f9a62f02 100644 --- a/tests/api_resources/environments/test_automations.py +++ b/tests/api_resources/environments/test_automations.py @@ -55,6 +55,7 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None: "depends_on": ["string"], "description": "Builds the project artifacts", "name": "Build Project", + "prebuild_requires_success": True, "runs_on": { "docker": { "environment": ["string"], @@ -136,6 +137,7 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> "depends_on": ["string"], "description": "Builds the project artifacts", "name": "Build Project", + "prebuild_requires_success": True, "runs_on": { "docker": { "environment": ["string"], diff --git a/tests/api_resources/organizations/test_policies.py b/tests/api_resources/organizations/test_policies.py index 74257ac2..93ae13b8 100644 --- a/tests/api_resources/organizations/test_policies.py +++ b/tests/api_resources/organizations/test_policies.py @@ -67,6 +67,11 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: policy = client.organizations.policies.update( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", agent_policy={ + "allowed_agent_ids": ["string"], + "allowed_codex_models": ["CODEX_OPEN_AI_MODEL_UNSPECIFIED"], + "allowed_codex_reasoning_efforts": ["CODEX_REASONING_EFFORT_UNSPECIFIED"], + "allowed_codex_service_tiers": ["CODEX_SERVICE_TIER_UNSPECIFIED"], + "codex_model_policy": {"model_states": {"foo": "CODEX_MODEL_POLICY_STATE_UNSPECIFIED"}}, "command_deny_list": ["string"], "conversation_sharing_policy": "CONVERSATION_SHARING_POLICY_UNSPECIFIED", "max_subagents_per_environment": 10, @@ -79,6 +84,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: default_editor_id="defaultEditorId", default_environment_image="defaultEnvironmentImage", delete_archived_environments_after="+9125115.360s", + disable_from_scratch=True, editor_version_restrictions={"foo": {"allowed_versions": ["string"]}}, maximum_environment_lifetime="+9125115.360s", maximum_environments_per_user="20", @@ -88,7 +94,6 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, - project_creation_defaults={"insights_enabled": True}, require_custom_domain_access=True, restrict_account_creation_to_scim=True, security_agent_policy={ @@ -100,11 +105,13 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: "tags": "tags", } }, + security_policy_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", veto_exec_policy={ "action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED", "enabled": True, "executables": ["string"], }, + web_browser_disabled=True, ) assert_matches_type(object, policy, path=["response"]) @@ -188,6 +195,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> policy = await async_client.organizations.policies.update( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", agent_policy={ + "allowed_agent_ids": ["string"], + "allowed_codex_models": ["CODEX_OPEN_AI_MODEL_UNSPECIFIED"], + "allowed_codex_reasoning_efforts": ["CODEX_REASONING_EFFORT_UNSPECIFIED"], + "allowed_codex_service_tiers": ["CODEX_SERVICE_TIER_UNSPECIFIED"], + "codex_model_policy": {"model_states": {"foo": "CODEX_MODEL_POLICY_STATE_UNSPECIFIED"}}, "command_deny_list": ["string"], "conversation_sharing_policy": "CONVERSATION_SHARING_POLICY_UNSPECIFIED", "max_subagents_per_environment": 10, @@ -200,6 +212,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> default_editor_id="defaultEditorId", default_environment_image="defaultEnvironmentImage", delete_archived_environments_after="+9125115.360s", + disable_from_scratch=True, editor_version_restrictions={"foo": {"allowed_versions": ["string"]}}, maximum_environment_lifetime="+9125115.360s", maximum_environments_per_user="20", @@ -209,7 +222,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, - project_creation_defaults={"insights_enabled": True}, require_custom_domain_access=True, restrict_account_creation_to_scim=True, security_agent_policy={ @@ -221,11 +233,13 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> "tags": "tags", } }, + security_policy_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", veto_exec_policy={ "action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED", "enabled": True, "executables": ["string"], }, + web_browser_disabled=True, ) assert_matches_type(object, policy, path=["response"]) diff --git a/tests/api_resources/test_agents.py b/tests/api_resources/test_agents.py index 0a7b1ed7..7b2e70a2 100644 --- a/tests/api_resources/test_agents.py +++ b/tests/api_resources/test_agents.py @@ -191,6 +191,7 @@ def test_method_list_executions_with_all_params(self, client: Gitpod) -> None: token="token", page_size=0, filter={ + "agent_execution_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], "agent_ids": ["b8a64cfa-43e2-4b9d-9fb3-07edc63f5971"], "annotations": {"foo": "string"}, "creator_ids": ["string"], @@ -366,6 +367,11 @@ def test_method_send_to_execution_with_all_params(self, client: Gitpod) -> None: "payload": "payload", "type": "TYPE_UNSPECIFIED", }, + codex_settings={ + "model": "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "reasoning_effort": "CODEX_REASONING_EFFORT_UNSPECIFIED", + "service_tier": "CODEX_SERVICE_TIER_UNSPECIFIED", + }, user_input={ "id": "id", "created_at": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -385,6 +391,12 @@ def test_method_send_to_execution_with_all_params(self, client: Gitpod) -> None: "text": {"content": "Generate a report based on the latest logs."}, }, wake_event={ + "devcontainer_rebuild": { + "environment_id": "environmentId", + "failure_message": ["string"], + "phase": "phase", + "session_id": "sessionId", + }, "environment": { "environment_id": "environmentId", "failure_message": ["string"], @@ -467,6 +479,11 @@ def test_method_start_execution_with_all_params(self, client: Gitpod) -> None: "url": "url", }, }, + codex_settings={ + "model": "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "reasoning_effort": "CODEX_REASONING_EFFORT_UNSPECIFIED", + "service_tier": "CODEX_SERVICE_TIER_UNSPECIFIED", + }, mode="AGENT_MODE_UNSPECIFIED", name="name", runner_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -749,6 +766,7 @@ async def test_method_list_executions_with_all_params(self, async_client: AsyncG token="token", page_size=0, filter={ + "agent_execution_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], "agent_ids": ["b8a64cfa-43e2-4b9d-9fb3-07edc63f5971"], "annotations": {"foo": "string"}, "creator_ids": ["string"], @@ -924,6 +942,11 @@ async def test_method_send_to_execution_with_all_params(self, async_client: Asyn "payload": "payload", "type": "TYPE_UNSPECIFIED", }, + codex_settings={ + "model": "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "reasoning_effort": "CODEX_REASONING_EFFORT_UNSPECIFIED", + "service_tier": "CODEX_SERVICE_TIER_UNSPECIFIED", + }, user_input={ "id": "id", "created_at": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -943,6 +966,12 @@ async def test_method_send_to_execution_with_all_params(self, async_client: Asyn "text": {"content": "Generate a report based on the latest logs."}, }, wake_event={ + "devcontainer_rebuild": { + "environment_id": "environmentId", + "failure_message": ["string"], + "phase": "phase", + "session_id": "sessionId", + }, "environment": { "environment_id": "environmentId", "failure_message": ["string"], @@ -1025,6 +1054,11 @@ async def test_method_start_execution_with_all_params(self, async_client: AsyncG "url": "url", }, }, + codex_settings={ + "model": "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "reasoning_effort": "CODEX_REASONING_EFFORT_UNSPECIFIED", + "service_tier": "CODEX_SERVICE_TIER_UNSPECIFIED", + }, mode="AGENT_MODE_UNSPECIFIED", name="name", runner_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", diff --git a/tests/api_resources/test_automations.py b/tests/api_resources/test_automations.py index 943c0d0a..257d2436 100644 --- a/tests/api_resources/test_automations.py +++ b/tests/api_resources/test_automations.py @@ -70,6 +70,11 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: } ], }, + codex_settings={ + "model": "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "reasoning_effort": "CODEX_REASONING_EFFORT_UNSPECIFIED", + "service_tier": "CODEX_SERVICE_TIER_UNSPECIFIED", + }, description="description", executor={ "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -213,6 +218,11 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: } ], }, + codex_settings={ + "model": "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "reasoning_effort": "CODEX_REASONING_EFFORT_UNSPECIFIED", + "service_tier": "CODEX_SERVICE_TIER_UNSPECIFIED", + }, description="description", disabled=True, executor={ @@ -752,6 +762,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> } ], }, + codex_settings={ + "model": "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "reasoning_effort": "CODEX_REASONING_EFFORT_UNSPECIFIED", + "service_tier": "CODEX_SERVICE_TIER_UNSPECIFIED", + }, description="description", executor={ "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -895,6 +910,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> } ], }, + codex_settings={ + "model": "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "reasoning_effort": "CODEX_REASONING_EFFORT_UNSPECIFIED", + "service_tier": "CODEX_SERVICE_TIER_UNSPECIFIED", + }, description="description", disabled=True, executor={ diff --git a/tests/api_resources/test_billing.py b/tests/api_resources/test_billing.py new file mode 100644 index 00000000..ec7e2758 --- /dev/null +++ b/tests/api_resources/test_billing.py @@ -0,0 +1,1005 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from gitpod import Gitpod, AsyncGitpod +from tests.utils import assert_matches_type +from gitpod.types import ( + UserCostBudgetUsage, + TeamEnterpriseAIUsage, + UserCreditBudgetUsage, + BillingGetCreditUsageExportResponse, + BillingGetCreditUsageReportResponse, + BillingGetCumulativeCreditUsageResponse, + BillingGetEnterpriseAIUsageSummaryResponse, + BillingGetEnterpriseAIUsageTimeSeriesResponse, +) +from gitpod._utils import parse_datetime +from gitpod.pagination import SyncTeamUsagePage, SyncUserUsagePage, AsyncTeamUsagePage, AsyncUserUsagePage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestBilling: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_credit_usage_export(self, client: Gitpod) -> None: + billing = client.billing.get_credit_usage_export( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetCreditUsageExportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_credit_usage_export_with_all_params(self, client: Gitpod) -> None: + billing = client.billing.get_credit_usage_export( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + group_by="CREDIT_USAGE_EXPORT_GROUP_BY_DAILY_SUMMARY", + ) + assert_matches_type(BillingGetCreditUsageExportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_credit_usage_export(self, client: Gitpod) -> None: + response = client.billing.with_raw_response.get_credit_usage_export( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = response.parse() + assert_matches_type(BillingGetCreditUsageExportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_credit_usage_export(self, client: Gitpod) -> None: + with client.billing.with_streaming_response.get_credit_usage_export( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = response.parse() + assert_matches_type(BillingGetCreditUsageExportResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_credit_usage_report(self, client: Gitpod) -> None: + billing = client.billing.get_credit_usage_report( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetCreditUsageReportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_credit_usage_report_with_all_params(self, client: Gitpod) -> None: + billing = client.billing.get_credit_usage_report( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + filter={ + "subject": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + } + }, + timezone="timezone", + ) + assert_matches_type(BillingGetCreditUsageReportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_credit_usage_report(self, client: Gitpod) -> None: + response = client.billing.with_raw_response.get_credit_usage_report( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = response.parse() + assert_matches_type(BillingGetCreditUsageReportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_credit_usage_report(self, client: Gitpod) -> None: + with client.billing.with_streaming_response.get_credit_usage_report( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = response.parse() + assert_matches_type(BillingGetCreditUsageReportResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_cumulative_credit_usage(self, client: Gitpod) -> None: + billing = client.billing.get_cumulative_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetCumulativeCreditUsageResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_cumulative_credit_usage_with_all_params(self, client: Gitpod) -> None: + billing = client.billing.get_cumulative_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + as_of=parse_datetime("2026-03-31T23:59:59Z"), + ) + assert_matches_type(BillingGetCumulativeCreditUsageResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_cumulative_credit_usage(self, client: Gitpod) -> None: + response = client.billing.with_raw_response.get_cumulative_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = response.parse() + assert_matches_type(BillingGetCumulativeCreditUsageResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_cumulative_credit_usage(self, client: Gitpod) -> None: + with client.billing.with_streaming_response.get_cumulative_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = response.parse() + assert_matches_type(BillingGetCumulativeCreditUsageResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_enterprise_ai_usage_summary(self, client: Gitpod) -> None: + billing = client.billing.get_enterprise_ai_usage_summary( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetEnterpriseAIUsageSummaryResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_enterprise_ai_usage_summary_with_all_params(self, client: Gitpod) -> None: + billing = client.billing.get_enterprise_ai_usage_summary( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + timezone="timezone", + ) + assert_matches_type(BillingGetEnterpriseAIUsageSummaryResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_enterprise_ai_usage_summary(self, client: Gitpod) -> None: + response = client.billing.with_raw_response.get_enterprise_ai_usage_summary( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = response.parse() + assert_matches_type(BillingGetEnterpriseAIUsageSummaryResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_enterprise_ai_usage_summary(self, client: Gitpod) -> None: + with client.billing.with_streaming_response.get_enterprise_ai_usage_summary( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = response.parse() + assert_matches_type(BillingGetEnterpriseAIUsageSummaryResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_enterprise_ai_usage_time_series(self, client: Gitpod) -> None: + billing = client.billing.get_enterprise_ai_usage_time_series( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetEnterpriseAIUsageTimeSeriesResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_enterprise_ai_usage_time_series_with_all_params(self, client: Gitpod) -> None: + billing = client.billing.get_enterprise_ai_usage_time_series( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + filter={ + "subject": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + } + }, + timezone="timezone", + ) + assert_matches_type(BillingGetEnterpriseAIUsageTimeSeriesResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_enterprise_ai_usage_time_series(self, client: Gitpod) -> None: + response = client.billing.with_raw_response.get_enterprise_ai_usage_time_series( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = response.parse() + assert_matches_type(BillingGetEnterpriseAIUsageTimeSeriesResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_enterprise_ai_usage_time_series(self, client: Gitpod) -> None: + with client.billing.with_streaming_response.get_enterprise_ai_usage_time_series( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = response.parse() + assert_matches_type(BillingGetEnterpriseAIUsageTimeSeriesResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_enterprise_ai_team_usage(self, client: Gitpod) -> None: + billing = client.billing.list_enterprise_ai_team_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(SyncTeamUsagePage[TeamEnterpriseAIUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_enterprise_ai_team_usage_with_all_params(self, client: Gitpod) -> None: + billing = client.billing.list_enterprise_ai_team_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + token="token", + page_size=0, + filter={"team_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, + pagination={ + "token": "token", + "page_size": 100, + }, + timezone="timezone", + ) + assert_matches_type(SyncTeamUsagePage[TeamEnterpriseAIUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_list_enterprise_ai_team_usage(self, client: Gitpod) -> None: + response = client.billing.with_raw_response.list_enterprise_ai_team_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = response.parse() + assert_matches_type(SyncTeamUsagePage[TeamEnterpriseAIUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_list_enterprise_ai_team_usage(self, client: Gitpod) -> None: + with client.billing.with_streaming_response.list_enterprise_ai_team_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = response.parse() + assert_matches_type(SyncTeamUsagePage[TeamEnterpriseAIUsage], billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_enterprise_ai_user_usage(self, client: Gitpod) -> None: + billing = client.billing.list_enterprise_ai_user_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(SyncUserUsagePage[UserCostBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_enterprise_ai_user_usage_with_all_params(self, client: Gitpod) -> None: + billing = client.billing.list_enterprise_ai_user_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + token="token", + page_size=0, + filter={ + "subject": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + } + }, + pagination={ + "token": "token", + "page_size": 100, + }, + sort={ + "field": "SORT_FIELD_UNSPECIFIED", + "order": "SORT_ORDER_UNSPECIFIED", + }, + timezone="timezone", + ) + assert_matches_type(SyncUserUsagePage[UserCostBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_list_enterprise_ai_user_usage(self, client: Gitpod) -> None: + response = client.billing.with_raw_response.list_enterprise_ai_user_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = response.parse() + assert_matches_type(SyncUserUsagePage[UserCostBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_list_enterprise_ai_user_usage(self, client: Gitpod) -> None: + with client.billing.with_streaming_response.list_enterprise_ai_user_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = response.parse() + assert_matches_type(SyncUserUsagePage[UserCostBudgetUsage], billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_enterprise_user_credit_usage(self, client: Gitpod) -> None: + billing = client.billing.list_enterprise_user_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(SyncUserUsagePage[UserCreditBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_enterprise_user_credit_usage_with_all_params(self, client: Gitpod) -> None: + billing = client.billing.list_enterprise_user_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + token="token", + page_size=0, + as_of=parse_datetime("2019-12-27T18:11:19.117Z"), + pagination={ + "token": "token", + "page_size": 50, + }, + sort={ + "field": "SORT_FIELD_UNSPECIFIED", + "order": "SORT_ORDER_UNSPECIFIED", + }, + ) + assert_matches_type(SyncUserUsagePage[UserCreditBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_list_enterprise_user_credit_usage(self, client: Gitpod) -> None: + response = client.billing.with_raw_response.list_enterprise_user_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = response.parse() + assert_matches_type(SyncUserUsagePage[UserCreditBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_list_enterprise_user_credit_usage(self, client: Gitpod) -> None: + with client.billing.with_streaming_response.list_enterprise_user_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = response.parse() + assert_matches_type(SyncUserUsagePage[UserCreditBudgetUsage], billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncBilling: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_credit_usage_export(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_credit_usage_export( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetCreditUsageExportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_credit_usage_export_with_all_params(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_credit_usage_export( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + group_by="CREDIT_USAGE_EXPORT_GROUP_BY_DAILY_SUMMARY", + ) + assert_matches_type(BillingGetCreditUsageExportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_credit_usage_export(self, async_client: AsyncGitpod) -> None: + response = await async_client.billing.with_raw_response.get_credit_usage_export( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = await response.parse() + assert_matches_type(BillingGetCreditUsageExportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_credit_usage_export(self, async_client: AsyncGitpod) -> None: + async with async_client.billing.with_streaming_response.get_credit_usage_export( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = await response.parse() + assert_matches_type(BillingGetCreditUsageExportResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_credit_usage_report(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_credit_usage_report( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetCreditUsageReportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_credit_usage_report_with_all_params(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_credit_usage_report( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + filter={ + "subject": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + } + }, + timezone="timezone", + ) + assert_matches_type(BillingGetCreditUsageReportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_credit_usage_report(self, async_client: AsyncGitpod) -> None: + response = await async_client.billing.with_raw_response.get_credit_usage_report( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = await response.parse() + assert_matches_type(BillingGetCreditUsageReportResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_credit_usage_report(self, async_client: AsyncGitpod) -> None: + async with async_client.billing.with_streaming_response.get_credit_usage_report( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = await response.parse() + assert_matches_type(BillingGetCreditUsageReportResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_cumulative_credit_usage(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_cumulative_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetCumulativeCreditUsageResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_cumulative_credit_usage_with_all_params(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_cumulative_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + as_of=parse_datetime("2026-03-31T23:59:59Z"), + ) + assert_matches_type(BillingGetCumulativeCreditUsageResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_cumulative_credit_usage(self, async_client: AsyncGitpod) -> None: + response = await async_client.billing.with_raw_response.get_cumulative_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = await response.parse() + assert_matches_type(BillingGetCumulativeCreditUsageResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_cumulative_credit_usage(self, async_client: AsyncGitpod) -> None: + async with async_client.billing.with_streaming_response.get_cumulative_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = await response.parse() + assert_matches_type(BillingGetCumulativeCreditUsageResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_enterprise_ai_usage_summary(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_enterprise_ai_usage_summary( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetEnterpriseAIUsageSummaryResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_enterprise_ai_usage_summary_with_all_params(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_enterprise_ai_usage_summary( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + timezone="timezone", + ) + assert_matches_type(BillingGetEnterpriseAIUsageSummaryResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_enterprise_ai_usage_summary(self, async_client: AsyncGitpod) -> None: + response = await async_client.billing.with_raw_response.get_enterprise_ai_usage_summary( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = await response.parse() + assert_matches_type(BillingGetEnterpriseAIUsageSummaryResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_enterprise_ai_usage_summary(self, async_client: AsyncGitpod) -> None: + async with async_client.billing.with_streaming_response.get_enterprise_ai_usage_summary( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = await response.parse() + assert_matches_type(BillingGetEnterpriseAIUsageSummaryResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_enterprise_ai_usage_time_series(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_enterprise_ai_usage_time_series( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(BillingGetEnterpriseAIUsageTimeSeriesResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_enterprise_ai_usage_time_series_with_all_params(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.get_enterprise_ai_usage_time_series( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + filter={ + "subject": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + } + }, + timezone="timezone", + ) + assert_matches_type(BillingGetEnterpriseAIUsageTimeSeriesResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_enterprise_ai_usage_time_series(self, async_client: AsyncGitpod) -> None: + response = await async_client.billing.with_raw_response.get_enterprise_ai_usage_time_series( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = await response.parse() + assert_matches_type(BillingGetEnterpriseAIUsageTimeSeriesResponse, billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_enterprise_ai_usage_time_series(self, async_client: AsyncGitpod) -> None: + async with async_client.billing.with_streaming_response.get_enterprise_ai_usage_time_series( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = await response.parse() + assert_matches_type(BillingGetEnterpriseAIUsageTimeSeriesResponse, billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_enterprise_ai_team_usage(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.list_enterprise_ai_team_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(AsyncTeamUsagePage[TeamEnterpriseAIUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_enterprise_ai_team_usage_with_all_params(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.list_enterprise_ai_team_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + token="token", + page_size=0, + filter={"team_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, + pagination={ + "token": "token", + "page_size": 100, + }, + timezone="timezone", + ) + assert_matches_type(AsyncTeamUsagePage[TeamEnterpriseAIUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_list_enterprise_ai_team_usage(self, async_client: AsyncGitpod) -> None: + response = await async_client.billing.with_raw_response.list_enterprise_ai_team_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = await response.parse() + assert_matches_type(AsyncTeamUsagePage[TeamEnterpriseAIUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_list_enterprise_ai_team_usage(self, async_client: AsyncGitpod) -> None: + async with async_client.billing.with_streaming_response.list_enterprise_ai_team_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = await response.parse() + assert_matches_type(AsyncTeamUsagePage[TeamEnterpriseAIUsage], billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_enterprise_ai_user_usage(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.list_enterprise_ai_user_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(AsyncUserUsagePage[UserCostBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_enterprise_ai_user_usage_with_all_params(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.list_enterprise_ai_user_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + token="token", + page_size=0, + filter={ + "subject": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + } + }, + pagination={ + "token": "token", + "page_size": 100, + }, + sort={ + "field": "SORT_FIELD_UNSPECIFIED", + "order": "SORT_ORDER_UNSPECIFIED", + }, + timezone="timezone", + ) + assert_matches_type(AsyncUserUsagePage[UserCostBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_list_enterprise_ai_user_usage(self, async_client: AsyncGitpod) -> None: + response = await async_client.billing.with_raw_response.list_enterprise_ai_user_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = await response.parse() + assert_matches_type(AsyncUserUsagePage[UserCostBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_list_enterprise_ai_user_usage(self, async_client: AsyncGitpod) -> None: + async with async_client.billing.with_streaming_response.list_enterprise_ai_user_usage( + date_range={ + "end_time": parse_datetime("2024-01-31T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = await response.parse() + assert_matches_type(AsyncUserUsagePage[UserCostBudgetUsage], billing, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_enterprise_user_credit_usage(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.list_enterprise_user_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(AsyncUserUsagePage[UserCreditBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_enterprise_user_credit_usage_with_all_params(self, async_client: AsyncGitpod) -> None: + billing = await async_client.billing.list_enterprise_user_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + token="token", + page_size=0, + as_of=parse_datetime("2019-12-27T18:11:19.117Z"), + pagination={ + "token": "token", + "page_size": 50, + }, + sort={ + "field": "SORT_FIELD_UNSPECIFIED", + "order": "SORT_ORDER_UNSPECIFIED", + }, + ) + assert_matches_type(AsyncUserUsagePage[UserCreditBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_list_enterprise_user_credit_usage(self, async_client: AsyncGitpod) -> None: + response = await async_client.billing.with_raw_response.list_enterprise_user_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + billing = await response.parse() + assert_matches_type(AsyncUserUsagePage[UserCreditBudgetUsage], billing, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_list_enterprise_user_credit_usage(self, async_client: AsyncGitpod) -> None: + async with async_client.billing.with_streaming_response.list_enterprise_user_credit_usage( + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + billing = await response.parse() + assert_matches_type(AsyncUserUsagePage[UserCreditBudgetUsage], billing, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_errors.py b/tests/api_resources/test_errors.py deleted file mode 100644 index 5e342a29..00000000 --- a/tests/api_resources/test_errors.py +++ /dev/null @@ -1,224 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from gitpod import Gitpod, AsyncGitpod -from tests.utils import assert_matches_type -from gitpod._utils import parse_datetime - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestErrors: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_method_report_errors(self, client: Gitpod) -> None: - error = client.errors.report_errors() - assert_matches_type(object, error, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_method_report_errors_with_all_params(self, client: Gitpod) -> None: - error = client.errors.report_errors( - events=[ - { - "breadcrumbs": [ - { - "category": "category", - "data": {"foo": "string"}, - "level": "ERROR_LEVEL_UNSPECIFIED", - "message": "message", - "timestamp": parse_datetime("2019-12-27T18:11:19.117Z"), - "type": "type", - } - ], - "environment": "environment", - "event_id": "210b9798eb53baa4e69d31c1071cf03d", - "exceptions": [ - { - "mechanism": { - "data": {"foo": "string"}, - "description": "description", - "handled": True, - "synthetic": True, - "type": "x", - }, - "module": "module", - "stacktrace": [ - { - "colno": 0, - "context_line": "contextLine", - "filename": "filename", - "function": "function", - "in_app": True, - "lineno": 0, - "module": "module", - "post_context": ["string"], - "pre_context": ["string"], - "vars": {"foo": "string"}, - } - ], - "thread_id": "threadId", - "type": "x", - "value": "value", - } - ], - "extra": {"foo": "string"}, - "fingerprint": ["x"], - "identity_id": "ecc2efdd-ddfa-31a9-c6f1-b833d337aa7c", - "level": "ERROR_LEVEL_UNSPECIFIED", - "logger": "logger", - "modules": {"foo": "string"}, - "platform": "x", - "release": "release", - "request": { - "data": "data", - "headers": {"foo": "string"}, - "method": "method", - "query_string": {"foo": "string"}, - "url": "url", - }, - "sdk": {"foo": "string"}, - "server_name": "serverName", - "tags": {"foo": "string"}, - "timestamp": parse_datetime("2019-12-27T18:11:19.117Z"), - "transaction": "transaction", - } - ], - ) - assert_matches_type(object, error, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_raw_response_report_errors(self, client: Gitpod) -> None: - response = client.errors.with_raw_response.report_errors() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - error = response.parse() - assert_matches_type(object, error, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_streaming_response_report_errors(self, client: Gitpod) -> None: - with client.errors.with_streaming_response.report_errors() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - error = response.parse() - assert_matches_type(object, error, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncErrors: - parametrize = pytest.mark.parametrize( - "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] - ) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_method_report_errors(self, async_client: AsyncGitpod) -> None: - error = await async_client.errors.report_errors() - assert_matches_type(object, error, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_method_report_errors_with_all_params(self, async_client: AsyncGitpod) -> None: - error = await async_client.errors.report_errors( - events=[ - { - "breadcrumbs": [ - { - "category": "category", - "data": {"foo": "string"}, - "level": "ERROR_LEVEL_UNSPECIFIED", - "message": "message", - "timestamp": parse_datetime("2019-12-27T18:11:19.117Z"), - "type": "type", - } - ], - "environment": "environment", - "event_id": "210b9798eb53baa4e69d31c1071cf03d", - "exceptions": [ - { - "mechanism": { - "data": {"foo": "string"}, - "description": "description", - "handled": True, - "synthetic": True, - "type": "x", - }, - "module": "module", - "stacktrace": [ - { - "colno": 0, - "context_line": "contextLine", - "filename": "filename", - "function": "function", - "in_app": True, - "lineno": 0, - "module": "module", - "post_context": ["string"], - "pre_context": ["string"], - "vars": {"foo": "string"}, - } - ], - "thread_id": "threadId", - "type": "x", - "value": "value", - } - ], - "extra": {"foo": "string"}, - "fingerprint": ["x"], - "identity_id": "ecc2efdd-ddfa-31a9-c6f1-b833d337aa7c", - "level": "ERROR_LEVEL_UNSPECIFIED", - "logger": "logger", - "modules": {"foo": "string"}, - "platform": "x", - "release": "release", - "request": { - "data": "data", - "headers": {"foo": "string"}, - "method": "method", - "query_string": {"foo": "string"}, - "url": "url", - }, - "sdk": {"foo": "string"}, - "server_name": "serverName", - "tags": {"foo": "string"}, - "timestamp": parse_datetime("2019-12-27T18:11:19.117Z"), - "transaction": "transaction", - } - ], - ) - assert_matches_type(object, error, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_raw_response_report_errors(self, async_client: AsyncGitpod) -> None: - response = await async_client.errors.with_raw_response.report_errors() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - error = await response.parse() - assert_matches_type(object, error, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_streaming_response_report_errors(self, async_client: AsyncGitpod) -> None: - async with async_client.errors.with_streaming_response.report_errors() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - error = await response.parse() - assert_matches_type(object, error, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index dc84a57e..0bff6108 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -9,7 +9,11 @@ from gitpod import Gitpod, AsyncGitpod from tests.utils import assert_matches_type -from gitpod.types import EventListResponse, EventWatchResponse +from gitpod.types import ( + EventListResponse, + EventWatchResponse, + EventRetrieveResponse, +) from gitpod._utils import parse_datetime from gitpod.pagination import SyncEntriesPage, AsyncEntriesPage @@ -19,6 +23,40 @@ class TestEvents: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_retrieve(self, client: Gitpod) -> None: + event = client.events.retrieve( + audit_log_entry_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) + assert_matches_type(EventRetrieveResponse, event, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_retrieve(self, client: Gitpod) -> None: + response = client.events.with_raw_response.retrieve( + audit_log_entry_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + event = response.parse() + assert_matches_type(EventRetrieveResponse, event, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_retrieve(self, client: Gitpod) -> None: + with client.events.with_streaming_response.retrieve( + audit_log_entry_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + event = response.parse() + assert_matches_type(EventRetrieveResponse, event, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list(self, client: Gitpod) -> None: @@ -125,6 +163,40 @@ class TestAsyncEvents: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: + event = await async_client.events.retrieve( + audit_log_entry_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) + assert_matches_type(EventRetrieveResponse, event, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: + response = await async_client.events.with_raw_response.retrieve( + audit_log_entry_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + event = await response.parse() + assert_matches_type(EventRetrieveResponse, event, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: + async with async_client.events.with_streaming_response.retrieve( + audit_log_entry_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + event = await response.parse() + assert_matches_type(EventRetrieveResponse, event, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: diff --git a/tests/api_resources/test_runners.py b/tests/api_resources/test_runners.py index dad788c8..15517f08 100644 --- a/tests/api_resources/test_runners.py +++ b/tests/api_resources/test_runners.py @@ -40,8 +40,8 @@ def test_method_create(self, client: Gitpod) -> None: def test_method_create_with_all_params(self, client: Gitpod) -> None: runner = client.runners.create( kind="RUNNER_KIND_UNSPECIFIED", - name="Production Runner", - provider="RUNNER_PROVIDER_AWS_EC2", + name="GCP Runner", + provider="RUNNER_PROVIDER_GCP", runner_manager_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", spec={ "configuration": { @@ -55,7 +55,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "url": "url", "username": "username", }, - "region": "us-west", + "region": "us-central1", "release_channel": "RUNNER_RELEASE_CHANNEL_STABLE", "update_window": { "end_hour": 0, @@ -554,8 +554,8 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: runner = await async_client.runners.create( kind="RUNNER_KIND_UNSPECIFIED", - name="Production Runner", - provider="RUNNER_PROVIDER_AWS_EC2", + name="GCP Runner", + provider="RUNNER_PROVIDER_GCP", runner_manager_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", spec={ "configuration": { @@ -569,7 +569,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "url": "url", "username": "username", }, - "region": "us-west", + "region": "us-central1", "release_channel": "RUNNER_RELEASE_CHANNEL_STABLE", "update_window": { "end_hour": 0, diff --git a/tests/api_resources/test_secrets.py b/tests/api_resources/test_secrets.py index 694d69ab..66cae944 100644 --- a/tests/api_resources/test_secrets.py +++ b/tests/api_resources/test_secrets.py @@ -48,6 +48,13 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "service_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, + source={ + "oidc_jfrog": { + "host": "x", + "provider_name": "x", + }, + "verbatim": True, + }, value="postgresql://user:pass@localhost:5432/db", ) assert_matches_type(SecretCreateResponse, secret, path=["response"]) @@ -265,6 +272,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "service_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, + source={ + "oidc_jfrog": { + "host": "x", + "provider_name": "x", + }, + "verbatim": True, + }, value="postgresql://user:pass@localhost:5432/db", ) assert_matches_type(SecretCreateResponse, secret, path=["response"]) diff --git a/tests/api_resources/test_security_policies.py b/tests/api_resources/test_security_policies.py new file mode 100644 index 00000000..99294e0b --- /dev/null +++ b/tests/api_resources/test_security_policies.py @@ -0,0 +1,492 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from gitpod import Gitpod, AsyncGitpod +from tests.utils import assert_matches_type +from gitpod.types import ( + SecurityPolicy, + SecurityPolicyCreateResponse, + SecurityPolicyUpdateResponse, + SecurityPolicyRetrieveResponse, +) +from gitpod.pagination import SyncSecurityPoliciesPage, AsyncSecurityPoliciesPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestSecurityPolicies: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_create(self, client: Gitpod) -> None: + security_policy = client.security_policies.create( + metadata={}, + spec={}, + ) + assert_matches_type(SecurityPolicyCreateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_create_with_all_params(self, client: Gitpod) -> None: + security_policy = client.security_policies.create( + metadata={"name": "Veto Exec audit-first"}, + spec={ + "executables": { + "default_effect": "EFFECT_ALLOW", + "rules": [ + { + "effect": "EFFECT_AUDIT", + "path": "npx", + }, + { + "effect": "EFFECT_BLOCK", + "path": "/usr/bin/curl", + }, + ], + } + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(SecurityPolicyCreateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_create(self, client: Gitpod) -> None: + response = client.security_policies.with_raw_response.create( + metadata={}, + spec={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = response.parse() + assert_matches_type(SecurityPolicyCreateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_create(self, client: Gitpod) -> None: + with client.security_policies.with_streaming_response.create( + metadata={}, + spec={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = response.parse() + assert_matches_type(SecurityPolicyCreateResponse, security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_retrieve(self, client: Gitpod) -> None: + security_policy = client.security_policies.retrieve() + assert_matches_type(SecurityPolicyRetrieveResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_retrieve_with_all_params(self, client: Gitpod) -> None: + security_policy = client.security_policies.retrieve( + security_policy_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) + assert_matches_type(SecurityPolicyRetrieveResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_retrieve(self, client: Gitpod) -> None: + response = client.security_policies.with_raw_response.retrieve() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = response.parse() + assert_matches_type(SecurityPolicyRetrieveResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_retrieve(self, client: Gitpod) -> None: + with client.security_policies.with_streaming_response.retrieve() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = response.parse() + assert_matches_type(SecurityPolicyRetrieveResponse, security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_update(self, client: Gitpod) -> None: + security_policy = client.security_policies.update() + assert_matches_type(SecurityPolicyUpdateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_update_with_all_params(self, client: Gitpod) -> None: + security_policy = client.security_policies.update( + metadata={"name": "x"}, + security_policy_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + spec={ + "executables": { + "default_effect": "EFFECT_ALLOW", + "rules": [ + { + "effect": "EFFECT_BLOCK", + "path": "npx", + }, + { + "effect": "EFFECT_BLOCK", + "path": "/usr/bin/curl", + }, + ], + } + }, + ) + assert_matches_type(SecurityPolicyUpdateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_update(self, client: Gitpod) -> None: + response = client.security_policies.with_raw_response.update() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = response.parse() + assert_matches_type(SecurityPolicyUpdateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_update(self, client: Gitpod) -> None: + with client.security_policies.with_streaming_response.update() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = response.parse() + assert_matches_type(SecurityPolicyUpdateResponse, security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list(self, client: Gitpod) -> None: + security_policy = client.security_policies.list() + assert_matches_type(SyncSecurityPoliciesPage[SecurityPolicy], security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_with_all_params(self, client: Gitpod) -> None: + security_policy = client.security_policies.list( + token="token", + page_size=0, + filter={ + "organization_id": "b0e12f6c-4c67-429d-a4a6-d9838b5da047", + "search": "search", + "security_policy_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + }, + pagination={ + "token": "token", + "page_size": 20, + }, + ) + assert_matches_type(SyncSecurityPoliciesPage[SecurityPolicy], security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_list(self, client: Gitpod) -> None: + response = client.security_policies.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = response.parse() + assert_matches_type(SyncSecurityPoliciesPage[SecurityPolicy], security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_list(self, client: Gitpod) -> None: + with client.security_policies.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = response.parse() + assert_matches_type(SyncSecurityPoliciesPage[SecurityPolicy], security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_delete(self, client: Gitpod) -> None: + security_policy = client.security_policies.delete() + assert_matches_type(object, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_delete_with_all_params(self, client: Gitpod) -> None: + security_policy = client.security_policies.delete( + security_policy_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) + assert_matches_type(object, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_delete(self, client: Gitpod) -> None: + response = client.security_policies.with_raw_response.delete() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = response.parse() + assert_matches_type(object, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_delete(self, client: Gitpod) -> None: + with client.security_policies.with_streaming_response.delete() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = response.parse() + assert_matches_type(object, security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncSecurityPolicies: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_create(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.create( + metadata={}, + spec={}, + ) + assert_matches_type(SecurityPolicyCreateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.create( + metadata={"name": "Veto Exec audit-first"}, + spec={ + "executables": { + "default_effect": "EFFECT_ALLOW", + "rules": [ + { + "effect": "EFFECT_AUDIT", + "path": "npx", + }, + { + "effect": "EFFECT_BLOCK", + "path": "/usr/bin/curl", + }, + ], + } + }, + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + ) + assert_matches_type(SecurityPolicyCreateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: + response = await async_client.security_policies.with_raw_response.create( + metadata={}, + spec={}, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = await response.parse() + assert_matches_type(SecurityPolicyCreateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: + async with async_client.security_policies.with_streaming_response.create( + metadata={}, + spec={}, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = await response.parse() + assert_matches_type(SecurityPolicyCreateResponse, security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.retrieve() + assert_matches_type(SecurityPolicyRetrieveResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_retrieve_with_all_params(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.retrieve( + security_policy_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) + assert_matches_type(SecurityPolicyRetrieveResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: + response = await async_client.security_policies.with_raw_response.retrieve() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = await response.parse() + assert_matches_type(SecurityPolicyRetrieveResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: + async with async_client.security_policies.with_streaming_response.retrieve() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = await response.parse() + assert_matches_type(SecurityPolicyRetrieveResponse, security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_update(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.update() + assert_matches_type(SecurityPolicyUpdateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.update( + metadata={"name": "x"}, + security_policy_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + spec={ + "executables": { + "default_effect": "EFFECT_ALLOW", + "rules": [ + { + "effect": "EFFECT_BLOCK", + "path": "npx", + }, + { + "effect": "EFFECT_BLOCK", + "path": "/usr/bin/curl", + }, + ], + } + }, + ) + assert_matches_type(SecurityPolicyUpdateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: + response = await async_client.security_policies.with_raw_response.update() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = await response.parse() + assert_matches_type(SecurityPolicyUpdateResponse, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: + async with async_client.security_policies.with_streaming_response.update() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = await response.parse() + assert_matches_type(SecurityPolicyUpdateResponse, security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.list() + assert_matches_type(AsyncSecurityPoliciesPage[SecurityPolicy], security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.list( + token="token", + page_size=0, + filter={ + "organization_id": "b0e12f6c-4c67-429d-a4a6-d9838b5da047", + "search": "search", + "security_policy_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + }, + pagination={ + "token": "token", + "page_size": 20, + }, + ) + assert_matches_type(AsyncSecurityPoliciesPage[SecurityPolicy], security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: + response = await async_client.security_policies.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = await response.parse() + assert_matches_type(AsyncSecurityPoliciesPage[SecurityPolicy], security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: + async with async_client.security_policies.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = await response.parse() + assert_matches_type(AsyncSecurityPoliciesPage[SecurityPolicy], security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_delete(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.delete() + assert_matches_type(object, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_delete_with_all_params(self, async_client: AsyncGitpod) -> None: + security_policy = await async_client.security_policies.delete( + security_policy_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + ) + assert_matches_type(object, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: + response = await async_client.security_policies.with_raw_response.delete() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + security_policy = await response.parse() + assert_matches_type(object, security_policy, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: + async with async_client.security_policies.with_streaming_response.delete() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + security_policy = await response.parse() + assert_matches_type(object, security_policy, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_usage.py b/tests/api_resources/test_usage.py index 754a862e..ba6063bc 100644 --- a/tests/api_resources/test_usage.py +++ b/tests/api_resources/test_usage.py @@ -9,7 +9,16 @@ from gitpod import Gitpod, AsyncGitpod from tests.utils import assert_matches_type -from gitpod.types import EnvironmentUsageRecord +from gitpod.types import ( + EnvironmentUsageRecord, + UsageGetPrSummaryResponse, + UsageGetPrTimeSeriesResponse, + UsageGetCoAuthorSummaryResponse, + UsageGetAgentTraceSummaryResponse, + UsageGetCoAuthorTimeSeriesResponse, + UsageGetAdoptionUsageSummaryResponse, + UsageGetAgentTraceTimeSeriesResponse, +) from gitpod._utils import parse_datetime from gitpod.pagination import SyncRecordsPage, AsyncRecordsPage @@ -19,6 +28,408 @@ class TestUsage: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_adoption_usage_summary(self, client: Gitpod) -> None: + usage = client.usage.get_adoption_usage_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetAdoptionUsageSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_adoption_usage_summary_with_all_params(self, client: Gitpod) -> None: + usage = client.usage.get_adoption_usage_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetAdoptionUsageSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_adoption_usage_summary(self, client: Gitpod) -> None: + response = client.usage.with_raw_response.get_adoption_usage_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = response.parse() + assert_matches_type(UsageGetAdoptionUsageSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_adoption_usage_summary(self, client: Gitpod) -> None: + with client.usage.with_streaming_response.get_adoption_usage_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = response.parse() + assert_matches_type(UsageGetAdoptionUsageSummaryResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_agent_trace_summary(self, client: Gitpod) -> None: + usage = client.usage.get_agent_trace_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetAgentTraceSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_agent_trace_summary_with_all_params(self, client: Gitpod) -> None: + usage = client.usage.get_agent_trace_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetAgentTraceSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_agent_trace_summary(self, client: Gitpod) -> None: + response = client.usage.with_raw_response.get_agent_trace_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = response.parse() + assert_matches_type(UsageGetAgentTraceSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_agent_trace_summary(self, client: Gitpod) -> None: + with client.usage.with_streaming_response.get_agent_trace_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = response.parse() + assert_matches_type(UsageGetAgentTraceSummaryResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_agent_trace_time_series(self, client: Gitpod) -> None: + usage = client.usage.get_agent_trace_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetAgentTraceTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_agent_trace_time_series_with_all_params(self, client: Gitpod) -> None: + usage = client.usage.get_agent_trace_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + resolution="RESOLUTION_WEEKLY", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetAgentTraceTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_agent_trace_time_series(self, client: Gitpod) -> None: + response = client.usage.with_raw_response.get_agent_trace_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = response.parse() + assert_matches_type(UsageGetAgentTraceTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_agent_trace_time_series(self, client: Gitpod) -> None: + with client.usage.with_streaming_response.get_agent_trace_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = response.parse() + assert_matches_type(UsageGetAgentTraceTimeSeriesResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_co_author_summary(self, client: Gitpod) -> None: + usage = client.usage.get_co_author_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetCoAuthorSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_co_author_summary_with_all_params(self, client: Gitpod) -> None: + usage = client.usage.get_co_author_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetCoAuthorSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_co_author_summary(self, client: Gitpod) -> None: + response = client.usage.with_raw_response.get_co_author_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = response.parse() + assert_matches_type(UsageGetCoAuthorSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_co_author_summary(self, client: Gitpod) -> None: + with client.usage.with_streaming_response.get_co_author_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = response.parse() + assert_matches_type(UsageGetCoAuthorSummaryResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_co_author_time_series(self, client: Gitpod) -> None: + usage = client.usage.get_co_author_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetCoAuthorTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_co_author_time_series_with_all_params(self, client: Gitpod) -> None: + usage = client.usage.get_co_author_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + resolution="RESOLUTION_WEEKLY", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetCoAuthorTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_co_author_time_series(self, client: Gitpod) -> None: + response = client.usage.with_raw_response.get_co_author_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = response.parse() + assert_matches_type(UsageGetCoAuthorTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_co_author_time_series(self, client: Gitpod) -> None: + with client.usage.with_streaming_response.get_co_author_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = response.parse() + assert_matches_type(UsageGetCoAuthorTimeSeriesResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_pr_summary(self, client: Gitpod) -> None: + usage = client.usage.get_pr_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetPrSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_pr_summary_with_all_params(self, client: Gitpod) -> None: + usage = client.usage.get_pr_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetPrSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_pr_summary(self, client: Gitpod) -> None: + response = client.usage.with_raw_response.get_pr_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = response.parse() + assert_matches_type(UsageGetPrSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_pr_summary(self, client: Gitpod) -> None: + with client.usage.with_streaming_response.get_pr_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = response.parse() + assert_matches_type(UsageGetPrSummaryResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_pr_time_series(self, client: Gitpod) -> None: + usage = client.usage.get_pr_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetPrTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_get_pr_time_series_with_all_params(self, client: Gitpod) -> None: + usage = client.usage.get_pr_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + resolution="RESOLUTION_WEEKLY", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetPrTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_get_pr_time_series(self, client: Gitpod) -> None: + response = client.usage.with_raw_response.get_pr_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = response.parse() + assert_matches_type(UsageGetPrTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_get_pr_time_series(self, client: Gitpod) -> None: + with client.usage.with_streaming_response.get_pr_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = response.parse() + assert_matches_type(UsageGetPrTimeSeriesResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_list_environment_runtime_records(self, client: Gitpod) -> None: @@ -73,6 +484,408 @@ class TestAsyncUsage: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_adoption_usage_summary(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_adoption_usage_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetAdoptionUsageSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_adoption_usage_summary_with_all_params(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_adoption_usage_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetAdoptionUsageSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_adoption_usage_summary(self, async_client: AsyncGitpod) -> None: + response = await async_client.usage.with_raw_response.get_adoption_usage_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = await response.parse() + assert_matches_type(UsageGetAdoptionUsageSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_adoption_usage_summary(self, async_client: AsyncGitpod) -> None: + async with async_client.usage.with_streaming_response.get_adoption_usage_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = await response.parse() + assert_matches_type(UsageGetAdoptionUsageSummaryResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_agent_trace_summary(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_agent_trace_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetAgentTraceSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_agent_trace_summary_with_all_params(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_agent_trace_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetAgentTraceSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_agent_trace_summary(self, async_client: AsyncGitpod) -> None: + response = await async_client.usage.with_raw_response.get_agent_trace_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = await response.parse() + assert_matches_type(UsageGetAgentTraceSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_agent_trace_summary(self, async_client: AsyncGitpod) -> None: + async with async_client.usage.with_streaming_response.get_agent_trace_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = await response.parse() + assert_matches_type(UsageGetAgentTraceSummaryResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_agent_trace_time_series(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_agent_trace_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetAgentTraceTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_agent_trace_time_series_with_all_params(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_agent_trace_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + resolution="RESOLUTION_WEEKLY", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetAgentTraceTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_agent_trace_time_series(self, async_client: AsyncGitpod) -> None: + response = await async_client.usage.with_raw_response.get_agent_trace_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = await response.parse() + assert_matches_type(UsageGetAgentTraceTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_agent_trace_time_series(self, async_client: AsyncGitpod) -> None: + async with async_client.usage.with_streaming_response.get_agent_trace_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = await response.parse() + assert_matches_type(UsageGetAgentTraceTimeSeriesResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_co_author_summary(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_co_author_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetCoAuthorSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_co_author_summary_with_all_params(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_co_author_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetCoAuthorSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_co_author_summary(self, async_client: AsyncGitpod) -> None: + response = await async_client.usage.with_raw_response.get_co_author_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = await response.parse() + assert_matches_type(UsageGetCoAuthorSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_co_author_summary(self, async_client: AsyncGitpod) -> None: + async with async_client.usage.with_streaming_response.get_co_author_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = await response.parse() + assert_matches_type(UsageGetCoAuthorSummaryResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_co_author_time_series(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_co_author_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetCoAuthorTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_co_author_time_series_with_all_params(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_co_author_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + resolution="RESOLUTION_WEEKLY", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetCoAuthorTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_co_author_time_series(self, async_client: AsyncGitpod) -> None: + response = await async_client.usage.with_raw_response.get_co_author_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = await response.parse() + assert_matches_type(UsageGetCoAuthorTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_co_author_time_series(self, async_client: AsyncGitpod) -> None: + async with async_client.usage.with_streaming_response.get_co_author_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = await response.parse() + assert_matches_type(UsageGetCoAuthorTimeSeriesResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_pr_summary(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_pr_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetPrSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_pr_summary_with_all_params(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_pr_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetPrSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_pr_summary(self, async_client: AsyncGitpod) -> None: + response = await async_client.usage.with_raw_response.get_pr_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = await response.parse() + assert_matches_type(UsageGetPrSummaryResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_pr_summary(self, async_client: AsyncGitpod) -> None: + async with async_client.usage.with_streaming_response.get_pr_summary( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = await response.parse() + assert_matches_type(UsageGetPrSummaryResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_pr_time_series(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_pr_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + assert_matches_type(UsageGetPrTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_get_pr_time_series_with_all_params(self, async_client: AsyncGitpod) -> None: + usage = await async_client.usage.get_pr_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", + resolution="RESOLUTION_WEEKLY", + team_id="teamId", + user_id="userId", + ) + assert_matches_type(UsageGetPrTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_get_pr_time_series(self, async_client: AsyncGitpod) -> None: + response = await async_client.usage.with_raw_response.get_pr_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + usage = await response.parse() + assert_matches_type(UsageGetPrTimeSeriesResponse, usage, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_get_pr_time_series(self, async_client: AsyncGitpod) -> None: + async with async_client.usage.with_streaming_response.get_pr_time_series( + date_range={ + "end_time": parse_datetime("2024-02-01T00:00:00Z"), + "start_time": parse_datetime("2024-01-01T00:00:00Z"), + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + usage = await response.parse() + assert_matches_type(UsageGetPrTimeSeriesResponse, usage, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_list_environment_runtime_records(self, async_client: AsyncGitpod) -> None: From 630d438761b409a15283932124a24e16b4221828 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 09:25:28 +0000 Subject: [PATCH 090/211] feat(api): add agent_execution_ids filter to agents list_executions --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 83150193..5aaafb9f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f8271fd3c90de2edf4e8e63bce296f295fb8e54c0522b4d159d1d1f33a902474.yml -openapi_spec_hash: fb7b7d87dc232de2b141c5cc57d16fd1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-4766ec242b97dca5e0287fe5d6d068776d017f1d25201399681e66302b65ce12.yml +openapi_spec_hash: 8cc0170e79d6bf90d8bd1eb3216fcc97 config_hash: 3d1af35edc400f59127c3b02ca3ab0ec From b1ad5f5fa5110c766928bd1be2589b227513d413 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 07:07:51 +0000 Subject: [PATCH 091/211] feat(api): add RUNNER_CAPABILITY_REDIS_STREAM to RunnerCapability enum --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5aaafb9f..1677d8c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-4766ec242b97dca5e0287fe5d6d068776d017f1d25201399681e66302b65ce12.yml -openapi_spec_hash: 8cc0170e79d6bf90d8bd1eb3216fcc97 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7486d2537e41adffa2cf5a7d17ec45e444eeae6ff32145857a36a580b96b78a9.yml +openapi_spec_hash: ba958ba8714b848852a7642e5c8dbf9e config_hash: 3d1af35edc400f59127c3b02ca3ab0ec From a4a49d6d122a1e8911331ebfbe1b7bd1ffa9b854 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 11:29:36 +0000 Subject: [PATCH 092/211] feat(api): add web_browser_disabled parameter to organizations policies update --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1677d8c9..13fd7309 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7486d2537e41adffa2cf5a7d17ec45e444eeae6ff32145857a36a580b96b78a9.yml -openapi_spec_hash: ba958ba8714b848852a7642e5c8dbf9e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-59ed987f44cc68e3f13edd3c0ca3f4ef5cc1602d96293e769014481c0804259c.yml +openapi_spec_hash: 628c61d74393db2cb860cd6585ac3fc4 config_hash: 3d1af35edc400f59127c3b02ca3ab0ec From 916c70f870b5492fe5b6c117459d88cb7cb9c46f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 14:30:53 +0000 Subject: [PATCH 093/211] feat(api): add disable_from_scratch to organizations policies --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 13fd7309..693a982f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-59ed987f44cc68e3f13edd3c0ca3f4ef5cc1602d96293e769014481c0804259c.yml -openapi_spec_hash: 628c61d74393db2cb860cd6585ac3fc4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-76936dc58c08c5be3342faf372620dd831d561f2d9d7b54b41053fad444601a9.yml +openapi_spec_hash: a677b2ab6e2b9065e6f2404d82180988 config_hash: 3d1af35edc400f59127c3b02ca3ab0ec From 93cc766ce5f504682d43f7a6f75576b3c73361fd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 17:22:35 +0000 Subject: [PATCH 094/211] codegen metadata --- .stats.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 693a982f..c80e6bbb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-76936dc58c08c5be3342faf372620dd831d561f2d9d7b54b41053fad444601a9.yml -openapi_spec_hash: a677b2ab6e2b9065e6f2404d82180988 -config_hash: 3d1af35edc400f59127c3b02ca3ab0ec +configured_endpoints: 193 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ba0de48d23dfc7339c274592f854e48d09349a33f44ec5036dc454d2c87dbadc.yml +openapi_spec_hash: 9a5309306926eecabf232b0f678fd00f +config_hash: b9336a86949216adce7dbbf72a029b57 From 48d0fcdb2c3236b2fd8256ca0eade997c6b8d549 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:29:27 +0000 Subject: [PATCH 095/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c80e6bbb..fbb2671c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ba0de48d23dfc7339c274592f854e48d09349a33f44ec5036dc454d2c87dbadc.yml -openapi_spec_hash: 9a5309306926eecabf232b0f678fd00f -config_hash: b9336a86949216adce7dbbf72a029b57 +openapi_spec_hash: 22f4387e20e7cb92626ad4ce381ee5a5 +config_hash: e1b12d78a2f5fcb3b3e05f8186474a27 From f4411b3844ada11eee804c7eeee98f75381c98cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 18:30:17 +0000 Subject: [PATCH 096/211] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index fbb2671c..769ed495 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ba0de48d23dfc7339c274592f854e48d09349a33f44ec5036dc454d2c87dbadc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f777b40ac66b17164ddb9f2e1e2a8683d0675ba4d2fefa730e562c04fe61b09d.yml openapi_spec_hash: 22f4387e20e7cb92626ad4ce381ee5a5 config_hash: e1b12d78a2f5fcb3b3e05f8186474a27 From a11c9ac7450cc80d755f31c32e6f217fb5174315 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 12:38:09 +0000 Subject: [PATCH 097/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 769ed495..6e413cc8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f777b40ac66b17164ddb9f2e1e2a8683d0675ba4d2fefa730e562c04fe61b09d.yml -openapi_spec_hash: 22f4387e20e7cb92626ad4ce381ee5a5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f991e07e349fdd081788cac8ce7909c221c9f6a4fa8f0fb975e5e35d39722be5.yml +openapi_spec_hash: bb0f7c91bcb24a2340c7b2024a25bb60 config_hash: e1b12d78a2f5fcb3b3e05f8186474a27 From 0cf6575388a08e93a3e77bfd29c21b0cde3fc1b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 13:09:46 +0000 Subject: [PATCH 098/211] feat(agent): add devcontainer rebuild wait schema --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6e413cc8..d48f4044 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f991e07e349fdd081788cac8ce7909c221c9f6a4fa8f0fb975e5e35d39722be5.yml -openapi_spec_hash: bb0f7c91bcb24a2340c7b2024a25bb60 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-eb75752fe5720f4baabf9e073767964b674a4b05b9268359f6a5d031b1e62f2d.yml +openapi_spec_hash: 1f3404210fd33b806f2b19938e141541 config_hash: e1b12d78a2f5fcb3b3e05f8186474a27 From 77ee786270bec78bc199f96592cc25e305fbd90c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 13:25:55 +0000 Subject: [PATCH 099/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d48f4044..1ad6d288 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-eb75752fe5720f4baabf9e073767964b674a4b05b9268359f6a5d031b1e62f2d.yml -openapi_spec_hash: 1f3404210fd33b806f2b19938e141541 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-95afce9ad2d541a30c22c3e09e9bb2d12cb0ca5e38c4f102de449d1839f59a98.yml +openapi_spec_hash: 22f8a6922c21f7684e19a1e0ebb00d37 config_hash: e1b12d78a2f5fcb3b3e05f8186474a27 From 2c60de5f30a5833bb5244afb1d51f482a3362c1d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 08:54:56 +0000 Subject: [PATCH 100/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1ad6d288..c9499219 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-95afce9ad2d541a30c22c3e09e9bb2d12cb0ca5e38c4f102de449d1839f59a98.yml -openapi_spec_hash: 22f8a6922c21f7684e19a1e0ebb00d37 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-5ac004b5a80428cfe45268c3b83656d94bc6299d8f555fd85c3a24bad05440f0.yml +openapi_spec_hash: 569ad9b3dc326479f44f529eb4fb59df config_hash: e1b12d78a2f5fcb3b3e05f8186474a27 From 212b6b2c408910da0b1e414428d310a32552b47a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 17:28:07 +0000 Subject: [PATCH 101/211] feat(api): add default environment class IDs to project creation defaults --- .stats.yml | 6 +- api.md | 4 ++ src/gitpod/types/organizations/__init__.py | 16 +++++ .../organizations/policy_update_params.py | 31 +++++++++- ...ject_creation_default_environment_class.py | 35 +++++++++++ ...reation_default_environment_class_param.py | 37 +++++++++++ ...ion_default_environment_class_warm_pool.py | 28 +++++++++ ...fault_environment_class_warm_pool_param.py | 28 +++++++++ .../project_creation_defaults.py | 40 ++++++++++++ .../project_creation_defaults_prebuilds.py | 61 +++++++++++++++++++ ...oject_creation_defaults_prebuilds_param.py | 61 +++++++++++++++++++ .../organizations/test_policies.py | 48 +++++++++++++++ 12 files changed, 391 insertions(+), 4 deletions(-) create mode 100644 src/gitpod/types/organizations/project_creation_default_environment_class.py create mode 100644 src/gitpod/types/organizations/project_creation_default_environment_class_param.py create mode 100644 src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool.py create mode 100644 src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool_param.py create mode 100644 src/gitpod/types/organizations/project_creation_defaults.py create mode 100644 src/gitpod/types/organizations/project_creation_defaults_prebuilds.py create mode 100644 src/gitpod/types/organizations/project_creation_defaults_prebuilds_param.py diff --git a/.stats.yml b/.stats.yml index c9499219..bd836fe0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-5ac004b5a80428cfe45268c3b83656d94bc6299d8f555fd85c3a24bad05440f0.yml -openapi_spec_hash: 569ad9b3dc326479f44f529eb4fb59df -config_hash: e1b12d78a2f5fcb3b3e05f8186474a27 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-fed94ac0dbf98aa97a3119c8a06afc4e1e310d7fa79dd43fdcfff16c5275add7.yml +openapi_spec_hash: f284d7c5b9e827cee9db4cc8f372afe3 +config_hash: 42ab337a8769c4e3bf2745ef1fbce0d6 diff --git a/api.md b/api.md index d54c829f..52faf2d3 100644 --- a/api.md +++ b/api.md @@ -553,6 +553,10 @@ from gitpod.types.organizations import ( CustomAgentEnvMapping, CustomSecurityAgent, OrganizationPolicies, + ProjectCreationDefaultEnvironmentClass, + ProjectCreationDefaultEnvironmentClassWarmPool, + ProjectCreationDefaults, + ProjectCreationDefaultsPrebuilds, SecurityAgentPolicy, VetoExecPolicy, PolicyRetrieveResponse, diff --git a/src/gitpod/types/organizations/__init__.py b/src/gitpod/types/organizations/__init__.py index 8ceaed9c..d877450f 100644 --- a/src/gitpod/types/organizations/__init__.py +++ b/src/gitpod/types/organizations/__init__.py @@ -62,14 +62,30 @@ from .domain_verification_create_response import DomainVerificationCreateResponse as DomainVerificationCreateResponse from .domain_verification_retrieve_params import DomainVerificationRetrieveParams as DomainVerificationRetrieveParams from .domain_verification_verify_response import DomainVerificationVerifyResponse as DomainVerificationVerifyResponse +from .project_creation_defaults_prebuilds import ProjectCreationDefaultsPrebuilds as ProjectCreationDefaultsPrebuilds from .sso_configuration_retrieve_response import SSOConfigurationRetrieveResponse as SSOConfigurationRetrieveResponse from .scim_configuration_retrieve_response import ScimConfigurationRetrieveResponse as ScimConfigurationRetrieveResponse from .domain_verification_retrieve_response import ( DomainVerificationRetrieveResponse as DomainVerificationRetrieveResponse, ) +from .project_creation_defaults_prebuilds_param import ( + ProjectCreationDefaultsPrebuildsParam as ProjectCreationDefaultsPrebuildsParam, +) +from .project_creation_default_environment_class import ( + ProjectCreationDefaultEnvironmentClass as ProjectCreationDefaultEnvironmentClass, +) from .scim_configuration_regenerate_token_params import ( ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams, ) from .scim_configuration_regenerate_token_response import ( ScimConfigurationRegenerateTokenResponse as ScimConfigurationRegenerateTokenResponse, ) +from .project_creation_default_environment_class_param import ( + ProjectCreationDefaultEnvironmentClassParam as ProjectCreationDefaultEnvironmentClassParam, +) +from .project_creation_default_environment_class_warm_pool import ( + ProjectCreationDefaultEnvironmentClassWarmPool as ProjectCreationDefaultEnvironmentClassWarmPool, +) +from .project_creation_default_environment_class_warm_pool_param import ( + ProjectCreationDefaultEnvironmentClassWarmPoolParam as ProjectCreationDefaultEnvironmentClassWarmPoolParam, +) diff --git a/src/gitpod/types/organizations/policy_update_params.py b/src/gitpod/types/organizations/policy_update_params.py index 5ab015ad..fc0b03b1 100644 --- a/src/gitpod/types/organizations/policy_update_params.py +++ b/src/gitpod/types/organizations/policy_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, List, Optional +from typing import Dict, Iterable, Optional from typing_extensions import Required, Annotated, TypedDict from ..._types import SequenceNotStr @@ -14,6 +14,8 @@ from ..shared.codex_service_tier import CodexServiceTier from .conversation_sharing_policy import ConversationSharingPolicy from ..shared.codex_reasoning_effort import CodexReasoningEffort +from .project_creation_defaults_prebuilds_param import ProjectCreationDefaultsPrebuildsParam +from .project_creation_default_environment_class_param import ProjectCreationDefaultEnvironmentClassParam __all__ = [ "PolicyUpdateParams", @@ -256,6 +258,33 @@ class EditorVersionRestrictions(TypedDict, total=False): """ +class ProjectCreationDefaults(TypedDict, total=False): + """ + project_creation_defaults contains updates to default settings applied to newly created projects. + """ + + environment_classes: Annotated[ + Iterable[ProjectCreationDefaultEnvironmentClassParam], PropertyInfo(alias="environmentClasses") + ] + """ + environment_classes replaces the full list of default environment classes and + their per-class settings. Send an empty list to clear defaults. + """ + + insights_enabled: Annotated[Optional[bool], PropertyInfo(alias="insightsEnabled")] + """ + insights_enabled controls whether Insights (co-author attribution) is + automatically enabled on newly created projects. + """ + + prebuilds: Optional[ProjectCreationDefaultsPrebuildsParam] + """ + prebuilds configures default prebuild settings for newly created projects. Set + to enable/update prebuild defaults. Prebuilds are disabled by default when this + field is absent. + """ + + class SecurityAgentPolicyCrowdstrike(TypedDict, total=False): """crowdstrike contains CrowdStrike Falcon configuration updates""" diff --git a/src/gitpod/types/organizations/project_creation_default_environment_class.py b/src/gitpod/types/organizations/project_creation_default_environment_class.py new file mode 100644 index 00000000..cf60fe32 --- /dev/null +++ b/src/gitpod/types/organizations/project_creation_default_environment_class.py @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel +from .project_creation_default_environment_class_warm_pool import ProjectCreationDefaultEnvironmentClassWarmPool + +__all__ = ["ProjectCreationDefaultEnvironmentClass"] + + +class ProjectCreationDefaultEnvironmentClass(BaseModel): + """ + ProjectCreationDefaultEnvironmentClass configures a single environment class + in the project creation defaults. + """ + + environment_class_id: Optional[str] = FieldInfo(alias="environmentClassId", default=None) + """environment_class_id is the ID of the environment class.""" + + order: Optional[int] = None + """order is the priority of this entry (lower = higher priority).""" + + prebuild: Optional[bool] = None + """ + prebuild controls whether prebuilds are enabled for this environment class on + newly created projects. + """ + + warm_pool: Optional[ProjectCreationDefaultEnvironmentClassWarmPool] = FieldInfo(alias="warmPool", default=None) + """ + warm_pool configures the warm pool for this environment class on newly created + projects. Only meaningful when prebuild is true. + """ diff --git a/src/gitpod/types/organizations/project_creation_default_environment_class_param.py b/src/gitpod/types/organizations/project_creation_default_environment_class_param.py new file mode 100644 index 00000000..23ddb04e --- /dev/null +++ b/src/gitpod/types/organizations/project_creation_default_environment_class_param.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Annotated, TypedDict + +from ..._utils import PropertyInfo +from .project_creation_default_environment_class_warm_pool_param import ( + ProjectCreationDefaultEnvironmentClassWarmPoolParam, +) + +__all__ = ["ProjectCreationDefaultEnvironmentClassParam"] + + +class ProjectCreationDefaultEnvironmentClassParam(TypedDict, total=False): + """ + ProjectCreationDefaultEnvironmentClass configures a single environment class + in the project creation defaults. + """ + + environment_class_id: Annotated[str, PropertyInfo(alias="environmentClassId")] + """environment_class_id is the ID of the environment class.""" + + order: int + """order is the priority of this entry (lower = higher priority).""" + + prebuild: bool + """ + prebuild controls whether prebuilds are enabled for this environment class on + newly created projects. + """ + + warm_pool: Annotated[ProjectCreationDefaultEnvironmentClassWarmPoolParam, PropertyInfo(alias="warmPool")] + """ + warm_pool configures the warm pool for this environment class on newly created + projects. Only meaningful when prebuild is true. + """ diff --git a/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool.py b/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool.py new file mode 100644 index 00000000..210bca40 --- /dev/null +++ b/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool.py @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel + +__all__ = ["ProjectCreationDefaultEnvironmentClassWarmPool"] + + +class ProjectCreationDefaultEnvironmentClassWarmPool(BaseModel): + """ + ProjectCreationDefaultEnvironmentClassWarmPool configures warm pool defaults + for an environment class in the project creation defaults. + """ + + enabled: Optional[bool] = None + """enabled controls whether a warm pool is created for this environment class.""" + + max_size: Optional[int] = FieldInfo(alias="maxSize", default=None) + """max_size is the maximum number of warm instances. + + Must be >= min_size and <= 20. + """ + + min_size: Optional[int] = FieldInfo(alias="minSize", default=None) + """min_size is the minimum number of warm instances. Must be >= 0 and <= max_size.""" diff --git a/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool_param.py b/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool_param.py new file mode 100644 index 00000000..765daaaa --- /dev/null +++ b/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool_param.py @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["ProjectCreationDefaultEnvironmentClassWarmPoolParam"] + + +class ProjectCreationDefaultEnvironmentClassWarmPoolParam(TypedDict, total=False): + """ + ProjectCreationDefaultEnvironmentClassWarmPool configures warm pool defaults + for an environment class in the project creation defaults. + """ + + enabled: bool + """enabled controls whether a warm pool is created for this environment class.""" + + max_size: Annotated[int, PropertyInfo(alias="maxSize")] + """max_size is the maximum number of warm instances. + + Must be >= min_size and <= 20. + """ + + min_size: Annotated[int, PropertyInfo(alias="minSize")] + """min_size is the minimum number of warm instances. Must be >= 0 and <= max_size.""" diff --git a/src/gitpod/types/organizations/project_creation_defaults.py b/src/gitpod/types/organizations/project_creation_defaults.py new file mode 100644 index 00000000..07d87c79 --- /dev/null +++ b/src/gitpod/types/organizations/project_creation_defaults.py @@ -0,0 +1,40 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel +from .project_creation_defaults_prebuilds import ProjectCreationDefaultsPrebuilds +from .project_creation_default_environment_class import ProjectCreationDefaultEnvironmentClass + +__all__ = ["ProjectCreationDefaults"] + + +class ProjectCreationDefaults(BaseModel): + """ + ProjectCreationDefaults contains default settings applied to newly created projects. + """ + + environment_classes: Optional[List[ProjectCreationDefaultEnvironmentClass]] = FieldInfo( + alias="environmentClasses", default=None + ) + """ + environment_classes specifies default environment classes and their per-class + settings (order, prebuild, warm pool) for newly created projects. Each entry + must reference an existing, enabled, non-local-runner environment class in the + organization. + """ + + insights_enabled: Optional[bool] = FieldInfo(alias="insightsEnabled", default=None) + """ + insights_enabled controls whether Insights (co-author attribution) is + automatically enabled on newly created projects. + """ + + prebuilds: Optional[ProjectCreationDefaultsPrebuilds] = None + """ + prebuilds configures default prebuild settings for newly created projects. When + set, prebuilds can be enabled per environment class via the environment_classes + entries. When absent, prebuilds are not enabled by default. + """ diff --git a/src/gitpod/types/organizations/project_creation_defaults_prebuilds.py b/src/gitpod/types/organizations/project_creation_defaults_prebuilds.py new file mode 100644 index 00000000..79d7fb4b --- /dev/null +++ b/src/gitpod/types/organizations/project_creation_defaults_prebuilds.py @@ -0,0 +1,61 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from ..._models import BaseModel +from ..shared.subject import Subject + +__all__ = ["ProjectCreationDefaultsPrebuilds", "Trigger", "TriggerDailySchedule"] + + +class TriggerDailySchedule(BaseModel): + """ + daily_schedule triggers a prebuild once per day at the specified hour (UTC). + The actual start time may vary slightly to distribute system load. + """ + + hour_utc: Optional[int] = FieldInfo(alias="hourUtc", default=None) + """ + hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The + actual start time may be adjusted by a few minutes to balance system load. + """ + + +class Trigger(BaseModel): + """trigger defines when prebuilds should be created on newly created projects.""" + + daily_schedule: TriggerDailySchedule = FieldInfo(alias="dailySchedule") + """ + daily_schedule triggers a prebuild once per day at the specified hour (UTC). The + actual start time may vary slightly to distribute system load. + """ + + +class ProjectCreationDefaultsPrebuilds(BaseModel): + """ + ProjectCreationDefaultsPrebuilds configures default prebuild settings. + Presence of this message means prebuilds can be enabled for the default environment classes. + """ + + enable_jetbrains_warmup: Optional[bool] = FieldInfo(alias="enableJetbrainsWarmup", default=None) + """ + enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during + prebuilds on newly created projects. + """ + + prebuild_executor: Optional[Subject] = FieldInfo(alias="prebuildExecutor", default=None) + """ + prebuild_executor is the service account used to run prebuilds on newly created + projects. Must be a service account (not a user). + """ + + timeout: Optional[str] = None + """ + timeout is the maximum duration allowed for a prebuild to complete. If not + specified, defaults to 1 hour. Must be between 5 minutes and 2 hours. + """ + + trigger: Optional[Trigger] = None + """trigger defines when prebuilds should be created on newly created projects.""" diff --git a/src/gitpod/types/organizations/project_creation_defaults_prebuilds_param.py b/src/gitpod/types/organizations/project_creation_defaults_prebuilds_param.py new file mode 100644 index 00000000..37b40889 --- /dev/null +++ b/src/gitpod/types/organizations/project_creation_defaults_prebuilds_param.py @@ -0,0 +1,61 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from ..._utils import PropertyInfo +from ..shared_params.subject import Subject + +__all__ = ["ProjectCreationDefaultsPrebuildsParam", "Trigger", "TriggerDailySchedule"] + + +class TriggerDailySchedule(TypedDict, total=False): + """ + daily_schedule triggers a prebuild once per day at the specified hour (UTC). + The actual start time may vary slightly to distribute system load. + """ + + hour_utc: Annotated[int, PropertyInfo(alias="hourUtc")] + """ + hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The + actual start time may be adjusted by a few minutes to balance system load. + """ + + +class Trigger(TypedDict, total=False): + """trigger defines when prebuilds should be created on newly created projects.""" + + daily_schedule: Required[Annotated[TriggerDailySchedule, PropertyInfo(alias="dailySchedule")]] + """ + daily_schedule triggers a prebuild once per day at the specified hour (UTC). The + actual start time may vary slightly to distribute system load. + """ + + +class ProjectCreationDefaultsPrebuildsParam(TypedDict, total=False): + """ + ProjectCreationDefaultsPrebuilds configures default prebuild settings. + Presence of this message means prebuilds can be enabled for the default environment classes. + """ + + enable_jetbrains_warmup: Annotated[bool, PropertyInfo(alias="enableJetbrainsWarmup")] + """ + enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during + prebuilds on newly created projects. + """ + + prebuild_executor: Annotated[Subject, PropertyInfo(alias="prebuildExecutor")] + """ + prebuild_executor is the service account used to run prebuilds on newly created + projects. Must be a service account (not a user). + """ + + timeout: str + """ + timeout is the maximum duration allowed for a prebuild to complete. If not + specified, defaults to 1 hour. Must be between 5 minutes and 2 hours. + """ + + trigger: Trigger + """trigger defines when prebuilds should be created on newly created projects.""" diff --git a/tests/api_resources/organizations/test_policies.py b/tests/api_resources/organizations/test_policies.py index 93ae13b8..5d87775c 100644 --- a/tests/api_resources/organizations/test_policies.py +++ b/tests/api_resources/organizations/test_policies.py @@ -94,6 +94,30 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, + project_creation_defaults={ + "environment_classes": [ + { + "environment_class_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "order": 0, + "prebuild": True, + "warm_pool": { + "enabled": True, + "max_size": 20, + "min_size": 20, + }, + } + ], + "insights_enabled": True, + "prebuilds": { + "enable_jetbrains_warmup": True, + "prebuild_executor": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + }, + "timeout": "+9125115.360s", + "trigger": {"daily_schedule": {"hour_utc": 23}}, + }, + }, require_custom_domain_access=True, restrict_account_creation_to_scim=True, security_agent_policy={ @@ -222,6 +246,30 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, + project_creation_defaults={ + "environment_classes": [ + { + "environment_class_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "order": 0, + "prebuild": True, + "warm_pool": { + "enabled": True, + "max_size": 20, + "min_size": 20, + }, + } + ], + "insights_enabled": True, + "prebuilds": { + "enable_jetbrains_warmup": True, + "prebuild_executor": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + }, + "timeout": "+9125115.360s", + "trigger": {"daily_schedule": {"hour_utc": 23}}, + }, + }, require_custom_domain_access=True, restrict_account_creation_to_scim=True, security_agent_policy={ From e19d11f59b55f788aa16d375d82e95cd3ec2cd04 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 14:16:54 +0000 Subject: [PATCH 102/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index bd836fe0..008a6a02 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-fed94ac0dbf98aa97a3119c8a06afc4e1e310d7fa79dd43fdcfff16c5275add7.yml -openapi_spec_hash: f284d7c5b9e827cee9db4cc8f372afe3 -config_hash: 42ab337a8769c4e3bf2745ef1fbce0d6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3997eee79a52e02c1e2e34b43319295d0e06860d7e7727a1b2be4dde0ce03a46.yml +openapi_spec_hash: 46404201deaf8ffd5e2e0753f95ecf0e +config_hash: 03b6545affa614c9a9c0aa16538ada47 From 68a3471e40c458c3f7429e2af1c3b40ddce03d0a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 14:10:54 +0000 Subject: [PATCH 103/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 008a6a02..a805468b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3997eee79a52e02c1e2e34b43319295d0e06860d7e7727a1b2be4dde0ce03a46.yml -openapi_spec_hash: 46404201deaf8ffd5e2e0753f95ecf0e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c879bfb97086085fe048004eb8b0483da29a7ad029611d02995b90a33bc45b6f.yml +openapi_spec_hash: 0d3e34fcb3abd491a084e32ccdea1549 config_hash: 03b6545affa614c9a9c0aa16538ada47 From 69a9ca3ab1f351c3d3e48a85d43d0d33434d0da3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 07:33:42 +0000 Subject: [PATCH 104/211] fix(api): wrap prebuild default updates --- .stats.yml | 4 +-- .../organizations/policy_update_params.py | 21 ++++++++++--- .../organizations/test_policies.py | 30 +++++++++++-------- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/.stats.yml b/.stats.yml index a805468b..adac945c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c879bfb97086085fe048004eb8b0483da29a7ad029611d02995b90a33bc45b6f.yml -openapi_spec_hash: 0d3e34fcb3abd491a084e32ccdea1549 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8a0af170bb793e6bb24617eae02dac39834b654846f97ab14f7ecbfc4eb40b07.yml +openapi_spec_hash: 0c51dc12e78d51b8bddb0114a3ee593c config_hash: 03b6545affa614c9a9c0aa16538ada47 diff --git a/src/gitpod/types/organizations/policy_update_params.py b/src/gitpod/types/organizations/policy_update_params.py index fc0b03b1..4222d7ab 100644 --- a/src/gitpod/types/organizations/policy_update_params.py +++ b/src/gitpod/types/organizations/policy_update_params.py @@ -21,6 +21,7 @@ "PolicyUpdateParams", "AgentPolicy", "EditorVersionRestrictions", + "ProjectCreationDefaultsPrebuilds", "SecurityAgentPolicy", "SecurityAgentPolicyCrowdstrike", ] @@ -258,6 +259,19 @@ class EditorVersionRestrictions(TypedDict, total=False): """ +class ProjectCreationDefaultsPrebuilds(TypedDict, total=False): + """ + prebuilds updates default prebuild settings for newly created projects. + When absent, prebuild defaults are left unchanged. + """ + + disabled: object + """disabled clears persisted prebuild defaults.""" + + enabled: ProjectCreationDefaultsPrebuildsParam + """enabled sets or updates persisted prebuild defaults.""" + + class ProjectCreationDefaults(TypedDict, total=False): """ project_creation_defaults contains updates to default settings applied to newly created projects. @@ -277,11 +291,10 @@ class ProjectCreationDefaults(TypedDict, total=False): automatically enabled on newly created projects. """ - prebuilds: Optional[ProjectCreationDefaultsPrebuildsParam] + prebuilds: Optional[ProjectCreationDefaultsPrebuilds] """ - prebuilds configures default prebuild settings for newly created projects. Set - to enable/update prebuild defaults. Prebuilds are disabled by default when this - field is absent. + prebuilds updates default prebuild settings for newly created projects. When + absent, prebuild defaults are left unchanged. """ diff --git a/tests/api_resources/organizations/test_policies.py b/tests/api_resources/organizations/test_policies.py index 5d87775c..fa0e6a6d 100644 --- a/tests/api_resources/organizations/test_policies.py +++ b/tests/api_resources/organizations/test_policies.py @@ -109,13 +109,16 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: ], "insights_enabled": True, "prebuilds": { - "enable_jetbrains_warmup": True, - "prebuild_executor": { - "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "principal": "PRINCIPAL_UNSPECIFIED", + "disabled": {}, + "enabled": { + "enable_jetbrains_warmup": True, + "prebuild_executor": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + }, + "timeout": "+9125115.360s", + "trigger": {"daily_schedule": {"hour_utc": 23}}, }, - "timeout": "+9125115.360s", - "trigger": {"daily_schedule": {"hour_utc": 23}}, }, }, require_custom_domain_access=True, @@ -261,13 +264,16 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> ], "insights_enabled": True, "prebuilds": { - "enable_jetbrains_warmup": True, - "prebuild_executor": { - "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "principal": "PRINCIPAL_UNSPECIFIED", + "disabled": {}, + "enabled": { + "enable_jetbrains_warmup": True, + "prebuild_executor": { + "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "principal": "PRINCIPAL_UNSPECIFIED", + }, + "timeout": "+9125115.360s", + "trigger": {"daily_schedule": {"hour_utc": 23}}, }, - "timeout": "+9125115.360s", - "trigger": {"daily_schedule": {"hour_utc": 23}}, }, }, require_custom_domain_access=True, From 92e3091106663b8faeabe99f0e557df6c9c52769 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 15:36:29 +0000 Subject: [PATCH 105/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index adac945c..de131fee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8a0af170bb793e6bb24617eae02dac39834b654846f97ab14f7ecbfc4eb40b07.yml -openapi_spec_hash: 0c51dc12e78d51b8bddb0114a3ee593c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8b3b331e8a9bfd3584c2758e2e7188aee0f0b2e0d918b92e5f3c63fe28719d98.yml +openapi_spec_hash: da5f10e60e87911253bed2b2eb81fab6 config_hash: 03b6545affa614c9a9c0aa16538ada47 From 4759edcfe577ff5dbef48fbc1363ff0aec017711 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 18:05:36 +0000 Subject: [PATCH 106/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index de131fee..c516589a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8b3b331e8a9bfd3584c2758e2e7188aee0f0b2e0d918b92e5f3c63fe28719d98.yml -openapi_spec_hash: da5f10e60e87911253bed2b2eb81fab6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1e2aac65546766812203f0205ef69d7cfbe3f43a78accb9b829160baa3fd1179.yml +openapi_spec_hash: 45395a94318e90ca958777513eb14fe1 config_hash: 03b6545affa614c9a9c0aa16538ada47 From 145a936a82e583878e42031af1323c3869fc4684 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 09:48:02 +0000 Subject: [PATCH 107/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c516589a..fa6c1296 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1e2aac65546766812203f0205ef69d7cfbe3f43a78accb9b829160baa3fd1179.yml -openapi_spec_hash: 45395a94318e90ca958777513eb14fe1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-028ca914434941a4eee3244c58d0330bf2a23c935b45d16a5d5bd9e1f94bb975.yml +openapi_spec_hash: 3aed5d20e294f3c6c8c23d9ee6fce934 config_hash: 03b6545affa614c9a9c0aa16538ada47 From 310392b17b59654e6ab92fc4e824322c7a597684 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 16:28:05 +0000 Subject: [PATCH 108/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index fa6c1296..4d9dbc81 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-028ca914434941a4eee3244c58d0330bf2a23c935b45d16a5d5bd9e1f94bb975.yml -openapi_spec_hash: 3aed5d20e294f3c6c8c23d9ee6fce934 -config_hash: 03b6545affa614c9a9c0aa16538ada47 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f51cdc50e3eabe1685f979434da249225060c7cae680fb5aed89e55da8534273.yml +openapi_spec_hash: 37a72930179ca536d0af5ced475eed8a +config_hash: acfdb802d6702900ca1aaf0f61ce9937 From a18379425143966ff8b94d24e188a323f91f93f9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 17:21:50 +0000 Subject: [PATCH 109/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4d9dbc81..8ddea1ea 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f51cdc50e3eabe1685f979434da249225060c7cae680fb5aed89e55da8534273.yml -openapi_spec_hash: 37a72930179ca536d0af5ced475eed8a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-deadd87b66981898b83f1e2169b34941a2294dcf3608ebad07696ae132062689.yml +openapi_spec_hash: e3569d750680d850197f4371205aef65 config_hash: acfdb802d6702900ca1aaf0f61ce9937 From 3d693bb957f031b3dbbde493f4be0f265d290a14 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 22:13:54 +0000 Subject: [PATCH 110/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8ddea1ea..11df687a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-deadd87b66981898b83f1e2169b34941a2294dcf3608ebad07696ae132062689.yml -openapi_spec_hash: e3569d750680d850197f4371205aef65 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a52f3887a1e3dc894668b2bf664acb2747880eac4cca64dde93e7403e5f24991.yml +openapi_spec_hash: 65739e38f30ee8a3f1ab4e885629de8b config_hash: acfdb802d6702900ca1aaf0f61ce9937 From 19198e7f3c0b91b5e02bae42686bce845ffbc80c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 08:04:44 +0000 Subject: [PATCH 111/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 11df687a..50b68b49 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a52f3887a1e3dc894668b2bf664acb2747880eac4cca64dde93e7403e5f24991.yml -openapi_spec_hash: 65739e38f30ee8a3f1ab4e885629de8b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8f2d926a504ee9c50252866d4b17a94b975b7090d499a9cfcd7c343ddf13845d.yml +openapi_spec_hash: ac54c419db58d8e31d98d2f2d4303ff4 config_hash: acfdb802d6702900ca1aaf0f61ce9937 From eccb99f382cbc77c6bfcdc497ba19f23dbb78286 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 23:49:19 +0000 Subject: [PATCH 112/211] feat(api): add prebuild_requires_success field to TaskSpec --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 50b68b49..99f27e62 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8f2d926a504ee9c50252866d4b17a94b975b7090d499a9cfcd7c343ddf13845d.yml -openapi_spec_hash: ac54c419db58d8e31d98d2f2d4303ff4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ab8539805628c48c661e878587dd4d162baf8efb50b3d19fe10ea2ceb8014a35.yml +openapi_spec_hash: 41ce93f6cbeab03b990aba25b530675f config_hash: acfdb802d6702900ca1aaf0f61ce9937 From 8d830ce28b966c506ad9b63b0f28891226a4150a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 08:43:32 +0000 Subject: [PATCH 113/211] feat(api): add Codex agent settings shape --- .stats.yml | 6 ++--- api.md | 3 +++ src/gitpod/resources/agents.py | 9 ++++--- src/gitpod/types/__init__.py | 3 +++ .../types/agent_send_to_execution_params.py | 3 ++- .../types/agent_start_execution_params.py | 3 ++- src/gitpod/types/codex_openai_model.py | 15 +++++++++++ src/gitpod/types/codex_reasoning_effort.py | 13 +++++++++ src/gitpod/types/codex_settings_param.py | 27 +++++++++++++++++++ 9 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 src/gitpod/types/codex_openai_model.py create mode 100644 src/gitpod/types/codex_reasoning_effort.py create mode 100644 src/gitpod/types/codex_settings_param.py diff --git a/.stats.yml b/.stats.yml index 99f27e62..2b8eb61c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ab8539805628c48c661e878587dd4d162baf8efb50b3d19fe10ea2ceb8014a35.yml -openapi_spec_hash: 41ce93f6cbeab03b990aba25b530675f -config_hash: acfdb802d6702900ca1aaf0f61ce9937 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-de025587ccbfd99e0ccdd35fadd15516018268b2257350c5b64fefb91c42fc65.yml +openapi_spec_hash: dea67bfb8655574801f1923ff7a49549 +config_hash: dddfa903b33a6f55a7c81cc5bf93cfdc diff --git a/api.md b/api.md index 52faf2d3..b8fc717f 100644 --- a/api.md +++ b/api.md @@ -76,6 +76,9 @@ from gitpod.types import ( AgentMessage, AgentMode, GoalStatus, + CodexOpenAIModel, + CodexReasoningEffort, + CodexSettings, Prompt, PromptMetadata, PromptSpec, diff --git a/src/gitpod/resources/agents.py b/src/gitpod/resources/agents.py index b68d84e0..2f796615 100644 --- a/src/gitpod/resources/agents.py +++ b/src/gitpod/resources/agents.py @@ -38,6 +38,7 @@ from ..types.agent_execution import AgentExecution from ..types.wake_event_param import WakeEventParam from ..types.agent_message_param import AgentMessageParam +from ..types.codex_settings_param import CodexSettingsParam from ..types.user_input_block_param import UserInputBlockParam from ..types.agent_code_context_param import AgentCodeContextParam from ..types.agent_create_prompt_response import AgentCreatePromptResponse @@ -487,7 +488,7 @@ def send_to_execution( *, agent_execution_id: str | Omit = omit, agent_message: AgentMessageParam | Omit = omit, - codex_settings: CodexSettings | Omit = omit, + codex_settings: CodexSettingsParam | Omit = omit, user_input: UserInputBlockParam | Omit = omit, wake_event: WakeEventParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -557,7 +558,7 @@ def start_execution( agent_id: str | Omit = omit, annotations: Dict[str, str] | Omit = omit, code_context: AgentCodeContextParam | Omit = omit, - codex_settings: CodexSettings | Omit = omit, + codex_settings: CodexSettingsParam | Omit = omit, mode: AgentMode | Omit = omit, name: str | Omit = omit, runner_id: str | Omit = omit, @@ -1181,7 +1182,7 @@ async def send_to_execution( *, agent_execution_id: str | Omit = omit, agent_message: AgentMessageParam | Omit = omit, - codex_settings: CodexSettings | Omit = omit, + codex_settings: CodexSettingsParam | Omit = omit, user_input: UserInputBlockParam | Omit = omit, wake_event: WakeEventParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1251,7 +1252,7 @@ async def start_execution( agent_id: str | Omit = omit, annotations: Dict[str, str] | Omit = omit, code_context: AgentCodeContextParam | Omit = omit, - codex_settings: CodexSettings | Omit = omit, + codex_settings: CodexSettingsParam | Omit = omit, mode: AgentMode | Omit = omit, name: str | Omit = omit, runner_id: str | Omit = omit, diff --git a/src/gitpod/types/__init__.py b/src/gitpod/types/__init__.py index ebfececa..c0c1888d 100644 --- a/src/gitpod/types/__init__.py +++ b/src/gitpod/types/__init__.py @@ -117,6 +117,7 @@ from .account_membership import AccountMembership as AccountMembership from .agent_code_context import AgentCodeContext as AgentCodeContext from .daily_credit_usage import DailyCreditUsage as DailyCreditUsage +from .codex_openai_model import CodexOpenAIModel as CodexOpenAIModel from .editor_list_params import EditorListParams as EditorListParams from .environment_status import EnvironmentStatus as EnvironmentStatus from .event_watch_params import EventWatchParams as EventWatchParams @@ -140,6 +141,7 @@ from .recommended_editors import RecommendedEditors as RecommendedEditors from .update_window_param import UpdateWindowParam as UpdateWindowParam from .workflow_step_param import WorkflowStepParam as WorkflowStepParam +from .codex_settings_param import CodexSettingsParam as CodexSettingsParam from .environment_metadata import EnvironmentMetadata as EnvironmentMetadata from .event_watch_response import EventWatchResponse as EventWatchResponse from .invite_domains_param import InviteDomainsParam as InviteDomainsParam @@ -164,6 +166,7 @@ from .project_update_params import ProjectUpdateParams as ProjectUpdateParams from .workflow_action_param import WorkflowActionParam as WorkflowActionParam from .automation_list_params import AutomationListParams as AutomationListParams +from .codex_reasoning_effort import CodexReasoningEffort as CodexReasoningEffort from .editor_retrieve_params import EditorRetrieveParams as EditorRetrieveParams from .environment_spec_param import EnvironmentSpecParam as EnvironmentSpecParam from .kernel_controls_config import KernelControlsConfig as KernelControlsConfig diff --git a/src/gitpod/types/agent_send_to_execution_params.py b/src/gitpod/types/agent_send_to_execution_params.py index 0ed543e0..b6ad64ea 100644 --- a/src/gitpod/types/agent_send_to_execution_params.py +++ b/src/gitpod/types/agent_send_to_execution_params.py @@ -7,6 +7,7 @@ from .._utils import PropertyInfo from .wake_event_param import WakeEventParam from .agent_message_param import AgentMessageParam +from .codex_settings_param import CodexSettingsParam from .user_input_block_param import UserInputBlockParam from .shared_params.codex_settings import CodexSettings @@ -22,7 +23,7 @@ class AgentSendToExecutionParams(TypedDict, total=False): from a parent agent to a child agent execution, or vice versa). """ - codex_settings: Annotated[CodexSettings, PropertyInfo(alias="codexSettings")] + codex_settings: Annotated[CodexSettingsParam, PropertyInfo(alias="codexSettings")] """ codex_settings contains per-turn desired settings for Codex app user_input sends. diff --git a/src/gitpod/types/agent_start_execution_params.py b/src/gitpod/types/agent_start_execution_params.py index 29da4adf..0bf3d8f2 100644 --- a/src/gitpod/types/agent_start_execution_params.py +++ b/src/gitpod/types/agent_start_execution_params.py @@ -7,6 +7,7 @@ from .._utils import PropertyInfo from .agent_mode import AgentMode +from .codex_settings_param import CodexSettingsParam from .agent_code_context_param import AgentCodeContextParam from .shared_params.codex_settings import CodexSettings @@ -30,7 +31,7 @@ class AgentStartExecutionParams(TypedDict, total=False): code_context: Annotated[AgentCodeContextParam, PropertyInfo(alias="codeContext")] - codex_settings: Annotated[CodexSettings, PropertyInfo(alias="codexSettings")] + codex_settings: Annotated[CodexSettingsParam, PropertyInfo(alias="codexSettings")] """codex_settings contains desired manual settings for the Codex app agent.""" mode: AgentMode diff --git a/src/gitpod/types/codex_openai_model.py b/src/gitpod/types/codex_openai_model.py new file mode 100644 index 00000000..bb49e5f5 --- /dev/null +++ b/src/gitpod/types/codex_openai_model.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CodexOpenAIModel"] + +CodexOpenAIModel: TypeAlias = Literal[ + "CODEX_OPEN_AI_MODEL_UNSPECIFIED", + "CODEX_OPEN_AI_MODEL_GPT_5_5", + "CODEX_OPEN_AI_MODEL_GPT_5_4", + "CODEX_OPEN_AI_MODEL_GPT_5_4_MINI", + "CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX", + "CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK", + "CODEX_OPEN_AI_MODEL_GPT_5_2", +] diff --git a/src/gitpod/types/codex_reasoning_effort.py b/src/gitpod/types/codex_reasoning_effort.py new file mode 100644 index 00000000..c686cd5b --- /dev/null +++ b/src/gitpod/types/codex_reasoning_effort.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CodexReasoningEffort"] + +CodexReasoningEffort: TypeAlias = Literal[ + "CODEX_REASONING_EFFORT_UNSPECIFIED", + "CODEX_REASONING_EFFORT_LOW", + "CODEX_REASONING_EFFORT_MEDIUM", + "CODEX_REASONING_EFFORT_HIGH", + "CODEX_REASONING_EFFORT_EXTRA_HIGH", +] diff --git a/src/gitpod/types/codex_settings_param.py b/src/gitpod/types/codex_settings_param.py new file mode 100644 index 00000000..0f806a5d --- /dev/null +++ b/src/gitpod/types/codex_settings_param.py @@ -0,0 +1,27 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo +from .codex_openai_model import CodexOpenAIModel +from .codex_reasoning_effort import CodexReasoningEffort + +__all__ = ["CodexSettingsParam"] + + +class CodexSettingsParam(TypedDict, total=False): + """CodexSettings contains settings consumed only by the Codex app agent.""" + + model: CodexOpenAIModel + """ + CodexOpenAIModel is the static allowlist of concrete OpenAI models that the + Codex app runtime can select through Ona's Codex picker. + """ + + reasoning_effort: Annotated[CodexReasoningEffort, PropertyInfo(alias="reasoningEffort")] + """ + CodexReasoningEffort is the static allowlist of reasoning efforts supported by + the Codex app runtime. + """ From 7ed14dd637b35faeddb673698acbf0d7ac9ab6e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 09:06:49 +0000 Subject: [PATCH 114/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2b8eb61c..dc890ba4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-de025587ccbfd99e0ccdd35fadd15516018268b2257350c5b64fefb91c42fc65.yml -openapi_spec_hash: dea67bfb8655574801f1923ff7a49549 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c30b5cf6719ff41f354db49281c004ccd1d8312fc0c5dde79daa77caa1c35ab6.yml +openapi_spec_hash: 83d53e848e0dbca786f67b878a29153e config_hash: dddfa903b33a6f55a7c81cc5bf93cfdc From 27697136f928095e8856b24b9154c368d1dd7c2f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 09:43:20 +0000 Subject: [PATCH 115/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index dc890ba4..2d81a590 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c30b5cf6719ff41f354db49281c004ccd1d8312fc0c5dde79daa77caa1c35ab6.yml -openapi_spec_hash: 83d53e848e0dbca786f67b878a29153e -config_hash: dddfa903b33a6f55a7c81cc5bf93cfdc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ce8f8a4f44d86668da478501e18e720e6a8baab29805bf167ebd41473fcd5523.yml +openapi_spec_hash: fc496c0c65b18ad56dfc719b579214d5 +config_hash: 04e4474e448e5586d8addc14d44d0a00 From d2cae06a53dd6603531332939f49fc4cb27e3086 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 10:03:14 +0000 Subject: [PATCH 116/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2d81a590..d12a447b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ce8f8a4f44d86668da478501e18e720e6a8baab29805bf167ebd41473fcd5523.yml -openapi_spec_hash: fc496c0c65b18ad56dfc719b579214d5 -config_hash: 04e4474e448e5586d8addc14d44d0a00 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9fc8f527eb878435347ce2b756821872a86a36680c7c9a9be6434e198caf3621.yml +openapi_spec_hash: 2829f18ef06e650c5ac63b48a1c2204b +config_hash: 4a844224b5247acb57563e6f406eb530 From 16a543a96c86e308d6c430121b8179f41462fbc4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 12:21:04 +0000 Subject: [PATCH 117/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d12a447b..ebe79110 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9fc8f527eb878435347ce2b756821872a86a36680c7c9a9be6434e198caf3621.yml -openapi_spec_hash: 2829f18ef06e650c5ac63b48a1c2204b -config_hash: 4a844224b5247acb57563e6f406eb530 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1d7b67bcd0e61da52f3bd0c6e98fd476f1bfafc2168eabdf2535d6e7ac262858.yml +openapi_spec_hash: ca768400c730528e9ac02719524b8013 +config_hash: 88008dd094966101f079469fb8a6c534 From 4b7b7b100660cd5e156647fdb9ac2fe136426c05 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 12:58:26 +0000 Subject: [PATCH 118/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ebe79110..e42a4331 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1d7b67bcd0e61da52f3bd0c6e98fd476f1bfafc2168eabdf2535d6e7ac262858.yml -openapi_spec_hash: ca768400c730528e9ac02719524b8013 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1403169bfd64ec55fcf920774f2fd563f4c4ff8ea595af8d162143174404ead3.yml +openapi_spec_hash: ae41ab9874b761d8a792a83a6767deee config_hash: 88008dd094966101f079469fb8a6c534 From b1079bd182e4187873710ffdc8f87f5a004f3f53 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 13:25:09 +0000 Subject: [PATCH 119/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e42a4331..5e0d5aaf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1403169bfd64ec55fcf920774f2fd563f4c4ff8ea595af8d162143174404ead3.yml -openapi_spec_hash: ae41ab9874b761d8a792a83a6767deee +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-d7b3bf8d6e2b708c1005bdc42b29efac87267eccf2bfb44caaaf2829fac6b4e5.yml +openapi_spec_hash: 5c3319cc8f56e48c2b0577b8529bb7c1 config_hash: 88008dd094966101f079469fb8a6c534 From 210f644fa75f00c96fbb99fae2034be487694e26 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 16:06:20 +0000 Subject: [PATCH 120/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5e0d5aaf..d380a4aa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-d7b3bf8d6e2b708c1005bdc42b29efac87267eccf2bfb44caaaf2829fac6b4e5.yml -openapi_spec_hash: 5c3319cc8f56e48c2b0577b8529bb7c1 -config_hash: 88008dd094966101f079469fb8a6c534 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-89b22be64eae067c30ac3d3a76c51bc319751a8ed14103e286986ee97fa2ddba.yml +openapi_spec_hash: 1a23e429f782bd4f0d24db8ded1253f6 +config_hash: e4a9b5db357180a70ca33f3a18b2d8be From b50ef1091823cf5d188bc90625fa718e1b7ed749 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 22:59:57 +0000 Subject: [PATCH 121/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d380a4aa..550e8a7f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-89b22be64eae067c30ac3d3a76c51bc319751a8ed14103e286986ee97fa2ddba.yml -openapi_spec_hash: 1a23e429f782bd4f0d24db8ded1253f6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-0a23df90120c163c398117b2cd20c1b52c377f928144941320fa2b43a28d6a2a.yml +openapi_spec_hash: e4eb5503caf6aa4554f2a6fcb22ca828 config_hash: e4a9b5db357180a70ca33f3a18b2d8be From 6b6a7440e07772845486c11fad302eb0d1d35d78 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 06:16:52 +0000 Subject: [PATCH 122/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 550e8a7f..97e44b50 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-0a23df90120c163c398117b2cd20c1b52c377f928144941320fa2b43a28d6a2a.yml -openapi_spec_hash: e4eb5503caf6aa4554f2a6fcb22ca828 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-6f27e631080701f915c5610eef9eee398e4f99cd30f7711adeeffee6dbe749b5.yml +openapi_spec_hash: 82c7c2565e5745e6c3cb553c2308cd9a config_hash: e4a9b5db357180a70ca33f3a18b2d8be From 9f78b65d41d2ad591f61cc64988a1ed1e3aff046 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 10:26:17 +0000 Subject: [PATCH 123/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 97e44b50..62268962 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-6f27e631080701f915c5610eef9eee398e4f99cd30f7711adeeffee6dbe749b5.yml -openapi_spec_hash: 82c7c2565e5745e6c3cb553c2308cd9a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1b978ff483ffdb4e270dea31885072de19e47a8d958912d0ef47c508e09f7566.yml +openapi_spec_hash: bee3f226f19f5e39844a571c272ad5c7 config_hash: e4a9b5db357180a70ca33f3a18b2d8be From 5c7ef6ce126d085d5a743b7a24beed4ba99395ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 10:34:13 +0000 Subject: [PATCH 124/211] feat(api): add Codex fast mode setting --- .stats.yml | 6 +++--- api.md | 1 + src/gitpod/types/__init__.py | 1 + src/gitpod/types/codex_service_tier.py | 7 +++++++ src/gitpod/types/codex_settings_param.py | 7 +++++++ 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 src/gitpod/types/codex_service_tier.py diff --git a/.stats.yml b/.stats.yml index 62268962..0a5af08e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1b978ff483ffdb4e270dea31885072de19e47a8d958912d0ef47c508e09f7566.yml -openapi_spec_hash: bee3f226f19f5e39844a571c272ad5c7 -config_hash: e4a9b5db357180a70ca33f3a18b2d8be +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3550dec00c41d664897833646e28ece863f0e535a1303070ccf11d2ef4c2d96b.yml +openapi_spec_hash: 5cbf3eb6fce053a87822ca13197556c6 +config_hash: 891ebbbb654196ca0b767283a9546f12 diff --git a/api.md b/api.md index b8fc717f..56766c43 100644 --- a/api.md +++ b/api.md @@ -78,6 +78,7 @@ from gitpod.types import ( GoalStatus, CodexOpenAIModel, CodexReasoningEffort, + CodexServiceTier, CodexSettings, Prompt, PromptMetadata, diff --git a/src/gitpod/types/__init__.py b/src/gitpod/types/__init__.py index c0c1888d..52c2ee5b 100644 --- a/src/gitpod/types/__init__.py +++ b/src/gitpod/types/__init__.py @@ -118,6 +118,7 @@ from .agent_code_context import AgentCodeContext as AgentCodeContext from .daily_credit_usage import DailyCreditUsage as DailyCreditUsage from .codex_openai_model import CodexOpenAIModel as CodexOpenAIModel +from .codex_service_tier import CodexServiceTier as CodexServiceTier from .editor_list_params import EditorListParams as EditorListParams from .environment_status import EnvironmentStatus as EnvironmentStatus from .event_watch_params import EventWatchParams as EventWatchParams diff --git a/src/gitpod/types/codex_service_tier.py b/src/gitpod/types/codex_service_tier.py new file mode 100644 index 00000000..aec3358e --- /dev/null +++ b/src/gitpod/types/codex_service_tier.py @@ -0,0 +1,7 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["CodexServiceTier"] + +CodexServiceTier: TypeAlias = Literal["CODEX_SERVICE_TIER_UNSPECIFIED", "CODEX_SERVICE_TIER_FAST"] diff --git a/src/gitpod/types/codex_settings_param.py b/src/gitpod/types/codex_settings_param.py index 0f806a5d..f4c56cf7 100644 --- a/src/gitpod/types/codex_settings_param.py +++ b/src/gitpod/types/codex_settings_param.py @@ -6,6 +6,7 @@ from .._utils import PropertyInfo from .codex_openai_model import CodexOpenAIModel +from .codex_service_tier import CodexServiceTier from .codex_reasoning_effort import CodexReasoningEffort __all__ = ["CodexSettingsParam"] @@ -25,3 +26,9 @@ class CodexSettingsParam(TypedDict, total=False): CodexReasoningEffort is the static allowlist of reasoning efforts supported by the Codex app runtime. """ + + service_tier: Annotated[CodexServiceTier, PropertyInfo(alias="serviceTier")] + """ + CodexServiceTier is the static allowlist of service tiers supported by the Codex + app runtime. + """ From 40fc755743a3efe2c726bf7a8791b9f9a14bd767 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 10:36:57 +0000 Subject: [PATCH 125/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0a5af08e..2ae2906a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3550dec00c41d664897833646e28ece863f0e535a1303070ccf11d2ef4c2d96b.yml -openapi_spec_hash: 5cbf3eb6fce053a87822ca13197556c6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-29797dcebe2a0db6faa510bf806e5062aa951176c63fe337e803f33942b3a3e6.yml +openapi_spec_hash: bc8889a4ca47f1d46fdde52f660b5a64 config_hash: 891ebbbb654196ca0b767283a9546f12 From 8307aea3304b9117ef2e227f690a40b3d47c4216 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 12:01:44 +0000 Subject: [PATCH 126/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2ae2906a..886cd307 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-29797dcebe2a0db6faa510bf806e5062aa951176c63fe337e803f33942b3a3e6.yml -openapi_spec_hash: bc8889a4ca47f1d46fdde52f660b5a64 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c6b10656aaa9b607ab7239cf70c08dca27fe892306212d03f7b7e1b1c336d5fc.yml +openapi_spec_hash: bacbc27441a03e9a4909f40eebe83cd1 config_hash: 891ebbbb654196ca0b767283a9546f12 From a9db554505ebd0b13f21b3a98cfaddce80a695fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 12:51:51 +0000 Subject: [PATCH 127/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 886cd307..eb400d7a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c6b10656aaa9b607ab7239cf70c08dca27fe892306212d03f7b7e1b1c336d5fc.yml -openapi_spec_hash: bacbc27441a03e9a4909f40eebe83cd1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b55349dfa089837f9359f60bbbcee1d218853e866dd4726c9654c521e2662b8e.yml +openapi_spec_hash: 02843ceabefc683eae1571300af61224 config_hash: 891ebbbb654196ca0b767283a9546f12 From beee4ef89179b0541bd09335b2f6dce9a9506a3b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 17:38:55 +0000 Subject: [PATCH 128/211] refactor(api): default StartAgent agent ID --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index eb400d7a..88eac342 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b55349dfa089837f9359f60bbbcee1d218853e866dd4726c9654c521e2662b8e.yml -openapi_spec_hash: 02843ceabefc683eae1571300af61224 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-39d46fbe9f70b66b62b0f8e8340f61c6ded40e87e171ef75c336180880b95d33.yml +openapi_spec_hash: ff9af4c571ad3bf8151352c89d9bd2e4 config_hash: 891ebbbb654196ca0b767283a9546f12 From 386256e0cd6237eddebe61b4abca2c1e838ad67e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 17:40:40 +0000 Subject: [PATCH 129/211] feat(api): add Opus 4.8 supported model --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 88eac342..f18b22f0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-39d46fbe9f70b66b62b0f8e8340f61c6ded40e87e171ef75c336180880b95d33.yml -openapi_spec_hash: ff9af4c571ad3bf8151352c89d9bd2e4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-28902c0e8a5111943ed3e501b40eb13c9862beb72460a3884a9fb977312567f4.yml +openapi_spec_hash: b4b55ce65a9950e699f342b9913bf00c config_hash: 891ebbbb654196ca0b767283a9546f12 From d67b3c3a0928aadcce8caf5e0f343a3b0a411d9b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 06:58:02 +0000 Subject: [PATCH 130/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f18b22f0..076f9416 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-28902c0e8a5111943ed3e501b40eb13c9862beb72460a3884a9fb977312567f4.yml -openapi_spec_hash: b4b55ce65a9950e699f342b9913bf00c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-11ed4013c308008076bcfcc0843717dcc50f6428a4fc7c6ecde6ad10c49328ac.yml +openapi_spec_hash: 73e4496f8031fe46c9aed64a3bfc8520 config_hash: 891ebbbb654196ca0b767283a9546f12 From ec6644cbfbea3cbf8146c839997bb6ae91bae452 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 12:13:30 +0000 Subject: [PATCH 131/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 076f9416..3e58686b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-11ed4013c308008076bcfcc0843717dcc50f6428a4fc7c6ecde6ad10c49328ac.yml -openapi_spec_hash: 73e4496f8031fe46c9aed64a3bfc8520 -config_hash: 891ebbbb654196ca0b767283a9546f12 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1817cadb6ad4f877da780ea6aa75ba28a6661fe80bc642795e8865aa502079aa.yml +openapi_spec_hash: 3982a53ea9d8122d014d39e98c3adbd6 +config_hash: 413f6962c11e086aba4e390636fd64d4 From 5319ad756a2e97b9d4d26444e3517b735bbd9eaa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 18:20:55 +0000 Subject: [PATCH 132/211] docs(api): add customer-facing descriptions to runner enums and fix CreateRunner examples --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3e58686b..ea6c01b8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1817cadb6ad4f877da780ea6aa75ba28a6661fe80bc642795e8865aa502079aa.yml -openapi_spec_hash: 3982a53ea9d8122d014d39e98c3adbd6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-289a212288cf97b4caddd863a01115a93013cbf11b6a5ef27d3fe58b75573e4a.yml +openapi_spec_hash: 19e04dfac967a3bd62427ee5ec114b25 config_hash: 413f6962c11e086aba4e390636fd64d4 From 9d93a7da765a48f20bc6ddc6d6562a4ed8f5fde5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 19:15:34 +0000 Subject: [PATCH 133/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index ea6c01b8..88ef2e32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-289a212288cf97b4caddd863a01115a93013cbf11b6a5ef27d3fe58b75573e4a.yml -openapi_spec_hash: 19e04dfac967a3bd62427ee5ec114b25 -config_hash: 413f6962c11e086aba4e390636fd64d4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-593fff5189e5b63c4a049acf523bdfdac8506b90b2e6cf47a2fb95464004f014.yml +openapi_spec_hash: 6c7f2cb7ffe7cc9ad279c84b526467a3 +config_hash: b5798c46bec5e9eb5518edc6c09f6291 From 9cac81a3df8a6cdab2319e2677b101522fe2ac5f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 09:26:38 +0000 Subject: [PATCH 134/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 88ef2e32..5b481329 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-593fff5189e5b63c4a049acf523bdfdac8506b90b2e6cf47a2fb95464004f014.yml -openapi_spec_hash: 6c7f2cb7ffe7cc9ad279c84b526467a3 -config_hash: b5798c46bec5e9eb5518edc6c09f6291 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-0e2fdb9a921a8e4dde072bcfa0e2a3b69b56a719ebde84c3086b12aa69aa5a0f.yml +openapi_spec_hash: cd1bfd586d7700bdf73818d1726ff9c0 +config_hash: 499df6bb771a64dce321db069945ad94 From 64f6c50c4c171f569d40e45adab9c101adcb5916 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 17:43:05 +0000 Subject: [PATCH 135/211] feat(rbac): add billing viewer role --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5b481329..b56350f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-0e2fdb9a921a8e4dde072bcfa0e2a3b69b56a719ebde84c3086b12aa69aa5a0f.yml -openapi_spec_hash: cd1bfd586d7700bdf73818d1726ff9c0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-dea9d0d0320ab7d17847162fc0af797a7fa95f951b3121729cff4d7f03905b7c.yml +openapi_spec_hash: 1458cf9b142f4c68a65a0a005dbd2c82 config_hash: 499df6bb771a64dce321db069945ad94 From 03c82308b65adb3944a401ebd890a1b0cd880954 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 17:44:14 +0000 Subject: [PATCH 136/211] feat(rbac): add insights viewer role --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b56350f1..4f289716 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-dea9d0d0320ab7d17847162fc0af797a7fa95f951b3121729cff4d7f03905b7c.yml -openapi_spec_hash: 1458cf9b142f4c68a65a0a005dbd2c82 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-09e6dce8d43ccdb93fd14ce084f040b497550b507de0ccef72241ef7e9394da5.yml +openapi_spec_hash: 230a1b40f03af0963f78a9a8ff340eeb config_hash: 499df6bb771a64dce321db069945ad94 From 164cc6b12f0b79a821867bda6f5c19da5f0a00b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 06:54:40 +0000 Subject: [PATCH 137/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4f289716..5efb7132 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-09e6dce8d43ccdb93fd14ce084f040b497550b507de0ccef72241ef7e9394da5.yml -openapi_spec_hash: 230a1b40f03af0963f78a9a8ff340eeb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-05b65e1287ad5bc2265a6eb66a56b7839cc000f99f888c3ee4d12bbef0faa06e.yml +openapi_spec_hash: 6531d7e45e2a5a192ff883269dcf2fcd config_hash: 499df6bb771a64dce321db069945ad94 From 875f16be8cb3fb1e0bc9fffc90b64e2134711ffe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 07:43:19 +0000 Subject: [PATCH 138/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5efb7132..f755c96c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-05b65e1287ad5bc2265a6eb66a56b7839cc000f99f888c3ee4d12bbef0faa06e.yml -openapi_spec_hash: 6531d7e45e2a5a192ff883269dcf2fcd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-72058565f6853bfb87b93041638fa462aaa178dd49e7bf3611a9f07a94dfc2da.yml +openapi_spec_hash: 0e9548ebedd3d262b09e45f7c757e1c0 config_hash: 499df6bb771a64dce321db069945ad94 From d6e02c6292153b0b8312dcc70e6e915812f2d8b4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 11:15:42 +0000 Subject: [PATCH 139/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f755c96c..d24ff18f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-72058565f6853bfb87b93041638fa462aaa178dd49e7bf3611a9f07a94dfc2da.yml -openapi_spec_hash: 0e9548ebedd3d262b09e45f7c757e1c0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-52e2ae067ceac27a967f5f9639ee13a19eafd61f046b276a65a11b25118b7dc0.yml +openapi_spec_hash: 023321d30578f360a1f9a2d6c96d3b78 config_hash: 499df6bb771a64dce321db069945ad94 From ac674e814cb97c49375e4137e871fc6f9c20c9bf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 14:15:30 +0000 Subject: [PATCH 140/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d24ff18f..9e993597 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-52e2ae067ceac27a967f5f9639ee13a19eafd61f046b276a65a11b25118b7dc0.yml -openapi_spec_hash: 023321d30578f360a1f9a2d6c96d3b78 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-84c0c450f22ef00fdd0dc129b0d7898714f571311bf80cd8a6cc91901c55f781.yml +openapi_spec_hash: eff1aab5ff0305285e38aa7d5604f8ad config_hash: 499df6bb771a64dce321db069945ad94 From 77390939158fbf57123bb25b25cdeb5f9633953d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 11:37:44 +0000 Subject: [PATCH 141/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9e993597..efadd86b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-84c0c450f22ef00fdd0dc129b0d7898714f571311bf80cd8a6cc91901c55f781.yml -openapi_spec_hash: eff1aab5ff0305285e38aa7d5604f8ad -config_hash: 499df6bb771a64dce321db069945ad94 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a50e1ef1a36a8b8288a1a0bda937201fe8e28f68862ef305b6a3240cf3dfbacd.yml +openapi_spec_hash: d2d2ea59f9e8e6dbc40daf2c480eb5b1 +config_hash: ef5dbe58734c95a592e2788c078e336c From 7ff53bd7eee4171691f863c5923402cc48968991 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 13:07:22 +0000 Subject: [PATCH 142/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index efadd86b..6a9c499a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a50e1ef1a36a8b8288a1a0bda937201fe8e28f68862ef305b6a3240cf3dfbacd.yml -openapi_spec_hash: d2d2ea59f9e8e6dbc40daf2c480eb5b1 -config_hash: ef5dbe58734c95a592e2788c078e336c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b4acfcbf6ad4119bd362f89c4e3d5d70dd8e3488935333652a0470fcf5c35d83.yml +openapi_spec_hash: d9cf066155c237f18460a3d667dc5d19 +config_hash: 979ef182d087e447dc8d4a9431b9b5ac From a5194607e60a59d0b18576ce1458de75ef775e77 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 09:53:16 +0000 Subject: [PATCH 143/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6a9c499a..a6003da9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b4acfcbf6ad4119bd362f89c4e3d5d70dd8e3488935333652a0470fcf5c35d83.yml -openapi_spec_hash: d9cf066155c237f18460a3d667dc5d19 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1c7b1896f6e7a26a5195c272bc10dc17f1260a262a199c951a6e6497c2da32cf.yml +openapi_spec_hash: 343a01557fe5b678e9558a61be71e656 config_hash: 979ef182d087e447dc8d4a9431b9b5ac From 22954cbbcd450070cde11372d48360936517a85e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Jun 2026 13:25:21 +0000 Subject: [PATCH 144/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index a6003da9..ae121649 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1c7b1896f6e7a26a5195c272bc10dc17f1260a262a199c951a6e6497c2da32cf.yml -openapi_spec_hash: 343a01557fe5b678e9558a61be71e656 -config_hash: 979ef182d087e447dc8d4a9431b9b5ac +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c21c05432972ce73ae261d3dfa5f7700ec1950e25e00ca5a40d29e723c39cef6.yml +openapi_spec_hash: 4a9671b0493d8b6a47ea4a7efc5d79cf +config_hash: 970714378c872053344a6a6cc961ac12 From 85d3d46fa1c7a73a1911eaa00e5423c62781662f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 17:46:44 +0000 Subject: [PATCH 145/211] feat(api): add security policy CRUD --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index ae121649..2149b7d5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c21c05432972ce73ae261d3dfa5f7700ec1950e25e00ca5a40d29e723c39cef6.yml -openapi_spec_hash: 4a9671b0493d8b6a47ea4a7efc5d79cf -config_hash: 970714378c872053344a6a6cc961ac12 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3fb30bb376962d1e5a6c4cfd2129b06839463c7ec7d24fc236600d96945a5993.yml +openapi_spec_hash: d7674c89344b5d78748c654b0785cbb9 +config_hash: 1a5d20c51bc8d00fc34ba99d62a6a770 From 0c7f633f5ac848e21a39639c8952a8f53d5037fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 08:32:33 +0000 Subject: [PATCH 146/211] feat(api): add agent turn controls --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2149b7d5..a8dba2dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3fb30bb376962d1e5a6c4cfd2129b06839463c7ec7d24fc236600d96945a5993.yml -openapi_spec_hash: d7674c89344b5d78748c654b0785cbb9 -config_hash: 1a5d20c51bc8d00fc34ba99d62a6a770 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-e2e762164f81a5082b2f8b8dd847b4f5530c1517a37ac56cbdc5fddee44dffda.yml +openapi_spec_hash: 02adbb13a79e81bfb085af8410291625 +config_hash: ef2f020b1fa11b366f50349e7c8aba89 From ce020c9d3c968bff092d0ef3a37a340c306d2268 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 17:48:43 +0000 Subject: [PATCH 147/211] feat(automations): pin agent and Codex model per automation --- .stats.yml | 6 ++-- src/gitpod/resources/agents.py | 9 +++-- src/gitpod/types/__init__.py | 2 -- .../types/agent_send_to_execution_params.py | 3 +- .../types/agent_start_execution_params.py | 3 +- src/gitpod/types/codex_openai_model.py | 15 -------- src/gitpod/types/codex_reasoning_effort.py | 13 ------- src/gitpod/types/codex_service_tier.py | 7 ---- src/gitpod/types/codex_settings_param.py | 34 ------------------- 9 files changed, 9 insertions(+), 83 deletions(-) delete mode 100644 src/gitpod/types/codex_openai_model.py delete mode 100644 src/gitpod/types/codex_reasoning_effort.py delete mode 100644 src/gitpod/types/codex_service_tier.py delete mode 100644 src/gitpod/types/codex_settings_param.py diff --git a/.stats.yml b/.stats.yml index a8dba2dd..a0bbb8e0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-e2e762164f81a5082b2f8b8dd847b4f5530c1517a37ac56cbdc5fddee44dffda.yml -openapi_spec_hash: 02adbb13a79e81bfb085af8410291625 -config_hash: ef2f020b1fa11b366f50349e7c8aba89 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a379dab1c3bb650f65085bdfde72430cdf79c402779fdfa5c59ecdf3a466f6a0.yml +openapi_spec_hash: efaa8f73c6ce35c8444af821d26d2ad2 +config_hash: e96e085d7c2fffa93a7c0207af05539b diff --git a/src/gitpod/resources/agents.py b/src/gitpod/resources/agents.py index 2f796615..b68d84e0 100644 --- a/src/gitpod/resources/agents.py +++ b/src/gitpod/resources/agents.py @@ -38,7 +38,6 @@ from ..types.agent_execution import AgentExecution from ..types.wake_event_param import WakeEventParam from ..types.agent_message_param import AgentMessageParam -from ..types.codex_settings_param import CodexSettingsParam from ..types.user_input_block_param import UserInputBlockParam from ..types.agent_code_context_param import AgentCodeContextParam from ..types.agent_create_prompt_response import AgentCreatePromptResponse @@ -488,7 +487,7 @@ def send_to_execution( *, agent_execution_id: str | Omit = omit, agent_message: AgentMessageParam | Omit = omit, - codex_settings: CodexSettingsParam | Omit = omit, + codex_settings: CodexSettings | Omit = omit, user_input: UserInputBlockParam | Omit = omit, wake_event: WakeEventParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -558,7 +557,7 @@ def start_execution( agent_id: str | Omit = omit, annotations: Dict[str, str] | Omit = omit, code_context: AgentCodeContextParam | Omit = omit, - codex_settings: CodexSettingsParam | Omit = omit, + codex_settings: CodexSettings | Omit = omit, mode: AgentMode | Omit = omit, name: str | Omit = omit, runner_id: str | Omit = omit, @@ -1182,7 +1181,7 @@ async def send_to_execution( *, agent_execution_id: str | Omit = omit, agent_message: AgentMessageParam | Omit = omit, - codex_settings: CodexSettingsParam | Omit = omit, + codex_settings: CodexSettings | Omit = omit, user_input: UserInputBlockParam | Omit = omit, wake_event: WakeEventParam | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1252,7 +1251,7 @@ async def start_execution( agent_id: str | Omit = omit, annotations: Dict[str, str] | Omit = omit, code_context: AgentCodeContextParam | Omit = omit, - codex_settings: CodexSettingsParam | Omit = omit, + codex_settings: CodexSettings | Omit = omit, mode: AgentMode | Omit = omit, name: str | Omit = omit, runner_id: str | Omit = omit, diff --git a/src/gitpod/types/__init__.py b/src/gitpod/types/__init__.py index 52c2ee5b..674e1c93 100644 --- a/src/gitpod/types/__init__.py +++ b/src/gitpod/types/__init__.py @@ -142,7 +142,6 @@ from .recommended_editors import RecommendedEditors as RecommendedEditors from .update_window_param import UpdateWindowParam as UpdateWindowParam from .workflow_step_param import WorkflowStepParam as WorkflowStepParam -from .codex_settings_param import CodexSettingsParam as CodexSettingsParam from .environment_metadata import EnvironmentMetadata as EnvironmentMetadata from .event_watch_response import EventWatchResponse as EventWatchResponse from .invite_domains_param import InviteDomainsParam as InviteDomainsParam @@ -167,7 +166,6 @@ from .project_update_params import ProjectUpdateParams as ProjectUpdateParams from .workflow_action_param import WorkflowActionParam as WorkflowActionParam from .automation_list_params import AutomationListParams as AutomationListParams -from .codex_reasoning_effort import CodexReasoningEffort as CodexReasoningEffort from .editor_retrieve_params import EditorRetrieveParams as EditorRetrieveParams from .environment_spec_param import EnvironmentSpecParam as EnvironmentSpecParam from .kernel_controls_config import KernelControlsConfig as KernelControlsConfig diff --git a/src/gitpod/types/agent_send_to_execution_params.py b/src/gitpod/types/agent_send_to_execution_params.py index b6ad64ea..0ed543e0 100644 --- a/src/gitpod/types/agent_send_to_execution_params.py +++ b/src/gitpod/types/agent_send_to_execution_params.py @@ -7,7 +7,6 @@ from .._utils import PropertyInfo from .wake_event_param import WakeEventParam from .agent_message_param import AgentMessageParam -from .codex_settings_param import CodexSettingsParam from .user_input_block_param import UserInputBlockParam from .shared_params.codex_settings import CodexSettings @@ -23,7 +22,7 @@ class AgentSendToExecutionParams(TypedDict, total=False): from a parent agent to a child agent execution, or vice versa). """ - codex_settings: Annotated[CodexSettingsParam, PropertyInfo(alias="codexSettings")] + codex_settings: Annotated[CodexSettings, PropertyInfo(alias="codexSettings")] """ codex_settings contains per-turn desired settings for Codex app user_input sends. diff --git a/src/gitpod/types/agent_start_execution_params.py b/src/gitpod/types/agent_start_execution_params.py index 0bf3d8f2..29da4adf 100644 --- a/src/gitpod/types/agent_start_execution_params.py +++ b/src/gitpod/types/agent_start_execution_params.py @@ -7,7 +7,6 @@ from .._utils import PropertyInfo from .agent_mode import AgentMode -from .codex_settings_param import CodexSettingsParam from .agent_code_context_param import AgentCodeContextParam from .shared_params.codex_settings import CodexSettings @@ -31,7 +30,7 @@ class AgentStartExecutionParams(TypedDict, total=False): code_context: Annotated[AgentCodeContextParam, PropertyInfo(alias="codeContext")] - codex_settings: Annotated[CodexSettingsParam, PropertyInfo(alias="codexSettings")] + codex_settings: Annotated[CodexSettings, PropertyInfo(alias="codexSettings")] """codex_settings contains desired manual settings for the Codex app agent.""" mode: AgentMode diff --git a/src/gitpod/types/codex_openai_model.py b/src/gitpod/types/codex_openai_model.py deleted file mode 100644 index bb49e5f5..00000000 --- a/src/gitpod/types/codex_openai_model.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import Literal, TypeAlias - -__all__ = ["CodexOpenAIModel"] - -CodexOpenAIModel: TypeAlias = Literal[ - "CODEX_OPEN_AI_MODEL_UNSPECIFIED", - "CODEX_OPEN_AI_MODEL_GPT_5_5", - "CODEX_OPEN_AI_MODEL_GPT_5_4", - "CODEX_OPEN_AI_MODEL_GPT_5_4_MINI", - "CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX", - "CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK", - "CODEX_OPEN_AI_MODEL_GPT_5_2", -] diff --git a/src/gitpod/types/codex_reasoning_effort.py b/src/gitpod/types/codex_reasoning_effort.py deleted file mode 100644 index c686cd5b..00000000 --- a/src/gitpod/types/codex_reasoning_effort.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import Literal, TypeAlias - -__all__ = ["CodexReasoningEffort"] - -CodexReasoningEffort: TypeAlias = Literal[ - "CODEX_REASONING_EFFORT_UNSPECIFIED", - "CODEX_REASONING_EFFORT_LOW", - "CODEX_REASONING_EFFORT_MEDIUM", - "CODEX_REASONING_EFFORT_HIGH", - "CODEX_REASONING_EFFORT_EXTRA_HIGH", -] diff --git a/src/gitpod/types/codex_service_tier.py b/src/gitpod/types/codex_service_tier.py deleted file mode 100644 index aec3358e..00000000 --- a/src/gitpod/types/codex_service_tier.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import Literal, TypeAlias - -__all__ = ["CodexServiceTier"] - -CodexServiceTier: TypeAlias = Literal["CODEX_SERVICE_TIER_UNSPECIFIED", "CODEX_SERVICE_TIER_FAST"] diff --git a/src/gitpod/types/codex_settings_param.py b/src/gitpod/types/codex_settings_param.py deleted file mode 100644 index f4c56cf7..00000000 --- a/src/gitpod/types/codex_settings_param.py +++ /dev/null @@ -1,34 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Annotated, TypedDict - -from .._utils import PropertyInfo -from .codex_openai_model import CodexOpenAIModel -from .codex_service_tier import CodexServiceTier -from .codex_reasoning_effort import CodexReasoningEffort - -__all__ = ["CodexSettingsParam"] - - -class CodexSettingsParam(TypedDict, total=False): - """CodexSettings contains settings consumed only by the Codex app agent.""" - - model: CodexOpenAIModel - """ - CodexOpenAIModel is the static allowlist of concrete OpenAI models that the - Codex app runtime can select through Ona's Codex picker. - """ - - reasoning_effort: Annotated[CodexReasoningEffort, PropertyInfo(alias="reasoningEffort")] - """ - CodexReasoningEffort is the static allowlist of reasoning efforts supported by - the Codex app runtime. - """ - - service_tier: Annotated[CodexServiceTier, PropertyInfo(alias="serviceTier")] - """ - CodexServiceTier is the static allowlist of service tiers supported by the Codex - app runtime. - """ From 5467d47ac15e80f1bf4eb601ccc73d79857493e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 07:34:45 +0000 Subject: [PATCH 148/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a0bbb8e0..a5ee2f12 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-a379dab1c3bb650f65085bdfde72430cdf79c402779fdfa5c59ecdf3a466f6a0.yml -openapi_spec_hash: efaa8f73c6ce35c8444af821d26d2ad2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f2bf105fca7448c05512658938455385dd6fdc3fa684532d9d53ddf413ec3124.yml +openapi_spec_hash: 7c8d5fa2b6efb22f0b4acb169bcf0c80 config_hash: e96e085d7c2fffa93a7c0207af05539b From 4594b0296008ed2866917bba226a9fb2e08ede63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 09:13:40 +0000 Subject: [PATCH 149/211] feat(api): add Codex policy allowlists --- .stats.yml | 4 ++-- src/gitpod/types/organizations/policy_update_params.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index a5ee2f12..4c9b58b6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f2bf105fca7448c05512658938455385dd6fdc3fa684532d9d53ddf413ec3124.yml -openapi_spec_hash: 7c8d5fa2b6efb22f0b4acb169bcf0c80 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-38aa4895aed92087a98a458735490eaf8aa1a375026158bc274648f2edece4cf.yml +openapi_spec_hash: 48887f3dab49355800465a5eae250976 config_hash: e96e085d7c2fffa93a7c0207af05539b diff --git a/src/gitpod/types/organizations/policy_update_params.py b/src/gitpod/types/organizations/policy_update_params.py index 4222d7ab..a7e95bfb 100644 --- a/src/gitpod/types/organizations/policy_update_params.py +++ b/src/gitpod/types/organizations/policy_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, Iterable, Optional +from typing import Dict, List, Iterable, Optional from typing_extensions import Required, Annotated, TypedDict from ..._types import SequenceNotStr From 1f90c8f125ad4b40f0822ed20781aeaefcfd7674 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 11:20:27 +0000 Subject: [PATCH 150/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4c9b58b6..f9a45d4f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-38aa4895aed92087a98a458735490eaf8aa1a375026158bc274648f2edece4cf.yml -openapi_spec_hash: 48887f3dab49355800465a5eae250976 -config_hash: e96e085d7c2fffa93a7c0207af05539b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-506291b2b813391f6abc916b2c998e41faf987adb4297336313f8148569ead14.yml +openapi_spec_hash: d2f9d6d53cb1ed78584e4290ebc9da2e +config_hash: 86d32fe11ac82df94b4596db03b60ddd From 236cfc45d12513c8a7bef493c26c707ba795dc80 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 12:22:29 +0000 Subject: [PATCH 151/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f9a45d4f..d82c1a58 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-506291b2b813391f6abc916b2c998e41faf987adb4297336313f8148569ead14.yml -openapi_spec_hash: d2f9d6d53cb1ed78584e4290ebc9da2e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ead9e1a282e720ff706e346a908a41f3c0bbaf67aac2404a217e7a196d21df34.yml +openapi_spec_hash: 303a1cf2a673943f27bc03ef68f9b409 config_hash: 86d32fe11ac82df94b4596db03b60ddd From e4af8f2e2024276578a197460b4c0ac4d2f9999e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 14:36:50 +0000 Subject: [PATCH 152/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d82c1a58..939ddf64 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ead9e1a282e720ff706e346a908a41f3c0bbaf67aac2404a217e7a196d21df34.yml -openapi_spec_hash: 303a1cf2a673943f27bc03ef68f9b409 -config_hash: 86d32fe11ac82df94b4596db03b60ddd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ac35112e9f590bdd6d44ae2cba037270651b30364e0a4bdf48066c95a7a56d0c.yml +openapi_spec_hash: 141f77dd0a37b669b4ce756a0b2913d9 +config_hash: 81bcc1e570b17879f7cd1bd0755bad2e From 50ca313079966b65bccf56d61026d675f646bd11 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 08:38:02 +0000 Subject: [PATCH 153/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 939ddf64..22dc858b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ac35112e9f590bdd6d44ae2cba037270651b30364e0a4bdf48066c95a7a56d0c.yml -openapi_spec_hash: 141f77dd0a37b669b4ce756a0b2913d9 -config_hash: 81bcc1e570b17879f7cd1bd0755bad2e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-e73053d89d14f826c1ee8d9ecce897c4954e4c3ab5c917cc91fd7b15d26c55f5.yml +openapi_spec_hash: 2328565fb32ed659f0e8f610c1948dd5 +config_hash: 3beb600bfc528d17e9f5034eef4f58eb From 2e498ee9c9a2b0c0f0f5c3a91d770f9221ce8b3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 11:27:26 +0000 Subject: [PATCH 154/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 22dc858b..15f419e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-e73053d89d14f826c1ee8d9ecce897c4954e4c3ab5c917cc91fd7b15d26c55f5.yml -openapi_spec_hash: 2328565fb32ed659f0e8f610c1948dd5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-6bfcd0395e2f0ef20f2b6843c81d78c6374bff51e742ff839e6edfb6581699ef.yml +openapi_spec_hash: 5f99a6ebeb99ec90c8592d789307e741 config_hash: 3beb600bfc528d17e9f5034eef4f58eb From 5a9553269c660e36520abab490bc1358ee6cb81c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 14:57:01 +0000 Subject: [PATCH 155/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 15f419e5..9bb24fb2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-6bfcd0395e2f0ef20f2b6843c81d78c6374bff51e742ff839e6edfb6581699ef.yml -openapi_spec_hash: 5f99a6ebeb99ec90c8592d789307e741 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-d2eb4bc22b98bb2246a85ed7bbeb25594a92bbaacc6564750551df65b936f12d.yml +openapi_spec_hash: a38bfb267db71a895fd5afed11e35261 config_hash: 3beb600bfc528d17e9f5034eef4f58eb From 09bcc435a18e00c8690c7106dbe453c3d8fa7a08 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 12:13:45 +0000 Subject: [PATCH 156/211] feat(agents): add native goal set control --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9bb24fb2..8b1ecf69 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-d2eb4bc22b98bb2246a85ed7bbeb25594a92bbaacc6564750551df65b936f12d.yml -openapi_spec_hash: a38bfb267db71a895fd5afed11e35261 -config_hash: 3beb600bfc528d17e9f5034eef4f58eb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-963274247a9297b86fe1cec1020527c61f5b4018bfb9cb93a2bdf56d049d9543.yml +openapi_spec_hash: 78deb0b035e941e32feb1a9107e4ab3e +config_hash: bbaded0c346daaef5638730562e7444a From 88f1ce56c88f1d5af496c53559b7209f1be37870 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 12:19:25 +0000 Subject: [PATCH 157/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8b1ecf69..25dbc20a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-963274247a9297b86fe1cec1020527c61f5b4018bfb9cb93a2bdf56d049d9543.yml -openapi_spec_hash: 78deb0b035e941e32feb1a9107e4ab3e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-99be2b4fd803e78be47c83ba8eec966cbd1931e7789a1c49ccac63758eaa0fcd.yml +openapi_spec_hash: 607e5731184eaa04fe383320713d410a config_hash: bbaded0c346daaef5638730562e7444a From 3bd8de4b90d93b0390860e768b35421fb477c748 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 09:34:36 +0000 Subject: [PATCH 158/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 25dbc20a..c19a545f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-99be2b4fd803e78be47c83ba8eec966cbd1931e7789a1c49ccac63758eaa0fcd.yml -openapi_spec_hash: 607e5731184eaa04fe383320713d410a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-6499be21b76c5aaadac90dba0bbb2c9f442151e95fe68ce6df41862597b6173f.yml +openapi_spec_hash: fe76dd92010516ab65462f71bd23e6ea config_hash: bbaded0c346daaef5638730562e7444a From 99518499ea51cdc5e6a37908af83afe8fe8a79ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 14:57:24 +0000 Subject: [PATCH 159/211] refactor(agent)!: remove loop condition mechanism --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index c19a545f..55019558 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-6499be21b76c5aaadac90dba0bbb2c9f442151e95fe68ce6df41862597b6173f.yml -openapi_spec_hash: fe76dd92010516ab65462f71bd23e6ea -config_hash: bbaded0c346daaef5638730562e7444a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-4af04f5eb259db707048ef2fde19f2ec67a8c4439311f782d1aff500b02442ca.yml +openapi_spec_hash: 152f6430b135de475ed9f6e0dc762a56 +config_hash: aab6a7e9af7d4db39afed45e39aea37c From bb96eebe96889fa7e04ea9c17eb9fbc404c2d1f6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 19:21:13 +0000 Subject: [PATCH 160/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 55019558..aef89dc9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-4af04f5eb259db707048ef2fde19f2ec67a8c4439311f782d1aff500b02442ca.yml -openapi_spec_hash: 152f6430b135de475ed9f6e0dc762a56 -config_hash: aab6a7e9af7d4db39afed45e39aea37c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-064184a9fb49d5117b450e9ed555a08982b930063275edbc9d28e3902ad8b1a7.yml +openapi_spec_hash: caa994d150064819168a3d9f07376e86 +config_hash: a0e9a172791829e869c6caa730cca990 From f96e98e385ffffeb280bda2a549c4a4af0a05d3d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 13:01:55 +0000 Subject: [PATCH 161/211] refactor(api): remove project defaults API surface --- .stats.yml | 6 +- api.md | 4 -- src/gitpod/types/organizations/__init__.py | 16 ----- .../organizations/policy_update_params.py | 44 +------------ ...ject_creation_default_environment_class.py | 35 ----------- ...reation_default_environment_class_param.py | 37 ----------- ...ion_default_environment_class_warm_pool.py | 28 --------- ...fault_environment_class_warm_pool_param.py | 28 --------- .../project_creation_defaults.py | 40 ------------ .../project_creation_defaults_prebuilds.py | 61 ------------------- ...oject_creation_defaults_prebuilds_param.py | 61 ------------------- .../organizations/test_policies.py | 54 ---------------- 12 files changed, 4 insertions(+), 410 deletions(-) delete mode 100644 src/gitpod/types/organizations/project_creation_default_environment_class.py delete mode 100644 src/gitpod/types/organizations/project_creation_default_environment_class_param.py delete mode 100644 src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool.py delete mode 100644 src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool_param.py delete mode 100644 src/gitpod/types/organizations/project_creation_defaults.py delete mode 100644 src/gitpod/types/organizations/project_creation_defaults_prebuilds.py delete mode 100644 src/gitpod/types/organizations/project_creation_defaults_prebuilds_param.py diff --git a/.stats.yml b/.stats.yml index aef89dc9..dcf4fb48 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-064184a9fb49d5117b450e9ed555a08982b930063275edbc9d28e3902ad8b1a7.yml -openapi_spec_hash: caa994d150064819168a3d9f07376e86 -config_hash: a0e9a172791829e869c6caa730cca990 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-fb78b1db14b13c6584c38f9e515b274f950e60e3804d166e278d00ce8a722044.yml +openapi_spec_hash: 1a34266c11173bd10620549625fd673a +config_hash: 0c540edd1281d4322f050c73da39358d diff --git a/api.md b/api.md index 56766c43..43258222 100644 --- a/api.md +++ b/api.md @@ -557,10 +557,6 @@ from gitpod.types.organizations import ( CustomAgentEnvMapping, CustomSecurityAgent, OrganizationPolicies, - ProjectCreationDefaultEnvironmentClass, - ProjectCreationDefaultEnvironmentClassWarmPool, - ProjectCreationDefaults, - ProjectCreationDefaultsPrebuilds, SecurityAgentPolicy, VetoExecPolicy, PolicyRetrieveResponse, diff --git a/src/gitpod/types/organizations/__init__.py b/src/gitpod/types/organizations/__init__.py index d877450f..8ceaed9c 100644 --- a/src/gitpod/types/organizations/__init__.py +++ b/src/gitpod/types/organizations/__init__.py @@ -62,30 +62,14 @@ from .domain_verification_create_response import DomainVerificationCreateResponse as DomainVerificationCreateResponse from .domain_verification_retrieve_params import DomainVerificationRetrieveParams as DomainVerificationRetrieveParams from .domain_verification_verify_response import DomainVerificationVerifyResponse as DomainVerificationVerifyResponse -from .project_creation_defaults_prebuilds import ProjectCreationDefaultsPrebuilds as ProjectCreationDefaultsPrebuilds from .sso_configuration_retrieve_response import SSOConfigurationRetrieveResponse as SSOConfigurationRetrieveResponse from .scim_configuration_retrieve_response import ScimConfigurationRetrieveResponse as ScimConfigurationRetrieveResponse from .domain_verification_retrieve_response import ( DomainVerificationRetrieveResponse as DomainVerificationRetrieveResponse, ) -from .project_creation_defaults_prebuilds_param import ( - ProjectCreationDefaultsPrebuildsParam as ProjectCreationDefaultsPrebuildsParam, -) -from .project_creation_default_environment_class import ( - ProjectCreationDefaultEnvironmentClass as ProjectCreationDefaultEnvironmentClass, -) from .scim_configuration_regenerate_token_params import ( ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams, ) from .scim_configuration_regenerate_token_response import ( ScimConfigurationRegenerateTokenResponse as ScimConfigurationRegenerateTokenResponse, ) -from .project_creation_default_environment_class_param import ( - ProjectCreationDefaultEnvironmentClassParam as ProjectCreationDefaultEnvironmentClassParam, -) -from .project_creation_default_environment_class_warm_pool import ( - ProjectCreationDefaultEnvironmentClassWarmPool as ProjectCreationDefaultEnvironmentClassWarmPool, -) -from .project_creation_default_environment_class_warm_pool_param import ( - ProjectCreationDefaultEnvironmentClassWarmPoolParam as ProjectCreationDefaultEnvironmentClassWarmPoolParam, -) diff --git a/src/gitpod/types/organizations/policy_update_params.py b/src/gitpod/types/organizations/policy_update_params.py index a7e95bfb..5ab015ad 100644 --- a/src/gitpod/types/organizations/policy_update_params.py +++ b/src/gitpod/types/organizations/policy_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Dict, List, Iterable, Optional +from typing import Dict, List, Optional from typing_extensions import Required, Annotated, TypedDict from ..._types import SequenceNotStr @@ -14,14 +14,11 @@ from ..shared.codex_service_tier import CodexServiceTier from .conversation_sharing_policy import ConversationSharingPolicy from ..shared.codex_reasoning_effort import CodexReasoningEffort -from .project_creation_defaults_prebuilds_param import ProjectCreationDefaultsPrebuildsParam -from .project_creation_default_environment_class_param import ProjectCreationDefaultEnvironmentClassParam __all__ = [ "PolicyUpdateParams", "AgentPolicy", "EditorVersionRestrictions", - "ProjectCreationDefaultsPrebuilds", "SecurityAgentPolicy", "SecurityAgentPolicyCrowdstrike", ] @@ -259,45 +256,6 @@ class EditorVersionRestrictions(TypedDict, total=False): """ -class ProjectCreationDefaultsPrebuilds(TypedDict, total=False): - """ - prebuilds updates default prebuild settings for newly created projects. - When absent, prebuild defaults are left unchanged. - """ - - disabled: object - """disabled clears persisted prebuild defaults.""" - - enabled: ProjectCreationDefaultsPrebuildsParam - """enabled sets or updates persisted prebuild defaults.""" - - -class ProjectCreationDefaults(TypedDict, total=False): - """ - project_creation_defaults contains updates to default settings applied to newly created projects. - """ - - environment_classes: Annotated[ - Iterable[ProjectCreationDefaultEnvironmentClassParam], PropertyInfo(alias="environmentClasses") - ] - """ - environment_classes replaces the full list of default environment classes and - their per-class settings. Send an empty list to clear defaults. - """ - - insights_enabled: Annotated[Optional[bool], PropertyInfo(alias="insightsEnabled")] - """ - insights_enabled controls whether Insights (co-author attribution) is - automatically enabled on newly created projects. - """ - - prebuilds: Optional[ProjectCreationDefaultsPrebuilds] - """ - prebuilds updates default prebuild settings for newly created projects. When - absent, prebuild defaults are left unchanged. - """ - - class SecurityAgentPolicyCrowdstrike(TypedDict, total=False): """crowdstrike contains CrowdStrike Falcon configuration updates""" diff --git a/src/gitpod/types/organizations/project_creation_default_environment_class.py b/src/gitpod/types/organizations/project_creation_default_environment_class.py deleted file mode 100644 index cf60fe32..00000000 --- a/src/gitpod/types/organizations/project_creation_default_environment_class.py +++ /dev/null @@ -1,35 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel -from .project_creation_default_environment_class_warm_pool import ProjectCreationDefaultEnvironmentClassWarmPool - -__all__ = ["ProjectCreationDefaultEnvironmentClass"] - - -class ProjectCreationDefaultEnvironmentClass(BaseModel): - """ - ProjectCreationDefaultEnvironmentClass configures a single environment class - in the project creation defaults. - """ - - environment_class_id: Optional[str] = FieldInfo(alias="environmentClassId", default=None) - """environment_class_id is the ID of the environment class.""" - - order: Optional[int] = None - """order is the priority of this entry (lower = higher priority).""" - - prebuild: Optional[bool] = None - """ - prebuild controls whether prebuilds are enabled for this environment class on - newly created projects. - """ - - warm_pool: Optional[ProjectCreationDefaultEnvironmentClassWarmPool] = FieldInfo(alias="warmPool", default=None) - """ - warm_pool configures the warm pool for this environment class on newly created - projects. Only meaningful when prebuild is true. - """ diff --git a/src/gitpod/types/organizations/project_creation_default_environment_class_param.py b/src/gitpod/types/organizations/project_creation_default_environment_class_param.py deleted file mode 100644 index 23ddb04e..00000000 --- a/src/gitpod/types/organizations/project_creation_default_environment_class_param.py +++ /dev/null @@ -1,37 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Annotated, TypedDict - -from ..._utils import PropertyInfo -from .project_creation_default_environment_class_warm_pool_param import ( - ProjectCreationDefaultEnvironmentClassWarmPoolParam, -) - -__all__ = ["ProjectCreationDefaultEnvironmentClassParam"] - - -class ProjectCreationDefaultEnvironmentClassParam(TypedDict, total=False): - """ - ProjectCreationDefaultEnvironmentClass configures a single environment class - in the project creation defaults. - """ - - environment_class_id: Annotated[str, PropertyInfo(alias="environmentClassId")] - """environment_class_id is the ID of the environment class.""" - - order: int - """order is the priority of this entry (lower = higher priority).""" - - prebuild: bool - """ - prebuild controls whether prebuilds are enabled for this environment class on - newly created projects. - """ - - warm_pool: Annotated[ProjectCreationDefaultEnvironmentClassWarmPoolParam, PropertyInfo(alias="warmPool")] - """ - warm_pool configures the warm pool for this environment class on newly created - projects. Only meaningful when prebuild is true. - """ diff --git a/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool.py b/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool.py deleted file mode 100644 index 210bca40..00000000 --- a/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool.py +++ /dev/null @@ -1,28 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel - -__all__ = ["ProjectCreationDefaultEnvironmentClassWarmPool"] - - -class ProjectCreationDefaultEnvironmentClassWarmPool(BaseModel): - """ - ProjectCreationDefaultEnvironmentClassWarmPool configures warm pool defaults - for an environment class in the project creation defaults. - """ - - enabled: Optional[bool] = None - """enabled controls whether a warm pool is created for this environment class.""" - - max_size: Optional[int] = FieldInfo(alias="maxSize", default=None) - """max_size is the maximum number of warm instances. - - Must be >= min_size and <= 20. - """ - - min_size: Optional[int] = FieldInfo(alias="minSize", default=None) - """min_size is the minimum number of warm instances. Must be >= 0 and <= max_size.""" diff --git a/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool_param.py b/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool_param.py deleted file mode 100644 index 765daaaa..00000000 --- a/src/gitpod/types/organizations/project_creation_default_environment_class_warm_pool_param.py +++ /dev/null @@ -1,28 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Annotated, TypedDict - -from ..._utils import PropertyInfo - -__all__ = ["ProjectCreationDefaultEnvironmentClassWarmPoolParam"] - - -class ProjectCreationDefaultEnvironmentClassWarmPoolParam(TypedDict, total=False): - """ - ProjectCreationDefaultEnvironmentClassWarmPool configures warm pool defaults - for an environment class in the project creation defaults. - """ - - enabled: bool - """enabled controls whether a warm pool is created for this environment class.""" - - max_size: Annotated[int, PropertyInfo(alias="maxSize")] - """max_size is the maximum number of warm instances. - - Must be >= min_size and <= 20. - """ - - min_size: Annotated[int, PropertyInfo(alias="minSize")] - """min_size is the minimum number of warm instances. Must be >= 0 and <= max_size.""" diff --git a/src/gitpod/types/organizations/project_creation_defaults.py b/src/gitpod/types/organizations/project_creation_defaults.py deleted file mode 100644 index 07d87c79..00000000 --- a/src/gitpod/types/organizations/project_creation_defaults.py +++ /dev/null @@ -1,40 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel -from .project_creation_defaults_prebuilds import ProjectCreationDefaultsPrebuilds -from .project_creation_default_environment_class import ProjectCreationDefaultEnvironmentClass - -__all__ = ["ProjectCreationDefaults"] - - -class ProjectCreationDefaults(BaseModel): - """ - ProjectCreationDefaults contains default settings applied to newly created projects. - """ - - environment_classes: Optional[List[ProjectCreationDefaultEnvironmentClass]] = FieldInfo( - alias="environmentClasses", default=None - ) - """ - environment_classes specifies default environment classes and their per-class - settings (order, prebuild, warm pool) for newly created projects. Each entry - must reference an existing, enabled, non-local-runner environment class in the - organization. - """ - - insights_enabled: Optional[bool] = FieldInfo(alias="insightsEnabled", default=None) - """ - insights_enabled controls whether Insights (co-author attribution) is - automatically enabled on newly created projects. - """ - - prebuilds: Optional[ProjectCreationDefaultsPrebuilds] = None - """ - prebuilds configures default prebuild settings for newly created projects. When - set, prebuilds can be enabled per environment class via the environment_classes - entries. When absent, prebuilds are not enabled by default. - """ diff --git a/src/gitpod/types/organizations/project_creation_defaults_prebuilds.py b/src/gitpod/types/organizations/project_creation_defaults_prebuilds.py deleted file mode 100644 index 79d7fb4b..00000000 --- a/src/gitpod/types/organizations/project_creation_defaults_prebuilds.py +++ /dev/null @@ -1,61 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from pydantic import Field as FieldInfo - -from ..._models import BaseModel -from ..shared.subject import Subject - -__all__ = ["ProjectCreationDefaultsPrebuilds", "Trigger", "TriggerDailySchedule"] - - -class TriggerDailySchedule(BaseModel): - """ - daily_schedule triggers a prebuild once per day at the specified hour (UTC). - The actual start time may vary slightly to distribute system load. - """ - - hour_utc: Optional[int] = FieldInfo(alias="hourUtc", default=None) - """ - hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The - actual start time may be adjusted by a few minutes to balance system load. - """ - - -class Trigger(BaseModel): - """trigger defines when prebuilds should be created on newly created projects.""" - - daily_schedule: TriggerDailySchedule = FieldInfo(alias="dailySchedule") - """ - daily_schedule triggers a prebuild once per day at the specified hour (UTC). The - actual start time may vary slightly to distribute system load. - """ - - -class ProjectCreationDefaultsPrebuilds(BaseModel): - """ - ProjectCreationDefaultsPrebuilds configures default prebuild settings. - Presence of this message means prebuilds can be enabled for the default environment classes. - """ - - enable_jetbrains_warmup: Optional[bool] = FieldInfo(alias="enableJetbrainsWarmup", default=None) - """ - enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during - prebuilds on newly created projects. - """ - - prebuild_executor: Optional[Subject] = FieldInfo(alias="prebuildExecutor", default=None) - """ - prebuild_executor is the service account used to run prebuilds on newly created - projects. Must be a service account (not a user). - """ - - timeout: Optional[str] = None - """ - timeout is the maximum duration allowed for a prebuild to complete. If not - specified, defaults to 1 hour. Must be between 5 minutes and 2 hours. - """ - - trigger: Optional[Trigger] = None - """trigger defines when prebuilds should be created on newly created projects.""" diff --git a/src/gitpod/types/organizations/project_creation_defaults_prebuilds_param.py b/src/gitpod/types/organizations/project_creation_defaults_prebuilds_param.py deleted file mode 100644 index 37b40889..00000000 --- a/src/gitpod/types/organizations/project_creation_defaults_prebuilds_param.py +++ /dev/null @@ -1,61 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, Annotated, TypedDict - -from ..._utils import PropertyInfo -from ..shared_params.subject import Subject - -__all__ = ["ProjectCreationDefaultsPrebuildsParam", "Trigger", "TriggerDailySchedule"] - - -class TriggerDailySchedule(TypedDict, total=False): - """ - daily_schedule triggers a prebuild once per day at the specified hour (UTC). - The actual start time may vary slightly to distribute system load. - """ - - hour_utc: Annotated[int, PropertyInfo(alias="hourUtc")] - """ - hour_utc is the hour of day (0-23) in UTC when the prebuild should start. The - actual start time may be adjusted by a few minutes to balance system load. - """ - - -class Trigger(TypedDict, total=False): - """trigger defines when prebuilds should be created on newly created projects.""" - - daily_schedule: Required[Annotated[TriggerDailySchedule, PropertyInfo(alias="dailySchedule")]] - """ - daily_schedule triggers a prebuild once per day at the specified hour (UTC). The - actual start time may vary slightly to distribute system load. - """ - - -class ProjectCreationDefaultsPrebuildsParam(TypedDict, total=False): - """ - ProjectCreationDefaultsPrebuilds configures default prebuild settings. - Presence of this message means prebuilds can be enabled for the default environment classes. - """ - - enable_jetbrains_warmup: Annotated[bool, PropertyInfo(alias="enableJetbrainsWarmup")] - """ - enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during - prebuilds on newly created projects. - """ - - prebuild_executor: Annotated[Subject, PropertyInfo(alias="prebuildExecutor")] - """ - prebuild_executor is the service account used to run prebuilds on newly created - projects. Must be a service account (not a user). - """ - - timeout: str - """ - timeout is the maximum duration allowed for a prebuild to complete. If not - specified, defaults to 1 hour. Must be between 5 minutes and 2 hours. - """ - - trigger: Trigger - """trigger defines when prebuilds should be created on newly created projects.""" diff --git a/tests/api_resources/organizations/test_policies.py b/tests/api_resources/organizations/test_policies.py index fa0e6a6d..93ae13b8 100644 --- a/tests/api_resources/organizations/test_policies.py +++ b/tests/api_resources/organizations/test_policies.py @@ -94,33 +94,6 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, - project_creation_defaults={ - "environment_classes": [ - { - "environment_class_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "order": 0, - "prebuild": True, - "warm_pool": { - "enabled": True, - "max_size": 20, - "min_size": 20, - }, - } - ], - "insights_enabled": True, - "prebuilds": { - "disabled": {}, - "enabled": { - "enable_jetbrains_warmup": True, - "prebuild_executor": { - "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "principal": "PRINCIPAL_UNSPECIFIED", - }, - "timeout": "+9125115.360s", - "trigger": {"daily_schedule": {"hour_utc": 23}}, - }, - }, - }, require_custom_domain_access=True, restrict_account_creation_to_scim=True, security_agent_policy={ @@ -249,33 +222,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> members_create_projects=True, members_require_projects=True, port_sharing_disabled=True, - project_creation_defaults={ - "environment_classes": [ - { - "environment_class_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "order": 0, - "prebuild": True, - "warm_pool": { - "enabled": True, - "max_size": 20, - "min_size": 20, - }, - } - ], - "insights_enabled": True, - "prebuilds": { - "disabled": {}, - "enabled": { - "enable_jetbrains_warmup": True, - "prebuild_executor": { - "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "principal": "PRINCIPAL_UNSPECIFIED", - }, - "timeout": "+9125115.360s", - "trigger": {"daily_schedule": {"hour_utc": 23}}, - }, - }, - }, require_custom_domain_access=True, restrict_account_creation_to_scim=True, security_agent_policy={ From 4c85dc3d03aed2e9ae0b35a325c6a821f25a7956 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 14:41:22 +0000 Subject: [PATCH 162/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index dcf4fb48..55337c72 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-fb78b1db14b13c6584c38f9e515b274f950e60e3804d166e278d00ce8a722044.yml -openapi_spec_hash: 1a34266c11173bd10620549625fd673a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7ff6e5c64e9b803afc1c11edfc8f018b47ebe492652b05679c3a21946026f462.yml +openapi_spec_hash: 34d43b6ce91cff2c35e37f039292230d config_hash: 0c540edd1281d4322f050c73da39358d From d28fbf06fe421ebc05ca4b78eae643ba67599afa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Jun 2026 07:25:18 +0000 Subject: [PATCH 163/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 55337c72..b49bca3a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7ff6e5c64e9b803afc1c11edfc8f018b47ebe492652b05679c3a21946026f462.yml -openapi_spec_hash: 34d43b6ce91cff2c35e37f039292230d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-86727b0dfd72051a0871489e1ed77d45683c04b8298394e30b32b4849eb75552.yml +openapi_spec_hash: ff28e949ddcaad5ecf4595cd5e33442e config_hash: 0c540edd1281d4322f050c73da39358d From c099969752c118ecf689cab90a60c7a2a4192a55 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 09:58:39 +0000 Subject: [PATCH 164/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b49bca3a..4224aa38 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-86727b0dfd72051a0871489e1ed77d45683c04b8298394e30b32b4849eb75552.yml -openapi_spec_hash: ff28e949ddcaad5ecf4595cd5e33442e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1b60aaefddbde09b7a8000aedb2681cb1b4ff6d715c5bb2c3288893d7f3d41da.yml +openapi_spec_hash: ff20a1c61dcd299a50ac7f30356e119f config_hash: 0c540edd1281d4322f050c73da39358d From 0d1098056409fc5959055788751a087275c88800 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 08:43:25 +0000 Subject: [PATCH 165/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4224aa38..38ba0656 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1b60aaefddbde09b7a8000aedb2681cb1b4ff6d715c5bb2c3288893d7f3d41da.yml -openapi_spec_hash: ff20a1c61dcd299a50ac7f30356e119f -config_hash: 0c540edd1281d4322f050c73da39358d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-e8923b3e2c79a572d02540b6487796cb5bff9dc6749bd95d538cee8e505c407d.yml +openapi_spec_hash: cadee014d15b4ca0cd8356cf83fc26b3 +config_hash: e3753b3181bcabb16888fc9674ccac12 From 48c25259ac12948210e274fd209bc7c58ef5a021 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 10:07:19 +0000 Subject: [PATCH 166/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 38ba0656..34132292 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-e8923b3e2c79a572d02540b6487796cb5bff9dc6749bd95d538cee8e505c407d.yml -openapi_spec_hash: cadee014d15b4ca0cd8356cf83fc26b3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ed74befc87b631ac886933c7ed52f00ca4dd459f387cece102a664a040412f0e.yml +openapi_spec_hash: ef68069e12097771d51dea0e02423206 config_hash: e3753b3181bcabb16888fc9674ccac12 From 5212e62525fb34e76e4e7b2714ddf5040e7eb6bb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 11:22:07 +0000 Subject: [PATCH 167/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 34132292..071b8077 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ed74befc87b631ac886933c7ed52f00ca4dd459f387cece102a664a040412f0e.yml -openapi_spec_hash: ef68069e12097771d51dea0e02423206 -config_hash: e3753b3181bcabb16888fc9674ccac12 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-93d6d2709b136f91b41ca2e45677576784037ceb6a39f0b7da9d79a803345d19.yml +openapi_spec_hash: 8b8eaadad9f57ff9c719d9446413020e +config_hash: bae55ff40fd6ad3203d15b18b0c41e4b From d6de0e9eade304d3b9ca8cc4c12aaa1055f19021 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 09:26:15 +0000 Subject: [PATCH 168/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 071b8077..3058068c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-93d6d2709b136f91b41ca2e45677576784037ceb6a39f0b7da9d79a803345d19.yml -openapi_spec_hash: 8b8eaadad9f57ff9c719d9446413020e -config_hash: bae55ff40fd6ad3203d15b18b0c41e4b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-2615ad629071297ee75e9cf2c5d7b986e87159699cfc3e47922d0764af69cd23.yml +openapi_spec_hash: b189a5067c776078c06b00d2748b6e64 +config_hash: f77c19d800aa2a6be5550c07bce1491f From 73ea0696fe48ad35bf58b082ecb774c2bfb14a36 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 18:01:57 +0000 Subject: [PATCH 169/211] feat(api): add Claude Sonnet 5 model enum --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3058068c..922d5e2d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-2615ad629071297ee75e9cf2c5d7b986e87159699cfc3e47922d0764af69cd23.yml -openapi_spec_hash: b189a5067c776078c06b00d2748b6e64 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f2b518423f3ef9d8526477693e7d081298dd814e76f8008b510ccc924c3ee338.yml +openapi_spec_hash: 2a58304e8db6286b2238c242ef0b63be config_hash: f77c19d800aa2a6be5550c07bce1491f From 36c22b9da5761fc322313327d5cef69c0a7ea089 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 07:41:08 +0000 Subject: [PATCH 170/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 922d5e2d..4aab4f4a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f2b518423f3ef9d8526477693e7d081298dd814e76f8008b510ccc924c3ee338.yml -openapi_spec_hash: 2a58304e8db6286b2238c242ef0b63be -config_hash: f77c19d800aa2a6be5550c07bce1491f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-40dec3ed78d116933ab7293c0d1a59d7dc8694b3cd9c3a476325fff5ca89632c.yml +openapi_spec_hash: dee0e4ed5ac28501d5561a0689415659 +config_hash: d4513f249bc9420b9665574cd0ccacac From 4a3c3b02adb600bb935fc451d3cdcb22c57997e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 08:32:46 +0000 Subject: [PATCH 171/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4aab4f4a..2ccf6705 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-40dec3ed78d116933ab7293c0d1a59d7dc8694b3cd9c3a476325fff5ca89632c.yml -openapi_spec_hash: dee0e4ed5ac28501d5561a0689415659 -config_hash: d4513f249bc9420b9665574cd0ccacac +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9a9a2e273027ece0b2cac151e688fca19b4406e1b4ce95f8dbc704df192f77e0.yml +openapi_spec_hash: 8038ed07de3aebdf35a2c6d66be23586 +config_hash: 5b00c2b0b6ee5cb81c9704b8519bb01f From 30a5c4dec78e8eaaaf2b087682da8d6ac60838b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 08:48:12 +0000 Subject: [PATCH 172/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2ccf6705..0d866a22 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9a9a2e273027ece0b2cac151e688fca19b4406e1b4ce95f8dbc704df192f77e0.yml -openapi_spec_hash: 8038ed07de3aebdf35a2c6d66be23586 -config_hash: 5b00c2b0b6ee5cb81c9704b8519bb01f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c681204ea76fe13060c06b06bcf196cdc2f5c33459f1b41baabe3d8f7425bd79.yml +openapi_spec_hash: fc14a1ac0b08e96e9daa120b8b8dfede +config_hash: 9ffe57b90bac62dbe8e3a446c2efe52c From b1b0d40cc4e37d66d2d84ae913fb67044db8fb1d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 10:24:48 +0000 Subject: [PATCH 173/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0d866a22..23bc8f83 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c681204ea76fe13060c06b06bcf196cdc2f5c33459f1b41baabe3d8f7425bd79.yml -openapi_spec_hash: fc14a1ac0b08e96e9daa120b8b8dfede -config_hash: 9ffe57b90bac62dbe8e3a446c2efe52c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-5cad0f275c1e86100d23aaabd0af4a55daf37fa6a62300ae645690417823128b.yml +openapi_spec_hash: 90d0a0358e85c320d83d3438ef9af03f +config_hash: 872108c24dfc19350420e42484bb5b86 From 48f5cba320078745e73950a4542a08e5ce4b1dc1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:17:11 +0000 Subject: [PATCH 174/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 23bc8f83..ec38a47a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-5cad0f275c1e86100d23aaabd0af4a55daf37fa6a62300ae645690417823128b.yml -openapi_spec_hash: 90d0a0358e85c320d83d3438ef9af03f -config_hash: 872108c24dfc19350420e42484bb5b86 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9b8e3509635aaabda0afd0ac93bfc434a98cdaee183ca48a7e6b2225a3f9d6a8.yml +openapi_spec_hash: cdde99f22c3be7fc234fc4dbf7e92856 +config_hash: 8ee4af19c533f3db56a88542b5ed445a From c7e6921ffa2dfa33f115ad9d2ecc723aaccc5d10 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 18:08:30 +0000 Subject: [PATCH 175/211] feat(api): expose usage insights API --- .stats.yml | 8 ++++---- api.md | 1 + src/gitpod/types/date_range_param.py | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 src/gitpod/types/date_range_param.py diff --git a/.stats.yml b/.stats.yml index ec38a47a..140be810 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9b8e3509635aaabda0afd0ac93bfc434a98cdaee183ca48a7e6b2225a3f9d6a8.yml -openapi_spec_hash: cdde99f22c3be7fc234fc4dbf7e92856 -config_hash: 8ee4af19c533f3db56a88542b5ed445a +configured_endpoints: 200 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-32c8a8a79d52492dada06fc6e2347700f499d3db0f7e0cc391281ae39ebfb7f8.yml +openapi_spec_hash: 04e5e76a2efc31d7e41c7d056afc79f5 +config_hash: 1d6a16d82de62d5b52a4956781b7cf1d diff --git a/api.md b/api.md index 43258222..16c45c64 100644 --- a/api.md +++ b/api.md @@ -922,6 +922,7 @@ from gitpod.types import ( CoAuthorSummary, CoAuthorTimeBucket, CoAuthorTool, + DateRange, EnvironmentUsageRecord, PrSummary, PrTimeBucket, diff --git a/src/gitpod/types/date_range_param.py b/src/gitpod/types/date_range_param.py new file mode 100644 index 00000000..a65a77b1 --- /dev/null +++ b/src/gitpod/types/date_range_param.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["DateRangeParam"] + + +class DateRangeParam(TypedDict, total=False): + """DateRange specifies a time period for queries.""" + + end_time: Required[Annotated[Union[str, datetime], PropertyInfo(alias="endTime", format="iso8601")]] + """End time of the date range (exclusive).""" + + start_time: Required[Annotated[Union[str, datetime], PropertyInfo(alias="startTime", format="iso8601")]] + """Start time of the date range (inclusive).""" From 315f4ffea3e7d68c45dec05bb176deeb444cc3a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 08:36:30 +0000 Subject: [PATCH 176/211] feat(codex): add GPT-5.6 model selection --- .stats.yml | 8 ++++---- api.md | 1 - src/gitpod/types/date_range_param.py | 21 --------------------- 3 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 src/gitpod/types/date_range_param.py diff --git a/.stats.yml b/.stats.yml index 140be810..2c2ed740 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 200 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-32c8a8a79d52492dada06fc6e2347700f499d3db0f7e0cc391281ae39ebfb7f8.yml -openapi_spec_hash: 04e5e76a2efc31d7e41c7d056afc79f5 -config_hash: 1d6a16d82de62d5b52a4956781b7cf1d +configured_endpoints: 208 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-17ee0d1ff7d1e35bc96fcb5fd9c5512e283c68d2654d9f3eee6a9e82d4220b8b.yml +openapi_spec_hash: 99e7d41add40d4c19027984553b08436 +config_hash: 625a1b297a3260ef885e9d30664e2b37 diff --git a/api.md b/api.md index 16c45c64..43258222 100644 --- a/api.md +++ b/api.md @@ -922,7 +922,6 @@ from gitpod.types import ( CoAuthorSummary, CoAuthorTimeBucket, CoAuthorTool, - DateRange, EnvironmentUsageRecord, PrSummary, PrTimeBucket, diff --git a/src/gitpod/types/date_range_param.py b/src/gitpod/types/date_range_param.py deleted file mode 100644 index a65a77b1..00000000 --- a/src/gitpod/types/date_range_param.py +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Required, Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["DateRangeParam"] - - -class DateRangeParam(TypedDict, total=False): - """DateRange specifies a time period for queries.""" - - end_time: Required[Annotated[Union[str, datetime], PropertyInfo(alias="endTime", format="iso8601")]] - """End time of the date range (exclusive).""" - - start_time: Required[Annotated[Union[str, datetime], PropertyInfo(alias="startTime", format="iso8601")]] - """Start time of the date range (inclusive).""" From dd050b8d5b88e704165493fe5ef6214669ab6503 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 09:11:59 +0000 Subject: [PATCH 177/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2c2ed740..fbcf46f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-17ee0d1ff7d1e35bc96fcb5fd9c5512e283c68d2654d9f3eee6a9e82d4220b8b.yml -openapi_spec_hash: 99e7d41add40d4c19027984553b08436 -config_hash: 625a1b297a3260ef885e9d30664e2b37 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3606af73286596766e0b78e14dbe36a4ec225fee946d4a9434dc224db17632c6.yml +openapi_spec_hash: 8752220a2a767670d99f8c5ab16ecc85 +config_hash: f1ae5dd53f0c88c2da2172e640c9114d From 5c832059d14eeb0b7005a7be67dc169a8bafbdfe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 11:17:24 +0000 Subject: [PATCH 178/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index fbcf46f5..9938a977 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-3606af73286596766e0b78e14dbe36a4ec225fee946d4a9434dc224db17632c6.yml -openapi_spec_hash: 8752220a2a767670d99f8c5ab16ecc85 -config_hash: f1ae5dd53f0c88c2da2172e640c9114d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-6defb7be61701753a41dbdabdd8d88e141ec302e450a612417ed40b3fd74b811.yml +openapi_spec_hash: b499d9d2426b9041678eb2de9d75e78d +config_hash: 4b500989669b80cbffa65f1562c52771 From 8fb4916a2295edfc994502a64fa9188116613096 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:24:35 +0000 Subject: [PATCH 179/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9938a977..ec5eb974 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-6defb7be61701753a41dbdabdd8d88e141ec302e450a612417ed40b3fd74b811.yml -openapi_spec_hash: b499d9d2426b9041678eb2de9d75e78d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-bf6c1a43c7e5416b3f2502592f1e55145a39a55c78dbb3b8f4b20ac0e33b75ca.yml +openapi_spec_hash: 3cacd2fb166edd11c8d29e1d31518b6e config_hash: 4b500989669b80cbffa65f1562c52771 From 0ce4953f9e02f0a031fb963d80817aa795efcae6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 13:51:35 +0000 Subject: [PATCH 180/211] feat(api): add base snapshot build environment role --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ec5eb974..48aa3bab 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-bf6c1a43c7e5416b3f2502592f1e55145a39a55c78dbb3b8f4b20ac0e33b75ca.yml -openapi_spec_hash: 3cacd2fb166edd11c8d29e1d31518b6e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-55849e1f037dc77a58566d2c89f2cf0087e05d646913aa0ff77df5a2a5463c9b.yml +openapi_spec_hash: 070d2d6a9236b28999bcd6ab42a7d89f config_hash: 4b500989669b80cbffa65f1562c52771 From 419e2c05b62cea8946933ff061d197a754f3507c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Jul 2026 14:07:58 +0000 Subject: [PATCH 181/211] feat(secrets): support JFrog OIDC secret sources --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 48aa3bab..4bd7a251 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-55849e1f037dc77a58566d2c89f2cf0087e05d646913aa0ff77df5a2a5463c9b.yml -openapi_spec_hash: 070d2d6a9236b28999bcd6ab42a7d89f -config_hash: 4b500989669b80cbffa65f1562c52771 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-82d64afcfa1049a00f01fb8c93b9c30b4ec57ce274396cdd2497be159f4f147b.yml +openapi_spec_hash: edb6d49b4c7fa12e64fae5a32ec4e42a +config_hash: 68386d375fb1e9e0e37592ebd060b9d0 From 8010e7a89049cfbdb26b49b42c0861a6862c61ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 08:03:25 +0000 Subject: [PATCH 182/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4bd7a251..54ba7a13 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-82d64afcfa1049a00f01fb8c93b9c30b4ec57ce274396cdd2497be159f4f147b.yml -openapi_spec_hash: edb6d49b4c7fa12e64fae5a32ec4e42a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-2cbf405eca77c09f08984e8446bb1e4723163c31878bf7fadc1c93beaeb8a541.yml +openapi_spec_hash: fed72a6aa357cb1a5c321e0710870163 config_hash: 68386d375fb1e9e0e37592ebd060b9d0 From 629efa54b565840274d89bbb4fa225c934174f1e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 09:04:23 +0000 Subject: [PATCH 183/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 54ba7a13..4492c441 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-2cbf405eca77c09f08984e8446bb1e4723163c31878bf7fadc1c93beaeb8a541.yml -openapi_spec_hash: fed72a6aa357cb1a5c321e0710870163 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-0b96eb1756135783a7de005b79fc24c3388a70c5673adf3de7d782de3ebd0277.yml +openapi_spec_hash: b39e9887d75e51613fa1473b6af58846 config_hash: 68386d375fb1e9e0e37592ebd060b9d0 From 2c9855c295b2a6deab6707a2b24387225a4ecf10 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 18:11:30 +0000 Subject: [PATCH 184/211] feat(api): add base snapshot runner capability --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4492c441..fcbd2d47 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-0b96eb1756135783a7de005b79fc24c3388a70c5673adf3de7d782de3ebd0277.yml -openapi_spec_hash: b39e9887d75e51613fa1473b6af58846 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7ccb73cea7ab2bf1fa0e6206b8df1634e7eb06281658e44b07a0f01774ac260e.yml +openapi_spec_hash: 06cd7d3a5e9f8ca553daf98a6b9a513f config_hash: 68386d375fb1e9e0e37592ebd060b9d0 From f930e3c6346d8109a3e598a1720e1bfb08de130e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 06:47:28 +0000 Subject: [PATCH 185/211] feat(api): add codex model policy states --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index fcbd2d47..5e632de0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7ccb73cea7ab2bf1fa0e6206b8df1634e7eb06281658e44b07a0f01774ac260e.yml -openapi_spec_hash: 06cd7d3a5e9f8ca553daf98a6b9a513f -config_hash: 68386d375fb1e9e0e37592ebd060b9d0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-aab089baa7f95456da658a0c913d29e9825c3f8783c8cc5318e37b0af9e71bf6.yml +openapi_spec_hash: 5cc13d99239c341e59c63cde700606ff +config_hash: 54a2464546fb2664da69602e71358c39 From 07c1df29ad36a801725c4950cef428a12441ff4f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 11:28:08 +0000 Subject: [PATCH 186/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5e632de0..835a88fe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-aab089baa7f95456da658a0c913d29e9825c3f8783c8cc5318e37b0af9e71bf6.yml -openapi_spec_hash: 5cc13d99239c341e59c63cde700606ff +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c066eb27e2526841bc16cf395786de2710a7b030eb177aaaf4cd3998c91dbb33.yml +openapi_spec_hash: df6f11161d0e767997a5bebd11f6347e config_hash: 54a2464546fb2664da69602e71358c39 From 86bc2ef04924b9c3b778263cf7c8c2f91d48def0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 14:10:53 +0000 Subject: [PATCH 187/211] feat: add base snapshot resource types --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 835a88fe..45be9ec3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c066eb27e2526841bc16cf395786de2710a7b030eb177aaaf4cd3998c91dbb33.yml -openapi_spec_hash: df6f11161d0e767997a5bebd11f6347e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-57858a53e83ca9b390b843be2d90ebae2d21397efa6f785b8790805e69587096.yml +openapi_spec_hash: bc761733eefaa0aef20e271e08bab77f config_hash: 54a2464546fb2664da69602e71358c39 From 3d7bec09370de72dec4a1300afcbdb955f65a98d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 07:25:43 +0000 Subject: [PATCH 188/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 45be9ec3..ef9d655d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-57858a53e83ca9b390b843be2d90ebae2d21397efa6f785b8790805e69587096.yml -openapi_spec_hash: bc761733eefaa0aef20e271e08bab77f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1930f175ceed1a59f1fffe60195f5840ec2b438146ef3f43d962f906fa33f62d.yml +openapi_spec_hash: 6f57a1e5eef63819ebdc75d5a9f2d5e2 config_hash: 54a2464546fb2664da69602e71358c39 From bc2295df634bde6b3f8ed2b6647f0a175e672527 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 08:15:44 +0000 Subject: [PATCH 189/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ef9d655d..db1fcc0a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1930f175ceed1a59f1fffe60195f5840ec2b438146ef3f43d962f906fa33f62d.yml -openapi_spec_hash: 6f57a1e5eef63819ebdc75d5a9f2d5e2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9b7ac4eeeb994fcb49e8d3b252082581d03b9e634e2c928ef8773f1e77076ade.yml +openapi_spec_hash: aaa6829e6178cbdad421cedc72c610b5 config_hash: 54a2464546fb2664da69602e71358c39 From df5a5bc8c4f7c1b2550802a91ee648623af5a743 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:05:56 +0000 Subject: [PATCH 190/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index db1fcc0a..855ee1a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-9b7ac4eeeb994fcb49e8d3b252082581d03b9e634e2c928ef8773f1e77076ade.yml -openapi_spec_hash: aaa6829e6178cbdad421cedc72c610b5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-70758f929116c99d1b718b87337ab53b60a5a3fe08ccc0e09aafbf966b574ed3.yml +openapi_spec_hash: edbd99c5205111ce8ead449718184f37 config_hash: 54a2464546fb2664da69602e71358c39 From d90ec8f9bdfd15d61cb8226a5c3716f6dbccf346 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 18:15:33 +0000 Subject: [PATCH 191/211] feat(api): expose audit log entry kind --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 855ee1a8..6e73364e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-70758f929116c99d1b718b87337ab53b60a5a3fe08ccc0e09aafbf966b574ed3.yml -openapi_spec_hash: edbd99c5205111ce8ead449718184f37 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-fd66f2e81aa69c4f641455d0c0a0445dd1d19044d4df4e9836f8a4c46fc9dc6f.yml +openapi_spec_hash: 28370b91b0a88436db1be3e889572d06 config_hash: 54a2464546fb2664da69602e71358c39 From 07e4ed5e9cd7eeeab9269339a877f3cac37e407f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 Jul 2026 16:51:46 +0000 Subject: [PATCH 192/211] feat(api): expose Veto Exec security policies --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6e73364e..4fd773bc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 208 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-fd66f2e81aa69c4f641455d0c0a0445dd1d19044d4df4e9836f8a4c46fc9dc6f.yml +configured_endpoints: 213 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b1e68173fb6d6d5724b044c11054fe52886b4df5a28fa9cfb3012bb98029b8a0.yml openapi_spec_hash: 28370b91b0a88436db1be3e889572d06 -config_hash: 54a2464546fb2664da69602e71358c39 +config_hash: ebf0825535f3d05be92a8814930ca9df From aeb8cba53564aa4062127a0534fedbdb81ab15d2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 Jul 2026 17:02:01 +0000 Subject: [PATCH 193/211] feat(api): expose default security policy assignment --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4fd773bc..8e4ecc98 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b1e68173fb6d6d5724b044c11054fe52886b4df5a28fa9cfb3012bb98029b8a0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f359c240635fc35a9810360e33e447a9fe8af2637b3cd788f123272b2154e786.yml openapi_spec_hash: 28370b91b0a88436db1be3e889572d06 -config_hash: ebf0825535f3d05be92a8814930ca9df +config_hash: 481cfd18a4cc1f344e00e305f997e11f From fe80d0bf0acc61f80bd3d1291abb45778334fe15 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 10:24:40 +0000 Subject: [PATCH 194/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8e4ecc98..b3e2d7f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f359c240635fc35a9810360e33e447a9fe8af2637b3cd788f123272b2154e786.yml -openapi_spec_hash: 28370b91b0a88436db1be3e889572d06 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-24893849d38df97a61aed4cfc51cc1ccb02ffe04bce81f7c2729fb83f674b07b.yml +openapi_spec_hash: 1d5d5bcc8887fd90c486068397a068c6 config_hash: 481cfd18a4cc1f344e00e305f997e11f From fdfe7990c99092554084254169470a363a063577 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 15:07:40 +0000 Subject: [PATCH 195/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b3e2d7f8..5460f0b4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-24893849d38df97a61aed4cfc51cc1ccb02ffe04bce81f7c2729fb83f674b07b.yml -openapi_spec_hash: 1d5d5bcc8887fd90c486068397a068c6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7c3bd972fce7c2fee22fe452c2507d2b11c2f0ea3fd64887868922d8bb9bbd57.yml +openapi_spec_hash: bebe3ec887e14428a3fec846651061aa config_hash: 481cfd18a4cc1f344e00e305f997e11f From c6adc6a24a2806587598ad260e059e1631c89602 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 18:17:45 +0000 Subject: [PATCH 196/211] feat(audit): store and retrieve Veto Exec details --- .stats.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5460f0b4..52f5dfc1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-7c3bd972fce7c2fee22fe452c2507d2b11c2f0ea3fd64887868922d8bb9bbd57.yml -openapi_spec_hash: bebe3ec887e14428a3fec846651061aa -config_hash: 481cfd18a4cc1f344e00e305f997e11f +configured_endpoints: 214 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8cfda97ea079894efb7509739d980aa5076912123730d83b8b7c74576d19272a.yml +openapi_spec_hash: 651559b651300a5b09a9ea4452b2eced +config_hash: acab35733d5c229251b411acbcb4ce23 From 502bdfeec327cd8fabf6fa957b1dd6dc77ce5df9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 06:44:11 +0000 Subject: [PATCH 197/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 52f5dfc1..0e40a0c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8cfda97ea079894efb7509739d980aa5076912123730d83b8b7c74576d19272a.yml -openapi_spec_hash: 651559b651300a5b09a9ea4452b2eced +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-d6d413db3a1af83aa526ebabd1701ce2b5b659a3406be0f7a132b834fbffe08b.yml +openapi_spec_hash: 0f502a6a0ef0364f751e407097d46545 config_hash: acab35733d5c229251b411acbcb4ce23 From d317c5682a24c4cc8b36bbbd965e3854c2ffd3f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:10:50 +0000 Subject: [PATCH 198/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0e40a0c5..a5ede918 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-d6d413db3a1af83aa526ebabd1701ce2b5b659a3406be0f7a132b834fbffe08b.yml -openapi_spec_hash: 0f502a6a0ef0364f751e407097d46545 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-db9c890b538d7e76709f8dcee2b1f507e13fa1a817e6ac25f9284aaeb1dbd6af.yml +openapi_spec_hash: 9656b290dc9129ea3e41f21213e6313f config_hash: acab35733d5c229251b411acbcb4ce23 From 9540f305ccd77c99b210df007158358ae261c5d1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:35:20 +0000 Subject: [PATCH 199/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index a5ede918..07cb9027 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-db9c890b538d7e76709f8dcee2b1f507e13fa1a817e6ac25f9284aaeb1dbd6af.yml -openapi_spec_hash: 9656b290dc9129ea3e41f21213e6313f -config_hash: acab35733d5c229251b411acbcb4ce23 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8e418ac4948bbea8baa4ef05200db250ad0cb2d8a11823fb87e15a21df1b099e.yml +openapi_spec_hash: bed706b2aa19e2898a389c7dbbe0e2f0 +config_hash: 007ca3e487b4003ec5a041b0a45ed627 From dcc29163a6eaaee6a2f74a5b0a20f5406183f811 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 15:44:08 +0000 Subject: [PATCH 200/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 07cb9027..61a42b25 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-8e418ac4948bbea8baa4ef05200db250ad0cb2d8a11823fb87e15a21df1b099e.yml -openapi_spec_hash: bed706b2aa19e2898a389c7dbbe0e2f0 -config_hash: 007ca3e487b4003ec5a041b0a45ed627 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b0906d1a40928898bdd66de43d5bba949b412cc90f49eb5eec0a7a225c8f29d1.yml +openapi_spec_hash: f753f6eafd031aeaaa96b4e8465ed118 +config_hash: 96fd0665ecc1a931d7599e9f9afba778 From a8ed90f74513a4a39abbbfa70d94faf488f59524 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 18:10:28 +0000 Subject: [PATCH 201/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 61a42b25..027c9f9c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b0906d1a40928898bdd66de43d5bba949b412cc90f49eb5eec0a7a225c8f29d1.yml -openapi_spec_hash: f753f6eafd031aeaaa96b4e8465ed118 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-e640ebdbdf589ce3d21bc0cc45ea9ec35585890d4ee84f978c95c30169dd66fd.yml +openapi_spec_hash: 76077cd827b2797d5eced346a2100df0 config_hash: 96fd0665ecc1a931d7599e9f9afba778 From 6520bd48832e6063cda12b6a0354586b79619ec7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Jul 2026 13:45:15 +0000 Subject: [PATCH 202/211] feat(api): add dynamic LLM header contracts --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 027c9f9c..fb034e4a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-e640ebdbdf589ce3d21bc0cc45ea9ec35585890d4ee84f978c95c30169dd66fd.yml -openapi_spec_hash: 76077cd827b2797d5eced346a2100df0 -config_hash: 96fd0665ecc1a931d7599e9f9afba778 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-58ad260cee63f6a84c2601ddd5ab5f8e6b34214f6e25a1da9b39c251bca65077.yml +openapi_spec_hash: d862054d174f2a562fda066627e0808b +config_hash: ac729c1d23fd372feea59b192f3d515f From d2c70e8ae695932210bf2b8df19d64bfc6017ed3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 10:03:41 +0000 Subject: [PATCH 203/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index fb034e4a..c621c5a0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-58ad260cee63f6a84c2601ddd5ab5f8e6b34214f6e25a1da9b39c251bca65077.yml -openapi_spec_hash: d862054d174f2a562fda066627e0808b -config_hash: ac729c1d23fd372feea59b192f3d515f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c9946c807492496ae0a03b53f07e348d8b6c7d5a52524adb69fb044febcf720d.yml +openapi_spec_hash: 7d7f93af3f1ae5800cd3ff7929196f3f +config_hash: 7bde6b67806ad4aaa884288e51478c7c From edcc53eb70f965a5bddb621130d1c7195467f171 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 11:11:33 +0000 Subject: [PATCH 204/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c621c5a0..ba9caf13 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-c9946c807492496ae0a03b53f07e348d8b6c7d5a52524adb69fb044febcf720d.yml -openapi_spec_hash: 7d7f93af3f1ae5800cd3ff7929196f3f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-4c8c9f2c37e8f0489718833c5a6db163d6e34d4ecf7773f10e44ee2a44ea9811.yml +openapi_spec_hash: 5396e48bb2098486b088a3055fb6e736 config_hash: 7bde6b67806ad4aaa884288e51478c7c From d02978d798970b41c857fcccd8678c5f7796b65a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 13:57:13 +0000 Subject: [PATCH 205/211] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index ba9caf13..c58cd93c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-4c8c9f2c37e8f0489718833c5a6db163d6e34d4ecf7773f10e44ee2a44ea9811.yml -openapi_spec_hash: 5396e48bb2098486b088a3055fb6e736 -config_hash: 7bde6b67806ad4aaa884288e51478c7c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b1e62175e482a5f1f5946e0516e64b60b88960200cdf84e19abd4050fea3a529.yml +openapi_spec_hash: 7d1a0d5b4b1960c05824b0b1f1fd345a +config_hash: 984f1ec840e3430a6982fd9c7efbaaa9 From f98aa9bc587bb217bd5ecf1148538d7c34ee3d75 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 26 Jul 2026 15:20:27 +0000 Subject: [PATCH 206/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c58cd93c..e5c45a1c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b1e62175e482a5f1f5946e0516e64b60b88960200cdf84e19abd4050fea3a529.yml -openapi_spec_hash: 7d1a0d5b4b1960c05824b0b1f1fd345a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-de30a17cda83ec65334e818e9f7a15611e1754bcad74914aa1f1c98ea0c581bb.yml +openapi_spec_hash: 823a0488c6b1a555337008a5178a3d30 config_hash: 984f1ec840e3430a6982fd9c7efbaaa9 From ae9adef6ef0154723b608d3a1035491e3620f882 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 14:34:25 +0000 Subject: [PATCH 207/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e5c45a1c..7b620265 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-de30a17cda83ec65334e818e9f7a15611e1754bcad74914aa1f1c98ea0c581bb.yml -openapi_spec_hash: 823a0488c6b1a555337008a5178a3d30 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-dd59314bf0bc857967ac9df684b74d3d36fc0db287f78874d7610f988811d18a.yml +openapi_spec_hash: e935049f7e38283fac58c61426de5443 config_hash: 984f1ec840e3430a6982fd9c7efbaaa9 From f54fb4af5721608ece6eeda2357da0c87da923be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:24:18 +0000 Subject: [PATCH 208/211] feat(audit): curate audit events at their producers --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7b620265..e734aa55 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-dd59314bf0bc857967ac9df684b74d3d36fc0db287f78874d7610f988811d18a.yml -openapi_spec_hash: e935049f7e38283fac58c61426de5443 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1cca2076fd084bb8a43c420f320ac67a8918011dc35986190183a71fb3938025.yml +openapi_spec_hash: 98a55c1d6670cd01707f54526dd06b0d config_hash: 984f1ec840e3430a6982fd9c7efbaaa9 From ea4f4945c420a6aa4f5b988f4db714c725f3771a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2026 17:45:53 +0000 Subject: [PATCH 209/211] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e734aa55..ee42f548 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-1cca2076fd084bb8a43c420f320ac67a8918011dc35986190183a71fb3938025.yml -openapi_spec_hash: 98a55c1d6670cd01707f54526dd06b0d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-68c89d89f13a22485463d3a2f1e9c721030d7dfd495e8ae4a7c1cb54a90a223c.yml +openapi_spec_hash: 7e5f97272b0e6084c78845f8c7e7e851 config_hash: 984f1ec840e3430a6982fd9c7efbaaa9 From 97913bf54c101cce3026b8fec0d1afde1f9d0c0d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 16:19:22 +0000 Subject: [PATCH 210/211] fix(api)!: narrow public SDK surface --- .stats.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index ee42f548..83150193 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-68c89d89f13a22485463d3a2f1e9c721030d7dfd495e8ae4a7c1cb54a90a223c.yml -openapi_spec_hash: 7e5f97272b0e6084c78845f8c7e7e851 -config_hash: 984f1ec840e3430a6982fd9c7efbaaa9 +configured_endpoints: 213 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-f8271fd3c90de2edf4e8e63bce296f295fb8e54c0522b4d159d1d1f33a902474.yml +openapi_spec_hash: fb7b7d87dc232de2b141c5cc57d16fd1 +config_hash: 3d1af35edc400f59127c3b02ca3ab0ec From 3551971ac5af903b1bb86b1790841718941740dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2026 18:22:25 +0000 Subject: [PATCH 211/211] release: 0.12.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 102 ++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- src/gitpod/_version.py | 2 +- 4 files changed, 105 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7014c35..a7130553 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.11.0" + ".": "0.12.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ddc444e4..22f59ad3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,107 @@ # Changelog +## 0.12.0 (2026-07-30) + +Full Changelog: [v0.11.0...v0.12.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.11.0...v0.12.0) + +### ⚠ BREAKING CHANGES + +* **api:** narrow public SDK surface +* **agent:** remove loop condition mechanism + +### Features + +* add base snapshot resource types ([86bc2ef](https://github.com/gitpod-io/gitpod-sdk-python/commit/86bc2ef04924b9c3b778263cf7c8c2f91d48def0)) +* **agent:** add devcontainer rebuild wait schema ([0cf6575](https://github.com/gitpod-io/gitpod-sdk-python/commit/0cf6575388a08e93a3e77bfd29c21b0cde3fc1b8)) +* **agents:** add native goal set control ([09bcc43](https://github.com/gitpod-io/gitpod-sdk-python/commit/09bcc435a18e00c8690c7106dbe453c3d8fa7a08)) +* **api:** add access_token field to runner create response models ([957eb60](https://github.com/gitpod-io/gitpod-sdk-python/commit/957eb60ea90eb7ed188da2cbfb0cd43838b0affd)) +* **api:** add agent turn controls ([0c7f633](https://github.com/gitpod-io/gitpod-sdk-python/commit/0c7f633f5ac848e21a39639c8952a8f53d5037fa)) +* **api:** add AGENT_EXECUTION_CNF capability to RunnerCapability ([3a521b2](https://github.com/gitpod-io/gitpod-sdk-python/commit/3a521b2a8292e6351117379a4c0c5d6e82e592cc)) +* **api:** add agent_execution_ids filter to agents list_executions ([630d438](https://github.com/gitpod-io/gitpod-sdk-python/commit/630d438761b409a15283932124a24e16b4221828)) +* **api:** add allow_unverified_email_scim_fallback_match to scim_configurations ([e1bba76](https://github.com/gitpod-io/gitpod-sdk-python/commit/e1bba7667f79b870c55096a00f18032bda03a65d)) +* **api:** add base snapshot build environment role ([0ce4953](https://github.com/gitpod-io/gitpod-sdk-python/commit/0ce4953f9e02f0a031fb963d80817aa795efcae6)) +* **api:** add base snapshot runner capability ([2c9855c](https://github.com/gitpod-io/gitpod-sdk-python/commit/2c9855c295b2a6deab6707a2b24387225a4ecf10)) +* **api:** add Claude Sonnet 5 model enum ([73ea069](https://github.com/gitpod-io/gitpod-sdk-python/commit/73ea0696fe48ad35bf58b082ecb774c2bfb14a36)) +* **api:** add Codex agent settings shape ([8d830ce](https://github.com/gitpod-io/gitpod-sdk-python/commit/8d830ce28b966c506ad9b63b0f28891226a4150a)) +* **api:** add Codex fast mode setting ([5c7ef6c](https://github.com/gitpod-io/gitpod-sdk-python/commit/5c7ef6ce126d085d5a743b7a24beed4ba99395ab)) +* **api:** add codex model policy states ([f930e3c](https://github.com/gitpod-io/gitpod-sdk-python/commit/f930e3c6346d8109a3e598a1720e1bfb08de130e)) +* **api:** add Codex policy allowlists ([4594b02](https://github.com/gitpod-io/gitpod-sdk-python/commit/4594b0296008ed2866917bba226a9fb2e08ede63)) +* **api:** add credential_proxy to secrets, remove format from environment spec ([349a1ba](https://github.com/gitpod-io/gitpod-sdk-python/commit/349a1bab3893da2900dad96fe92213c0d79c3c92)) +* **api:** add default environment class IDs to project creation defaults ([212b6b2](https://github.com/gitpod-io/gitpod-sdk-python/commit/212b6b2c408910da0b1e414428d310a32552b47a)) +* **api:** add disable_from_scratch to organizations policies ([916c70f](https://github.com/gitpod-io/gitpod-sdk-python/commit/916c70f870b5492fe5b6c117459d88cb7cb9c46f)) +* **api:** add dynamic LLM header contracts ([6520bd4](https://github.com/gitpod-io/gitpod-sdk-python/commit/6520bd48832e6063cda12b6a0354586b79619ec7)) +* **api:** add incident trigger support to workflow_trigger and workflow_execution ([5e90f8a](https://github.com/gitpod-io/gitpod-sdk-python/commit/5e90f8ae3d12d2acf8f1eaab330b5a9d8a39fea0)) +* **api:** add integration_id field, make webhook_id required in pull_request trigger ([077b662](https://github.com/gitpod-io/gitpod-sdk-python/commit/077b6622dc4e21a2033c8275c46716286a6515b8)) +* **api:** add max_port_admission_level to organizations policies ([4942a70](https://github.com/gitpod-io/gitpod-sdk-python/commit/4942a703b999261d0b0935f4db63e76c8db5d103)) +* **api:** add old_path field to ContentGitChangedFile ([d79d4d4](https://github.com/gitpod-io/gitpod-sdk-python/commit/d79d4d49ef41a889a81a0d484616fca442849356)) +* **api:** add Opus 4.8 supported model ([386256e](https://github.com/gitpod-io/gitpod-sdk-python/commit/386256e0cd6237eddebe61b4abca2c1e838ad67e)) +* **api:** add pagination and query parameter to runners.list_scm_organizations ([333311a](https://github.com/gitpod-io/gitpod-sdk-python/commit/333311aebaefb657861e2a9f6e8adb0f2abdd4dc)) +* **api:** add port_authentication capability to runner_capability ([c29b095](https://github.com/gitpod-io/gitpod-sdk-python/commit/c29b09596d2d87caaea047e61613a333c2fe4e31)) +* **api:** add prebuild trigger value to environments automations ([af2c44e](https://github.com/gitpod-io/gitpod-sdk-python/commit/af2c44e64fac19bf848c4325e0b39b183c998e74)) +* **api:** add prebuild_requires_success field to TaskSpec ([eccb99f](https://github.com/gitpod-io/gitpod-sdk-python/commit/eccb99f382cbc77c6bfcdc497ba19f23dbb78286)) +* **api:** add project_creation_defaults to organizations policies ([5d8545f](https://github.com/gitpod-io/gitpod-sdk-python/commit/5d8545fa2691bb59b0acf8ca0121300d48349a1e)) +* **api:** add PULL_REQUEST_EVENT_REVIEW_REQUESTED to workflow_trigger events ([242a3ab](https://github.com/gitpod-io/gitpod-sdk-python/commit/242a3ab60ed3580fd9488858727294ed86568ccf)) +* **api:** add readiness_timeout field to service spec types ([8786477](https://github.com/gitpod-io/gitpod-sdk-python/commit/8786477b21152c9040f3281d5b2cb17f3eada5f2)) +* **api:** add RESOURCE_ROLE_ORG_ENVIRONMENTS_READER to resource_role ([e99dc40](https://github.com/gitpod-io/gitpod-sdk-python/commit/e99dc409933596ef561dbd6784e7041d4d64a084)) +* **api:** add RUNNER_CAPABILITY_REDIS_STREAM to RunnerCapability enum ([b1ad5f5](https://github.com/gitpod-io/gitpod-sdk-python/commit/b1ad5f5fa5110c766928bd1be2589b227513d413)) +* **api:** add security policy CRUD ([85d3d46](https://github.com/gitpod-io/gitpod-sdk-python/commit/85d3d46fa1c7a73a1911eaa00e5423c62781662f)) +* **api:** add StatusGoal model and goal field to agent_execution ([3d37569](https://github.com/gitpod-io/gitpod-sdk-python/commit/3d37569f37337919926bbf799e1069aa585eef49)) +* **api:** add SUPPORTED_MODEL_OPENAI_AUTO to agent_execution status ([54503f5](https://github.com/gitpod-io/gitpod-sdk-python/commit/54503f5295a703ee855eac4c11694d2bbe465d13)) +* **api:** add SUPPORTED_MODEL_OPUS_4_7 to agent_execution Status ([74af533](https://github.com/gitpod-io/gitpod-sdk-python/commit/74af5338d7f6447df5a6464a2b2ef893c3bf4f6e)) +* **api:** add UserInputMetadata type ([ea300f4](https://github.com/gitpod-io/gitpod-sdk-python/commit/ea300f4314c14529c02ffec1e38f474d8a426844)) +* **api:** add web_browser_disabled parameter to organizations policies update ([a4a49d6](https://github.com/gitpod-io/gitpod-sdk-python/commit/a4a49d6d122a1e8911331ebfbe1b7bd1ffa9b854)) +* **api:** expose audit log entry kind ([d90ec8f](https://github.com/gitpod-io/gitpod-sdk-python/commit/d90ec8f9bdfd15d61cb8226a5c3716f6dbccf346)) +* **api:** expose default security policy assignment ([aeb8cba](https://github.com/gitpod-io/gitpod-sdk-python/commit/aeb8cba53564aa4062127a0534fedbdb81ab15d2)) +* **api:** expose usage insights API ([c7e6921](https://github.com/gitpod-io/gitpod-sdk-python/commit/c7e6921ffa2dfa33f115ad9d2ecc723aaccc5d10)) +* **api:** expose Veto Exec security policies ([07e4ed5](https://github.com/gitpod-io/gitpod-sdk-python/commit/07e4ed5e9cd7eeeab9269339a877f3cac37e407f)) +* **api:** remove deprecated access_token from runner responses ([003cd7d](https://github.com/gitpod-io/gitpod-sdk-python/commit/003cd7dcac020428985564e76c2bb6e45acd434c)) +* **api:** remove terminal field from RunsOn type ([faca2b2](https://github.com/gitpod-io/gitpod-sdk-python/commit/faca2b27b88f17a759bd91c305e5ea2a856a1e2c)) +* **audit:** curate audit events at their producers ([f54fb4a](https://github.com/gitpod-io/gitpod-sdk-python/commit/f54fb4af5721608ece6eeda2357da0c87da923be)) +* **audit:** store and retrieve Veto Exec details ([c6adc6a](https://github.com/gitpod-io/gitpod-sdk-python/commit/c6adc6a24a2806587598ad260e059e1631c89602)) +* **automations:** pin agent and Codex model per automation ([ce020c9](https://github.com/gitpod-io/gitpod-sdk-python/commit/ce020c9d3c968bff092d0ef3a37a340c306d2268)) +* **codex:** add GPT-5.6 model selection ([315f4ff](https://github.com/gitpod-io/gitpod-sdk-python/commit/315f4ffea3e7d68c45dec05bb176deeb444cc3a3)) +* **internal/types:** support eagerly validating pydantic iterators ([cbf4bac](https://github.com/gitpod-io/gitpod-sdk-python/commit/cbf4bac0498fbc32a85fb3d620ba2d7d551b53d0)) +* **rbac:** add billing viewer role ([64f6c50](https://github.com/gitpod-io/gitpod-sdk-python/commit/64f6c50c4c171f569d40e45adab9c101adcb5916)) +* **rbac:** add insights viewer role ([03c8230](https://github.com/gitpod-io/gitpod-sdk-python/commit/03c82308b65adb3944a401ebd890a1b0cd880954)) +* **secrets:** support JFrog OIDC secret sources ([419e2c0](https://github.com/gitpod-io/gitpod-sdk-python/commit/419e2c05b62cea8946933ff061d197a754f3507c)) +* support setting headers via env ([4e4f3fe](https://github.com/gitpod-io/gitpod-sdk-python/commit/4e4f3fe4d03901b3b63bccd13012197be6cc50ec)) + + +### Bug Fixes + +* **api:** narrow public SDK surface ([97913bf](https://github.com/gitpod-io/gitpod-sdk-python/commit/97913bf54c101cce3026b8fec0d1afde1f9d0c0d)) +* **api:** wrap prebuild default updates ([69a9ca3](https://github.com/gitpod-io/gitpod-sdk-python/commit/69a9ca3ab1f351c3d3e48a85d43d0d33434d0da3)) +* **client:** add missing f-string prefix in file type error message ([9371ec1](https://github.com/gitpod-io/gitpod-sdk-python/commit/9371ec1502be44e4684f8b1e0c7c6d55e8ead8dd)) +* **client:** preserve hardcoded query params when merging with user params ([b7f0b1d](https://github.com/gitpod-io/gitpod-sdk-python/commit/b7f0b1d27ef51872bf81541dd7f81a8101f856af)) +* ensure file data are only sent as 1 parameter ([5c02854](https://github.com/gitpod-io/gitpod-sdk-python/commit/5c02854efdc2874535d3d7867823048d5e8d4693)) +* use correct field name format for multipart file arrays ([c731392](https://github.com/gitpod-io/gitpod-sdk-python/commit/c731392aa36e5a3bba895d4e52a7d50addab326a)) + + +### Performance Improvements + +* **client:** optimize file structure copying in multipart requests ([cb792b6](https://github.com/gitpod-io/gitpod-sdk-python/commit/cb792b633104ff26eb799d8c32703920213ec23e)) + + +### Chores + +* **internal:** more robust bootstrap script ([5f05caa](https://github.com/gitpod-io/gitpod-sdk-python/commit/5f05caacfd1a55617d435845771e28503eff687c)) +* **internal:** reformat pyproject.toml ([b061deb](https://github.com/gitpod-io/gitpod-sdk-python/commit/b061deb38573beb2771beb0dfe92a5c3ba09b9d3)) +* **internal:** regenerate SDK with no functional changes ([2dc3c8d](https://github.com/gitpod-io/gitpod-sdk-python/commit/2dc3c8dbe693a77dc985066501d9bc9afacac347)) + + +### Documentation + +* **api:** add customer-facing descriptions to runner enums and fix CreateRunner examples ([5319ad7](https://github.com/gitpod-io/gitpod-sdk-python/commit/5319ad756a2e97b9d4d26444e3517b735bbd9eaa)) +* **api:** update trigger usage note in AutomationTrigger ([5a292cb](https://github.com/gitpod-io/gitpod-sdk-python/commit/5a292cb1ef87a0dd73d93445707412d25c0e95e0)) +* **types:** mark is_admin deprecated in Organization model ([5e7b9f3](https://github.com/gitpod-io/gitpod-sdk-python/commit/5e7b9f3d7dd7af385ca75b17f01c1cab87da8cb6)) + + +### Refactors + +* **agent:** remove loop condition mechanism ([9951849](https://github.com/gitpod-io/gitpod-sdk-python/commit/99518499ea51cdc5e6a37908af83afe8fe8a79ca)) +* **api:** default StartAgent agent ID ([beee4ef](https://github.com/gitpod-io/gitpod-sdk-python/commit/beee4ef89179b0541bd09335b2f6dce9a9506a3b)) +* **api:** remove project defaults API surface ([f96e98e](https://github.com/gitpod-io/gitpod-sdk-python/commit/f96e98e385ffffeb280bda2a549c4a4af0a05d3d)) + ## 0.11.0 (2026-04-02) Full Changelog: [v0.10.0...v0.11.0](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.10.0...v0.11.0) diff --git a/pyproject.toml b/pyproject.toml index f278fc4d..6c612339 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gitpod-sdk" -version = "0.11.0" +version = "0.12.0" 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 7504df3f..6521e93a 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.11.0" # x-release-please-version +__version__ = "0.12.0" # x-release-please-version