From f9c394ab4ed90dcea009c21471bbeeec3871bdd6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 22:13:50 +0000 Subject: [PATCH 001/217] feat(types): add Report and related schema types to automations --- .stats.yml | 6 ++--- src/resources/automations.ts | 17 -------------- tests/api-resources/automations.test.ts | 30 ------------------------- 3 files changed, 3 insertions(+), 50 deletions(-) diff --git a/.stats.yml b/.stats.yml index 82c3873e..e93723a0 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-dabc0ff98cd7b9d91850b3c0dbada4e487e698333cd0b7257959e4819d9a29d6.yml -openapi_spec_hash: b974bdc6025a26cfa62857bf74ec379b -config_hash: 13514c5eb422e4eb01767e718798de1e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3dcdbd68ce4b336149d28d17ab08f211538ed6630112ae4883af2f6680643159.yml +openapi_spec_hash: 7e4333995b65cf32663166801e2444bb +config_hash: 8d7b241284195a8c51f5d670fbbe0ab4 diff --git a/src/resources/automations.ts b/src/resources/automations.ts index 9646efdb..7e54e6cd 100644 --- a/src/resources/automations.ts +++ b/src/resources/automations.ts @@ -2144,8 +2144,6 @@ export interface WorkflowStep { */ pullRequest?: WorkflowStep.PullRequest; - report?: WorkflowStep.Report; - /** * WorkflowTaskStep represents a task step that executes a command. */ @@ -2201,21 +2199,6 @@ export namespace WorkflowStep { title?: string; } - export interface Report { - /** - * Report must have at least one output: - * - * ``` - * size(this) >= 1 - * ``` - */ - outputs?: Array; - } - - export namespace Report { - export interface Output {} - } - /** * WorkflowTaskStep represents a task step that executes a command. */ diff --git a/tests/api-resources/automations.test.ts b/tests/api-resources/automations.test.ts index 0da8a86f..a78bcf29 100644 --- a/tests/api-resources/automations.test.ts +++ b/tests/api-resources/automations.test.ts @@ -38,21 +38,6 @@ describe('resource automations', () => { draft: true, title: 'title', }, - report: { - outputs: [ - { - acceptanceCriteria: 'acceptanceCriteria', - boolean: {}, - command: 'command', - float: { max: 0, min: 0 }, - integer: { max: 0, min: 0 }, - key: 'key', - prompt: 'prompt', - string: { pattern: 'pattern' }, - title: 'title', - }, - ], - }, task: { command: 'command' }, }, ], @@ -75,21 +60,6 @@ describe('resource automations', () => { draft: true, title: 'title', }, - report: { - outputs: [ - { - acceptanceCriteria: 'acceptanceCriteria', - boolean: {}, - command: 'command', - float: { max: 0, min: 0 }, - integer: { max: 0, min: 0 }, - key: 'key', - prompt: 'prompt', - string: { pattern: 'pattern' }, - title: 'title', - }, - ], - }, task: { command: 'command' }, }, ], From 18f934f14c62cae269e30611f24a236c3e0dddcf 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:13 +0000 Subject: [PATCH 002/217] 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 259af946e2fc72516a5f7502b2432040ecef1692 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:28 +0000 Subject: [PATCH 003/217] 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 ff1dd19744eb060f1d7348172d1a3a531bebce9a 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:09 +0000 Subject: [PATCH 004/217] 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 9a542d3b20b95e4fb2f155ee91105f500ff5e7dc 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:35 +0000 Subject: [PATCH 005/217] 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 1cfefef7e8e96c9ed2c31c29b50b5b520593cfde 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:02 +0000 Subject: [PATCH 006/217] 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 cfd1e9a15f844e398d089cfc9189b604628b9c33 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 15:57:39 +0000 Subject: [PATCH 007/217] chore(internal): codegen related update --- src/internal/utils/env.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/utils/env.ts b/src/internal/utils/env.ts index 2d848007..cc5fa0fa 100644 --- a/src/internal/utils/env.ts +++ b/src/internal/utils/env.ts @@ -9,10 +9,10 @@ */ export const readEnv = (env: string): string | undefined => { if (typeof (globalThis as any).process !== 'undefined') { - return (globalThis as any).process.env?.[env]?.trim() ?? undefined; + return (globalThis as any).process.env?.[env]?.trim() || undefined; } if (typeof (globalThis as any).Deno !== 'undefined') { - return (globalThis as any).Deno.env?.get?.(env)?.trim(); + return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined; } return undefined; }; From f5c29a11d419a2abe36f2b0e5b1fa552b20cd88d 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:07 +0000 Subject: [PATCH 008/217] 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 85d6ef2d704eb140512d7edf3c1e6495f1da12d5 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:21:43 +0000 Subject: [PATCH 009/217] feat(api): remove terminal field from RunsOn --- .stats.yml | 4 ++-- src/resources/shared.ts | 6 ------ 2 files changed, 2 insertions(+), 8 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/resources/shared.ts b/src/resources/shared.ts index efb056cb..3a5a9dfb 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -324,12 +324,6 @@ export interface RunsOn { * Machine runs the service/task directly on the VM/machine level. */ machine?: unknown; - - /** - * Terminal runs the service inside a managed PTY terminal in the devcontainer. - * Users can attach to the terminal interactively via the terminal API. - */ - terminal?: unknown; } export namespace RunsOn { From 3d280755e1ac496c08eed62f755924721408d03b 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:52 +0000 Subject: [PATCH 010/217] 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 78e1779ba8108b50d31765ba0d85b683c0319cd3 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:58:00 +0000 Subject: [PATCH 011/217] 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 f11a378b2ea0182d1f76a96aa7c9168e2814b974 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:41 +0000 Subject: [PATCH 012/217] 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 4ba14a178fe977a93f4dc2cb2df43fe1c1e09fef 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:25 +0000 Subject: [PATCH 013/217] 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 3a33f2b8918ff519151cc781126cb5439fe6abb6 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:36 +0000 Subject: [PATCH 014/217] 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 e179ba6bb9bc0ca5a37262a15235e5f9185a98f6 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:48 +0000 Subject: [PATCH 015/217] feat(api): add oldPath field to EnvironmentStatus file changes --- .stats.yml | 4 ++-- src/resources/environments/environments.ts | 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/resources/environments/environments.ts b/src/resources/environments/environments.ts index eb9d7214..73681ee8 100644 --- a/src/resources/environments/environments.ts +++ b/src/resources/environments/environments.ts @@ -1291,6 +1291,12 @@ export namespace EnvironmentStatus { | 'CHANGE_TYPE_UPDATED_BUT_UNMERGED' | 'CHANGE_TYPE_UNTRACKED'; + /** + * old_path is the previous path of the file before a rename or copy. Only set when + * change_type is RENAMED or COPIED. + */ + oldPath?: string; + /** * path is the path of the file */ From fadafca48ec3301694befe6e3d71f14321642500 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:11 +0000 Subject: [PATCH 016/217] docs(types): clarify trigger restrictions in AutomationTrigger --- .stats.yml | 4 ++-- src/resources/shared.ts | 4 ++-- 2 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/resources/shared.ts b/src/resources/shared.ts index 3a5a9dfb..c4b17c23 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -22,8 +22,8 @@ import { * 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. + * that need to run last during prebuilds, such as IDE warmup. Note: The + * before_snapshot trigger can only be used with tasks, not services. */ export interface AutomationTrigger { beforeSnapshot?: boolean; From afd15eebed86ae40238ac2e8a34c448e48097aed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 12 Apr 2026 19:31:23 +0000 Subject: [PATCH 017/217] chore(internal): codegen related update --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9d562436..7c98e7ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1268,9 +1268,9 @@ bcrypt-pbkdf@^1.0.0, bcrypt-pbkdf@^1.0.2: tweetnacl "^0.14.3" brace-expansion@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.3.tgz#0493338bdd58e319b1039c67cf7ee439892c01d9" - integrity sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA== + version "2.1.0" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae" + integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w== dependencies: balanced-match "^1.0.0" From 452d5e08209708511f3505402a1b9bd883f59721 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:39:18 +0000 Subject: [PATCH 018/217] feat(api): add prebuild trigger value to automations --- .stats.yml | 4 ++-- src/resources/environments/automations/automations.ts | 2 +- 2 files changed, 3 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/resources/environments/automations/automations.ts b/src/resources/environments/automations/automations.ts index 88608942..23bb791f 100644 --- a/src/resources/environments/automations/automations.ts +++ b/src/resources/environments/automations/automations.ts @@ -145,7 +145,7 @@ export namespace AutomationsFile { runsOn?: Shared.RunsOn; - triggeredBy?: Array<'manual' | 'postEnvironmentStart' | 'postDevcontainerStart'>; + triggeredBy?: Array<'manual' | 'postEnvironmentStart' | 'postDevcontainerStart' | 'prebuild'>; } export namespace Services { From f238e42ad0999656d0476ce19b6bdd057b210611 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:30 +0000 Subject: [PATCH 019/217] 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 02571d184ee986cf518b4c3645232fee14ee54e3 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:53 +0000 Subject: [PATCH 020/217] 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 e1591e617c7e29729f6ada19f03fa53a4161a1c3 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:08 +0000 Subject: [PATCH 021/217] feat(api): add integration_id, update webhook_id in WorkflowTrigger --- .stats.yml | 4 ++-- src/resources/automations.ts | 7 +++++++ tests/api-resources/automations.test.ts | 1 + 3 files changed, 10 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/resources/automations.ts b/src/resources/automations.ts index 7e54e6cd..a30dfdab 100644 --- a/src/resources/automations.ts +++ b/src/resources/automations.ts @@ -2285,6 +2285,13 @@ export namespace WorkflowTrigger { | 'PULL_REQUEST_EVENT_READY_FOR_REVIEW' >; + /** + * 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. + */ + integrationId?: string | null; + /** * webhook_id is the optional ID of a webhook that this trigger is bound to. When * set, the trigger will be activated when the webhook receives events. This allows diff --git a/tests/api-resources/automations.test.ts b/tests/api-resources/automations.test.ts index a78bcf29..c91fbf5d 100644 --- a/tests/api-resources/automations.test.ts +++ b/tests/api-resources/automations.test.ts @@ -79,6 +79,7 @@ describe('resource automations', () => { manual: {}, pullRequest: { events: ['PULL_REQUEST_EVENT_UNSPECIFIED'], + integrationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', webhookId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', }, time: { cronExpression: 'cronExpression' }, From cf79b4fcabdb413acfea8387233a2a93c5f5334c 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:54 +0000 Subject: [PATCH 022/217] 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 2c9ad9381365a1f06ffde11b69ccf9b887474a6e 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 023/217] 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 1701b43e77fceb917014bcbd1d2397f2138b99fe 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:33 +0000 Subject: [PATCH 024/217] 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 c8eb1d63e97c6570e5156f90c58e29141ed1e68c 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:32 +0000 Subject: [PATCH 025/217] feat(api): add port_authentication capability to RunnerCapability --- .stats.yml | 4 ++-- src/resources/runners/runners.ts | 3 ++- 2 files changed, 4 insertions(+), 3 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/resources/runners/runners.ts b/src/resources/runners/runners.ts index b3623212..e4cc9127 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -631,7 +631,8 @@ export type RunnerCapability = | 'RUNNER_CAPABILITY_CHECK_REPOSITORY_ACCESS' | 'RUNNER_CAPABILITY_RUNNER_SIDE_AGENT' | 'RUNNER_CAPABILITY_WARM_POOL' - | 'RUNNER_CAPABILITY_ASG_WARM_POOL'; + | 'RUNNER_CAPABILITY_ASG_WARM_POOL' + | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION'; export interface RunnerConfiguration { /** From 1a35fcb3cf02518e49b720dba44cc58e17691dd4 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:46 +0000 Subject: [PATCH 026/217] 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 3918662d4b0aad7326c2bdb41004defb966739b2 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:43 +0000 Subject: [PATCH 027/217] 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 e64a9e9735c81d13eb6c2a083b3796932509b186 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:04 +0000 Subject: [PATCH 028/217] 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 a7fe947b77f988afdc6e93d77e7629991b6709f3 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:57 +0000 Subject: [PATCH 029/217] feat(api): add PULL_REQUEST_EVENT_REVIEW_REQUESTED event type to WorkflowTrigger --- .stats.yml | 4 ++-- src/resources/automations.ts | 1 + 2 files changed, 3 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/resources/automations.ts b/src/resources/automations.ts index a30dfdab..a17290d7 100644 --- a/src/resources/automations.ts +++ b/src/resources/automations.ts @@ -2283,6 +2283,7 @@ export namespace WorkflowTrigger { | 'PULL_REQUEST_EVENT_MERGED' | 'PULL_REQUEST_EVENT_CLOSED' | 'PULL_REQUEST_EVENT_READY_FOR_REVIEW' + | 'PULL_REQUEST_EVENT_REVIEW_REQUESTED' >; /** From 27772ea9c32c3336e654df4675500ec83ab01f6a 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:40 +0000 Subject: [PATCH 030/217] feat(api): add opus 4.7 model support to agent execution --- .stats.yml | 4 ++-- src/resources/agents.ts | 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/resources/agents.ts b/src/resources/agents.ts index 27755f1c..22d53813 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -868,6 +868,7 @@ export namespace AgentExecution { | '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 6c834b99652dd3da17781e08d5449480cd835fcd 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:49 +0000 Subject: [PATCH 031/217] feat(api): add UserInputMetadata type to agents --- .stats.yml | 6 +++--- api.md | 1 + src/client.ts | 2 ++ src/resources/agents.ts | 17 +++++++++++++++++ src/resources/index.ts | 1 + 5 files changed, 24 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 96536d55..8a8fd846 100644 --- a/api.md +++ b/api.md @@ -68,6 +68,7 @@ Types: - Role - Type - UserInputBlock +- UserInputMetadata - WakeEvent - AgentCreateExecutionConversationTokenResponse - AgentCreatePromptResponse diff --git a/src/client.ts b/src/client.ts index ad0dd92c..fbeac4f5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -154,6 +154,7 @@ import { Role, Type, UserInputBlock, + UserInputMetadata, WakeEvent, } from './resources/agents'; import { @@ -1411,6 +1412,7 @@ export declare namespace Gitpod { type Role as Role, type Type as Type, type UserInputBlock as UserInputBlock, + type UserInputMetadata as UserInputMetadata, type WakeEvent as WakeEvent, type AgentCreateExecutionConversationTokenResponse as AgentCreateExecutionConversationTokenResponse, type AgentCreatePromptResponse as AgentCreatePromptResponse, diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 22d53813..26c0623f 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -1321,6 +1321,22 @@ export namespace UserInputBlock { } } +/** + * UserInputMetadata carries integration-specific context for a user input. + * Internal only — not exposed in public SDKs. External API consumers should not + * set these fields; they are populated by integration handlers. + */ +export interface UserInputMetadata { + /** + * Origin of this input — set by integration handlers to their host (e.g. + * "github.com", "slack.com"). Empty for non-integration callers. This field drives + * emission gating: when set, agent responses are only emitted to the matching + * integration. Treated as trusted input from integration handlers; not validated + * against registered hosts. + */ + source?: string; +} + /** * WakeEvent is sent by the backend to wake an agent when a registered interest * fires. Delivered via SendToAgentExecution as a new oneof variant. @@ -1697,6 +1713,7 @@ export declare namespace Agents { type Role as Role, type Type as Type, type UserInputBlock as UserInputBlock, + type UserInputMetadata as UserInputMetadata, type WakeEvent as WakeEvent, type AgentCreateExecutionConversationTokenResponse as AgentCreateExecutionConversationTokenResponse, type AgentCreatePromptResponse as AgentCreatePromptResponse, diff --git a/src/resources/index.ts b/src/resources/index.ts index 17be5025..d5540338 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -33,6 +33,7 @@ export { type Role, type Type, type UserInputBlock, + type UserInputMetadata, type WakeEvent, type AgentCreateExecutionConversationTokenResponse, type AgentCreatePromptResponse, From 1302112e870609eac11d400d68c5debd0197fa35 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:09 +0000 Subject: [PATCH 032/217] 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 1a290b34e32e428038b448cba519de1a28dc0853 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:16 +0000 Subject: [PATCH 033/217] 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 ae690a1a744c174030a9679206f02372fd06af90 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:40:55 +0000 Subject: [PATCH 034/217] feat(api): add OPENAI_AUTO model option to agents --- .stats.yml | 6 +++--- src/resources/agents.ts | 3 ++- 2 files changed, 5 insertions(+), 4 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/resources/agents.ts b/src/resources/agents.ts index 26c0623f..ab11328d 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -873,7 +873,8 @@ export namespace AgentExecution { | 'SUPPORTED_MODEL_OPENAI_4O' | 'SUPPORTED_MODEL_OPENAI_4O_MINI' | 'SUPPORTED_MODEL_OPENAI_O1' - | 'SUPPORTED_MODEL_OPENAI_O1_MINI'; + | 'SUPPORTED_MODEL_OPENAI_O1_MINI' + | 'SUPPORTED_MODEL_OPENAI_AUTO'; /** * transcript_url is the URL to the LLM transcript (all messages exchanged between From 306e1fa51525f0ba764898ed4ee57a4ccb002d8c 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/217] 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 3417182b..7db27b1b 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 c420a686f8bdc4dd792fd8e69b4346ae9b266b5e 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:11 +0000 Subject: [PATCH 036/217] 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 aa5ca6e26ac88f9b5219596338d26435afbe4c4f 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/217] 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 7aa6263936e7a45c43801dc818e384d43e1249c5 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:33 +0000 Subject: [PATCH 038/217] docs(types): deprecate isAdmin in runners organization response --- .stats.yml | 4 ++-- src/resources/runners/runners.ts | 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/resources/runners/runners.ts b/src/resources/runners/runners.ts index e4cc9127..cae1026c 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -972,8 +972,13 @@ export interface RunnerListScmOrganizationsResponse { export namespace RunnerListScmOrganizationsResponse { export interface Organization { /** - * Whether the user has admin permissions in this organization. Admin permissions - * typically allow creating organization-level webhooks. + * @deprecated 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. */ isAdmin?: boolean; From dad37ced038c0d15705cfc1db998f0b30860e206 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:49 +0000 Subject: [PATCH 039/217] 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 9ce40092da634c2845b17ec9330116565b8adc03 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:46 +0000 Subject: [PATCH 040/217] 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 7d8db423d75fd9129ed76ac6b8f9b379db4d185a 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/217] 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 1170d35a0f2144c2977faba5e73a9e9f678de256 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 07:59:23 +0000 Subject: [PATCH 042/217] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index b207c5a7..fde64ca8 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-ef5f6cba1c63c41cf94bc6fddfd14f05d5e9c647a213de3ec89943bf986e05e5.yml +openapi_spec_hash: 814d0b47e5a024094aa761667b9d8c5e +config_hash: 7071055865674e138d6c01fea5e7c44c From 6a6e0a84e2a9daf23db95877e0b0c015fb51a9c4 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:04 +0000 Subject: [PATCH 043/217] feat(api): add pagination and search to runners listScmOrganizations method --- .stats.yml | 6 +- api.md | 2 +- src/client.ts | 10 +++ src/core/pagination.ts | 55 +++++++++++++ src/resources/index.ts | 1 + src/resources/runners/index.ts | 1 + src/resources/runners/runners.ts | 127 +++++++++++++++++++++---------- 7 files changed, 157 insertions(+), 45 deletions(-) diff --git a/.stats.yml b/.stats.yml index fde64ca8..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-ef5f6cba1c63c41cf94bc6fddfd14f05d5e9c647a213de3ec89943bf986e05e5.yml -openapi_spec_hash: 814d0b47e5a024094aa761667b9d8c5e -config_hash: 7071055865674e138d6c01fea5e7c44c +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 8a8fd846..cd39152d 100644 --- a/api.md +++ b/api.md @@ -671,7 +671,7 @@ Methods: - client.runners.checkRepositoryAccess({ ...params }) -> RunnerCheckRepositoryAccessResponse - client.runners.createLogsToken({ ...params }) -> RunnerCreateLogsTokenResponse - client.runners.createRunnerToken({ ...params }) -> RunnerCreateRunnerTokenResponse -- client.runners.listScmOrganizations({ ...params }) -> RunnerListScmOrganizationsResponse +- client.runners.listScmOrganizations({ ...params }) -> RunnerListScmOrganizationsResponsesOrganizationsPage - client.runners.parseContextURL({ ...params }) -> RunnerParseContextURLResponse - client.runners.searchRepositories({ ...params }) -> RunnerSearchRepositoriesResponse diff --git a/src/client.ts b/src/client.ts index fbeac4f5..f15b0fab 100644 --- a/src/client.ts +++ b/src/client.ts @@ -52,6 +52,8 @@ import { LoginsPageResponse, type MembersPageParams, MembersPageResponse, + type OrganizationsPageParams, + OrganizationsPageResponse, type OutputsPageParams, OutputsPageResponse, type PersonalAccessTokensPageParams, @@ -418,6 +420,7 @@ import { RunnerListParams, RunnerListScmOrganizationsParams, RunnerListScmOrganizationsResponse, + RunnerListScmOrganizationsResponsesOrganizationsPage, RunnerParseContextURLParams, RunnerParseContextURLResponse, RunnerPhase, @@ -1283,6 +1286,12 @@ export declare namespace Gitpod { export import MembersPage = Pagination.MembersPage; export { type MembersPageParams as MembersPageParams, type MembersPageResponse as MembersPageResponse }; + export import OrganizationsPage = Pagination.OrganizationsPage; + export { + type OrganizationsPageParams as OrganizationsPageParams, + type OrganizationsPageResponse as OrganizationsPageResponse, + }; + export import OutputsPage = Pagination.OutputsPage; export { type OutputsPageParams as OutputsPageParams, type OutputsPageResponse as OutputsPageResponse }; @@ -1697,6 +1706,7 @@ export declare namespace Gitpod { type RunnerParseContextURLResponse as RunnerParseContextURLResponse, type RunnerSearchRepositoriesResponse as RunnerSearchRepositoriesResponse, type RunnersRunnersPage as RunnersRunnersPage, + type RunnerListScmOrganizationsResponsesOrganizationsPage as RunnerListScmOrganizationsResponsesOrganizationsPage, type RunnerCreateParams as RunnerCreateParams, type RunnerRetrieveParams as RunnerRetrieveParams, type RunnerUpdateParams as RunnerUpdateParams, diff --git a/src/core/pagination.ts b/src/core/pagination.ts index d3e0bc6f..c01757cf 100644 --- a/src/core/pagination.ts +++ b/src/core/pagination.ts @@ -889,6 +889,61 @@ export class MembersPage extends AbstractPage implements MembersPage } } +export interface OrganizationsPageResponse { + organizations: Array; + + pagination: OrganizationsPageResponse.Pagination; +} + +export namespace OrganizationsPageResponse { + export interface Pagination { + nextToken?: string; + } +} + +export interface OrganizationsPageParams { + pageSize?: number; + + token?: string; +} + +export class OrganizationsPage extends AbstractPage implements OrganizationsPageResponse { + organizations: Array; + + pagination: OrganizationsPageResponse.Pagination; + + constructor( + client: Gitpod, + response: Response, + body: OrganizationsPageResponse, + options: FinalRequestOptions, + ) { + super(client, response, body, options); + + this.organizations = body.organizations || []; + this.pagination = body.pagination || {}; + } + + getPaginatedItems(): Item[] { + return this.organizations ?? []; + } + + nextPageRequestOptions(): PageRequestOptions | null { + const cursor = this.pagination?.nextToken; + if (!cursor) { + return null; + } + + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + token: cursor, + }, + }; + } +} + export interface OutputsPageResponse { outputs: Array; diff --git a/src/resources/index.ts b/src/resources/index.ts index d5540338..8658b6f1 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -318,6 +318,7 @@ export { type RunnerParseContextURLParams, type RunnerSearchRepositoriesParams, type RunnersRunnersPage, + type RunnerListScmOrganizationsResponsesOrganizationsPage, } from './runners/runners'; export { Secrets, diff --git a/src/resources/runners/index.ts b/src/resources/runners/index.ts index fb790837..b11c33ee 100644 --- a/src/resources/runners/index.ts +++ b/src/resources/runners/index.ts @@ -62,4 +62,5 @@ export { type RunnerParseContextURLParams, type RunnerSearchRepositoriesParams, type RunnersRunnersPage, + type RunnerListScmOrganizationsResponsesOrganizationsPage, } from './runners'; diff --git a/src/resources/runners/runners.ts b/src/resources/runners/runners.ts index cae1026c..9887aec3 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -27,7 +27,13 @@ import { ScmIntegrationValidationResult, } from './configurations/configurations'; import { APIPromise } from '../../core/api-promise'; -import { PagePromise, RunnersPage, type RunnersPageParams } from '../../core/pagination'; +import { + OrganizationsPage, + type OrganizationsPageParams, + PagePromise, + RunnersPage, + type RunnersPageParams, +} from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Runners extends APIResource { @@ -412,24 +418,41 @@ export class Runners extends APIResource { * 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 + * ``` + * * @example * ```ts - * const response = await client.runners.listScmOrganizations({ - * runnerId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - * scmHost: 'github.com', - * }); + * // Automatically fetches more pages as needed. + * for await (const runnerListScmOrganizationsResponse of client.runners.listScmOrganizations( + * { + * runnerId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * scmHost: 'github.com', + * }, + * )) { + * // ... + * } * ``` */ listScmOrganizations( params: RunnerListScmOrganizationsParams, options?: RequestOptions, - ): APIPromise { + ): PagePromise { const { token, pageSize, ...body } = params; - return this._client.post('/gitpod.v1.RunnerService/ListSCMOrganizations', { - query: { token, pageSize }, - body, - ...options, - }); + return this._client.getAPIList( + '/gitpod.v1.RunnerService/ListSCMOrganizations', + OrganizationsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -521,6 +544,9 @@ export class Runners extends APIResource { export type RunnersRunnersPage = RunnersPage; +export type RunnerListScmOrganizationsResponsesOrganizationsPage = + OrganizationsPage; + export interface GatewayInfo { /** * Gateway represents a system gateway that provides access to services @@ -964,34 +990,25 @@ export interface RunnerCreateRunnerTokenResponse { export interface RunnerListScmOrganizationsResponse { /** - * List of organizations the user belongs to + * @deprecated 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. */ - organizations?: Array; -} + isAdmin?: boolean; -export namespace RunnerListScmOrganizationsResponse { - export interface Organization { - /** - * @deprecated 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. - */ - isAdmin?: boolean; - - /** - * Organization name/slug (e.g., "gitpod-io") - */ - name?: string; + /** + * Organization name/slug (e.g., "gitpod-io") + */ + name?: string; - /** - * Organization URL (e.g., "https://github.com/gitpod-io") - */ - url?: string; - } + /** + * Organization URL (e.g., "https://github.com/gitpod-io") + */ + url?: string; } export interface RunnerParseContextURLResponse { @@ -1411,16 +1428,23 @@ export interface RunnerCreateRunnerTokenParams { runnerId?: string; } -export interface RunnerListScmOrganizationsParams { +export interface RunnerListScmOrganizationsParams extends OrganizationsPageParams { /** - * Query param + * Body param: Pagination parameters. When unset, defaults to the standard + * PaginationRequest defaults (page_size 25, max 100). Tokens are opaque and + * provider-specific. */ - token?: string; + pagination?: RunnerListScmOrganizationsParams.Pagination; /** - * Query param + * Body param: 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. */ - pageSize?: number; + query?: string; /** * Body param @@ -1434,6 +1458,26 @@ export interface RunnerListScmOrganizationsParams { scmHost?: string; } +export namespace RunnerListScmOrganizationsParams { + /** + * Pagination parameters. When unset, defaults to the standard PaginationRequest + * defaults (page_size 25, max 100). Tokens are opaque and provider-specific. + */ + export interface Pagination { + /** + * Token for the next set of results that was returned as next_token of a + * PaginationResponse + */ + token?: string; + + /** + * Page size is the maximum number of results to retrieve per page. Defaults to 25. + * Maximum 100. + */ + pageSize?: number; + } +} + export interface RunnerParseContextURLParams { contextUrl?: string; @@ -1521,6 +1565,7 @@ export declare namespace Runners { type RunnerParseContextURLResponse as RunnerParseContextURLResponse, type RunnerSearchRepositoriesResponse as RunnerSearchRepositoriesResponse, type RunnersRunnersPage as RunnersRunnersPage, + type RunnerListScmOrganizationsResponsesOrganizationsPage as RunnerListScmOrganizationsResponsesOrganizationsPage, type RunnerCreateParams as RunnerCreateParams, type RunnerRetrieveParams as RunnerRetrieveParams, type RunnerUpdateParams as RunnerUpdateParams, From e0c9b5b0f442c8fbe3b670d133ce8e242a09fff2 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 044/217] 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 b037a31aedaececb1a44618e4084bda8fbdd5761 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:44 +0000 Subject: [PATCH 045/217] 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 e354bf849b97e421b9694b55a1d7b0f41e7ba4fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:55:51 +0000 Subject: [PATCH 046/217] chore(formatter): run prettier and eslint separately --- eslint.config.mjs | 3 - package.json | 1 - scripts/fast-format | 6 +- scripts/format | 3 +- scripts/lint | 3 + src/api-promise.ts | 2 +- src/client.ts | 1790 +++++++---------- src/core/api-promise.ts | 9 +- src/core/error.ts | 45 +- src/core/pagination.ts | 377 +--- src/error.ts | 2 +- src/index.ts | 16 +- src/internal/builtin-types.ts | 23 +- src/internal/detect-platform.ts | 6 +- src/internal/errors.ts | 14 +- src/internal/headers.ts | 4 +- src/internal/parse.ts | 12 +- src/internal/request-options.ts | 6 +- src/internal/shim-types.ts | 4 +- src/internal/shims.ts | 4 +- src/internal/to-file.ts | 14 +- src/internal/types.ts | 50 +- src/internal/utils/log.ts | 37 +- src/internal/utils/uuid.ts | 8 +- src/pagination.ts | 2 +- src/resource.ts | 2 +- src/resources/accounts.ts | 64 +- src/resources/agents.ts | 162 +- src/resources/automations.ts | 205 +- src/resources/editors.ts | 13 +- .../environments/automations/automations.ts | 50 +- .../environments/automations/index.ts | 46 +- .../environments/automations/services.ts | 38 +- .../automations/tasks/executions.ts | 29 +- .../environments/automations/tasks/index.ts | 24 +- .../environments/automations/tasks/tasks.ts | 27 +- src/resources/environments/classes.ts | 25 +- src/resources/environments/environments.ts | 196 +- src/resources/environments/index.ts | 48 +- src/resources/errors.ts | 12 +- src/resources/events.ts | 40 +- src/resources/gateways.ts | 20 +- src/resources/groups/groups.ts | 53 +- src/resources/groups/index.ts | 47 +- src/resources/groups/memberships.ts | 20 +- src/resources/groups/role-assignments.ts | 24 +- src/resources/groups/shares.ts | 6 +- src/resources/identity.ts | 19 +- src/resources/index.ts | 371 +--- .../organizations/announcement-banner.ts | 12 +- src/resources/organizations/custom-domains.ts | 14 +- .../organizations/domain-verifications.ts | 45 +- src/resources/organizations/index.ts | 125 +- src/resources/organizations/invites.ts | 7 +- src/resources/organizations/organizations.ts | 158 +- src/resources/organizations/policies.ts | 19 +- .../organizations/scim-configurations.ts | 45 +- .../organizations/sso-configurations.ts | 38 +- src/resources/prebuilds.ts | 88 +- src/resources/projects/environment-clases.ts | 30 +- src/resources/projects/index.ts | 49 +- src/resources/projects/policies.ts | 25 +- src/resources/projects/projects.ts | 59 +- .../runners/configurations/configurations.ts | 70 +- .../configurations/environment-classes.ts | 50 +- .../host-authentication-tokens.ts | 56 +- src/resources/runners/configurations/index.ts | 59 +- .../runners/configurations/schema.ts | 7 +- .../configurations/scm-integrations.ts | 46 +- src/resources/runners/index.ts | 67 +- src/resources/runners/policies.ts | 21 +- src/resources/runners/runners.ts | 159 +- src/resources/secrets.ts | 17 +- src/resources/shared.ts | 203 +- src/resources/usage.ts | 17 +- src/resources/users/dotfiles.ts | 4 +- src/resources/users/index.ts | 33 +- src/resources/users/pats.ts | 25 +- src/resources/users/users.ts | 35 +- src/uploads.ts | 2 +- src/version.ts | 2 +- tests/api-resources/accounts.test.ts | 27 +- tests/api-resources/agents.test.ts | 5 +- tests/api-resources/automations.test.ts | 125 +- tests/api-resources/editors.test.ts | 23 +- .../automations/automations.test.ts | 5 +- .../environments/automations/services.test.ts | 5 +- .../automations/tasks/executions.test.ts | 5 +- .../automations/tasks/tasks.test.ts | 5 +- .../environments/classes.test.ts | 5 +- .../environments/environments.test.ts | 21 +- tests/api-resources/errors.test.ts | 5 +- tests/api-resources/events.test.ts | 5 +- tests/api-resources/gateways.test.ts | 5 +- tests/api-resources/groups/groups.test.ts | 5 +- .../api-resources/groups/memberships.test.ts | 11 +- .../groups/role-assignments.test.ts | 5 +- tests/api-resources/groups/shares.test.ts | 5 +- tests/api-resources/identity.test.ts | 5 +- .../organizations/announcement-banner.test.ts | 25 +- .../organizations/custom-domains.test.ts | 55 +- .../domain-verifications.test.ts | 53 +- .../organizations/invites.test.ts | 29 +- .../organizations/organizations.test.ts | 86 +- .../organizations/policies.test.ts | 93 +- .../organizations/scim-configurations.test.ts | 59 +- .../organizations/sso-configurations.test.ts | 93 +- tests/api-resources/prebuilds.test.ts | 82 +- .../projects/environment-clases.test.ts | 5 +- tests/api-resources/projects/policies.test.ts | 5 +- tests/api-resources/projects/projects.test.ts | 55 +- .../configurations/configurations.test.ts | 5 +- .../environment-classes.test.ts | 5 +- .../host-authentication-tokens.test.ts | 5 +- .../runners/configurations/schema.test.ts | 5 +- .../configurations/scm-integrations.test.ts | 5 +- tests/api-resources/runners/policies.test.ts | 5 +- tests/api-resources/runners/runners.test.ts | 5 +- tests/api-resources/secrets.test.ts | 5 +- tests/api-resources/usage.test.ts | 5 +- tests/api-resources/users/dotfiles.test.ts | 5 +- tests/api-resources/users/pats.test.ts | 5 +- tests/api-resources/users/users.test.ts | 5 +- tests/index.test.ts | 508 +++-- tests/stringifyQuery.test.ts | 42 +- yarn.lock | 32 - 126 files changed, 2007 insertions(+), 5116 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index a73ce380..0fd72164 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,6 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; -import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -14,11 +13,9 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, - prettier, }, rules: { 'no-unused-vars': 'off', - 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index 7364c376..2b4ce03a 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.39.1", - "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", diff --git a/scripts/fast-format b/scripts/fast-format index 53721ac0..e1723136 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,10 +31,8 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -# format things eslint didn't -PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" +PRETTIER_FILES="$(grep '\.\([mc]?tsx?\|[mc]?jsx?\|json\)$' "$FILE_LIST" || true)" if ! [ -z "$PRETTIER_FILES" ]; then echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ - '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern fi diff --git a/scripts/format b/scripts/format index 7a756401..b1b2c17a 100755 --- a/scripts/format +++ b/scripts/format @@ -8,5 +8,4 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -# format things eslint didn't -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . diff --git a/scripts/lint b/scripts/lint index 3ffb78a6..1f532548 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,6 +4,9 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running prettier --check" +./node_modules/.bin/prettier --check . + echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/src/api-promise.ts b/src/api-promise.ts index 8c775ee6..4e701286 100644 --- a/src/api-promise.ts +++ b/src/api-promise.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/api-promise instead */ -export * from './core/api-promise'; +export * from "./core/api-promise" \ No newline at end of file diff --git a/src/client.ts b/src/client.ts index f15b0fab..9fda7c59 100644 --- a/src/client.ts +++ b/src/client.ts @@ -22,436 +22,27 @@ import { stringifyQuery } from './internal/utils/query'; import { VERSION } from './version'; import * as Errors from './core/error'; import * as Pagination from './core/pagination'; -import { - AbstractPage, - type AgentExecutionsPageParams, - AgentExecutionsPageResponse, - type AssignmentsPageParams, - AssignmentsPageResponse, - type DomainVerificationsPageParams, - DomainVerificationsPageResponse, - type EditorsPageParams, - EditorsPageResponse, - type EntriesPageParams, - EntriesPageResponse, - type EnvironmentClassesPageParams, - EnvironmentClassesPageResponse, - type EnvironmentsPageParams, - EnvironmentsPageResponse, - type GatewaysPageParams, - GatewaysPageResponse, - type GroupsPageParams, - GroupsPageResponse, - type IntegrationsPageParams, - IntegrationsPageResponse, - type JoinableOrganizationsPageParams, - JoinableOrganizationsPageResponse, - type LoginProvidersPageParams, - LoginProvidersPageResponse, - type LoginsPageParams, - LoginsPageResponse, - type MembersPageParams, - MembersPageResponse, - type OrganizationsPageParams, - OrganizationsPageResponse, - type OutputsPageParams, - OutputsPageResponse, - type PersonalAccessTokensPageParams, - PersonalAccessTokensPageResponse, - type PoliciesPageParams, - PoliciesPageResponse, - type PrebuildsPageParams, - PrebuildsPageResponse, - type ProjectEnvironmentClassesPageParams, - ProjectEnvironmentClassesPageResponse, - type ProjectsPageParams, - ProjectsPageResponse, - type PromptsPageParams, - PromptsPageResponse, - type RecordsPageParams, - RecordsPageResponse, - type RepositoriesPageParams, - RepositoriesPageResponse, - type RunnersPageParams, - RunnersPageResponse, - type SSOConfigurationsPageParams, - SSOConfigurationsPageResponse, - type ScimConfigurationsPageParams, - ScimConfigurationsPageResponse, - type SecretsPageParams, - SecretsPageResponse, - type ServicesPageParams, - ServicesPageResponse, - type TaskExecutionsPageParams, - TaskExecutionsPageResponse, - type TasksPageParams, - TasksPageResponse, - type TokensPageParams, - TokensPageResponse, - type WarmPoolsPageParams, - WarmPoolsPageResponse, - type WorkflowExecutionActionsPageParams, - WorkflowExecutionActionsPageResponse, - type WorkflowExecutionsPageParams, - WorkflowExecutionsPageResponse, - type WorkflowsPageParams, - WorkflowsPageResponse, -} from './core/pagination'; +import { AbstractPage, type AgentExecutionsPageParams, AgentExecutionsPageResponse, type AssignmentsPageParams, AssignmentsPageResponse, type DomainVerificationsPageParams, DomainVerificationsPageResponse, type EditorsPageParams, EditorsPageResponse, type EntriesPageParams, EntriesPageResponse, type EnvironmentClassesPageParams, EnvironmentClassesPageResponse, type EnvironmentsPageParams, EnvironmentsPageResponse, type GatewaysPageParams, GatewaysPageResponse, type GroupsPageParams, GroupsPageResponse, type IntegrationsPageParams, IntegrationsPageResponse, type JoinableOrganizationsPageParams, JoinableOrganizationsPageResponse, type LoginProvidersPageParams, LoginProvidersPageResponse, type LoginsPageParams, LoginsPageResponse, type MembersPageParams, MembersPageResponse, type OrganizationsPageParams, OrganizationsPageResponse, type OutputsPageParams, OutputsPageResponse, type PersonalAccessTokensPageParams, PersonalAccessTokensPageResponse, type PoliciesPageParams, PoliciesPageResponse, type PrebuildsPageParams, PrebuildsPageResponse, type ProjectEnvironmentClassesPageParams, ProjectEnvironmentClassesPageResponse, type ProjectsPageParams, ProjectsPageResponse, type PromptsPageParams, PromptsPageResponse, type RecordsPageParams, RecordsPageResponse, type RepositoriesPageParams, RepositoriesPageResponse, type RunnersPageParams, RunnersPageResponse, type SSOConfigurationsPageParams, SSOConfigurationsPageResponse, type ScimConfigurationsPageParams, ScimConfigurationsPageResponse, type SecretsPageParams, SecretsPageResponse, type ServicesPageParams, ServicesPageResponse, type TaskExecutionsPageParams, TaskExecutionsPageResponse, type TasksPageParams, TasksPageResponse, type TokensPageParams, TokensPageResponse, type WarmPoolsPageParams, WarmPoolsPageResponse, type WorkflowExecutionActionsPageParams, WorkflowExecutionActionsPageResponse, type WorkflowExecutionsPageParams, WorkflowExecutionsPageResponse, type WorkflowsPageParams, WorkflowsPageResponse } from './core/pagination'; import * as Uploads from './core/uploads'; import * as API from './resources/index'; import { APIPromise } from './core/api-promise'; -import { - Account, - AccountDeleteParams, - AccountDeleteResponse, - AccountGetSSOLoginURLParams, - AccountGetSSOLoginURLResponse, - AccountListJoinableOrganizationsParams, - AccountListLoginProvidersParams, - AccountListSSOLoginsParams, - AccountListSSOLoginsResponse, - AccountListSSOLoginsResponsesLoginsPage, - AccountMembership, - AccountRetrieveParams, - AccountRetrieveResponse, - Accounts, - JoinableOrganization, - JoinableOrganizationsJoinableOrganizationsPage, - LoginProvider, - LoginProvidersLoginProvidersPage, -} from './resources/accounts'; -import { - AgentCodeContext, - AgentCreateExecutionConversationTokenParams, - AgentCreateExecutionConversationTokenResponse, - AgentCreatePromptParams, - AgentCreatePromptResponse, - AgentDeleteExecutionParams, - AgentDeleteExecutionResponse, - AgentDeletePromptParams, - AgentDeletePromptResponse, - AgentExecution, - AgentExecutionsAgentExecutionsPage, - AgentListExecutionsParams, - AgentListPromptsParams, - AgentMessage, - AgentMode, - AgentRetrieveExecutionParams, - AgentRetrieveExecutionResponse, - AgentRetrievePromptParams, - AgentRetrievePromptResponse, - AgentSendToExecutionParams, - AgentSendToExecutionResponse, - AgentStartExecutionParams, - AgentStartExecutionResponse, - AgentStopExecutionParams, - AgentStopExecutionResponse, - AgentUpdatePromptParams, - AgentUpdatePromptResponse, - Agents, - Prompt, - PromptMetadata, - PromptSpec, - PromptsPromptsPage, - Role, - Type, - UserInputBlock, - UserInputMetadata, - WakeEvent, -} from './resources/agents'; -import { - AutomationCancelExecutionActionParams, - AutomationCancelExecutionActionResponse, - AutomationCancelExecutionParams, - AutomationCancelExecutionResponse, - AutomationCreateParams, - AutomationCreateResponse, - AutomationDeleteParams, - AutomationDeleteResponse, - AutomationListExecutionActionsParams, - AutomationListExecutionOutputsParams, - AutomationListExecutionOutputsResponse, - AutomationListExecutionOutputsResponsesOutputsPage, - AutomationListExecutionsParams, - AutomationListParams, - AutomationRetrieveExecutionActionParams, - AutomationRetrieveExecutionActionResponse, - AutomationRetrieveExecutionParams, - AutomationRetrieveExecutionResponse, - AutomationRetrieveParams, - AutomationRetrieveResponse, - AutomationStartExecutionParams, - AutomationStartExecutionResponse, - AutomationUpdateParams, - AutomationUpdateResponse, - Automations, - Workflow, - WorkflowAction, - WorkflowExecution, - WorkflowExecutionAction, - WorkflowExecutionActionsWorkflowExecutionActionsPage, - WorkflowExecutionsWorkflowExecutionsPage, - WorkflowStep, - WorkflowTrigger, - WorkflowTriggerContext, - WorkflowsWorkflowsPage, -} from './resources/automations'; -import { - Editor, - EditorListParams, - EditorResolveURLParams, - EditorResolveURLResponse, - EditorRetrieveParams, - EditorRetrieveResponse, - EditorVersion, - Editors, - EditorsEditorsPage, -} from './resources/editors'; -import { - Breadcrumb, - ErrorEvent, - ErrorLevel, - ErrorReportErrorsParams, - ErrorReportErrorsResponse, - Errors as ErrorsAPIErrors, - ExceptionInfo, - ExceptionMechanism, - RequestInfo as ErrorRequestInfo, - StackFrame, -} from './resources/errors'; -import { - EventListParams, - EventListResponse, - EventListResponsesEntriesPage, - EventWatchParams, - EventWatchResponse, - Events, - ResourceOperation, -} from './resources/events'; +import { Account, AccountDeleteParams, AccountDeleteResponse, AccountGetSSOLoginURLParams, AccountGetSSOLoginURLResponse, AccountListJoinableOrganizationsParams, AccountListLoginProvidersParams, AccountListSSOLoginsParams, AccountListSSOLoginsResponse, AccountListSSOLoginsResponsesLoginsPage, AccountMembership, AccountRetrieveParams, AccountRetrieveResponse, Accounts, JoinableOrganization, JoinableOrganizationsJoinableOrganizationsPage, LoginProvider, LoginProvidersLoginProvidersPage } from './resources/accounts'; +import { AgentCodeContext, AgentCreateExecutionConversationTokenParams, AgentCreateExecutionConversationTokenResponse, AgentCreatePromptParams, AgentCreatePromptResponse, AgentDeleteExecutionParams, AgentDeleteExecutionResponse, AgentDeletePromptParams, AgentDeletePromptResponse, AgentExecution, AgentExecutionsAgentExecutionsPage, AgentListExecutionsParams, AgentListPromptsParams, AgentMessage, AgentMode, AgentRetrieveExecutionParams, AgentRetrieveExecutionResponse, AgentRetrievePromptParams, AgentRetrievePromptResponse, AgentSendToExecutionParams, AgentSendToExecutionResponse, AgentStartExecutionParams, AgentStartExecutionResponse, AgentStopExecutionParams, AgentStopExecutionResponse, AgentUpdatePromptParams, AgentUpdatePromptResponse, Agents, Prompt, PromptMetadata, PromptSpec, PromptsPromptsPage, Role, Type, UserInputBlock, UserInputMetadata, WakeEvent } from './resources/agents'; +import { AutomationCancelExecutionActionParams, AutomationCancelExecutionActionResponse, AutomationCancelExecutionParams, AutomationCancelExecutionResponse, AutomationCreateParams, AutomationCreateResponse, AutomationDeleteParams, AutomationDeleteResponse, AutomationListExecutionActionsParams, AutomationListExecutionOutputsParams, AutomationListExecutionOutputsResponse, AutomationListExecutionOutputsResponsesOutputsPage, AutomationListExecutionsParams, AutomationListParams, AutomationRetrieveExecutionActionParams, AutomationRetrieveExecutionActionResponse, AutomationRetrieveExecutionParams, AutomationRetrieveExecutionResponse, AutomationRetrieveParams, AutomationRetrieveResponse, AutomationStartExecutionParams, AutomationStartExecutionResponse, AutomationUpdateParams, AutomationUpdateResponse, Automations, Workflow, WorkflowAction, WorkflowExecution, WorkflowExecutionAction, WorkflowExecutionActionsWorkflowExecutionActionsPage, WorkflowExecutionsWorkflowExecutionsPage, WorkflowStep, WorkflowTrigger, WorkflowTriggerContext, WorkflowsWorkflowsPage } from './resources/automations'; +import { Editor, EditorListParams, EditorResolveURLParams, EditorResolveURLResponse, EditorRetrieveParams, EditorRetrieveResponse, EditorVersion, Editors, EditorsEditorsPage } from './resources/editors'; +import { Breadcrumb, ErrorEvent, ErrorLevel, ErrorReportErrorsParams, ErrorReportErrorsResponse, Errors as ErrorsAPIErrors, ExceptionInfo, ExceptionMechanism, RequestInfo as ErrorRequestInfo, StackFrame } from './resources/errors'; +import { EventListParams, EventListResponse, EventListResponsesEntriesPage, EventWatchParams, EventWatchResponse, Events, ResourceOperation } from './resources/events'; import { GatewayListParams, Gateways } from './resources/gateways'; -import { - IDTokenVersion, - Identity, - IdentityExchangeTokenParams, - IdentityExchangeTokenResponse, - IdentityGetAuthenticatedIdentityParams, - IdentityGetAuthenticatedIdentityResponse, - IdentityGetIDTokenParams, - IdentityGetIDTokenResponse, -} from './resources/identity'; -import { - Prebuild, - PrebuildCancelParams, - PrebuildCancelResponse, - PrebuildCreateLogsTokenParams, - PrebuildCreateLogsTokenResponse, - PrebuildCreateParams, - PrebuildCreateResponse, - PrebuildCreateWarmPoolParams, - PrebuildCreateWarmPoolResponse, - PrebuildDeleteParams, - PrebuildDeleteResponse, - PrebuildDeleteWarmPoolParams, - PrebuildDeleteWarmPoolResponse, - PrebuildListParams, - PrebuildListWarmPoolsParams, - PrebuildMetadata, - PrebuildPhase, - PrebuildRetrieveParams, - PrebuildRetrieveResponse, - PrebuildRetrieveWarmPoolParams, - PrebuildRetrieveWarmPoolResponse, - PrebuildSpec, - PrebuildStatus, - PrebuildTrigger, - PrebuildUpdateWarmPoolParams, - PrebuildUpdateWarmPoolResponse, - Prebuilds, - PrebuildsPrebuildsPage, - WarmPool, - WarmPoolMetadata, - WarmPoolPhase, - WarmPoolSpec, - WarmPoolStatus, - WarmPoolsWarmPoolsPage, -} from './resources/prebuilds'; -import { - Secret, - SecretCreateParams, - SecretCreateResponse, - SecretDeleteParams, - SecretDeleteResponse, - SecretGetValueParams, - SecretGetValueResponse, - SecretListParams, - SecretScope, - SecretUpdateValueParams, - SecretUpdateValueResponse, - Secrets, - SecretsSecretsPage, -} from './resources/secrets'; -import { - EnvironmentUsageRecord, - EnvironmentUsageRecordsRecordsPage, - Usage, - UsageListEnvironmentRuntimeRecordsParams, -} from './resources/usage'; -import { - AdmissionLevel, - BpfDebugLevel, - Environment, - EnvironmentActivitySignal, - EnvironmentCreateEnvironmentTokenParams, - EnvironmentCreateEnvironmentTokenResponse, - EnvironmentCreateFromProjectParams, - EnvironmentCreateFromProjectResponse, - EnvironmentCreateLogsTokenParams, - EnvironmentCreateLogsTokenResponse, - EnvironmentCreateParams, - EnvironmentCreateResponse, - EnvironmentDeleteParams, - EnvironmentDeleteResponse, - EnvironmentListParams, - EnvironmentMarkActiveParams, - EnvironmentMarkActiveResponse, - EnvironmentMetadata, - EnvironmentPhase, - EnvironmentRetrieveParams, - EnvironmentRetrieveResponse, - EnvironmentRole, - EnvironmentSpec, - EnvironmentStartParams, - EnvironmentStartResponse, - EnvironmentStatus, - EnvironmentStopParams, - EnvironmentStopResponse, - EnvironmentUnarchiveParams, - EnvironmentUnarchiveResponse, - EnvironmentUpdateParams, - EnvironmentUpdateResponse, - Environments, - EnvironmentsEnvironmentsPage, - KernelControlsConfig, - Veto, -} from './resources/environments/environments'; -import { - Group, - GroupCreateParams, - GroupCreateResponse, - GroupDeleteParams, - GroupDeleteResponse, - GroupListParams, - GroupRetrieveParams, - GroupRetrieveResponse, - GroupUpdateParams, - GroupUpdateResponse, - Groups, - GroupsGroupsPage, -} from './resources/groups/groups'; -import { - InviteDomains, - Organization, - OrganizationCreateParams, - OrganizationCreateResponse, - OrganizationDeleteParams, - OrganizationDeleteResponse, - OrganizationJoinParams, - OrganizationJoinResponse, - OrganizationLeaveParams, - OrganizationLeaveResponse, - OrganizationListMembersParams, - OrganizationMember, - OrganizationMembersMembersPage, - OrganizationRetrieveParams, - OrganizationRetrieveResponse, - OrganizationSetRoleParams, - OrganizationSetRoleResponse, - OrganizationUpdateParams, - OrganizationUpdateResponse, - Organizations, -} from './resources/organizations/organizations'; -import { - EnvironmentInitializer, - Project, - ProjectBulkCreateParams, - ProjectBulkCreateResponse, - ProjectBulkDeleteParams, - ProjectBulkDeleteResponse, - ProjectBulkUpdateParams, - ProjectBulkUpdateResponse, - ProjectCreateFromEnvironmentParams, - ProjectCreateFromEnvironmentResponse, - ProjectCreateParams, - ProjectCreateResponse, - ProjectDeleteParams, - ProjectDeleteResponse, - ProjectListParams, - ProjectMetadata, - ProjectPhase, - ProjectPrebuildConfiguration, - ProjectRetrieveParams, - ProjectRetrieveResponse, - ProjectUpdateParams, - ProjectUpdateResponse, - Projects, - ProjectsProjectsPage, - RecommendedEditors, -} from './resources/projects/projects'; -import { - GatewayInfo, - LogLevel, - MetricsConfiguration, - Runner, - RunnerCapability, - RunnerCheckAuthenticationForHostParams, - RunnerCheckAuthenticationForHostResponse, - RunnerCheckRepositoryAccessParams, - RunnerCheckRepositoryAccessResponse, - RunnerConfiguration, - RunnerCreateLogsTokenParams, - RunnerCreateLogsTokenResponse, - RunnerCreateParams, - RunnerCreateResponse, - RunnerCreateRunnerTokenParams, - RunnerCreateRunnerTokenResponse, - RunnerDeleteParams, - RunnerDeleteResponse, - RunnerKind, - RunnerListParams, - RunnerListScmOrganizationsParams, - RunnerListScmOrganizationsResponse, - RunnerListScmOrganizationsResponsesOrganizationsPage, - RunnerParseContextURLParams, - RunnerParseContextURLResponse, - RunnerPhase, - RunnerProvider, - RunnerReleaseChannel, - RunnerRetrieveParams, - RunnerRetrieveResponse, - RunnerSearchRepositoriesParams, - RunnerSearchRepositoriesResponse, - RunnerSpec, - RunnerStatus, - RunnerUpdateParams, - RunnerUpdateResponse, - RunnerVariant, - Runners, - RunnersRunnersPage, - SearchMode, - UpdateWindow, -} from './resources/runners/runners'; -import { - User, - UserDeleteUserParams, - UserDeleteUserResponse, - UserGetAuthenticatedUserParams, - UserGetAuthenticatedUserResponse, - UserGetUserParams, - UserGetUserResponse, - UserSetSuspendedParams, - UserSetSuspendedResponse, - Users, -} from './resources/users/users'; +import { IDTokenVersion, Identity, IdentityExchangeTokenParams, IdentityExchangeTokenResponse, IdentityGetAuthenticatedIdentityParams, IdentityGetAuthenticatedIdentityResponse, IdentityGetIDTokenParams, IdentityGetIDTokenResponse } from './resources/identity'; +import { Prebuild, PrebuildCancelParams, PrebuildCancelResponse, PrebuildCreateLogsTokenParams, PrebuildCreateLogsTokenResponse, PrebuildCreateParams, PrebuildCreateResponse, PrebuildCreateWarmPoolParams, PrebuildCreateWarmPoolResponse, PrebuildDeleteParams, PrebuildDeleteResponse, PrebuildDeleteWarmPoolParams, PrebuildDeleteWarmPoolResponse, PrebuildListParams, PrebuildListWarmPoolsParams, PrebuildMetadata, PrebuildPhase, PrebuildRetrieveParams, PrebuildRetrieveResponse, PrebuildRetrieveWarmPoolParams, PrebuildRetrieveWarmPoolResponse, PrebuildSpec, PrebuildStatus, PrebuildTrigger, PrebuildUpdateWarmPoolParams, PrebuildUpdateWarmPoolResponse, Prebuilds, PrebuildsPrebuildsPage, WarmPool, WarmPoolMetadata, WarmPoolPhase, WarmPoolSpec, WarmPoolStatus, WarmPoolsWarmPoolsPage } from './resources/prebuilds'; +import { Secret, SecretCreateParams, SecretCreateResponse, SecretDeleteParams, SecretDeleteResponse, SecretGetValueParams, SecretGetValueResponse, SecretListParams, SecretScope, SecretUpdateValueParams, SecretUpdateValueResponse, Secrets, SecretsSecretsPage } from './resources/secrets'; +import { EnvironmentUsageRecord, EnvironmentUsageRecordsRecordsPage, Usage, UsageListEnvironmentRuntimeRecordsParams } from './resources/usage'; +import { AdmissionLevel, BpfDebugLevel, Environment, EnvironmentActivitySignal, EnvironmentCreateEnvironmentTokenParams, EnvironmentCreateEnvironmentTokenResponse, EnvironmentCreateFromProjectParams, EnvironmentCreateFromProjectResponse, EnvironmentCreateLogsTokenParams, EnvironmentCreateLogsTokenResponse, EnvironmentCreateParams, EnvironmentCreateResponse, EnvironmentDeleteParams, EnvironmentDeleteResponse, EnvironmentListParams, EnvironmentMarkActiveParams, EnvironmentMarkActiveResponse, EnvironmentMetadata, EnvironmentPhase, EnvironmentRetrieveParams, EnvironmentRetrieveResponse, EnvironmentRole, EnvironmentSpec, EnvironmentStartParams, EnvironmentStartResponse, EnvironmentStatus, EnvironmentStopParams, EnvironmentStopResponse, EnvironmentUnarchiveParams, EnvironmentUnarchiveResponse, EnvironmentUpdateParams, EnvironmentUpdateResponse, Environments, EnvironmentsEnvironmentsPage, KernelControlsConfig, Veto } from './resources/environments/environments'; +import { Group, GroupCreateParams, GroupCreateResponse, GroupDeleteParams, GroupDeleteResponse, GroupListParams, GroupRetrieveParams, GroupRetrieveResponse, GroupUpdateParams, GroupUpdateResponse, Groups, GroupsGroupsPage } from './resources/groups/groups'; +import { InviteDomains, Organization, OrganizationCreateParams, OrganizationCreateResponse, OrganizationDeleteParams, OrganizationDeleteResponse, OrganizationJoinParams, OrganizationJoinResponse, OrganizationLeaveParams, OrganizationLeaveResponse, OrganizationListMembersParams, OrganizationMember, OrganizationMembersMembersPage, OrganizationRetrieveParams, OrganizationRetrieveResponse, OrganizationSetRoleParams, OrganizationSetRoleResponse, OrganizationUpdateParams, OrganizationUpdateResponse, Organizations } from './resources/organizations/organizations'; +import { EnvironmentInitializer, Project, ProjectBulkCreateParams, ProjectBulkCreateResponse, ProjectBulkDeleteParams, ProjectBulkDeleteResponse, ProjectBulkUpdateParams, ProjectBulkUpdateResponse, ProjectCreateFromEnvironmentParams, ProjectCreateFromEnvironmentResponse, ProjectCreateParams, ProjectCreateResponse, ProjectDeleteParams, ProjectDeleteResponse, ProjectListParams, ProjectMetadata, ProjectPhase, ProjectPrebuildConfiguration, ProjectRetrieveParams, ProjectRetrieveResponse, ProjectUpdateParams, ProjectUpdateResponse, Projects, ProjectsProjectsPage, RecommendedEditors } from './resources/projects/projects'; +import { GatewayInfo, LogLevel, MetricsConfiguration, Runner, RunnerCapability, RunnerCheckAuthenticationForHostParams, RunnerCheckAuthenticationForHostResponse, RunnerCheckRepositoryAccessParams, RunnerCheckRepositoryAccessResponse, RunnerConfiguration, RunnerCreateLogsTokenParams, RunnerCreateLogsTokenResponse, RunnerCreateParams, RunnerCreateResponse, RunnerCreateRunnerTokenParams, RunnerCreateRunnerTokenResponse, RunnerDeleteParams, RunnerDeleteResponse, RunnerKind, RunnerListParams, RunnerListScmOrganizationsParams, RunnerListScmOrganizationsResponse, RunnerListScmOrganizationsResponsesOrganizationsPage, RunnerParseContextURLParams, RunnerParseContextURLResponse, RunnerPhase, RunnerProvider, RunnerReleaseChannel, RunnerRetrieveParams, RunnerRetrieveResponse, RunnerSearchRepositoriesParams, RunnerSearchRepositoriesResponse, RunnerSpec, RunnerStatus, RunnerUpdateParams, RunnerUpdateResponse, RunnerVariant, Runners, RunnersRunnersPage, SearchMode, UpdateWindow } from './resources/runners/runners'; +import { User, UserDeleteUserParams, UserDeleteUserResponse, UserGetAuthenticatedUserParams, UserGetAuthenticatedUserResponse, UserGetUserParams, UserGetUserResponse, UserSetSuspendedParams, UserSetSuspendedResponse, Users } from './resources/users/users'; import { type Fetch } from './internal/builtin-types'; import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers'; import { FinalRequestOptions, RequestOptions } from './internal/request-options'; @@ -534,7 +125,7 @@ export interface ClientOptions { } /** - * API Client for interfacing with the Gitpod API. + * API Client for interfacing with the Gitpod API. */ export class Gitpod { bearerToken: string; @@ -570,7 +161,7 @@ export class Gitpod { }: ClientOptions = {}) { if (bearerToken === undefined) { throw new Errors.GitpodError( - "The GITPOD_API_KEY environment variable is missing or empty; either provide it, or instantiate the Gitpod client with an bearerToken option, like new Gitpod({ bearerToken: 'My Bearer Token' }).", + 'The GITPOD_API_KEY environment variable is missing or empty; either provide it, or instantiate the Gitpod client with an bearerToken option, like new Gitpod({ bearerToken: \'My Bearer Token\' }).' ); } @@ -586,10 +177,7 @@ export class Gitpod { const defaultLogLevel = 'warn'; // Set default logLevel early so that we can log a warning in parseLogLevel. this.logLevel = defaultLogLevel; - this.logLevel = - parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? - parseLogLevel(readEnv('GITPOD_LOG'), "process.env['GITPOD_LOG']", this) ?? - defaultLogLevel; + this.logLevel = parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? parseLogLevel(readEnv('GITPOD_LOG'), 'process.env[\'GITPOD_LOG\']', this) ?? defaultLogLevel; this.fetchOptions = options.fetchOptions; this.maxRetries = options.maxRetries ?? 2; this.fetch = options.fetch ?? Shims.getDefaultFetch(); @@ -614,7 +202,7 @@ export class Gitpod { fetch: this.fetch, fetchOptions: this.fetchOptions, bearerToken: this.bearerToken, - ...options, + ...options }); return client; } @@ -627,7 +215,7 @@ export class Gitpod { } protected defaultQuery(): Record | undefined { - return this._options.defaultQuery; + return this._options.defaultQuery } protected validateHeaders({ values, nulls }: NullableHeaders) { @@ -662,11 +250,7 @@ export class Gitpod { return Errors.APIError.generate(status, error, message, headers); } - buildURL( - path: string, - query: Record | null | undefined, - defaultBaseURL?: string | undefined, - ): string { + buildURL(path: string, query: Record | null | undefined, defaultBaseURL?: string | undefined): string { const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL; const url = isAbsoluteURL(path) ? @@ -754,9 +338,7 @@ export class Gitpod { await this.prepareOptions(options); - const { req, url, timeout } = await this.buildRequest(options, { - retryCount: maxRetries - retriesRemaining, - }); + const { req, url, timeout } = await this.buildRequest(options, { retryCount: maxRetries - retriesRemaining }); await this.prepareRequest(req, { url, options }); @@ -765,16 +347,7 @@ export class Gitpod { const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`; const startTime = Date.now(); - loggerFor(this).debug( - `[${requestLogID}] sending request`, - formatRequestDetails({ - retryOfRequestLogID, - method: options.method, - url, - options, - headers: req.headers, - }), - ); + loggerFor(this).debug(`[${requestLogID}] sending request`, formatRequestDetails({ retryOfRequestLogID, method: options.method, url, options, headers: req.headers })); if (options.signal?.aborted) { throw new Errors.APIUserAbortError(); @@ -793,45 +366,21 @@ export class Gitpod { // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)" // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)" // others do not provide enough information to distinguish timeouts from other connection errors - const isTimeout = - isAbortError(response) || - /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')); + const isTimeout = isAbortError(response) || /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')) if (retriesRemaining) { - loggerFor(this).info( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`, - ); - loggerFor(this).debug( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, - formatRequestDetails({ - retryOfRequestLogID, - url, - durationMs: headersTime - startTime, - message: response.message, - }), - ); + loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`) + loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID); } - loggerFor(this).info( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`, - ); - loggerFor(this).debug( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, - formatRequestDetails({ - retryOfRequestLogID, - url, - durationMs: headersTime - startTime, - message: response.message, - }), - ); + loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`) + loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); if (isTimeout) { throw new Errors.APIConnectionTimeoutError(); } throw new Errors.APIConnectionError({ cause: response }); } - const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${ - response.ok ? 'succeeded' : 'failed' - } with status ${response.status} in ${headersTime - startTime}ms`; + const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${response.ok ? 'succeeded' : 'failed'} with status ${response.status} in ${headersTime - startTime}ms`; if (!response.ok) { const shouldRetry = await this.shouldRetry(response); @@ -840,60 +389,27 @@ export class Gitpod { // We don't need the body of this response. await Shims.CancelReadableStream(response.body); - loggerFor(this).info(`${responseInfo} - ${retryMessage}`); - loggerFor(this).debug( - `[${requestLogID}] response error (${retryMessage})`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - headers: response.headers, - durationMs: headersTime - startTime, - }), - ); - return this.retryRequest( - options, - retriesRemaining, - retryOfRequestLogID ?? requestLogID, - response.headers, - ); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`) + loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); + return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID, response.headers); } const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`; - loggerFor(this).info(`${responseInfo} - ${retryMessage}`); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`) const errText = await response.text().catch((err: any) => castToError(err).message); const errJSON = safeJSON(errText) as any; const errMessage = errJSON ? undefined : errText; - loggerFor(this).debug( - `[${requestLogID}] response error (${retryMessage})`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - headers: response.headers, - message: errMessage, - durationMs: Date.now() - startTime, - }), - ); + loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, message: errMessage, durationMs: Date.now() - startTime })); const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers); throw err; } - loggerFor(this).info(responseInfo); - loggerFor(this).debug( - `[${requestLogID}] response start`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - headers: response.headers, - durationMs: headersTime - startTime, - }), - ); + loggerFor(this).info(responseInfo) + loggerFor(this).debug(`[${requestLogID}] response start`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); return { response, options, controller, requestLogID, retryOfRequestLogID, startTime }; } @@ -911,10 +427,7 @@ export class Gitpod { ); } - requestAPIList< - Item = unknown, - PageClass extends Pagination.AbstractPage = Pagination.AbstractPage, - >( + requestAPIList = Pagination.AbstractPage>( Page: new (...args: ConstructorParameters) => PageClass, options: PromiseOrValue, ): Pagination.PagePromise { @@ -934,9 +447,7 @@ export class Gitpod { const timeout = setTimeout(abort, ms); - const isReadableBody = - ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || - (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body); + const isReadableBody = ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || (typeof options.body === "object" && options.body !== null && Symbol.asyncIterator in options.body); const fetchOptions: RequestInit = { signal: controller.signal as any, @@ -951,6 +462,7 @@ export class Gitpod { } try { + // use undefined this binding; fetch errors if bound to something else in browser/cloudflare return await this.fetch.call(undefined, url, fetchOptions); } finally { @@ -1051,12 +563,11 @@ export class Gitpod { const req: FinalizedRequestInit = { method, headers: reqHeaders, - ...(options.signal && { signal: options.signal }), - ...((globalThis as any).ReadableStream && - body instanceof (globalThis as any).ReadableStream && { duplex: 'half' }), + ...(options.signal && { signal: options.signal}), + ...((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream && { duplex: "half" }), ...(body && { body }), - ...((this.fetchOptions as any) ?? {}), - ...((options.fetchOptions as any) ?? {}), + ...(this.fetchOptions as any ?? {}), + ...(options.fetchOptions as any ?? {}), }; return { req, url, timeout: options.timeout }; @@ -1081,17 +592,15 @@ export class Gitpod { const headers = buildHeaders([ idempotencyHeaders, - { - Accept: 'application/json', - 'User-Agent': this.getUserAgent(), - 'X-Stainless-Retry-Count': String(retryCount), - ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), - ...getPlatformHeaders(), - }, + {Accept: 'application/json', + 'User-Agent': this.getUserAgent(), + 'X-Stainless-Retry-Count': String(retryCount), + ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), + ...getPlatformHeaders()}, await this.authHeaders(options), this._options.defaultHeaders, bodyHeaders, - options.headers, + options.headers ]); this.validateHeaders(headers); @@ -1118,9 +627,11 @@ export class Gitpod { ArrayBuffer.isView(body) || body instanceof ArrayBuffer || body instanceof DataView || - (typeof body === 'string' && + ( + typeof body === 'string' && // Preserve legacy string encoding behavior for now - headers.values.has('content-type')) || + headers.values.has('content-type') + ) || // `Blob` is superset of `File` ((globalThis as any).Blob && body instanceof (globalThis as any).Blob) || // `FormData` -> `multipart/form-data` @@ -1151,7 +662,7 @@ export class Gitpod { } static Gitpod = this; - static DEFAULT_TIMEOUT = 60000; // 1 minute + static DEFAULT_TIMEOUT = 60000 // 1 minute static GitpodError = Errors.GitpodError; static APIError = Errors.APIError; @@ -1218,572 +729,623 @@ Gitpod.Usage = Usage; Gitpod.Users = Users; export declare namespace Gitpod { - export type RequestOptions = Opts.RequestOptions; - - export import AgentExecutionsPage = Pagination.AgentExecutionsPage; - export { - type AgentExecutionsPageParams as AgentExecutionsPageParams, - type AgentExecutionsPageResponse as AgentExecutionsPageResponse, - }; - - export import AssignmentsPage = Pagination.AssignmentsPage; - export { - type AssignmentsPageParams as AssignmentsPageParams, - type AssignmentsPageResponse as AssignmentsPageResponse, - }; - - export import DomainVerificationsPage = Pagination.DomainVerificationsPage; - export { - type DomainVerificationsPageParams as DomainVerificationsPageParams, - type DomainVerificationsPageResponse as DomainVerificationsPageResponse, - }; - - export import EditorsPage = Pagination.EditorsPage; - export { type EditorsPageParams as EditorsPageParams, type EditorsPageResponse as EditorsPageResponse }; - - export import EntriesPage = Pagination.EntriesPage; - export { type EntriesPageParams as EntriesPageParams, type EntriesPageResponse as EntriesPageResponse }; - - export import EnvironmentClassesPage = Pagination.EnvironmentClassesPage; - export { - type EnvironmentClassesPageParams as EnvironmentClassesPageParams, - type EnvironmentClassesPageResponse as EnvironmentClassesPageResponse, - }; - - export import EnvironmentsPage = Pagination.EnvironmentsPage; - export { - type EnvironmentsPageParams as EnvironmentsPageParams, - type EnvironmentsPageResponse as EnvironmentsPageResponse, - }; - - export import GatewaysPage = Pagination.GatewaysPage; - export { type GatewaysPageParams as GatewaysPageParams, type GatewaysPageResponse as GatewaysPageResponse }; - - export import GroupsPage = Pagination.GroupsPage; - export { type GroupsPageParams as GroupsPageParams, type GroupsPageResponse as GroupsPageResponse }; - - export import IntegrationsPage = Pagination.IntegrationsPage; - export { - type IntegrationsPageParams as IntegrationsPageParams, - type IntegrationsPageResponse as IntegrationsPageResponse, - }; - - export import JoinableOrganizationsPage = Pagination.JoinableOrganizationsPage; - export { - type JoinableOrganizationsPageParams as JoinableOrganizationsPageParams, - type JoinableOrganizationsPageResponse as JoinableOrganizationsPageResponse, - }; - - export import LoginProvidersPage = Pagination.LoginProvidersPage; - export { - type LoginProvidersPageParams as LoginProvidersPageParams, - type LoginProvidersPageResponse as LoginProvidersPageResponse, - }; - - export import LoginsPage = Pagination.LoginsPage; - export { type LoginsPageParams as LoginsPageParams, type LoginsPageResponse as LoginsPageResponse }; - - export import MembersPage = Pagination.MembersPage; - export { type MembersPageParams as MembersPageParams, type MembersPageResponse as MembersPageResponse }; - - export import OrganizationsPage = Pagination.OrganizationsPage; - export { - type OrganizationsPageParams as OrganizationsPageParams, - type OrganizationsPageResponse as OrganizationsPageResponse, - }; - - export import OutputsPage = Pagination.OutputsPage; - export { type OutputsPageParams as OutputsPageParams, type OutputsPageResponse as OutputsPageResponse }; - - export import PersonalAccessTokensPage = Pagination.PersonalAccessTokensPage; - export { - type PersonalAccessTokensPageParams as PersonalAccessTokensPageParams, - type PersonalAccessTokensPageResponse as PersonalAccessTokensPageResponse, - }; - - export import PoliciesPage = Pagination.PoliciesPage; - export { type PoliciesPageParams as PoliciesPageParams, type PoliciesPageResponse as PoliciesPageResponse }; - - export import PrebuildsPage = Pagination.PrebuildsPage; - export { - type PrebuildsPageParams as PrebuildsPageParams, - type PrebuildsPageResponse as PrebuildsPageResponse, - }; - - export import ProjectEnvironmentClassesPage = Pagination.ProjectEnvironmentClassesPage; - export { - type ProjectEnvironmentClassesPageParams as ProjectEnvironmentClassesPageParams, - type ProjectEnvironmentClassesPageResponse as ProjectEnvironmentClassesPageResponse, - }; - - export import ProjectsPage = Pagination.ProjectsPage; - export { type ProjectsPageParams as ProjectsPageParams, type ProjectsPageResponse as ProjectsPageResponse }; - - export import PromptsPage = Pagination.PromptsPage; - export { type PromptsPageParams as PromptsPageParams, type PromptsPageResponse as PromptsPageResponse }; - - export import RecordsPage = Pagination.RecordsPage; - export { type RecordsPageParams as RecordsPageParams, type RecordsPageResponse as RecordsPageResponse }; - - export import RepositoriesPage = Pagination.RepositoriesPage; - export { - type RepositoriesPageParams as RepositoriesPageParams, - type RepositoriesPageResponse as RepositoriesPageResponse, - }; - - export import RunnersPage = Pagination.RunnersPage; - export { type RunnersPageParams as RunnersPageParams, type RunnersPageResponse as RunnersPageResponse }; - - export import ScimConfigurationsPage = Pagination.ScimConfigurationsPage; - export { - type ScimConfigurationsPageParams as ScimConfigurationsPageParams, - type ScimConfigurationsPageResponse as ScimConfigurationsPageResponse, - }; - - export import SecretsPage = Pagination.SecretsPage; - export { type SecretsPageParams as SecretsPageParams, type SecretsPageResponse as SecretsPageResponse }; - - export import ServicesPage = Pagination.ServicesPage; - export { type ServicesPageParams as ServicesPageParams, type ServicesPageResponse as ServicesPageResponse }; - - export import SSOConfigurationsPage = Pagination.SSOConfigurationsPage; - export { - type SSOConfigurationsPageParams as SSOConfigurationsPageParams, - type SSOConfigurationsPageResponse as SSOConfigurationsPageResponse, - }; - - export import TaskExecutionsPage = Pagination.TaskExecutionsPage; - export { - type TaskExecutionsPageParams as TaskExecutionsPageParams, - type TaskExecutionsPageResponse as TaskExecutionsPageResponse, - }; - - export import TasksPage = Pagination.TasksPage; - export { type TasksPageParams as TasksPageParams, type TasksPageResponse as TasksPageResponse }; - - export import TokensPage = Pagination.TokensPage; - export { type TokensPageParams as TokensPageParams, type TokensPageResponse as TokensPageResponse }; - - export import WarmPoolsPage = Pagination.WarmPoolsPage; - export { - type WarmPoolsPageParams as WarmPoolsPageParams, - type WarmPoolsPageResponse as WarmPoolsPageResponse, - }; - - export import WorkflowExecutionActionsPage = Pagination.WorkflowExecutionActionsPage; - export { - type WorkflowExecutionActionsPageParams as WorkflowExecutionActionsPageParams, - type WorkflowExecutionActionsPageResponse as WorkflowExecutionActionsPageResponse, - }; - - export import WorkflowExecutionsPage = Pagination.WorkflowExecutionsPage; - export { - type WorkflowExecutionsPageParams as WorkflowExecutionsPageParams, - type WorkflowExecutionsPageResponse as WorkflowExecutionsPageResponse, - }; - - export import WorkflowsPage = Pagination.WorkflowsPage; - export { - type WorkflowsPageParams as WorkflowsPageParams, - type WorkflowsPageResponse as WorkflowsPageResponse, - }; - - export { - Accounts as Accounts, - type Account as Account, - type AccountMembership as AccountMembership, - type JoinableOrganization as JoinableOrganization, - type LoginProvider as LoginProvider, - type AccountRetrieveResponse as AccountRetrieveResponse, - type AccountDeleteResponse as AccountDeleteResponse, - type AccountGetSSOLoginURLResponse as AccountGetSSOLoginURLResponse, - type AccountListSSOLoginsResponse as AccountListSSOLoginsResponse, - type JoinableOrganizationsJoinableOrganizationsPage as JoinableOrganizationsJoinableOrganizationsPage, - type LoginProvidersLoginProvidersPage as LoginProvidersLoginProvidersPage, - type AccountListSSOLoginsResponsesLoginsPage as AccountListSSOLoginsResponsesLoginsPage, - type AccountRetrieveParams as AccountRetrieveParams, - type AccountDeleteParams as AccountDeleteParams, - type AccountGetSSOLoginURLParams as AccountGetSSOLoginURLParams, - type AccountListJoinableOrganizationsParams as AccountListJoinableOrganizationsParams, - type AccountListLoginProvidersParams as AccountListLoginProvidersParams, - type AccountListSSOLoginsParams as AccountListSSOLoginsParams, - }; - - export { - Agents as Agents, - type AgentCodeContext as AgentCodeContext, - type AgentExecution as AgentExecution, - type AgentMessage as AgentMessage, - type AgentMode as AgentMode, - type Prompt as Prompt, - type PromptMetadata as PromptMetadata, - type PromptSpec as PromptSpec, - type Role as Role, - type Type as Type, - type UserInputBlock as UserInputBlock, - type UserInputMetadata as UserInputMetadata, - type WakeEvent as WakeEvent, - type AgentCreateExecutionConversationTokenResponse as AgentCreateExecutionConversationTokenResponse, - type AgentCreatePromptResponse as AgentCreatePromptResponse, - type AgentDeleteExecutionResponse as AgentDeleteExecutionResponse, - type AgentDeletePromptResponse as AgentDeletePromptResponse, - type AgentRetrieveExecutionResponse as AgentRetrieveExecutionResponse, - type AgentRetrievePromptResponse as AgentRetrievePromptResponse, - type AgentSendToExecutionResponse as AgentSendToExecutionResponse, - type AgentStartExecutionResponse as AgentStartExecutionResponse, - type AgentStopExecutionResponse as AgentStopExecutionResponse, - type AgentUpdatePromptResponse as AgentUpdatePromptResponse, - type AgentExecutionsAgentExecutionsPage as AgentExecutionsAgentExecutionsPage, - type PromptsPromptsPage as PromptsPromptsPage, - type AgentCreateExecutionConversationTokenParams as AgentCreateExecutionConversationTokenParams, - type AgentCreatePromptParams as AgentCreatePromptParams, - type AgentDeleteExecutionParams as AgentDeleteExecutionParams, - type AgentDeletePromptParams as AgentDeletePromptParams, - type AgentListExecutionsParams as AgentListExecutionsParams, - type AgentListPromptsParams as AgentListPromptsParams, - type AgentRetrieveExecutionParams as AgentRetrieveExecutionParams, - type AgentRetrievePromptParams as AgentRetrievePromptParams, - type AgentSendToExecutionParams as AgentSendToExecutionParams, - type AgentStartExecutionParams as AgentStartExecutionParams, - type AgentStopExecutionParams as AgentStopExecutionParams, - type AgentUpdatePromptParams as AgentUpdatePromptParams, - }; - - export { - Automations as Automations, - type Workflow as Workflow, - type WorkflowAction as WorkflowAction, - type WorkflowExecution as WorkflowExecution, - type WorkflowExecutionAction as WorkflowExecutionAction, - type WorkflowStep as WorkflowStep, - type WorkflowTrigger as WorkflowTrigger, - type WorkflowTriggerContext as WorkflowTriggerContext, - type AutomationCreateResponse as AutomationCreateResponse, - type AutomationRetrieveResponse as AutomationRetrieveResponse, - type AutomationUpdateResponse as AutomationUpdateResponse, - type AutomationDeleteResponse as AutomationDeleteResponse, - type AutomationCancelExecutionResponse as AutomationCancelExecutionResponse, - type AutomationCancelExecutionActionResponse as AutomationCancelExecutionActionResponse, - type AutomationListExecutionOutputsResponse as AutomationListExecutionOutputsResponse, - type AutomationRetrieveExecutionResponse as AutomationRetrieveExecutionResponse, - type AutomationRetrieveExecutionActionResponse as AutomationRetrieveExecutionActionResponse, - type AutomationStartExecutionResponse as AutomationStartExecutionResponse, - type WorkflowsWorkflowsPage as WorkflowsWorkflowsPage, - type WorkflowExecutionActionsWorkflowExecutionActionsPage as WorkflowExecutionActionsWorkflowExecutionActionsPage, - type AutomationListExecutionOutputsResponsesOutputsPage as AutomationListExecutionOutputsResponsesOutputsPage, - type WorkflowExecutionsWorkflowExecutionsPage as WorkflowExecutionsWorkflowExecutionsPage, - type AutomationCreateParams as AutomationCreateParams, - type AutomationRetrieveParams as AutomationRetrieveParams, - type AutomationUpdateParams as AutomationUpdateParams, - type AutomationListParams as AutomationListParams, - type AutomationDeleteParams as AutomationDeleteParams, - type AutomationCancelExecutionParams as AutomationCancelExecutionParams, - type AutomationCancelExecutionActionParams as AutomationCancelExecutionActionParams, - type AutomationListExecutionActionsParams as AutomationListExecutionActionsParams, - type AutomationListExecutionOutputsParams as AutomationListExecutionOutputsParams, - type AutomationListExecutionsParams as AutomationListExecutionsParams, - type AutomationRetrieveExecutionParams as AutomationRetrieveExecutionParams, - type AutomationRetrieveExecutionActionParams as AutomationRetrieveExecutionActionParams, - type AutomationStartExecutionParams as AutomationStartExecutionParams, - }; - - export { - Editors as Editors, - type Editor as Editor, - type EditorVersion as EditorVersion, - type EditorRetrieveResponse as EditorRetrieveResponse, - type EditorResolveURLResponse as EditorResolveURLResponse, - type EditorsEditorsPage as EditorsEditorsPage, - type EditorRetrieveParams as EditorRetrieveParams, - type EditorListParams as EditorListParams, - type EditorResolveURLParams as EditorResolveURLParams, - }; - - export { - Environments as Environments, - type AdmissionLevel as AdmissionLevel, - type BpfDebugLevel as BpfDebugLevel, - type Environment as Environment, - type EnvironmentActivitySignal as EnvironmentActivitySignal, - type EnvironmentMetadata as EnvironmentMetadata, - type EnvironmentPhase as EnvironmentPhase, - type EnvironmentRole as EnvironmentRole, - type EnvironmentSpec as EnvironmentSpec, - type EnvironmentStatus as EnvironmentStatus, - type KernelControlsConfig as KernelControlsConfig, - type Veto as Veto, - type EnvironmentCreateResponse as EnvironmentCreateResponse, - type EnvironmentRetrieveResponse as EnvironmentRetrieveResponse, - type EnvironmentUpdateResponse as EnvironmentUpdateResponse, - type EnvironmentDeleteResponse as EnvironmentDeleteResponse, - type EnvironmentCreateEnvironmentTokenResponse as EnvironmentCreateEnvironmentTokenResponse, - type EnvironmentCreateFromProjectResponse as EnvironmentCreateFromProjectResponse, - type EnvironmentCreateLogsTokenResponse as EnvironmentCreateLogsTokenResponse, - type EnvironmentMarkActiveResponse as EnvironmentMarkActiveResponse, - type EnvironmentStartResponse as EnvironmentStartResponse, - type EnvironmentStopResponse as EnvironmentStopResponse, - type EnvironmentUnarchiveResponse as EnvironmentUnarchiveResponse, - type EnvironmentsEnvironmentsPage as EnvironmentsEnvironmentsPage, - type EnvironmentCreateParams as EnvironmentCreateParams, - type EnvironmentRetrieveParams as EnvironmentRetrieveParams, - type EnvironmentUpdateParams as EnvironmentUpdateParams, - type EnvironmentListParams as EnvironmentListParams, - type EnvironmentDeleteParams as EnvironmentDeleteParams, - type EnvironmentCreateEnvironmentTokenParams as EnvironmentCreateEnvironmentTokenParams, - type EnvironmentCreateFromProjectParams as EnvironmentCreateFromProjectParams, - type EnvironmentCreateLogsTokenParams as EnvironmentCreateLogsTokenParams, - type EnvironmentMarkActiveParams as EnvironmentMarkActiveParams, - type EnvironmentStartParams as EnvironmentStartParams, - type EnvironmentStopParams as EnvironmentStopParams, - type EnvironmentUnarchiveParams as EnvironmentUnarchiveParams, - }; - - export { - ErrorsAPIErrors as Errors, - type Breadcrumb as Breadcrumb, - type ErrorEvent as ErrorEvent, - type ErrorLevel as ErrorLevel, - type ExceptionInfo as ExceptionInfo, - type ExceptionMechanism as ExceptionMechanism, - type ErrorRequestInfo as RequestInfo, - type StackFrame as StackFrame, - type ErrorReportErrorsResponse as ErrorReportErrorsResponse, - type ErrorReportErrorsParams as ErrorReportErrorsParams, - }; - - export { - Events as Events, - type ResourceOperation as ResourceOperation, - type EventListResponse as EventListResponse, - type EventWatchResponse as EventWatchResponse, - type EventListResponsesEntriesPage as EventListResponsesEntriesPage, - type EventListParams as EventListParams, - type EventWatchParams as EventWatchParams, - }; - - export { Gateways as Gateways, type GatewayListParams as GatewayListParams }; - - export { - Groups as Groups, - type Group as Group, - type GroupCreateResponse as GroupCreateResponse, - type GroupRetrieveResponse as GroupRetrieveResponse, - type GroupUpdateResponse as GroupUpdateResponse, - type GroupDeleteResponse as GroupDeleteResponse, - type GroupsGroupsPage as GroupsGroupsPage, - type GroupCreateParams as GroupCreateParams, - type GroupRetrieveParams as GroupRetrieveParams, - type GroupUpdateParams as GroupUpdateParams, - type GroupListParams as GroupListParams, - type GroupDeleteParams as GroupDeleteParams, - }; - - export { - Identity as Identity, - type IDTokenVersion as IDTokenVersion, - type IdentityExchangeTokenResponse as IdentityExchangeTokenResponse, - type IdentityGetAuthenticatedIdentityResponse as IdentityGetAuthenticatedIdentityResponse, - type IdentityGetIDTokenResponse as IdentityGetIDTokenResponse, - type IdentityExchangeTokenParams as IdentityExchangeTokenParams, - type IdentityGetAuthenticatedIdentityParams as IdentityGetAuthenticatedIdentityParams, - type IdentityGetIDTokenParams as IdentityGetIDTokenParams, - }; - - export { - Organizations as Organizations, - type InviteDomains as InviteDomains, - type Organization as Organization, - type OrganizationMember as OrganizationMember, - type OrganizationCreateResponse as OrganizationCreateResponse, - type OrganizationRetrieveResponse as OrganizationRetrieveResponse, - type OrganizationUpdateResponse as OrganizationUpdateResponse, - type OrganizationDeleteResponse as OrganizationDeleteResponse, - type OrganizationJoinResponse as OrganizationJoinResponse, - type OrganizationLeaveResponse as OrganizationLeaveResponse, - type OrganizationSetRoleResponse as OrganizationSetRoleResponse, - type OrganizationMembersMembersPage as OrganizationMembersMembersPage, - type OrganizationCreateParams as OrganizationCreateParams, - type OrganizationRetrieveParams as OrganizationRetrieveParams, - type OrganizationUpdateParams as OrganizationUpdateParams, - type OrganizationDeleteParams as OrganizationDeleteParams, - type OrganizationJoinParams as OrganizationJoinParams, - type OrganizationLeaveParams as OrganizationLeaveParams, - type OrganizationListMembersParams as OrganizationListMembersParams, - type OrganizationSetRoleParams as OrganizationSetRoleParams, - }; - - export { - Prebuilds as Prebuilds, - type Prebuild as Prebuild, - type PrebuildMetadata as PrebuildMetadata, - type PrebuildPhase as PrebuildPhase, - type PrebuildSpec as PrebuildSpec, - type PrebuildStatus as PrebuildStatus, - type PrebuildTrigger as PrebuildTrigger, - type WarmPool as WarmPool, - type WarmPoolMetadata as WarmPoolMetadata, - type WarmPoolPhase as WarmPoolPhase, - type WarmPoolSpec as WarmPoolSpec, - type WarmPoolStatus as WarmPoolStatus, - type PrebuildCreateResponse as PrebuildCreateResponse, - type PrebuildRetrieveResponse as PrebuildRetrieveResponse, - type PrebuildDeleteResponse as PrebuildDeleteResponse, - type PrebuildCancelResponse as PrebuildCancelResponse, - type PrebuildCreateLogsTokenResponse as PrebuildCreateLogsTokenResponse, - type PrebuildCreateWarmPoolResponse as PrebuildCreateWarmPoolResponse, - type PrebuildDeleteWarmPoolResponse as PrebuildDeleteWarmPoolResponse, - type PrebuildRetrieveWarmPoolResponse as PrebuildRetrieveWarmPoolResponse, - type PrebuildUpdateWarmPoolResponse as PrebuildUpdateWarmPoolResponse, - type PrebuildsPrebuildsPage as PrebuildsPrebuildsPage, - type WarmPoolsWarmPoolsPage as WarmPoolsWarmPoolsPage, - type PrebuildCreateParams as PrebuildCreateParams, - type PrebuildRetrieveParams as PrebuildRetrieveParams, - type PrebuildListParams as PrebuildListParams, - type PrebuildDeleteParams as PrebuildDeleteParams, - type PrebuildCancelParams as PrebuildCancelParams, - type PrebuildCreateLogsTokenParams as PrebuildCreateLogsTokenParams, - type PrebuildCreateWarmPoolParams as PrebuildCreateWarmPoolParams, - type PrebuildDeleteWarmPoolParams as PrebuildDeleteWarmPoolParams, - type PrebuildListWarmPoolsParams as PrebuildListWarmPoolsParams, - type PrebuildRetrieveWarmPoolParams as PrebuildRetrieveWarmPoolParams, - type PrebuildUpdateWarmPoolParams as PrebuildUpdateWarmPoolParams, - }; - - export { - Projects as Projects, - type EnvironmentInitializer as EnvironmentInitializer, - type Project as Project, - type ProjectMetadata as ProjectMetadata, - type ProjectPhase as ProjectPhase, - type ProjectPrebuildConfiguration as ProjectPrebuildConfiguration, - type RecommendedEditors as RecommendedEditors, - type ProjectCreateResponse as ProjectCreateResponse, - type ProjectRetrieveResponse as ProjectRetrieveResponse, - type ProjectUpdateResponse as ProjectUpdateResponse, - type ProjectDeleteResponse as ProjectDeleteResponse, - type ProjectBulkCreateResponse as ProjectBulkCreateResponse, - type ProjectBulkDeleteResponse as ProjectBulkDeleteResponse, - type ProjectBulkUpdateResponse as ProjectBulkUpdateResponse, - type ProjectCreateFromEnvironmentResponse as ProjectCreateFromEnvironmentResponse, - type ProjectsProjectsPage as ProjectsProjectsPage, - type ProjectCreateParams as ProjectCreateParams, - type ProjectRetrieveParams as ProjectRetrieveParams, - type ProjectUpdateParams as ProjectUpdateParams, - type ProjectListParams as ProjectListParams, - type ProjectDeleteParams as ProjectDeleteParams, - type ProjectBulkCreateParams as ProjectBulkCreateParams, - type ProjectBulkDeleteParams as ProjectBulkDeleteParams, - type ProjectBulkUpdateParams as ProjectBulkUpdateParams, - type ProjectCreateFromEnvironmentParams as ProjectCreateFromEnvironmentParams, - }; - - export { - Runners as Runners, - type GatewayInfo as GatewayInfo, - type LogLevel as LogLevel, - type MetricsConfiguration as MetricsConfiguration, - type Runner as Runner, - type RunnerCapability as RunnerCapability, - type RunnerConfiguration as RunnerConfiguration, - type RunnerKind as RunnerKind, - type RunnerPhase as RunnerPhase, - type RunnerProvider as RunnerProvider, - type RunnerReleaseChannel as RunnerReleaseChannel, - type RunnerSpec as RunnerSpec, - type RunnerStatus as RunnerStatus, - type RunnerVariant as RunnerVariant, - type SearchMode as SearchMode, - type UpdateWindow as UpdateWindow, - type RunnerCreateResponse as RunnerCreateResponse, - type RunnerRetrieveResponse as RunnerRetrieveResponse, - type RunnerUpdateResponse as RunnerUpdateResponse, - type RunnerDeleteResponse as RunnerDeleteResponse, - type RunnerCheckAuthenticationForHostResponse as RunnerCheckAuthenticationForHostResponse, - type RunnerCheckRepositoryAccessResponse as RunnerCheckRepositoryAccessResponse, - type RunnerCreateLogsTokenResponse as RunnerCreateLogsTokenResponse, - type RunnerCreateRunnerTokenResponse as RunnerCreateRunnerTokenResponse, - type RunnerListScmOrganizationsResponse as RunnerListScmOrganizationsResponse, - type RunnerParseContextURLResponse as RunnerParseContextURLResponse, - type RunnerSearchRepositoriesResponse as RunnerSearchRepositoriesResponse, - type RunnersRunnersPage as RunnersRunnersPage, - type RunnerListScmOrganizationsResponsesOrganizationsPage as RunnerListScmOrganizationsResponsesOrganizationsPage, - type RunnerCreateParams as RunnerCreateParams, - type RunnerRetrieveParams as RunnerRetrieveParams, - type RunnerUpdateParams as RunnerUpdateParams, - type RunnerListParams as RunnerListParams, - type RunnerDeleteParams as RunnerDeleteParams, - type RunnerCheckAuthenticationForHostParams as RunnerCheckAuthenticationForHostParams, - type RunnerCheckRepositoryAccessParams as RunnerCheckRepositoryAccessParams, - type RunnerCreateLogsTokenParams as RunnerCreateLogsTokenParams, - type RunnerCreateRunnerTokenParams as RunnerCreateRunnerTokenParams, - type RunnerListScmOrganizationsParams as RunnerListScmOrganizationsParams, - type RunnerParseContextURLParams as RunnerParseContextURLParams, - type RunnerSearchRepositoriesParams as RunnerSearchRepositoriesParams, - }; - - export { - Secrets as Secrets, - type Secret as Secret, - type SecretScope as SecretScope, - type SecretCreateResponse as SecretCreateResponse, - type SecretDeleteResponse as SecretDeleteResponse, - type SecretGetValueResponse as SecretGetValueResponse, - type SecretUpdateValueResponse as SecretUpdateValueResponse, - type SecretsSecretsPage as SecretsSecretsPage, - type SecretCreateParams as SecretCreateParams, - type SecretListParams as SecretListParams, - type SecretDeleteParams as SecretDeleteParams, - type SecretGetValueParams as SecretGetValueParams, - type SecretUpdateValueParams as SecretUpdateValueParams, - }; - - export { - Usage as Usage, - type EnvironmentUsageRecord as EnvironmentUsageRecord, - type EnvironmentUsageRecordsRecordsPage as EnvironmentUsageRecordsRecordsPage, - type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams, - }; - - export { - Users as Users, - type User as User, - type UserDeleteUserResponse as UserDeleteUserResponse, - type UserGetAuthenticatedUserResponse as UserGetAuthenticatedUserResponse, - type UserGetUserResponse as UserGetUserResponse, - type UserSetSuspendedResponse as UserSetSuspendedResponse, - type UserDeleteUserParams as UserDeleteUserParams, - type UserGetAuthenticatedUserParams as UserGetAuthenticatedUserParams, - type UserGetUserParams as UserGetUserParams, - type UserSetSuspendedParams as UserSetSuspendedParams, - }; - - export type AutomationTrigger = API.AutomationTrigger; - export type CountResponseRelation = API.CountResponseRelation; - export type EnvironmentClass = API.EnvironmentClass; - export type EnvironmentVariableItem = API.EnvironmentVariableItem; - export type EnvironmentVariableSource = API.EnvironmentVariableSource; - export type ErrorCode = API.ErrorCode; - export type FieldValue = API.FieldValue; - export type Gateway = API.Gateway; - export type OrganizationRole = API.OrganizationRole; - export type OrganizationTier = API.OrganizationTier; - export type Principal = API.Principal; - export type ProjectEnvironmentClass = API.ProjectEnvironmentClass; - export type ResourceRole = API.ResourceRole; - export type ResourceType = API.ResourceType; - export type RunsOn = API.RunsOn; - export type SecretRef = API.SecretRef; - export type Sort = API.Sort; - export type SortOrder = API.SortOrder; - export type State = API.State; - export type Subject = API.Subject; - export type Task = API.Task; - export type TaskExecution = API.TaskExecution; - export type TaskExecutionMetadata = API.TaskExecutionMetadata; - export type TaskExecutionPhase = API.TaskExecutionPhase; - export type TaskExecutionSpec = API.TaskExecutionSpec; - export type TaskExecutionStatus = API.TaskExecutionStatus; - export type TaskMetadata = API.TaskMetadata; - export type TaskSpec = API.TaskSpec; - export type UserStatus = API.UserStatus; -} + export type RequestOptions = Opts.RequestOptions; + + export import AgentExecutionsPage = Pagination.AgentExecutionsPage; +export { + type AgentExecutionsPageParams as AgentExecutionsPageParams, + type AgentExecutionsPageResponse as AgentExecutionsPageResponse +}; + +export import AssignmentsPage = Pagination.AssignmentsPage; +export { + type AssignmentsPageParams as AssignmentsPageParams, + type AssignmentsPageResponse as AssignmentsPageResponse +}; + +export import DomainVerificationsPage = Pagination.DomainVerificationsPage; +export { + type DomainVerificationsPageParams as DomainVerificationsPageParams, + type DomainVerificationsPageResponse as DomainVerificationsPageResponse +}; + +export import EditorsPage = Pagination.EditorsPage; +export { + type EditorsPageParams as EditorsPageParams, + type EditorsPageResponse as EditorsPageResponse +}; + +export import EntriesPage = Pagination.EntriesPage; +export { + type EntriesPageParams as EntriesPageParams, + type EntriesPageResponse as EntriesPageResponse +}; + +export import EnvironmentClassesPage = Pagination.EnvironmentClassesPage; +export { + type EnvironmentClassesPageParams as EnvironmentClassesPageParams, + type EnvironmentClassesPageResponse as EnvironmentClassesPageResponse +}; + +export import EnvironmentsPage = Pagination.EnvironmentsPage; +export { + type EnvironmentsPageParams as EnvironmentsPageParams, + type EnvironmentsPageResponse as EnvironmentsPageResponse +}; + +export import GatewaysPage = Pagination.GatewaysPage; +export { + type GatewaysPageParams as GatewaysPageParams, + type GatewaysPageResponse as GatewaysPageResponse +}; + +export import GroupsPage = Pagination.GroupsPage; +export { + type GroupsPageParams as GroupsPageParams, + type GroupsPageResponse as GroupsPageResponse +}; + +export import IntegrationsPage = Pagination.IntegrationsPage; +export { + type IntegrationsPageParams as IntegrationsPageParams, + type IntegrationsPageResponse as IntegrationsPageResponse +}; + +export import JoinableOrganizationsPage = Pagination.JoinableOrganizationsPage; +export { + type JoinableOrganizationsPageParams as JoinableOrganizationsPageParams, + type JoinableOrganizationsPageResponse as JoinableOrganizationsPageResponse +}; + +export import LoginProvidersPage = Pagination.LoginProvidersPage; +export { + type LoginProvidersPageParams as LoginProvidersPageParams, + type LoginProvidersPageResponse as LoginProvidersPageResponse +}; + +export import LoginsPage = Pagination.LoginsPage; +export { + type LoginsPageParams as LoginsPageParams, + type LoginsPageResponse as LoginsPageResponse +}; + +export import MembersPage = Pagination.MembersPage; +export { + type MembersPageParams as MembersPageParams, + type MembersPageResponse as MembersPageResponse +}; + +export import OrganizationsPage = Pagination.OrganizationsPage; +export { + type OrganizationsPageParams as OrganizationsPageParams, + type OrganizationsPageResponse as OrganizationsPageResponse +}; + +export import OutputsPage = Pagination.OutputsPage; +export { + type OutputsPageParams as OutputsPageParams, + type OutputsPageResponse as OutputsPageResponse +}; + +export import PersonalAccessTokensPage = Pagination.PersonalAccessTokensPage; +export { + type PersonalAccessTokensPageParams as PersonalAccessTokensPageParams, + type PersonalAccessTokensPageResponse as PersonalAccessTokensPageResponse +}; + +export import PoliciesPage = Pagination.PoliciesPage; +export { + type PoliciesPageParams as PoliciesPageParams, + type PoliciesPageResponse as PoliciesPageResponse +}; + +export import PrebuildsPage = Pagination.PrebuildsPage; +export { + type PrebuildsPageParams as PrebuildsPageParams, + type PrebuildsPageResponse as PrebuildsPageResponse +}; + +export import ProjectEnvironmentClassesPage = Pagination.ProjectEnvironmentClassesPage; +export { + type ProjectEnvironmentClassesPageParams as ProjectEnvironmentClassesPageParams, + type ProjectEnvironmentClassesPageResponse as ProjectEnvironmentClassesPageResponse +}; + +export import ProjectsPage = Pagination.ProjectsPage; +export { + type ProjectsPageParams as ProjectsPageParams, + type ProjectsPageResponse as ProjectsPageResponse +}; + +export import PromptsPage = Pagination.PromptsPage; +export { + type PromptsPageParams as PromptsPageParams, + type PromptsPageResponse as PromptsPageResponse +}; + +export import RecordsPage = Pagination.RecordsPage; +export { + type RecordsPageParams as RecordsPageParams, + type RecordsPageResponse as RecordsPageResponse +}; + +export import RepositoriesPage = Pagination.RepositoriesPage; +export { + type RepositoriesPageParams as RepositoriesPageParams, + type RepositoriesPageResponse as RepositoriesPageResponse +}; + +export import RunnersPage = Pagination.RunnersPage; +export { + type RunnersPageParams as RunnersPageParams, + type RunnersPageResponse as RunnersPageResponse +}; + +export import ScimConfigurationsPage = Pagination.ScimConfigurationsPage; +export { + type ScimConfigurationsPageParams as ScimConfigurationsPageParams, + type ScimConfigurationsPageResponse as ScimConfigurationsPageResponse +}; + +export import SecretsPage = Pagination.SecretsPage; +export { + type SecretsPageParams as SecretsPageParams, + type SecretsPageResponse as SecretsPageResponse +}; + +export import ServicesPage = Pagination.ServicesPage; +export { + type ServicesPageParams as ServicesPageParams, + type ServicesPageResponse as ServicesPageResponse +}; + +export import SSOConfigurationsPage = Pagination.SSOConfigurationsPage; +export { + type SSOConfigurationsPageParams as SSOConfigurationsPageParams, + type SSOConfigurationsPageResponse as SSOConfigurationsPageResponse +}; + +export import TaskExecutionsPage = Pagination.TaskExecutionsPage; +export { + type TaskExecutionsPageParams as TaskExecutionsPageParams, + type TaskExecutionsPageResponse as TaskExecutionsPageResponse +}; + +export import TasksPage = Pagination.TasksPage; +export { + type TasksPageParams as TasksPageParams, + type TasksPageResponse as TasksPageResponse +}; + +export import TokensPage = Pagination.TokensPage; +export { + type TokensPageParams as TokensPageParams, + type TokensPageResponse as TokensPageResponse +}; + +export import WarmPoolsPage = Pagination.WarmPoolsPage; +export { + type WarmPoolsPageParams as WarmPoolsPageParams, + type WarmPoolsPageResponse as WarmPoolsPageResponse +}; + +export import WorkflowExecutionActionsPage = Pagination.WorkflowExecutionActionsPage; +export { + type WorkflowExecutionActionsPageParams as WorkflowExecutionActionsPageParams, + type WorkflowExecutionActionsPageResponse as WorkflowExecutionActionsPageResponse +}; + +export import WorkflowExecutionsPage = Pagination.WorkflowExecutionsPage; +export { + type WorkflowExecutionsPageParams as WorkflowExecutionsPageParams, + type WorkflowExecutionsPageResponse as WorkflowExecutionsPageResponse +}; + +export import WorkflowsPage = Pagination.WorkflowsPage; +export { + type WorkflowsPageParams as WorkflowsPageParams, + type WorkflowsPageResponse as WorkflowsPageResponse +}; + +export { + Accounts as Accounts, + type Account as Account, + type AccountMembership as AccountMembership, + type JoinableOrganization as JoinableOrganization, + type LoginProvider as LoginProvider, + type AccountRetrieveResponse as AccountRetrieveResponse, + type AccountDeleteResponse as AccountDeleteResponse, + type AccountGetSSOLoginURLResponse as AccountGetSSOLoginURLResponse, + type AccountListSSOLoginsResponse as AccountListSSOLoginsResponse, + type JoinableOrganizationsJoinableOrganizationsPage as JoinableOrganizationsJoinableOrganizationsPage, + type LoginProvidersLoginProvidersPage as LoginProvidersLoginProvidersPage, + type AccountListSSOLoginsResponsesLoginsPage as AccountListSSOLoginsResponsesLoginsPage, + type AccountRetrieveParams as AccountRetrieveParams, + type AccountDeleteParams as AccountDeleteParams, + type AccountGetSSOLoginURLParams as AccountGetSSOLoginURLParams, + type AccountListJoinableOrganizationsParams as AccountListJoinableOrganizationsParams, + type AccountListLoginProvidersParams as AccountListLoginProvidersParams, + type AccountListSSOLoginsParams as AccountListSSOLoginsParams +}; + +export { + Agents as Agents, + type AgentCodeContext as AgentCodeContext, + type AgentExecution as AgentExecution, + type AgentMessage as AgentMessage, + type AgentMode as AgentMode, + type Prompt as Prompt, + type PromptMetadata as PromptMetadata, + type PromptSpec as PromptSpec, + type Role as Role, + type Type as Type, + type UserInputBlock as UserInputBlock, + type UserInputMetadata as UserInputMetadata, + type WakeEvent as WakeEvent, + type AgentCreateExecutionConversationTokenResponse as AgentCreateExecutionConversationTokenResponse, + type AgentCreatePromptResponse as AgentCreatePromptResponse, + type AgentDeleteExecutionResponse as AgentDeleteExecutionResponse, + type AgentDeletePromptResponse as AgentDeletePromptResponse, + type AgentRetrieveExecutionResponse as AgentRetrieveExecutionResponse, + type AgentRetrievePromptResponse as AgentRetrievePromptResponse, + type AgentSendToExecutionResponse as AgentSendToExecutionResponse, + type AgentStartExecutionResponse as AgentStartExecutionResponse, + type AgentStopExecutionResponse as AgentStopExecutionResponse, + type AgentUpdatePromptResponse as AgentUpdatePromptResponse, + type AgentExecutionsAgentExecutionsPage as AgentExecutionsAgentExecutionsPage, + type PromptsPromptsPage as PromptsPromptsPage, + type AgentCreateExecutionConversationTokenParams as AgentCreateExecutionConversationTokenParams, + type AgentCreatePromptParams as AgentCreatePromptParams, + type AgentDeleteExecutionParams as AgentDeleteExecutionParams, + type AgentDeletePromptParams as AgentDeletePromptParams, + type AgentListExecutionsParams as AgentListExecutionsParams, + type AgentListPromptsParams as AgentListPromptsParams, + type AgentRetrieveExecutionParams as AgentRetrieveExecutionParams, + type AgentRetrievePromptParams as AgentRetrievePromptParams, + type AgentSendToExecutionParams as AgentSendToExecutionParams, + type AgentStartExecutionParams as AgentStartExecutionParams, + type AgentStopExecutionParams as AgentStopExecutionParams, + type AgentUpdatePromptParams as AgentUpdatePromptParams +}; + +export { + Automations as Automations, + type Workflow as Workflow, + type WorkflowAction as WorkflowAction, + type WorkflowExecution as WorkflowExecution, + type WorkflowExecutionAction as WorkflowExecutionAction, + type WorkflowStep as WorkflowStep, + type WorkflowTrigger as WorkflowTrigger, + type WorkflowTriggerContext as WorkflowTriggerContext, + type AutomationCreateResponse as AutomationCreateResponse, + type AutomationRetrieveResponse as AutomationRetrieveResponse, + type AutomationUpdateResponse as AutomationUpdateResponse, + type AutomationDeleteResponse as AutomationDeleteResponse, + type AutomationCancelExecutionResponse as AutomationCancelExecutionResponse, + type AutomationCancelExecutionActionResponse as AutomationCancelExecutionActionResponse, + type AutomationListExecutionOutputsResponse as AutomationListExecutionOutputsResponse, + type AutomationRetrieveExecutionResponse as AutomationRetrieveExecutionResponse, + type AutomationRetrieveExecutionActionResponse as AutomationRetrieveExecutionActionResponse, + type AutomationStartExecutionResponse as AutomationStartExecutionResponse, + type WorkflowsWorkflowsPage as WorkflowsWorkflowsPage, + type WorkflowExecutionActionsWorkflowExecutionActionsPage as WorkflowExecutionActionsWorkflowExecutionActionsPage, + type AutomationListExecutionOutputsResponsesOutputsPage as AutomationListExecutionOutputsResponsesOutputsPage, + type WorkflowExecutionsWorkflowExecutionsPage as WorkflowExecutionsWorkflowExecutionsPage, + type AutomationCreateParams as AutomationCreateParams, + type AutomationRetrieveParams as AutomationRetrieveParams, + type AutomationUpdateParams as AutomationUpdateParams, + type AutomationListParams as AutomationListParams, + type AutomationDeleteParams as AutomationDeleteParams, + type AutomationCancelExecutionParams as AutomationCancelExecutionParams, + type AutomationCancelExecutionActionParams as AutomationCancelExecutionActionParams, + type AutomationListExecutionActionsParams as AutomationListExecutionActionsParams, + type AutomationListExecutionOutputsParams as AutomationListExecutionOutputsParams, + type AutomationListExecutionsParams as AutomationListExecutionsParams, + type AutomationRetrieveExecutionParams as AutomationRetrieveExecutionParams, + type AutomationRetrieveExecutionActionParams as AutomationRetrieveExecutionActionParams, + type AutomationStartExecutionParams as AutomationStartExecutionParams +}; + +export { + Editors as Editors, + type Editor as Editor, + type EditorVersion as EditorVersion, + type EditorRetrieveResponse as EditorRetrieveResponse, + type EditorResolveURLResponse as EditorResolveURLResponse, + type EditorsEditorsPage as EditorsEditorsPage, + type EditorRetrieveParams as EditorRetrieveParams, + type EditorListParams as EditorListParams, + type EditorResolveURLParams as EditorResolveURLParams +}; + +export { + Environments as Environments, + type AdmissionLevel as AdmissionLevel, + type BpfDebugLevel as BpfDebugLevel, + type Environment as Environment, + type EnvironmentActivitySignal as EnvironmentActivitySignal, + type EnvironmentMetadata as EnvironmentMetadata, + type EnvironmentPhase as EnvironmentPhase, + type EnvironmentRole as EnvironmentRole, + type EnvironmentSpec as EnvironmentSpec, + type EnvironmentStatus as EnvironmentStatus, + type KernelControlsConfig as KernelControlsConfig, + type Veto as Veto, + type EnvironmentCreateResponse as EnvironmentCreateResponse, + type EnvironmentRetrieveResponse as EnvironmentRetrieveResponse, + type EnvironmentUpdateResponse as EnvironmentUpdateResponse, + type EnvironmentDeleteResponse as EnvironmentDeleteResponse, + type EnvironmentCreateEnvironmentTokenResponse as EnvironmentCreateEnvironmentTokenResponse, + type EnvironmentCreateFromProjectResponse as EnvironmentCreateFromProjectResponse, + type EnvironmentCreateLogsTokenResponse as EnvironmentCreateLogsTokenResponse, + type EnvironmentMarkActiveResponse as EnvironmentMarkActiveResponse, + type EnvironmentStartResponse as EnvironmentStartResponse, + type EnvironmentStopResponse as EnvironmentStopResponse, + type EnvironmentUnarchiveResponse as EnvironmentUnarchiveResponse, + type EnvironmentsEnvironmentsPage as EnvironmentsEnvironmentsPage, + type EnvironmentCreateParams as EnvironmentCreateParams, + type EnvironmentRetrieveParams as EnvironmentRetrieveParams, + type EnvironmentUpdateParams as EnvironmentUpdateParams, + type EnvironmentListParams as EnvironmentListParams, + type EnvironmentDeleteParams as EnvironmentDeleteParams, + type EnvironmentCreateEnvironmentTokenParams as EnvironmentCreateEnvironmentTokenParams, + type EnvironmentCreateFromProjectParams as EnvironmentCreateFromProjectParams, + type EnvironmentCreateLogsTokenParams as EnvironmentCreateLogsTokenParams, + type EnvironmentMarkActiveParams as EnvironmentMarkActiveParams, + type EnvironmentStartParams as EnvironmentStartParams, + type EnvironmentStopParams as EnvironmentStopParams, + type EnvironmentUnarchiveParams as EnvironmentUnarchiveParams +}; + +export { + ErrorsAPIErrors as Errors, + type Breadcrumb as Breadcrumb, + type ErrorEvent as ErrorEvent, + type ErrorLevel as ErrorLevel, + type ExceptionInfo as ExceptionInfo, + type ExceptionMechanism as ExceptionMechanism, + type ErrorRequestInfo as RequestInfo, + type StackFrame as StackFrame, + type ErrorReportErrorsResponse as ErrorReportErrorsResponse, + type ErrorReportErrorsParams as ErrorReportErrorsParams +}; + +export { + Events as Events, + type ResourceOperation as ResourceOperation, + type EventListResponse as EventListResponse, + type EventWatchResponse as EventWatchResponse, + type EventListResponsesEntriesPage as EventListResponsesEntriesPage, + type EventListParams as EventListParams, + type EventWatchParams as EventWatchParams +}; + +export { + Gateways as Gateways, + type GatewayListParams as GatewayListParams +}; + +export { + Groups as Groups, + type Group as Group, + type GroupCreateResponse as GroupCreateResponse, + type GroupRetrieveResponse as GroupRetrieveResponse, + type GroupUpdateResponse as GroupUpdateResponse, + type GroupDeleteResponse as GroupDeleteResponse, + type GroupsGroupsPage as GroupsGroupsPage, + type GroupCreateParams as GroupCreateParams, + type GroupRetrieveParams as GroupRetrieveParams, + type GroupUpdateParams as GroupUpdateParams, + type GroupListParams as GroupListParams, + type GroupDeleteParams as GroupDeleteParams +}; + +export { + Identity as Identity, + type IDTokenVersion as IDTokenVersion, + type IdentityExchangeTokenResponse as IdentityExchangeTokenResponse, + type IdentityGetAuthenticatedIdentityResponse as IdentityGetAuthenticatedIdentityResponse, + type IdentityGetIDTokenResponse as IdentityGetIDTokenResponse, + type IdentityExchangeTokenParams as IdentityExchangeTokenParams, + type IdentityGetAuthenticatedIdentityParams as IdentityGetAuthenticatedIdentityParams, + type IdentityGetIDTokenParams as IdentityGetIDTokenParams +}; + +export { + Organizations as Organizations, + type InviteDomains as InviteDomains, + type Organization as Organization, + type OrganizationMember as OrganizationMember, + type OrganizationCreateResponse as OrganizationCreateResponse, + type OrganizationRetrieveResponse as OrganizationRetrieveResponse, + type OrganizationUpdateResponse as OrganizationUpdateResponse, + type OrganizationDeleteResponse as OrganizationDeleteResponse, + type OrganizationJoinResponse as OrganizationJoinResponse, + type OrganizationLeaveResponse as OrganizationLeaveResponse, + type OrganizationSetRoleResponse as OrganizationSetRoleResponse, + type OrganizationMembersMembersPage as OrganizationMembersMembersPage, + type OrganizationCreateParams as OrganizationCreateParams, + type OrganizationRetrieveParams as OrganizationRetrieveParams, + type OrganizationUpdateParams as OrganizationUpdateParams, + type OrganizationDeleteParams as OrganizationDeleteParams, + type OrganizationJoinParams as OrganizationJoinParams, + type OrganizationLeaveParams as OrganizationLeaveParams, + type OrganizationListMembersParams as OrganizationListMembersParams, + type OrganizationSetRoleParams as OrganizationSetRoleParams +}; + +export { + Prebuilds as Prebuilds, + type Prebuild as Prebuild, + type PrebuildMetadata as PrebuildMetadata, + type PrebuildPhase as PrebuildPhase, + type PrebuildSpec as PrebuildSpec, + type PrebuildStatus as PrebuildStatus, + type PrebuildTrigger as PrebuildTrigger, + type WarmPool as WarmPool, + type WarmPoolMetadata as WarmPoolMetadata, + type WarmPoolPhase as WarmPoolPhase, + type WarmPoolSpec as WarmPoolSpec, + type WarmPoolStatus as WarmPoolStatus, + type PrebuildCreateResponse as PrebuildCreateResponse, + type PrebuildRetrieveResponse as PrebuildRetrieveResponse, + type PrebuildDeleteResponse as PrebuildDeleteResponse, + type PrebuildCancelResponse as PrebuildCancelResponse, + type PrebuildCreateLogsTokenResponse as PrebuildCreateLogsTokenResponse, + type PrebuildCreateWarmPoolResponse as PrebuildCreateWarmPoolResponse, + type PrebuildDeleteWarmPoolResponse as PrebuildDeleteWarmPoolResponse, + type PrebuildRetrieveWarmPoolResponse as PrebuildRetrieveWarmPoolResponse, + type PrebuildUpdateWarmPoolResponse as PrebuildUpdateWarmPoolResponse, + type PrebuildsPrebuildsPage as PrebuildsPrebuildsPage, + type WarmPoolsWarmPoolsPage as WarmPoolsWarmPoolsPage, + type PrebuildCreateParams as PrebuildCreateParams, + type PrebuildRetrieveParams as PrebuildRetrieveParams, + type PrebuildListParams as PrebuildListParams, + type PrebuildDeleteParams as PrebuildDeleteParams, + type PrebuildCancelParams as PrebuildCancelParams, + type PrebuildCreateLogsTokenParams as PrebuildCreateLogsTokenParams, + type PrebuildCreateWarmPoolParams as PrebuildCreateWarmPoolParams, + type PrebuildDeleteWarmPoolParams as PrebuildDeleteWarmPoolParams, + type PrebuildListWarmPoolsParams as PrebuildListWarmPoolsParams, + type PrebuildRetrieveWarmPoolParams as PrebuildRetrieveWarmPoolParams, + type PrebuildUpdateWarmPoolParams as PrebuildUpdateWarmPoolParams +}; + +export { + Projects as Projects, + type EnvironmentInitializer as EnvironmentInitializer, + type Project as Project, + type ProjectMetadata as ProjectMetadata, + type ProjectPhase as ProjectPhase, + type ProjectPrebuildConfiguration as ProjectPrebuildConfiguration, + type RecommendedEditors as RecommendedEditors, + type ProjectCreateResponse as ProjectCreateResponse, + type ProjectRetrieveResponse as ProjectRetrieveResponse, + type ProjectUpdateResponse as ProjectUpdateResponse, + type ProjectDeleteResponse as ProjectDeleteResponse, + type ProjectBulkCreateResponse as ProjectBulkCreateResponse, + type ProjectBulkDeleteResponse as ProjectBulkDeleteResponse, + type ProjectBulkUpdateResponse as ProjectBulkUpdateResponse, + type ProjectCreateFromEnvironmentResponse as ProjectCreateFromEnvironmentResponse, + type ProjectsProjectsPage as ProjectsProjectsPage, + type ProjectCreateParams as ProjectCreateParams, + type ProjectRetrieveParams as ProjectRetrieveParams, + type ProjectUpdateParams as ProjectUpdateParams, + type ProjectListParams as ProjectListParams, + type ProjectDeleteParams as ProjectDeleteParams, + type ProjectBulkCreateParams as ProjectBulkCreateParams, + type ProjectBulkDeleteParams as ProjectBulkDeleteParams, + type ProjectBulkUpdateParams as ProjectBulkUpdateParams, + type ProjectCreateFromEnvironmentParams as ProjectCreateFromEnvironmentParams +}; + +export { + Runners as Runners, + type GatewayInfo as GatewayInfo, + type LogLevel as LogLevel, + type MetricsConfiguration as MetricsConfiguration, + type Runner as Runner, + type RunnerCapability as RunnerCapability, + type RunnerConfiguration as RunnerConfiguration, + type RunnerKind as RunnerKind, + type RunnerPhase as RunnerPhase, + type RunnerProvider as RunnerProvider, + type RunnerReleaseChannel as RunnerReleaseChannel, + type RunnerSpec as RunnerSpec, + type RunnerStatus as RunnerStatus, + type RunnerVariant as RunnerVariant, + type SearchMode as SearchMode, + type UpdateWindow as UpdateWindow, + type RunnerCreateResponse as RunnerCreateResponse, + type RunnerRetrieveResponse as RunnerRetrieveResponse, + type RunnerUpdateResponse as RunnerUpdateResponse, + type RunnerDeleteResponse as RunnerDeleteResponse, + type RunnerCheckAuthenticationForHostResponse as RunnerCheckAuthenticationForHostResponse, + type RunnerCheckRepositoryAccessResponse as RunnerCheckRepositoryAccessResponse, + type RunnerCreateLogsTokenResponse as RunnerCreateLogsTokenResponse, + type RunnerCreateRunnerTokenResponse as RunnerCreateRunnerTokenResponse, + type RunnerListScmOrganizationsResponse as RunnerListScmOrganizationsResponse, + type RunnerParseContextURLResponse as RunnerParseContextURLResponse, + type RunnerSearchRepositoriesResponse as RunnerSearchRepositoriesResponse, + type RunnersRunnersPage as RunnersRunnersPage, + type RunnerListScmOrganizationsResponsesOrganizationsPage as RunnerListScmOrganizationsResponsesOrganizationsPage, + type RunnerCreateParams as RunnerCreateParams, + type RunnerRetrieveParams as RunnerRetrieveParams, + type RunnerUpdateParams as RunnerUpdateParams, + type RunnerListParams as RunnerListParams, + type RunnerDeleteParams as RunnerDeleteParams, + type RunnerCheckAuthenticationForHostParams as RunnerCheckAuthenticationForHostParams, + type RunnerCheckRepositoryAccessParams as RunnerCheckRepositoryAccessParams, + type RunnerCreateLogsTokenParams as RunnerCreateLogsTokenParams, + type RunnerCreateRunnerTokenParams as RunnerCreateRunnerTokenParams, + type RunnerListScmOrganizationsParams as RunnerListScmOrganizationsParams, + type RunnerParseContextURLParams as RunnerParseContextURLParams, + type RunnerSearchRepositoriesParams as RunnerSearchRepositoriesParams +}; + +export { + Secrets as Secrets, + type Secret as Secret, + type SecretScope as SecretScope, + type SecretCreateResponse as SecretCreateResponse, + type SecretDeleteResponse as SecretDeleteResponse, + type SecretGetValueResponse as SecretGetValueResponse, + type SecretUpdateValueResponse as SecretUpdateValueResponse, + type SecretsSecretsPage as SecretsSecretsPage, + type SecretCreateParams as SecretCreateParams, + type SecretListParams as SecretListParams, + type SecretDeleteParams as SecretDeleteParams, + type SecretGetValueParams as SecretGetValueParams, + type SecretUpdateValueParams as SecretUpdateValueParams +}; + +export { + Usage as Usage, + type EnvironmentUsageRecord as EnvironmentUsageRecord, + type EnvironmentUsageRecordsRecordsPage as EnvironmentUsageRecordsRecordsPage, + type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams +}; + +export { + Users as Users, + type User as User, + type UserDeleteUserResponse as UserDeleteUserResponse, + type UserGetAuthenticatedUserResponse as UserGetAuthenticatedUserResponse, + type UserGetUserResponse as UserGetUserResponse, + type UserSetSuspendedResponse as UserSetSuspendedResponse, + type UserDeleteUserParams as UserDeleteUserParams, + type UserGetAuthenticatedUserParams as UserGetAuthenticatedUserParams, + type UserGetUserParams as UserGetUserParams, + type UserSetSuspendedParams as UserSetSuspendedParams +}; + +export type AutomationTrigger = API.AutomationTrigger; +export type CountResponseRelation = API.CountResponseRelation; +export type EnvironmentClass = API.EnvironmentClass; +export type EnvironmentVariableItem = API.EnvironmentVariableItem; +export type EnvironmentVariableSource = API.EnvironmentVariableSource; +export type ErrorCode = API.ErrorCode; +export type FieldValue = API.FieldValue; +export type Gateway = API.Gateway; +export type OrganizationRole = API.OrganizationRole; +export type OrganizationTier = API.OrganizationTier; +export type Principal = API.Principal; +export type ProjectEnvironmentClass = API.ProjectEnvironmentClass; +export type ResourceRole = API.ResourceRole; +export type ResourceType = API.ResourceType; +export type RunsOn = API.RunsOn; +export type SecretRef = API.SecretRef; +export type Sort = API.Sort; +export type SortOrder = API.SortOrder; +export type State = API.State; +export type Subject = API.Subject; +export type Task = API.Task; +export type TaskExecution = API.TaskExecution; +export type TaskExecutionMetadata = API.TaskExecutionMetadata; +export type TaskExecutionPhase = API.TaskExecutionPhase; +export type TaskExecutionSpec = API.TaskExecutionSpec; +export type TaskExecutionStatus = API.TaskExecutionStatus; +export type TaskMetadata = API.TaskMetadata; +export type TaskSpec = API.TaskSpec; +export type UserStatus = API.UserStatus; + } diff --git a/src/core/api-promise.ts b/src/core/api-promise.ts index 639a5457..897d0f50 100644 --- a/src/core/api-promise.ts +++ b/src/core/api-promise.ts @@ -16,10 +16,7 @@ export class APIPromise extends Promise { constructor( client: Gitpod, private responsePromise: Promise, - private parseResponse: ( - client: Gitpod, - props: APIResponseProps, - ) => PromiseOrValue = defaultParseResponse, + private parseResponse: (client: Gitpod, props: APIResponseProps) => PromiseOrValue = defaultParseResponse, ) { super((resolve) => { // this is maybe a bit weird but this has to be a no-op to not implicitly @@ -31,9 +28,7 @@ export class APIPromise extends Promise { } _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise { - return new APIPromise(this.#client, this.responsePromise, async (client, props) => - transform(await this.parseResponse(client, props), props), - ); + return new APIPromise(this.#client, this.responsePromise, async (client, props) => transform(await this.parseResponse(client, props), props)); } /** diff --git a/src/core/error.ts b/src/core/error.ts index 1b22334e..e40b86ee 100644 --- a/src/core/error.ts +++ b/src/core/error.ts @@ -3,13 +3,10 @@ import { castToError } from '../internal/errors'; import * as Shared from '../resources/shared'; -export class GitpodError extends Error {} +export class GitpodError extends Error { +} -export class APIError< - TStatus extends number | undefined = number | undefined, - THeaders extends Headers | undefined = Headers | undefined, - TError extends Object | undefined = Object | undefined, -> extends GitpodError { +export class APIError extends GitpodError { /** HTTP status for the response that caused the error */ readonly status: TStatus; /** HTTP headers for the response that caused the error */ @@ -23,6 +20,8 @@ export class APIError< */ readonly code?: Shared.ErrorCode | undefined; + ; + constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders) { super(`${APIError.makeMessage(status, error, message)}`); this.status = status; @@ -36,8 +35,7 @@ export class APIError< private static makeMessage(status: number | undefined, error: any, message: string | undefined) { const msg = error?.message ? - typeof error.message === 'string' ? - error.message + typeof error.message === 'string' ? error.message : JSON.stringify(error.message) : error ? JSON.stringify(error) : message; @@ -54,12 +52,7 @@ export class APIError< return '(no status code or body)'; } - static generate( - status: number | undefined, - errorResponse: Object | undefined, - message: string | undefined, - headers: Headers | undefined, - ): APIError { + static generate(status: number | undefined, errorResponse: Object | undefined, message: string | undefined, headers: Headers | undefined): APIError { if (!status || !headers) { return new APIConnectionError({ message, cause: castToError(errorResponse) }); } @@ -123,18 +116,26 @@ export class APIConnectionTimeoutError extends APIConnectionError { } } -export class BadRequestError extends APIError<400, Headers> {} +export class BadRequestError extends APIError<400, Headers> { +} -export class AuthenticationError extends APIError<401, Headers> {} +export class AuthenticationError extends APIError<401, Headers> { +} -export class PermissionDeniedError extends APIError<403, Headers> {} +export class PermissionDeniedError extends APIError<403, Headers> { +} -export class NotFoundError extends APIError<404, Headers> {} +export class NotFoundError extends APIError<404, Headers> { +} -export class ConflictError extends APIError<409, Headers> {} +export class ConflictError extends APIError<409, Headers> { +} -export class UnprocessableEntityError extends APIError<422, Headers> {} +export class UnprocessableEntityError extends APIError<422, Headers> { +} -export class RateLimitError extends APIError<429, Headers> {} +export class RateLimitError extends APIError<429, Headers> { +} -export class InternalServerError extends APIError {} +export class InternalServerError extends APIError { +} diff --git a/src/core/pagination.ts b/src/core/pagination.ts index c01757cf..455889ee 100644 --- a/src/core/pagination.ts +++ b/src/core/pagination.ts @@ -87,8 +87,7 @@ export class PagePromise< super( client, request, - async (client, props) => - new Page(client, props.response, await defaultParseResponse(client, props), props.options), + async (client, props) => new Page(client, props.response, await defaultParseResponse(client, props), props.options) ); } @@ -125,20 +124,12 @@ export interface AgentExecutionsPageParams { token?: string; } -export class AgentExecutionsPage - extends AbstractPage - implements AgentExecutionsPageResponse -{ +export class AgentExecutionsPage extends AbstractPage implements AgentExecutionsPageResponse { agentExecutions: Array; pagination: AgentExecutionsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: AgentExecutionsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: AgentExecutionsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.agentExecutions = body.agentExecutions || []; @@ -150,7 +141,7 @@ export class AgentExecutionsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -188,12 +179,7 @@ export class AssignmentsPage extends AbstractPage implements Assignm pagination: AssignmentsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: AssignmentsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: AssignmentsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.assignments = body.assignments || []; @@ -205,7 +191,7 @@ export class AssignmentsPage extends AbstractPage implements Assignm } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -238,20 +224,12 @@ export interface DomainVerificationsPageParams { token?: string; } -export class DomainVerificationsPage - extends AbstractPage - implements DomainVerificationsPageResponse -{ +export class DomainVerificationsPage extends AbstractPage implements DomainVerificationsPageResponse { domainVerifications: Array; pagination: DomainVerificationsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: DomainVerificationsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: DomainVerificationsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.domainVerifications = body.domainVerifications || []; @@ -263,7 +241,7 @@ export class DomainVerificationsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -301,12 +279,7 @@ export class EditorsPage extends AbstractPage implements EditorsPage pagination: EditorsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: EditorsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: EditorsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.editors = body.editors || []; @@ -318,7 +291,7 @@ export class EditorsPage extends AbstractPage implements EditorsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -356,12 +329,7 @@ export class EntriesPage extends AbstractPage implements EntriesPage pagination: EntriesPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: EntriesPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: EntriesPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.entries = body.entries || []; @@ -373,7 +341,7 @@ export class EntriesPage extends AbstractPage implements EntriesPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -406,20 +374,12 @@ export interface EnvironmentClassesPageParams { token?: string; } -export class EnvironmentClassesPage - extends AbstractPage - implements EnvironmentClassesPageResponse -{ +export class EnvironmentClassesPage extends AbstractPage implements EnvironmentClassesPageResponse { environmentClasses: Array; pagination: EnvironmentClassesPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: EnvironmentClassesPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: EnvironmentClassesPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.environmentClasses = body.environmentClasses || []; @@ -431,7 +391,7 @@ export class EnvironmentClassesPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -469,12 +429,7 @@ export class EnvironmentsPage extends AbstractPage implements Enviro pagination: EnvironmentsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: EnvironmentsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: EnvironmentsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.environments = body.environments || []; @@ -486,7 +441,7 @@ export class EnvironmentsPage extends AbstractPage implements Enviro } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -524,12 +479,7 @@ export class GatewaysPage extends AbstractPage implements GatewaysPa pagination: GatewaysPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: GatewaysPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: GatewaysPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.gateways = body.gateways || []; @@ -541,7 +491,7 @@ export class GatewaysPage extends AbstractPage implements GatewaysPa } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -579,12 +529,7 @@ export class GroupsPage extends AbstractPage implements GroupsPageRe pagination: GroupsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: GroupsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: GroupsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.groups = body.groups || []; @@ -596,7 +541,7 @@ export class GroupsPage extends AbstractPage implements GroupsPageRe } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -634,12 +579,7 @@ export class IntegrationsPage extends AbstractPage implements Integr pagination: IntegrationsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: IntegrationsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: IntegrationsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.integrations = body.integrations || []; @@ -651,7 +591,7 @@ export class IntegrationsPage extends AbstractPage implements Integr } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -684,20 +624,12 @@ export interface JoinableOrganizationsPageParams { token?: string; } -export class JoinableOrganizationsPage - extends AbstractPage - implements JoinableOrganizationsPageResponse -{ +export class JoinableOrganizationsPage extends AbstractPage implements JoinableOrganizationsPageResponse { joinableOrganizations: Array; pagination: JoinableOrganizationsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: JoinableOrganizationsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: JoinableOrganizationsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.joinableOrganizations = body.joinableOrganizations || []; @@ -709,7 +641,7 @@ export class JoinableOrganizationsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -747,12 +679,7 @@ export class LoginProvidersPage extends AbstractPage implements Logi pagination: LoginProvidersPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: LoginProvidersPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: LoginProvidersPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.loginProviders = body.loginProviders || []; @@ -764,7 +691,7 @@ export class LoginProvidersPage extends AbstractPage implements Logi } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -802,12 +729,7 @@ export class LoginsPage extends AbstractPage implements LoginsPageRe pagination: LoginsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: LoginsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: LoginsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.logins = body.logins || []; @@ -819,7 +741,7 @@ export class LoginsPage extends AbstractPage implements LoginsPageRe } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -857,12 +779,7 @@ export class MembersPage extends AbstractPage implements MembersPage pagination: MembersPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: MembersPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: MembersPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.members = body.members || []; @@ -874,7 +791,7 @@ export class MembersPage extends AbstractPage implements MembersPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -912,12 +829,7 @@ export class OrganizationsPage extends AbstractPage implements Organ pagination: OrganizationsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: OrganizationsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: OrganizationsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.organizations = body.organizations || []; @@ -929,7 +841,7 @@ export class OrganizationsPage extends AbstractPage implements Organ } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -967,12 +879,7 @@ export class OutputsPage extends AbstractPage implements OutputsPage pagination: OutputsPageResponse.Pagination; - constructor( - client: Gitpod, - response: Response, - body: OutputsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: OutputsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.outputs = body.outputs || []; @@ -984,7 +891,7 @@ export class OutputsPage extends AbstractPage implements OutputsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1017,20 +924,12 @@ export interface PersonalAccessTokensPageParams { token?: string; } -export class PersonalAccessTokensPage - extends AbstractPage - implements PersonalAccessTokensPageResponse -{ +export class PersonalAccessTokensPage extends AbstractPage implements PersonalAccessTokensPageResponse { pagination: PersonalAccessTokensPageResponse.Pagination; personalAccessTokens: Array; - constructor( - client: Gitpod, - response: Response, - body: PersonalAccessTokensPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: PersonalAccessTokensPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1042,7 +941,7 @@ export class PersonalAccessTokensPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1080,12 +979,7 @@ export class PoliciesPage extends AbstractPage implements PoliciesPa policies: Array; - constructor( - client: Gitpod, - response: Response, - body: PoliciesPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: PoliciesPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1097,7 +991,7 @@ export class PoliciesPage extends AbstractPage implements PoliciesPa } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1135,12 +1029,7 @@ export class PrebuildsPage extends AbstractPage implements Prebuilds prebuilds: Array; - constructor( - client: Gitpod, - response: Response, - body: PrebuildsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: PrebuildsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1152,7 +1041,7 @@ export class PrebuildsPage extends AbstractPage implements Prebuilds } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1185,20 +1074,12 @@ export interface ProjectEnvironmentClassesPageParams { token?: string; } -export class ProjectEnvironmentClassesPage - extends AbstractPage - implements ProjectEnvironmentClassesPageResponse -{ +export class ProjectEnvironmentClassesPage extends AbstractPage implements ProjectEnvironmentClassesPageResponse { pagination: ProjectEnvironmentClassesPageResponse.Pagination; projectEnvironmentClasses: Array; - constructor( - client: Gitpod, - response: Response, - body: ProjectEnvironmentClassesPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: ProjectEnvironmentClassesPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1210,7 +1091,7 @@ export class ProjectEnvironmentClassesPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1248,12 +1129,7 @@ export class ProjectsPage extends AbstractPage implements ProjectsPa projects: Array; - constructor( - client: Gitpod, - response: Response, - body: ProjectsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: ProjectsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1265,7 +1141,7 @@ export class ProjectsPage extends AbstractPage implements ProjectsPa } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1303,12 +1179,7 @@ export class PromptsPage extends AbstractPage implements PromptsPage prompts: Array; - constructor( - client: Gitpod, - response: Response, - body: PromptsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: PromptsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1320,7 +1191,7 @@ export class PromptsPage extends AbstractPage implements PromptsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1358,12 +1229,7 @@ export class RecordsPage extends AbstractPage implements RecordsPage records: Array; - constructor( - client: Gitpod, - response: Response, - body: RecordsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: RecordsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1375,7 +1241,7 @@ export class RecordsPage extends AbstractPage implements RecordsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1413,12 +1279,7 @@ export class RepositoriesPage extends AbstractPage implements Reposi repositories: Array; - constructor( - client: Gitpod, - response: Response, - body: RepositoriesPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: RepositoriesPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1430,7 +1291,7 @@ export class RepositoriesPage extends AbstractPage implements Reposi } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1468,12 +1329,7 @@ export class RunnersPage extends AbstractPage implements RunnersPage runners: Array; - constructor( - client: Gitpod, - response: Response, - body: RunnersPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: RunnersPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1485,7 +1341,7 @@ export class RunnersPage extends AbstractPage implements RunnersPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1518,20 +1374,12 @@ export interface ScimConfigurationsPageParams { token?: string; } -export class ScimConfigurationsPage - extends AbstractPage - implements ScimConfigurationsPageResponse -{ +export class ScimConfigurationsPage extends AbstractPage implements ScimConfigurationsPageResponse { pagination: ScimConfigurationsPageResponse.Pagination; scimConfigurations: Array; - constructor( - client: Gitpod, - response: Response, - body: ScimConfigurationsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: ScimConfigurationsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1543,7 +1391,7 @@ export class ScimConfigurationsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1581,12 +1429,7 @@ export class SecretsPage extends AbstractPage implements SecretsPage secrets: Array; - constructor( - client: Gitpod, - response: Response, - body: SecretsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: SecretsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1598,7 +1441,7 @@ export class SecretsPage extends AbstractPage implements SecretsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1636,12 +1479,7 @@ export class ServicesPage extends AbstractPage implements ServicesPa services: Array; - constructor( - client: Gitpod, - response: Response, - body: ServicesPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: ServicesPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1653,7 +1491,7 @@ export class ServicesPage extends AbstractPage implements ServicesPa } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1686,20 +1524,12 @@ export interface SSOConfigurationsPageParams { token?: string; } -export class SSOConfigurationsPage - extends AbstractPage - implements SSOConfigurationsPageResponse -{ +export class SSOConfigurationsPage extends AbstractPage implements SSOConfigurationsPageResponse { pagination: SSOConfigurationsPageResponse.Pagination; ssoConfigurations: Array; - constructor( - client: Gitpod, - response: Response, - body: SSOConfigurationsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: SSOConfigurationsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1711,7 +1541,7 @@ export class SSOConfigurationsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1749,12 +1579,7 @@ export class TaskExecutionsPage extends AbstractPage implements Task taskExecutions: Array; - constructor( - client: Gitpod, - response: Response, - body: TaskExecutionsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: TaskExecutionsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1766,7 +1591,7 @@ export class TaskExecutionsPage extends AbstractPage implements Task } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1804,12 +1629,7 @@ export class TasksPage extends AbstractPage implements TasksPageResp tasks: Array; - constructor( - client: Gitpod, - response: Response, - body: TasksPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: TasksPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1821,7 +1641,7 @@ export class TasksPage extends AbstractPage implements TasksPageResp } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1859,12 +1679,7 @@ export class TokensPage extends AbstractPage implements TokensPageRe tokens: Array; - constructor( - client: Gitpod, - response: Response, - body: TokensPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: TokensPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1876,7 +1691,7 @@ export class TokensPage extends AbstractPage implements TokensPageRe } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1914,12 +1729,7 @@ export class WarmPoolsPage extends AbstractPage implements WarmPools warmPools: Array; - constructor( - client: Gitpod, - response: Response, - body: WarmPoolsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: WarmPoolsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1931,7 +1741,7 @@ export class WarmPoolsPage extends AbstractPage implements WarmPools } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -1964,20 +1774,12 @@ export interface WorkflowExecutionActionsPageParams { token?: string; } -export class WorkflowExecutionActionsPage - extends AbstractPage - implements WorkflowExecutionActionsPageResponse -{ +export class WorkflowExecutionActionsPage extends AbstractPage implements WorkflowExecutionActionsPageResponse { pagination: WorkflowExecutionActionsPageResponse.Pagination; workflowExecutionActions: Array; - constructor( - client: Gitpod, - response: Response, - body: WorkflowExecutionActionsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: WorkflowExecutionActionsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1989,7 +1791,7 @@ export class WorkflowExecutionActionsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -2022,20 +1824,12 @@ export interface WorkflowExecutionsPageParams { token?: string; } -export class WorkflowExecutionsPage - extends AbstractPage - implements WorkflowExecutionsPageResponse -{ +export class WorkflowExecutionsPage extends AbstractPage implements WorkflowExecutionsPageResponse { pagination: WorkflowExecutionsPageResponse.Pagination; workflowExecutions: Array; - constructor( - client: Gitpod, - response: Response, - body: WorkflowExecutionsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: WorkflowExecutionsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -2047,7 +1841,7 @@ export class WorkflowExecutionsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } @@ -2085,12 +1879,7 @@ export class WorkflowsPage extends AbstractPage implements Workflows workflows: Array; - constructor( - client: Gitpod, - response: Response, - body: WorkflowsPageResponse, - options: FinalRequestOptions, - ) { + constructor(client: Gitpod, response: Response, body: WorkflowsPageResponse, options: FinalRequestOptions) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -2102,7 +1891,7 @@ export class WorkflowsPage extends AbstractPage implements Workflows } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken; + const cursor = this.pagination?.nextToken if (!cursor) { return null; } diff --git a/src/error.ts b/src/error.ts index fc55f46c..d0832d34 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/error instead */ -export * from './core/error'; +export * from "./core/error" \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 0eaf4c88..a0328c4e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,18 +6,4 @@ export { type Uploadable, toFile } from './core/uploads'; export { APIPromise } from './core/api-promise'; export { Gitpod, type ClientOptions } from './client'; export { PagePromise } from './core/pagination'; -export { - GitpodError, - APIError, - APIConnectionError, - APIConnectionTimeoutError, - APIUserAbortError, - NotFoundError, - ConflictError, - RateLimitError, - BadRequestError, - AuthenticationError, - InternalServerError, - PermissionDeniedError, - UnprocessableEntityError, -} from './core/error'; +export { GitpodError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError } from './core/error'; diff --git a/src/internal/builtin-types.ts b/src/internal/builtin-types.ts index c23d3bde..6059d5db 100644 --- a/src/internal/builtin-types.ts +++ b/src/internal/builtin-types.ts @@ -1,20 +1,23 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise; +export type Fetch = ( + input: string | URL | Request, + init?: RequestInit, +) => Promise /** * An alias to the builtin `RequestInit` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/RequestInit + * + * https://developer.mozilla.org/docs/Web/API/RequestInit */ type _RequestInit = RequestInit; /** * An alias to the builtin `Response` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/Response + * + * https://developer.mozilla.org/docs/Web/API/Response */ type _Response = Response; @@ -51,15 +54,7 @@ type _Array = Array; */ type _Record = Record; -export type { - _Array as Array, - _BodyInit as BodyInit, - _HeadersInit as HeadersInit, - _Record as Record, - _RequestInfo as RequestInfo, - _RequestInit as RequestInit, - _Response as Response, -}; +export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response }; /** * A copy of the builtin `EndingType` type as it isn't fully supported in certain diff --git a/src/internal/detect-platform.ts b/src/internal/detect-platform.ts index e82d95c9..394ede88 100644 --- a/src/internal/detect-platform.ts +++ b/src/internal/detect-platform.ts @@ -25,11 +25,7 @@ function getDetectedPlatform(): DetectedPlatform { if (typeof EdgeRuntime !== 'undefined') { return 'edge'; } - if ( - Object.prototype.toString.call( - typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0, - ) === '[object process]' - ) { + if (Object.prototype.toString.call(typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0) === '[object process]') { return 'node'; } return 'unknown'; diff --git a/src/internal/errors.ts b/src/internal/errors.ts index 82c7b14d..c14a742b 100644 --- a/src/internal/errors.ts +++ b/src/internal/errors.ts @@ -2,12 +2,12 @@ export function isAbortError(err: unknown) { return ( - typeof err === 'object' && - err !== null && - // Spec-compliant fetch implementations - (('name' in err && (err as any).name === 'AbortError') || + typeof err === 'object' && err !== null && ( + // Spec-compliant fetch implementations + ('name' in err && (err as any).name === 'AbortError') || // Expo fetch - ('message' in err && String((err as any).message).includes('FetchRequestCanceledException'))) + ('message' in err && String((err as any).message).includes('FetchRequestCanceledException')) + ) ); } @@ -24,10 +24,10 @@ export const castToError = (err: any): Error => { if (err.name) error.name = err.name; return error; } - } catch {} + } catch { } try { return new Error(JSON.stringify(err)); - } catch {} + } catch { } } return new Error(err); }; diff --git a/src/internal/headers.ts b/src/internal/headers.ts index c724a9d2..fa2ea2b9 100644 --- a/src/internal/headers.ts +++ b/src/internal/headers.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { isReadonlyArray } from './utils/values'; +import { isReadonlyArray } from "./utils/values"; type HeaderValue = string | undefined | null; export type HeadersLike = @@ -51,7 +51,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator(client: Gitpod, props: APIResponseProps): Promise { const { response, requestLogID, retryOfRequestLogID, startTime } = props; const body = await (async () => { + // fetch refuses to read the body when the status code is 204. if (response.status === 204) { return null as T; @@ -42,15 +43,6 @@ export async function defaultParseResponse(client: Gitpod, props: APIResponse const text = await response.text(); return text as unknown as T; })(); - loggerFor(client).debug( - `[${requestLogID}] response parsed`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - body, - durationMs: Date.now() - startTime, - }), - ); + loggerFor(client).debug(`[${requestLogID}] response parsed`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, body, durationMs: Date.now() - startTime })); return body; } diff --git a/src/internal/request-options.ts b/src/internal/request-options.ts index 2aabf9aa..a8558b20 100644 --- a/src/internal/request-options.ts +++ b/src/internal/request-options.ts @@ -76,10 +76,14 @@ export type RequestOptions = { defaultBaseURL?: string | undefined; __binaryResponse?: boolean | undefined; + }; export type EncodedContent = { bodyHeaders: HeadersLike; body: BodyInit }; -export type RequestEncoder = (request: { headers: NullableHeaders; body: unknown }) => EncodedContent; +export type RequestEncoder = (request: { + headers: NullableHeaders; + body: unknown; +}) => EncodedContent; export const FallbackEncoder: RequestEncoder = ({ headers, body }) => { return { diff --git a/src/internal/shim-types.ts b/src/internal/shim-types.ts index 8ddf7b0a..accbf576 100644 --- a/src/internal/shim-types.ts +++ b/src/internal/shim-types.ts @@ -19,8 +19,8 @@ type _ConditionalNodeReadableStream = typeof globalThis extends { ReadableStream: any } ? never : _NodeReadableStream; type _ReadableStream = NeverToAny< - | ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) - | ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) + ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) | + ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) >; export type { _ReadableStream as ReadableStream }; diff --git a/src/internal/shims.ts b/src/internal/shims.ts index 284d15c0..b2b6c739 100644 --- a/src/internal/shims.ts +++ b/src/internal/shims.ts @@ -27,9 +27,7 @@ export function makeReadableStream(...args: ReadableStreamArgs): ReadableStream if (typeof ReadableStream === 'undefined') { // Note: All of the platforms / runtimes we officially support already define // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes. - throw new Error( - '`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`', - ); + throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`'); } return new ReadableStream(...args); diff --git a/src/internal/to-file.ts b/src/internal/to-file.ts index 30eada32..c72a2b41 100644 --- a/src/internal/to-file.ts +++ b/src/internal/to-file.ts @@ -1,4 +1,4 @@ -import { BlobPart, getName, makeFile, isAsyncIterable } from './uploads'; +import { BlobPart, getName, makeFile, isAsyncIterable } from "./uploads"; import type { FilePropertyBag } from './builtin-types'; import { checkFileSupport } from './uploads'; @@ -65,11 +65,8 @@ const isResponseLike = (value: any): value is ResponseLike => typeof value.url === 'string' && typeof value.blob === 'function'; -export type ToFileInput = - | FileLike - | ResponseLike - | Exclude - | AsyncIterable; +export type ToFileInput = FileLike | ResponseLike | Exclude | AsyncIterable; + /** * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats @@ -119,7 +116,9 @@ export async function toFile( return makeFile(parts, name, options); } -async function getBytes(value: BlobLikePart | AsyncIterable): Promise> { +async function getBytes( + value: BlobLikePart | AsyncIterable, +): Promise> { let parts: Array = []; if ( typeof value === 'string' || @@ -152,3 +151,4 @@ function propsForError(value: unknown): string { const props = Object.getOwnPropertyNames(value); return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; } + diff --git a/src/internal/types.ts b/src/internal/types.ts index b668dfc0..c45fee32 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -7,40 +7,34 @@ export type KeysEnum = { [P in keyof Required]: true }; export type FinalizedRequestInit = RequestInit & { headers: Headers }; -type NotAny = [0] extends [1 & T] ? never : T; +type NotAny = [0] extends [(1 & T)] ? never : T; /** * Some environments overload the global fetch function, and Parameters only gets the last signature. */ -type OverloadedParameters = - T extends ( - { +type OverloadedParameters = T extends { + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; + (...args: infer D): unknown; +} + ? A | B | C | D + : T extends { (...args: infer A): unknown; (...args: infer B): unknown; (...args: infer C): unknown; - (...args: infer D): unknown; } - ) ? - A | B | C | D - : T extends ( - { - (...args: infer A): unknown; - (...args: infer B): unknown; - (...args: infer C): unknown; - } - ) ? - A | B | C - : T extends ( - { + ? A | B | C + : T extends { (...args: infer A): unknown; (...args: infer B): unknown; } - ) ? - A | B - : T extends (...args: infer A) => unknown ? A + ? A | B + : T extends (...args: infer A) => unknown + ? A : never; -/* eslint-disable */ + /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -63,19 +57,19 @@ type OverloadedParameters = * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ +/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ +/** @ts-ignore For users with undici */ /* prettier-ignore */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ +/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ +/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ +/** @ts-ignore For users who use Deno */ /* prettier-ignore */ type FetchRequestInit = NonNullable[1]>; -/* eslint-enable */ + type RequestInits = | NotAny diff --git a/src/internal/utils/log.ts b/src/internal/utils/log.ts index ce9d0523..723123e6 100644 --- a/src/internal/utils/log.ts +++ b/src/internal/utils/log.ts @@ -4,7 +4,7 @@ import { hasOwn } from './values'; import { type Gitpod } from '../../client'; import { RequestOptions } from '../request-options'; -type LogFn = (message: string, ...rest: unknown[]) => void; +type LogFn = (message: string, ...rest: unknown[]) => void export type Logger = { error: LogFn; warn: LogFn; @@ -21,22 +21,14 @@ const levelNumbers = { debug: 500, }; -export const parseLogLevel = ( - maybeLevel: string | undefined, - sourceName: string, - client: Gitpod, -): LogLevel | undefined => { +export const parseLogLevel = (maybeLevel: string | undefined, sourceName: string, client: Gitpod): LogLevel | undefined => { if (!maybeLevel) { return undefined; } if (hasOwn(levelNumbers, maybeLevel)) { return maybeLevel; - } - loggerFor(client).warn( - `${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify( - Object.keys(levelNumbers), - )}`, - ); + }; + loggerFor(client).warn(`${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify(Object.keys(levelNumbers))}`); return undefined; }; @@ -97,24 +89,11 @@ export const formatRequestDetails = (details: { body?: unknown; }) => { if (details.options) { - details.options = { ...details.options }; + details.options = {...details.options}; delete details.options['headers']; // redundant + leaks internals } if (details.headers) { - details.headers = Object.fromEntries( - (details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map( - ([name, value]) => [ - name, - ( - name.toLowerCase() === 'authorization' || - name.toLowerCase() === 'cookie' || - name.toLowerCase() === 'set-cookie' - ) ? - '***' - : value, - ], - ), - ); + details.headers = Object.fromEntries((details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map(([name, value]) => [name, name.toLowerCase() === 'authorization' || name.toLowerCase() === 'cookie' || name.toLowerCase() === 'set-cookie' ? '***' : value])) } if ('retryOfRequestLogID' in details) { if (details.retryOfRequestLogID) { @@ -122,5 +101,5 @@ export const formatRequestDetails = (details: { } delete details.retryOfRequestLogID; } - return details; -}; + return details +} diff --git a/src/internal/utils/uuid.ts b/src/internal/utils/uuid.ts index b0e53aaf..53708ba6 100644 --- a/src/internal/utils/uuid.ts +++ b/src/internal/utils/uuid.ts @@ -10,8 +10,10 @@ export let uuid4 = function () { return crypto.randomUUID(); } const u8 = new Uint8Array(1); - const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff; - return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => + const randomByte = crypto + ? () => crypto.getRandomValues(u8)[0]! + : () => (Math.random() * 0xff) & 0xff; + return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16), ); -}; +} diff --git a/src/pagination.ts b/src/pagination.ts index 90bf015e..e1e5d091 100644 --- a/src/pagination.ts +++ b/src/pagination.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/pagination instead */ -export * from './core/pagination'; +export * from "./core/pagination" \ No newline at end of file diff --git a/src/resource.ts b/src/resource.ts index 363e3516..57a27a94 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/resource instead */ -export * from './core/resource'; +export * from "./core/resource" \ No newline at end of file diff --git a/src/resources/accounts.ts b/src/resources/accounts.ts index 14c69d46..8ee163da 100644 --- a/src/resources/accounts.ts +++ b/src/resources/accounts.ts @@ -3,15 +3,7 @@ import { APIResource } from '../core/resource'; import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; -import { - JoinableOrganizationsPage, - type JoinableOrganizationsPageParams, - LoginProvidersPage, - type LoginProvidersPageParams, - LoginsPage, - type LoginsPageParams, - PagePromise, -} from '../core/pagination'; +import { JoinableOrganizationsPage, type JoinableOrganizationsPageParams, LoginProvidersPage, type LoginProvidersPageParams, LoginsPage, type LoginsPageParams, PagePromise } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; export class Accounts extends APIResource { @@ -111,10 +103,7 @@ export class Accounts extends APIResource { * }); * ``` */ - getSSOLoginURL( - body: AccountGetSSOLoginURLParams, - options?: RequestOptions, - ): APIPromise { + getSSOLoginURL(body: AccountGetSSOLoginURLParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.AccountService/GetSSOLoginURL', { body, ...options }); } @@ -145,16 +134,9 @@ export class Accounts extends APIResource { * } * ``` */ - listJoinableOrganizations( - params: AccountListJoinableOrganizationsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.AccountService/ListJoinableOrganizations', - JoinableOrganizationsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listJoinableOrganizations(params: AccountListJoinableOrganizationsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.AccountService/ListJoinableOrganizations', JoinableOrganizationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -198,16 +180,9 @@ export class Accounts extends APIResource { * } * ``` */ - listLoginProviders( - params: AccountListLoginProvidersParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.AccountService/ListLoginProviders', - LoginProvidersPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listLoginProviders(params: AccountListLoginProvidersParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.AccountService/ListLoginProviders', LoginProvidersPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -223,24 +198,17 @@ export class Accounts extends APIResource { * } * ``` */ - listSSOLogins( - params: AccountListSSOLoginsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.AccountService/ListSSOLogins', - LoginsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listSSOLogins(params: AccountListSSOLoginsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.AccountService/ListSSOLogins', LoginsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } } -export type JoinableOrganizationsJoinableOrganizationsPage = JoinableOrganizationsPage; +export type JoinableOrganizationsJoinableOrganizationsPage = JoinableOrganizationsPage -export type LoginProvidersLoginProvidersPage = LoginProvidersPage; +export type LoginProvidersLoginProvidersPage = LoginProvidersPage -export type AccountListSSOLoginsResponsesLoginsPage = LoginsPage; +export type AccountListSSOLoginsResponsesLoginsPage = LoginsPage export interface Account { id: string; @@ -524,7 +492,7 @@ export interface AccountRetrieveResponse { account: Account; } -export type AccountDeleteResponse = unknown; +export type AccountDeleteResponse = unknown export interface AccountGetSSOLoginURLResponse { /** @@ -698,6 +666,6 @@ export declare namespace Accounts { type AccountGetSSOLoginURLParams as AccountGetSSOLoginURLParams, type AccountListJoinableOrganizationsParams as AccountListJoinableOrganizationsParams, type AccountListLoginProvidersParams as AccountListLoginProvidersParams, - type AccountListSSOLoginsParams as AccountListSSOLoginsParams, + type AccountListSSOLoginsParams as AccountListSSOLoginsParams }; } diff --git a/src/resources/agents.ts b/src/resources/agents.ts index ab11328d..47142b78 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -4,13 +4,7 @@ import { APIResource } from '../core/resource'; import * as AgentsAPI from './agents'; import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; -import { - AgentExecutionsPage, - type AgentExecutionsPageParams, - PagePromise, - PromptsPage, - type PromptsPageParams, -} from '../core/pagination'; +import { AgentExecutionsPage, type AgentExecutionsPageParams, PagePromise, PromptsPage, type PromptsPageParams } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; export class Agents extends APIResource { @@ -37,14 +31,8 @@ export class Agents extends APIResource { * }); * ``` */ - createExecutionConversationToken( - body: AgentCreateExecutionConversationTokenParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.AgentService/CreateAgentExecutionConversationToken', { - body, - ...options, - }); + createExecutionConversationToken(body: AgentCreateExecutionConversationTokenParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.AgentService/CreateAgentExecutionConversationToken', { body, ...options }); } /** @@ -60,10 +48,7 @@ export class Agents extends APIResource { * const response = await client.agents.createPrompt(); * ``` */ - createPrompt( - body: AgentCreatePromptParams, - options?: RequestOptions, - ): APIPromise { + createPrompt(body: AgentCreatePromptParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.AgentService/CreatePrompt', { body, ...options }); } @@ -141,16 +126,9 @@ export class Agents extends APIResource { * } * ``` */ - listExecutions( - params: AgentListExecutionsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.AgentService/ListAgentExecutions', - AgentExecutionsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listExecutions(params: AgentListExecutionsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.AgentService/ListAgentExecutions', AgentExecutionsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -180,17 +158,9 @@ export class Agents extends APIResource { * } * ``` */ - listPrompts( - params: AgentListPromptsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.AgentService/ListPrompts', PromptsPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + listPrompts(params: AgentListPromptsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.AgentService/ListPrompts', PromptsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -218,10 +188,7 @@ export class Agents extends APIResource { * }); * ``` */ - retrieveExecution( - body: AgentRetrieveExecutionParams, - options?: RequestOptions, - ): APIPromise { + retrieveExecution(body: AgentRetrieveExecutionParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.AgentService/GetAgentExecution', { body, ...options }); } @@ -249,10 +216,7 @@ export class Agents extends APIResource { * }); * ``` */ - retrievePrompt( - body: AgentRetrievePromptParams, - options?: RequestOptions, - ): APIPromise { + retrievePrompt(body: AgentRetrievePromptParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.AgentService/GetPrompt', { body, ...options }); } @@ -318,10 +282,7 @@ export class Agents extends APIResource { * }); * ``` */ - startExecution( - body: AgentStartExecutionParams, - options?: RequestOptions, - ): APIPromise { + startExecution(body: AgentStartExecutionParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.AgentService/StartAgent', { body, ...options }); } @@ -365,17 +326,14 @@ export class Agents extends APIResource { * const response = await client.agents.updatePrompt(); * ``` */ - updatePrompt( - body: AgentUpdatePromptParams, - options?: RequestOptions, - ): APIPromise { + updatePrompt(body: AgentUpdatePromptParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.AgentService/UpdatePrompt', { body, ...options }); } } -export type AgentExecutionsAgentExecutionsPage = AgentExecutionsPage; +export type AgentExecutionsAgentExecutionsPage = AgentExecutionsPage -export type PromptsPromptsPage = PromptsPage; +export type PromptsPromptsPage = PromptsPage export interface AgentCodeContext { contextUrl?: AgentCodeContext.ContextURL; @@ -604,10 +562,7 @@ export namespace AgentExecution { /** * role is the role of the agent execution */ - role?: - | 'AGENT_EXECUTION_ROLE_UNSPECIFIED' - | 'AGENT_EXECUTION_ROLE_DEFAULT' - | 'AGENT_EXECUTION_ROLE_WORKFLOW'; + role?: 'AGENT_EXECUTION_ROLE_UNSPECIFIED' | 'AGENT_EXECUTION_ROLE_DEFAULT' | 'AGENT_EXECUTION_ROLE_WORKFLOW'; /** * A Timestamp represents a point in time independent of any time zone or local @@ -721,12 +676,7 @@ export namespace AgentExecution { /** * desired_phase is the desired phase of the agent run */ - desiredPhase?: - | 'PHASE_UNSPECIFIED' - | 'PHASE_PENDING' - | 'PHASE_RUNNING' - | 'PHASE_WAITING_FOR_INPUT' - | 'PHASE_STOPPED'; + desiredPhase?: 'PHASE_UNSPECIFIED' | 'PHASE_PENDING' | 'PHASE_RUNNING' | 'PHASE_WAITING_FOR_INPUT' | 'PHASE_STOPPED'; limits?: Spec.Limits; @@ -794,13 +744,7 @@ export namespace AgentExecution { /** * failure_reason contains a structured reason code for the failure. */ - failureReason?: - | 'AGENT_EXECUTION_FAILURE_REASON_UNSPECIFIED' - | 'AGENT_EXECUTION_FAILURE_REASON_ENVIRONMENT' - | 'AGENT_EXECUTION_FAILURE_REASON_SERVICE' - | 'AGENT_EXECUTION_FAILURE_REASON_LLM_INTEGRATION' - | 'AGENT_EXECUTION_FAILURE_REASON_INTERNAL' - | 'AGENT_EXECUTION_FAILURE_REASON_AGENT_EXECUTION'; + failureReason?: 'AGENT_EXECUTION_FAILURE_REASON_UNSPECIFIED' | 'AGENT_EXECUTION_FAILURE_REASON_ENVIRONMENT' | 'AGENT_EXECUTION_FAILURE_REASON_SERVICE' | 'AGENT_EXECUTION_FAILURE_REASON_LLM_INTEGRATION' | 'AGENT_EXECUTION_FAILURE_REASON_INTERNAL' | 'AGENT_EXECUTION_FAILURE_REASON_AGENT_EXECUTION'; inputTokensUsed?: string; @@ -832,12 +776,7 @@ export namespace AgentExecution { outputTokensUsed?: string; - phase?: - | 'PHASE_UNSPECIFIED' - | 'PHASE_PENDING' - | 'PHASE_RUNNING' - | 'PHASE_WAITING_FOR_INPUT' - | 'PHASE_STOPPED'; + phase?: 'PHASE_UNSPECIFIED' | 'PHASE_PENDING' | 'PHASE_RUNNING' | 'PHASE_WAITING_FOR_INPUT' | 'PHASE_STOPPED'; session?: string; @@ -851,30 +790,7 @@ export namespace AgentExecution { /** * supported_model is the LLM model being used by the agent execution. */ - supportedModel?: - | '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'; + supportedModel?: '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'; /** * transcript_url is the URL to the LLM transcript (all messages exchanged between @@ -947,12 +863,7 @@ export namespace AgentExecution { /** * phase is the current connection/health phase */ - phase?: - | 'MCP_INTEGRATION_PHASE_UNSPECIFIED' - | 'MCP_INTEGRATION_PHASE_INITIALIZING' - | 'MCP_INTEGRATION_PHASE_READY' - | 'MCP_INTEGRATION_PHASE_FAILED' - | 'MCP_INTEGRATION_PHASE_UNAVAILABLE'; + phase?: 'MCP_INTEGRATION_PHASE_UNSPECIFIED' | 'MCP_INTEGRATION_PHASE_INITIALIZING' | 'MCP_INTEGRATION_PHASE_READY' | 'MCP_INTEGRATION_PHASE_FAILED' | 'MCP_INTEGRATION_PHASE_UNAVAILABLE'; /** * warning_message contains warnings (e.g., rate limiting, degraded performance) @@ -994,12 +905,7 @@ export interface AgentMessage { /** * AgentMode defines the operational mode of an agent */ -export type AgentMode = - | 'AGENT_MODE_UNSPECIFIED' - | 'AGENT_MODE_EXECUTION' - | 'AGENT_MODE_PLANNING' - | 'AGENT_MODE_RALPH' - | 'AGENT_MODE_SPEC'; +export type AgentMode = 'AGENT_MODE_UNSPECIFIED' | 'AGENT_MODE_EXECUTION' | 'AGENT_MODE_PLANNING' | 'AGENT_MODE_RALPH' | 'AGENT_MODE_SPEC' export interface Prompt { id?: string; @@ -1245,9 +1151,9 @@ export interface PromptSpec { /** * Role identifies the sender's relationship in the parent/child hierarchy. */ -export type Role = 'ROLE_UNSPECIFIED' | 'ROLE_PARENT' | 'ROLE_CHILD'; +export type Role = 'ROLE_UNSPECIFIED' | 'ROLE_PARENT' | 'ROLE_CHILD' -export type Type = 'TYPE_UNSPECIFIED' | 'TYPE_UPDATE' | 'TYPE_COMPLETE'; +export type Type = 'TYPE_UNSPECIFIED' | 'TYPE_UPDATE' | 'TYPE_COMPLETE' export interface UserInputBlock { id?: string; @@ -1405,9 +1311,9 @@ export interface AgentCreatePromptResponse { prompt?: Prompt; } -export type AgentDeleteExecutionResponse = unknown; +export type AgentDeleteExecutionResponse = unknown -export type AgentDeletePromptResponse = unknown; +export type AgentDeletePromptResponse = unknown export interface AgentRetrieveExecutionResponse { agentExecution?: AgentExecution; @@ -1417,13 +1323,13 @@ export interface AgentRetrievePromptResponse { prompt?: Prompt; } -export type AgentSendToExecutionResponse = unknown; +export type AgentSendToExecutionResponse = unknown export interface AgentStartExecutionResponse { agentExecutionId?: string; } -export type AgentStopExecutionResponse = unknown; +export type AgentStopExecutionResponse = unknown export interface AgentUpdatePromptResponse { prompt?: Prompt; @@ -1485,9 +1391,7 @@ export namespace AgentListExecutionsParams { projectIds?: Array; - roles?: Array< - 'AGENT_EXECUTION_ROLE_UNSPECIFIED' | 'AGENT_EXECUTION_ROLE_DEFAULT' | 'AGENT_EXECUTION_ROLE_WORKFLOW' - >; + roles?: Array<'AGENT_EXECUTION_ROLE_UNSPECIFIED' | 'AGENT_EXECUTION_ROLE_DEFAULT' | 'AGENT_EXECUTION_ROLE_WORKFLOW'>; /** * session_ids filters the response to only executions belonging to the specified @@ -1495,9 +1399,7 @@ export namespace AgentListExecutionsParams { */ sessionIds?: Array; - statusPhases?: Array< - 'PHASE_UNSPECIFIED' | 'PHASE_PENDING' | 'PHASE_RUNNING' | 'PHASE_WAITING_FOR_INPUT' | 'PHASE_STOPPED' - >; + statusPhases?: Array<'PHASE_UNSPECIFIED' | 'PHASE_PENDING' | 'PHASE_RUNNING' | 'PHASE_WAITING_FOR_INPUT' | 'PHASE_STOPPED'>; } export interface Pagination { @@ -1739,6 +1641,6 @@ export declare namespace Agents { type AgentSendToExecutionParams as AgentSendToExecutionParams, type AgentStartExecutionParams as AgentStartExecutionParams, type AgentStopExecutionParams as AgentStopExecutionParams, - type AgentUpdatePromptParams as AgentUpdatePromptParams, + type AgentUpdatePromptParams as AgentUpdatePromptParams }; } diff --git a/src/resources/automations.ts b/src/resources/automations.ts index a17290d7..47a94ad8 100644 --- a/src/resources/automations.ts +++ b/src/resources/automations.ts @@ -5,17 +5,7 @@ import * as AutomationsAPI from './automations'; import * as AgentsAPI from './agents'; import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; -import { - OutputsPage, - type OutputsPageParams, - PagePromise, - WorkflowExecutionActionsPage, - type WorkflowExecutionActionsPageParams, - WorkflowExecutionsPage, - type WorkflowExecutionsPageParams, - WorkflowsPage, - type WorkflowsPageParams, -} from '../core/pagination'; +import { OutputsPage, type OutputsPageParams, PagePromise, WorkflowExecutionActionsPage, type WorkflowExecutionActionsPageParams, WorkflowExecutionsPage, type WorkflowExecutionsPageParams, WorkflowsPage, type WorkflowsPageParams } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; export class Automations extends APIResource { @@ -156,17 +146,9 @@ export class Automations extends APIResource { * } * ``` */ - list( - params: AutomationListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflows', WorkflowsPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + list(params: AutomationListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflows', WorkflowsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -258,14 +240,8 @@ export class Automations extends APIResource { * }); * ``` */ - cancelExecutionAction( - body: AutomationCancelExecutionActionParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.WorkflowService/CancelWorkflowExecutionAction', { - body, - ...options, - }); + cancelExecutionAction(body: AutomationCancelExecutionActionParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.WorkflowService/CancelWorkflowExecutionAction', { body, ...options }); } /** @@ -307,16 +283,9 @@ export class Automations extends APIResource { * } * ``` */ - listExecutionActions( - params: AutomationListExecutionActionsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.WorkflowService/ListWorkflowExecutionActions', - WorkflowExecutionActionsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listExecutionActions(params: AutomationListExecutionActionsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflowExecutionActions', WorkflowExecutionActionsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -359,16 +328,9 @@ export class Automations extends APIResource { * } * ``` */ - listExecutionOutputs( - params: AutomationListExecutionOutputsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.WorkflowService/ListWorkflowExecutionOutputs', - OutputsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listExecutionOutputs(params: AutomationListExecutionOutputsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflowExecutionOutputs', OutputsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -408,16 +370,9 @@ export class Automations extends APIResource { * } * ``` */ - listExecutions( - params: AutomationListExecutionsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.WorkflowService/ListWorkflowExecutions', - WorkflowExecutionsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listExecutions(params: AutomationListExecutionsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflowExecutions', WorkflowExecutionsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -449,10 +404,7 @@ export class Automations extends APIResource { * ); * ``` */ - retrieveExecution( - body: AutomationRetrieveExecutionParams, - options?: RequestOptions, - ): APIPromise { + retrieveExecution(body: AutomationRetrieveExecutionParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.WorkflowService/GetWorkflowExecution', { body, ...options }); } @@ -484,10 +436,7 @@ export class Automations extends APIResource { * }); * ``` */ - retrieveExecutionAction( - body: AutomationRetrieveExecutionActionParams, - options?: RequestOptions, - ): APIPromise { + retrieveExecutionAction(body: AutomationRetrieveExecutionActionParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.WorkflowService/GetWorkflowExecutionAction', { body, ...options }); } @@ -517,23 +466,18 @@ export class Automations extends APIResource { * }); * ``` */ - startExecution( - body: AutomationStartExecutionParams, - options?: RequestOptions, - ): APIPromise { + startExecution(body: AutomationStartExecutionParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.WorkflowService/StartWorkflow', { body, ...options }); } } -export type WorkflowsWorkflowsPage = WorkflowsPage; +export type WorkflowsWorkflowsPage = WorkflowsPage -export type WorkflowExecutionActionsWorkflowExecutionActionsPage = - WorkflowExecutionActionsPage; +export type WorkflowExecutionActionsWorkflowExecutionActionsPage = WorkflowExecutionActionsPage -export type AutomationListExecutionOutputsResponsesOutputsPage = - OutputsPage; +export type AutomationListExecutionOutputsResponsesOutputsPage = OutputsPage -export type WorkflowExecutionsWorkflowExecutionsPage = WorkflowExecutionsPage; +export type WorkflowExecutionsWorkflowExecutionsPage = WorkflowExecutionsPage /** * Workflow represents a workflow configuration. @@ -1291,15 +1235,7 @@ export namespace WorkflowExecution { pendingActionCount?: number; - phase?: - | 'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' - | 'WORKFLOW_EXECUTION_PHASE_PENDING' - | 'WORKFLOW_EXECUTION_PHASE_RUNNING' - | 'WORKFLOW_EXECUTION_PHASE_STOPPING' - | 'WORKFLOW_EXECUTION_PHASE_STOPPED' - | 'WORKFLOW_EXECUTION_PHASE_DELETING' - | 'WORKFLOW_EXECUTION_PHASE_DELETED' - | 'WORKFLOW_EXECUTION_PHASE_COMPLETED'; + phase?: 'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_PHASE_COMPLETED'; runningActionCount?: number; @@ -1322,10 +1258,7 @@ export namespace WorkflowExecution { /** * Error code identifying the type of error. */ - code?: - | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' - | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' - | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -1382,10 +1315,7 @@ export namespace WorkflowExecution { /** * Error code identifying the type of error. */ - code?: - | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' - | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' - | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -1709,15 +1639,7 @@ export namespace WorkflowExecutionAction { /** * WorkflowExecutionActionPhase defines the phases of workflow execution action. */ - phase?: - | 'WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_PENDING' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETING' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETED' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_DONE'; + phase?: 'WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DONE'; /** * Step-level progress tracking @@ -1741,10 +1663,7 @@ export namespace WorkflowExecutionAction { /** * Error code identifying the type of error. */ - code?: - | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' - | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' - | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -1895,13 +1814,7 @@ export namespace WorkflowExecutionAction { */ finishedAt?: string; - phase?: - | 'STEP_PHASE_UNSPECIFIED' - | 'STEP_PHASE_PENDING' - | 'STEP_PHASE_RUNNING' - | 'STEP_PHASE_DONE' - | 'STEP_PHASE_FAILED' - | 'STEP_PHASE_CANCELLED'; + phase?: 'STEP_PHASE_UNSPECIFIED' | 'STEP_PHASE_PENDING' | 'STEP_PHASE_RUNNING' | 'STEP_PHASE_DONE' | 'STEP_PHASE_FAILED' | 'STEP_PHASE_CANCELLED'; /** * A Timestamp represents a point in time independent of any time zone or local @@ -2016,10 +1929,7 @@ export namespace WorkflowExecutionAction { /** * Error code identifying the type of error. */ - code?: - | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' - | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' - | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -2077,10 +1987,7 @@ export namespace WorkflowExecutionAction { /** * Error code identifying the type of error. */ - code?: - | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' - | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' - | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -2275,16 +2182,7 @@ export namespace WorkflowTrigger { * for PRs in repositories matching the trigger context. */ export interface PullRequest { - events?: Array< - | 'PULL_REQUEST_EVENT_UNSPECIFIED' - | 'PULL_REQUEST_EVENT_OPENED' - | 'PULL_REQUEST_EVENT_UPDATED' - | 'PULL_REQUEST_EVENT_APPROVED' - | 'PULL_REQUEST_EVENT_MERGED' - | 'PULL_REQUEST_EVENT_CLOSED' - | 'PULL_REQUEST_EVENT_READY_FOR_REVIEW' - | 'PULL_REQUEST_EVENT_REVIEW_REQUESTED' - >; + events?: Array<'PULL_REQUEST_EVENT_UNSPECIFIED' | 'PULL_REQUEST_EVENT_OPENED' | 'PULL_REQUEST_EVENT_UPDATED' | 'PULL_REQUEST_EVENT_APPROVED' | 'PULL_REQUEST_EVENT_MERGED' | 'PULL_REQUEST_EVENT_CLOSED' | 'PULL_REQUEST_EVENT_READY_FOR_REVIEW' | 'PULL_REQUEST_EVENT_REVIEW_REQUESTED'>; /** * integration_id is the optional ID of an integration that acts as the source of @@ -2454,11 +2352,11 @@ export interface AutomationUpdateResponse { workflow?: Workflow; } -export type AutomationDeleteResponse = unknown; +export type AutomationDeleteResponse = unknown -export type AutomationCancelExecutionResponse = unknown; +export type AutomationCancelExecutionResponse = unknown -export type AutomationCancelExecutionActionResponse = unknown; +export type AutomationCancelExecutionActionResponse = unknown export interface AutomationListExecutionOutputsResponse { actionId?: string; @@ -2642,16 +2540,7 @@ export namespace AutomationListParams { * workflows whose most recent execution matches one of the specified phases are * returned. */ - statusPhases?: Array< - | 'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' - | 'WORKFLOW_EXECUTION_PHASE_PENDING' - | 'WORKFLOW_EXECUTION_PHASE_RUNNING' - | 'WORKFLOW_EXECUTION_PHASE_STOPPING' - | 'WORKFLOW_EXECUTION_PHASE_STOPPED' - | 'WORKFLOW_EXECUTION_PHASE_DELETING' - | 'WORKFLOW_EXECUTION_PHASE_DELETED' - | 'WORKFLOW_EXECUTION_PHASE_COMPLETED' - >; + statusPhases?: Array<'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_PHASE_COMPLETED'>; workflowIds?: Array; } @@ -2720,16 +2609,7 @@ export interface AutomationListExecutionActionsParams extends WorkflowExecutionA export namespace AutomationListExecutionActionsParams { export interface Filter { - phases?: Array< - | 'WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_PENDING' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETING' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETED' - | 'WORKFLOW_EXECUTION_ACTION_PHASE_DONE' - >; + phases?: Array<'WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DONE'>; workflowExecutionActionIds?: Array; @@ -2814,16 +2694,7 @@ export namespace AutomationListExecutionsParams { */ search?: string; - statusPhases?: Array< - | 'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' - | 'WORKFLOW_EXECUTION_PHASE_PENDING' - | 'WORKFLOW_EXECUTION_PHASE_RUNNING' - | 'WORKFLOW_EXECUTION_PHASE_STOPPING' - | 'WORKFLOW_EXECUTION_PHASE_STOPPED' - | 'WORKFLOW_EXECUTION_PHASE_DELETING' - | 'WORKFLOW_EXECUTION_PHASE_DELETED' - | 'WORKFLOW_EXECUTION_PHASE_COMPLETED' - >; + statusPhases?: Array<'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_PHASE_COMPLETED'>; workflowExecutionIds?: Array; @@ -2909,6 +2780,6 @@ export declare namespace Automations { type AutomationListExecutionsParams as AutomationListExecutionsParams, type AutomationRetrieveExecutionParams as AutomationRetrieveExecutionParams, type AutomationRetrieveExecutionActionParams as AutomationRetrieveExecutionActionParams, - type AutomationStartExecutionParams as AutomationStartExecutionParams, + type AutomationStartExecutionParams as AutomationStartExecutionParams }; } diff --git a/src/resources/editors.ts b/src/resources/editors.ts index 61ad8987..5b4647e7 100644 --- a/src/resources/editors.ts +++ b/src/resources/editors.ts @@ -80,13 +80,8 @@ export class Editors extends APIResource { * ``` */ list(params: EditorListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.EditorService/ListEditors', EditorsPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.EditorService/ListEditors', EditorsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -125,7 +120,7 @@ export class Editors extends APIResource { } } -export type EditorsEditorsPage = EditorsPage; +export type EditorsEditorsPage = EditorsPage export interface Editor { id: string; @@ -252,6 +247,6 @@ export declare namespace Editors { type EditorsEditorsPage as EditorsEditorsPage, type EditorRetrieveParams as EditorRetrieveParams, type EditorListParams as EditorListParams, - type EditorResolveURLParams as EditorResolveURLParams, + type EditorResolveURLParams as EditorResolveURLParams }; } diff --git a/src/resources/environments/automations/automations.ts b/src/resources/environments/automations/automations.ts index 23bb791f..a9dcef4b 100644 --- a/src/resources/environments/automations/automations.ts +++ b/src/resources/environments/automations/automations.ts @@ -3,44 +3,9 @@ import { APIResource } from '../../../core/resource'; import * as Shared from '../../shared'; import * as ServicesAPI from './services'; -import { - Service, - ServiceCreateParams, - ServiceCreateResponse, - ServiceDeleteParams, - ServiceDeleteResponse, - ServiceListParams, - ServiceMetadata, - ServicePhase, - ServiceRetrieveParams, - ServiceRetrieveResponse, - ServiceRole, - ServiceSpec, - ServiceStartParams, - ServiceStartResponse, - ServiceStatus, - ServiceStopParams, - ServiceStopResponse, - ServiceUpdateParams, - ServiceUpdateResponse, - Services as ServicesAPIServices, - ServicesServicesPage, -} from './services'; +import { Service, ServiceCreateParams, ServiceCreateResponse, ServiceDeleteParams, ServiceDeleteResponse, ServiceListParams, ServiceMetadata, ServicePhase, ServiceRetrieveParams, ServiceRetrieveResponse, ServiceRole, ServiceSpec, ServiceStartParams, ServiceStartResponse, ServiceStatus, ServiceStopParams, ServiceStopResponse, ServiceUpdateParams, ServiceUpdateResponse, Services as ServicesAPIServices, ServicesServicesPage } from './services'; import * as TasksAPI from './tasks/tasks'; -import { - TaskCreateParams, - TaskCreateResponse, - TaskDeleteParams, - TaskDeleteResponse, - TaskListParams, - TaskRetrieveParams, - TaskRetrieveResponse, - TaskStartParams, - TaskStartResponse, - TaskUpdateParams, - TaskUpdateResponse, - Tasks as TasksAPITasks, -} from './tasks/tasks'; +import { TaskCreateParams, TaskCreateResponse, TaskDeleteParams, TaskDeleteResponse, TaskListParams, TaskRetrieveParams, TaskRetrieveResponse, TaskStartParams, TaskStartResponse, TaskUpdateParams, TaskUpdateResponse, Tasks as TasksAPITasks } from './tasks/tasks'; import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; @@ -114,10 +79,7 @@ export class Automations extends APIResource { * ``` */ upsert(body: AutomationUpsertParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentAutomationService/UpsertAutomationsFile', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.EnvironmentAutomationService/UpsertAutomationsFile', { body, ...options }); } } @@ -220,7 +182,7 @@ export declare namespace Automations { export { type AutomationsFile as AutomationsFile, type AutomationUpsertResponse as AutomationUpsertResponse, - type AutomationUpsertParams as AutomationUpsertParams, + type AutomationUpsertParams as AutomationUpsertParams }; export { @@ -244,7 +206,7 @@ export declare namespace Automations { type ServiceListParams as ServiceListParams, type ServiceDeleteParams as ServiceDeleteParams, type ServiceStartParams as ServiceStartParams, - type ServiceStopParams as ServiceStopParams, + type ServiceStopParams as ServiceStopParams }; export { @@ -259,6 +221,6 @@ export declare namespace Automations { type TaskUpdateParams as TaskUpdateParams, type TaskListParams as TaskListParams, type TaskDeleteParams as TaskDeleteParams, - type TaskStartParams as TaskStartParams, + type TaskStartParams as TaskStartParams }; } diff --git a/src/resources/environments/automations/index.ts b/src/resources/environments/automations/index.ts index ae3513fc..17c94aa8 100644 --- a/src/resources/environments/automations/index.ts +++ b/src/resources/environments/automations/index.ts @@ -1,45 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Automations, - type AutomationsFile, - type AutomationUpsertResponse, - type AutomationUpsertParams, -} from './automations'; -export { - Services, - type Service, - type ServiceMetadata, - type ServicePhase, - type ServiceRole, - type ServiceSpec, - type ServiceStatus, - type ServiceCreateResponse, - type ServiceRetrieveResponse, - type ServiceUpdateResponse, - type ServiceDeleteResponse, - type ServiceStartResponse, - type ServiceStopResponse, - type ServiceCreateParams, - type ServiceRetrieveParams, - type ServiceUpdateParams, - type ServiceListParams, - type ServiceDeleteParams, - type ServiceStartParams, - type ServiceStopParams, - type ServicesServicesPage, -} from './services'; -export { - Tasks, - type TaskCreateResponse, - type TaskRetrieveResponse, - type TaskUpdateResponse, - type TaskDeleteResponse, - type TaskStartResponse, - type TaskCreateParams, - type TaskRetrieveParams, - type TaskUpdateParams, - type TaskListParams, - type TaskDeleteParams, - type TaskStartParams, -} from './tasks/index'; +export { Automations, type AutomationsFile, type AutomationUpsertResponse, type AutomationUpsertParams } from './automations';; +export { Services, type Service, type ServiceMetadata, type ServicePhase, type ServiceRole, type ServiceSpec, type ServiceStatus, type ServiceCreateResponse, type ServiceRetrieveResponse, type ServiceUpdateResponse, type ServiceDeleteResponse, type ServiceStartResponse, type ServiceStopResponse, type ServiceCreateParams, type ServiceRetrieveParams, type ServiceUpdateParams, type ServiceListParams, type ServiceDeleteParams, type ServiceStartParams, type ServiceStopParams, type ServicesServicesPage } from './services';; +export { Tasks, type TaskCreateResponse, type TaskRetrieveResponse, type TaskUpdateResponse, type TaskDeleteResponse, type TaskStartResponse, type TaskCreateParams, type TaskRetrieveParams, type TaskUpdateParams, type TaskListParams, type TaskDeleteParams, type TaskStartParams } from './tasks/index';; diff --git a/src/resources/environments/automations/services.ts b/src/resources/environments/automations/services.ts index b10dd0ce..45632e89 100644 --- a/src/resources/environments/automations/services.ts +++ b/src/resources/environments/automations/services.ts @@ -214,12 +214,8 @@ export class Services extends APIResource { * ``` */ list(params: ServiceListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.EnvironmentAutomationService/ListServices', - ServicesPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.EnvironmentAutomationService/ListServices', ServicesPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -331,7 +327,7 @@ export class Services extends APIResource { } } -export type ServicesServicesPage = ServicesPage; +export type ServicesServicesPage = ServicesPage export interface Service { id: string; @@ -387,21 +383,9 @@ export interface ServiceMetadata { triggeredBy?: Array; } -export type ServicePhase = - | 'SERVICE_PHASE_UNSPECIFIED' - | 'SERVICE_PHASE_STARTING' - | 'SERVICE_PHASE_RUNNING' - | 'SERVICE_PHASE_STOPPING' - | 'SERVICE_PHASE_STOPPED' - | 'SERVICE_PHASE_FAILED' - | 'SERVICE_PHASE_DELETED'; - -export type ServiceRole = - | 'SERVICE_ROLE_UNSPECIFIED' - | 'SERVICE_ROLE_DEFAULT' - | 'SERVICE_ROLE_EDITOR' - | 'SERVICE_ROLE_AI_AGENT' - | 'SERVICE_ROLE_SECURITY_AGENT'; +export type ServicePhase = 'SERVICE_PHASE_UNSPECIFIED' | 'SERVICE_PHASE_STARTING' | 'SERVICE_PHASE_RUNNING' | 'SERVICE_PHASE_STOPPING' | 'SERVICE_PHASE_STOPPED' | 'SERVICE_PHASE_FAILED' | 'SERVICE_PHASE_DELETED' + +export type ServiceRole = 'SERVICE_ROLE_UNSPECIFIED' | 'SERVICE_ROLE_DEFAULT' | 'SERVICE_ROLE_EDITOR' | 'SERVICE_ROLE_AI_AGENT' | 'SERVICE_ROLE_SECURITY_AGENT' export interface ServiceSpec { /** @@ -523,13 +507,13 @@ export interface ServiceRetrieveResponse { service: Service; } -export type ServiceUpdateResponse = unknown; +export type ServiceUpdateResponse = unknown -export type ServiceDeleteResponse = unknown; +export type ServiceDeleteResponse = unknown -export type ServiceStartResponse = unknown; +export type ServiceStartResponse = unknown -export type ServiceStopResponse = unknown; +export type ServiceStopResponse = unknown export interface ServiceCreateParams { environmentId?: string; @@ -715,6 +699,6 @@ export declare namespace Services { type ServiceListParams as ServiceListParams, type ServiceDeleteParams as ServiceDeleteParams, type ServiceStartParams as ServiceStartParams, - type ServiceStopParams as ServiceStopParams, + type ServiceStopParams as ServiceStopParams }; } diff --git a/src/resources/environments/automations/tasks/executions.ts b/src/resources/environments/automations/tasks/executions.ts index 1f2483bd..d0e60c1c 100644 --- a/src/resources/environments/automations/tasks/executions.ts +++ b/src/resources/environments/automations/tasks/executions.ts @@ -37,10 +37,7 @@ export class Executions extends APIResource { * ``` */ retrieve(body: ExecutionRetrieveParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentAutomationService/GetTaskExecution', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.EnvironmentAutomationService/GetTaskExecution', { body, ...options }); } /** @@ -94,16 +91,9 @@ export class Executions extends APIResource { * } * ``` */ - list( - params: ExecutionListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions', - TaskExecutionsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: ExecutionListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions', TaskExecutionsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -134,10 +124,7 @@ export class Executions extends APIResource { * ``` */ stop(body: ExecutionStopParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentAutomationService/StopTaskExecution', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.EnvironmentAutomationService/StopTaskExecution', { body, ...options }); } } @@ -145,7 +132,7 @@ export interface ExecutionRetrieveResponse { taskExecution: Shared.TaskExecution; } -export type ExecutionStopResponse = unknown; +export type ExecutionStopResponse = unknown export interface ExecutionRetrieveParams { id?: string; @@ -217,8 +204,8 @@ export declare namespace Executions { type ExecutionStopResponse as ExecutionStopResponse, type ExecutionRetrieveParams as ExecutionRetrieveParams, type ExecutionListParams as ExecutionListParams, - type ExecutionStopParams as ExecutionStopParams, + type ExecutionStopParams as ExecutionStopParams }; } -export { type TaskExecutionsTaskExecutionsPage }; +export { type TaskExecutionsTaskExecutionsPage } diff --git a/src/resources/environments/automations/tasks/index.ts b/src/resources/environments/automations/tasks/index.ts index 1c21f289..8012849c 100644 --- a/src/resources/environments/automations/tasks/index.ts +++ b/src/resources/environments/automations/tasks/index.ts @@ -1,24 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Executions, - type ExecutionRetrieveResponse, - type ExecutionStopResponse, - type ExecutionRetrieveParams, - type ExecutionListParams, - type ExecutionStopParams, -} from './executions'; -export { - Tasks, - type TaskCreateResponse, - type TaskRetrieveResponse, - type TaskUpdateResponse, - type TaskDeleteResponse, - type TaskStartResponse, - type TaskCreateParams, - type TaskRetrieveParams, - type TaskUpdateParams, - type TaskListParams, - type TaskDeleteParams, - type TaskStartParams, -} from './tasks'; +export { Executions, type ExecutionRetrieveResponse, type ExecutionStopResponse, type ExecutionRetrieveParams, type ExecutionListParams, type ExecutionStopParams } from './executions';; +export { Tasks, type TaskCreateResponse, type TaskRetrieveResponse, type TaskUpdateResponse, type TaskDeleteResponse, type TaskStartResponse, type TaskCreateParams, type TaskRetrieveParams, type TaskUpdateParams, type TaskListParams, type TaskDeleteParams, type TaskStartParams } from './tasks';; diff --git a/src/resources/environments/automations/tasks/tasks.ts b/src/resources/environments/automations/tasks/tasks.ts index 16d9bf75..315cd2ed 100644 --- a/src/resources/environments/automations/tasks/tasks.ts +++ b/src/resources/environments/automations/tasks/tasks.ts @@ -4,14 +4,7 @@ import { APIResource } from '../../../../core/resource'; import * as Shared from '../../../shared'; import { TasksTasksPage } from '../../../shared'; import * as ExecutionsAPI from './executions'; -import { - ExecutionListParams, - ExecutionRetrieveParams, - ExecutionRetrieveResponse, - ExecutionStopParams, - ExecutionStopResponse, - Executions, -} from './executions'; +import { ExecutionListParams, ExecutionRetrieveParams, ExecutionRetrieveResponse, ExecutionStopParams, ExecutionStopResponse, Executions } from './executions'; import { APIPromise } from '../../../../core/api-promise'; import { PagePromise, TasksPage, type TasksPageParams } from '../../../../core/pagination'; import { RequestOptions } from '../../../../internal/request-options'; @@ -206,12 +199,8 @@ export class Tasks extends APIResource { * ``` */ list(params: TaskListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.EnvironmentAutomationService/ListTasks', - TasksPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.EnvironmentAutomationService/ListTasks', TasksPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -286,9 +275,9 @@ export interface TaskRetrieveResponse { task: Shared.Task; } -export type TaskUpdateResponse = unknown; +export type TaskUpdateResponse = unknown -export type TaskDeleteResponse = unknown; +export type TaskDeleteResponse = unknown export interface TaskStartResponse { taskExecution: Shared.TaskExecution; @@ -418,7 +407,7 @@ export declare namespace Tasks { type TaskUpdateParams as TaskUpdateParams, type TaskListParams as TaskListParams, type TaskDeleteParams as TaskDeleteParams, - type TaskStartParams as TaskStartParams, + type TaskStartParams as TaskStartParams }; export { @@ -427,8 +416,8 @@ export declare namespace Tasks { type ExecutionStopResponse as ExecutionStopResponse, type ExecutionRetrieveParams as ExecutionRetrieveParams, type ExecutionListParams as ExecutionListParams, - type ExecutionStopParams as ExecutionStopParams, + type ExecutionStopParams as ExecutionStopParams }; } -export { type TasksTasksPage }; +export { type TasksTasksPage } diff --git a/src/resources/environments/classes.ts b/src/resources/environments/classes.ts index 77b5f68f..a31a04eb 100644 --- a/src/resources/environments/classes.ts +++ b/src/resources/environments/classes.ts @@ -4,11 +4,7 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import { EnvironmentClassesEnvironmentClassesPage } from '../shared'; import * as RunnersAPI from '../runners/runners'; -import { - EnvironmentClassesPage, - type EnvironmentClassesPageParams, - PagePromise, -} from '../../core/pagination'; +import { EnvironmentClassesPage, type EnvironmentClassesPageParams, PagePromise } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Classes extends APIResource { @@ -40,16 +36,9 @@ export class Classes extends APIResource { * } * ``` */ - list( - params: ClassListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.EnvironmentService/ListEnvironmentClasses', - EnvironmentClassesPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: ClassListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.EnvironmentService/ListEnvironmentClasses', EnvironmentClassesPage, { query: { token, pageSize }, body, method: 'post', ...options }); } } @@ -119,7 +108,9 @@ export namespace ClassListParams { } export declare namespace Classes { - export { type ClassListParams as ClassListParams }; + export { + type ClassListParams as ClassListParams + }; } -export { type EnvironmentClassesEnvironmentClassesPage }; +export { type EnvironmentClassesEnvironmentClassesPage } diff --git a/src/resources/environments/environments.ts b/src/resources/environments/environments.ts index 73681ee8..1aca5996 100644 --- a/src/resources/environments/environments.ts +++ b/src/resources/environments/environments.ts @@ -9,12 +9,7 @@ import * as PoliciesAPI from '../organizations/policies'; import * as ProjectsAPI from '../projects/projects'; import * as RunnersAPI from '../runners/runners'; import * as AutomationsAPI from './automations/automations'; -import { - AutomationUpsertParams, - AutomationUpsertResponse, - Automations, - AutomationsFile as AutomationsAPIAutomationsFile, -} from './automations/automations'; +import { AutomationUpsertParams, AutomationUpsertResponse, Automations, AutomationsFile as AutomationsAPIAutomationsFile } from './automations/automations'; import { APIPromise } from '../../core/api-promise'; import { EnvironmentsPage, type EnvironmentsPageParams, PagePromise } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; @@ -141,10 +136,7 @@ export class Environments extends APIResource { * }); * ``` */ - retrieve( - body: EnvironmentRetrieveParams, - options?: RequestOptions, - ): APIPromise { + retrieve(body: EnvironmentRetrieveParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.EnvironmentService/GetEnvironment', { body, ...options }); } @@ -273,16 +265,9 @@ export class Environments extends APIResource { * } * ``` */ - list( - params: EnvironmentListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.EnvironmentService/ListEnvironments', - EnvironmentsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: EnvironmentListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.EnvironmentService/ListEnvironments', EnvironmentsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -346,14 +331,8 @@ export class Environments extends APIResource { * }); * ``` */ - createEnvironmentToken( - body: EnvironmentCreateEnvironmentTokenParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentAccessToken', { - body, - ...options, - }); + createEnvironmentToken(body: EnvironmentCreateEnvironmentTokenParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentAccessToken', { body, ...options }); } /** @@ -402,14 +381,8 @@ export class Environments extends APIResource { * }); * ``` */ - createFromProject( - body: EnvironmentCreateFromProjectParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentFromProject', { - body, - ...options, - }); + createFromProject(body: EnvironmentCreateFromProjectParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentFromProject', { body, ...options }); } /** @@ -435,14 +408,8 @@ export class Environments extends APIResource { * }); * ``` */ - createLogsToken( - body: EnvironmentCreateLogsTokenParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentLogsToken', { - body, - ...options, - }); + createLogsToken(body: EnvironmentCreateLogsTokenParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentLogsToken', { body, ...options }); } /** @@ -557,26 +524,18 @@ export class Environments extends APIResource { } } -export type EnvironmentsEnvironmentsPage = EnvironmentsPage; +export type EnvironmentsEnvironmentsPage = EnvironmentsPage /** * Admission level describes who can access an environment instance and its ports. */ -export type AdmissionLevel = - | 'ADMISSION_LEVEL_UNSPECIFIED' - | 'ADMISSION_LEVEL_OWNER_ONLY' - | 'ADMISSION_LEVEL_EVERYONE' - | 'ADMISSION_LEVEL_ORGANIZATION' - | 'ADMISSION_LEVEL_CREATOR_ONLY'; +export type AdmissionLevel = 'ADMISSION_LEVEL_UNSPECIFIED' | 'ADMISSION_LEVEL_OWNER_ONLY' | 'ADMISSION_LEVEL_EVERYONE' | 'ADMISSION_LEVEL_ORGANIZATION' | 'ADMISSION_LEVEL_CREATOR_ONLY' /** * BPFDebugLevel controls the verbosity of BPF trace_pipe output (bpf_printk). * Applies to all BPF-based agents (veto exec, future agents). */ -export type BpfDebugLevel = - | 'BPF_DEBUG_LEVEL_UNSPECIFIED' - | 'BPF_DEBUG_LEVEL_INFO' - | 'BPF_DEBUG_LEVEL_VERBOSE'; +export type BpfDebugLevel = 'BPF_DEBUG_LEVEL_UNSPECIFIED' | 'BPF_DEBUG_LEVEL_INFO' | 'BPF_DEBUG_LEVEL_VERBOSE' /** * +resource get environment @@ -703,25 +662,12 @@ export interface EnvironmentMetadata { runnerId?: string; } -export type EnvironmentPhase = - | 'ENVIRONMENT_PHASE_UNSPECIFIED' - | 'ENVIRONMENT_PHASE_CREATING' - | 'ENVIRONMENT_PHASE_STARTING' - | 'ENVIRONMENT_PHASE_RUNNING' - | 'ENVIRONMENT_PHASE_UPDATING' - | 'ENVIRONMENT_PHASE_STOPPING' - | 'ENVIRONMENT_PHASE_STOPPED' - | 'ENVIRONMENT_PHASE_DELETING' - | 'ENVIRONMENT_PHASE_DELETED'; +export type EnvironmentPhase = 'ENVIRONMENT_PHASE_UNSPECIFIED' | 'ENVIRONMENT_PHASE_CREATING' | 'ENVIRONMENT_PHASE_STARTING' | 'ENVIRONMENT_PHASE_RUNNING' | 'ENVIRONMENT_PHASE_UPDATING' | 'ENVIRONMENT_PHASE_STOPPING' | 'ENVIRONMENT_PHASE_STOPPED' | 'ENVIRONMENT_PHASE_DELETING' | 'ENVIRONMENT_PHASE_DELETED' /** * EnvironmentRole represents the role of an environment */ -export type EnvironmentRole = - | 'ENVIRONMENT_ROLE_UNSPECIFIED' - | 'ENVIRONMENT_ROLE_DEFAULT' - | 'ENVIRONMENT_ROLE_PREBUILD' - | 'ENVIRONMENT_ROLE_WORKFLOW'; +export type EnvironmentRole = 'ENVIRONMENT_ROLE_UNSPECIFIED' | 'ENVIRONMENT_ROLE_DEFAULT' | 'ENVIRONMENT_ROLE_PREBUILD' | 'ENVIRONMENT_ROLE_WORKFLOW' /** * EnvironmentSpec specifies the configuration of an environment for an environment @@ -973,13 +919,7 @@ export namespace EnvironmentSpec { * scope indicates where this secret originated from. Used to filter secrets during * build (only org and project secrets are injected). */ - scope?: - | 'SCOPE_UNSPECIFIED' - | 'SCOPE_ORGANIZATION' - | 'SCOPE_PROJECT' - | 'SCOPE_USER' - | 'SCOPE_SERVICE_ACCOUNT' - | 'SCOPE_RUNNER'; + scope?: 'SCOPE_UNSPECIFIED' | 'SCOPE_ORGANIZATION' | 'SCOPE_PROJECT' | 'SCOPE_USER' | 'SCOPE_SERVICE_ACCOUNT' | 'SCOPE_RUNNER'; /** * session indicated the current session of the secret. When the session does not @@ -1151,11 +1091,7 @@ export namespace EnvironmentStatus { * automations_file_presence indicates how an automations file is present in the * environment. */ - automationsFilePresence?: - | 'PRESENCE_UNSPECIFIED' - | 'PRESENCE_ABSENT' - | 'PRESENCE_DISCOVERED' - | 'PRESENCE_SPECIFIED'; + automationsFilePresence?: 'PRESENCE_UNSPECIFIED' | 'PRESENCE_ABSENT' | 'PRESENCE_DISCOVERED' | 'PRESENCE_SPECIFIED'; /** * failure_message contains the reason the automations file failed to be applied. @@ -1166,14 +1102,7 @@ export namespace EnvironmentStatus { /** * phase is the current phase of the automations file. */ - phase?: - | 'CONTENT_PHASE_UNSPECIFIED' - | 'CONTENT_PHASE_CREATING' - | 'CONTENT_PHASE_INITIALIZING' - | 'CONTENT_PHASE_READY' - | 'CONTENT_PHASE_UPDATING' - | 'CONTENT_PHASE_FAILED' - | 'CONTENT_PHASE_UNAVAILABLE'; + phase?: 'CONTENT_PHASE_UNSPECIFIED' | 'CONTENT_PHASE_CREATING' | 'CONTENT_PHASE_INITIALIZING' | 'CONTENT_PHASE_READY' | 'CONTENT_PHASE_UPDATING' | 'CONTENT_PHASE_FAILED' | 'CONTENT_PHASE_UNAVAILABLE'; /** * session is the automations file session that is currently applied in the @@ -1212,14 +1141,7 @@ export namespace EnvironmentStatus { /** * phase is the current phase of the environment content */ - phase?: - | 'CONTENT_PHASE_UNSPECIFIED' - | 'CONTENT_PHASE_CREATING' - | 'CONTENT_PHASE_INITIALIZING' - | 'CONTENT_PHASE_READY' - | 'CONTENT_PHASE_UPDATING' - | 'CONTENT_PHASE_FAILED' - | 'CONTENT_PHASE_UNAVAILABLE'; + phase?: 'CONTENT_PHASE_UNSPECIFIED' | 'CONTENT_PHASE_CREATING' | 'CONTENT_PHASE_INITIALIZING' | 'CONTENT_PHASE_READY' | 'CONTENT_PHASE_UPDATING' | 'CONTENT_PHASE_FAILED' | 'CONTENT_PHASE_UNAVAILABLE'; /** * session is the session that is currently active in the environment. @@ -1281,15 +1203,7 @@ export namespace EnvironmentStatus { /** * ChangeType is the type of change that happened to the file */ - changeType?: - | 'CHANGE_TYPE_UNSPECIFIED' - | 'CHANGE_TYPE_ADDED' - | 'CHANGE_TYPE_MODIFIED' - | 'CHANGE_TYPE_DELETED' - | 'CHANGE_TYPE_RENAMED' - | 'CHANGE_TYPE_COPIED' - | 'CHANGE_TYPE_UPDATED_BUT_UNMERGED' - | 'CHANGE_TYPE_UNTRACKED'; + changeType?: 'CHANGE_TYPE_UNSPECIFIED' | 'CHANGE_TYPE_ADDED' | 'CHANGE_TYPE_MODIFIED' | 'CHANGE_TYPE_DELETED' | 'CHANGE_TYPE_RENAMED' | 'CHANGE_TYPE_COPIED' | 'CHANGE_TYPE_UPDATED_BUT_UNMERGED' | 'CHANGE_TYPE_UNTRACKED'; /** * old_path is the previous path of the file before a rename or copy. Only set when @@ -1336,11 +1250,7 @@ export namespace EnvironmentStatus { * devcontainer_file_presence indicates how the devcontainer file is present in the * repo. */ - devcontainerFilePresence?: - | 'PRESENCE_UNSPECIFIED' - | 'PRESENCE_GENERATED' - | 'PRESENCE_DISCOVERED' - | 'PRESENCE_SPECIFIED'; + devcontainerFilePresence?: 'PRESENCE_UNSPECIFIED' | 'PRESENCE_GENERATED' | 'PRESENCE_DISCOVERED' | 'PRESENCE_SPECIFIED'; /** * failure_message contains the reason the devcontainer failed to operate. @@ -1443,15 +1353,7 @@ export namespace EnvironmentStatus { /** * phase is the current phase of the environment machine */ - phase?: - | 'PHASE_UNSPECIFIED' - | 'PHASE_CREATING' - | 'PHASE_STARTING' - | 'PHASE_RUNNING' - | 'PHASE_STOPPING' - | 'PHASE_STOPPED' - | 'PHASE_DELETING' - | 'PHASE_DELETED'; + phase?: 'PHASE_UNSPECIFIED' | 'PHASE_CREATING' | 'PHASE_STARTING' | 'PHASE_RUNNING' | 'PHASE_STOPPING' | 'PHASE_STOPPED' | 'PHASE_DELETING' | 'PHASE_DELETED'; /** * session is the session that is currently active in the machine. @@ -1498,11 +1400,7 @@ export namespace EnvironmentStatus { specVersion?: string; - statusCode?: - | 'STATUS_CODE_UNSPECIFIED' - | 'STATUS_CODE_OK' - | 'STATUS_CODE_INVALID_RESOURCE' - | 'STATUS_CODE_FAILED_PRECONDITION'; + statusCode?: 'STATUS_CODE_UNSPECIFIED' | 'STATUS_CODE_OK' | 'STATUS_CODE_INVALID_RESOURCE' | 'STATUS_CODE_FAILED_PRECONDITION'; } export interface Secret { @@ -1516,14 +1414,7 @@ export namespace EnvironmentStatus { */ failureMessage?: string; - phase?: - | 'CONTENT_PHASE_UNSPECIFIED' - | 'CONTENT_PHASE_CREATING' - | 'CONTENT_PHASE_INITIALIZING' - | 'CONTENT_PHASE_READY' - | 'CONTENT_PHASE_UPDATING' - | 'CONTENT_PHASE_FAILED' - | 'CONTENT_PHASE_UNAVAILABLE'; + phase?: 'CONTENT_PHASE_UNSPECIFIED' | 'CONTENT_PHASE_CREATING' | 'CONTENT_PHASE_INITIALIZING' | 'CONTENT_PHASE_READY' | 'CONTENT_PHASE_UPDATING' | 'CONTENT_PHASE_FAILED' | 'CONTENT_PHASE_UNAVAILABLE'; secretName?: string; @@ -1548,14 +1439,7 @@ export namespace EnvironmentStatus { /** * phase is the current phase of the public key */ - phase?: - | 'CONTENT_PHASE_UNSPECIFIED' - | 'CONTENT_PHASE_CREATING' - | 'CONTENT_PHASE_INITIALIZING' - | 'CONTENT_PHASE_READY' - | 'CONTENT_PHASE_UPDATING' - | 'CONTENT_PHASE_FAILED' - | 'CONTENT_PHASE_UNAVAILABLE'; + phase?: 'CONTENT_PHASE_UNSPECIFIED' | 'CONTENT_PHASE_CREATING' | 'CONTENT_PHASE_INITIALIZING' | 'CONTENT_PHASE_READY' | 'CONTENT_PHASE_UPDATING' | 'CONTENT_PHASE_FAILED' | 'CONTENT_PHASE_UNAVAILABLE'; } } @@ -1615,9 +1499,9 @@ export interface EnvironmentRetrieveResponse { environment: Environment; } -export type EnvironmentUpdateResponse = unknown; +export type EnvironmentUpdateResponse = unknown -export type EnvironmentDeleteResponse = unknown; +export type EnvironmentDeleteResponse = unknown export interface EnvironmentCreateEnvironmentTokenResponse { /** @@ -1640,13 +1524,13 @@ export interface EnvironmentCreateLogsTokenResponse { accessToken: string; } -export type EnvironmentMarkActiveResponse = unknown; +export type EnvironmentMarkActiveResponse = unknown -export type EnvironmentStartResponse = unknown; +export type EnvironmentStartResponse = unknown -export type EnvironmentStopResponse = unknown; +export type EnvironmentStopResponse = unknown -export type EnvironmentUnarchiveResponse = unknown; +export type EnvironmentUnarchiveResponse = unknown export interface EnvironmentCreateParams { /** @@ -1858,12 +1742,7 @@ export namespace EnvironmentListParams { /** * archival_status filters the response based on environment archive status */ - archivalStatus?: - | 'ARCHIVAL_STATUS_UNSPECIFIED' - | 'ARCHIVAL_STATUS_ACTIVE' - | 'ARCHIVAL_STATUS_ARCHIVED' - | 'ARCHIVAL_STATUS_ALL' - | null; + archivalStatus?: 'ARCHIVAL_STATUS_UNSPECIFIED' | 'ARCHIVAL_STATUS_ACTIVE' | 'ARCHIVAL_STATUS_ARCHIVED' | 'ARCHIVAL_STATUS_ALL' | null; /** * created_before filters environments created before this timestamp @@ -2063,15 +1942,18 @@ export declare namespace Environments { type EnvironmentMarkActiveParams as EnvironmentMarkActiveParams, type EnvironmentStartParams as EnvironmentStartParams, type EnvironmentStopParams as EnvironmentStopParams, - type EnvironmentUnarchiveParams as EnvironmentUnarchiveParams, + type EnvironmentUnarchiveParams as EnvironmentUnarchiveParams }; export { Automations as Automations, type AutomationsAPIAutomationsFile as AutomationsFile, type AutomationUpsertResponse as AutomationUpsertResponse, - type AutomationUpsertParams as AutomationUpsertParams, + type AutomationUpsertParams as AutomationUpsertParams }; - export { Classes as Classes, type ClassListParams as ClassListParams }; + export { + Classes as Classes, + type ClassListParams as ClassListParams + }; } diff --git a/src/resources/environments/index.ts b/src/resources/environments/index.ts index b608089c..c5859e8b 100644 --- a/src/resources/environments/index.ts +++ b/src/resources/environments/index.ts @@ -1,47 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Automations, - type AutomationsFile, - type AutomationUpsertResponse, - type AutomationUpsertParams, -} from './automations/index'; -export { Classes, type ClassListParams } from './classes'; -export { - Environments, - type AdmissionLevel, - type BpfDebugLevel, - type Environment, - type EnvironmentActivitySignal, - type EnvironmentMetadata, - type EnvironmentPhase, - type EnvironmentRole, - type EnvironmentSpec, - type EnvironmentStatus, - type KernelControlsConfig, - type Veto, - type EnvironmentCreateResponse, - type EnvironmentRetrieveResponse, - type EnvironmentUpdateResponse, - type EnvironmentDeleteResponse, - type EnvironmentCreateEnvironmentTokenResponse, - type EnvironmentCreateFromProjectResponse, - type EnvironmentCreateLogsTokenResponse, - type EnvironmentMarkActiveResponse, - type EnvironmentStartResponse, - type EnvironmentStopResponse, - type EnvironmentUnarchiveResponse, - type EnvironmentCreateParams, - type EnvironmentRetrieveParams, - type EnvironmentUpdateParams, - type EnvironmentListParams, - type EnvironmentDeleteParams, - type EnvironmentCreateEnvironmentTokenParams, - type EnvironmentCreateFromProjectParams, - type EnvironmentCreateLogsTokenParams, - type EnvironmentMarkActiveParams, - type EnvironmentStartParams, - type EnvironmentStopParams, - type EnvironmentUnarchiveParams, - type EnvironmentsEnvironmentsPage, -} from './environments'; +export { Automations, type AutomationsFile, type AutomationUpsertResponse, type AutomationUpsertParams } from './automations/index';; +export { Classes, type ClassListParams } from './classes';; +export { Environments, type AdmissionLevel, type BpfDebugLevel, type Environment, type EnvironmentActivitySignal, type EnvironmentMetadata, type EnvironmentPhase, type EnvironmentRole, type EnvironmentSpec, type EnvironmentStatus, type KernelControlsConfig, type Veto, type EnvironmentCreateResponse, type EnvironmentRetrieveResponse, type EnvironmentUpdateResponse, type EnvironmentDeleteResponse, type EnvironmentCreateEnvironmentTokenResponse, type EnvironmentCreateFromProjectResponse, type EnvironmentCreateLogsTokenResponse, type EnvironmentMarkActiveResponse, type EnvironmentStartResponse, type EnvironmentStopResponse, type EnvironmentUnarchiveResponse, type EnvironmentCreateParams, type EnvironmentRetrieveParams, type EnvironmentUpdateParams, type EnvironmentListParams, type EnvironmentDeleteParams, type EnvironmentCreateEnvironmentTokenParams, type EnvironmentCreateFromProjectParams, type EnvironmentCreateLogsTokenParams, type EnvironmentMarkActiveParams, type EnvironmentStartParams, type EnvironmentStopParams, type EnvironmentUnarchiveParams, type EnvironmentsEnvironmentsPage } from './environments';; diff --git a/src/resources/errors.ts b/src/resources/errors.ts index 921bcfdd..da02273d 100644 --- a/src/resources/errors.ts +++ b/src/resources/errors.ts @@ -165,13 +165,7 @@ export interface ErrorEvent { /** * Error severity levels (aligned with Sentry levels) */ -export type ErrorLevel = - | 'ERROR_LEVEL_UNSPECIFIED' - | 'ERROR_LEVEL_DEBUG' - | 'ERROR_LEVEL_INFO' - | 'ERROR_LEVEL_WARNING' - | 'ERROR_LEVEL_ERROR' - | 'ERROR_LEVEL_FATAL'; +export type ErrorLevel = 'ERROR_LEVEL_UNSPECIFIED' | 'ERROR_LEVEL_DEBUG' | 'ERROR_LEVEL_INFO' | 'ERROR_LEVEL_WARNING' | 'ERROR_LEVEL_ERROR' | 'ERROR_LEVEL_FATAL' /** * Exception information (Sentry-compatible) @@ -322,7 +316,7 @@ export interface StackFrame { * is indicated by HTTP 200 status code, failures by other status codes Empty * response - success indicated by HTTP status code */ -export type ErrorReportErrorsResponse = unknown; +export type ErrorReportErrorsResponse = unknown export interface ErrorReportErrorsParams { /** @@ -341,6 +335,6 @@ export declare namespace Errors { type RequestInfo as RequestInfo, type StackFrame as StackFrame, type ErrorReportErrorsResponse as ErrorReportErrorsResponse, - type ErrorReportErrorsParams as ErrorReportErrorsParams, + type ErrorReportErrorsParams as ErrorReportErrorsParams }; } diff --git a/src/resources/events.ts b/src/resources/events.ts index 70e2d30b..66f75d26 100644 --- a/src/resources/events.ts +++ b/src/resources/events.ts @@ -61,17 +61,9 @@ export class Events extends APIResource { * } * ``` */ - list( - params: EventListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.EventService/ListAuditLogs', EntriesPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + list(params: EventListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.EventService/ListAuditLogs', EntriesPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -99,31 +91,13 @@ export class Events extends APIResource { * ``` */ watch(body: EventWatchParams, options?: RequestOptions): APIPromise> { - return this._client - .post('/gitpod.v1.EventService/WatchEvents', { - body, - ...options, - headers: buildHeaders([ - { 'Content-Type': 'application/jsonl', Accept: 'application/jsonl' }, - options?.headers, - ]), - stream: true, - __binaryResponse: true, - }) - ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)) as APIPromise< - JSONLDecoder - >; + return this._client.post('/gitpod.v1.EventService/WatchEvents', { body, ...options, headers: buildHeaders([{'Content-Type': 'application/jsonl', Accept: 'application/jsonl'}, options?.headers]), stream: true, __binaryResponse: true })._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)) as APIPromise>; } } -export type EventListResponsesEntriesPage = EntriesPage; +export type EventListResponsesEntriesPage = EntriesPage -export type ResourceOperation = - | 'RESOURCE_OPERATION_UNSPECIFIED' - | 'RESOURCE_OPERATION_CREATE' - | 'RESOURCE_OPERATION_UPDATE' - | 'RESOURCE_OPERATION_DELETE' - | 'RESOURCE_OPERATION_UPDATE_STATUS'; +export type ResourceOperation = 'RESOURCE_OPERATION_UNSPECIFIED' | 'RESOURCE_OPERATION_CREATE' | 'RESOURCE_OPERATION_UPDATE' | 'RESOURCE_OPERATION_DELETE' | 'RESOURCE_OPERATION_UPDATE_STATUS' export interface EventListResponse { id?: string; @@ -353,6 +327,6 @@ export declare namespace Events { type EventWatchResponse as EventWatchResponse, type EventListResponsesEntriesPage as EventListResponsesEntriesPage, type EventListParams as EventListParams, - type EventWatchParams as EventWatchParams, + type EventWatchParams as EventWatchParams }; } diff --git a/src/resources/gateways.ts b/src/resources/gateways.ts index 4edba872..60fe4318 100644 --- a/src/resources/gateways.ts +++ b/src/resources/gateways.ts @@ -10,17 +10,9 @@ export class Gateways extends APIResource { /** * ListGateways */ - list( - params: GatewayListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.GatewayService/ListGateways', GatewaysPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + list(params: GatewayListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.GatewayService/ListGateways', GatewaysPage, { query: { token, pageSize }, body, method: 'post', ...options }); } } @@ -51,7 +43,9 @@ export namespace GatewayListParams { } export declare namespace Gateways { - export { type GatewayListParams as GatewayListParams }; + export { + type GatewayListParams as GatewayListParams + }; } -export { type GatewaysGatewaysPage }; +export { type GatewaysGatewaysPage } diff --git a/src/resources/groups/groups.ts b/src/resources/groups/groups.ts index de059d7e..5b3d50ad 100644 --- a/src/resources/groups/groups.ts +++ b/src/resources/groups/groups.ts @@ -2,37 +2,11 @@ import { APIResource } from '../../core/resource'; import * as MembershipsAPI from './memberships'; -import { - GroupMembership, - GroupMembershipsMembersPage, - MembershipCreateParams, - MembershipCreateResponse, - MembershipDeleteParams, - MembershipDeleteResponse, - MembershipListParams, - MembershipRetrieveParams, - MembershipRetrieveResponse, - Memberships, -} from './memberships'; +import { GroupMembership, GroupMembershipsMembersPage, MembershipCreateParams, MembershipCreateResponse, MembershipDeleteParams, MembershipDeleteResponse, MembershipListParams, MembershipRetrieveParams, MembershipRetrieveResponse, Memberships } from './memberships'; import * as RoleAssignmentsAPI from './role-assignments'; -import { - RoleAssignment, - RoleAssignmentCreateParams, - RoleAssignmentCreateResponse, - RoleAssignmentDeleteParams, - RoleAssignmentDeleteResponse, - RoleAssignmentListParams, - RoleAssignments, - RoleAssignmentsAssignmentsPage, -} from './role-assignments'; +import { RoleAssignment, RoleAssignmentCreateParams, RoleAssignmentCreateResponse, RoleAssignmentDeleteParams, RoleAssignmentDeleteResponse, RoleAssignmentListParams, RoleAssignments, RoleAssignmentsAssignmentsPage } from './role-assignments'; import * as SharesAPI from './shares'; -import { - ShareCreateParams, - ShareCreateResponse, - ShareDeleteParams, - ShareDeleteResponse, - Shares, -} from './shares'; +import { ShareCreateParams, ShareCreateResponse, ShareDeleteParams, ShareDeleteResponse, Shares } from './shares'; import { APIPromise } from '../../core/api-promise'; import { GroupsPage, type GroupsPageParams, PagePromise } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; @@ -198,13 +172,8 @@ export class Groups extends APIResource { * ``` */ list(params: GroupListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.GroupService/ListGroups', GroupsPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.GroupService/ListGroups', GroupsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -243,7 +212,7 @@ export class Groups extends APIResource { } } -export type GroupsGroupsPage = GroupsPage; +export type GroupsGroupsPage = GroupsPage export interface Group { id?: string; @@ -470,7 +439,7 @@ export interface GroupUpdateResponse { /** * Empty response */ -export type GroupDeleteResponse = unknown; +export type GroupDeleteResponse = unknown export interface GroupCreateParams { description?: string; @@ -583,7 +552,7 @@ export declare namespace Groups { type GroupRetrieveParams as GroupRetrieveParams, type GroupUpdateParams as GroupUpdateParams, type GroupListParams as GroupListParams, - type GroupDeleteParams as GroupDeleteParams, + type GroupDeleteParams as GroupDeleteParams }; export { @@ -596,7 +565,7 @@ export declare namespace Groups { type MembershipCreateParams as MembershipCreateParams, type MembershipRetrieveParams as MembershipRetrieveParams, type MembershipListParams as MembershipListParams, - type MembershipDeleteParams as MembershipDeleteParams, + type MembershipDeleteParams as MembershipDeleteParams }; export { @@ -607,7 +576,7 @@ export declare namespace Groups { type RoleAssignmentsAssignmentsPage as RoleAssignmentsAssignmentsPage, type RoleAssignmentCreateParams as RoleAssignmentCreateParams, type RoleAssignmentListParams as RoleAssignmentListParams, - type RoleAssignmentDeleteParams as RoleAssignmentDeleteParams, + type RoleAssignmentDeleteParams as RoleAssignmentDeleteParams }; export { @@ -615,6 +584,6 @@ export declare namespace Groups { type ShareCreateResponse as ShareCreateResponse, type ShareDeleteResponse as ShareDeleteResponse, type ShareCreateParams as ShareCreateParams, - type ShareDeleteParams as ShareDeleteParams, + type ShareDeleteParams as ShareDeleteParams }; } diff --git a/src/resources/groups/index.ts b/src/resources/groups/index.ts index 19d31d88..634e5c56 100644 --- a/src/resources/groups/index.ts +++ b/src/resources/groups/index.ts @@ -1,45 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Groups, - type Group, - type GroupCreateResponse, - type GroupRetrieveResponse, - type GroupUpdateResponse, - type GroupDeleteResponse, - type GroupCreateParams, - type GroupRetrieveParams, - type GroupUpdateParams, - type GroupListParams, - type GroupDeleteParams, - type GroupsGroupsPage, -} from './groups'; -export { - Memberships, - type GroupMembership, - type MembershipCreateResponse, - type MembershipRetrieveResponse, - type MembershipDeleteResponse, - type MembershipCreateParams, - type MembershipRetrieveParams, - type MembershipListParams, - type MembershipDeleteParams, - type GroupMembershipsMembersPage, -} from './memberships'; -export { - RoleAssignments, - type RoleAssignment, - type RoleAssignmentCreateResponse, - type RoleAssignmentDeleteResponse, - type RoleAssignmentCreateParams, - type RoleAssignmentListParams, - type RoleAssignmentDeleteParams, - type RoleAssignmentsAssignmentsPage, -} from './role-assignments'; -export { - Shares, - type ShareCreateResponse, - type ShareDeleteResponse, - type ShareCreateParams, - type ShareDeleteParams, -} from './shares'; +export { Groups, type Group, type GroupCreateResponse, type GroupRetrieveResponse, type GroupUpdateResponse, type GroupDeleteResponse, type GroupCreateParams, type GroupRetrieveParams, type GroupUpdateParams, type GroupListParams, type GroupDeleteParams, type GroupsGroupsPage } from './groups';; +export { Memberships, type GroupMembership, type MembershipCreateResponse, type MembershipRetrieveResponse, type MembershipDeleteResponse, type MembershipCreateParams, type MembershipRetrieveParams, type MembershipListParams, type MembershipDeleteParams, type GroupMembershipsMembersPage } from './memberships';; +export { RoleAssignments, type RoleAssignment, type RoleAssignmentCreateResponse, type RoleAssignmentDeleteResponse, type RoleAssignmentCreateParams, type RoleAssignmentListParams, type RoleAssignmentDeleteParams, type RoleAssignmentsAssignmentsPage } from './role-assignments';; +export { Shares, type ShareCreateResponse, type ShareDeleteResponse, type ShareCreateParams, type ShareDeleteParams } from './shares';; diff --git a/src/resources/groups/memberships.ts b/src/resources/groups/memberships.ts index b6ab33fd..5415b150 100644 --- a/src/resources/groups/memberships.ts +++ b/src/resources/groups/memberships.ts @@ -127,17 +127,9 @@ export class Memberships extends APIResource { * } * ``` */ - list( - params: MembershipListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.GroupService/ListMemberships', MembersPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + list(params: MembershipListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.GroupService/ListMemberships', MembersPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -175,7 +167,7 @@ export class Memberships extends APIResource { } } -export type GroupMembershipsMembersPage = MembersPage; +export type GroupMembershipsMembersPage = MembersPage /** * GroupMembership represents a subject's membership in a group @@ -224,7 +216,7 @@ export interface MembershipRetrieveResponse { /** * Empty response */ -export type MembershipDeleteResponse = unknown; +export type MembershipDeleteResponse = unknown export interface MembershipCreateParams { groupId?: string; @@ -308,6 +300,6 @@ export declare namespace Memberships { type MembershipCreateParams as MembershipCreateParams, type MembershipRetrieveParams as MembershipRetrieveParams, type MembershipListParams as MembershipListParams, - type MembershipDeleteParams as MembershipDeleteParams, + type MembershipDeleteParams as MembershipDeleteParams }; } diff --git a/src/resources/groups/role-assignments.ts b/src/resources/groups/role-assignments.ts index 1c8b950c..6b96a103 100644 --- a/src/resources/groups/role-assignments.ts +++ b/src/resources/groups/role-assignments.ts @@ -54,10 +54,7 @@ export class RoleAssignments extends APIResource { * }); * ``` */ - create( - body: RoleAssignmentCreateParams, - options?: RequestOptions, - ): APIPromise { + create(body: RoleAssignmentCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.GroupService/CreateRoleAssignment', { body, ...options }); } @@ -112,16 +109,9 @@ export class RoleAssignments extends APIResource { * } * ``` */ - list( - params: RoleAssignmentListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.GroupService/ListRoleAssignments', - AssignmentsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: RoleAssignmentListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.GroupService/ListRoleAssignments', AssignmentsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -159,7 +149,7 @@ export class RoleAssignments extends APIResource { } } -export type RoleAssignmentsAssignmentsPage = AssignmentsPage; +export type RoleAssignmentsAssignmentsPage = AssignmentsPage /** * RoleAssignment represents a role assigned to a group on a specific resource @@ -214,7 +204,7 @@ export interface RoleAssignmentCreateResponse { /** * Empty response */ -export type RoleAssignmentDeleteResponse = unknown; +export type RoleAssignmentDeleteResponse = unknown export interface RoleAssignmentCreateParams { groupId?: string; @@ -317,6 +307,6 @@ export declare namespace RoleAssignments { type RoleAssignmentsAssignmentsPage as RoleAssignmentsAssignmentsPage, type RoleAssignmentCreateParams as RoleAssignmentCreateParams, type RoleAssignmentListParams as RoleAssignmentListParams, - type RoleAssignmentDeleteParams as RoleAssignmentDeleteParams, + type RoleAssignmentDeleteParams as RoleAssignmentDeleteParams }; } diff --git a/src/resources/groups/shares.ts b/src/resources/groups/shares.ts index 03ddd62c..59c3e8bc 100644 --- a/src/resources/groups/shares.ts +++ b/src/resources/groups/shares.ts @@ -103,12 +103,12 @@ export class Shares extends APIResource { /** * Empty response on success */ -export type ShareCreateResponse = unknown; +export type ShareCreateResponse = unknown /** * Empty response on success */ -export type ShareDeleteResponse = unknown; +export type ShareDeleteResponse = unknown export interface ShareCreateParams { /** @@ -164,6 +164,6 @@ export declare namespace Shares { type ShareCreateResponse as ShareCreateResponse, type ShareDeleteResponse as ShareDeleteResponse, type ShareCreateParams as ShareCreateParams, - type ShareDeleteParams as ShareDeleteParams, + type ShareDeleteParams as ShareDeleteParams }; } diff --git a/src/resources/identity.ts b/src/resources/identity.ts index efe362aa..224eea7c 100644 --- a/src/resources/identity.ts +++ b/src/resources/identity.ts @@ -32,10 +32,7 @@ export class Identity extends APIResource { * }); * ``` */ - exchangeToken( - body: IdentityExchangeTokenParams, - options?: RequestOptions, - ): APIPromise { + exchangeToken(body: IdentityExchangeTokenParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.IdentityService/ExchangeToken', { body, ...options }); } @@ -65,10 +62,7 @@ export class Identity extends APIResource { * await client.identity.getAuthenticatedIdentity(); * ``` */ - getAuthenticatedIdentity( - body: IdentityGetAuthenticatedIdentityParams, - options?: RequestOptions, - ): APIPromise { + getAuthenticatedIdentity(body: IdentityGetAuthenticatedIdentityParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.IdentityService/GetAuthenticatedIdentity', { body, ...options }); } @@ -112,15 +106,12 @@ export class Identity extends APIResource { * }); * ``` */ - getIDToken( - body: IdentityGetIDTokenParams, - options?: RequestOptions, - ): APIPromise { + getIDToken(body: IdentityGetIDTokenParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.IdentityService/GetIDToken', { body, ...options }); } } -export type IDTokenVersion = 'ID_TOKEN_VERSION_UNSPECIFIED' | 'ID_TOKEN_VERSION_V1' | 'ID_TOKEN_VERSION_V2'; +export type IDTokenVersion = 'ID_TOKEN_VERSION_UNSPECIFIED' | 'ID_TOKEN_VERSION_V1' | 'ID_TOKEN_VERSION_V2' export interface IdentityExchangeTokenResponse { /** @@ -172,6 +163,6 @@ export declare namespace Identity { type IdentityGetIDTokenResponse as IdentityGetIDTokenResponse, type IdentityExchangeTokenParams as IdentityExchangeTokenParams, type IdentityGetAuthenticatedIdentityParams as IdentityGetAuthenticatedIdentityParams, - type IdentityGetIDTokenParams as IdentityGetIDTokenParams, + type IdentityGetIDTokenParams as IdentityGetIDTokenParams }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index 8658b6f1..cc46f6d2 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,355 +1,20 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export * from './shared'; -export { - Accounts, - type Account, - type AccountMembership, - type JoinableOrganization, - type LoginProvider, - type AccountRetrieveResponse, - type AccountDeleteResponse, - type AccountGetSSOLoginURLResponse, - type AccountListSSOLoginsResponse, - type AccountRetrieveParams, - type AccountDeleteParams, - type AccountGetSSOLoginURLParams, - type AccountListJoinableOrganizationsParams, - type AccountListLoginProvidersParams, - type AccountListSSOLoginsParams, - type JoinableOrganizationsJoinableOrganizationsPage, - type LoginProvidersLoginProvidersPage, - type AccountListSSOLoginsResponsesLoginsPage, -} from './accounts'; -export { - Agents, - type AgentCodeContext, - type AgentExecution, - type AgentMessage, - type AgentMode, - type Prompt, - type PromptMetadata, - type PromptSpec, - type Role, - type Type, - type UserInputBlock, - type UserInputMetadata, - type WakeEvent, - type AgentCreateExecutionConversationTokenResponse, - type AgentCreatePromptResponse, - type AgentDeleteExecutionResponse, - type AgentDeletePromptResponse, - type AgentRetrieveExecutionResponse, - type AgentRetrievePromptResponse, - type AgentSendToExecutionResponse, - type AgentStartExecutionResponse, - type AgentStopExecutionResponse, - type AgentUpdatePromptResponse, - type AgentCreateExecutionConversationTokenParams, - type AgentCreatePromptParams, - type AgentDeleteExecutionParams, - type AgentDeletePromptParams, - type AgentListExecutionsParams, - type AgentListPromptsParams, - type AgentRetrieveExecutionParams, - type AgentRetrievePromptParams, - type AgentSendToExecutionParams, - type AgentStartExecutionParams, - type AgentStopExecutionParams, - type AgentUpdatePromptParams, - type AgentExecutionsAgentExecutionsPage, - type PromptsPromptsPage, -} from './agents'; -export { - Automations, - type Workflow, - type WorkflowAction, - type WorkflowExecution, - type WorkflowExecutionAction, - type WorkflowStep, - type WorkflowTrigger, - type WorkflowTriggerContext, - type AutomationCreateResponse, - type AutomationRetrieveResponse, - type AutomationUpdateResponse, - type AutomationDeleteResponse, - type AutomationCancelExecutionResponse, - type AutomationCancelExecutionActionResponse, - type AutomationListExecutionOutputsResponse, - type AutomationRetrieveExecutionResponse, - type AutomationRetrieveExecutionActionResponse, - type AutomationStartExecutionResponse, - type AutomationCreateParams, - type AutomationRetrieveParams, - type AutomationUpdateParams, - type AutomationListParams, - type AutomationDeleteParams, - type AutomationCancelExecutionParams, - type AutomationCancelExecutionActionParams, - type AutomationListExecutionActionsParams, - type AutomationListExecutionOutputsParams, - type AutomationListExecutionsParams, - type AutomationRetrieveExecutionParams, - type AutomationRetrieveExecutionActionParams, - type AutomationStartExecutionParams, - type WorkflowsWorkflowsPage, - type WorkflowExecutionActionsWorkflowExecutionActionsPage, - type AutomationListExecutionOutputsResponsesOutputsPage, - type WorkflowExecutionsWorkflowExecutionsPage, -} from './automations'; -export { - Editors, - type Editor, - type EditorVersion, - type EditorRetrieveResponse, - type EditorResolveURLResponse, - type EditorRetrieveParams, - type EditorListParams, - type EditorResolveURLParams, - type EditorsEditorsPage, -} from './editors'; -export { - Environments, - type AdmissionLevel, - type BpfDebugLevel, - type Environment, - type EnvironmentActivitySignal, - type EnvironmentMetadata, - type EnvironmentPhase, - type EnvironmentRole, - type EnvironmentSpec, - type EnvironmentStatus, - type KernelControlsConfig, - type Veto, - type EnvironmentCreateResponse, - type EnvironmentRetrieveResponse, - type EnvironmentUpdateResponse, - type EnvironmentDeleteResponse, - type EnvironmentCreateEnvironmentTokenResponse, - type EnvironmentCreateFromProjectResponse, - type EnvironmentCreateLogsTokenResponse, - type EnvironmentMarkActiveResponse, - type EnvironmentStartResponse, - type EnvironmentStopResponse, - type EnvironmentUnarchiveResponse, - type EnvironmentCreateParams, - type EnvironmentRetrieveParams, - type EnvironmentUpdateParams, - type EnvironmentListParams, - type EnvironmentDeleteParams, - type EnvironmentCreateEnvironmentTokenParams, - type EnvironmentCreateFromProjectParams, - type EnvironmentCreateLogsTokenParams, - type EnvironmentMarkActiveParams, - type EnvironmentStartParams, - type EnvironmentStopParams, - type EnvironmentUnarchiveParams, - type EnvironmentsEnvironmentsPage, -} from './environments/environments'; -export { - Errors, - type Breadcrumb, - type ErrorEvent, - type ErrorLevel, - type ExceptionInfo, - type ExceptionMechanism, - type RequestInfo, - type StackFrame, - type ErrorReportErrorsResponse, - type ErrorReportErrorsParams, -} from './errors'; -export { - Events, - type ResourceOperation, - type EventListResponse, - type EventWatchResponse, - type EventListParams, - type EventWatchParams, - type EventListResponsesEntriesPage, -} from './events'; -export { Gateways, type GatewayListParams } from './gateways'; -export { - Groups, - type Group, - type GroupCreateResponse, - type GroupRetrieveResponse, - type GroupUpdateResponse, - type GroupDeleteResponse, - type GroupCreateParams, - type GroupRetrieveParams, - type GroupUpdateParams, - type GroupListParams, - type GroupDeleteParams, - type GroupsGroupsPage, -} from './groups/groups'; -export { - Identity, - type IDTokenVersion, - type IdentityExchangeTokenResponse, - type IdentityGetAuthenticatedIdentityResponse, - type IdentityGetIDTokenResponse, - type IdentityExchangeTokenParams, - type IdentityGetAuthenticatedIdentityParams, - type IdentityGetIDTokenParams, -} from './identity'; -export { - Organizations, - type InviteDomains, - type Organization, - type OrganizationMember, - type OrganizationCreateResponse, - type OrganizationRetrieveResponse, - type OrganizationUpdateResponse, - type OrganizationDeleteResponse, - type OrganizationJoinResponse, - type OrganizationLeaveResponse, - type OrganizationSetRoleResponse, - type OrganizationCreateParams, - type OrganizationRetrieveParams, - type OrganizationUpdateParams, - type OrganizationDeleteParams, - type OrganizationJoinParams, - type OrganizationLeaveParams, - type OrganizationListMembersParams, - type OrganizationSetRoleParams, - type OrganizationMembersMembersPage, -} from './organizations/organizations'; -export { - Prebuilds, - type Prebuild, - type PrebuildMetadata, - type PrebuildPhase, - type PrebuildSpec, - type PrebuildStatus, - type PrebuildTrigger, - type WarmPool, - type WarmPoolMetadata, - type WarmPoolPhase, - type WarmPoolSpec, - type WarmPoolStatus, - type PrebuildCreateResponse, - type PrebuildRetrieveResponse, - type PrebuildDeleteResponse, - type PrebuildCancelResponse, - type PrebuildCreateLogsTokenResponse, - type PrebuildCreateWarmPoolResponse, - type PrebuildDeleteWarmPoolResponse, - type PrebuildRetrieveWarmPoolResponse, - type PrebuildUpdateWarmPoolResponse, - type PrebuildCreateParams, - type PrebuildRetrieveParams, - type PrebuildListParams, - type PrebuildDeleteParams, - type PrebuildCancelParams, - type PrebuildCreateLogsTokenParams, - type PrebuildCreateWarmPoolParams, - type PrebuildDeleteWarmPoolParams, - type PrebuildListWarmPoolsParams, - type PrebuildRetrieveWarmPoolParams, - type PrebuildUpdateWarmPoolParams, - type PrebuildsPrebuildsPage, - type WarmPoolsWarmPoolsPage, -} from './prebuilds'; -export { - Projects, - type EnvironmentInitializer, - type Project, - type ProjectMetadata, - type ProjectPhase, - type ProjectPrebuildConfiguration, - type RecommendedEditors, - type ProjectCreateResponse, - type ProjectRetrieveResponse, - type ProjectUpdateResponse, - type ProjectDeleteResponse, - type ProjectBulkCreateResponse, - type ProjectBulkDeleteResponse, - type ProjectBulkUpdateResponse, - type ProjectCreateFromEnvironmentResponse, - type ProjectCreateParams, - type ProjectRetrieveParams, - type ProjectUpdateParams, - type ProjectListParams, - type ProjectDeleteParams, - type ProjectBulkCreateParams, - type ProjectBulkDeleteParams, - type ProjectBulkUpdateParams, - type ProjectCreateFromEnvironmentParams, - type ProjectsProjectsPage, -} from './projects/projects'; -export { - Runners, - type GatewayInfo, - type LogLevel, - type MetricsConfiguration, - type Runner, - type RunnerCapability, - type RunnerConfiguration, - type RunnerKind, - type RunnerPhase, - type RunnerProvider, - type RunnerReleaseChannel, - type RunnerSpec, - type RunnerStatus, - type RunnerVariant, - type SearchMode, - type UpdateWindow, - type RunnerCreateResponse, - type RunnerRetrieveResponse, - type RunnerUpdateResponse, - type RunnerDeleteResponse, - type RunnerCheckAuthenticationForHostResponse, - type RunnerCheckRepositoryAccessResponse, - type RunnerCreateLogsTokenResponse, - type RunnerCreateRunnerTokenResponse, - type RunnerListScmOrganizationsResponse, - type RunnerParseContextURLResponse, - type RunnerSearchRepositoriesResponse, - type RunnerCreateParams, - type RunnerRetrieveParams, - type RunnerUpdateParams, - type RunnerListParams, - type RunnerDeleteParams, - type RunnerCheckAuthenticationForHostParams, - type RunnerCheckRepositoryAccessParams, - type RunnerCreateLogsTokenParams, - type RunnerCreateRunnerTokenParams, - type RunnerListScmOrganizationsParams, - type RunnerParseContextURLParams, - type RunnerSearchRepositoriesParams, - type RunnersRunnersPage, - type RunnerListScmOrganizationsResponsesOrganizationsPage, -} from './runners/runners'; -export { - Secrets, - type Secret, - type SecretScope, - type SecretCreateResponse, - type SecretDeleteResponse, - type SecretGetValueResponse, - type SecretUpdateValueResponse, - type SecretCreateParams, - type SecretListParams, - type SecretDeleteParams, - type SecretGetValueParams, - type SecretUpdateValueParams, - type SecretsSecretsPage, -} from './secrets'; -export { - Usage, - type EnvironmentUsageRecord, - type UsageListEnvironmentRuntimeRecordsParams, - type EnvironmentUsageRecordsRecordsPage, -} from './usage'; -export { - Users, - type User, - type UserDeleteUserResponse, - type UserGetAuthenticatedUserResponse, - type UserGetUserResponse, - type UserSetSuspendedResponse, - type UserDeleteUserParams, - type UserGetAuthenticatedUserParams, - type UserGetUserParams, - type UserSetSuspendedParams, -} from './users/users'; +export * from './shared';; +export { Accounts, type Account, type AccountMembership, type JoinableOrganization, type LoginProvider, type AccountRetrieveResponse, type AccountDeleteResponse, type AccountGetSSOLoginURLResponse, type AccountListSSOLoginsResponse, type AccountRetrieveParams, type AccountDeleteParams, type AccountGetSSOLoginURLParams, type AccountListJoinableOrganizationsParams, type AccountListLoginProvidersParams, type AccountListSSOLoginsParams, type JoinableOrganizationsJoinableOrganizationsPage, type LoginProvidersLoginProvidersPage, type AccountListSSOLoginsResponsesLoginsPage } from './accounts';; +export { Agents, type AgentCodeContext, type AgentExecution, type AgentMessage, type AgentMode, type Prompt, type PromptMetadata, type PromptSpec, type Role, type Type, type UserInputBlock, type UserInputMetadata, type WakeEvent, type AgentCreateExecutionConversationTokenResponse, type AgentCreatePromptResponse, type AgentDeleteExecutionResponse, type AgentDeletePromptResponse, type AgentRetrieveExecutionResponse, type AgentRetrievePromptResponse, type AgentSendToExecutionResponse, type AgentStartExecutionResponse, type AgentStopExecutionResponse, type AgentUpdatePromptResponse, type AgentCreateExecutionConversationTokenParams, type AgentCreatePromptParams, type AgentDeleteExecutionParams, type AgentDeletePromptParams, type AgentListExecutionsParams, type AgentListPromptsParams, type AgentRetrieveExecutionParams, type AgentRetrievePromptParams, type AgentSendToExecutionParams, type AgentStartExecutionParams, type AgentStopExecutionParams, type AgentUpdatePromptParams, type AgentExecutionsAgentExecutionsPage, type PromptsPromptsPage } from './agents';; +export { Automations, type Workflow, type WorkflowAction, type WorkflowExecution, type WorkflowExecutionAction, type WorkflowStep, type WorkflowTrigger, type WorkflowTriggerContext, type AutomationCreateResponse, type AutomationRetrieveResponse, type AutomationUpdateResponse, type AutomationDeleteResponse, type AutomationCancelExecutionResponse, type AutomationCancelExecutionActionResponse, type AutomationListExecutionOutputsResponse, type AutomationRetrieveExecutionResponse, type AutomationRetrieveExecutionActionResponse, type AutomationStartExecutionResponse, type AutomationCreateParams, type AutomationRetrieveParams, type AutomationUpdateParams, type AutomationListParams, type AutomationDeleteParams, type AutomationCancelExecutionParams, type AutomationCancelExecutionActionParams, type AutomationListExecutionActionsParams, type AutomationListExecutionOutputsParams, type AutomationListExecutionsParams, type AutomationRetrieveExecutionParams, type AutomationRetrieveExecutionActionParams, type AutomationStartExecutionParams, type WorkflowsWorkflowsPage, type WorkflowExecutionActionsWorkflowExecutionActionsPage, type AutomationListExecutionOutputsResponsesOutputsPage, type WorkflowExecutionsWorkflowExecutionsPage } from './automations';; +export { Editors, type Editor, type EditorVersion, type EditorRetrieveResponse, type EditorResolveURLResponse, type EditorRetrieveParams, type EditorListParams, type EditorResolveURLParams, type EditorsEditorsPage } from './editors';; +export { Environments, type AdmissionLevel, type BpfDebugLevel, type Environment, type EnvironmentActivitySignal, type EnvironmentMetadata, type EnvironmentPhase, type EnvironmentRole, type EnvironmentSpec, type EnvironmentStatus, type KernelControlsConfig, type Veto, type EnvironmentCreateResponse, type EnvironmentRetrieveResponse, type EnvironmentUpdateResponse, type EnvironmentDeleteResponse, type EnvironmentCreateEnvironmentTokenResponse, type EnvironmentCreateFromProjectResponse, type EnvironmentCreateLogsTokenResponse, type EnvironmentMarkActiveResponse, type EnvironmentStartResponse, type EnvironmentStopResponse, type EnvironmentUnarchiveResponse, type EnvironmentCreateParams, type EnvironmentRetrieveParams, type EnvironmentUpdateParams, type EnvironmentListParams, type EnvironmentDeleteParams, type EnvironmentCreateEnvironmentTokenParams, type EnvironmentCreateFromProjectParams, type EnvironmentCreateLogsTokenParams, type EnvironmentMarkActiveParams, type EnvironmentStartParams, type EnvironmentStopParams, type EnvironmentUnarchiveParams, type EnvironmentsEnvironmentsPage } from './environments/environments';; +export { Errors, type Breadcrumb, type ErrorEvent, type ErrorLevel, type ExceptionInfo, type ExceptionMechanism, type RequestInfo, type StackFrame, type ErrorReportErrorsResponse, type ErrorReportErrorsParams } from './errors';; +export { Events, type ResourceOperation, type EventListResponse, type EventWatchResponse, type EventListParams, type EventWatchParams, type EventListResponsesEntriesPage } from './events';; +export { Gateways, type GatewayListParams } from './gateways';; +export { Groups, type Group, type GroupCreateResponse, type GroupRetrieveResponse, type GroupUpdateResponse, type GroupDeleteResponse, type GroupCreateParams, type GroupRetrieveParams, type GroupUpdateParams, type GroupListParams, type GroupDeleteParams, type GroupsGroupsPage } from './groups/groups';; +export { Identity, type IDTokenVersion, type IdentityExchangeTokenResponse, type IdentityGetAuthenticatedIdentityResponse, type IdentityGetIDTokenResponse, type IdentityExchangeTokenParams, type IdentityGetAuthenticatedIdentityParams, type IdentityGetIDTokenParams } from './identity';; +export { Organizations, type InviteDomains, type Organization, type OrganizationMember, type OrganizationCreateResponse, type OrganizationRetrieveResponse, type OrganizationUpdateResponse, type OrganizationDeleteResponse, type OrganizationJoinResponse, type OrganizationLeaveResponse, type OrganizationSetRoleResponse, type OrganizationCreateParams, type OrganizationRetrieveParams, type OrganizationUpdateParams, type OrganizationDeleteParams, type OrganizationJoinParams, type OrganizationLeaveParams, type OrganizationListMembersParams, type OrganizationSetRoleParams, type OrganizationMembersMembersPage } from './organizations/organizations';; +export { Prebuilds, type Prebuild, type PrebuildMetadata, type PrebuildPhase, type PrebuildSpec, type PrebuildStatus, type PrebuildTrigger, type WarmPool, type WarmPoolMetadata, type WarmPoolPhase, type WarmPoolSpec, type WarmPoolStatus, type PrebuildCreateResponse, type PrebuildRetrieveResponse, type PrebuildDeleteResponse, type PrebuildCancelResponse, type PrebuildCreateLogsTokenResponse, type PrebuildCreateWarmPoolResponse, type PrebuildDeleteWarmPoolResponse, type PrebuildRetrieveWarmPoolResponse, type PrebuildUpdateWarmPoolResponse, type PrebuildCreateParams, type PrebuildRetrieveParams, type PrebuildListParams, type PrebuildDeleteParams, type PrebuildCancelParams, type PrebuildCreateLogsTokenParams, type PrebuildCreateWarmPoolParams, type PrebuildDeleteWarmPoolParams, type PrebuildListWarmPoolsParams, type PrebuildRetrieveWarmPoolParams, type PrebuildUpdateWarmPoolParams, type PrebuildsPrebuildsPage, type WarmPoolsWarmPoolsPage } from './prebuilds';; +export { Projects, type EnvironmentInitializer, type Project, type ProjectMetadata, type ProjectPhase, type ProjectPrebuildConfiguration, type RecommendedEditors, type ProjectCreateResponse, type ProjectRetrieveResponse, type ProjectUpdateResponse, type ProjectDeleteResponse, type ProjectBulkCreateResponse, type ProjectBulkDeleteResponse, type ProjectBulkUpdateResponse, type ProjectCreateFromEnvironmentResponse, type ProjectCreateParams, type ProjectRetrieveParams, type ProjectUpdateParams, type ProjectListParams, type ProjectDeleteParams, type ProjectBulkCreateParams, type ProjectBulkDeleteParams, type ProjectBulkUpdateParams, type ProjectCreateFromEnvironmentParams, type ProjectsProjectsPage } from './projects/projects';; +export { Runners, type GatewayInfo, type LogLevel, type MetricsConfiguration, type Runner, type RunnerCapability, type RunnerConfiguration, type RunnerKind, type RunnerPhase, type RunnerProvider, type RunnerReleaseChannel, type RunnerSpec, type RunnerStatus, type RunnerVariant, type SearchMode, type UpdateWindow, type RunnerCreateResponse, type RunnerRetrieveResponse, type RunnerUpdateResponse, type RunnerDeleteResponse, type RunnerCheckAuthenticationForHostResponse, type RunnerCheckRepositoryAccessResponse, type RunnerCreateLogsTokenResponse, type RunnerCreateRunnerTokenResponse, type RunnerListScmOrganizationsResponse, type RunnerParseContextURLResponse, type RunnerSearchRepositoriesResponse, type RunnerCreateParams, type RunnerRetrieveParams, type RunnerUpdateParams, type RunnerListParams, type RunnerDeleteParams, type RunnerCheckAuthenticationForHostParams, type RunnerCheckRepositoryAccessParams, type RunnerCreateLogsTokenParams, type RunnerCreateRunnerTokenParams, type RunnerListScmOrganizationsParams, type RunnerParseContextURLParams, type RunnerSearchRepositoriesParams, type RunnersRunnersPage, type RunnerListScmOrganizationsResponsesOrganizationsPage } from './runners/runners';; +export { Secrets, type Secret, type SecretScope, type SecretCreateResponse, type SecretDeleteResponse, type SecretGetValueResponse, type SecretUpdateValueResponse, type SecretCreateParams, type SecretListParams, type SecretDeleteParams, type SecretGetValueParams, type SecretUpdateValueParams, type SecretsSecretsPage } from './secrets';; +export { Usage, type EnvironmentUsageRecord, type UsageListEnvironmentRuntimeRecordsParams, type EnvironmentUsageRecordsRecordsPage } from './usage';; +export { Users, type User, type UserDeleteUserResponse, type UserGetAuthenticatedUserResponse, type UserGetUserResponse, type UserSetSuspendedResponse, type UserDeleteUserParams, type UserGetAuthenticatedUserParams, type UserGetUserParams, type UserSetSuspendedParams } from './users/users';; diff --git a/src/resources/organizations/announcement-banner.ts b/src/resources/organizations/announcement-banner.ts index ab0ee6a1..64bb0c85 100644 --- a/src/resources/organizations/announcement-banner.ts +++ b/src/resources/organizations/announcement-banner.ts @@ -36,10 +36,7 @@ export class AnnouncementBannerResource extends APIResource { * }); * ``` */ - update( - body: AnnouncementBannerUpdateParams, - options?: RequestOptions, - ): APIPromise { + update(body: AnnouncementBannerUpdateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/UpdateAnnouncementBanner', { body, ...options }); } @@ -65,10 +62,7 @@ export class AnnouncementBannerResource extends APIResource { * }); * ``` */ - get( - body: AnnouncementBannerGetParams, - options?: RequestOptions, - ): APIPromise { + get(body: AnnouncementBannerGetParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetAnnouncementBanner', { body, ...options }); } } @@ -134,6 +128,6 @@ export declare namespace AnnouncementBannerResource { type AnnouncementBannerUpdateResponse as AnnouncementBannerUpdateResponse, type AnnouncementBannerGetResponse as AnnouncementBannerGetResponse, type AnnouncementBannerUpdateParams as AnnouncementBannerUpdateParams, - type AnnouncementBannerGetParams as AnnouncementBannerGetParams, + type AnnouncementBannerGetParams as AnnouncementBannerGetParams }; } diff --git a/src/resources/organizations/custom-domains.ts b/src/resources/organizations/custom-domains.ts index 2e5f32d9..d19ea2dc 100644 --- a/src/resources/organizations/custom-domains.ts +++ b/src/resources/organizations/custom-domains.ts @@ -61,10 +61,7 @@ export class CustomDomains extends APIResource { * }); * ``` */ - retrieve( - body: CustomDomainRetrieveParams, - options?: RequestOptions, - ): APIPromise { + retrieve(body: CustomDomainRetrieveParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetCustomDomain', { body, ...options }); } @@ -186,10 +183,7 @@ export interface CustomDomain { * CustomDomainProvider represents the cloud provider for custom domain * configuration */ -export type CustomDomainProvider = - | 'CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED' - | 'CUSTOM_DOMAIN_PROVIDER_AWS' - | 'CUSTOM_DOMAIN_PROVIDER_GCP'; +export type CustomDomainProvider = 'CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED' | 'CUSTOM_DOMAIN_PROVIDER_AWS' | 'CUSTOM_DOMAIN_PROVIDER_GCP' /** * CreateCustomDomainResponse is the response message for creating a custom domain @@ -221,7 +215,7 @@ export interface CustomDomainUpdateResponse { /** * DeleteCustomDomainResponse is the response message for deleting a custom domain */ -export type CustomDomainDeleteResponse = unknown; +export type CustomDomainDeleteResponse = unknown export interface CustomDomainCreateParams { /** @@ -306,6 +300,6 @@ export declare namespace CustomDomains { type CustomDomainCreateParams as CustomDomainCreateParams, type CustomDomainRetrieveParams as CustomDomainRetrieveParams, type CustomDomainUpdateParams as CustomDomainUpdateParams, - type CustomDomainDeleteParams as CustomDomainDeleteParams, + type CustomDomainDeleteParams as CustomDomainDeleteParams }; } diff --git a/src/resources/organizations/domain-verifications.ts b/src/resources/organizations/domain-verifications.ts index e5044cbc..1330328b 100644 --- a/src/resources/organizations/domain-verifications.ts +++ b/src/resources/organizations/domain-verifications.ts @@ -2,11 +2,7 @@ import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; -import { - DomainVerificationsPage, - type DomainVerificationsPageParams, - PagePromise, -} from '../../core/pagination'; +import { DomainVerificationsPage, type DomainVerificationsPageParams, PagePromise } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class DomainVerifications extends APIResource { @@ -49,10 +45,7 @@ export class DomainVerifications extends APIResource { * }); * ``` */ - create( - body: DomainVerificationCreateParams, - options?: RequestOptions, - ): APIPromise { + create(body: DomainVerificationCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/CreateDomainVerification', { body, ...options }); } @@ -84,10 +77,7 @@ export class DomainVerifications extends APIResource { * }); * ``` */ - retrieve( - body: DomainVerificationRetrieveParams, - options?: RequestOptions, - ): APIPromise { + retrieve(body: DomainVerificationRetrieveParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetDomainVerification', { body, ...options }); } @@ -137,16 +127,9 @@ export class DomainVerifications extends APIResource { * } * ``` */ - list( - params: DomainVerificationListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.OrganizationService/ListDomainVerifications', - DomainVerificationsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: DomainVerificationListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.OrganizationService/ListDomainVerifications', DomainVerificationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -209,15 +192,12 @@ export class DomainVerifications extends APIResource { * }); * ``` */ - verify( - body: DomainVerificationVerifyParams, - options?: RequestOptions, - ): APIPromise { + verify(body: DomainVerificationVerifyParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/VerifyDomain', { body, ...options }); } } -export type DomainVerificationsDomainVerificationsPage = DomainVerificationsPage; +export type DomainVerificationsDomainVerificationsPage = DomainVerificationsPage export interface DomainVerification { id: string; @@ -415,10 +395,7 @@ export interface DomainVerification { verifiedAt?: string; } -export type DomainVerificationState = - | 'DOMAIN_VERIFICATION_STATE_UNSPECIFIED' - | 'DOMAIN_VERIFICATION_STATE_PENDING' - | 'DOMAIN_VERIFICATION_STATE_VERIFIED'; +export type DomainVerificationState = 'DOMAIN_VERIFICATION_STATE_UNSPECIFIED' | 'DOMAIN_VERIFICATION_STATE_PENDING' | 'DOMAIN_VERIFICATION_STATE_VERIFIED' export interface DomainVerificationCreateResponse { domainVerification: DomainVerification; @@ -428,7 +405,7 @@ export interface DomainVerificationRetrieveResponse { domainVerification: DomainVerification; } -export type DomainVerificationDeleteResponse = unknown; +export type DomainVerificationDeleteResponse = unknown export interface DomainVerificationVerifyResponse { domainVerification: DomainVerification; @@ -493,6 +470,6 @@ export declare namespace DomainVerifications { type DomainVerificationRetrieveParams as DomainVerificationRetrieveParams, type DomainVerificationListParams as DomainVerificationListParams, type DomainVerificationDeleteParams as DomainVerificationDeleteParams, - type DomainVerificationVerifyParams as DomainVerificationVerifyParams, + type DomainVerificationVerifyParams as DomainVerificationVerifyParams }; } diff --git a/src/resources/organizations/index.ts b/src/resources/organizations/index.ts index 29e04f78..92b1ce90 100644 --- a/src/resources/organizations/index.ts +++ b/src/resources/organizations/index.ts @@ -1,119 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - AnnouncementBannerResource, - type AnnouncementBanner, - type AnnouncementBannerUpdateResponse, - type AnnouncementBannerGetResponse, - type AnnouncementBannerUpdateParams, - type AnnouncementBannerGetParams, -} from './announcement-banner'; -export { - CustomDomains, - type CustomDomain, - type CustomDomainProvider, - type CustomDomainCreateResponse, - type CustomDomainRetrieveResponse, - type CustomDomainUpdateResponse, - type CustomDomainDeleteResponse, - type CustomDomainCreateParams, - type CustomDomainRetrieveParams, - type CustomDomainUpdateParams, - type CustomDomainDeleteParams, -} from './custom-domains'; -export { - DomainVerifications, - type DomainVerification, - type DomainVerificationState, - type DomainVerificationCreateResponse, - type DomainVerificationRetrieveResponse, - type DomainVerificationDeleteResponse, - type DomainVerificationVerifyResponse, - type DomainVerificationCreateParams, - type DomainVerificationRetrieveParams, - type DomainVerificationListParams, - type DomainVerificationDeleteParams, - type DomainVerificationVerifyParams, - type DomainVerificationsDomainVerificationsPage, -} from './domain-verifications'; -export { - Invites, - type OrganizationInvite, - type InviteCreateResponse, - type InviteRetrieveResponse, - type InviteGetSummaryResponse, - type InviteCreateParams, - type InviteRetrieveParams, - type InviteGetSummaryParams, -} from './invites'; -export { - Organizations, - type InviteDomains, - type Organization, - type OrganizationMember, - type OrganizationCreateResponse, - type OrganizationRetrieveResponse, - type OrganizationUpdateResponse, - type OrganizationDeleteResponse, - type OrganizationJoinResponse, - type OrganizationLeaveResponse, - type OrganizationSetRoleResponse, - type OrganizationCreateParams, - type OrganizationRetrieveParams, - type OrganizationUpdateParams, - type OrganizationDeleteParams, - type OrganizationJoinParams, - type OrganizationLeaveParams, - type OrganizationListMembersParams, - type OrganizationSetRoleParams, - type OrganizationMembersMembersPage, -} from './organizations'; -export { - Policies, - type AgentPolicy, - type ConversationSharingPolicy, - type CrowdStrikeConfig, - type CustomAgentEnvMapping, - type CustomSecurityAgent, - type KernelControlsAction, - type OrganizationPolicies, - type SecurityAgentPolicy, - type VetoExecPolicy, - type PolicyRetrieveResponse, - type PolicyUpdateResponse, - type PolicyRetrieveParams, - type PolicyUpdateParams, -} from './policies'; -export { - SSOConfigurations, - type AdditionalScopesUpdate, - type ProviderType, - type SSOConfiguration, - type SSOConfigurationState, - type SSOConfigurationCreateResponse, - type SSOConfigurationRetrieveResponse, - type SSOConfigurationUpdateResponse, - type SSOConfigurationDeleteResponse, - type SSOConfigurationCreateParams, - type SSOConfigurationRetrieveParams, - type SSOConfigurationUpdateParams, - type SSOConfigurationListParams, - type SSOConfigurationDeleteParams, - type SSOConfigurationsSSOConfigurationsPage, -} from './sso-configurations'; -export { - ScimConfigurations, - type ScimConfiguration, - type ScimConfigurationCreateResponse, - type ScimConfigurationRetrieveResponse, - type ScimConfigurationUpdateResponse, - type ScimConfigurationDeleteResponse, - type ScimConfigurationRegenerateTokenResponse, - type ScimConfigurationCreateParams, - type ScimConfigurationRetrieveParams, - type ScimConfigurationUpdateParams, - type ScimConfigurationListParams, - type ScimConfigurationDeleteParams, - type ScimConfigurationRegenerateTokenParams, - type ScimConfigurationsScimConfigurationsPage, -} from './scim-configurations'; +export { AnnouncementBannerResource, type AnnouncementBanner, type AnnouncementBannerUpdateResponse, type AnnouncementBannerGetResponse, type AnnouncementBannerUpdateParams, type AnnouncementBannerGetParams } from './announcement-banner';; +export { CustomDomains, type CustomDomain, type CustomDomainProvider, type CustomDomainCreateResponse, type CustomDomainRetrieveResponse, type CustomDomainUpdateResponse, type CustomDomainDeleteResponse, type CustomDomainCreateParams, type CustomDomainRetrieveParams, type CustomDomainUpdateParams, type CustomDomainDeleteParams } from './custom-domains';; +export { DomainVerifications, type DomainVerification, type DomainVerificationState, type DomainVerificationCreateResponse, type DomainVerificationRetrieveResponse, type DomainVerificationDeleteResponse, type DomainVerificationVerifyResponse, type DomainVerificationCreateParams, type DomainVerificationRetrieveParams, type DomainVerificationListParams, type DomainVerificationDeleteParams, type DomainVerificationVerifyParams, type DomainVerificationsDomainVerificationsPage } from './domain-verifications';; +export { Invites, type OrganizationInvite, type InviteCreateResponse, type InviteRetrieveResponse, type InviteGetSummaryResponse, type InviteCreateParams, type InviteRetrieveParams, type InviteGetSummaryParams } from './invites';; +export { Organizations, type InviteDomains, type Organization, type OrganizationMember, type OrganizationCreateResponse, type OrganizationRetrieveResponse, type OrganizationUpdateResponse, type OrganizationDeleteResponse, type OrganizationJoinResponse, type OrganizationLeaveResponse, type OrganizationSetRoleResponse, type OrganizationCreateParams, type OrganizationRetrieveParams, type OrganizationUpdateParams, type OrganizationDeleteParams, type OrganizationJoinParams, type OrganizationLeaveParams, type OrganizationListMembersParams, type OrganizationSetRoleParams, type OrganizationMembersMembersPage } from './organizations';; +export { Policies, type AgentPolicy, type ConversationSharingPolicy, type CrowdStrikeConfig, type CustomAgentEnvMapping, type CustomSecurityAgent, type KernelControlsAction, type OrganizationPolicies, type SecurityAgentPolicy, type VetoExecPolicy, type PolicyRetrieveResponse, type PolicyUpdateResponse, type PolicyRetrieveParams, type PolicyUpdateParams } from './policies';; +export { SSOConfigurations, type AdditionalScopesUpdate, type ProviderType, type SSOConfiguration, type SSOConfigurationState, type SSOConfigurationCreateResponse, type SSOConfigurationRetrieveResponse, type SSOConfigurationUpdateResponse, type SSOConfigurationDeleteResponse, type SSOConfigurationCreateParams, type SSOConfigurationRetrieveParams, type SSOConfigurationUpdateParams, type SSOConfigurationListParams, type SSOConfigurationDeleteParams, type SSOConfigurationsSSOConfigurationsPage } from './sso-configurations';; +export { ScimConfigurations, type ScimConfiguration, type ScimConfigurationCreateResponse, type ScimConfigurationRetrieveResponse, type ScimConfigurationUpdateResponse, type ScimConfigurationDeleteResponse, type ScimConfigurationRegenerateTokenResponse, type ScimConfigurationCreateParams, type ScimConfigurationRetrieveParams, type ScimConfigurationUpdateParams, type ScimConfigurationListParams, type ScimConfigurationDeleteParams, type ScimConfigurationRegenerateTokenParams, type ScimConfigurationsScimConfigurationsPage } from './scim-configurations';; diff --git a/src/resources/organizations/invites.ts b/src/resources/organizations/invites.ts index ad18317b..f6dbc107 100644 --- a/src/resources/organizations/invites.ts +++ b/src/resources/organizations/invites.ts @@ -79,10 +79,7 @@ export class Invites extends APIResource { * ``` */ getSummary(body: InviteGetSummaryParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.OrganizationService/GetOrganizationInviteSummary', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.OrganizationService/GetOrganizationInviteSummary', { body, ...options }); } } @@ -130,6 +127,6 @@ export declare namespace Invites { type InviteGetSummaryResponse as InviteGetSummaryResponse, type InviteCreateParams as InviteCreateParams, type InviteRetrieveParams as InviteRetrieveParams, - type InviteGetSummaryParams as InviteGetSummaryParams, + type InviteGetSummaryParams as InviteGetSummaryParams }; } diff --git a/src/resources/organizations/organizations.ts b/src/resources/organizations/organizations.ts index 3cdc46f4..dbd92882 100644 --- a/src/resources/organizations/organizations.ts +++ b/src/resources/organizations/organizations.ts @@ -3,125 +3,31 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import * as AnnouncementBannerAPI from './announcement-banner'; -import { - AnnouncementBanner, - AnnouncementBannerGetParams, - AnnouncementBannerGetResponse, - AnnouncementBannerResource, - AnnouncementBannerUpdateParams, - AnnouncementBannerUpdateResponse, -} from './announcement-banner'; +import { AnnouncementBanner, AnnouncementBannerGetParams, AnnouncementBannerGetResponse, AnnouncementBannerResource, AnnouncementBannerUpdateParams, AnnouncementBannerUpdateResponse } from './announcement-banner'; import * as CustomDomainsAPI from './custom-domains'; -import { - CustomDomain, - CustomDomainCreateParams, - CustomDomainCreateResponse, - CustomDomainDeleteParams, - CustomDomainDeleteResponse, - CustomDomainProvider, - CustomDomainRetrieveParams, - CustomDomainRetrieveResponse, - CustomDomainUpdateParams, - CustomDomainUpdateResponse, - CustomDomains, -} from './custom-domains'; +import { CustomDomain, CustomDomainCreateParams, CustomDomainCreateResponse, CustomDomainDeleteParams, CustomDomainDeleteResponse, CustomDomainProvider, CustomDomainRetrieveParams, CustomDomainRetrieveResponse, CustomDomainUpdateParams, CustomDomainUpdateResponse, CustomDomains } from './custom-domains'; import * as DomainVerificationsAPI from './domain-verifications'; -import { - DomainVerification, - DomainVerificationCreateParams, - DomainVerificationCreateResponse, - DomainVerificationDeleteParams, - DomainVerificationDeleteResponse, - DomainVerificationListParams, - DomainVerificationRetrieveParams, - DomainVerificationRetrieveResponse, - DomainVerificationState, - DomainVerificationVerifyParams, - DomainVerificationVerifyResponse, - DomainVerifications, - DomainVerificationsDomainVerificationsPage, -} from './domain-verifications'; +import { DomainVerification, DomainVerificationCreateParams, DomainVerificationCreateResponse, DomainVerificationDeleteParams, DomainVerificationDeleteResponse, DomainVerificationListParams, DomainVerificationRetrieveParams, DomainVerificationRetrieveResponse, DomainVerificationState, DomainVerificationVerifyParams, DomainVerificationVerifyResponse, DomainVerifications, DomainVerificationsDomainVerificationsPage } from './domain-verifications'; import * as InvitesAPI from './invites'; -import { - InviteCreateParams, - InviteCreateResponse, - InviteGetSummaryParams, - InviteGetSummaryResponse, - InviteRetrieveParams, - InviteRetrieveResponse, - Invites, - OrganizationInvite, -} from './invites'; +import { InviteCreateParams, InviteCreateResponse, InviteGetSummaryParams, InviteGetSummaryResponse, InviteRetrieveParams, InviteRetrieveResponse, Invites, OrganizationInvite } from './invites'; import * as PoliciesAPI from './policies'; -import { - AgentPolicy, - ConversationSharingPolicy, - CrowdStrikeConfig, - CustomAgentEnvMapping, - CustomSecurityAgent, - KernelControlsAction, - OrganizationPolicies, - Policies, - PolicyRetrieveParams, - PolicyRetrieveResponse, - PolicyUpdateParams, - PolicyUpdateResponse, - SecurityAgentPolicy, - VetoExecPolicy, -} from './policies'; +import { AgentPolicy, ConversationSharingPolicy, CrowdStrikeConfig, CustomAgentEnvMapping, CustomSecurityAgent, KernelControlsAction, OrganizationPolicies, Policies, PolicyRetrieveParams, PolicyRetrieveResponse, PolicyUpdateParams, PolicyUpdateResponse, SecurityAgentPolicy, VetoExecPolicy } from './policies'; import * as ScimConfigurationsAPI from './scim-configurations'; -import { - ScimConfiguration, - ScimConfigurationCreateParams, - ScimConfigurationCreateResponse, - ScimConfigurationDeleteParams, - ScimConfigurationDeleteResponse, - ScimConfigurationListParams, - ScimConfigurationRegenerateTokenParams, - ScimConfigurationRegenerateTokenResponse, - ScimConfigurationRetrieveParams, - ScimConfigurationRetrieveResponse, - ScimConfigurationUpdateParams, - ScimConfigurationUpdateResponse, - ScimConfigurations, - ScimConfigurationsScimConfigurationsPage, -} from './scim-configurations'; +import { ScimConfiguration, ScimConfigurationCreateParams, ScimConfigurationCreateResponse, ScimConfigurationDeleteParams, ScimConfigurationDeleteResponse, ScimConfigurationListParams, ScimConfigurationRegenerateTokenParams, ScimConfigurationRegenerateTokenResponse, ScimConfigurationRetrieveParams, ScimConfigurationRetrieveResponse, ScimConfigurationUpdateParams, ScimConfigurationUpdateResponse, ScimConfigurations, ScimConfigurationsScimConfigurationsPage } from './scim-configurations'; import * as SSOConfigurationsAPI from './sso-configurations'; -import { - AdditionalScopesUpdate, - ProviderType, - SSOConfiguration, - SSOConfigurationCreateParams, - SSOConfigurationCreateResponse, - SSOConfigurationDeleteParams, - SSOConfigurationDeleteResponse, - SSOConfigurationListParams, - SSOConfigurationRetrieveParams, - SSOConfigurationRetrieveResponse, - SSOConfigurationState, - SSOConfigurationUpdateParams, - SSOConfigurationUpdateResponse, - SSOConfigurations, - SSOConfigurationsSSOConfigurationsPage, -} from './sso-configurations'; +import { AdditionalScopesUpdate, ProviderType, SSOConfiguration, SSOConfigurationCreateParams, SSOConfigurationCreateResponse, SSOConfigurationDeleteParams, SSOConfigurationDeleteResponse, SSOConfigurationListParams, SSOConfigurationRetrieveParams, SSOConfigurationRetrieveResponse, SSOConfigurationState, SSOConfigurationUpdateParams, SSOConfigurationUpdateResponse, SSOConfigurations, SSOConfigurationsSSOConfigurationsPage } from './sso-configurations'; import { APIPromise } from '../../core/api-promise'; import { MembersPage, type MembersPageParams, PagePromise } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Organizations extends APIResource { - announcementBanner: AnnouncementBannerAPI.AnnouncementBannerResource = - new AnnouncementBannerAPI.AnnouncementBannerResource(this._client); + announcementBanner: AnnouncementBannerAPI.AnnouncementBannerResource = new AnnouncementBannerAPI.AnnouncementBannerResource(this._client); customDomains: CustomDomainsAPI.CustomDomains = new CustomDomainsAPI.CustomDomains(this._client); - domainVerifications: DomainVerificationsAPI.DomainVerifications = - new DomainVerificationsAPI.DomainVerifications(this._client); + domainVerifications: DomainVerificationsAPI.DomainVerifications = new DomainVerificationsAPI.DomainVerifications(this._client); invites: InvitesAPI.Invites = new InvitesAPI.Invites(this._client); policies: PoliciesAPI.Policies = new PoliciesAPI.Policies(this._client); - scimConfigurations: ScimConfigurationsAPI.ScimConfigurations = new ScimConfigurationsAPI.ScimConfigurations( - this._client, - ); - ssoConfigurations: SSOConfigurationsAPI.SSOConfigurations = new SSOConfigurationsAPI.SSOConfigurations( - this._client, - ); + scimConfigurations: ScimConfigurationsAPI.ScimConfigurations = new ScimConfigurationsAPI.ScimConfigurations(this._client); + ssoConfigurations: SSOConfigurationsAPI.SSOConfigurations = new SSOConfigurationsAPI.SSOConfigurations(this._client); /** * Creates a new organization with the specified name and settings. @@ -192,10 +98,7 @@ export class Organizations extends APIResource { * }); * ``` */ - retrieve( - body: OrganizationRetrieveParams, - options?: RequestOptions, - ): APIPromise { + retrieve(body: OrganizationRetrieveParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetOrganization', { body, ...options }); } @@ -394,16 +297,9 @@ export class Organizations extends APIResource { * } * ``` */ - listMembers( - params: OrganizationListMembersParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.OrganizationService/ListMembers', - MembersPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listMembers(params: OrganizationListMembersParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.OrganizationService/ListMembers', MembersPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -452,7 +348,7 @@ export class Organizations extends APIResource { } } -export type OrganizationMembersMembersPage = MembersPage; +export type OrganizationMembersMembersPage = MembersPage export interface InviteDomains { /** @@ -796,7 +692,7 @@ export interface OrganizationUpdateResponse { organization: Organization; } -export type OrganizationDeleteResponse = unknown; +export type OrganizationDeleteResponse = unknown export interface OrganizationJoinResponse { /** @@ -805,9 +701,9 @@ export interface OrganizationJoinResponse { member: OrganizationMember; } -export type OrganizationLeaveResponse = unknown; +export type OrganizationLeaveResponse = unknown -export type OrganizationSetRoleResponse = unknown; +export type OrganizationSetRoleResponse = unknown export interface OrganizationCreateParams { /** @@ -1001,7 +897,7 @@ export declare namespace Organizations { type OrganizationJoinParams as OrganizationJoinParams, type OrganizationLeaveParams as OrganizationLeaveParams, type OrganizationListMembersParams as OrganizationListMembersParams, - type OrganizationSetRoleParams as OrganizationSetRoleParams, + type OrganizationSetRoleParams as OrganizationSetRoleParams }; export { @@ -1010,7 +906,7 @@ export declare namespace Organizations { type AnnouncementBannerUpdateResponse as AnnouncementBannerUpdateResponse, type AnnouncementBannerGetResponse as AnnouncementBannerGetResponse, type AnnouncementBannerUpdateParams as AnnouncementBannerUpdateParams, - type AnnouncementBannerGetParams as AnnouncementBannerGetParams, + type AnnouncementBannerGetParams as AnnouncementBannerGetParams }; export { @@ -1024,7 +920,7 @@ export declare namespace Organizations { type CustomDomainCreateParams as CustomDomainCreateParams, type CustomDomainRetrieveParams as CustomDomainRetrieveParams, type CustomDomainUpdateParams as CustomDomainUpdateParams, - type CustomDomainDeleteParams as CustomDomainDeleteParams, + type CustomDomainDeleteParams as CustomDomainDeleteParams }; export { @@ -1040,7 +936,7 @@ export declare namespace Organizations { type DomainVerificationRetrieveParams as DomainVerificationRetrieveParams, type DomainVerificationListParams as DomainVerificationListParams, type DomainVerificationDeleteParams as DomainVerificationDeleteParams, - type DomainVerificationVerifyParams as DomainVerificationVerifyParams, + type DomainVerificationVerifyParams as DomainVerificationVerifyParams }; export { @@ -1051,7 +947,7 @@ export declare namespace Organizations { type InviteGetSummaryResponse as InviteGetSummaryResponse, type InviteCreateParams as InviteCreateParams, type InviteRetrieveParams as InviteRetrieveParams, - type InviteGetSummaryParams as InviteGetSummaryParams, + type InviteGetSummaryParams as InviteGetSummaryParams }; export { @@ -1068,7 +964,7 @@ export declare namespace Organizations { type PolicyRetrieveResponse as PolicyRetrieveResponse, type PolicyUpdateResponse as PolicyUpdateResponse, type PolicyRetrieveParams as PolicyRetrieveParams, - type PolicyUpdateParams as PolicyUpdateParams, + type PolicyUpdateParams as PolicyUpdateParams }; export { @@ -1085,7 +981,7 @@ export declare namespace Organizations { type ScimConfigurationUpdateParams as ScimConfigurationUpdateParams, type ScimConfigurationListParams as ScimConfigurationListParams, type ScimConfigurationDeleteParams as ScimConfigurationDeleteParams, - type ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams, + type ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams }; export { @@ -1103,6 +999,6 @@ export declare namespace Organizations { type SSOConfigurationRetrieveParams as SSOConfigurationRetrieveParams, type SSOConfigurationUpdateParams as SSOConfigurationUpdateParams, type SSOConfigurationListParams as SSOConfigurationListParams, - type SSOConfigurationDeleteParams as SSOConfigurationDeleteParams, + type SSOConfigurationDeleteParams as SSOConfigurationDeleteParams }; } diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index 604b29e0..c3b92606 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -84,10 +84,7 @@ export class Policies extends APIResource { * ``` */ update(body: PolicyUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.OrganizationService/UpdateOrganizationPolicies', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.OrganizationService/UpdateOrganizationPolicies', { body, ...options }); } } @@ -135,10 +132,7 @@ export interface AgentPolicy { /** * ConversationSharingPolicy controls how agent conversations can be shared. */ -export type ConversationSharingPolicy = - | 'CONVERSATION_SHARING_POLICY_UNSPECIFIED' - | 'CONVERSATION_SHARING_POLICY_DISABLED' - | 'CONVERSATION_SHARING_POLICY_ORGANIZATION'; +export type ConversationSharingPolicy = 'CONVERSATION_SHARING_POLICY_UNSPECIFIED' | 'CONVERSATION_SHARING_POLICY_DISABLED' | 'CONVERSATION_SHARING_POLICY_ORGANIZATION' /** * CrowdStrikeConfig configures CrowdStrike Falcon sensor deployment @@ -231,10 +225,7 @@ export interface CustomSecurityAgent { /** * KernelControlsAction defines how a kernel-level policy violation is handled. */ -export type KernelControlsAction = - | 'KERNEL_CONTROLS_ACTION_UNSPECIFIED' - | 'KERNEL_CONTROLS_ACTION_BLOCK' - | 'KERNEL_CONTROLS_ACTION_AUDIT'; +export type KernelControlsAction = 'KERNEL_CONTROLS_ACTION_UNSPECIFIED' | 'KERNEL_CONTROLS_ACTION_BLOCK' | 'KERNEL_CONTROLS_ACTION_AUDIT' export interface OrganizationPolicies { /** @@ -412,7 +403,7 @@ export interface PolicyRetrieveResponse { policies: OrganizationPolicies; } -export type PolicyUpdateResponse = unknown; +export type PolicyUpdateResponse = unknown export interface PolicyRetrieveParams { /** @@ -655,6 +646,6 @@ export declare namespace Policies { type PolicyRetrieveResponse as PolicyRetrieveResponse, type PolicyUpdateResponse as PolicyUpdateResponse, type PolicyRetrieveParams as PolicyRetrieveParams, - type PolicyUpdateParams as PolicyUpdateParams, + type PolicyUpdateParams as PolicyUpdateParams }; } diff --git a/src/resources/organizations/scim-configurations.ts b/src/resources/organizations/scim-configurations.ts index 33dc2f84..62c2da3a 100644 --- a/src/resources/organizations/scim-configurations.ts +++ b/src/resources/organizations/scim-configurations.ts @@ -2,11 +2,7 @@ import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; -import { - PagePromise, - ScimConfigurationsPage, - type ScimConfigurationsPageParams, -} from '../../core/pagination'; +import { PagePromise, ScimConfigurationsPage, type ScimConfigurationsPageParams } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class ScimConfigurations extends APIResource { @@ -51,10 +47,7 @@ export class ScimConfigurations extends APIResource { * }); * ``` */ - create( - body: ScimConfigurationCreateParams, - options?: RequestOptions, - ): APIPromise { + create(body: ScimConfigurationCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/CreateSCIMConfiguration', { body, ...options }); } @@ -86,10 +79,7 @@ export class ScimConfigurations extends APIResource { * }); * ``` */ - retrieve( - body: ScimConfigurationRetrieveParams, - options?: RequestOptions, - ): APIPromise { + retrieve(body: ScimConfigurationRetrieveParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetSCIMConfiguration', { body, ...options }); } @@ -131,10 +121,7 @@ export class ScimConfigurations extends APIResource { * }); * ``` */ - update( - body: ScimConfigurationUpdateParams, - options?: RequestOptions, - ): APIPromise { + update(body: ScimConfigurationUpdateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/UpdateSCIMConfiguration', { body, ...options }); } @@ -168,16 +155,9 @@ export class ScimConfigurations extends APIResource { * } * ``` */ - list( - params: ScimConfigurationListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.OrganizationService/ListSCIMConfigurations', - ScimConfigurationsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: ScimConfigurationListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.OrganizationService/ListSCIMConfigurations', ScimConfigurationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -252,15 +232,12 @@ export class ScimConfigurations extends APIResource { * ); * ``` */ - regenerateToken( - body: ScimConfigurationRegenerateTokenParams, - options?: RequestOptions, - ): APIPromise { + regenerateToken(body: ScimConfigurationRegenerateTokenParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/RegenerateSCIMToken', { body, ...options }); } } -export type ScimConfigurationsScimConfigurationsPage = ScimConfigurationsPage; +export type ScimConfigurationsScimConfigurationsPage = ScimConfigurationsPage /** * SCIMConfiguration represents a SCIM 2.0 provisioning configuration @@ -339,7 +316,7 @@ export interface ScimConfigurationUpdateResponse { scimConfiguration: ScimConfiguration; } -export type ScimConfigurationDeleteResponse = unknown; +export type ScimConfigurationDeleteResponse = unknown export interface ScimConfigurationRegenerateTokenResponse { /** @@ -466,6 +443,6 @@ export declare namespace ScimConfigurations { type ScimConfigurationUpdateParams as ScimConfigurationUpdateParams, type ScimConfigurationListParams as ScimConfigurationListParams, type ScimConfigurationDeleteParams as ScimConfigurationDeleteParams, - type ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams, + type ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams }; } diff --git a/src/resources/organizations/sso-configurations.ts b/src/resources/organizations/sso-configurations.ts index 08d20208..15eac799 100644 --- a/src/resources/organizations/sso-configurations.ts +++ b/src/resources/organizations/sso-configurations.ts @@ -55,10 +55,7 @@ export class SSOConfigurations extends APIResource { * }); * ``` */ - create( - body: SSOConfigurationCreateParams, - options?: RequestOptions, - ): APIPromise { + create(body: SSOConfigurationCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/CreateSSOConfiguration', { body, ...options }); } @@ -90,10 +87,7 @@ export class SSOConfigurations extends APIResource { * }); * ``` */ - retrieve( - body: SSOConfigurationRetrieveParams, - options?: RequestOptions, - ): APIPromise { + retrieve(body: SSOConfigurationRetrieveParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetSSOConfiguration', { body, ...options }); } @@ -190,16 +184,9 @@ export class SSOConfigurations extends APIResource { * } * ``` */ - list( - params: SSOConfigurationListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.OrganizationService/ListSSOConfigurations', - SSOConfigurationsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: SSOConfigurationListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.OrganizationService/ListSSOConfigurations', SSOConfigurationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -235,7 +222,7 @@ export class SSOConfigurations extends APIResource { } } -export type SSOConfigurationsSSOConfigurationsPage = SSOConfigurationsPage; +export type SSOConfigurationsSSOConfigurationsPage = SSOConfigurationsPage /** * AdditionalScopesUpdate wraps a list of OIDC scopes so that the update request @@ -246,7 +233,7 @@ export interface AdditionalScopesUpdate { scopes?: Array; } -export type ProviderType = 'PROVIDER_TYPE_UNSPECIFIED' | 'PROVIDER_TYPE_BUILTIN' | 'PROVIDER_TYPE_CUSTOM'; +export type ProviderType = 'PROVIDER_TYPE_UNSPECIFIED' | 'PROVIDER_TYPE_BUILTIN' | 'PROVIDER_TYPE_CUSTOM' export interface SSOConfiguration { /** @@ -303,10 +290,7 @@ export interface SSOConfiguration { emailDomains?: Array; } -export type SSOConfigurationState = - | 'SSO_CONFIGURATION_STATE_UNSPECIFIED' - | 'SSO_CONFIGURATION_STATE_INACTIVE' - | 'SSO_CONFIGURATION_STATE_ACTIVE'; +export type SSOConfigurationState = 'SSO_CONFIGURATION_STATE_UNSPECIFIED' | 'SSO_CONFIGURATION_STATE_INACTIVE' | 'SSO_CONFIGURATION_STATE_ACTIVE' export interface SSOConfigurationCreateResponse { /** @@ -322,9 +306,9 @@ export interface SSOConfigurationRetrieveResponse { ssoConfiguration: SSOConfiguration; } -export type SSOConfigurationUpdateResponse = unknown; +export type SSOConfigurationUpdateResponse = unknown -export type SSOConfigurationDeleteResponse = unknown; +export type SSOConfigurationDeleteResponse = unknown export interface SSOConfigurationCreateParams { /** @@ -476,6 +460,6 @@ export declare namespace SSOConfigurations { type SSOConfigurationRetrieveParams as SSOConfigurationRetrieveParams, type SSOConfigurationUpdateParams as SSOConfigurationUpdateParams, type SSOConfigurationListParams as SSOConfigurationListParams, - type SSOConfigurationDeleteParams as SSOConfigurationDeleteParams, + type SSOConfigurationDeleteParams as SSOConfigurationDeleteParams }; } diff --git a/src/resources/prebuilds.ts b/src/resources/prebuilds.ts index 27212da8..d5b12191 100644 --- a/src/resources/prebuilds.ts +++ b/src/resources/prebuilds.ts @@ -4,13 +4,7 @@ import { APIResource } from '../core/resource'; import * as PrebuildsAPI from './prebuilds'; import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; -import { - PagePromise, - PrebuildsPage, - type PrebuildsPageParams, - WarmPoolsPage, - type WarmPoolsPageParams, -} from '../core/pagination'; +import { PagePromise, PrebuildsPage, type PrebuildsPageParams, WarmPoolsPage, type WarmPoolsPageParams } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; /** @@ -106,13 +100,8 @@ export class Prebuilds extends APIResource { * ``` */ list(params: PrebuildListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.PrebuildService/ListPrebuilds', PrebuildsPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.PrebuildService/ListPrebuilds', PrebuildsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -202,10 +191,7 @@ export class Prebuilds extends APIResource { * }); * ``` */ - createLogsToken( - body: PrebuildCreateLogsTokenParams, - options?: RequestOptions, - ): APIPromise { + createLogsToken(body: PrebuildCreateLogsTokenParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.PrebuildService/CreatePrebuildLogsToken', { body, ...options }); } @@ -244,10 +230,7 @@ export class Prebuilds extends APIResource { * }); * ``` */ - createWarmPool( - body: PrebuildCreateWarmPoolParams, - options?: RequestOptions, - ): APIPromise { + createWarmPool(body: PrebuildCreateWarmPoolParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.PrebuildService/CreateWarmPool', { body, ...options }); } @@ -310,17 +293,9 @@ export class Prebuilds extends APIResource { * } * ``` */ - listWarmPools( - params: PrebuildListWarmPoolsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.PrebuildService/ListWarmPools', WarmPoolsPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + listWarmPools(params: PrebuildListWarmPoolsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.PrebuildService/ListWarmPools', WarmPoolsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -347,10 +322,7 @@ export class Prebuilds extends APIResource { * }); * ``` */ - retrieveWarmPool( - body: PrebuildRetrieveWarmPoolParams, - options?: RequestOptions, - ): APIPromise { + retrieveWarmPool(body: PrebuildRetrieveWarmPoolParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.PrebuildService/GetWarmPool', { body, ...options }); } @@ -376,17 +348,14 @@ export class Prebuilds extends APIResource { * }); * ``` */ - updateWarmPool( - body: PrebuildUpdateWarmPoolParams, - options?: RequestOptions, - ): APIPromise { + updateWarmPool(body: PrebuildUpdateWarmPoolParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.PrebuildService/UpdateWarmPool', { body, ...options }); } } -export type PrebuildsPrebuildsPage = PrebuildsPage; +export type PrebuildsPrebuildsPage = PrebuildsPage -export type WarmPoolsWarmPoolsPage = WarmPoolsPage; +export type WarmPoolsWarmPoolsPage = WarmPoolsPage /** * Prebuild represents a prebuild for a project that creates a snapshot for faster @@ -470,19 +439,7 @@ export interface PrebuildMetadata { /** * PrebuildPhase represents the lifecycle phase of a prebuild */ -export type PrebuildPhase = - | 'PREBUILD_PHASE_UNSPECIFIED' - | 'PREBUILD_PHASE_PENDING' - | 'PREBUILD_PHASE_STARTING' - | 'PREBUILD_PHASE_RUNNING' - | 'PREBUILD_PHASE_STOPPING' - | 'PREBUILD_PHASE_SNAPSHOTTING' - | 'PREBUILD_PHASE_COMPLETED' - | 'PREBUILD_PHASE_FAILED' - | 'PREBUILD_PHASE_CANCELLING' - | 'PREBUILD_PHASE_CANCELLED' - | 'PREBUILD_PHASE_DELETING' - | 'PREBUILD_PHASE_DELETED'; +export type PrebuildPhase = 'PREBUILD_PHASE_UNSPECIFIED' | 'PREBUILD_PHASE_PENDING' | 'PREBUILD_PHASE_STARTING' | 'PREBUILD_PHASE_RUNNING' | 'PREBUILD_PHASE_STOPPING' | 'PREBUILD_PHASE_SNAPSHOTTING' | 'PREBUILD_PHASE_COMPLETED' | 'PREBUILD_PHASE_FAILED' | 'PREBUILD_PHASE_CANCELLING' | 'PREBUILD_PHASE_CANCELLED' | 'PREBUILD_PHASE_DELETING' | 'PREBUILD_PHASE_DELETED' /** * PrebuildSpec contains the configuration used to create a prebuild @@ -571,10 +528,7 @@ export interface PrebuildStatus { /** * PrebuildTrigger indicates how the prebuild was triggered */ -export type PrebuildTrigger = - | 'PREBUILD_TRIGGER_UNSPECIFIED' - | 'PREBUILD_TRIGGER_MANUAL' - | 'PREBUILD_TRIGGER_SCHEDULED'; +export type PrebuildTrigger = 'PREBUILD_TRIGGER_UNSPECIFIED' | 'PREBUILD_TRIGGER_MANUAL' | 'PREBUILD_TRIGGER_SCHEDULED' /** * WarmPool maintains pre-created environment instances from a prebuild snapshot @@ -642,13 +596,7 @@ export interface WarmPoolMetadata { /** * WarmPoolPhase represents the lifecycle phase of a warm pool */ -export type WarmPoolPhase = - | 'WARM_POOL_PHASE_UNSPECIFIED' - | 'WARM_POOL_PHASE_PENDING' - | 'WARM_POOL_PHASE_READY' - | 'WARM_POOL_PHASE_DEGRADED' - | 'WARM_POOL_PHASE_DELETING' - | 'WARM_POOL_PHASE_DELETED'; +export type WarmPoolPhase = 'WARM_POOL_PHASE_UNSPECIFIED' | 'WARM_POOL_PHASE_PENDING' | 'WARM_POOL_PHASE_READY' | 'WARM_POOL_PHASE_DEGRADED' | 'WARM_POOL_PHASE_DELETING' | 'WARM_POOL_PHASE_DELETED' /** * WarmPoolSpec contains the desired configuration for a warm pool @@ -754,7 +702,7 @@ export interface PrebuildRetrieveResponse { prebuild: Prebuild; } -export type PrebuildDeleteResponse = unknown; +export type PrebuildDeleteResponse = unknown export interface PrebuildCancelResponse { /** @@ -780,7 +728,7 @@ export interface PrebuildCreateWarmPoolResponse { warmPool: WarmPool; } -export type PrebuildDeleteWarmPoolResponse = unknown; +export type PrebuildDeleteWarmPoolResponse = unknown export interface PrebuildRetrieveWarmPoolResponse { /** @@ -1062,6 +1010,6 @@ export declare namespace Prebuilds { type PrebuildDeleteWarmPoolParams as PrebuildDeleteWarmPoolParams, type PrebuildListWarmPoolsParams as PrebuildListWarmPoolsParams, type PrebuildRetrieveWarmPoolParams as PrebuildRetrieveWarmPoolParams, - type PrebuildUpdateWarmPoolParams as PrebuildUpdateWarmPoolParams, + type PrebuildUpdateWarmPoolParams as PrebuildUpdateWarmPoolParams }; } diff --git a/src/resources/projects/environment-clases.ts b/src/resources/projects/environment-clases.ts index 728168b8..976a3d99 100644 --- a/src/resources/projects/environment-clases.ts +++ b/src/resources/projects/environment-clases.ts @@ -4,11 +4,7 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import { ProjectEnvironmentClassesProjectEnvironmentClassesPage } from '../shared'; import { APIPromise } from '../../core/api-promise'; -import { - PagePromise, - ProjectEnvironmentClassesPage, - type ProjectEnvironmentClassesPageParams, -} from '../../core/pagination'; +import { PagePromise, ProjectEnvironmentClassesPage, type ProjectEnvironmentClassesPageParams } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class EnvironmentClases extends APIResource { @@ -51,10 +47,7 @@ export class EnvironmentClases extends APIResource { * ``` */ update(body: EnvironmentClaseUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.ProjectService/UpdateProjectEnvironmentClasses', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.ProjectService/UpdateProjectEnvironmentClasses', { body, ...options }); } /** @@ -89,20 +82,13 @@ export class EnvironmentClases extends APIResource { * } * ``` */ - list( - params: EnvironmentClaseListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.ProjectService/ListProjectEnvironmentClasses', - ProjectEnvironmentClassesPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: EnvironmentClaseListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.ProjectService/ListProjectEnvironmentClasses', ProjectEnvironmentClassesPage, { query: { token, pageSize }, body, method: 'post', ...options }); } } -export type EnvironmentClaseUpdateResponse = unknown; +export type EnvironmentClaseUpdateResponse = unknown export interface EnvironmentClaseUpdateParams { projectEnvironmentClasses?: Array; @@ -149,8 +135,8 @@ export declare namespace EnvironmentClases { export { type EnvironmentClaseUpdateResponse as EnvironmentClaseUpdateResponse, type EnvironmentClaseUpdateParams as EnvironmentClaseUpdateParams, - type EnvironmentClaseListParams as EnvironmentClaseListParams, + type EnvironmentClaseListParams as EnvironmentClaseListParams }; } -export { type ProjectEnvironmentClassesProjectEnvironmentClassesPage }; +export { type ProjectEnvironmentClassesProjectEnvironmentClassesPage } diff --git a/src/resources/projects/index.ts b/src/resources/projects/index.ts index e26d15ed..275a0b54 100644 --- a/src/resources/projects/index.ts +++ b/src/resources/projects/index.ts @@ -1,48 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - EnvironmentClases, - type EnvironmentClaseUpdateResponse, - type EnvironmentClaseUpdateParams, - type EnvironmentClaseListParams, -} from './environment-clases'; -export { - Policies, - type ProjectPolicy, - type ProjectRole, - type PolicyCreateResponse, - type PolicyUpdateResponse, - type PolicyDeleteResponse, - type PolicyCreateParams, - type PolicyUpdateParams, - type PolicyListParams, - type PolicyDeleteParams, - type ProjectPoliciesPoliciesPage, -} from './policies'; -export { - Projects, - type EnvironmentInitializer, - type Project, - type ProjectMetadata, - type ProjectPhase, - type ProjectPrebuildConfiguration, - type RecommendedEditors, - type ProjectCreateResponse, - type ProjectRetrieveResponse, - type ProjectUpdateResponse, - type ProjectDeleteResponse, - type ProjectBulkCreateResponse, - type ProjectBulkDeleteResponse, - type ProjectBulkUpdateResponse, - type ProjectCreateFromEnvironmentResponse, - type ProjectCreateParams, - type ProjectRetrieveParams, - type ProjectUpdateParams, - type ProjectListParams, - type ProjectDeleteParams, - type ProjectBulkCreateParams, - type ProjectBulkDeleteParams, - type ProjectBulkUpdateParams, - type ProjectCreateFromEnvironmentParams, - type ProjectsProjectsPage, -} from './projects'; +export { EnvironmentClases, type EnvironmentClaseUpdateResponse, type EnvironmentClaseUpdateParams, type EnvironmentClaseListParams } from './environment-clases';; +export { Policies, type ProjectPolicy, type ProjectRole, type PolicyCreateResponse, type PolicyUpdateResponse, type PolicyDeleteResponse, type PolicyCreateParams, type PolicyUpdateParams, type PolicyListParams, type PolicyDeleteParams, type ProjectPoliciesPoliciesPage } from './policies';; +export { Projects, type EnvironmentInitializer, type Project, type ProjectMetadata, type ProjectPhase, type ProjectPrebuildConfiguration, type RecommendedEditors, type ProjectCreateResponse, type ProjectRetrieveResponse, type ProjectUpdateResponse, type ProjectDeleteResponse, type ProjectBulkCreateResponse, type ProjectBulkDeleteResponse, type ProjectBulkUpdateResponse, type ProjectCreateFromEnvironmentResponse, type ProjectCreateParams, type ProjectRetrieveParams, type ProjectUpdateParams, type ProjectListParams, type ProjectDeleteParams, type ProjectBulkCreateParams, type ProjectBulkDeleteParams, type ProjectBulkUpdateParams, type ProjectCreateFromEnvironmentParams, type ProjectsProjectsPage } from './projects';; diff --git a/src/resources/projects/policies.ts b/src/resources/projects/policies.ts index 3676967d..3fef7471 100644 --- a/src/resources/projects/policies.ts +++ b/src/resources/projects/policies.ts @@ -108,16 +108,9 @@ export class Policies extends APIResource { * } * ``` */ - list( - params: PolicyListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.ProjectService/ListProjectPolicies', - PoliciesPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: PolicyListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.ProjectService/ListProjectPolicies', PoliciesPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -153,7 +146,7 @@ export class Policies extends APIResource { } } -export type ProjectPoliciesPoliciesPage = PoliciesPage; +export type ProjectPoliciesPoliciesPage = PoliciesPage export interface ProjectPolicy { groupId?: string; @@ -164,11 +157,7 @@ export interface ProjectPolicy { role?: ProjectRole; } -export type ProjectRole = - | 'PROJECT_ROLE_UNSPECIFIED' - | 'PROJECT_ROLE_ADMIN' - | 'PROJECT_ROLE_USER' - | 'PROJECT_ROLE_EDITOR'; +export type ProjectRole = 'PROJECT_ROLE_UNSPECIFIED' | 'PROJECT_ROLE_ADMIN' | 'PROJECT_ROLE_USER' | 'PROJECT_ROLE_EDITOR' export interface PolicyCreateResponse { policy?: ProjectPolicy; @@ -178,7 +167,7 @@ export interface PolicyUpdateResponse { policy?: ProjectPolicy; } -export type PolicyDeleteResponse = unknown; +export type PolicyDeleteResponse = unknown export interface PolicyCreateParams { /** @@ -263,6 +252,6 @@ export declare namespace Policies { type PolicyCreateParams as PolicyCreateParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyListParams as PolicyListParams, - type PolicyDeleteParams as PolicyDeleteParams, + type PolicyDeleteParams as PolicyDeleteParams }; } diff --git a/src/resources/projects/projects.ts b/src/resources/projects/projects.ts index e0c90c51..9845f84b 100644 --- a/src/resources/projects/projects.ts +++ b/src/resources/projects/projects.ts @@ -4,35 +4,16 @@ import { APIResource } from '../../core/resource'; import * as ProjectsAPI from './projects'; import * as Shared from '../shared'; import * as EnvironmentClasesAPI from './environment-clases'; -import { - EnvironmentClaseListParams, - EnvironmentClaseUpdateParams, - EnvironmentClaseUpdateResponse, - EnvironmentClases, -} from './environment-clases'; +import { EnvironmentClaseListParams, EnvironmentClaseUpdateParams, EnvironmentClaseUpdateResponse, EnvironmentClases } from './environment-clases'; import * as PoliciesAPI from './policies'; -import { - Policies, - PolicyCreateParams, - PolicyCreateResponse, - PolicyDeleteParams, - PolicyDeleteResponse, - PolicyListParams, - PolicyUpdateParams, - PolicyUpdateResponse, - ProjectPoliciesPoliciesPage, - ProjectPolicy, - ProjectRole, -} from './policies'; +import { Policies, PolicyCreateParams, PolicyCreateResponse, PolicyDeleteParams, PolicyDeleteResponse, PolicyListParams, PolicyUpdateParams, PolicyUpdateResponse, ProjectPoliciesPoliciesPage, ProjectPolicy, ProjectRole } from './policies'; import * as RunnersAPI from '../runners/runners'; import { APIPromise } from '../../core/api-promise'; import { PagePromise, ProjectsPage, type ProjectsPageParams } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Projects extends APIResource { - environmentClases: EnvironmentClasesAPI.EnvironmentClases = new EnvironmentClasesAPI.EnvironmentClases( - this._client, - ); + environmentClases: EnvironmentClasesAPI.EnvironmentClases = new EnvironmentClasesAPI.EnvironmentClases(this._client); policies: PoliciesAPI.Policies = new PoliciesAPI.Policies(this._client); /** @@ -207,13 +188,8 @@ export class Projects extends APIResource { * ``` */ list(params: ProjectListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.ProjectService/ListProjects', ProjectsPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.ProjectService/ListProjects', ProjectsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -424,15 +400,12 @@ export class Projects extends APIResource { * }); * ``` */ - createFromEnvironment( - body: ProjectCreateFromEnvironmentParams, - options?: RequestOptions, - ): APIPromise { + createFromEnvironment(body: ProjectCreateFromEnvironmentParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.ProjectService/CreateProjectFromEnvironment', { body, ...options }); } } -export type ProjectsProjectsPage = ProjectsPage; +export type ProjectsProjectsPage = ProjectsPage /** * EnvironmentInitializer specifies how an environment is to be initialized @@ -475,13 +448,7 @@ export namespace EnvironmentInitializer { /** * the target mode determines what gets checked out */ - targetMode?: - | 'CLONE_TARGET_MODE_UNSPECIFIED' - | 'CLONE_TARGET_MODE_REMOTE_HEAD' - | 'CLONE_TARGET_MODE_REMOTE_COMMIT' - | 'CLONE_TARGET_MODE_REMOTE_BRANCH' - | 'CLONE_TARGET_MODE_LOCAL_BRANCH' - | 'CLONE_TARGET_MODE_REMOTE_TAG'; + targetMode?: 'CLONE_TARGET_MODE_UNSPECIFIED' | 'CLONE_TARGET_MODE_REMOTE_HEAD' | 'CLONE_TARGET_MODE_REMOTE_COMMIT' | 'CLONE_TARGET_MODE_REMOTE_BRANCH' | 'CLONE_TARGET_MODE_LOCAL_BRANCH' | 'CLONE_TARGET_MODE_REMOTE_TAG'; /** * upstream_Remote_uri is the fork upstream of a repository @@ -767,7 +734,7 @@ export interface ProjectMetadata { updatedAt?: string; } -export type ProjectPhase = 'PROJECT_PHASE_UNSPECIFIED' | 'PROJECT_PHASE_ACTIVE' | 'PROJECT_PHASE_DELETED'; +export type ProjectPhase = 'PROJECT_PHASE_UNSPECIFIED' | 'PROJECT_PHASE_ACTIVE' | 'PROJECT_PHASE_DELETED' /** * ProjectPrebuildConfiguration defines how prebuilds are created for a project. @@ -878,7 +845,7 @@ export interface ProjectUpdateResponse { project?: Project; } -export type ProjectDeleteResponse = unknown; +export type ProjectDeleteResponse = unknown export interface ProjectBulkCreateResponse { /** @@ -1303,14 +1270,14 @@ export declare namespace Projects { type ProjectBulkCreateParams as ProjectBulkCreateParams, type ProjectBulkDeleteParams as ProjectBulkDeleteParams, type ProjectBulkUpdateParams as ProjectBulkUpdateParams, - type ProjectCreateFromEnvironmentParams as ProjectCreateFromEnvironmentParams, + type ProjectCreateFromEnvironmentParams as ProjectCreateFromEnvironmentParams }; export { EnvironmentClases as EnvironmentClases, type EnvironmentClaseUpdateResponse as EnvironmentClaseUpdateResponse, type EnvironmentClaseUpdateParams as EnvironmentClaseUpdateParams, - type EnvironmentClaseListParams as EnvironmentClaseListParams, + type EnvironmentClaseListParams as EnvironmentClaseListParams }; export { @@ -1324,6 +1291,6 @@ export declare namespace Projects { type PolicyCreateParams as PolicyCreateParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyListParams as PolicyListParams, - type PolicyDeleteParams as PolicyDeleteParams, + type PolicyDeleteParams as PolicyDeleteParams }; } diff --git a/src/resources/runners/configurations/configurations.ts b/src/resources/runners/configurations/configurations.ts index 4db5ee0c..dae35e81 100644 --- a/src/resources/runners/configurations/configurations.ts +++ b/src/resources/runners/configurations/configurations.ts @@ -3,59 +3,19 @@ import { APIResource } from '../../../core/resource'; import * as Shared from '../../shared'; import * as EnvironmentClassesAPI from './environment-classes'; -import { - EnvironmentClassCreateParams, - EnvironmentClassCreateResponse, - EnvironmentClassListParams, - EnvironmentClassRetrieveParams, - EnvironmentClassRetrieveResponse, - EnvironmentClassUpdateParams, - EnvironmentClassUpdateResponse, - EnvironmentClasses, -} from './environment-classes'; +import { EnvironmentClassCreateParams, EnvironmentClassCreateResponse, EnvironmentClassListParams, EnvironmentClassRetrieveParams, EnvironmentClassRetrieveResponse, EnvironmentClassUpdateParams, EnvironmentClassUpdateResponse, EnvironmentClasses } from './environment-classes'; import * as HostAuthenticationTokensAPI from './host-authentication-tokens'; -import { - HostAuthenticationToken, - HostAuthenticationTokenCreateParams, - HostAuthenticationTokenCreateResponse, - HostAuthenticationTokenDeleteParams, - HostAuthenticationTokenDeleteResponse, - HostAuthenticationTokenListParams, - HostAuthenticationTokenRetrieveParams, - HostAuthenticationTokenRetrieveResponse, - HostAuthenticationTokenSource, - HostAuthenticationTokenUpdateParams, - HostAuthenticationTokenUpdateResponse, - HostAuthenticationTokens, - HostAuthenticationTokensTokensPage, -} from './host-authentication-tokens'; +import { HostAuthenticationToken, HostAuthenticationTokenCreateParams, HostAuthenticationTokenCreateResponse, HostAuthenticationTokenDeleteParams, HostAuthenticationTokenDeleteResponse, HostAuthenticationTokenListParams, HostAuthenticationTokenRetrieveParams, HostAuthenticationTokenRetrieveResponse, HostAuthenticationTokenSource, HostAuthenticationTokenUpdateParams, HostAuthenticationTokenUpdateResponse, HostAuthenticationTokens, HostAuthenticationTokensTokensPage } from './host-authentication-tokens'; import * as SchemaAPI from './schema'; import { RunnerConfigurationSchema, Schema, SchemaRetrieveParams, SchemaRetrieveResponse } from './schema'; import * as ScmIntegrationsAPI from './scm-integrations'; -import { - ScmIntegration as ScmIntegrationsAPIScmIntegration, - ScmIntegrationCreateParams, - ScmIntegrationCreateResponse, - ScmIntegrationDeleteParams, - ScmIntegrationDeleteResponse, - ScmIntegrationListParams, - ScmIntegrationOAuthConfig, - ScmIntegrationRetrieveParams, - ScmIntegrationRetrieveResponse, - ScmIntegrationUpdateParams, - ScmIntegrationUpdateResponse, - ScmIntegrations, - ScmIntegrationsIntegrationsPage, -} from './scm-integrations'; +import { ScmIntegration as ScmIntegrationsAPIScmIntegration, ScmIntegrationCreateParams, ScmIntegrationCreateResponse, ScmIntegrationDeleteParams, ScmIntegrationDeleteResponse, ScmIntegrationListParams, ScmIntegrationOAuthConfig, ScmIntegrationRetrieveParams, ScmIntegrationRetrieveResponse, ScmIntegrationUpdateParams, ScmIntegrationUpdateResponse, ScmIntegrations, ScmIntegrationsIntegrationsPage } from './scm-integrations'; import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; export class Configurations extends APIResource { - environmentClasses: EnvironmentClassesAPI.EnvironmentClasses = new EnvironmentClassesAPI.EnvironmentClasses( - this._client, - ); - hostAuthenticationTokens: HostAuthenticationTokensAPI.HostAuthenticationTokens = - new HostAuthenticationTokensAPI.HostAuthenticationTokens(this._client); + environmentClasses: EnvironmentClassesAPI.EnvironmentClasses = new EnvironmentClassesAPI.EnvironmentClasses(this._client); + hostAuthenticationTokens: HostAuthenticationTokensAPI.HostAuthenticationTokens = new HostAuthenticationTokensAPI.HostAuthenticationTokens(this._client); schema: SchemaAPI.Schema = new SchemaAPI.Schema(this._client); scmIntegrations: ScmIntegrationsAPI.ScmIntegrations = new ScmIntegrationsAPI.ScmIntegrations(this._client); @@ -99,14 +59,8 @@ export class Configurations extends APIResource { * }); * ``` */ - validate( - body: ConfigurationValidateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/ValidateRunnerConfiguration', { - body, - ...options, - }); + validate(body: ConfigurationValidateParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/ValidateRunnerConfiguration', { body, ...options }); } } @@ -217,7 +171,7 @@ export declare namespace Configurations { type FieldValidationError as FieldValidationError, type ScmIntegrationValidationResult as ScmIntegrationValidationResult, type ConfigurationValidateResponse as ConfigurationValidateResponse, - type ConfigurationValidateParams as ConfigurationValidateParams, + type ConfigurationValidateParams as ConfigurationValidateParams }; export { @@ -228,7 +182,7 @@ export declare namespace Configurations { type EnvironmentClassCreateParams as EnvironmentClassCreateParams, type EnvironmentClassRetrieveParams as EnvironmentClassRetrieveParams, type EnvironmentClassUpdateParams as EnvironmentClassUpdateParams, - type EnvironmentClassListParams as EnvironmentClassListParams, + type EnvironmentClassListParams as EnvironmentClassListParams }; export { @@ -244,14 +198,14 @@ export declare namespace Configurations { type HostAuthenticationTokenRetrieveParams as HostAuthenticationTokenRetrieveParams, type HostAuthenticationTokenUpdateParams as HostAuthenticationTokenUpdateParams, type HostAuthenticationTokenListParams as HostAuthenticationTokenListParams, - type HostAuthenticationTokenDeleteParams as HostAuthenticationTokenDeleteParams, + type HostAuthenticationTokenDeleteParams as HostAuthenticationTokenDeleteParams }; export { Schema as Schema, type RunnerConfigurationSchema as RunnerConfigurationSchema, type SchemaRetrieveResponse as SchemaRetrieveResponse, - type SchemaRetrieveParams as SchemaRetrieveParams, + type SchemaRetrieveParams as SchemaRetrieveParams }; export { @@ -267,6 +221,6 @@ export declare namespace Configurations { type ScmIntegrationRetrieveParams as ScmIntegrationRetrieveParams, type ScmIntegrationUpdateParams as ScmIntegrationUpdateParams, type ScmIntegrationListParams as ScmIntegrationListParams, - type ScmIntegrationDeleteParams as ScmIntegrationDeleteParams, + type ScmIntegrationDeleteParams as ScmIntegrationDeleteParams }; } diff --git a/src/resources/runners/configurations/environment-classes.ts b/src/resources/runners/configurations/environment-classes.ts index 2de936a3..4983bb85 100644 --- a/src/resources/runners/configurations/environment-classes.ts +++ b/src/resources/runners/configurations/environment-classes.ts @@ -5,11 +5,7 @@ import * as Shared from '../../shared'; import { EnvironmentClassesEnvironmentClassesPage } from '../../shared'; import * as RunnersAPI from '../runners'; import { APIPromise } from '../../../core/api-promise'; -import { - EnvironmentClassesPage, - type EnvironmentClassesPageParams, - PagePromise, -} from '../../../core/pagination'; +import { EnvironmentClassesPage, type EnvironmentClassesPageParams, PagePromise } from '../../../core/pagination'; import { RequestOptions } from '../../../internal/request-options'; export class EnvironmentClasses extends APIResource { @@ -55,14 +51,8 @@ export class EnvironmentClasses extends APIResource { * ); * ``` */ - create( - body: EnvironmentClassCreateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateEnvironmentClass', { - body, - ...options, - }); + create(body: EnvironmentClassCreateParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateEnvironmentClass', { body, ...options }); } /** @@ -95,14 +85,8 @@ export class EnvironmentClasses extends APIResource { * ); * ``` */ - retrieve( - body: EnvironmentClassRetrieveParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/GetEnvironmentClass', { - body, - ...options, - }); + retrieve(body: EnvironmentClassRetrieveParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/GetEnvironmentClass', { body, ...options }); } /** @@ -142,10 +126,7 @@ export class EnvironmentClasses extends APIResource { * ``` */ update(body: EnvironmentClassUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateEnvironmentClass', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateEnvironmentClass', { body, ...options }); } /** @@ -194,16 +175,9 @@ export class EnvironmentClasses extends APIResource { * } * ``` */ - list( - params: EnvironmentClassListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.RunnerConfigurationService/ListEnvironmentClasses', - EnvironmentClassesPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: EnvironmentClassListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.RunnerConfigurationService/ListEnvironmentClasses', EnvironmentClassesPage, { query: { token, pageSize }, body, method: 'post', ...options }); } } @@ -215,7 +189,7 @@ export interface EnvironmentClassRetrieveResponse { environmentClass?: Shared.EnvironmentClass; } -export type EnvironmentClassUpdateResponse = unknown; +export type EnvironmentClassUpdateResponse = unknown export interface EnvironmentClassCreateParams { configuration?: Array; @@ -314,8 +288,8 @@ export declare namespace EnvironmentClasses { type EnvironmentClassCreateParams as EnvironmentClassCreateParams, type EnvironmentClassRetrieveParams as EnvironmentClassRetrieveParams, type EnvironmentClassUpdateParams as EnvironmentClassUpdateParams, - type EnvironmentClassListParams as EnvironmentClassListParams, + type EnvironmentClassListParams as EnvironmentClassListParams }; } -export { type EnvironmentClassesEnvironmentClassesPage }; +export { type EnvironmentClassesEnvironmentClassesPage } diff --git a/src/resources/runners/configurations/host-authentication-tokens.ts b/src/resources/runners/configurations/host-authentication-tokens.ts index 3d4715f5..3524251c 100644 --- a/src/resources/runners/configurations/host-authentication-tokens.ts +++ b/src/resources/runners/configurations/host-authentication-tokens.ts @@ -48,14 +48,8 @@ export class HostAuthenticationTokens extends APIResource { * ); * ``` */ - create( - body: HostAuthenticationTokenCreateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateHostAuthenticationToken', { - body, - ...options, - }); + create(body: HostAuthenticationTokenCreateParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateHostAuthenticationToken', { body, ...options }); } /** @@ -85,14 +79,8 @@ export class HostAuthenticationTokens extends APIResource { * ); * ``` */ - retrieve( - body: HostAuthenticationTokenRetrieveParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/GetHostAuthenticationToken', { - body, - ...options, - }); + retrieve(body: HostAuthenticationTokenRetrieveParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/GetHostAuthenticationToken', { body, ...options }); } /** @@ -131,10 +119,7 @@ export class HostAuthenticationTokens extends APIResource { * ``` */ update(body: HostAuthenticationTokenUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateHostAuthenticationToken', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateHostAuthenticationToken', { body, ...options }); } /** @@ -183,16 +168,9 @@ export class HostAuthenticationTokens extends APIResource { * } * ``` */ - list( - params: HostAuthenticationTokenListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.RunnerConfigurationService/ListHostAuthenticationTokens', - TokensPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: HostAuthenticationTokenListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.RunnerConfigurationService/ListHostAuthenticationTokens', TokensPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -223,14 +201,11 @@ export class HostAuthenticationTokens extends APIResource { * ``` */ delete(body: HostAuthenticationTokenDeleteParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/DeleteHostAuthenticationToken', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/DeleteHostAuthenticationToken', { body, ...options }); } } -export type HostAuthenticationTokensTokensPage = TokensPage; +export type HostAuthenticationTokensTokensPage = TokensPage export interface HostAuthenticationToken { id: string; @@ -360,10 +335,7 @@ export interface HostAuthenticationToken { userId?: string; } -export type HostAuthenticationTokenSource = - | 'HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED' - | 'HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH' - | 'HOST_AUTHENTICATION_TOKEN_SOURCE_PAT'; +export type HostAuthenticationTokenSource = 'HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED' | 'HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH' | 'HOST_AUTHENTICATION_TOKEN_SOURCE_PAT' export interface HostAuthenticationTokenCreateResponse { token: HostAuthenticationToken; @@ -373,9 +345,9 @@ export interface HostAuthenticationTokenRetrieveResponse { token: HostAuthenticationToken; } -export type HostAuthenticationTokenUpdateResponse = unknown; +export type HostAuthenticationTokenUpdateResponse = unknown -export type HostAuthenticationTokenDeleteResponse = unknown; +export type HostAuthenticationTokenDeleteResponse = unknown export interface HostAuthenticationTokenCreateParams { /** @@ -669,6 +641,6 @@ export declare namespace HostAuthenticationTokens { type HostAuthenticationTokenRetrieveParams as HostAuthenticationTokenRetrieveParams, type HostAuthenticationTokenUpdateParams as HostAuthenticationTokenUpdateParams, type HostAuthenticationTokenListParams as HostAuthenticationTokenListParams, - type HostAuthenticationTokenDeleteParams as HostAuthenticationTokenDeleteParams, + type HostAuthenticationTokenDeleteParams as HostAuthenticationTokenDeleteParams }; } diff --git a/src/resources/runners/configurations/index.ts b/src/resources/runners/configurations/index.ts index 4a0a2137..64e31d2f 100644 --- a/src/resources/runners/configurations/index.ts +++ b/src/resources/runners/configurations/index.ts @@ -1,56 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Configurations, - type EnvironmentClassValidationResult, - type FieldValidationError, - type ScmIntegrationValidationResult, - type ConfigurationValidateResponse, - type ConfigurationValidateParams, -} from './configurations'; -export { - EnvironmentClasses, - type EnvironmentClassCreateResponse, - type EnvironmentClassRetrieveResponse, - type EnvironmentClassUpdateResponse, - type EnvironmentClassCreateParams, - type EnvironmentClassRetrieveParams, - type EnvironmentClassUpdateParams, - type EnvironmentClassListParams, -} from './environment-classes'; -export { - HostAuthenticationTokens, - type HostAuthenticationToken, - type HostAuthenticationTokenSource, - type HostAuthenticationTokenCreateResponse, - type HostAuthenticationTokenRetrieveResponse, - type HostAuthenticationTokenUpdateResponse, - type HostAuthenticationTokenDeleteResponse, - type HostAuthenticationTokenCreateParams, - type HostAuthenticationTokenRetrieveParams, - type HostAuthenticationTokenUpdateParams, - type HostAuthenticationTokenListParams, - type HostAuthenticationTokenDeleteParams, - type HostAuthenticationTokensTokensPage, -} from './host-authentication-tokens'; -export { - Schema, - type RunnerConfigurationSchema, - type SchemaRetrieveResponse, - type SchemaRetrieveParams, -} from './schema'; -export { - ScmIntegrations, - type ScmIntegration, - type ScmIntegrationOAuthConfig, - type ScmIntegrationCreateResponse, - type ScmIntegrationRetrieveResponse, - type ScmIntegrationUpdateResponse, - type ScmIntegrationDeleteResponse, - type ScmIntegrationCreateParams, - type ScmIntegrationRetrieveParams, - type ScmIntegrationUpdateParams, - type ScmIntegrationListParams, - type ScmIntegrationDeleteParams, - type ScmIntegrationsIntegrationsPage, -} from './scm-integrations'; +export { Configurations, type EnvironmentClassValidationResult, type FieldValidationError, type ScmIntegrationValidationResult, type ConfigurationValidateResponse, type ConfigurationValidateParams } from './configurations';; +export { EnvironmentClasses, type EnvironmentClassCreateResponse, type EnvironmentClassRetrieveResponse, type EnvironmentClassUpdateResponse, type EnvironmentClassCreateParams, type EnvironmentClassRetrieveParams, type EnvironmentClassUpdateParams, type EnvironmentClassListParams } from './environment-classes';; +export { HostAuthenticationTokens, type HostAuthenticationToken, type HostAuthenticationTokenSource, type HostAuthenticationTokenCreateResponse, type HostAuthenticationTokenRetrieveResponse, type HostAuthenticationTokenUpdateResponse, type HostAuthenticationTokenDeleteResponse, type HostAuthenticationTokenCreateParams, type HostAuthenticationTokenRetrieveParams, type HostAuthenticationTokenUpdateParams, type HostAuthenticationTokenListParams, type HostAuthenticationTokenDeleteParams, type HostAuthenticationTokensTokensPage } from './host-authentication-tokens';; +export { Schema, type RunnerConfigurationSchema, type SchemaRetrieveResponse, type SchemaRetrieveParams } from './schema';; +export { ScmIntegrations, type ScmIntegration, type ScmIntegrationOAuthConfig, type ScmIntegrationCreateResponse, type ScmIntegrationRetrieveResponse, type ScmIntegrationUpdateResponse, type ScmIntegrationDeleteResponse, type ScmIntegrationCreateParams, type ScmIntegrationRetrieveParams, type ScmIntegrationUpdateParams, type ScmIntegrationListParams, type ScmIntegrationDeleteParams, type ScmIntegrationsIntegrationsPage } from './scm-integrations';; diff --git a/src/resources/runners/configurations/schema.ts b/src/resources/runners/configurations/schema.ts index fd110fe5..71e15e67 100644 --- a/src/resources/runners/configurations/schema.ts +++ b/src/resources/runners/configurations/schema.ts @@ -33,10 +33,7 @@ export class Schema extends APIResource { * ``` */ retrieve(body: SchemaRetrieveParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/GetRunnerConfigurationSchema', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/GetRunnerConfigurationSchema', { body, ...options }); } } @@ -262,6 +259,6 @@ export declare namespace Schema { export { type RunnerConfigurationSchema as RunnerConfigurationSchema, type SchemaRetrieveResponse as SchemaRetrieveResponse, - type SchemaRetrieveParams as SchemaRetrieveParams, + type SchemaRetrieveParams as SchemaRetrieveParams }; } diff --git a/src/resources/runners/configurations/scm-integrations.ts b/src/resources/runners/configurations/scm-integrations.ts index 28daf0a7..eebb9d4a 100644 --- a/src/resources/runners/configurations/scm-integrations.ts +++ b/src/resources/runners/configurations/scm-integrations.ts @@ -43,14 +43,8 @@ export class ScmIntegrations extends APIResource { * ); * ``` */ - create( - body: ScmIntegrationCreateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateSCMIntegration', { - body, - ...options, - }); + create(body: ScmIntegrationCreateParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateSCMIntegration', { body, ...options }); } /** @@ -80,10 +74,7 @@ export class ScmIntegrations extends APIResource { * ); * ``` */ - retrieve( - body: ScmIntegrationRetrieveParams, - options?: RequestOptions, - ): APIPromise { + retrieve(body: ScmIntegrationRetrieveParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.RunnerConfigurationService/GetSCMIntegration', { body, ...options }); } @@ -121,10 +112,7 @@ export class ScmIntegrations extends APIResource { * ``` */ update(body: ScmIntegrationUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateSCMIntegration', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateSCMIntegration', { body, ...options }); } /** @@ -164,16 +152,9 @@ export class ScmIntegrations extends APIResource { * } * ``` */ - list( - params: ScmIntegrationListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.RunnerConfigurationService/ListSCMIntegrations', - IntegrationsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: ScmIntegrationListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.RunnerConfigurationService/ListSCMIntegrations', IntegrationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -204,14 +185,11 @@ export class ScmIntegrations extends APIResource { * ``` */ delete(body: ScmIntegrationDeleteParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/DeleteSCMIntegration', { - body, - ...options, - }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/DeleteSCMIntegration', { body, ...options }); } } -export type ScmIntegrationsIntegrationsPage = IntegrationsPage; +export type ScmIntegrationsIntegrationsPage = IntegrationsPage export interface ScmIntegration { /** @@ -274,9 +252,9 @@ export interface ScmIntegrationRetrieveResponse { integration?: ScmIntegration; } -export type ScmIntegrationUpdateResponse = unknown; +export type ScmIntegrationUpdateResponse = unknown -export type ScmIntegrationDeleteResponse = unknown; +export type ScmIntegrationDeleteResponse = unknown export interface ScmIntegrationCreateParams { host?: string; @@ -422,6 +400,6 @@ export declare namespace ScmIntegrations { type ScmIntegrationRetrieveParams as ScmIntegrationRetrieveParams, type ScmIntegrationUpdateParams as ScmIntegrationUpdateParams, type ScmIntegrationListParams as ScmIntegrationListParams, - type ScmIntegrationDeleteParams as ScmIntegrationDeleteParams, + type ScmIntegrationDeleteParams as ScmIntegrationDeleteParams }; } diff --git a/src/resources/runners/index.ts b/src/resources/runners/index.ts index b11c33ee..72c36eae 100644 --- a/src/resources/runners/index.ts +++ b/src/resources/runners/index.ts @@ -1,66 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Configurations, - type EnvironmentClassValidationResult, - type FieldValidationError, - type ScmIntegrationValidationResult, - type ConfigurationValidateResponse, - type ConfigurationValidateParams, -} from './configurations/index'; -export { - Policies, - type RunnerPolicy, - type RunnerRole, - type PolicyCreateResponse, - type PolicyUpdateResponse, - type PolicyDeleteResponse, - type PolicyCreateParams, - type PolicyUpdateParams, - type PolicyListParams, - type PolicyDeleteParams, - type RunnerPoliciesPoliciesPage, -} from './policies'; -export { - Runners, - type GatewayInfo, - type LogLevel, - type MetricsConfiguration, - type Runner, - type RunnerCapability, - type RunnerConfiguration, - type RunnerKind, - type RunnerPhase, - type RunnerProvider, - type RunnerReleaseChannel, - type RunnerSpec, - type RunnerStatus, - type RunnerVariant, - type SearchMode, - type UpdateWindow, - type RunnerCreateResponse, - type RunnerRetrieveResponse, - type RunnerUpdateResponse, - type RunnerDeleteResponse, - type RunnerCheckAuthenticationForHostResponse, - type RunnerCheckRepositoryAccessResponse, - type RunnerCreateLogsTokenResponse, - type RunnerCreateRunnerTokenResponse, - type RunnerListScmOrganizationsResponse, - type RunnerParseContextURLResponse, - type RunnerSearchRepositoriesResponse, - type RunnerCreateParams, - type RunnerRetrieveParams, - type RunnerUpdateParams, - type RunnerListParams, - type RunnerDeleteParams, - type RunnerCheckAuthenticationForHostParams, - type RunnerCheckRepositoryAccessParams, - type RunnerCreateLogsTokenParams, - type RunnerCreateRunnerTokenParams, - type RunnerListScmOrganizationsParams, - type RunnerParseContextURLParams, - type RunnerSearchRepositoriesParams, - type RunnersRunnersPage, - type RunnerListScmOrganizationsResponsesOrganizationsPage, -} from './runners'; +export { Configurations, type EnvironmentClassValidationResult, type FieldValidationError, type ScmIntegrationValidationResult, type ConfigurationValidateResponse, type ConfigurationValidateParams } from './configurations/index';; +export { Policies, type RunnerPolicy, type RunnerRole, type PolicyCreateResponse, type PolicyUpdateResponse, type PolicyDeleteResponse, type PolicyCreateParams, type PolicyUpdateParams, type PolicyListParams, type PolicyDeleteParams, type RunnerPoliciesPoliciesPage } from './policies';; +export { Runners, type GatewayInfo, type LogLevel, type MetricsConfiguration, type Runner, type RunnerCapability, type RunnerConfiguration, type RunnerKind, type RunnerPhase, type RunnerProvider, type RunnerReleaseChannel, type RunnerSpec, type RunnerStatus, type RunnerVariant, type SearchMode, type UpdateWindow, type RunnerCreateResponse, type RunnerRetrieveResponse, type RunnerUpdateResponse, type RunnerDeleteResponse, type RunnerCheckAuthenticationForHostResponse, type RunnerCheckRepositoryAccessResponse, type RunnerCreateLogsTokenResponse, type RunnerCreateRunnerTokenResponse, type RunnerListScmOrganizationsResponse, type RunnerParseContextURLResponse, type RunnerSearchRepositoriesResponse, type RunnerCreateParams, type RunnerRetrieveParams, type RunnerUpdateParams, type RunnerListParams, type RunnerDeleteParams, type RunnerCheckAuthenticationForHostParams, type RunnerCheckRepositoryAccessParams, type RunnerCreateLogsTokenParams, type RunnerCreateRunnerTokenParams, type RunnerListScmOrganizationsParams, type RunnerParseContextURLParams, type RunnerSearchRepositoriesParams, type RunnersRunnersPage, type RunnerListScmOrganizationsResponsesOrganizationsPage } from './runners';; diff --git a/src/resources/runners/policies.ts b/src/resources/runners/policies.ts index a49bcf50..8bfc6a09 100644 --- a/src/resources/runners/policies.ts +++ b/src/resources/runners/policies.ts @@ -108,16 +108,9 @@ export class Policies extends APIResource { * } * ``` */ - list( - params: PolicyListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.RunnerService/ListRunnerPolicies', - PoliciesPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: PolicyListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.RunnerService/ListRunnerPolicies', PoliciesPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -153,7 +146,7 @@ export class Policies extends APIResource { } } -export type RunnerPoliciesPoliciesPage = PoliciesPage; +export type RunnerPoliciesPoliciesPage = PoliciesPage export interface RunnerPolicy { groupId?: string; @@ -164,7 +157,7 @@ export interface RunnerPolicy { role?: RunnerRole; } -export type RunnerRole = 'RUNNER_ROLE_UNSPECIFIED' | 'RUNNER_ROLE_ADMIN' | 'RUNNER_ROLE_USER'; +export type RunnerRole = 'RUNNER_ROLE_UNSPECIFIED' | 'RUNNER_ROLE_ADMIN' | 'RUNNER_ROLE_USER' export interface PolicyCreateResponse { policy: RunnerPolicy; @@ -174,7 +167,7 @@ export interface PolicyUpdateResponse { policy: RunnerPolicy; } -export type PolicyDeleteResponse = unknown; +export type PolicyDeleteResponse = unknown export interface PolicyCreateParams { /** @@ -259,6 +252,6 @@ export declare namespace Policies { type PolicyCreateParams as PolicyCreateParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyListParams as PolicyListParams, - type PolicyDeleteParams as PolicyDeleteParams, + type PolicyDeleteParams as PolicyDeleteParams }; } diff --git a/src/resources/runners/runners.ts b/src/resources/runners/runners.ts index 9887aec3..9b644883 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -4,36 +4,11 @@ import { APIResource } from '../../core/resource'; import * as RunnersAPI from './runners'; import * as Shared from '../shared'; import * as PoliciesAPI from './policies'; -import { - Policies, - PolicyCreateParams, - PolicyCreateResponse, - PolicyDeleteParams, - PolicyDeleteResponse, - PolicyListParams, - PolicyUpdateParams, - PolicyUpdateResponse, - RunnerPoliciesPoliciesPage, - RunnerPolicy, - RunnerRole, -} from './policies'; +import { Policies, PolicyCreateParams, PolicyCreateResponse, PolicyDeleteParams, PolicyDeleteResponse, PolicyListParams, PolicyUpdateParams, PolicyUpdateResponse, RunnerPoliciesPoliciesPage, RunnerPolicy, RunnerRole } from './policies'; import * as ConfigurationsAPI from './configurations/configurations'; -import { - ConfigurationValidateParams, - ConfigurationValidateResponse, - Configurations, - EnvironmentClassValidationResult, - FieldValidationError, - ScmIntegrationValidationResult, -} from './configurations/configurations'; +import { ConfigurationValidateParams, ConfigurationValidateResponse, Configurations, EnvironmentClassValidationResult, FieldValidationError, ScmIntegrationValidationResult } from './configurations/configurations'; import { APIPromise } from '../../core/api-promise'; -import { - OrganizationsPage, - type OrganizationsPageParams, - PagePromise, - RunnersPage, - type RunnersPageParams, -} from '../../core/pagination'; +import { OrganizationsPage, type OrganizationsPageParams, PagePromise, RunnersPage, type RunnersPageParams } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Runners extends APIResource { @@ -220,13 +195,8 @@ export class Runners extends APIResource { * ``` */ list(params: RunnerListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.RunnerService/ListRunners', RunnersPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.RunnerService/ListRunners', RunnersPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -286,10 +256,7 @@ export class Runners extends APIResource { * }); * ``` */ - checkAuthenticationForHost( - body: RunnerCheckAuthenticationForHostParams, - options?: RequestOptions, - ): APIPromise { + checkAuthenticationForHost(body: RunnerCheckAuthenticationForHostParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.RunnerService/CheckAuthenticationForHost', { body, ...options }); } @@ -328,10 +295,7 @@ export class Runners extends APIResource { * ); * ``` */ - checkRepositoryAccess( - body: RunnerCheckRepositoryAccessParams, - options?: RequestOptions, - ): APIPromise { + checkRepositoryAccess(body: RunnerCheckRepositoryAccessParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.RunnerService/CheckRepositoryAccess', { body, ...options }); } @@ -357,10 +321,7 @@ export class Runners extends APIResource { * }); * ``` */ - createLogsToken( - body: RunnerCreateLogsTokenParams, - options?: RequestOptions, - ): APIPromise { + createLogsToken(body: RunnerCreateLogsTokenParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.RunnerService/CreateRunnerLogsToken', { body, ...options }); } @@ -392,10 +353,7 @@ export class Runners extends APIResource { * }); * ``` */ - createRunnerToken( - body: RunnerCreateRunnerTokenParams, - options?: RequestOptions, - ): APIPromise { + createRunnerToken(body: RunnerCreateRunnerTokenParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.RunnerService/CreateRunnerToken', { body, ...options }); } @@ -443,16 +401,9 @@ export class Runners extends APIResource { * } * ``` */ - listScmOrganizations( - params: RunnerListScmOrganizationsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.RunnerService/ListSCMOrganizations', - OrganizationsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listScmOrganizations(params: RunnerListScmOrganizationsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.RunnerService/ListSCMOrganizations', OrganizationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -488,10 +439,7 @@ export class Runners extends APIResource { * }); * ``` */ - parseContextURL( - body: RunnerParseContextURLParams, - options?: RequestOptions, - ): APIPromise { + parseContextURL(body: RunnerParseContextURLParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.RunnerService/ParseContextURL', { body, ...options }); } @@ -534,18 +482,14 @@ export class Runners extends APIResource { * }); * ``` */ - searchRepositories( - body: RunnerSearchRepositoriesParams, - options?: RequestOptions, - ): APIPromise { + searchRepositories(body: RunnerSearchRepositoriesParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.RunnerService/SearchRepositories', { body, ...options }); } } -export type RunnersRunnersPage = RunnersPage; +export type RunnersRunnersPage = RunnersPage -export type RunnerListScmOrganizationsResponsesOrganizationsPage = - OrganizationsPage; +export type RunnerListScmOrganizationsResponsesOrganizationsPage = OrganizationsPage export interface GatewayInfo { /** @@ -559,12 +503,7 @@ export interface GatewayInfo { latency?: string; } -export type LogLevel = - | 'LOG_LEVEL_UNSPECIFIED' - | 'LOG_LEVEL_DEBUG' - | 'LOG_LEVEL_INFO' - | 'LOG_LEVEL_WARN' - | 'LOG_LEVEL_ERROR'; +export type LogLevel = 'LOG_LEVEL_UNSPECIFIED' | 'LOG_LEVEL_DEBUG' | 'LOG_LEVEL_INFO' | 'LOG_LEVEL_WARN' | 'LOG_LEVEL_ERROR' export interface MetricsConfiguration { /** @@ -644,21 +583,7 @@ export interface Runner { updatedAt?: string; } -export type RunnerCapability = - | 'RUNNER_CAPABILITY_UNSPECIFIED' - | 'RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS' - | 'RUNNER_CAPABILITY_SECRET_CONTAINER_REGISTRY' - | 'RUNNER_CAPABILITY_AGENT_EXECUTION' - | 'RUNNER_CAPABILITY_ALLOW_ENV_TOKEN_POPULATION' - | 'RUNNER_CAPABILITY_DEFAULT_DEV_CONTAINER_IMAGE' - | 'RUNNER_CAPABILITY_ENVIRONMENT_SNAPSHOT' - | 'RUNNER_CAPABILITY_PREBUILDS_BEFORE_SNAPSHOT_TRIGGER' - | 'RUNNER_CAPABILITY_LIST_SCM_ORGANIZATIONS' - | 'RUNNER_CAPABILITY_CHECK_REPOSITORY_ACCESS' - | 'RUNNER_CAPABILITY_RUNNER_SIDE_AGENT' - | 'RUNNER_CAPABILITY_WARM_POOL' - | 'RUNNER_CAPABILITY_ASG_WARM_POOL' - | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION'; +export type RunnerCapability = 'RUNNER_CAPABILITY_UNSPECIFIED' | 'RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS' | 'RUNNER_CAPABILITY_SECRET_CONTAINER_REGISTRY' | 'RUNNER_CAPABILITY_AGENT_EXECUTION' | 'RUNNER_CAPABILITY_ALLOW_ENV_TOKEN_POPULATION' | 'RUNNER_CAPABILITY_DEFAULT_DEV_CONTAINER_IMAGE' | 'RUNNER_CAPABILITY_ENVIRONMENT_SNAPSHOT' | 'RUNNER_CAPABILITY_PREBUILDS_BEFORE_SNAPSHOT_TRIGGER' | 'RUNNER_CAPABILITY_LIST_SCM_ORGANIZATIONS' | 'RUNNER_CAPABILITY_CHECK_REPOSITORY_ACCESS' | 'RUNNER_CAPABILITY_RUNNER_SIDE_AGENT' | 'RUNNER_CAPABILITY_WARM_POOL' | 'RUNNER_CAPABILITY_ASG_WARM_POOL' | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION' export interface RunnerConfiguration { /** @@ -705,42 +630,21 @@ export interface RunnerConfiguration { /** * RunnerKind represents the kind of a runner */ -export type RunnerKind = - | 'RUNNER_KIND_UNSPECIFIED' - | 'RUNNER_KIND_LOCAL' - | 'RUNNER_KIND_REMOTE' - | 'RUNNER_KIND_LOCAL_CONFIGURATION'; +export type RunnerKind = 'RUNNER_KIND_UNSPECIFIED' | 'RUNNER_KIND_LOCAL' | 'RUNNER_KIND_REMOTE' | 'RUNNER_KIND_LOCAL_CONFIGURATION' /** * RunnerPhase represents the phase a runner is in */ -export type RunnerPhase = - | 'RUNNER_PHASE_UNSPECIFIED' - | 'RUNNER_PHASE_CREATED' - | 'RUNNER_PHASE_INACTIVE' - | 'RUNNER_PHASE_ACTIVE' - | 'RUNNER_PHASE_DELETING' - | 'RUNNER_PHASE_DELETED' - | 'RUNNER_PHASE_DEGRADED'; +export type RunnerPhase = 'RUNNER_PHASE_UNSPECIFIED' | 'RUNNER_PHASE_CREATED' | 'RUNNER_PHASE_INACTIVE' | 'RUNNER_PHASE_ACTIVE' | 'RUNNER_PHASE_DELETING' | 'RUNNER_PHASE_DELETED' | 'RUNNER_PHASE_DEGRADED' /** * RunnerProvider identifies the specific implementation type of a runner. Each * provider maps to a specific kind of runner (local or remote), as specified below * for each provider. */ -export type RunnerProvider = - | 'RUNNER_PROVIDER_UNSPECIFIED' - | 'RUNNER_PROVIDER_AWS_EC2' - | 'RUNNER_PROVIDER_LINUX_HOST' - | 'RUNNER_PROVIDER_DESKTOP_MAC' - | 'RUNNER_PROVIDER_MANAGED' - | 'RUNNER_PROVIDER_GCP' - | 'RUNNER_PROVIDER_DEV_AGENT'; - -export type RunnerReleaseChannel = - | 'RUNNER_RELEASE_CHANNEL_UNSPECIFIED' - | 'RUNNER_RELEASE_CHANNEL_STABLE' - | 'RUNNER_RELEASE_CHANNEL_LATEST'; +export type RunnerProvider = 'RUNNER_PROVIDER_UNSPECIFIED' | 'RUNNER_PROVIDER_AWS_EC2' | 'RUNNER_PROVIDER_LINUX_HOST' | 'RUNNER_PROVIDER_DESKTOP_MAC' | 'RUNNER_PROVIDER_MANAGED' | 'RUNNER_PROVIDER_GCP' | 'RUNNER_PROVIDER_DEV_AGENT' + +export type RunnerReleaseChannel = 'RUNNER_RELEASE_CHANNEL_UNSPECIFIED' | 'RUNNER_RELEASE_CHANNEL_STABLE' | 'RUNNER_RELEASE_CHANNEL_LATEST' export interface RunnerSpec { /** @@ -824,12 +728,9 @@ export interface RunnerStatus { version?: string; } -export type RunnerVariant = - | 'RUNNER_VARIANT_UNSPECIFIED' - | 'RUNNER_VARIANT_STANDARD' - | 'RUNNER_VARIANT_ENTERPRISE'; +export type RunnerVariant = 'RUNNER_VARIANT_UNSPECIFIED' | 'RUNNER_VARIANT_STANDARD' | 'RUNNER_VARIANT_ENTERPRISE' -export type SearchMode = 'SEARCH_MODE_UNSPECIFIED' | 'SEARCH_MODE_KEYWORD' | 'SEARCH_MODE_NATIVE'; +export type SearchMode = 'SEARCH_MODE_UNSPECIFIED' | 'SEARCH_MODE_KEYWORD' | 'SEARCH_MODE_NATIVE' /** * UpdateWindow defines a daily time window (UTC) during which auto-updates are @@ -869,9 +770,9 @@ export interface RunnerRetrieveResponse { runner: Runner; } -export type RunnerUpdateResponse = unknown; +export type RunnerUpdateResponse = unknown -export type RunnerDeleteResponse = unknown; +export type RunnerDeleteResponse = unknown export interface RunnerCheckAuthenticationForHostResponse { authenticated?: boolean; @@ -1577,7 +1478,7 @@ export declare namespace Runners { type RunnerCreateRunnerTokenParams as RunnerCreateRunnerTokenParams, type RunnerListScmOrganizationsParams as RunnerListScmOrganizationsParams, type RunnerParseContextURLParams as RunnerParseContextURLParams, - type RunnerSearchRepositoriesParams as RunnerSearchRepositoriesParams, + type RunnerSearchRepositoriesParams as RunnerSearchRepositoriesParams }; export { @@ -1586,7 +1487,7 @@ export declare namespace Runners { type FieldValidationError as FieldValidationError, type ScmIntegrationValidationResult as ScmIntegrationValidationResult, type ConfigurationValidateResponse as ConfigurationValidateResponse, - type ConfigurationValidateParams as ConfigurationValidateParams, + type ConfigurationValidateParams as ConfigurationValidateParams }; export { @@ -1600,6 +1501,6 @@ export declare namespace Runners { type PolicyCreateParams as PolicyCreateParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyListParams as PolicyListParams, - type PolicyDeleteParams as PolicyDeleteParams, + type PolicyDeleteParams as PolicyDeleteParams }; } diff --git a/src/resources/secrets.ts b/src/resources/secrets.ts index 86012223..460b2a1a 100644 --- a/src/resources/secrets.ts +++ b/src/resources/secrets.ts @@ -117,13 +117,8 @@ export class Secrets extends APIResource { * ``` */ list(params: SecretListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList('/gitpod.v1.SecretService/ListSecrets', SecretsPage, { - query: { token, pageSize }, - body, - method: 'post', - ...options, - }); + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.SecretService/ListSecrets', SecretsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -217,7 +212,7 @@ export class Secrets extends APIResource { } } -export type SecretsSecretsPage = SecretsPage; +export type SecretsSecretsPage = SecretsPage export interface Secret { id?: string; @@ -471,13 +466,13 @@ export interface SecretCreateResponse { secret?: Secret; } -export type SecretDeleteResponse = unknown; +export type SecretDeleteResponse = unknown export interface SecretGetValueResponse { value?: string; } -export type SecretUpdateValueResponse = unknown; +export type SecretUpdateValueResponse = unknown export interface SecretCreateParams { /** @@ -603,6 +598,6 @@ export declare namespace Secrets { type SecretListParams as SecretListParams, type SecretDeleteParams as SecretDeleteParams, type SecretGetValueParams as SecretGetValueParams, - type SecretUpdateValueParams as SecretUpdateValueParams, + type SecretUpdateValueParams as SecretUpdateValueParams }; } diff --git a/src/resources/shared.ts b/src/resources/shared.ts index c4b17c23..32d92463 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -1,13 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import * as Shared from './shared'; -import { - EnvironmentClassesPage, - GatewaysPage, - ProjectEnvironmentClassesPage, - TaskExecutionsPage, - TasksPage, -} from '../core/pagination'; +import { EnvironmentClassesPage, GatewaysPage, ProjectEnvironmentClassesPage, TaskExecutionsPage, TasksPage } from '../core/pagination'; /** * An AutomationTrigger represents a trigger for an automation action. The `manual` @@ -39,10 +33,7 @@ export interface AutomationTrigger { prebuild?: boolean; } -export type CountResponseRelation = - | 'COUNT_RESPONSE_RELATION_UNSPECIFIED' - | 'COUNT_RESPONSE_RELATION_EQ' - | 'COUNT_RESPONSE_RELATION_GTE'; +export type CountResponseRelation = 'COUNT_RESPONSE_RELATION_UNSPECIFIED' | 'COUNT_RESPONSE_RELATION_EQ' | 'COUNT_RESPONSE_RELATION_GTE' export interface EnvironmentClass { /** @@ -113,23 +104,7 @@ export interface EnvironmentVariableSource { * The status code, which should be an enum value of * [google.rpc.Code][google.rpc.Code]. */ -export type ErrorCode = - | 'canceled' - | 'unknown' - | 'invalid_argument' - | 'deadline_exceeded' - | 'not_found' - | 'already_exists' - | 'permission_denied' - | 'resource_exhausted' - | 'failed_precondition' - | 'aborted' - | 'out_of_range' - | 'unimplemented' - | 'internal' - | 'unavailable' - | 'data_loss' - | 'unauthenticated'; +export type ErrorCode = 'canceled' | 'unknown' | 'invalid_argument' | 'deadline_exceeded' | 'not_found' | 'already_exists' | 'permission_denied' | 'resource_exhausted' | 'failed_precondition' | 'aborted' | 'out_of_range' | 'unimplemented' | 'internal' | 'unavailable' | 'data_loss' | 'unauthenticated' export interface FieldValue { key?: string; @@ -158,26 +133,11 @@ export interface Gateway { region?: string; } -export type OrganizationRole = - | 'ORGANIZATION_ROLE_UNSPECIFIED' - | 'ORGANIZATION_ROLE_ADMIN' - | 'ORGANIZATION_ROLE_MEMBER'; - -export type OrganizationTier = - | 'ORGANIZATION_TIER_UNSPECIFIED' - | 'ORGANIZATION_TIER_FREE' - | 'ORGANIZATION_TIER_ENTERPRISE' - | 'ORGANIZATION_TIER_CORE' - | 'ORGANIZATION_TIER_FREE_ONA'; - -export type Principal = - | 'PRINCIPAL_UNSPECIFIED' - | 'PRINCIPAL_ACCOUNT' - | 'PRINCIPAL_USER' - | 'PRINCIPAL_RUNNER' - | 'PRINCIPAL_ENVIRONMENT' - | 'PRINCIPAL_SERVICE_ACCOUNT' - | 'PRINCIPAL_RUNNER_MANAGER'; +export type OrganizationRole = 'ORGANIZATION_ROLE_UNSPECIFIED' | 'ORGANIZATION_ROLE_ADMIN' | 'ORGANIZATION_ROLE_MEMBER' + +export type OrganizationTier = 'ORGANIZATION_TIER_UNSPECIFIED' | 'ORGANIZATION_TIER_FREE' | 'ORGANIZATION_TIER_ENTERPRISE' | 'ORGANIZATION_TIER_CORE' | 'ORGANIZATION_TIER_FREE_ONA' + +export type Principal = 'PRINCIPAL_UNSPECIFIED' | 'PRINCIPAL_ACCOUNT' | 'PRINCIPAL_USER' | 'PRINCIPAL_RUNNER' | 'PRINCIPAL_ENVIRONMENT' | 'PRINCIPAL_SERVICE_ACCOUNT' | 'PRINCIPAL_RUNNER_MANAGER' export interface ProjectEnvironmentClass { /** @@ -201,121 +161,9 @@ export interface ProjectEnvironmentClass { * ResourceRole represents roles that can be assigned to groups on resources These * map directly to the roles defined in backend/db/rule/rbac/role/role.go */ -export type ResourceRole = - | 'RESOURCE_ROLE_UNSPECIFIED' - | 'RESOURCE_ROLE_ORG_ADMIN' - | 'RESOURCE_ROLE_ORG_MEMBER' - | 'RESOURCE_ROLE_ORG_RUNNERS_ADMIN' - | 'RESOURCE_ROLE_ORG_PROJECTS_ADMIN' - | 'RESOURCE_ROLE_ORG_AUTOMATIONS_ADMIN' - | 'RESOURCE_ROLE_ORG_GROUPS_ADMIN' - | 'RESOURCE_ROLE_ORG_AUDIT_LOG_READER' - | 'RESOURCE_ROLE_GROUP_ADMIN' - | 'RESOURCE_ROLE_GROUP_VIEWER' - | 'RESOURCE_ROLE_USER_IDENTITY' - | 'RESOURCE_ROLE_USER_VIEWER' - | 'RESOURCE_ROLE_USER_ADMIN' - | 'RESOURCE_ROLE_ENVIRONMENT_IDENTITY' - | 'RESOURCE_ROLE_ENVIRONMENT_ADMIN' - | 'RESOURCE_ROLE_ENVIRONMENT_USER' - | 'RESOURCE_ROLE_ENVIRONMENT_VIEWER' - | 'RESOURCE_ROLE_ENVIRONMENT_RUNNER' - | 'RESOURCE_ROLE_RUNNER_IDENTITY' - | 'RESOURCE_ROLE_RUNNER_ADMIN' - | 'RESOURCE_ROLE_RUNNER_LOCAL_ADMIN' - | 'RESOURCE_ROLE_RUNNER_MANAGED_ADMIN' - | 'RESOURCE_ROLE_RUNNER_USER' - | 'RESOURCE_ROLE_RUNNER_CONFIGURATION_READER' - | 'RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_ADMIN' - | 'RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_UPDATER' - | 'RESOURCE_ROLE_PROJECT_ADMIN' - | 'RESOURCE_ROLE_PROJECT_USER' - | 'RESOURCE_ROLE_PROJECT_EDITOR' - | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_ADMIN' - | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_VIEWER' - | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_USER' - | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_ENV' - | 'RESOURCE_ROLE_ENVIRONMENT_TASK_ADMIN' - | 'RESOURCE_ROLE_ENVIRONMENT_TASK_VIEWER' - | 'RESOURCE_ROLE_ENVIRONMENT_TASK_USER' - | 'RESOURCE_ROLE_ENVIRONMENT_TASK_ENV' - | 'RESOURCE_ROLE_SERVICE_ACCOUNT_IDENTITY' - | 'RESOURCE_ROLE_SERVICE_ACCOUNT_ADMIN' - | 'RESOURCE_ROLE_AGENT_EXECUTION_USER' - | 'RESOURCE_ROLE_AGENT_EXECUTION_ADMIN' - | 'RESOURCE_ROLE_AGENT_EXECUTION_RUNNER' - | 'RESOURCE_ROLE_AGENT_EXECUTION_OUTPUTS_REPORTER' - | 'RESOURCE_ROLE_AGENT_EXECUTION_VIEWER' - | 'RESOURCE_ROLE_AGENT_ADMIN' - | 'RESOURCE_ROLE_AGENT_VIEWER' - | 'RESOURCE_ROLE_AGENT_EXECUTOR' - | 'RESOURCE_ROLE_WORKFLOW_ADMIN' - | 'RESOURCE_ROLE_WORKFLOW_USER' - | 'RESOURCE_ROLE_WORKFLOW_VIEWER' - | 'RESOURCE_ROLE_WORKFLOW_EXECUTOR' - | 'RESOURCE_ROLE_SNAPSHOT_ADMIN' - | 'RESOURCE_ROLE_SNAPSHOT_RUNNER' - | 'RESOURCE_ROLE_WEBHOOK_ADMIN' - | 'RESOURCE_ROLE_WEBHOOK_VIEWER' - | 'RESOURCE_ROLE_WARMPOOL_RUNNER' - | 'RESOURCE_ROLE_WARMPOOL_ADMIN' - | 'RESOURCE_ROLE_WARMPOOL_VIEWER' - | 'RESOURCE_ROLE_SESSION_ADMIN' - | 'RESOURCE_ROLE_SESSION_USER' - | 'RESOURCE_ROLE_TEAM_ADMIN' - | 'RESOURCE_ROLE_TEAM_VIEWER'; - -export type ResourceType = - | 'RESOURCE_TYPE_UNSPECIFIED' - | 'RESOURCE_TYPE_ENVIRONMENT' - | 'RESOURCE_TYPE_RUNNER' - | 'RESOURCE_TYPE_PROJECT' - | 'RESOURCE_TYPE_TASK' - | 'RESOURCE_TYPE_TASK_EXECUTION' - | 'RESOURCE_TYPE_SERVICE' - | 'RESOURCE_TYPE_ORGANIZATION' - | 'RESOURCE_TYPE_USER' - | 'RESOURCE_TYPE_ENVIRONMENT_CLASS' - | 'RESOURCE_TYPE_RUNNER_SCM_INTEGRATION' - | 'RESOURCE_TYPE_HOST_AUTHENTICATION_TOKEN' - | 'RESOURCE_TYPE_GROUP' - | 'RESOURCE_TYPE_PERSONAL_ACCESS_TOKEN' - | 'RESOURCE_TYPE_USER_PREFERENCE' - | 'RESOURCE_TYPE_SERVICE_ACCOUNT' - | 'RESOURCE_TYPE_SECRET' - | 'RESOURCE_TYPE_SSO_CONFIG' - | 'RESOURCE_TYPE_DOMAIN_VERIFICATION' - | 'RESOURCE_TYPE_AGENT_EXECUTION' - | 'RESOURCE_TYPE_RUNNER_LLM_INTEGRATION' - | 'RESOURCE_TYPE_AGENT' - | 'RESOURCE_TYPE_ENVIRONMENT_SESSION' - | 'RESOURCE_TYPE_USER_SECRET' - | 'RESOURCE_TYPE_ORGANIZATION_POLICY' - | 'RESOURCE_TYPE_ORGANIZATION_SECRET' - | 'RESOURCE_TYPE_PROJECT_ENVIRONMENT_CLASS' - | 'RESOURCE_TYPE_BILLING' - | 'RESOURCE_TYPE_PROMPT' - | 'RESOURCE_TYPE_COUPON' - | 'RESOURCE_TYPE_COUPON_REDEMPTION' - | 'RESOURCE_TYPE_ACCOUNT' - | 'RESOURCE_TYPE_INTEGRATION' - | 'RESOURCE_TYPE_WORKFLOW' - | 'RESOURCE_TYPE_WORKFLOW_EXECUTION' - | 'RESOURCE_TYPE_WORKFLOW_EXECUTION_ACTION' - | 'RESOURCE_TYPE_SNAPSHOT' - | 'RESOURCE_TYPE_PREBUILD' - | 'RESOURCE_TYPE_ORGANIZATION_LLM_INTEGRATION' - | 'RESOURCE_TYPE_CUSTOM_DOMAIN' - | 'RESOURCE_TYPE_ROLE_ASSIGNMENT_CHANGED' - | 'RESOURCE_TYPE_GROUP_MEMBERSHIP_CHANGED' - | 'RESOURCE_TYPE_WEBHOOK' - | 'RESOURCE_TYPE_SCIM_CONFIGURATION' - | 'RESOURCE_TYPE_SERVICE_ACCOUNT_SECRET' - | 'RESOURCE_TYPE_ANNOUNCEMENT_BANNER' - | 'RESOURCE_TYPE_SERVICE_ACCOUNT_TOKEN' - | 'RESOURCE_TYPE_ROLE_ASSIGNMENT' - | 'RESOURCE_TYPE_WARM_POOL' - | 'RESOURCE_TYPE_NOTIFICATION'; +export type ResourceRole = 'RESOURCE_ROLE_UNSPECIFIED' | 'RESOURCE_ROLE_ORG_ADMIN' | 'RESOURCE_ROLE_ORG_MEMBER' | 'RESOURCE_ROLE_ORG_RUNNERS_ADMIN' | 'RESOURCE_ROLE_ORG_PROJECTS_ADMIN' | 'RESOURCE_ROLE_ORG_AUTOMATIONS_ADMIN' | 'RESOURCE_ROLE_ORG_GROUPS_ADMIN' | 'RESOURCE_ROLE_ORG_AUDIT_LOG_READER' | 'RESOURCE_ROLE_GROUP_ADMIN' | 'RESOURCE_ROLE_GROUP_VIEWER' | 'RESOURCE_ROLE_USER_IDENTITY' | 'RESOURCE_ROLE_USER_VIEWER' | 'RESOURCE_ROLE_USER_ADMIN' | 'RESOURCE_ROLE_ENVIRONMENT_IDENTITY' | 'RESOURCE_ROLE_ENVIRONMENT_ADMIN' | 'RESOURCE_ROLE_ENVIRONMENT_USER' | 'RESOURCE_ROLE_ENVIRONMENT_VIEWER' | 'RESOURCE_ROLE_ENVIRONMENT_RUNNER' | 'RESOURCE_ROLE_RUNNER_IDENTITY' | 'RESOURCE_ROLE_RUNNER_ADMIN' | 'RESOURCE_ROLE_RUNNER_LOCAL_ADMIN' | 'RESOURCE_ROLE_RUNNER_MANAGED_ADMIN' | 'RESOURCE_ROLE_RUNNER_USER' | 'RESOURCE_ROLE_RUNNER_CONFIGURATION_READER' | 'RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_ADMIN' | 'RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_UPDATER' | 'RESOURCE_ROLE_PROJECT_ADMIN' | 'RESOURCE_ROLE_PROJECT_USER' | 'RESOURCE_ROLE_PROJECT_EDITOR' | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_ADMIN' | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_VIEWER' | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_USER' | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_ENV' | 'RESOURCE_ROLE_ENVIRONMENT_TASK_ADMIN' | 'RESOURCE_ROLE_ENVIRONMENT_TASK_VIEWER' | 'RESOURCE_ROLE_ENVIRONMENT_TASK_USER' | 'RESOURCE_ROLE_ENVIRONMENT_TASK_ENV' | 'RESOURCE_ROLE_SERVICE_ACCOUNT_IDENTITY' | 'RESOURCE_ROLE_SERVICE_ACCOUNT_ADMIN' | 'RESOURCE_ROLE_AGENT_EXECUTION_USER' | 'RESOURCE_ROLE_AGENT_EXECUTION_ADMIN' | 'RESOURCE_ROLE_AGENT_EXECUTION_RUNNER' | 'RESOURCE_ROLE_AGENT_EXECUTION_OUTPUTS_REPORTER' | 'RESOURCE_ROLE_AGENT_EXECUTION_VIEWER' | 'RESOURCE_ROLE_AGENT_ADMIN' | 'RESOURCE_ROLE_AGENT_VIEWER' | 'RESOURCE_ROLE_AGENT_EXECUTOR' | 'RESOURCE_ROLE_WORKFLOW_ADMIN' | 'RESOURCE_ROLE_WORKFLOW_USER' | 'RESOURCE_ROLE_WORKFLOW_VIEWER' | 'RESOURCE_ROLE_WORKFLOW_EXECUTOR' | 'RESOURCE_ROLE_SNAPSHOT_ADMIN' | 'RESOURCE_ROLE_SNAPSHOT_RUNNER' | 'RESOURCE_ROLE_WEBHOOK_ADMIN' | 'RESOURCE_ROLE_WEBHOOK_VIEWER' | 'RESOURCE_ROLE_WARMPOOL_RUNNER' | 'RESOURCE_ROLE_WARMPOOL_ADMIN' | 'RESOURCE_ROLE_WARMPOOL_VIEWER' | 'RESOURCE_ROLE_SESSION_ADMIN' | 'RESOURCE_ROLE_SESSION_USER' | 'RESOURCE_ROLE_TEAM_ADMIN' | 'RESOURCE_ROLE_TEAM_VIEWER' + +export type ResourceType = 'RESOURCE_TYPE_UNSPECIFIED' | 'RESOURCE_TYPE_ENVIRONMENT' | 'RESOURCE_TYPE_RUNNER' | 'RESOURCE_TYPE_PROJECT' | 'RESOURCE_TYPE_TASK' | 'RESOURCE_TYPE_TASK_EXECUTION' | 'RESOURCE_TYPE_SERVICE' | 'RESOURCE_TYPE_ORGANIZATION' | 'RESOURCE_TYPE_USER' | 'RESOURCE_TYPE_ENVIRONMENT_CLASS' | 'RESOURCE_TYPE_RUNNER_SCM_INTEGRATION' | 'RESOURCE_TYPE_HOST_AUTHENTICATION_TOKEN' | 'RESOURCE_TYPE_GROUP' | 'RESOURCE_TYPE_PERSONAL_ACCESS_TOKEN' | 'RESOURCE_TYPE_USER_PREFERENCE' | 'RESOURCE_TYPE_SERVICE_ACCOUNT' | 'RESOURCE_TYPE_SECRET' | 'RESOURCE_TYPE_SSO_CONFIG' | 'RESOURCE_TYPE_DOMAIN_VERIFICATION' | 'RESOURCE_TYPE_AGENT_EXECUTION' | 'RESOURCE_TYPE_RUNNER_LLM_INTEGRATION' | 'RESOURCE_TYPE_AGENT' | 'RESOURCE_TYPE_ENVIRONMENT_SESSION' | 'RESOURCE_TYPE_USER_SECRET' | 'RESOURCE_TYPE_ORGANIZATION_POLICY' | 'RESOURCE_TYPE_ORGANIZATION_SECRET' | 'RESOURCE_TYPE_PROJECT_ENVIRONMENT_CLASS' | 'RESOURCE_TYPE_BILLING' | 'RESOURCE_TYPE_PROMPT' | 'RESOURCE_TYPE_COUPON' | 'RESOURCE_TYPE_COUPON_REDEMPTION' | 'RESOURCE_TYPE_ACCOUNT' | 'RESOURCE_TYPE_INTEGRATION' | 'RESOURCE_TYPE_WORKFLOW' | 'RESOURCE_TYPE_WORKFLOW_EXECUTION' | 'RESOURCE_TYPE_WORKFLOW_EXECUTION_ACTION' | 'RESOURCE_TYPE_SNAPSHOT' | 'RESOURCE_TYPE_PREBUILD' | 'RESOURCE_TYPE_ORGANIZATION_LLM_INTEGRATION' | 'RESOURCE_TYPE_CUSTOM_DOMAIN' | 'RESOURCE_TYPE_ROLE_ASSIGNMENT_CHANGED' | 'RESOURCE_TYPE_GROUP_MEMBERSHIP_CHANGED' | 'RESOURCE_TYPE_WEBHOOK' | 'RESOURCE_TYPE_SCIM_CONFIGURATION' | 'RESOURCE_TYPE_SERVICE_ACCOUNT_SECRET' | 'RESOURCE_TYPE_ANNOUNCEMENT_BANNER' | 'RESOURCE_TYPE_SERVICE_ACCOUNT_TOKEN' | 'RESOURCE_TYPE_ROLE_ASSIGNMENT' | 'RESOURCE_TYPE_WARM_POOL' | 'RESOURCE_TYPE_NOTIFICATION' export interface RunsOn { docker?: RunsOn.Docker; @@ -353,12 +201,12 @@ export interface Sort { order?: SortOrder; } -export type SortOrder = 'SORT_ORDER_UNSPECIFIED' | 'SORT_ORDER_ASC' | 'SORT_ORDER_DESC'; +export type SortOrder = 'SORT_ORDER_UNSPECIFIED' | 'SORT_ORDER_ASC' | 'SORT_ORDER_DESC' /** * Current state of the pull request */ -export type State = 'STATE_UNSPECIFIED' | 'STATE_OPEN' | 'STATE_CLOSED' | 'STATE_MERGED'; +export type State = 'STATE_UNSPECIFIED' | 'STATE_OPEN' | 'STATE_CLOSED' | 'STATE_MERGED' export interface Subject { /** @@ -434,13 +282,7 @@ export interface TaskExecutionMetadata { taskId?: string; } -export type TaskExecutionPhase = - | 'TASK_EXECUTION_PHASE_UNSPECIFIED' - | 'TASK_EXECUTION_PHASE_PENDING' - | 'TASK_EXECUTION_PHASE_RUNNING' - | 'TASK_EXECUTION_PHASE_SUCCEEDED' - | 'TASK_EXECUTION_PHASE_FAILED' - | 'TASK_EXECUTION_PHASE_STOPPED'; +export type TaskExecutionPhase = 'TASK_EXECUTION_PHASE_UNSPECIFIED' | 'TASK_EXECUTION_PHASE_PENDING' | 'TASK_EXECUTION_PHASE_RUNNING' | 'TASK_EXECUTION_PHASE_SUCCEEDED' | 'TASK_EXECUTION_PHASE_FAILED' | 'TASK_EXECUTION_PHASE_STOPPED' export interface TaskExecutionSpec { /** @@ -603,19 +445,14 @@ export interface TaskSpec { runsOn?: RunsOn; } -export type UserStatus = - | 'USER_STATUS_UNSPECIFIED' - | 'USER_STATUS_ACTIVE' - | 'USER_STATUS_SUSPENDED' - | 'USER_STATUS_LEFT'; +export type UserStatus = 'USER_STATUS_UNSPECIFIED' | 'USER_STATUS_ACTIVE' | 'USER_STATUS_SUSPENDED' | 'USER_STATUS_LEFT' -export type TasksTasksPage = TasksPage; +export type TasksTasksPage = TasksPage -export type TaskExecutionsTaskExecutionsPage = TaskExecutionsPage; +export type TaskExecutionsTaskExecutionsPage = TaskExecutionsPage -export type EnvironmentClassesEnvironmentClassesPage = EnvironmentClassesPage; +export type EnvironmentClassesEnvironmentClassesPage = EnvironmentClassesPage -export type GatewaysGatewaysPage = GatewaysPage; +export type GatewaysGatewaysPage = GatewaysPage -export type ProjectEnvironmentClassesProjectEnvironmentClassesPage = - ProjectEnvironmentClassesPage; +export type ProjectEnvironmentClassesProjectEnvironmentClassesPage = ProjectEnvironmentClassesPage diff --git a/src/resources/usage.ts b/src/resources/usage.ts index 0782706e..cb77ed4c 100644 --- a/src/resources/usage.ts +++ b/src/resources/usage.ts @@ -52,20 +52,13 @@ export class Usage extends APIResource { * } * ``` */ - listEnvironmentRuntimeRecords( - params: UsageListEnvironmentRuntimeRecordsParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.UsageService/ListEnvironmentUsageRecords', - RecordsPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + listEnvironmentRuntimeRecords(params: UsageListEnvironmentRuntimeRecordsParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.UsageService/ListEnvironmentUsageRecords', RecordsPage, { query: { token, pageSize }, body, method: 'post', ...options }); } } -export type EnvironmentUsageRecordsRecordsPage = RecordsPage; +export type EnvironmentUsageRecordsRecordsPage = RecordsPage /** * EnvironmentUsageRecord represents a record of an environment from start to stop. @@ -180,6 +173,6 @@ export declare namespace Usage { export { type EnvironmentUsageRecord as EnvironmentUsageRecord, type EnvironmentUsageRecordsRecordsPage as EnvironmentUsageRecordsRecordsPage, - type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams, + type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams }; } diff --git a/src/resources/users/dotfiles.ts b/src/resources/users/dotfiles.ts index f3539f32..44fb4706 100644 --- a/src/resources/users/dotfiles.ts +++ b/src/resources/users/dotfiles.ts @@ -78,7 +78,7 @@ export interface DotfileGetResponse { dotfilesConfiguration: DotfilesConfiguration; } -export type DotfileSetResponse = unknown; +export type DotfileSetResponse = unknown export interface DotfileGetParams { empty?: boolean; @@ -94,6 +94,6 @@ export declare namespace Dotfiles { type DotfileGetResponse as DotfileGetResponse, type DotfileSetResponse as DotfileSetResponse, type DotfileGetParams as DotfileGetParams, - type DotfileSetParams as DotfileSetParams, + type DotfileSetParams as DotfileSetParams }; } diff --git a/src/resources/users/index.ts b/src/resources/users/index.ts index be4f2782..e6752305 100644 --- a/src/resources/users/index.ts +++ b/src/resources/users/index.ts @@ -1,32 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Dotfiles, - type DotfilesConfiguration, - type DotfileGetResponse, - type DotfileSetResponse, - type DotfileGetParams, - type DotfileSetParams, -} from './dotfiles'; -export { - Pats, - type PersonalAccessToken, - type PatDeleteResponse, - type PatGetResponse, - type PatListParams, - type PatDeleteParams, - type PatGetParams, - type PersonalAccessTokensPersonalAccessTokensPage, -} from './pats'; -export { - Users, - type User, - type UserDeleteUserResponse, - type UserGetAuthenticatedUserResponse, - type UserGetUserResponse, - type UserSetSuspendedResponse, - type UserDeleteUserParams, - type UserGetAuthenticatedUserParams, - type UserGetUserParams, - type UserSetSuspendedParams, -} from './users'; +export { Dotfiles, type DotfilesConfiguration, type DotfileGetResponse, type DotfileSetResponse, type DotfileGetParams, type DotfileSetParams } from './dotfiles';; +export { Pats, type PersonalAccessToken, type PatDeleteResponse, type PatGetResponse, type PatListParams, type PatDeleteParams, type PatGetParams, type PersonalAccessTokensPersonalAccessTokensPage } from './pats';; +export { Users, type User, type UserDeleteUserResponse, type UserGetAuthenticatedUserResponse, type UserGetUserResponse, type UserSetSuspendedResponse, type UserDeleteUserParams, type UserGetAuthenticatedUserParams, type UserGetUserParams, type UserSetSuspendedParams } from './users';; diff --git a/src/resources/users/pats.ts b/src/resources/users/pats.ts index 38c83f31..9f488ea5 100644 --- a/src/resources/users/pats.ts +++ b/src/resources/users/pats.ts @@ -3,11 +3,7 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import { APIPromise } from '../../core/api-promise'; -import { - PagePromise, - PersonalAccessTokensPage, - type PersonalAccessTokensPageParams, -} from '../../core/pagination'; +import { PagePromise, PersonalAccessTokensPage, type PersonalAccessTokensPageParams } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Pats extends APIResource { @@ -48,16 +44,9 @@ export class Pats extends APIResource { * } * ``` */ - list( - params: PatListParams, - options?: RequestOptions, - ): PagePromise { - const { token, pageSize, ...body } = params; - return this._client.getAPIList( - '/gitpod.v1.UserService/ListPersonalAccessTokens', - PersonalAccessTokensPage, - { query: { token, pageSize }, body, method: 'post', ...options }, - ); + list(params: PatListParams, options?: RequestOptions): PagePromise { + const { token, pageSize, ...body } = params + return this._client.getAPIList('/gitpod.v1.UserService/ListPersonalAccessTokens', PersonalAccessTokensPage, { query: { token, pageSize }, body, method: 'post', ...options }); } /** @@ -123,7 +112,7 @@ export class Pats extends APIResource { } } -export type PersonalAccessTokensPersonalAccessTokensPage = PersonalAccessTokensPage; +export type PersonalAccessTokensPersonalAccessTokensPage = PersonalAccessTokensPage export interface PersonalAccessToken { id?: string; @@ -417,7 +406,7 @@ export interface PersonalAccessToken { userId?: string; } -export type PatDeleteResponse = unknown; +export type PatDeleteResponse = unknown export interface PatGetResponse { pat: PersonalAccessToken; @@ -475,6 +464,6 @@ export declare namespace Pats { type PersonalAccessTokensPersonalAccessTokensPage as PersonalAccessTokensPersonalAccessTokensPage, type PatListParams as PatListParams, type PatDeleteParams as PatDeleteParams, - type PatGetParams as PatGetParams, + type PatGetParams as PatGetParams }; } diff --git a/src/resources/users/users.ts b/src/resources/users/users.ts index f9f4b88d..d2ead463 100644 --- a/src/resources/users/users.ts +++ b/src/resources/users/users.ts @@ -3,25 +3,9 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import * as DotfilesAPI from './dotfiles'; -import { - DotfileGetParams, - DotfileGetResponse, - DotfileSetParams, - DotfileSetResponse, - Dotfiles, - DotfilesConfiguration, -} from './dotfiles'; +import { DotfileGetParams, DotfileGetResponse, DotfileSetParams, DotfileSetResponse, Dotfiles, DotfilesConfiguration } from './dotfiles'; import * as PatsAPI from './pats'; -import { - PatDeleteParams, - PatDeleteResponse, - PatGetParams, - PatGetResponse, - PatListParams, - Pats, - PersonalAccessToken, - PersonalAccessTokensPersonalAccessTokensPage, -} from './pats'; +import { PatDeleteParams, PatDeleteResponse, PatGetParams, PatGetResponse, PatListParams, Pats, PersonalAccessToken, PersonalAccessTokensPersonalAccessTokensPage } from './pats'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; @@ -67,10 +51,7 @@ export class Users extends APIResource { * const response = await client.users.getAuthenticatedUser(); * ``` */ - getAuthenticatedUser( - body: UserGetAuthenticatedUserParams, - options?: RequestOptions, - ): APIPromise { + getAuthenticatedUser(body: UserGetAuthenticatedUserParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.UserService/GetAuthenticatedUser', { body, ...options }); } @@ -184,7 +165,7 @@ export interface User { status?: Shared.UserStatus; } -export type UserDeleteUserResponse = unknown; +export type UserDeleteUserResponse = unknown export interface UserGetAuthenticatedUserResponse { user: User; @@ -194,7 +175,7 @@ export interface UserGetUserResponse { user: User; } -export type UserSetSuspendedResponse = unknown; +export type UserSetSuspendedResponse = unknown export interface UserDeleteUserParams { userId?: string; @@ -227,7 +208,7 @@ export declare namespace Users { type UserDeleteUserParams as UserDeleteUserParams, type UserGetAuthenticatedUserParams as UserGetAuthenticatedUserParams, type UserGetUserParams as UserGetUserParams, - type UserSetSuspendedParams as UserSetSuspendedParams, + type UserSetSuspendedParams as UserSetSuspendedParams }; export { @@ -236,7 +217,7 @@ export declare namespace Users { type DotfileGetResponse as DotfileGetResponse, type DotfileSetResponse as DotfileSetResponse, type DotfileGetParams as DotfileGetParams, - type DotfileSetParams as DotfileSetParams, + type DotfileSetParams as DotfileSetParams }; export { @@ -247,6 +228,6 @@ export declare namespace Users { type PersonalAccessTokensPersonalAccessTokensPage as PersonalAccessTokensPersonalAccessTokensPage, type PatListParams as PatListParams, type PatDeleteParams as PatDeleteParams, - type PatGetParams as PatGetParams, + type PatGetParams as PatGetParams }; } diff --git a/src/uploads.ts b/src/uploads.ts index b2ef6471..d5437085 100644 --- a/src/uploads.ts +++ b/src/uploads.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/uploads instead */ -export * from './core/uploads'; +export * from "./core/uploads" \ No newline at end of file diff --git a/src/version.ts b/src/version.ts index e2b0672c..ec0d2a73 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.14.0'; // x-release-please-version +export const VERSION = '0.14.0';// x-release-please-version diff --git a/tests/api-resources/accounts.test.ts b/tests/api-resources/accounts.test.ts index c632b8a1..f2017a58 100644 --- a/tests/api-resources/accounts.test.ts +++ b/tests/api-resources/accounts.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource accounts', () => { // Mock server tests are disabled @@ -34,10 +31,7 @@ describe('resource accounts', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.accounts.delete({ - accountId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', - reason: 'reason', - }); + const response = await client.accounts.delete({ accountId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', reason: 'reason' }); }); // Mock server tests are disabled @@ -54,10 +48,7 @@ describe('resource accounts', () => { // Mock server tests are disabled test.skip('getSSOLoginURL: required and optional params', async () => { - const response = await client.accounts.getSSOLoginURL({ - email: 'user@company.com', - returnTo: 'https://example.com', - }); + const response = await client.accounts.getSSOLoginURL({ email: 'user@company.com', returnTo: 'https://example.com' }); }); // Mock server tests are disabled @@ -99,11 +90,11 @@ describe('resource accounts', () => { // Mock server tests are disabled test.skip('listSSOLogins: required and optional params', async () => { const response = await client.accounts.listSSOLogins({ - email: 'dev@stainless.com', - token: 'token', - pageSize: 0, - pagination: { token: 'token', pageSize: 100 }, - returnTo: 'https://example.com', - }); + email: 'dev@stainless.com', + token: 'token', + pageSize: 0, + pagination: { token: 'token', pageSize: 100 }, + returnTo: 'https://example.com', + }); }); }); diff --git a/tests/api-resources/agents.test.ts b/tests/api-resources/agents.test.ts index 59366e28..a6fe2cad 100644 --- a/tests/api-resources/agents.test.ts +++ b/tests/api-resources/agents.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource agents', () => { // Mock server tests are disabled diff --git a/tests/api-resources/automations.test.ts b/tests/api-resources/automations.test.ts index c91fbf5d..e569f6a3 100644 --- a/tests/api-resources/automations.test.ts +++ b/tests/api-resources/automations.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource automations', () => { // Mock server tests are disabled @@ -23,69 +20,63 @@ describe('resource automations', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.automations.create({ - action: { - limits: { - maxParallel: 0, - maxTotal: 0, - perExecution: { maxTime: '+9125115.360s' }, - }, - steps: [ - { - agent: { prompt: 'prompt' }, - pullRequest: { - branch: 'branch', - description: 'description', - draft: true, - title: 'title', - }, - task: { command: 'command' }, - }, - ], - }, - description: 'description', - executor: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' }, - name: 'name', - report: { - limits: { - maxParallel: 0, - maxTotal: 0, - perExecution: { maxTime: '+9125115.360s' }, - }, - steps: [ - { - agent: { prompt: 'prompt' }, - pullRequest: { - branch: 'branch', - description: 'description', - draft: true, - title: 'title', - }, - task: { command: 'command' }, - }, - ], - }, - triggers: [ - { - context: { - agent: { prompt: 'prompt' }, - fromTrigger: {}, - projects: { projectIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'] }, - repositories: { - environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - repoSelector: { repoSearchString: 'x', scmHost: 'x' }, - repositoryUrls: { repoUrls: ['x'] }, - }, - }, - manual: {}, - pullRequest: { - events: ['PULL_REQUEST_EVENT_UNSPECIFIED'], - integrationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - webhookId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }, - time: { cronExpression: 'cronExpression' }, - }, - ], - }); + action: { + limits: { + maxParallel: 0, + maxTotal: 0, + perExecution: { maxTime: '+9125115.360s' }, + }, + steps: [{ + agent: { prompt: 'prompt' }, + pullRequest: { + branch: 'branch', + description: 'description', + draft: true, + title: 'title', + }, + task: { command: 'command' }, + }], + }, + description: 'description', + executor: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' }, + name: 'name', + report: { + limits: { + maxParallel: 0, + maxTotal: 0, + perExecution: { maxTime: '+9125115.360s' }, + }, + steps: [{ + agent: { prompt: 'prompt' }, + pullRequest: { + branch: 'branch', + description: 'description', + draft: true, + title: 'title', + }, + task: { command: 'command' }, + }], + }, + triggers: [{ + context: { + agent: { prompt: 'prompt' }, + fromTrigger: {}, + projects: { projectIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'] }, + repositories: { + environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + repoSelector: { repoSearchString: 'x', scmHost: 'x' }, + repositoryUrls: { repoUrls: ['x'] }, + }, + }, + manual: {}, + pullRequest: { + events: ['PULL_REQUEST_EVENT_UNSPECIFIED'], + integrationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + webhookId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }, + time: { cronExpression: 'cronExpression' }, + }], + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/editors.test.ts b/tests/api-resources/editors.test.ts index 7ab4511e..d36f7ffa 100644 --- a/tests/api-resources/editors.test.ts +++ b/tests/api-resources/editors.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource editors', () => { // Mock server tests are disabled @@ -40,10 +37,10 @@ describe('resource editors', () => { // Mock server tests are disabled test.skip('resolveURL: only required params', async () => { const responsePromise = client.editors.resolveURL({ - editorId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + editorId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -56,10 +53,10 @@ describe('resource editors', () => { // Mock server tests are disabled test.skip('resolveURL: required and optional params', async () => { const response = await client.editors.resolveURL({ - editorId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - version: 'version', - }); + editorId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + version: 'version', + }); }); }); diff --git a/tests/api-resources/environments/automations/automations.test.ts b/tests/api-resources/environments/automations/automations.test.ts index 18e6c4c4..e1f526b1 100644 --- a/tests/api-resources/environments/automations/automations.test.ts +++ b/tests/api-resources/environments/automations/automations.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource automations', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/automations/services.test.ts b/tests/api-resources/environments/automations/services.test.ts index 90acd206..310bff59 100644 --- a/tests/api-resources/environments/automations/services.test.ts +++ b/tests/api-resources/environments/automations/services.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource services', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/automations/tasks/executions.test.ts b/tests/api-resources/environments/automations/tasks/executions.test.ts index 198d06da..14c3883b 100644 --- a/tests/api-resources/environments/automations/tasks/executions.test.ts +++ b/tests/api-resources/environments/automations/tasks/executions.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource executions', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/automations/tasks/tasks.test.ts b/tests/api-resources/environments/automations/tasks/tasks.test.ts index 467bfedc..d993ab76 100644 --- a/tests/api-resources/environments/automations/tasks/tasks.test.ts +++ b/tests/api-resources/environments/automations/tasks/tasks.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource tasks', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/classes.test.ts b/tests/api-resources/environments/classes.test.ts index 0d97bd45..9c90fc18 100644 --- a/tests/api-resources/environments/classes.test.ts +++ b/tests/api-resources/environments/classes.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource classes', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/environments.test.ts b/tests/api-resources/environments/environments.test.ts index f2cec224..bb731cb8 100644 --- a/tests/api-resources/environments/environments.test.ts +++ b/tests/api-resources/environments/environments.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource environments', () => { // Mock server tests are disabled @@ -22,9 +19,7 @@ describe('resource environments', () => { // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.environments.retrieve({ - environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', - }); + const responsePromise = client.environments.retrieve({ environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -36,9 +31,7 @@ describe('resource environments', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.environments.retrieve({ - environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', - }); + const response = await client.environments.retrieve({ environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); }); // Mock server tests are disabled @@ -79,9 +72,7 @@ describe('resource environments', () => { // Mock server tests are disabled test.skip('createEnvironmentToken: only required params', async () => { - const responsePromise = client.environments.createEnvironmentToken({ - environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', - }); + const responsePromise = client.environments.createEnvironmentToken({ environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -93,9 +84,7 @@ describe('resource environments', () => { // Mock server tests are disabled test.skip('createEnvironmentToken: required and optional params', async () => { - const response = await client.environments.createEnvironmentToken({ - environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', - }); + const response = await client.environments.createEnvironmentToken({ environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); }); // Mock server tests are disabled diff --git a/tests/api-resources/errors.test.ts b/tests/api-resources/errors.test.ts index ee413092..6786d24a 100644 --- a/tests/api-resources/errors.test.ts +++ b/tests/api-resources/errors.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource errors', () => { // Mock server tests are disabled diff --git a/tests/api-resources/events.test.ts b/tests/api-resources/events.test.ts index 7cfdf0e8..6c87975f 100644 --- a/tests/api-resources/events.test.ts +++ b/tests/api-resources/events.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource events', () => { // Mock server tests are disabled diff --git a/tests/api-resources/gateways.test.ts b/tests/api-resources/gateways.test.ts index 4186e205..8daaf21c 100644 --- a/tests/api-resources/gateways.test.ts +++ b/tests/api-resources/gateways.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource gateways', () => { // Mock server tests are disabled diff --git a/tests/api-resources/groups/groups.test.ts b/tests/api-resources/groups/groups.test.ts index 3798086c..bfbe844d 100644 --- a/tests/api-resources/groups/groups.test.ts +++ b/tests/api-resources/groups/groups.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource groups', () => { // Mock server tests are disabled diff --git a/tests/api-resources/groups/memberships.test.ts b/tests/api-resources/groups/memberships.test.ts index e9d8ad18..8e9bd2a2 100644 --- a/tests/api-resources/groups/memberships.test.ts +++ b/tests/api-resources/groups/memberships.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource memberships', () => { // Mock server tests are disabled @@ -35,9 +32,9 @@ describe('resource memberships', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.groups.memberships.retrieve({ - subject: { id: 'f53d2330-3795-4c5d-a1f3-453121af9c60', principal: 'PRINCIPAL_USER' }, - groupId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + subject: { id: 'f53d2330-3795-4c5d-a1f3-453121af9c60', principal: 'PRINCIPAL_USER' }, + groupId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/groups/role-assignments.test.ts b/tests/api-resources/groups/role-assignments.test.ts index 6b07ee9c..34bccb69 100644 --- a/tests/api-resources/groups/role-assignments.test.ts +++ b/tests/api-resources/groups/role-assignments.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource roleAssignments', () => { // Mock server tests are disabled diff --git a/tests/api-resources/groups/shares.test.ts b/tests/api-resources/groups/shares.test.ts index f86d3d6f..1c5d7dcc 100644 --- a/tests/api-resources/groups/shares.test.ts +++ b/tests/api-resources/groups/shares.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource shares', () => { // Mock server tests are disabled diff --git a/tests/api-resources/identity.test.ts b/tests/api-resources/identity.test.ts index 961c99fb..25aa139b 100644 --- a/tests/api-resources/identity.test.ts +++ b/tests/api-resources/identity.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource identity', () => { // Mock server tests are disabled diff --git a/tests/api-resources/organizations/announcement-banner.test.ts b/tests/api-resources/organizations/announcement-banner.test.ts index 754c8e0f..2bdbef37 100644 --- a/tests/api-resources/organizations/announcement-banner.test.ts +++ b/tests/api-resources/organizations/announcement-banner.test.ts @@ -2,17 +2,12 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource announcementBanner', () => { // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.announcementBanner.update({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.announcementBanner.update({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,17 +20,15 @@ describe('resource announcementBanner', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.announcementBanner.update({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - enabled: false, - message: 'message', - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + enabled: false, + message: 'message', + }); }); // Mock server tests are disabled test.skip('get: only required params', async () => { - const responsePromise = client.organizations.announcementBanner.get({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.announcementBanner.get({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -47,8 +40,6 @@ describe('resource announcementBanner', () => { // Mock server tests are disabled test.skip('get: required and optional params', async () => { - const response = await client.organizations.announcementBanner.get({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const response = await client.organizations.announcementBanner.get({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); }); }); diff --git a/tests/api-resources/organizations/custom-domains.test.ts b/tests/api-resources/organizations/custom-domains.test.ts index 9dc81ff7..1f3ecbe9 100644 --- a/tests/api-resources/organizations/custom-domains.test.ts +++ b/tests/api-resources/organizations/custom-domains.test.ts @@ -2,18 +2,12 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource customDomains', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.organizations.customDomains.create({ - domainName: 'workspaces.acme-corp.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.customDomains.create({ domainName: 'workspaces.acme-corp.com', organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -26,19 +20,17 @@ describe('resource customDomains', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.organizations.customDomains.create({ - domainName: 'workspaces.acme-corp.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - awsAccountId: '123456789012', - cloudAccountId: 'cloudAccountId', - provider: 'CUSTOM_DOMAIN_PROVIDER_AWS', - }); + domainName: 'workspaces.acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + awsAccountId: '123456789012', + cloudAccountId: 'cloudAccountId', + provider: 'CUSTOM_DOMAIN_PROVIDER_AWS', + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.customDomains.retrieve({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.customDomains.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -50,17 +42,12 @@ describe('resource customDomains', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.customDomains.retrieve({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const response = await client.organizations.customDomains.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.customDomains.update({ - domainName: 'workspaces.acme-corp.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.customDomains.update({ domainName: 'workspaces.acme-corp.com', organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -73,19 +60,17 @@ describe('resource customDomains', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.customDomains.update({ - domainName: 'workspaces.acme-corp.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - awsAccountId: '987654321098', - cloudAccountId: 'cloudAccountId', - provider: 'CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED', - }); + domainName: 'workspaces.acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + awsAccountId: '987654321098', + cloudAccountId: 'cloudAccountId', + provider: 'CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED', + }); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.customDomains.delete({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.customDomains.delete({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -97,8 +82,6 @@ describe('resource customDomains', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.customDomains.delete({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const response = await client.organizations.customDomains.delete({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); }); }); diff --git a/tests/api-resources/organizations/domain-verifications.test.ts b/tests/api-resources/organizations/domain-verifications.test.ts index c204dd68..1c859231 100644 --- a/tests/api-resources/organizations/domain-verifications.test.ts +++ b/tests/api-resources/organizations/domain-verifications.test.ts @@ -2,18 +2,12 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.create({ - domain: 'acme-corp.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.domainVerifications.create({ domain: 'acme-corp.com', organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,17 +19,12 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { - const response = await client.organizations.domainVerifications.create({ - domain: 'acme-corp.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const response = await client.organizations.domainVerifications.create({ domain: 'acme-corp.com', organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.retrieve({ - domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.domainVerifications.retrieve({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -47,16 +36,12 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.domainVerifications.retrieve({ - domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const response = await client.organizations.domainVerifications.retrieve({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); }); // Mock server tests are disabled test.skip('list: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.list({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.domainVerifications.list({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -69,18 +54,16 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.organizations.domainVerifications.list({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - token: 'token', - pageSize: 0, - pagination: { token: 'token', pageSize: 20 }, - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + token: 'token', + pageSize: 0, + pagination: { token: 'token', pageSize: 20 }, + }); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.delete({ - domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.domainVerifications.delete({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -92,16 +75,12 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.domainVerifications.delete({ - domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const response = await client.organizations.domainVerifications.delete({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); }); // Mock server tests are disabled test.skip('verify: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.verify({ - domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.domainVerifications.verify({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -113,8 +92,6 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('verify: required and optional params', async () => { - const response = await client.organizations.domainVerifications.verify({ - domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const response = await client.organizations.domainVerifications.verify({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); }); }); diff --git a/tests/api-resources/organizations/invites.test.ts b/tests/api-resources/organizations/invites.test.ts index 5b82ca98..a84ac21f 100644 --- a/tests/api-resources/organizations/invites.test.ts +++ b/tests/api-resources/organizations/invites.test.ts @@ -2,17 +2,12 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource invites', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.organizations.invites.create({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.invites.create({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,16 +19,12 @@ describe('resource invites', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { - const response = await client.organizations.invites.create({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const response = await client.organizations.invites.create({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.invites.retrieve({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }); + const responsePromise = client.organizations.invites.retrieve({ organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,16 +36,12 @@ describe('resource invites', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.invites.retrieve({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }); + const response = await client.organizations.invites.retrieve({ organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }); }); // Mock server tests are disabled test.skip('getSummary: only required params', async () => { - const responsePromise = client.organizations.invites.getSummary({ - inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.invites.getSummary({ inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -66,8 +53,6 @@ describe('resource invites', () => { // Mock server tests are disabled test.skip('getSummary: required and optional params', async () => { - const response = await client.organizations.invites.getSummary({ - inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const response = await client.organizations.invites.getSummary({ inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); }); }); diff --git a/tests/api-resources/organizations/organizations.test.ts b/tests/api-resources/organizations/organizations.test.ts index 89665f2b..21f88fca 100644 --- a/tests/api-resources/organizations/organizations.test.ts +++ b/tests/api-resources/organizations/organizations.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource organizations', () => { // Mock server tests are disabled @@ -23,17 +20,15 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.organizations.create({ - name: 'Acme Corp Engineering', - inviteAccountsWithMatchingDomain: true, - joinOrganization: true, - }); + name: 'Acme Corp Engineering', + inviteAccountsWithMatchingDomain: true, + joinOrganization: true, + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.retrieve({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,16 +40,12 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.retrieve({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const response = await client.organizations.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.update({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.update({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -67,17 +58,15 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.update({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - inviteDomains: { domains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'] }, - name: 'name', - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + inviteDomains: { domains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'] }, + name: 'name', + }); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.delete({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.delete({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -89,9 +78,7 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.delete({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const response = await client.organizations.delete({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); }); // Mock server tests are disabled @@ -125,9 +112,7 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('listMembers: only required params', async () => { - const responsePromise = client.organizations.listMembers({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.listMembers({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -140,28 +125,25 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('listMembers: required and optional params', async () => { const response = await client.organizations.listMembers({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - token: 'token', - pageSize: 0, - filter: { - excludeGroupIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], - excludeMembersInAnyTeam: true, - roles: ['ORGANIZATION_ROLE_UNSPECIFIED'], - search: 'search', - statuses: ['USER_STATUS_UNSPECIFIED'], - userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], - }, - pagination: { token: 'token', pageSize: 20 }, - sort: { field: 'SORT_FIELD_UNSPECIFIED', order: 'SORT_ORDER_UNSPECIFIED' }, - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + token: 'token', + pageSize: 0, + filter: { + excludeGroupIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], + excludeMembersInAnyTeam: true, + roles: ['ORGANIZATION_ROLE_UNSPECIFIED'], + search: 'search', + statuses: ['USER_STATUS_UNSPECIFIED'], + userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], + }, + pagination: { token: 'token', pageSize: 20 }, + sort: { field: 'SORT_FIELD_UNSPECIFIED', order: 'SORT_ORDER_UNSPECIFIED' }, + }); }); // Mock server tests are disabled test.skip('setRole: only required params', async () => { - const responsePromise = client.organizations.setRole({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', - }); + const responsePromise = client.organizations.setRole({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -174,9 +156,9 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('setRole: required and optional params', async () => { const response = await client.organizations.setRole({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', - role: 'ORGANIZATION_ROLE_MEMBER', - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', + role: 'ORGANIZATION_ROLE_MEMBER', + }); }); }); diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 7fd9de1a..34203f92 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -2,17 +2,12 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource policies', () => { // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.policies.retrieve({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.policies.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,16 +19,12 @@ describe('resource policies', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.policies.retrieve({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const response = await client.organizations.policies.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.policies.update({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.policies.update({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -46,44 +37,42 @@ describe('resource policies', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.policies.update({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - agentPolicy: { - commandDenyList: ['string'], - conversationSharingPolicy: 'CONVERSATION_SHARING_POLICY_UNSPECIFIED', - maxSubagentsPerEnvironment: 10, - mcpDisabled: true, - scmToolsAllowedGroupId: 'scmToolsAllowedGroupId', - scmToolsDisabled: true, - }, - allowedEditorIds: ['string'], - allowLocalRunners: true, - defaultEditorId: 'defaultEditorId', - defaultEnvironmentImage: 'defaultEnvironmentImage', - deleteArchivedEnvironmentsAfter: '+9125115.360s', - editorVersionRestrictions: { foo: { allowedVersions: ['string'] } }, - maximumEnvironmentLifetime: '+9125115.360s', - maximumEnvironmentsPerUser: '20', - maximumEnvironmentTimeout: '3600s', - maximumRunningEnvironmentsPerUser: '5', - membersCreateProjects: true, - membersRequireProjects: true, - portSharingDisabled: true, - requireCustomDomainAccess: true, - restrictAccountCreationToScim: true, - securityAgentPolicy: { - crowdstrike: { - additionalOptions: { foo: 'string' }, - cidSecretId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - enabled: true, - image: 'image', - tags: 'tags', - }, - }, - vetoExecPolicy: { - action: 'KERNEL_CONTROLS_ACTION_UNSPECIFIED', - enabled: true, - executables: ['string'], - }, - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + agentPolicy: { + commandDenyList: ['string'], + conversationSharingPolicy: 'CONVERSATION_SHARING_POLICY_UNSPECIFIED', + maxSubagentsPerEnvironment: 10, + mcpDisabled: true, + scmToolsAllowedGroupId: 'scmToolsAllowedGroupId', + scmToolsDisabled: true, + }, + allowedEditorIds: ['string'], + allowLocalRunners: true, + defaultEditorId: 'defaultEditorId', + defaultEnvironmentImage: 'defaultEnvironmentImage', + deleteArchivedEnvironmentsAfter: '+9125115.360s', + editorVersionRestrictions: { foo: { allowedVersions: ['string'] } }, + maximumEnvironmentLifetime: '+9125115.360s', + maximumEnvironmentsPerUser: '20', + maximumEnvironmentTimeout: '3600s', + maximumRunningEnvironmentsPerUser: '5', + membersCreateProjects: true, + membersRequireProjects: true, + portSharingDisabled: true, + requireCustomDomainAccess: true, + restrictAccountCreationToScim: true, + securityAgentPolicy: { crowdstrike: { + additionalOptions: { foo: 'string' }, + cidSecretId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + enabled: true, + image: 'image', + tags: 'tags', + } }, + vetoExecPolicy: { + action: 'KERNEL_CONTROLS_ACTION_UNSPECIFIED', + enabled: true, + executables: ['string'], + }, + }); }); }); diff --git a/tests/api-resources/organizations/scim-configurations.test.ts b/tests/api-resources/organizations/scim-configurations.test.ts index bf121156..de8c02fa 100644 --- a/tests/api-resources/organizations/scim-configurations.test.ts +++ b/tests/api-resources/organizations/scim-configurations.test.ts @@ -2,18 +2,12 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.create({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.scimConfigurations.create({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -26,18 +20,16 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.organizations.scimConfigurations.create({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - name: 'name', - tokenExpiresIn: '+9125115.360s', - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + name: 'name', + tokenExpiresIn: '+9125115.360s', + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.retrieve({ - scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.scimConfigurations.retrieve({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -49,16 +41,12 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.scimConfigurations.retrieve({ - scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const response = await client.organizations.scimConfigurations.retrieve({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.update({ - scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.scimConfigurations.update({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -71,11 +59,11 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.scimConfigurations.update({ - scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - enabled: false, - name: 'name', - ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }); + scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + enabled: false, + name: 'name', + ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }); }); // Mock server tests are disabled @@ -92,9 +80,7 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.delete({ - scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.scimConfigurations.delete({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -106,16 +92,12 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.scimConfigurations.delete({ - scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const response = await client.organizations.scimConfigurations.delete({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); }); // Mock server tests are disabled test.skip('regenerateToken: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.regenerateToken({ - scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.scimConfigurations.regenerateToken({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -127,9 +109,6 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('regenerateToken: required and optional params', async () => { - const response = await client.organizations.scimConfigurations.regenerateToken({ - scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - tokenExpiresIn: '+9125115.360s', - }); + const response = await client.organizations.scimConfigurations.regenerateToken({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', tokenExpiresIn: '+9125115.360s' }); }); }); diff --git a/tests/api-resources/organizations/sso-configurations.test.ts b/tests/api-resources/organizations/sso-configurations.test.ts index e6304844..34d6b6c1 100644 --- a/tests/api-resources/organizations/sso-configurations.test.ts +++ b/tests/api-resources/organizations/sso-configurations.test.ts @@ -2,20 +2,17 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.organizations.ssoConfigurations.create({ - clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', - clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', - issuerUrl: 'https://accounts.google.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', + clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', + issuerUrl: 'https://accounts.google.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -28,23 +25,21 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.create({ - clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', - clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', - issuerUrl: 'https://accounts.google.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - additionalScopes: ['x'], - claimsExpression: 'claimsExpression', - displayName: 'displayName', - emailDomain: 'acme-corp.com', - emailDomains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'], - }); + clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', + clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', + issuerUrl: 'https://accounts.google.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + additionalScopes: ['x'], + claimsExpression: 'claimsExpression', + displayName: 'displayName', + emailDomain: 'acme-corp.com', + emailDomains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'], + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.ssoConfigurations.retrieve({ - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.ssoConfigurations.retrieve({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -56,16 +51,12 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.ssoConfigurations.retrieve({ - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const response = await client.organizations.ssoConfigurations.retrieve({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.ssoConfigurations.update({ - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.ssoConfigurations.update({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -78,25 +69,23 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.update({ - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - additionalScopes: { scopes: ['x'] }, - claims: { foo: 'string' }, - claimsExpression: 'claimsExpression', - clientId: 'new-client-id', - clientSecret: 'new-client-secret', - displayName: 'displayName', - emailDomain: 'xxxx', - emailDomains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'], - issuerUrl: 'https://example.com', - state: 'SSO_CONFIGURATION_STATE_UNSPECIFIED', - }); + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + additionalScopes: { scopes: ['x'] }, + claims: { foo: 'string' }, + claimsExpression: 'claimsExpression', + clientId: 'new-client-id', + clientSecret: 'new-client-secret', + displayName: 'displayName', + emailDomain: 'xxxx', + emailDomains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'], + issuerUrl: 'https://example.com', + state: 'SSO_CONFIGURATION_STATE_UNSPECIFIED', + }); }); // Mock server tests are disabled test.skip('list: only required params', async () => { - const responsePromise = client.organizations.ssoConfigurations.list({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.organizations.ssoConfigurations.list({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -109,18 +98,16 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.list({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - token: 'token', - pageSize: 0, - pagination: { token: 'token', pageSize: 20 }, - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + token: 'token', + pageSize: 0, + pagination: { token: 'token', pageSize: 20 }, + }); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.ssoConfigurations.delete({ - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const responsePromise = client.organizations.ssoConfigurations.delete({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -132,8 +119,6 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.ssoConfigurations.delete({ - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + const response = await client.organizations.ssoConfigurations.delete({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); }); }); diff --git a/tests/api-resources/prebuilds.test.ts b/tests/api-resources/prebuilds.test.ts index 9308e71c..ffbfeb59 100644 --- a/tests/api-resources/prebuilds.test.ts +++ b/tests/api-resources/prebuilds.test.ts @@ -2,18 +2,15 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.prebuilds.create({ - projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - spec: {}, - }); + projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + spec: {}, + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -26,14 +23,14 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.prebuilds.create({ - projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - spec: { - desiredPhase: 'PREBUILD_PHASE_UNSPECIFIED', - specVersion: 'specVersion', - timeout: '3600s', - }, - environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }); + projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + spec: { + desiredPhase: 'PREBUILD_PHASE_UNSPECIFIED', + specVersion: 'specVersion', + timeout: '3600s', + }, + environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }); }); // Mock server tests are disabled @@ -101,9 +98,7 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('createLogsToken: only required params', async () => { - const responsePromise = client.prebuilds.createLogsToken({ - prebuildId: '07e03a28-65a5-4d98-b532-8ea67b188048', - }); + const responsePromise = client.prebuilds.createLogsToken({ prebuildId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -115,17 +110,12 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('createLogsToken: required and optional params', async () => { - const response = await client.prebuilds.createLogsToken({ - prebuildId: '07e03a28-65a5-4d98-b532-8ea67b188048', - }); + const response = await client.prebuilds.createLogsToken({ prebuildId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); }); // Mock server tests are disabled test.skip('createWarmPool: only required params', async () => { - const responsePromise = client.prebuilds.createWarmPool({ - environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + const responsePromise = client.prebuilds.createWarmPool({ environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -138,19 +128,17 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('createWarmPool: required and optional params', async () => { const response = await client.prebuilds.createWarmPool({ - environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - desiredSize: 2, - maxSize: 1, - minSize: 20, - }); + environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + desiredSize: 2, + maxSize: 1, + minSize: 20, + }); }); // Mock server tests are disabled test.skip('deleteWarmPool: only required params', async () => { - const responsePromise = client.prebuilds.deleteWarmPool({ - warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', - }); + const responsePromise = client.prebuilds.deleteWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -162,9 +150,7 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('deleteWarmPool: required and optional params', async () => { - const response = await client.prebuilds.deleteWarmPool({ - warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', - }); + const response = await client.prebuilds.deleteWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); }); // Mock server tests are disabled @@ -181,9 +167,7 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('retrieveWarmPool: only required params', async () => { - const responsePromise = client.prebuilds.retrieveWarmPool({ - warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', - }); + const responsePromise = client.prebuilds.retrieveWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -195,16 +179,12 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('retrieveWarmPool: required and optional params', async () => { - const response = await client.prebuilds.retrieveWarmPool({ - warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', - }); + const response = await client.prebuilds.retrieveWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); }); // Mock server tests are disabled test.skip('updateWarmPool: only required params', async () => { - const responsePromise = client.prebuilds.updateWarmPool({ - warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', - }); + const responsePromise = client.prebuilds.updateWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -217,10 +197,10 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('updateWarmPool: required and optional params', async () => { const response = await client.prebuilds.updateWarmPool({ - warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', - desiredSize: 5, - maxSize: 1, - minSize: 20, - }); + warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', + desiredSize: 5, + maxSize: 1, + minSize: 20, + }); }); }); diff --git a/tests/api-resources/projects/environment-clases.test.ts b/tests/api-resources/projects/environment-clases.test.ts index bd248651..76b09828 100644 --- a/tests/api-resources/projects/environment-clases.test.ts +++ b/tests/api-resources/projects/environment-clases.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource environmentClases', () => { // Mock server tests are disabled diff --git a/tests/api-resources/projects/policies.test.ts b/tests/api-resources/projects/policies.test.ts index 7a394d6c..41c45bca 100644 --- a/tests/api-resources/projects/policies.test.ts +++ b/tests/api-resources/projects/policies.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource policies', () => { // Mock server tests are disabled diff --git a/tests/api-resources/projects/projects.test.ts b/tests/api-resources/projects/projects.test.ts index 7de717d1..5c11639c 100644 --- a/tests/api-resources/projects/projects.test.ts +++ b/tests/api-resources/projects/projects.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource projects', () => { // Mock server tests are disabled @@ -23,33 +20,29 @@ describe('resource projects', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.projects.create({ - initializer: { - specs: [ - { - contextUrl: { url: 'https://example.com' }, - git: { - checkoutLocation: 'checkoutLocation', - cloneTarget: 'cloneTarget', - remoteUri: 'https://github.com/org/repo', - targetMode: 'CLONE_TARGET_MODE_UNSPECIFIED', - upstreamRemoteUri: 'upstreamRemoteUri', - }, - }, - ], - }, - automationsFilePath: 'automationsFilePath', - devcontainerFilePath: 'devcontainerFilePath', - name: 'Web Application', - prebuildConfiguration: { - enabled: true, - enableJetbrainsWarmup: true, - environmentClassIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], - executor: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' }, - timeout: '+9125115.360s', - trigger: { dailySchedule: { hourUtc: 23 } }, - }, - technicalDescription: 'technicalDescription', - }); + initializer: { specs: [{ + contextUrl: { url: 'https://example.com' }, + git: { + checkoutLocation: 'checkoutLocation', + cloneTarget: 'cloneTarget', + remoteUri: 'https://github.com/org/repo', + targetMode: 'CLONE_TARGET_MODE_UNSPECIFIED', + upstreamRemoteUri: 'upstreamRemoteUri', + }, + }] }, + automationsFilePath: 'automationsFilePath', + devcontainerFilePath: 'devcontainerFilePath', + name: 'Web Application', + prebuildConfiguration: { + enabled: true, + enableJetbrainsWarmup: true, + environmentClassIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], + executor: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' }, + timeout: '+9125115.360s', + trigger: { dailySchedule: { hourUtc: 23 } }, + }, + technicalDescription: 'technicalDescription', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/configurations.test.ts b/tests/api-resources/runners/configurations/configurations.test.ts index 5c85a81f..9a9e4ec2 100644 --- a/tests/api-resources/runners/configurations/configurations.test.ts +++ b/tests/api-resources/runners/configurations/configurations.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource configurations', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/environment-classes.test.ts b/tests/api-resources/runners/configurations/environment-classes.test.ts index 14262aca..d00909dd 100644 --- a/tests/api-resources/runners/configurations/environment-classes.test.ts +++ b/tests/api-resources/runners/configurations/environment-classes.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource environmentClasses', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/host-authentication-tokens.test.ts b/tests/api-resources/runners/configurations/host-authentication-tokens.test.ts index 5f9d135d..110d607c 100644 --- a/tests/api-resources/runners/configurations/host-authentication-tokens.test.ts +++ b/tests/api-resources/runners/configurations/host-authentication-tokens.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource hostAuthenticationTokens', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/schema.test.ts b/tests/api-resources/runners/configurations/schema.test.ts index 006eb617..316cb444 100644 --- a/tests/api-resources/runners/configurations/schema.test.ts +++ b/tests/api-resources/runners/configurations/schema.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource schema', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/scm-integrations.test.ts b/tests/api-resources/runners/configurations/scm-integrations.test.ts index 9aa22598..78ecf6a1 100644 --- a/tests/api-resources/runners/configurations/scm-integrations.test.ts +++ b/tests/api-resources/runners/configurations/scm-integrations.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource scmIntegrations', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/policies.test.ts b/tests/api-resources/runners/policies.test.ts index 8a1fcd5a..95fac404 100644 --- a/tests/api-resources/runners/policies.test.ts +++ b/tests/api-resources/runners/policies.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource policies', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/runners.test.ts b/tests/api-resources/runners/runners.test.ts index 8fae36b4..d23126ee 100644 --- a/tests/api-resources/runners/runners.test.ts +++ b/tests/api-resources/runners/runners.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource runners', () => { // Mock server tests are disabled diff --git a/tests/api-resources/secrets.test.ts b/tests/api-resources/secrets.test.ts index 1d657a98..833f0aa7 100644 --- a/tests/api-resources/secrets.test.ts +++ b/tests/api-resources/secrets.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource secrets', () => { // Mock server tests are disabled diff --git a/tests/api-resources/usage.test.ts b/tests/api-resources/usage.test.ts index 5fc407b3..77f85ca6 100644 --- a/tests/api-resources/usage.test.ts +++ b/tests/api-resources/usage.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource usage', () => { // Mock server tests are disabled diff --git a/tests/api-resources/users/dotfiles.test.ts b/tests/api-resources/users/dotfiles.test.ts index 55f4ed54..c2e381f0 100644 --- a/tests/api-resources/users/dotfiles.test.ts +++ b/tests/api-resources/users/dotfiles.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource dotfiles', () => { // Mock server tests are disabled diff --git a/tests/api-resources/users/pats.test.ts b/tests/api-resources/users/pats.test.ts index 2c4b2bbc..c3790ac3 100644 --- a/tests/api-resources/users/pats.test.ts +++ b/tests/api-resources/users/pats.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource pats', () => { // Mock server tests are disabled diff --git a/tests/api-resources/users/users.test.ts b/tests/api-resources/users/users.test.ts index 4d1f2e32..3ebdb693 100644 --- a/tests/api-resources/users/users.test.ts +++ b/tests/api-resources/users/users.test.ts @@ -2,10 +2,7 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource users', () => { // Mock server tests are disabled diff --git a/tests/index.test.ts b/tests/index.test.ts index 6acc8cc9..b0a4eabf 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -21,10 +21,10 @@ describe('instantiate client', () => { describe('defaultHeaders', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-My-Default-Header': '2' }, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-My-Default-Header': '2' }, + bearerToken: 'My Bearer Token', +}) test('they are used in the request', async () => { const { req } = await client.buildRequest({ path: '/foo', method: 'post' }); @@ -49,193 +49,191 @@ describe('instantiate client', () => { expect(req.headers.has('x-my-default-header')).toBe(false); }); }); - describe('logging', () => { - const env = process.env; +describe('logging', () => { + const env = process.env; - beforeEach(() => { - process.env = { ...env }; - process.env['GITPOD_LOG'] = undefined; - }); + beforeEach(() => { + process.env = { ...env }; + process.env['GITPOD_LOG'] = undefined; + }); - afterEach(() => { - process.env = env; - }); + afterEach(() => { + process.env = env; + }); - const forceAPIResponseForClient = async (client: Gitpod) => { - await new APIPromise( - client, - Promise.resolve({ - response: new Response(), - controller: new AbortController(), - requestLogID: 'log_000000', - retryOfRequestLogID: undefined, - startTime: Date.now(), - options: { - method: 'get', - path: '/', - }, - }), - ); + const forceAPIResponseForClient = async (client: Gitpod) => { + await new APIPromise( + client, + Promise.resolve({ + response: new Response(), + controller: new AbortController(), + requestLogID: 'log_000000', + retryOfRequestLogID: undefined, + startTime: Date.now(), + options: { + method: 'get', + path: '/', + }, + }), + ); + }; + + test('debug logs when log level is debug', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), }; - test('debug logs when log level is debug', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; - - const client = new Gitpod({ - logger: logger, - logLevel: 'debug', - bearerToken: 'My Bearer Token', - }); + const client = new Gitpod({ + logger: logger, + logLevel: 'debug', + bearerToken: 'My Bearer Token', +}); - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - test('default logLevel is warn', async () => { - const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.logLevel).toBe('warn'); - }); + test('default logLevel is warn', async () => { + const client = new Gitpod({ bearerToken: 'My Bearer Token' }); + expect(client.logLevel).toBe('warn'); + }); - test('debug logs are skipped when log level is info', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('debug logs are skipped when log level is info', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - const client = new Gitpod({ - logger: logger, - logLevel: 'info', - bearerToken: 'My Bearer Token', - }); + const client = new Gitpod({ + logger: logger, + logLevel: 'info', + bearerToken: 'My Bearer Token', +}); - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - test('debug logs happen with debug env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('debug logs happen with debug env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - process.env['GITPOD_LOG'] = 'debug'; - const client = new Gitpod({ logger: logger, bearerToken: 'My Bearer Token' }); - expect(client.logLevel).toBe('debug'); + process.env['GITPOD_LOG'] = 'debug'; + const client = new Gitpod({ logger: logger, bearerToken: 'My Bearer Token' }); + expect(client.logLevel).toBe('debug'); - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - test('warn when env var level is invalid', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + test('warn when env var level is invalid', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; - process.env['GITPOD_LOG'] = 'not a log level'; - const client = new Gitpod({ logger: logger, bearerToken: 'My Bearer Token' }); - expect(client.logLevel).toBe('warn'); - expect(warnMock).toHaveBeenCalledWith( - 'process.env[\'GITPOD_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]', - ); - }); + process.env['GITPOD_LOG'] = 'not a log level'; + const client = new Gitpod({ logger: logger, bearerToken: 'My Bearer Token' }); + expect(client.logLevel).toBe('warn'); + expect(warnMock).toHaveBeenCalledWith('process.env[\'GITPOD_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]'); + }); - test('client log level overrides env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('client log level overrides env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - process.env['GITPOD_LOG'] = 'debug'; - const client = new Gitpod({ - logger: logger, - logLevel: 'off', - bearerToken: 'My Bearer Token', - }); + process.env['GITPOD_LOG'] = 'debug'; + const client = new Gitpod({ + logger: logger, + logLevel: 'off', + bearerToken: 'My Bearer Token', +}); - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - test('no warning logged for invalid env var level + valid client level', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + test('no warning logged for invalid env var level + valid client level', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; - process.env['GITPOD_LOG'] = 'not a log level'; - const client = new Gitpod({ - logger: logger, - logLevel: 'debug', - bearerToken: 'My Bearer Token', - }); - expect(client.logLevel).toBe('debug'); - expect(warnMock).not.toHaveBeenCalled(); - }); + process.env['GITPOD_LOG'] = 'not a log level'; + const client = new Gitpod({ + logger: logger, + logLevel: 'debug', + bearerToken: 'My Bearer Token', +}); + expect(client.logLevel).toBe('debug'); + expect(warnMock).not.toHaveBeenCalled(); }); +}); describe('defaultQuery', () => { test('with null query params given', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo' }, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo' }, + bearerToken: 'My Bearer Token', +}); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo'); }); test('multiple default query params', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo', hello: 'world' }, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo', hello: 'world' }, + bearerToken: 'My Bearer Token', +}); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo&hello=world'); }); test('overriding with `undefined`', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultQuery: { hello: 'world' }, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultQuery: { hello: 'world' }, + bearerToken: 'My Bearer Token', +}) expect(client.buildURL('/foo', { hello: undefined })).toEqual('http://localhost:5000/foo'); }); }); test('custom fetch', async () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - bearerToken: 'My Bearer Token', - fetch: (url) => { - return Promise.resolve( - new Response(JSON.stringify({ url, custom: true }), { - headers: { 'Content-Type': 'application/json' }, - }), - ); - }, - }); + baseURL: 'http://localhost:5000/', + bearerToken: 'My Bearer Token', + fetch: (url) => { + return Promise.resolve( + new Response(JSON.stringify({ url, custom: true }), { + headers: { 'Content-Type': 'application/json' }, + }), + ); +}, +}); const response = await client.get('/foo'); expect(response).toEqual({ url: 'http://localhost:5000/foo', custom: true }); @@ -244,35 +242,37 @@ describe('instantiate client', () => { test('explicit global fetch', async () => { // make sure the global fetch type is assignable to our Fetch type const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - bearerToken: 'My Bearer Token', - fetch: defaultFetch, - }); + baseURL: 'http://localhost:5000/', + bearerToken: 'My Bearer Token', + fetch: defaultFetch, +}); }); test('custom signal', async () => { const client = new Gitpod({ - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', - bearerToken: 'My Bearer Token', - fetch: (...args) => { - return new Promise((resolve, reject) => - setTimeout( - () => - defaultFetch(...args) - .then(resolve) - .catch(reject), - 300, - ), - ); - }, - }); + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + bearerToken: 'My Bearer Token', + fetch: (...args) => { + return new Promise((resolve, reject) => + setTimeout( + () => + defaultFetch(...args) + .then(resolve) + .catch(reject), + 300, + ), + ); +}, +}); const controller = new AbortController(); setTimeout(() => controller.abort(), 200); const spy = jest.spyOn(client, 'request'); - await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError(APIUserAbortError); + await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError( + APIUserAbortError, + ); expect(spy).toHaveBeenCalledTimes(1); }); @@ -284,10 +284,10 @@ describe('instantiate client', () => { }; const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - bearerToken: 'My Bearer Token', - fetch: testFetch, - }); + baseURL: 'http://localhost:5000/', + bearerToken: 'My Bearer Token', + fetch: testFetch, +}); await client.patch('/foo'); expect(capturedRequest?.method).toEqual('PATCH'); @@ -295,18 +295,12 @@ describe('instantiate client', () => { describe('baseUrl', () => { test('trailing slash', () => { - const client = new Gitpod({ - baseURL: 'http://localhost:5000/custom/path/', - bearerToken: 'My Bearer Token', - }); + const client = new Gitpod({ baseURL: 'http://localhost:5000/custom/path/', bearerToken: 'My Bearer Token' }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); test('no trailing slash', () => { - const client = new Gitpod({ - baseURL: 'http://localhost:5000/custom/path', - bearerToken: 'My Bearer Token', - }); + const client = new Gitpod({ baseURL: 'http://localhost:5000/custom/path', bearerToken: 'My Bearer Token' }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); @@ -328,35 +322,29 @@ describe('instantiate client', () => { test('empty env variable', () => { process.env['GITPOD_BASE_URL'] = ''; // empty const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.baseURL).toEqual('https://app.gitpod.io/api'); + expect(client.baseURL).toEqual('https://app.gitpod.io/api') }); test('blank env variable', () => { process.env['GITPOD_BASE_URL'] = ' '; // blank const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.baseURL).toEqual('https://app.gitpod.io/api'); + expect(client.baseURL).toEqual('https://app.gitpod.io/api') }); test('in request options', () => { const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( - 'http://localhost:5000/option/foo', - ); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/option/foo'); }); test('in request options overridden by client options', () => { const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: 'http://localhost:5000/client' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( - 'http://localhost:5000/client/foo', - ); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/client/foo'); }); test('in request options overridden by env variable', () => { process.env['GITPOD_BASE_URL'] = 'http://localhost:5000/env'; const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( - 'http://localhost:5000/env/foo', - ); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/env/foo'); }); }); @@ -372,10 +360,10 @@ describe('instantiate client', () => { describe('withOptions', () => { test('creates a new client with overridden options', async () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - maxRetries: 3, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + maxRetries: 3, + bearerToken: 'My Bearer Token', + }); const newClient = client.withOptions({ maxRetries: 5, @@ -397,11 +385,11 @@ describe('instantiate client', () => { test('inherits options from the parent client', async () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-Test-Header': 'test-value' }, - defaultQuery: { 'test-param': 'test-value' }, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-Test-Header': 'test-value' }, + defaultQuery: { 'test-param': 'test-value' }, + bearerToken: 'My Bearer Token', + }); const newClient = client.withOptions({ baseURL: 'http://localhost:5001/', @@ -416,10 +404,10 @@ describe('instantiate client', () => { test('respects runtime property changes when creating new client', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - timeout: 1000, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + timeout: 1000, + bearerToken: 'My Bearer Token', + }); // Modify the client properties directly after creation client.baseURL = 'http://localhost:6000/'; @@ -465,18 +453,13 @@ describe('request building', () => { describe('custom headers', () => { test('handles undefined', async () => { - const { req } = await client.buildRequest({ - path: '/foo', - method: 'post', - body: { value: 'hello' }, - headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null }, - }); + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: { value: 'hello' }, headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null } }); expect(req.headers.get('x-foo')).toEqual('bar'); expect(req.headers.get('x-Foo')).toEqual('bar'); expect(req.headers.get('X-Foo')).toEqual('bar'); expect(req.headers.get('x-baz')).toEqual(null); }); - }); + }) }); describe('default encoder', () => { @@ -553,40 +536,37 @@ describe('default encoder', () => { describe('retries', () => { test('retry on timeout', async () => { let count = 0; - const testFetch = async ( - url: string | URL | Request, - { signal }: RequestInit = {}, - ): Promise => { - if (count++ === 0) { - return new Promise( - (resolve, reject) => signal?.addEventListener('abort', () => reject(new Error('timed out'))), - ); - } - return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); - }; - - const client = new Gitpod({ - bearerToken: 'My Bearer Token', - timeout: 10, - fetch: testFetch, - }); + const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { + if (count++ === 0) { + return new Promise((resolve, reject) => + signal?.addEventListener('abort', () => reject(new Error('timed out'))), + ); + } + return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); + }; - expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); - expect(count).toEqual(2); - expect( - await client - .request({ path: '/foo', method: 'get' }) - .asResponse() - .then((r) => r.text()), - ).toEqual(JSON.stringify({ a: 1 })); - expect(count).toEqual(3); + const client = new Gitpod({ + bearerToken: 'My Bearer Token', + timeout: 10, + fetch: testFetch, }); + expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); + expect(count).toEqual(2); + expect( + await client + .request({ path: '/foo', method: 'get' }) + .asResponse() + .then((r) => r.text()), + ).toEqual(JSON.stringify({ a: 1 })); + expect(count).toEqual(3); + }); + test('retry count header', async () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -600,10 +580,10 @@ describe('retries', () => { }; const client = new Gitpod({ - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); @@ -615,7 +595,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -628,10 +608,10 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new Gitpod({ - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -648,7 +628,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -661,11 +641,11 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new Gitpod({ - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - defaultHeaders: { 'X-Stainless-Retry-Count': null }, - }); + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + defaultHeaders: { 'X-Stainless-Retry-Count': null }, + }); expect( await client.request({ @@ -681,7 +661,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -694,10 +674,10 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new Gitpod({ - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -712,10 +692,7 @@ describe('retries', () => { test('retry on 429 with retry-after', async () => { let count = 0; - const testFetch = async ( - url: string | URL | Request, - { signal }: RequestInit = {}, - ): Promise => { + const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, @@ -742,10 +719,7 @@ describe('retries', () => { test('retry on 429 with retry-after-ms', async () => { let count = 0; - const testFetch = async ( - url: string | URL | Request, - { signal }: RequestInit = {}, - ): Promise => { + const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts index e60a5e41..c33786c1 100644 --- a/tests/stringifyQuery.test.ts +++ b/tests/stringifyQuery.test.ts @@ -2,26 +2,24 @@ import { stringifyQuery } from '@gitpod/sdk/internal/utils/query'; -describe(stringifyQuery, () => { - for (const [input, expected] of [ - [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], - [{ a: null, b: false, c: undefined }, 'a=&b=false'], - [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], - [ - { 'a/b': 'c/d', 'e=f': 'g&h' }, - `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( - 'e=f', - )}=${encodeURIComponent('g&h')}`, - ], - ] as const) { - it(`${JSON.stringify(input)} -> ${expected}`, () => { - expect(stringifyQuery(input)).toEqual(expected); - }); - } +describe(stringifyQuery, () => { for (const [input, expected] of [ + [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], + [{ a: null, b: false, c: undefined }, 'a=&b=false'], + [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], + [ + { 'a/b': 'c/d', 'e=f': 'g&h' }, + `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( + 'e=f', + )}=${encodeURIComponent('g&h')}`, + ], +] as const) { + it(`${JSON.stringify(input)} -> ${expected}`, () => { + expect(stringifyQuery(input)).toEqual(expected); + }); +} - for (const value of [[], {}, new Date()]) { - it(`${JSON.stringify(value)} -> `, () => { - expect(() => stringifyQuery({ value })).toThrow(`Cannot stringify type ${typeof value}`); - }); - } -}); +for (const value of [[], {}, new Date()]) { + it(`${JSON.stringify(value)} -> `, () => { + expect(() => stringifyQuery({ value })).toThrow(`Cannot stringify type ${typeof value}`); + }); +} }) diff --git a/yarn.lock b/yarn.lock index 7c98e7ac..a55ecda1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -709,11 +709,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/core@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.4.tgz#d897170a2b0ba51f78a099edccd968f7b103387c" - integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw== - "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -1591,14 +1586,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-plugin-prettier@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.1.tgz#99b55d7dd70047886b2222fdd853665f180b36af" - integrity sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg== - dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.11.7" - eslint-plugin-unused-imports@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738" @@ -1750,11 +1737,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" - integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== - fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -2934,13 +2916,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - prettier@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" @@ -3263,13 +3238,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.11.7: - version "0.11.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.8.tgz#b2aaae998a4ef47ded60773ad06e7cb821f55457" - integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A== - dependencies: - "@pkgr/core" "^0.2.4" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" From 1bf5acf46b5c62472e49f33c3926edde83ffd813 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:08:01 +0000 Subject: [PATCH 047/217] 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 a6b0e65406ffbfeb728978ce040f25e3b20a490d 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:15 +0000 Subject: [PATCH 048/217] 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 3e90e745e1a3929292bef99678be2b6e18363b4b 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:42 +0000 Subject: [PATCH 049/217] feat(api): add readinessTimeout to automations and services --- .stats.yml | 4 +- .../environments/automations/automations.ts | 61 +++++++++++++++++ .../environments/automations/services.ts | 67 +++++++++++++++++++ 3 files changed, 130 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/resources/environments/automations/automations.ts b/src/resources/environments/automations/automations.ts index a9dcef4b..3add8697 100644 --- a/src/resources/environments/automations/automations.ts +++ b/src/resources/environments/automations/automations.ts @@ -103,6 +103,67 @@ export namespace AutomationsFile { name?: string; + /** + * 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". + */ + readinessTimeout?: string; + role?: '' | 'default' | 'editor' | 'ai-agent'; runsOn?: Shared.RunsOn; diff --git a/src/resources/environments/automations/services.ts b/src/resources/environments/automations/services.ts index 45632e89..31bf1f9e 100644 --- a/src/resources/environments/automations/services.ts +++ b/src/resources/environments/automations/services.ts @@ -405,6 +405,12 @@ export interface ServiceSpec { */ env?: Array; + /** + * readiness_timeout is the maximum duration a service may remain in the Starting + * phase while readiness checks run. 0s disables the timeout. + */ + readinessTimeout?: string; + /** * runs_on specifies the environment the service should run on. */ @@ -574,6 +580,67 @@ export namespace ServiceUpdateParams { env?: Array; + /** + * 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". + */ + readinessTimeout?: string; + runsOn?: Shared.RunsOn | null; } From 48f2a338978c2d92deee0da0cd3f74e202fe4356 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:43 +0000 Subject: [PATCH 050/217] 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 f0055f7c6bb9420bc0ae3c6267651393832213f3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 20:31:24 +0000 Subject: [PATCH 051/217] chore(internal): codegen related update --- eslint.config.mjs | 3 + package.json | 1 + scripts/fast-format | 6 +- scripts/format | 3 +- scripts/lint | 3 - scripts/utils/postprocess-files.cjs | 9 +- src/api-promise.ts | 2 +- src/client.ts | 1798 ++++++++++------- src/core/api-promise.ts | 9 +- src/core/error.ts | 45 +- src/core/pagination.ts | 377 +++- src/error.ts | 2 +- src/index.ts | 16 +- src/internal/builtin-types.ts | 23 +- src/internal/detect-platform.ts | 6 +- src/internal/errors.ts | 14 +- src/internal/headers.ts | 4 +- src/internal/parse.ts | 12 +- src/internal/request-options.ts | 6 +- src/internal/shim-types.ts | 4 +- src/internal/shims.ts | 4 +- src/internal/to-file.ts | 14 +- src/internal/types.ts | 50 +- src/internal/utils/log.ts | 37 +- src/internal/utils/uuid.ts | 8 +- src/pagination.ts | 2 +- src/resource.ts | 2 +- src/resources/accounts.ts | 64 +- src/resources/agents.ts | 162 +- src/resources/automations.ts | 205 +- src/resources/editors.ts | 13 +- .../environments/automations/automations.ts | 50 +- .../environments/automations/index.ts | 46 +- .../environments/automations/services.ts | 38 +- .../automations/tasks/executions.ts | 29 +- .../environments/automations/tasks/index.ts | 24 +- .../environments/automations/tasks/tasks.ts | 27 +- src/resources/environments/classes.ts | 25 +- src/resources/environments/environments.ts | 196 +- src/resources/environments/index.ts | 48 +- src/resources/errors.ts | 12 +- src/resources/events.ts | 40 +- src/resources/gateways.ts | 20 +- src/resources/groups/groups.ts | 53 +- src/resources/groups/index.ts | 47 +- src/resources/groups/memberships.ts | 20 +- src/resources/groups/role-assignments.ts | 24 +- src/resources/groups/shares.ts | 6 +- src/resources/identity.ts | 19 +- src/resources/index.ts | 371 +++- .../organizations/announcement-banner.ts | 12 +- src/resources/organizations/custom-domains.ts | 14 +- .../organizations/domain-verifications.ts | 45 +- src/resources/organizations/index.ts | 125 +- src/resources/organizations/invites.ts | 7 +- src/resources/organizations/organizations.ts | 158 +- src/resources/organizations/policies.ts | 19 +- .../organizations/scim-configurations.ts | 45 +- .../organizations/sso-configurations.ts | 38 +- src/resources/prebuilds.ts | 88 +- src/resources/projects/environment-clases.ts | 30 +- src/resources/projects/index.ts | 49 +- src/resources/projects/policies.ts | 25 +- src/resources/projects/projects.ts | 59 +- .../runners/configurations/configurations.ts | 70 +- .../configurations/environment-classes.ts | 50 +- .../host-authentication-tokens.ts | 56 +- src/resources/runners/configurations/index.ts | 59 +- .../runners/configurations/schema.ts | 7 +- .../configurations/scm-integrations.ts | 46 +- src/resources/runners/index.ts | 67 +- src/resources/runners/policies.ts | 21 +- src/resources/runners/runners.ts | 159 +- src/resources/secrets.ts | 17 +- src/resources/shared.ts | 203 +- src/resources/usage.ts | 17 +- src/resources/users/dotfiles.ts | 4 +- src/resources/users/index.ts | 33 +- src/resources/users/pats.ts | 25 +- src/resources/users/users.ts | 35 +- src/uploads.ts | 2 +- src/version.ts | 2 +- tests/api-resources/accounts.test.ts | 27 +- tests/api-resources/agents.test.ts | 5 +- tests/api-resources/automations.test.ts | 125 +- tests/api-resources/editors.test.ts | 23 +- .../automations/automations.test.ts | 5 +- .../environments/automations/services.test.ts | 5 +- .../automations/tasks/executions.test.ts | 5 +- .../automations/tasks/tasks.test.ts | 5 +- .../environments/classes.test.ts | 5 +- .../environments/environments.test.ts | 21 +- tests/api-resources/errors.test.ts | 5 +- tests/api-resources/events.test.ts | 5 +- tests/api-resources/gateways.test.ts | 5 +- tests/api-resources/groups/groups.test.ts | 5 +- .../api-resources/groups/memberships.test.ts | 11 +- .../groups/role-assignments.test.ts | 5 +- tests/api-resources/groups/shares.test.ts | 5 +- tests/api-resources/identity.test.ts | 5 +- .../organizations/announcement-banner.test.ts | 25 +- .../organizations/custom-domains.test.ts | 55 +- .../domain-verifications.test.ts | 53 +- .../organizations/invites.test.ts | 29 +- .../organizations/organizations.test.ts | 86 +- .../organizations/policies.test.ts | 93 +- .../organizations/scim-configurations.test.ts | 59 +- .../organizations/sso-configurations.test.ts | 93 +- tests/api-resources/prebuilds.test.ts | 82 +- .../projects/environment-clases.test.ts | 5 +- tests/api-resources/projects/policies.test.ts | 5 +- tests/api-resources/projects/projects.test.ts | 55 +- .../configurations/configurations.test.ts | 5 +- .../environment-classes.test.ts | 5 +- .../host-authentication-tokens.test.ts | 5 +- .../runners/configurations/schema.test.ts | 5 +- .../configurations/scm-integrations.test.ts | 5 +- tests/api-resources/runners/policies.test.ts | 5 +- tests/api-resources/runners/runners.test.ts | 5 +- tests/api-resources/secrets.test.ts | 5 +- tests/api-resources/usage.test.ts | 5 +- tests/api-resources/users/dotfiles.test.ts | 5 +- tests/api-resources/users/pats.test.ts | 5 +- tests/api-resources/users/users.test.ts | 5 +- tests/index.test.ts | 508 ++--- tests/stringifyQuery.test.ts | 42 +- yarn.lock | 32 + 127 files changed, 5128 insertions(+), 2012 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0fd72164..a73ce380 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,6 +1,7 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; +import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -13,9 +14,11 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, + prettier, }, rules: { 'no-unused-vars': 'off', + 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index 2b4ce03a..7364c376 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.39.1", + "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", diff --git a/scripts/fast-format b/scripts/fast-format index e1723136..53721ac0 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,8 +31,10 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -PRETTIER_FILES="$(grep '\.\([mc]?tsx?\|[mc]?jsx?\|json\)$' "$FILE_LIST" || true)" +# format things eslint didn't +PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" if ! [ -z "$PRETTIER_FILES" ]; then echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ + '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' fi diff --git a/scripts/format b/scripts/format index b1b2c17a..7a756401 100755 --- a/scripts/format +++ b/scripts/format @@ -8,4 +8,5 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . +# format things eslint didn't +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' diff --git a/scripts/lint b/scripts/lint index 1f532548..3ffb78a6 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,9 +4,6 @@ set -e cd "$(dirname "$0")/.." -echo "==> Running prettier --check" -./node_modules/.bin/prettier --check . - echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/scripts/utils/postprocess-files.cjs b/scripts/utils/postprocess-files.cjs index deae575e..a8cdeb7c 100644 --- a/scripts/utils/postprocess-files.cjs +++ b/scripts/utils/postprocess-files.cjs @@ -23,12 +23,19 @@ async function postprocess() { // strip out lib="dom", types="node", and types="react" references; these // are needed at build time, but would pollute the user's TS environment - const transformed = code.replace( + let transformed = code.replace( /^ *\/\/\/ * ' '.repeat(match.length - 1) + '\n', ); + // TypeScript's declaration emitter collapses /** @ts-ignore */ onto the same + // line as the type declaration, which doesn't work. So we convert to // @ts-ignore + // on its own line to properly suppresses errors. + if (file.endsWith('.d.ts') || file.endsWith('.d.mts') || file.endsWith('.d.cts')) { + transformed = transformed.replace(/\/\*\* @ts-ignore\b[^*]*\*\/ /gm, '// @ts-ignore\n'); + } + if (transformed !== code) { console.error(`wrote ${path.relative(process.cwd(), file)}`); await fs.promises.writeFile(file, transformed, 'utf8'); diff --git a/src/api-promise.ts b/src/api-promise.ts index 4e701286..8c775ee6 100644 --- a/src/api-promise.ts +++ b/src/api-promise.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/api-promise instead */ -export * from "./core/api-promise" \ No newline at end of file +export * from './core/api-promise'; diff --git a/src/client.ts b/src/client.ts index 9fda7c59..3b70c390 100644 --- a/src/client.ts +++ b/src/client.ts @@ -7,10 +7,10 @@ import { validatePositiveInteger, isAbsoluteURL, safeJSON } from './internal/uti import { sleep } from './internal/utils/sleep'; import { type Logger, - type LogLevel as LogLevelClient, - parseLogLevel, - loggerFor, - formatRequestDetails, +type LogLevel as LogLevelClient, +parseLogLevel, +loggerFor, +formatRequestDetails, } from './internal/utils/log'; export type { Logger, LogLevel as LogLevelClient } from './internal/utils/log'; import { castToError, isAbortError } from './internal/errors'; @@ -22,27 +22,436 @@ import { stringifyQuery } from './internal/utils/query'; import { VERSION } from './version'; import * as Errors from './core/error'; import * as Pagination from './core/pagination'; -import { AbstractPage, type AgentExecutionsPageParams, AgentExecutionsPageResponse, type AssignmentsPageParams, AssignmentsPageResponse, type DomainVerificationsPageParams, DomainVerificationsPageResponse, type EditorsPageParams, EditorsPageResponse, type EntriesPageParams, EntriesPageResponse, type EnvironmentClassesPageParams, EnvironmentClassesPageResponse, type EnvironmentsPageParams, EnvironmentsPageResponse, type GatewaysPageParams, GatewaysPageResponse, type GroupsPageParams, GroupsPageResponse, type IntegrationsPageParams, IntegrationsPageResponse, type JoinableOrganizationsPageParams, JoinableOrganizationsPageResponse, type LoginProvidersPageParams, LoginProvidersPageResponse, type LoginsPageParams, LoginsPageResponse, type MembersPageParams, MembersPageResponse, type OrganizationsPageParams, OrganizationsPageResponse, type OutputsPageParams, OutputsPageResponse, type PersonalAccessTokensPageParams, PersonalAccessTokensPageResponse, type PoliciesPageParams, PoliciesPageResponse, type PrebuildsPageParams, PrebuildsPageResponse, type ProjectEnvironmentClassesPageParams, ProjectEnvironmentClassesPageResponse, type ProjectsPageParams, ProjectsPageResponse, type PromptsPageParams, PromptsPageResponse, type RecordsPageParams, RecordsPageResponse, type RepositoriesPageParams, RepositoriesPageResponse, type RunnersPageParams, RunnersPageResponse, type SSOConfigurationsPageParams, SSOConfigurationsPageResponse, type ScimConfigurationsPageParams, ScimConfigurationsPageResponse, type SecretsPageParams, SecretsPageResponse, type ServicesPageParams, ServicesPageResponse, type TaskExecutionsPageParams, TaskExecutionsPageResponse, type TasksPageParams, TasksPageResponse, type TokensPageParams, TokensPageResponse, type WarmPoolsPageParams, WarmPoolsPageResponse, type WorkflowExecutionActionsPageParams, WorkflowExecutionActionsPageResponse, type WorkflowExecutionsPageParams, WorkflowExecutionsPageResponse, type WorkflowsPageParams, WorkflowsPageResponse } from './core/pagination'; +import { + AbstractPage, + type AgentExecutionsPageParams, + AgentExecutionsPageResponse, + type AssignmentsPageParams, + AssignmentsPageResponse, + type DomainVerificationsPageParams, + DomainVerificationsPageResponse, + type EditorsPageParams, + EditorsPageResponse, + type EntriesPageParams, + EntriesPageResponse, + type EnvironmentClassesPageParams, + EnvironmentClassesPageResponse, + type EnvironmentsPageParams, + EnvironmentsPageResponse, + type GatewaysPageParams, + GatewaysPageResponse, + type GroupsPageParams, + GroupsPageResponse, + type IntegrationsPageParams, + IntegrationsPageResponse, + type JoinableOrganizationsPageParams, + JoinableOrganizationsPageResponse, + type LoginProvidersPageParams, + LoginProvidersPageResponse, + type LoginsPageParams, + LoginsPageResponse, + type MembersPageParams, + MembersPageResponse, + type OrganizationsPageParams, + OrganizationsPageResponse, + type OutputsPageParams, + OutputsPageResponse, + type PersonalAccessTokensPageParams, + PersonalAccessTokensPageResponse, + type PoliciesPageParams, + PoliciesPageResponse, + type PrebuildsPageParams, + PrebuildsPageResponse, + type ProjectEnvironmentClassesPageParams, + ProjectEnvironmentClassesPageResponse, + type ProjectsPageParams, + ProjectsPageResponse, + type PromptsPageParams, + PromptsPageResponse, + type RecordsPageParams, + RecordsPageResponse, + type RepositoriesPageParams, + RepositoriesPageResponse, + type RunnersPageParams, + RunnersPageResponse, + type SSOConfigurationsPageParams, + SSOConfigurationsPageResponse, + type ScimConfigurationsPageParams, + ScimConfigurationsPageResponse, + type SecretsPageParams, + SecretsPageResponse, + type ServicesPageParams, + ServicesPageResponse, + type TaskExecutionsPageParams, + TaskExecutionsPageResponse, + type TasksPageParams, + TasksPageResponse, + type TokensPageParams, + TokensPageResponse, + type WarmPoolsPageParams, + WarmPoolsPageResponse, + type WorkflowExecutionActionsPageParams, + WorkflowExecutionActionsPageResponse, + type WorkflowExecutionsPageParams, + WorkflowExecutionsPageResponse, + type WorkflowsPageParams, + WorkflowsPageResponse, +} from './core/pagination'; import * as Uploads from './core/uploads'; import * as API from './resources/index'; import { APIPromise } from './core/api-promise'; -import { Account, AccountDeleteParams, AccountDeleteResponse, AccountGetSSOLoginURLParams, AccountGetSSOLoginURLResponse, AccountListJoinableOrganizationsParams, AccountListLoginProvidersParams, AccountListSSOLoginsParams, AccountListSSOLoginsResponse, AccountListSSOLoginsResponsesLoginsPage, AccountMembership, AccountRetrieveParams, AccountRetrieveResponse, Accounts, JoinableOrganization, JoinableOrganizationsJoinableOrganizationsPage, LoginProvider, LoginProvidersLoginProvidersPage } from './resources/accounts'; -import { AgentCodeContext, AgentCreateExecutionConversationTokenParams, AgentCreateExecutionConversationTokenResponse, AgentCreatePromptParams, AgentCreatePromptResponse, AgentDeleteExecutionParams, AgentDeleteExecutionResponse, AgentDeletePromptParams, AgentDeletePromptResponse, AgentExecution, AgentExecutionsAgentExecutionsPage, AgentListExecutionsParams, AgentListPromptsParams, AgentMessage, AgentMode, AgentRetrieveExecutionParams, AgentRetrieveExecutionResponse, AgentRetrievePromptParams, AgentRetrievePromptResponse, AgentSendToExecutionParams, AgentSendToExecutionResponse, AgentStartExecutionParams, AgentStartExecutionResponse, AgentStopExecutionParams, AgentStopExecutionResponse, AgentUpdatePromptParams, AgentUpdatePromptResponse, Agents, Prompt, PromptMetadata, PromptSpec, PromptsPromptsPage, Role, Type, UserInputBlock, UserInputMetadata, WakeEvent } from './resources/agents'; -import { AutomationCancelExecutionActionParams, AutomationCancelExecutionActionResponse, AutomationCancelExecutionParams, AutomationCancelExecutionResponse, AutomationCreateParams, AutomationCreateResponse, AutomationDeleteParams, AutomationDeleteResponse, AutomationListExecutionActionsParams, AutomationListExecutionOutputsParams, AutomationListExecutionOutputsResponse, AutomationListExecutionOutputsResponsesOutputsPage, AutomationListExecutionsParams, AutomationListParams, AutomationRetrieveExecutionActionParams, AutomationRetrieveExecutionActionResponse, AutomationRetrieveExecutionParams, AutomationRetrieveExecutionResponse, AutomationRetrieveParams, AutomationRetrieveResponse, AutomationStartExecutionParams, AutomationStartExecutionResponse, AutomationUpdateParams, AutomationUpdateResponse, Automations, Workflow, WorkflowAction, WorkflowExecution, WorkflowExecutionAction, WorkflowExecutionActionsWorkflowExecutionActionsPage, WorkflowExecutionsWorkflowExecutionsPage, WorkflowStep, WorkflowTrigger, WorkflowTriggerContext, WorkflowsWorkflowsPage } from './resources/automations'; -import { Editor, EditorListParams, EditorResolveURLParams, EditorResolveURLResponse, EditorRetrieveParams, EditorRetrieveResponse, EditorVersion, Editors, EditorsEditorsPage } from './resources/editors'; -import { Breadcrumb, ErrorEvent, ErrorLevel, ErrorReportErrorsParams, ErrorReportErrorsResponse, Errors as ErrorsAPIErrors, ExceptionInfo, ExceptionMechanism, RequestInfo as ErrorRequestInfo, StackFrame } from './resources/errors'; -import { EventListParams, EventListResponse, EventListResponsesEntriesPage, EventWatchParams, EventWatchResponse, Events, ResourceOperation } from './resources/events'; +import { + Account, + AccountDeleteParams, + AccountDeleteResponse, + AccountGetSSOLoginURLParams, + AccountGetSSOLoginURLResponse, + AccountListJoinableOrganizationsParams, + AccountListLoginProvidersParams, + AccountListSSOLoginsParams, + AccountListSSOLoginsResponse, + AccountListSSOLoginsResponsesLoginsPage, + AccountMembership, + AccountRetrieveParams, + AccountRetrieveResponse, + Accounts, + JoinableOrganization, + JoinableOrganizationsJoinableOrganizationsPage, + LoginProvider, + LoginProvidersLoginProvidersPage, +} from './resources/accounts'; +import { + AgentCodeContext, + AgentCreateExecutionConversationTokenParams, + AgentCreateExecutionConversationTokenResponse, + AgentCreatePromptParams, + AgentCreatePromptResponse, + AgentDeleteExecutionParams, + AgentDeleteExecutionResponse, + AgentDeletePromptParams, + AgentDeletePromptResponse, + AgentExecution, + AgentExecutionsAgentExecutionsPage, + AgentListExecutionsParams, + AgentListPromptsParams, + AgentMessage, + AgentMode, + AgentRetrieveExecutionParams, + AgentRetrieveExecutionResponse, + AgentRetrievePromptParams, + AgentRetrievePromptResponse, + AgentSendToExecutionParams, + AgentSendToExecutionResponse, + AgentStartExecutionParams, + AgentStartExecutionResponse, + AgentStopExecutionParams, + AgentStopExecutionResponse, + AgentUpdatePromptParams, + AgentUpdatePromptResponse, + Agents, + Prompt, + PromptMetadata, + PromptSpec, + PromptsPromptsPage, + Role, + Type, + UserInputBlock, + UserInputMetadata, + WakeEvent, +} from './resources/agents'; +import { + AutomationCancelExecutionActionParams, + AutomationCancelExecutionActionResponse, + AutomationCancelExecutionParams, + AutomationCancelExecutionResponse, + AutomationCreateParams, + AutomationCreateResponse, + AutomationDeleteParams, + AutomationDeleteResponse, + AutomationListExecutionActionsParams, + AutomationListExecutionOutputsParams, + AutomationListExecutionOutputsResponse, + AutomationListExecutionOutputsResponsesOutputsPage, + AutomationListExecutionsParams, + AutomationListParams, + AutomationRetrieveExecutionActionParams, + AutomationRetrieveExecutionActionResponse, + AutomationRetrieveExecutionParams, + AutomationRetrieveExecutionResponse, + AutomationRetrieveParams, + AutomationRetrieveResponse, + AutomationStartExecutionParams, + AutomationStartExecutionResponse, + AutomationUpdateParams, + AutomationUpdateResponse, + Automations, + Workflow, + WorkflowAction, + WorkflowExecution, + WorkflowExecutionAction, + WorkflowExecutionActionsWorkflowExecutionActionsPage, + WorkflowExecutionsWorkflowExecutionsPage, + WorkflowStep, + WorkflowTrigger, + WorkflowTriggerContext, + WorkflowsWorkflowsPage, +} from './resources/automations'; +import { + Editor, + EditorListParams, + EditorResolveURLParams, + EditorResolveURLResponse, + EditorRetrieveParams, + EditorRetrieveResponse, + EditorVersion, + Editors, + EditorsEditorsPage, +} from './resources/editors'; +import { + Breadcrumb, + ErrorEvent, + ErrorLevel, + ErrorReportErrorsParams, + ErrorReportErrorsResponse, + Errors as ErrorsAPIErrors, + ExceptionInfo, + ExceptionMechanism, + RequestInfo as ErrorRequestInfo, + StackFrame, +} from './resources/errors'; +import { + EventListParams, + EventListResponse, + EventListResponsesEntriesPage, + EventWatchParams, + EventWatchResponse, + Events, + ResourceOperation, +} from './resources/events'; import { GatewayListParams, Gateways } from './resources/gateways'; -import { IDTokenVersion, Identity, IdentityExchangeTokenParams, IdentityExchangeTokenResponse, IdentityGetAuthenticatedIdentityParams, IdentityGetAuthenticatedIdentityResponse, IdentityGetIDTokenParams, IdentityGetIDTokenResponse } from './resources/identity'; -import { Prebuild, PrebuildCancelParams, PrebuildCancelResponse, PrebuildCreateLogsTokenParams, PrebuildCreateLogsTokenResponse, PrebuildCreateParams, PrebuildCreateResponse, PrebuildCreateWarmPoolParams, PrebuildCreateWarmPoolResponse, PrebuildDeleteParams, PrebuildDeleteResponse, PrebuildDeleteWarmPoolParams, PrebuildDeleteWarmPoolResponse, PrebuildListParams, PrebuildListWarmPoolsParams, PrebuildMetadata, PrebuildPhase, PrebuildRetrieveParams, PrebuildRetrieveResponse, PrebuildRetrieveWarmPoolParams, PrebuildRetrieveWarmPoolResponse, PrebuildSpec, PrebuildStatus, PrebuildTrigger, PrebuildUpdateWarmPoolParams, PrebuildUpdateWarmPoolResponse, Prebuilds, PrebuildsPrebuildsPage, WarmPool, WarmPoolMetadata, WarmPoolPhase, WarmPoolSpec, WarmPoolStatus, WarmPoolsWarmPoolsPage } from './resources/prebuilds'; -import { Secret, SecretCreateParams, SecretCreateResponse, SecretDeleteParams, SecretDeleteResponse, SecretGetValueParams, SecretGetValueResponse, SecretListParams, SecretScope, SecretUpdateValueParams, SecretUpdateValueResponse, Secrets, SecretsSecretsPage } from './resources/secrets'; -import { EnvironmentUsageRecord, EnvironmentUsageRecordsRecordsPage, Usage, UsageListEnvironmentRuntimeRecordsParams } from './resources/usage'; -import { AdmissionLevel, BpfDebugLevel, Environment, EnvironmentActivitySignal, EnvironmentCreateEnvironmentTokenParams, EnvironmentCreateEnvironmentTokenResponse, EnvironmentCreateFromProjectParams, EnvironmentCreateFromProjectResponse, EnvironmentCreateLogsTokenParams, EnvironmentCreateLogsTokenResponse, EnvironmentCreateParams, EnvironmentCreateResponse, EnvironmentDeleteParams, EnvironmentDeleteResponse, EnvironmentListParams, EnvironmentMarkActiveParams, EnvironmentMarkActiveResponse, EnvironmentMetadata, EnvironmentPhase, EnvironmentRetrieveParams, EnvironmentRetrieveResponse, EnvironmentRole, EnvironmentSpec, EnvironmentStartParams, EnvironmentStartResponse, EnvironmentStatus, EnvironmentStopParams, EnvironmentStopResponse, EnvironmentUnarchiveParams, EnvironmentUnarchiveResponse, EnvironmentUpdateParams, EnvironmentUpdateResponse, Environments, EnvironmentsEnvironmentsPage, KernelControlsConfig, Veto } from './resources/environments/environments'; -import { Group, GroupCreateParams, GroupCreateResponse, GroupDeleteParams, GroupDeleteResponse, GroupListParams, GroupRetrieveParams, GroupRetrieveResponse, GroupUpdateParams, GroupUpdateResponse, Groups, GroupsGroupsPage } from './resources/groups/groups'; -import { InviteDomains, Organization, OrganizationCreateParams, OrganizationCreateResponse, OrganizationDeleteParams, OrganizationDeleteResponse, OrganizationJoinParams, OrganizationJoinResponse, OrganizationLeaveParams, OrganizationLeaveResponse, OrganizationListMembersParams, OrganizationMember, OrganizationMembersMembersPage, OrganizationRetrieveParams, OrganizationRetrieveResponse, OrganizationSetRoleParams, OrganizationSetRoleResponse, OrganizationUpdateParams, OrganizationUpdateResponse, Organizations } from './resources/organizations/organizations'; -import { EnvironmentInitializer, Project, ProjectBulkCreateParams, ProjectBulkCreateResponse, ProjectBulkDeleteParams, ProjectBulkDeleteResponse, ProjectBulkUpdateParams, ProjectBulkUpdateResponse, ProjectCreateFromEnvironmentParams, ProjectCreateFromEnvironmentResponse, ProjectCreateParams, ProjectCreateResponse, ProjectDeleteParams, ProjectDeleteResponse, ProjectListParams, ProjectMetadata, ProjectPhase, ProjectPrebuildConfiguration, ProjectRetrieveParams, ProjectRetrieveResponse, ProjectUpdateParams, ProjectUpdateResponse, Projects, ProjectsProjectsPage, RecommendedEditors } from './resources/projects/projects'; -import { GatewayInfo, LogLevel, MetricsConfiguration, Runner, RunnerCapability, RunnerCheckAuthenticationForHostParams, RunnerCheckAuthenticationForHostResponse, RunnerCheckRepositoryAccessParams, RunnerCheckRepositoryAccessResponse, RunnerConfiguration, RunnerCreateLogsTokenParams, RunnerCreateLogsTokenResponse, RunnerCreateParams, RunnerCreateResponse, RunnerCreateRunnerTokenParams, RunnerCreateRunnerTokenResponse, RunnerDeleteParams, RunnerDeleteResponse, RunnerKind, RunnerListParams, RunnerListScmOrganizationsParams, RunnerListScmOrganizationsResponse, RunnerListScmOrganizationsResponsesOrganizationsPage, RunnerParseContextURLParams, RunnerParseContextURLResponse, RunnerPhase, RunnerProvider, RunnerReleaseChannel, RunnerRetrieveParams, RunnerRetrieveResponse, RunnerSearchRepositoriesParams, RunnerSearchRepositoriesResponse, RunnerSpec, RunnerStatus, RunnerUpdateParams, RunnerUpdateResponse, RunnerVariant, Runners, RunnersRunnersPage, SearchMode, UpdateWindow } from './resources/runners/runners'; -import { User, UserDeleteUserParams, UserDeleteUserResponse, UserGetAuthenticatedUserParams, UserGetAuthenticatedUserResponse, UserGetUserParams, UserGetUserResponse, UserSetSuspendedParams, UserSetSuspendedResponse, Users } from './resources/users/users'; +import { + IDTokenVersion, + Identity, + IdentityExchangeTokenParams, + IdentityExchangeTokenResponse, + IdentityGetAuthenticatedIdentityParams, + IdentityGetAuthenticatedIdentityResponse, + IdentityGetIDTokenParams, + IdentityGetIDTokenResponse, +} from './resources/identity'; +import { + Prebuild, + PrebuildCancelParams, + PrebuildCancelResponse, + PrebuildCreateLogsTokenParams, + PrebuildCreateLogsTokenResponse, + PrebuildCreateParams, + PrebuildCreateResponse, + PrebuildCreateWarmPoolParams, + PrebuildCreateWarmPoolResponse, + PrebuildDeleteParams, + PrebuildDeleteResponse, + PrebuildDeleteWarmPoolParams, + PrebuildDeleteWarmPoolResponse, + PrebuildListParams, + PrebuildListWarmPoolsParams, + PrebuildMetadata, + PrebuildPhase, + PrebuildRetrieveParams, + PrebuildRetrieveResponse, + PrebuildRetrieveWarmPoolParams, + PrebuildRetrieveWarmPoolResponse, + PrebuildSpec, + PrebuildStatus, + PrebuildTrigger, + PrebuildUpdateWarmPoolParams, + PrebuildUpdateWarmPoolResponse, + Prebuilds, + PrebuildsPrebuildsPage, + WarmPool, + WarmPoolMetadata, + WarmPoolPhase, + WarmPoolSpec, + WarmPoolStatus, + WarmPoolsWarmPoolsPage, +} from './resources/prebuilds'; +import { + Secret, + SecretCreateParams, + SecretCreateResponse, + SecretDeleteParams, + SecretDeleteResponse, + SecretGetValueParams, + SecretGetValueResponse, + SecretListParams, + SecretScope, + SecretUpdateValueParams, + SecretUpdateValueResponse, + Secrets, + SecretsSecretsPage, +} from './resources/secrets'; +import { + EnvironmentUsageRecord, + EnvironmentUsageRecordsRecordsPage, + Usage, + UsageListEnvironmentRuntimeRecordsParams, +} from './resources/usage'; +import { + AdmissionLevel, + BpfDebugLevel, + Environment, + EnvironmentActivitySignal, + EnvironmentCreateEnvironmentTokenParams, + EnvironmentCreateEnvironmentTokenResponse, + EnvironmentCreateFromProjectParams, + EnvironmentCreateFromProjectResponse, + EnvironmentCreateLogsTokenParams, + EnvironmentCreateLogsTokenResponse, + EnvironmentCreateParams, + EnvironmentCreateResponse, + EnvironmentDeleteParams, + EnvironmentDeleteResponse, + EnvironmentListParams, + EnvironmentMarkActiveParams, + EnvironmentMarkActiveResponse, + EnvironmentMetadata, + EnvironmentPhase, + EnvironmentRetrieveParams, + EnvironmentRetrieveResponse, + EnvironmentRole, + EnvironmentSpec, + EnvironmentStartParams, + EnvironmentStartResponse, + EnvironmentStatus, + EnvironmentStopParams, + EnvironmentStopResponse, + EnvironmentUnarchiveParams, + EnvironmentUnarchiveResponse, + EnvironmentUpdateParams, + EnvironmentUpdateResponse, + Environments, + EnvironmentsEnvironmentsPage, + KernelControlsConfig, + Veto, +} from './resources/environments/environments'; +import { + Group, + GroupCreateParams, + GroupCreateResponse, + GroupDeleteParams, + GroupDeleteResponse, + GroupListParams, + GroupRetrieveParams, + GroupRetrieveResponse, + GroupUpdateParams, + GroupUpdateResponse, + Groups, + GroupsGroupsPage, +} from './resources/groups/groups'; +import { + InviteDomains, + Organization, + OrganizationCreateParams, + OrganizationCreateResponse, + OrganizationDeleteParams, + OrganizationDeleteResponse, + OrganizationJoinParams, + OrganizationJoinResponse, + OrganizationLeaveParams, + OrganizationLeaveResponse, + OrganizationListMembersParams, + OrganizationMember, + OrganizationMembersMembersPage, + OrganizationRetrieveParams, + OrganizationRetrieveResponse, + OrganizationSetRoleParams, + OrganizationSetRoleResponse, + OrganizationUpdateParams, + OrganizationUpdateResponse, + Organizations, +} from './resources/organizations/organizations'; +import { + EnvironmentInitializer, + Project, + ProjectBulkCreateParams, + ProjectBulkCreateResponse, + ProjectBulkDeleteParams, + ProjectBulkDeleteResponse, + ProjectBulkUpdateParams, + ProjectBulkUpdateResponse, + ProjectCreateFromEnvironmentParams, + ProjectCreateFromEnvironmentResponse, + ProjectCreateParams, + ProjectCreateResponse, + ProjectDeleteParams, + ProjectDeleteResponse, + ProjectListParams, + ProjectMetadata, + ProjectPhase, + ProjectPrebuildConfiguration, + ProjectRetrieveParams, + ProjectRetrieveResponse, + ProjectUpdateParams, + ProjectUpdateResponse, + Projects, + ProjectsProjectsPage, + RecommendedEditors, +} from './resources/projects/projects'; +import { + GatewayInfo, + LogLevel, + MetricsConfiguration, + Runner, + RunnerCapability, + RunnerCheckAuthenticationForHostParams, + RunnerCheckAuthenticationForHostResponse, + RunnerCheckRepositoryAccessParams, + RunnerCheckRepositoryAccessResponse, + RunnerConfiguration, + RunnerCreateLogsTokenParams, + RunnerCreateLogsTokenResponse, + RunnerCreateParams, + RunnerCreateResponse, + RunnerCreateRunnerTokenParams, + RunnerCreateRunnerTokenResponse, + RunnerDeleteParams, + RunnerDeleteResponse, + RunnerKind, + RunnerListParams, + RunnerListScmOrganizationsParams, + RunnerListScmOrganizationsResponse, + RunnerListScmOrganizationsResponsesOrganizationsPage, + RunnerParseContextURLParams, + RunnerParseContextURLResponse, + RunnerPhase, + RunnerProvider, + RunnerReleaseChannel, + RunnerRetrieveParams, + RunnerRetrieveResponse, + RunnerSearchRepositoriesParams, + RunnerSearchRepositoriesResponse, + RunnerSpec, + RunnerStatus, + RunnerUpdateParams, + RunnerUpdateResponse, + RunnerVariant, + Runners, + RunnersRunnersPage, + SearchMode, + UpdateWindow, +} from './resources/runners/runners'; +import { + User, + UserDeleteUserParams, + UserDeleteUserResponse, + UserGetAuthenticatedUserParams, + UserGetAuthenticatedUserResponse, + UserGetUserParams, + UserGetUserResponse, + UserSetSuspendedParams, + UserSetSuspendedResponse, + Users, +} from './resources/users/users'; import { type Fetch } from './internal/builtin-types'; import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers'; import { FinalRequestOptions, RequestOptions } from './internal/request-options'; @@ -125,7 +534,7 @@ export interface ClientOptions { } /** - * API Client for interfacing with the Gitpod API. + * API Client for interfacing with the Gitpod API. */ export class Gitpod { bearerToken: string; @@ -161,7 +570,7 @@ export class Gitpod { }: ClientOptions = {}) { if (bearerToken === undefined) { throw new Errors.GitpodError( - 'The GITPOD_API_KEY environment variable is missing or empty; either provide it, or instantiate the Gitpod client with an bearerToken option, like new Gitpod({ bearerToken: \'My Bearer Token\' }).' + "The GITPOD_API_KEY environment variable is missing or empty; either provide it, or instantiate the Gitpod client with an bearerToken option, like new Gitpod({ bearerToken: 'My Bearer Token' }).", ); } @@ -177,7 +586,10 @@ export class Gitpod { const defaultLogLevel = 'warn'; // Set default logLevel early so that we can log a warning in parseLogLevel. this.logLevel = defaultLogLevel; - this.logLevel = parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? parseLogLevel(readEnv('GITPOD_LOG'), 'process.env[\'GITPOD_LOG\']', this) ?? defaultLogLevel; + this.logLevel = + parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? + parseLogLevel(readEnv('GITPOD_LOG'), "process.env['GITPOD_LOG']", this) ?? + defaultLogLevel; this.fetchOptions = options.fetchOptions; this.maxRetries = options.maxRetries ?? 2; this.fetch = options.fetch ?? Shims.getDefaultFetch(); @@ -202,7 +614,7 @@ export class Gitpod { fetch: this.fetch, fetchOptions: this.fetchOptions, bearerToken: this.bearerToken, - ...options + ...options, }); return client; } @@ -215,7 +627,7 @@ export class Gitpod { } protected defaultQuery(): Record | undefined { - return this._options.defaultQuery + return this._options.defaultQuery; } protected validateHeaders({ values, nulls }: NullableHeaders) { @@ -250,7 +662,11 @@ export class Gitpod { return Errors.APIError.generate(status, error, message, headers); } - buildURL(path: string, query: Record | null | undefined, defaultBaseURL?: string | undefined): string { + buildURL( + path: string, + query: Record | null | undefined, + defaultBaseURL?: string | undefined, + ): string { const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL; const url = isAbsoluteURL(path) ? @@ -338,7 +754,9 @@ export class Gitpod { await this.prepareOptions(options); - const { req, url, timeout } = await this.buildRequest(options, { retryCount: maxRetries - retriesRemaining }); + const { req, url, timeout } = await this.buildRequest(options, { + retryCount: maxRetries - retriesRemaining, + }); await this.prepareRequest(req, { url, options }); @@ -347,7 +765,16 @@ export class Gitpod { const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`; const startTime = Date.now(); - loggerFor(this).debug(`[${requestLogID}] sending request`, formatRequestDetails({ retryOfRequestLogID, method: options.method, url, options, headers: req.headers })); + loggerFor(this).debug( + `[${requestLogID}] sending request`, + formatRequestDetails({ + retryOfRequestLogID, + method: options.method, + url, + options, + headers: req.headers, + }), + ); if (options.signal?.aborted) { throw new Errors.APIUserAbortError(); @@ -366,21 +793,45 @@ export class Gitpod { // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)" // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)" // others do not provide enough information to distinguish timeouts from other connection errors - const isTimeout = isAbortError(response) || /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')) + const isTimeout = + isAbortError(response) || + /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')); if (retriesRemaining) { - loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`) - loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); + loggerFor(this).info( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`, + ); + loggerFor(this).debug( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, + formatRequestDetails({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + }), + ); return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID); } - loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`) - loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); + loggerFor(this).info( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`, + ); + loggerFor(this).debug( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, + formatRequestDetails({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + }), + ); if (isTimeout) { throw new Errors.APIConnectionTimeoutError(); } throw new Errors.APIConnectionError({ cause: response }); } - const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${response.ok ? 'succeeded' : 'failed'} with status ${response.status} in ${headersTime - startTime}ms`; + const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${ + response.ok ? 'succeeded' : 'failed' + } with status ${response.status} in ${headersTime - startTime}ms`; if (!response.ok) { const shouldRetry = await this.shouldRetry(response); @@ -389,27 +840,60 @@ export class Gitpod { // We don't need the body of this response. await Shims.CancelReadableStream(response.body); - loggerFor(this).info(`${responseInfo} - ${retryMessage}`) - loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); - return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID, response.headers); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`); + loggerFor(this).debug( + `[${requestLogID}] response error (${retryMessage})`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + }), + ); + return this.retryRequest( + options, + retriesRemaining, + retryOfRequestLogID ?? requestLogID, + response.headers, + ); } const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`; - loggerFor(this).info(`${responseInfo} - ${retryMessage}`) + loggerFor(this).info(`${responseInfo} - ${retryMessage}`); const errText = await response.text().catch((err: any) => castToError(err).message); const errJSON = safeJSON(errText) as any; const errMessage = errJSON ? undefined : errText; - loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, message: errMessage, durationMs: Date.now() - startTime })); + loggerFor(this).debug( + `[${requestLogID}] response error (${retryMessage})`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + message: errMessage, + durationMs: Date.now() - startTime, + }), + ); const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers); throw err; } - loggerFor(this).info(responseInfo) - loggerFor(this).debug(`[${requestLogID}] response start`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); + loggerFor(this).info(responseInfo); + loggerFor(this).debug( + `[${requestLogID}] response start`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + }), + ); return { response, options, controller, requestLogID, retryOfRequestLogID, startTime }; } @@ -427,7 +911,10 @@ export class Gitpod { ); } - requestAPIList = Pagination.AbstractPage>( + requestAPIList< + Item = unknown, + PageClass extends Pagination.AbstractPage = Pagination.AbstractPage, + >( Page: new (...args: ConstructorParameters) => PageClass, options: PromiseOrValue, ): Pagination.PagePromise { @@ -447,7 +934,9 @@ export class Gitpod { const timeout = setTimeout(abort, ms); - const isReadableBody = ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || (typeof options.body === "object" && options.body !== null && Symbol.asyncIterator in options.body); + const isReadableBody = + ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || + (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body); const fetchOptions: RequestInit = { signal: controller.signal as any, @@ -462,7 +951,6 @@ export class Gitpod { } try { - // use undefined this binding; fetch errors if bound to something else in browser/cloudflare return await this.fetch.call(undefined, url, fetchOptions); } finally { @@ -563,11 +1051,12 @@ export class Gitpod { const req: FinalizedRequestInit = { method, headers: reqHeaders, - ...(options.signal && { signal: options.signal}), - ...((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream && { duplex: "half" }), + ...(options.signal && { signal: options.signal }), + ...((globalThis as any).ReadableStream && + body instanceof (globalThis as any).ReadableStream && { duplex: 'half' }), ...(body && { body }), - ...(this.fetchOptions as any ?? {}), - ...(options.fetchOptions as any ?? {}), + ...((this.fetchOptions as any) ?? {}), + ...((options.fetchOptions as any) ?? {}), }; return { req, url, timeout: options.timeout }; @@ -592,15 +1081,17 @@ export class Gitpod { const headers = buildHeaders([ idempotencyHeaders, - {Accept: 'application/json', - 'User-Agent': this.getUserAgent(), - 'X-Stainless-Retry-Count': String(retryCount), - ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), - ...getPlatformHeaders()}, + { + Accept: 'application/json', + 'User-Agent': this.getUserAgent(), + 'X-Stainless-Retry-Count': String(retryCount), + ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), + ...getPlatformHeaders(), + }, await this.authHeaders(options), this._options.defaultHeaders, bodyHeaders, - options.headers + options.headers, ]); this.validateHeaders(headers); @@ -627,11 +1118,9 @@ export class Gitpod { ArrayBuffer.isView(body) || body instanceof ArrayBuffer || body instanceof DataView || - ( - typeof body === 'string' && + (typeof body === 'string' && // Preserve legacy string encoding behavior for now - headers.values.has('content-type') - ) || + headers.values.has('content-type')) || // `Blob` is superset of `File` ((globalThis as any).Blob && body instanceof (globalThis as any).Blob) || // `FormData` -> `multipart/form-data` @@ -662,7 +1151,7 @@ export class Gitpod { } static Gitpod = this; - static DEFAULT_TIMEOUT = 60000 // 1 minute + static DEFAULT_TIMEOUT = 60000; // 1 minute static GitpodError = Errors.GitpodError; static APIError = Errors.APIError; @@ -729,623 +1218,572 @@ Gitpod.Usage = Usage; Gitpod.Users = Users; export declare namespace Gitpod { - export type RequestOptions = Opts.RequestOptions; - - export import AgentExecutionsPage = Pagination.AgentExecutionsPage; -export { - type AgentExecutionsPageParams as AgentExecutionsPageParams, - type AgentExecutionsPageResponse as AgentExecutionsPageResponse -}; - -export import AssignmentsPage = Pagination.AssignmentsPage; -export { - type AssignmentsPageParams as AssignmentsPageParams, - type AssignmentsPageResponse as AssignmentsPageResponse -}; - -export import DomainVerificationsPage = Pagination.DomainVerificationsPage; -export { - type DomainVerificationsPageParams as DomainVerificationsPageParams, - type DomainVerificationsPageResponse as DomainVerificationsPageResponse -}; - -export import EditorsPage = Pagination.EditorsPage; -export { - type EditorsPageParams as EditorsPageParams, - type EditorsPageResponse as EditorsPageResponse -}; - -export import EntriesPage = Pagination.EntriesPage; -export { - type EntriesPageParams as EntriesPageParams, - type EntriesPageResponse as EntriesPageResponse -}; - -export import EnvironmentClassesPage = Pagination.EnvironmentClassesPage; -export { - type EnvironmentClassesPageParams as EnvironmentClassesPageParams, - type EnvironmentClassesPageResponse as EnvironmentClassesPageResponse -}; - -export import EnvironmentsPage = Pagination.EnvironmentsPage; -export { - type EnvironmentsPageParams as EnvironmentsPageParams, - type EnvironmentsPageResponse as EnvironmentsPageResponse -}; - -export import GatewaysPage = Pagination.GatewaysPage; -export { - type GatewaysPageParams as GatewaysPageParams, - type GatewaysPageResponse as GatewaysPageResponse -}; - -export import GroupsPage = Pagination.GroupsPage; -export { - type GroupsPageParams as GroupsPageParams, - type GroupsPageResponse as GroupsPageResponse -}; - -export import IntegrationsPage = Pagination.IntegrationsPage; -export { - type IntegrationsPageParams as IntegrationsPageParams, - type IntegrationsPageResponse as IntegrationsPageResponse -}; - -export import JoinableOrganizationsPage = Pagination.JoinableOrganizationsPage; -export { - type JoinableOrganizationsPageParams as JoinableOrganizationsPageParams, - type JoinableOrganizationsPageResponse as JoinableOrganizationsPageResponse -}; - -export import LoginProvidersPage = Pagination.LoginProvidersPage; -export { - type LoginProvidersPageParams as LoginProvidersPageParams, - type LoginProvidersPageResponse as LoginProvidersPageResponse -}; - -export import LoginsPage = Pagination.LoginsPage; -export { - type LoginsPageParams as LoginsPageParams, - type LoginsPageResponse as LoginsPageResponse -}; - -export import MembersPage = Pagination.MembersPage; -export { - type MembersPageParams as MembersPageParams, - type MembersPageResponse as MembersPageResponse -}; - -export import OrganizationsPage = Pagination.OrganizationsPage; -export { - type OrganizationsPageParams as OrganizationsPageParams, - type OrganizationsPageResponse as OrganizationsPageResponse -}; - -export import OutputsPage = Pagination.OutputsPage; -export { - type OutputsPageParams as OutputsPageParams, - type OutputsPageResponse as OutputsPageResponse -}; - -export import PersonalAccessTokensPage = Pagination.PersonalAccessTokensPage; -export { - type PersonalAccessTokensPageParams as PersonalAccessTokensPageParams, - type PersonalAccessTokensPageResponse as PersonalAccessTokensPageResponse -}; - -export import PoliciesPage = Pagination.PoliciesPage; -export { - type PoliciesPageParams as PoliciesPageParams, - type PoliciesPageResponse as PoliciesPageResponse -}; - -export import PrebuildsPage = Pagination.PrebuildsPage; -export { - type PrebuildsPageParams as PrebuildsPageParams, - type PrebuildsPageResponse as PrebuildsPageResponse -}; - -export import ProjectEnvironmentClassesPage = Pagination.ProjectEnvironmentClassesPage; -export { - type ProjectEnvironmentClassesPageParams as ProjectEnvironmentClassesPageParams, - type ProjectEnvironmentClassesPageResponse as ProjectEnvironmentClassesPageResponse -}; - -export import ProjectsPage = Pagination.ProjectsPage; -export { - type ProjectsPageParams as ProjectsPageParams, - type ProjectsPageResponse as ProjectsPageResponse -}; - -export import PromptsPage = Pagination.PromptsPage; -export { - type PromptsPageParams as PromptsPageParams, - type PromptsPageResponse as PromptsPageResponse -}; - -export import RecordsPage = Pagination.RecordsPage; -export { - type RecordsPageParams as RecordsPageParams, - type RecordsPageResponse as RecordsPageResponse -}; - -export import RepositoriesPage = Pagination.RepositoriesPage; -export { - type RepositoriesPageParams as RepositoriesPageParams, - type RepositoriesPageResponse as RepositoriesPageResponse -}; - -export import RunnersPage = Pagination.RunnersPage; -export { - type RunnersPageParams as RunnersPageParams, - type RunnersPageResponse as RunnersPageResponse -}; - -export import ScimConfigurationsPage = Pagination.ScimConfigurationsPage; -export { - type ScimConfigurationsPageParams as ScimConfigurationsPageParams, - type ScimConfigurationsPageResponse as ScimConfigurationsPageResponse -}; - -export import SecretsPage = Pagination.SecretsPage; -export { - type SecretsPageParams as SecretsPageParams, - type SecretsPageResponse as SecretsPageResponse -}; - -export import ServicesPage = Pagination.ServicesPage; -export { - type ServicesPageParams as ServicesPageParams, - type ServicesPageResponse as ServicesPageResponse -}; - -export import SSOConfigurationsPage = Pagination.SSOConfigurationsPage; -export { - type SSOConfigurationsPageParams as SSOConfigurationsPageParams, - type SSOConfigurationsPageResponse as SSOConfigurationsPageResponse -}; - -export import TaskExecutionsPage = Pagination.TaskExecutionsPage; -export { - type TaskExecutionsPageParams as TaskExecutionsPageParams, - type TaskExecutionsPageResponse as TaskExecutionsPageResponse -}; - -export import TasksPage = Pagination.TasksPage; -export { - type TasksPageParams as TasksPageParams, - type TasksPageResponse as TasksPageResponse -}; - -export import TokensPage = Pagination.TokensPage; -export { - type TokensPageParams as TokensPageParams, - type TokensPageResponse as TokensPageResponse -}; - -export import WarmPoolsPage = Pagination.WarmPoolsPage; -export { - type WarmPoolsPageParams as WarmPoolsPageParams, - type WarmPoolsPageResponse as WarmPoolsPageResponse -}; - -export import WorkflowExecutionActionsPage = Pagination.WorkflowExecutionActionsPage; -export { - type WorkflowExecutionActionsPageParams as WorkflowExecutionActionsPageParams, - type WorkflowExecutionActionsPageResponse as WorkflowExecutionActionsPageResponse -}; - -export import WorkflowExecutionsPage = Pagination.WorkflowExecutionsPage; -export { - type WorkflowExecutionsPageParams as WorkflowExecutionsPageParams, - type WorkflowExecutionsPageResponse as WorkflowExecutionsPageResponse -}; - -export import WorkflowsPage = Pagination.WorkflowsPage; -export { - type WorkflowsPageParams as WorkflowsPageParams, - type WorkflowsPageResponse as WorkflowsPageResponse -}; - -export { - Accounts as Accounts, - type Account as Account, - type AccountMembership as AccountMembership, - type JoinableOrganization as JoinableOrganization, - type LoginProvider as LoginProvider, - type AccountRetrieveResponse as AccountRetrieveResponse, - type AccountDeleteResponse as AccountDeleteResponse, - type AccountGetSSOLoginURLResponse as AccountGetSSOLoginURLResponse, - type AccountListSSOLoginsResponse as AccountListSSOLoginsResponse, - type JoinableOrganizationsJoinableOrganizationsPage as JoinableOrganizationsJoinableOrganizationsPage, - type LoginProvidersLoginProvidersPage as LoginProvidersLoginProvidersPage, - type AccountListSSOLoginsResponsesLoginsPage as AccountListSSOLoginsResponsesLoginsPage, - type AccountRetrieveParams as AccountRetrieveParams, - type AccountDeleteParams as AccountDeleteParams, - type AccountGetSSOLoginURLParams as AccountGetSSOLoginURLParams, - type AccountListJoinableOrganizationsParams as AccountListJoinableOrganizationsParams, - type AccountListLoginProvidersParams as AccountListLoginProvidersParams, - type AccountListSSOLoginsParams as AccountListSSOLoginsParams -}; - -export { - Agents as Agents, - type AgentCodeContext as AgentCodeContext, - type AgentExecution as AgentExecution, - type AgentMessage as AgentMessage, - type AgentMode as AgentMode, - type Prompt as Prompt, - type PromptMetadata as PromptMetadata, - type PromptSpec as PromptSpec, - type Role as Role, - type Type as Type, - type UserInputBlock as UserInputBlock, - type UserInputMetadata as UserInputMetadata, - type WakeEvent as WakeEvent, - type AgentCreateExecutionConversationTokenResponse as AgentCreateExecutionConversationTokenResponse, - type AgentCreatePromptResponse as AgentCreatePromptResponse, - type AgentDeleteExecutionResponse as AgentDeleteExecutionResponse, - type AgentDeletePromptResponse as AgentDeletePromptResponse, - type AgentRetrieveExecutionResponse as AgentRetrieveExecutionResponse, - type AgentRetrievePromptResponse as AgentRetrievePromptResponse, - type AgentSendToExecutionResponse as AgentSendToExecutionResponse, - type AgentStartExecutionResponse as AgentStartExecutionResponse, - type AgentStopExecutionResponse as AgentStopExecutionResponse, - type AgentUpdatePromptResponse as AgentUpdatePromptResponse, - type AgentExecutionsAgentExecutionsPage as AgentExecutionsAgentExecutionsPage, - type PromptsPromptsPage as PromptsPromptsPage, - type AgentCreateExecutionConversationTokenParams as AgentCreateExecutionConversationTokenParams, - type AgentCreatePromptParams as AgentCreatePromptParams, - type AgentDeleteExecutionParams as AgentDeleteExecutionParams, - type AgentDeletePromptParams as AgentDeletePromptParams, - type AgentListExecutionsParams as AgentListExecutionsParams, - type AgentListPromptsParams as AgentListPromptsParams, - type AgentRetrieveExecutionParams as AgentRetrieveExecutionParams, - type AgentRetrievePromptParams as AgentRetrievePromptParams, - type AgentSendToExecutionParams as AgentSendToExecutionParams, - type AgentStartExecutionParams as AgentStartExecutionParams, - type AgentStopExecutionParams as AgentStopExecutionParams, - type AgentUpdatePromptParams as AgentUpdatePromptParams -}; - -export { - Automations as Automations, - type Workflow as Workflow, - type WorkflowAction as WorkflowAction, - type WorkflowExecution as WorkflowExecution, - type WorkflowExecutionAction as WorkflowExecutionAction, - type WorkflowStep as WorkflowStep, - type WorkflowTrigger as WorkflowTrigger, - type WorkflowTriggerContext as WorkflowTriggerContext, - type AutomationCreateResponse as AutomationCreateResponse, - type AutomationRetrieveResponse as AutomationRetrieveResponse, - type AutomationUpdateResponse as AutomationUpdateResponse, - type AutomationDeleteResponse as AutomationDeleteResponse, - type AutomationCancelExecutionResponse as AutomationCancelExecutionResponse, - type AutomationCancelExecutionActionResponse as AutomationCancelExecutionActionResponse, - type AutomationListExecutionOutputsResponse as AutomationListExecutionOutputsResponse, - type AutomationRetrieveExecutionResponse as AutomationRetrieveExecutionResponse, - type AutomationRetrieveExecutionActionResponse as AutomationRetrieveExecutionActionResponse, - type AutomationStartExecutionResponse as AutomationStartExecutionResponse, - type WorkflowsWorkflowsPage as WorkflowsWorkflowsPage, - type WorkflowExecutionActionsWorkflowExecutionActionsPage as WorkflowExecutionActionsWorkflowExecutionActionsPage, - type AutomationListExecutionOutputsResponsesOutputsPage as AutomationListExecutionOutputsResponsesOutputsPage, - type WorkflowExecutionsWorkflowExecutionsPage as WorkflowExecutionsWorkflowExecutionsPage, - type AutomationCreateParams as AutomationCreateParams, - type AutomationRetrieveParams as AutomationRetrieveParams, - type AutomationUpdateParams as AutomationUpdateParams, - type AutomationListParams as AutomationListParams, - type AutomationDeleteParams as AutomationDeleteParams, - type AutomationCancelExecutionParams as AutomationCancelExecutionParams, - type AutomationCancelExecutionActionParams as AutomationCancelExecutionActionParams, - type AutomationListExecutionActionsParams as AutomationListExecutionActionsParams, - type AutomationListExecutionOutputsParams as AutomationListExecutionOutputsParams, - type AutomationListExecutionsParams as AutomationListExecutionsParams, - type AutomationRetrieveExecutionParams as AutomationRetrieveExecutionParams, - type AutomationRetrieveExecutionActionParams as AutomationRetrieveExecutionActionParams, - type AutomationStartExecutionParams as AutomationStartExecutionParams -}; - -export { - Editors as Editors, - type Editor as Editor, - type EditorVersion as EditorVersion, - type EditorRetrieveResponse as EditorRetrieveResponse, - type EditorResolveURLResponse as EditorResolveURLResponse, - type EditorsEditorsPage as EditorsEditorsPage, - type EditorRetrieveParams as EditorRetrieveParams, - type EditorListParams as EditorListParams, - type EditorResolveURLParams as EditorResolveURLParams -}; - -export { - Environments as Environments, - type AdmissionLevel as AdmissionLevel, - type BpfDebugLevel as BpfDebugLevel, - type Environment as Environment, - type EnvironmentActivitySignal as EnvironmentActivitySignal, - type EnvironmentMetadata as EnvironmentMetadata, - type EnvironmentPhase as EnvironmentPhase, - type EnvironmentRole as EnvironmentRole, - type EnvironmentSpec as EnvironmentSpec, - type EnvironmentStatus as EnvironmentStatus, - type KernelControlsConfig as KernelControlsConfig, - type Veto as Veto, - type EnvironmentCreateResponse as EnvironmentCreateResponse, - type EnvironmentRetrieveResponse as EnvironmentRetrieveResponse, - type EnvironmentUpdateResponse as EnvironmentUpdateResponse, - type EnvironmentDeleteResponse as EnvironmentDeleteResponse, - type EnvironmentCreateEnvironmentTokenResponse as EnvironmentCreateEnvironmentTokenResponse, - type EnvironmentCreateFromProjectResponse as EnvironmentCreateFromProjectResponse, - type EnvironmentCreateLogsTokenResponse as EnvironmentCreateLogsTokenResponse, - type EnvironmentMarkActiveResponse as EnvironmentMarkActiveResponse, - type EnvironmentStartResponse as EnvironmentStartResponse, - type EnvironmentStopResponse as EnvironmentStopResponse, - type EnvironmentUnarchiveResponse as EnvironmentUnarchiveResponse, - type EnvironmentsEnvironmentsPage as EnvironmentsEnvironmentsPage, - type EnvironmentCreateParams as EnvironmentCreateParams, - type EnvironmentRetrieveParams as EnvironmentRetrieveParams, - type EnvironmentUpdateParams as EnvironmentUpdateParams, - type EnvironmentListParams as EnvironmentListParams, - type EnvironmentDeleteParams as EnvironmentDeleteParams, - type EnvironmentCreateEnvironmentTokenParams as EnvironmentCreateEnvironmentTokenParams, - type EnvironmentCreateFromProjectParams as EnvironmentCreateFromProjectParams, - type EnvironmentCreateLogsTokenParams as EnvironmentCreateLogsTokenParams, - type EnvironmentMarkActiveParams as EnvironmentMarkActiveParams, - type EnvironmentStartParams as EnvironmentStartParams, - type EnvironmentStopParams as EnvironmentStopParams, - type EnvironmentUnarchiveParams as EnvironmentUnarchiveParams -}; - -export { - ErrorsAPIErrors as Errors, - type Breadcrumb as Breadcrumb, - type ErrorEvent as ErrorEvent, - type ErrorLevel as ErrorLevel, - type ExceptionInfo as ExceptionInfo, - type ExceptionMechanism as ExceptionMechanism, - type ErrorRequestInfo as RequestInfo, - type StackFrame as StackFrame, - type ErrorReportErrorsResponse as ErrorReportErrorsResponse, - type ErrorReportErrorsParams as ErrorReportErrorsParams -}; - -export { - Events as Events, - type ResourceOperation as ResourceOperation, - type EventListResponse as EventListResponse, - type EventWatchResponse as EventWatchResponse, - type EventListResponsesEntriesPage as EventListResponsesEntriesPage, - type EventListParams as EventListParams, - type EventWatchParams as EventWatchParams -}; - -export { - Gateways as Gateways, - type GatewayListParams as GatewayListParams -}; - -export { - Groups as Groups, - type Group as Group, - type GroupCreateResponse as GroupCreateResponse, - type GroupRetrieveResponse as GroupRetrieveResponse, - type GroupUpdateResponse as GroupUpdateResponse, - type GroupDeleteResponse as GroupDeleteResponse, - type GroupsGroupsPage as GroupsGroupsPage, - type GroupCreateParams as GroupCreateParams, - type GroupRetrieveParams as GroupRetrieveParams, - type GroupUpdateParams as GroupUpdateParams, - type GroupListParams as GroupListParams, - type GroupDeleteParams as GroupDeleteParams -}; - -export { - Identity as Identity, - type IDTokenVersion as IDTokenVersion, - type IdentityExchangeTokenResponse as IdentityExchangeTokenResponse, - type IdentityGetAuthenticatedIdentityResponse as IdentityGetAuthenticatedIdentityResponse, - type IdentityGetIDTokenResponse as IdentityGetIDTokenResponse, - type IdentityExchangeTokenParams as IdentityExchangeTokenParams, - type IdentityGetAuthenticatedIdentityParams as IdentityGetAuthenticatedIdentityParams, - type IdentityGetIDTokenParams as IdentityGetIDTokenParams -}; - -export { - Organizations as Organizations, - type InviteDomains as InviteDomains, - type Organization as Organization, - type OrganizationMember as OrganizationMember, - type OrganizationCreateResponse as OrganizationCreateResponse, - type OrganizationRetrieveResponse as OrganizationRetrieveResponse, - type OrganizationUpdateResponse as OrganizationUpdateResponse, - type OrganizationDeleteResponse as OrganizationDeleteResponse, - type OrganizationJoinResponse as OrganizationJoinResponse, - type OrganizationLeaveResponse as OrganizationLeaveResponse, - type OrganizationSetRoleResponse as OrganizationSetRoleResponse, - type OrganizationMembersMembersPage as OrganizationMembersMembersPage, - type OrganizationCreateParams as OrganizationCreateParams, - type OrganizationRetrieveParams as OrganizationRetrieveParams, - type OrganizationUpdateParams as OrganizationUpdateParams, - type OrganizationDeleteParams as OrganizationDeleteParams, - type OrganizationJoinParams as OrganizationJoinParams, - type OrganizationLeaveParams as OrganizationLeaveParams, - type OrganizationListMembersParams as OrganizationListMembersParams, - type OrganizationSetRoleParams as OrganizationSetRoleParams -}; - -export { - Prebuilds as Prebuilds, - type Prebuild as Prebuild, - type PrebuildMetadata as PrebuildMetadata, - type PrebuildPhase as PrebuildPhase, - type PrebuildSpec as PrebuildSpec, - type PrebuildStatus as PrebuildStatus, - type PrebuildTrigger as PrebuildTrigger, - type WarmPool as WarmPool, - type WarmPoolMetadata as WarmPoolMetadata, - type WarmPoolPhase as WarmPoolPhase, - type WarmPoolSpec as WarmPoolSpec, - type WarmPoolStatus as WarmPoolStatus, - type PrebuildCreateResponse as PrebuildCreateResponse, - type PrebuildRetrieveResponse as PrebuildRetrieveResponse, - type PrebuildDeleteResponse as PrebuildDeleteResponse, - type PrebuildCancelResponse as PrebuildCancelResponse, - type PrebuildCreateLogsTokenResponse as PrebuildCreateLogsTokenResponse, - type PrebuildCreateWarmPoolResponse as PrebuildCreateWarmPoolResponse, - type PrebuildDeleteWarmPoolResponse as PrebuildDeleteWarmPoolResponse, - type PrebuildRetrieveWarmPoolResponse as PrebuildRetrieveWarmPoolResponse, - type PrebuildUpdateWarmPoolResponse as PrebuildUpdateWarmPoolResponse, - type PrebuildsPrebuildsPage as PrebuildsPrebuildsPage, - type WarmPoolsWarmPoolsPage as WarmPoolsWarmPoolsPage, - type PrebuildCreateParams as PrebuildCreateParams, - type PrebuildRetrieveParams as PrebuildRetrieveParams, - type PrebuildListParams as PrebuildListParams, - type PrebuildDeleteParams as PrebuildDeleteParams, - type PrebuildCancelParams as PrebuildCancelParams, - type PrebuildCreateLogsTokenParams as PrebuildCreateLogsTokenParams, - type PrebuildCreateWarmPoolParams as PrebuildCreateWarmPoolParams, - type PrebuildDeleteWarmPoolParams as PrebuildDeleteWarmPoolParams, - type PrebuildListWarmPoolsParams as PrebuildListWarmPoolsParams, - type PrebuildRetrieveWarmPoolParams as PrebuildRetrieveWarmPoolParams, - type PrebuildUpdateWarmPoolParams as PrebuildUpdateWarmPoolParams -}; - -export { - Projects as Projects, - type EnvironmentInitializer as EnvironmentInitializer, - type Project as Project, - type ProjectMetadata as ProjectMetadata, - type ProjectPhase as ProjectPhase, - type ProjectPrebuildConfiguration as ProjectPrebuildConfiguration, - type RecommendedEditors as RecommendedEditors, - type ProjectCreateResponse as ProjectCreateResponse, - type ProjectRetrieveResponse as ProjectRetrieveResponse, - type ProjectUpdateResponse as ProjectUpdateResponse, - type ProjectDeleteResponse as ProjectDeleteResponse, - type ProjectBulkCreateResponse as ProjectBulkCreateResponse, - type ProjectBulkDeleteResponse as ProjectBulkDeleteResponse, - type ProjectBulkUpdateResponse as ProjectBulkUpdateResponse, - type ProjectCreateFromEnvironmentResponse as ProjectCreateFromEnvironmentResponse, - type ProjectsProjectsPage as ProjectsProjectsPage, - type ProjectCreateParams as ProjectCreateParams, - type ProjectRetrieveParams as ProjectRetrieveParams, - type ProjectUpdateParams as ProjectUpdateParams, - type ProjectListParams as ProjectListParams, - type ProjectDeleteParams as ProjectDeleteParams, - type ProjectBulkCreateParams as ProjectBulkCreateParams, - type ProjectBulkDeleteParams as ProjectBulkDeleteParams, - type ProjectBulkUpdateParams as ProjectBulkUpdateParams, - type ProjectCreateFromEnvironmentParams as ProjectCreateFromEnvironmentParams -}; - -export { - Runners as Runners, - type GatewayInfo as GatewayInfo, - type LogLevel as LogLevel, - type MetricsConfiguration as MetricsConfiguration, - type Runner as Runner, - type RunnerCapability as RunnerCapability, - type RunnerConfiguration as RunnerConfiguration, - type RunnerKind as RunnerKind, - type RunnerPhase as RunnerPhase, - type RunnerProvider as RunnerProvider, - type RunnerReleaseChannel as RunnerReleaseChannel, - type RunnerSpec as RunnerSpec, - type RunnerStatus as RunnerStatus, - type RunnerVariant as RunnerVariant, - type SearchMode as SearchMode, - type UpdateWindow as UpdateWindow, - type RunnerCreateResponse as RunnerCreateResponse, - type RunnerRetrieveResponse as RunnerRetrieveResponse, - type RunnerUpdateResponse as RunnerUpdateResponse, - type RunnerDeleteResponse as RunnerDeleteResponse, - type RunnerCheckAuthenticationForHostResponse as RunnerCheckAuthenticationForHostResponse, - type RunnerCheckRepositoryAccessResponse as RunnerCheckRepositoryAccessResponse, - type RunnerCreateLogsTokenResponse as RunnerCreateLogsTokenResponse, - type RunnerCreateRunnerTokenResponse as RunnerCreateRunnerTokenResponse, - type RunnerListScmOrganizationsResponse as RunnerListScmOrganizationsResponse, - type RunnerParseContextURLResponse as RunnerParseContextURLResponse, - type RunnerSearchRepositoriesResponse as RunnerSearchRepositoriesResponse, - type RunnersRunnersPage as RunnersRunnersPage, - type RunnerListScmOrganizationsResponsesOrganizationsPage as RunnerListScmOrganizationsResponsesOrganizationsPage, - type RunnerCreateParams as RunnerCreateParams, - type RunnerRetrieveParams as RunnerRetrieveParams, - type RunnerUpdateParams as RunnerUpdateParams, - type RunnerListParams as RunnerListParams, - type RunnerDeleteParams as RunnerDeleteParams, - type RunnerCheckAuthenticationForHostParams as RunnerCheckAuthenticationForHostParams, - type RunnerCheckRepositoryAccessParams as RunnerCheckRepositoryAccessParams, - type RunnerCreateLogsTokenParams as RunnerCreateLogsTokenParams, - type RunnerCreateRunnerTokenParams as RunnerCreateRunnerTokenParams, - type RunnerListScmOrganizationsParams as RunnerListScmOrganizationsParams, - type RunnerParseContextURLParams as RunnerParseContextURLParams, - type RunnerSearchRepositoriesParams as RunnerSearchRepositoriesParams -}; - -export { - Secrets as Secrets, - type Secret as Secret, - type SecretScope as SecretScope, - type SecretCreateResponse as SecretCreateResponse, - type SecretDeleteResponse as SecretDeleteResponse, - type SecretGetValueResponse as SecretGetValueResponse, - type SecretUpdateValueResponse as SecretUpdateValueResponse, - type SecretsSecretsPage as SecretsSecretsPage, - type SecretCreateParams as SecretCreateParams, - type SecretListParams as SecretListParams, - type SecretDeleteParams as SecretDeleteParams, - type SecretGetValueParams as SecretGetValueParams, - type SecretUpdateValueParams as SecretUpdateValueParams -}; - -export { - Usage as Usage, - type EnvironmentUsageRecord as EnvironmentUsageRecord, - type EnvironmentUsageRecordsRecordsPage as EnvironmentUsageRecordsRecordsPage, - type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams -}; - -export { - Users as Users, - type User as User, - type UserDeleteUserResponse as UserDeleteUserResponse, - type UserGetAuthenticatedUserResponse as UserGetAuthenticatedUserResponse, - type UserGetUserResponse as UserGetUserResponse, - type UserSetSuspendedResponse as UserSetSuspendedResponse, - type UserDeleteUserParams as UserDeleteUserParams, - type UserGetAuthenticatedUserParams as UserGetAuthenticatedUserParams, - type UserGetUserParams as UserGetUserParams, - type UserSetSuspendedParams as UserSetSuspendedParams -}; - -export type AutomationTrigger = API.AutomationTrigger; -export type CountResponseRelation = API.CountResponseRelation; -export type EnvironmentClass = API.EnvironmentClass; -export type EnvironmentVariableItem = API.EnvironmentVariableItem; -export type EnvironmentVariableSource = API.EnvironmentVariableSource; -export type ErrorCode = API.ErrorCode; -export type FieldValue = API.FieldValue; -export type Gateway = API.Gateway; -export type OrganizationRole = API.OrganizationRole; -export type OrganizationTier = API.OrganizationTier; -export type Principal = API.Principal; -export type ProjectEnvironmentClass = API.ProjectEnvironmentClass; -export type ResourceRole = API.ResourceRole; -export type ResourceType = API.ResourceType; -export type RunsOn = API.RunsOn; -export type SecretRef = API.SecretRef; -export type Sort = API.Sort; -export type SortOrder = API.SortOrder; -export type State = API.State; -export type Subject = API.Subject; -export type Task = API.Task; -export type TaskExecution = API.TaskExecution; -export type TaskExecutionMetadata = API.TaskExecutionMetadata; -export type TaskExecutionPhase = API.TaskExecutionPhase; -export type TaskExecutionSpec = API.TaskExecutionSpec; -export type TaskExecutionStatus = API.TaskExecutionStatus; -export type TaskMetadata = API.TaskMetadata; -export type TaskSpec = API.TaskSpec; -export type UserStatus = API.UserStatus; - } + export type RequestOptions = Opts.RequestOptions; + + export import AgentExecutionsPage = Pagination.AgentExecutionsPage; + export { + type AgentExecutionsPageParams as AgentExecutionsPageParams, + type AgentExecutionsPageResponse as AgentExecutionsPageResponse, + }; + + export import AssignmentsPage = Pagination.AssignmentsPage; + export { + type AssignmentsPageParams as AssignmentsPageParams, + type AssignmentsPageResponse as AssignmentsPageResponse, + }; + + export import DomainVerificationsPage = Pagination.DomainVerificationsPage; + export { + type DomainVerificationsPageParams as DomainVerificationsPageParams, + type DomainVerificationsPageResponse as DomainVerificationsPageResponse, + }; + + export import EditorsPage = Pagination.EditorsPage; + export { type EditorsPageParams as EditorsPageParams, type EditorsPageResponse as EditorsPageResponse }; + + export import EntriesPage = Pagination.EntriesPage; + export { type EntriesPageParams as EntriesPageParams, type EntriesPageResponse as EntriesPageResponse }; + + export import EnvironmentClassesPage = Pagination.EnvironmentClassesPage; + export { + type EnvironmentClassesPageParams as EnvironmentClassesPageParams, + type EnvironmentClassesPageResponse as EnvironmentClassesPageResponse, + }; + + export import EnvironmentsPage = Pagination.EnvironmentsPage; + export { + type EnvironmentsPageParams as EnvironmentsPageParams, + type EnvironmentsPageResponse as EnvironmentsPageResponse, + }; + + export import GatewaysPage = Pagination.GatewaysPage; + export { type GatewaysPageParams as GatewaysPageParams, type GatewaysPageResponse as GatewaysPageResponse }; + + export import GroupsPage = Pagination.GroupsPage; + export { type GroupsPageParams as GroupsPageParams, type GroupsPageResponse as GroupsPageResponse }; + + export import IntegrationsPage = Pagination.IntegrationsPage; + export { + type IntegrationsPageParams as IntegrationsPageParams, + type IntegrationsPageResponse as IntegrationsPageResponse, + }; + + export import JoinableOrganizationsPage = Pagination.JoinableOrganizationsPage; + export { + type JoinableOrganizationsPageParams as JoinableOrganizationsPageParams, + type JoinableOrganizationsPageResponse as JoinableOrganizationsPageResponse, + }; + + export import LoginProvidersPage = Pagination.LoginProvidersPage; + export { + type LoginProvidersPageParams as LoginProvidersPageParams, + type LoginProvidersPageResponse as LoginProvidersPageResponse, + }; + + export import LoginsPage = Pagination.LoginsPage; + export { type LoginsPageParams as LoginsPageParams, type LoginsPageResponse as LoginsPageResponse }; + + export import MembersPage = Pagination.MembersPage; + export { type MembersPageParams as MembersPageParams, type MembersPageResponse as MembersPageResponse }; + + export import OrganizationsPage = Pagination.OrganizationsPage; + export { + type OrganizationsPageParams as OrganizationsPageParams, + type OrganizationsPageResponse as OrganizationsPageResponse, + }; + + export import OutputsPage = Pagination.OutputsPage; + export { type OutputsPageParams as OutputsPageParams, type OutputsPageResponse as OutputsPageResponse }; + + export import PersonalAccessTokensPage = Pagination.PersonalAccessTokensPage; + export { + type PersonalAccessTokensPageParams as PersonalAccessTokensPageParams, + type PersonalAccessTokensPageResponse as PersonalAccessTokensPageResponse, + }; + + export import PoliciesPage = Pagination.PoliciesPage; + export { type PoliciesPageParams as PoliciesPageParams, type PoliciesPageResponse as PoliciesPageResponse }; + + export import PrebuildsPage = Pagination.PrebuildsPage; + export { + type PrebuildsPageParams as PrebuildsPageParams, + type PrebuildsPageResponse as PrebuildsPageResponse, + }; + + export import ProjectEnvironmentClassesPage = Pagination.ProjectEnvironmentClassesPage; + export { + type ProjectEnvironmentClassesPageParams as ProjectEnvironmentClassesPageParams, + type ProjectEnvironmentClassesPageResponse as ProjectEnvironmentClassesPageResponse, + }; + + export import ProjectsPage = Pagination.ProjectsPage; + export { type ProjectsPageParams as ProjectsPageParams, type ProjectsPageResponse as ProjectsPageResponse }; + + export import PromptsPage = Pagination.PromptsPage; + export { type PromptsPageParams as PromptsPageParams, type PromptsPageResponse as PromptsPageResponse }; + + export import RecordsPage = Pagination.RecordsPage; + export { type RecordsPageParams as RecordsPageParams, type RecordsPageResponse as RecordsPageResponse }; + + export import RepositoriesPage = Pagination.RepositoriesPage; + export { + type RepositoriesPageParams as RepositoriesPageParams, + type RepositoriesPageResponse as RepositoriesPageResponse, + }; + + export import RunnersPage = Pagination.RunnersPage; + export { type RunnersPageParams as RunnersPageParams, type RunnersPageResponse as RunnersPageResponse }; + + export import ScimConfigurationsPage = Pagination.ScimConfigurationsPage; + export { + type ScimConfigurationsPageParams as ScimConfigurationsPageParams, + type ScimConfigurationsPageResponse as ScimConfigurationsPageResponse, + }; + + export import SecretsPage = Pagination.SecretsPage; + export { type SecretsPageParams as SecretsPageParams, type SecretsPageResponse as SecretsPageResponse }; + + export import ServicesPage = Pagination.ServicesPage; + export { type ServicesPageParams as ServicesPageParams, type ServicesPageResponse as ServicesPageResponse }; + + export import SSOConfigurationsPage = Pagination.SSOConfigurationsPage; + export { + type SSOConfigurationsPageParams as SSOConfigurationsPageParams, + type SSOConfigurationsPageResponse as SSOConfigurationsPageResponse, + }; + + export import TaskExecutionsPage = Pagination.TaskExecutionsPage; + export { + type TaskExecutionsPageParams as TaskExecutionsPageParams, + type TaskExecutionsPageResponse as TaskExecutionsPageResponse, + }; + + export import TasksPage = Pagination.TasksPage; + export { type TasksPageParams as TasksPageParams, type TasksPageResponse as TasksPageResponse }; + + export import TokensPage = Pagination.TokensPage; + export { type TokensPageParams as TokensPageParams, type TokensPageResponse as TokensPageResponse }; + + export import WarmPoolsPage = Pagination.WarmPoolsPage; + export { + type WarmPoolsPageParams as WarmPoolsPageParams, + type WarmPoolsPageResponse as WarmPoolsPageResponse, + }; + + export import WorkflowExecutionActionsPage = Pagination.WorkflowExecutionActionsPage; + export { + type WorkflowExecutionActionsPageParams as WorkflowExecutionActionsPageParams, + type WorkflowExecutionActionsPageResponse as WorkflowExecutionActionsPageResponse, + }; + + export import WorkflowExecutionsPage = Pagination.WorkflowExecutionsPage; + export { + type WorkflowExecutionsPageParams as WorkflowExecutionsPageParams, + type WorkflowExecutionsPageResponse as WorkflowExecutionsPageResponse, + }; + + export import WorkflowsPage = Pagination.WorkflowsPage; + export { + type WorkflowsPageParams as WorkflowsPageParams, + type WorkflowsPageResponse as WorkflowsPageResponse, + }; + + export { + Accounts as Accounts, + type Account as Account, + type AccountMembership as AccountMembership, + type JoinableOrganization as JoinableOrganization, + type LoginProvider as LoginProvider, + type AccountRetrieveResponse as AccountRetrieveResponse, + type AccountDeleteResponse as AccountDeleteResponse, + type AccountGetSSOLoginURLResponse as AccountGetSSOLoginURLResponse, + type AccountListSSOLoginsResponse as AccountListSSOLoginsResponse, + type JoinableOrganizationsJoinableOrganizationsPage as JoinableOrganizationsJoinableOrganizationsPage, + type LoginProvidersLoginProvidersPage as LoginProvidersLoginProvidersPage, + type AccountListSSOLoginsResponsesLoginsPage as AccountListSSOLoginsResponsesLoginsPage, + type AccountRetrieveParams as AccountRetrieveParams, + type AccountDeleteParams as AccountDeleteParams, + type AccountGetSSOLoginURLParams as AccountGetSSOLoginURLParams, + type AccountListJoinableOrganizationsParams as AccountListJoinableOrganizationsParams, + type AccountListLoginProvidersParams as AccountListLoginProvidersParams, + type AccountListSSOLoginsParams as AccountListSSOLoginsParams, + }; + + export { + Agents as Agents, + type AgentCodeContext as AgentCodeContext, + type AgentExecution as AgentExecution, + type AgentMessage as AgentMessage, + type AgentMode as AgentMode, + type Prompt as Prompt, + type PromptMetadata as PromptMetadata, + type PromptSpec as PromptSpec, + type Role as Role, + type Type as Type, + type UserInputBlock as UserInputBlock, + type UserInputMetadata as UserInputMetadata, + type WakeEvent as WakeEvent, + type AgentCreateExecutionConversationTokenResponse as AgentCreateExecutionConversationTokenResponse, + type AgentCreatePromptResponse as AgentCreatePromptResponse, + type AgentDeleteExecutionResponse as AgentDeleteExecutionResponse, + type AgentDeletePromptResponse as AgentDeletePromptResponse, + type AgentRetrieveExecutionResponse as AgentRetrieveExecutionResponse, + type AgentRetrievePromptResponse as AgentRetrievePromptResponse, + type AgentSendToExecutionResponse as AgentSendToExecutionResponse, + type AgentStartExecutionResponse as AgentStartExecutionResponse, + type AgentStopExecutionResponse as AgentStopExecutionResponse, + type AgentUpdatePromptResponse as AgentUpdatePromptResponse, + type AgentExecutionsAgentExecutionsPage as AgentExecutionsAgentExecutionsPage, + type PromptsPromptsPage as PromptsPromptsPage, + type AgentCreateExecutionConversationTokenParams as AgentCreateExecutionConversationTokenParams, + type AgentCreatePromptParams as AgentCreatePromptParams, + type AgentDeleteExecutionParams as AgentDeleteExecutionParams, + type AgentDeletePromptParams as AgentDeletePromptParams, + type AgentListExecutionsParams as AgentListExecutionsParams, + type AgentListPromptsParams as AgentListPromptsParams, + type AgentRetrieveExecutionParams as AgentRetrieveExecutionParams, + type AgentRetrievePromptParams as AgentRetrievePromptParams, + type AgentSendToExecutionParams as AgentSendToExecutionParams, + type AgentStartExecutionParams as AgentStartExecutionParams, + type AgentStopExecutionParams as AgentStopExecutionParams, + type AgentUpdatePromptParams as AgentUpdatePromptParams, + }; + + export { + Automations as Automations, + type Workflow as Workflow, + type WorkflowAction as WorkflowAction, + type WorkflowExecution as WorkflowExecution, + type WorkflowExecutionAction as WorkflowExecutionAction, + type WorkflowStep as WorkflowStep, + type WorkflowTrigger as WorkflowTrigger, + type WorkflowTriggerContext as WorkflowTriggerContext, + type AutomationCreateResponse as AutomationCreateResponse, + type AutomationRetrieveResponse as AutomationRetrieveResponse, + type AutomationUpdateResponse as AutomationUpdateResponse, + type AutomationDeleteResponse as AutomationDeleteResponse, + type AutomationCancelExecutionResponse as AutomationCancelExecutionResponse, + type AutomationCancelExecutionActionResponse as AutomationCancelExecutionActionResponse, + type AutomationListExecutionOutputsResponse as AutomationListExecutionOutputsResponse, + type AutomationRetrieveExecutionResponse as AutomationRetrieveExecutionResponse, + type AutomationRetrieveExecutionActionResponse as AutomationRetrieveExecutionActionResponse, + type AutomationStartExecutionResponse as AutomationStartExecutionResponse, + type WorkflowsWorkflowsPage as WorkflowsWorkflowsPage, + type WorkflowExecutionActionsWorkflowExecutionActionsPage as WorkflowExecutionActionsWorkflowExecutionActionsPage, + type AutomationListExecutionOutputsResponsesOutputsPage as AutomationListExecutionOutputsResponsesOutputsPage, + type WorkflowExecutionsWorkflowExecutionsPage as WorkflowExecutionsWorkflowExecutionsPage, + type AutomationCreateParams as AutomationCreateParams, + type AutomationRetrieveParams as AutomationRetrieveParams, + type AutomationUpdateParams as AutomationUpdateParams, + type AutomationListParams as AutomationListParams, + type AutomationDeleteParams as AutomationDeleteParams, + type AutomationCancelExecutionParams as AutomationCancelExecutionParams, + type AutomationCancelExecutionActionParams as AutomationCancelExecutionActionParams, + type AutomationListExecutionActionsParams as AutomationListExecutionActionsParams, + type AutomationListExecutionOutputsParams as AutomationListExecutionOutputsParams, + type AutomationListExecutionsParams as AutomationListExecutionsParams, + type AutomationRetrieveExecutionParams as AutomationRetrieveExecutionParams, + type AutomationRetrieveExecutionActionParams as AutomationRetrieveExecutionActionParams, + type AutomationStartExecutionParams as AutomationStartExecutionParams, + }; + + export { + Editors as Editors, + type Editor as Editor, + type EditorVersion as EditorVersion, + type EditorRetrieveResponse as EditorRetrieveResponse, + type EditorResolveURLResponse as EditorResolveURLResponse, + type EditorsEditorsPage as EditorsEditorsPage, + type EditorRetrieveParams as EditorRetrieveParams, + type EditorListParams as EditorListParams, + type EditorResolveURLParams as EditorResolveURLParams, + }; + + export { + Environments as Environments, + type AdmissionLevel as AdmissionLevel, + type BpfDebugLevel as BpfDebugLevel, + type Environment as Environment, + type EnvironmentActivitySignal as EnvironmentActivitySignal, + type EnvironmentMetadata as EnvironmentMetadata, + type EnvironmentPhase as EnvironmentPhase, + type EnvironmentRole as EnvironmentRole, + type EnvironmentSpec as EnvironmentSpec, + type EnvironmentStatus as EnvironmentStatus, + type KernelControlsConfig as KernelControlsConfig, + type Veto as Veto, + type EnvironmentCreateResponse as EnvironmentCreateResponse, + type EnvironmentRetrieveResponse as EnvironmentRetrieveResponse, + type EnvironmentUpdateResponse as EnvironmentUpdateResponse, + type EnvironmentDeleteResponse as EnvironmentDeleteResponse, + type EnvironmentCreateEnvironmentTokenResponse as EnvironmentCreateEnvironmentTokenResponse, + type EnvironmentCreateFromProjectResponse as EnvironmentCreateFromProjectResponse, + type EnvironmentCreateLogsTokenResponse as EnvironmentCreateLogsTokenResponse, + type EnvironmentMarkActiveResponse as EnvironmentMarkActiveResponse, + type EnvironmentStartResponse as EnvironmentStartResponse, + type EnvironmentStopResponse as EnvironmentStopResponse, + type EnvironmentUnarchiveResponse as EnvironmentUnarchiveResponse, + type EnvironmentsEnvironmentsPage as EnvironmentsEnvironmentsPage, + type EnvironmentCreateParams as EnvironmentCreateParams, + type EnvironmentRetrieveParams as EnvironmentRetrieveParams, + type EnvironmentUpdateParams as EnvironmentUpdateParams, + type EnvironmentListParams as EnvironmentListParams, + type EnvironmentDeleteParams as EnvironmentDeleteParams, + type EnvironmentCreateEnvironmentTokenParams as EnvironmentCreateEnvironmentTokenParams, + type EnvironmentCreateFromProjectParams as EnvironmentCreateFromProjectParams, + type EnvironmentCreateLogsTokenParams as EnvironmentCreateLogsTokenParams, + type EnvironmentMarkActiveParams as EnvironmentMarkActiveParams, + type EnvironmentStartParams as EnvironmentStartParams, + type EnvironmentStopParams as EnvironmentStopParams, + type EnvironmentUnarchiveParams as EnvironmentUnarchiveParams, + }; + + export { + ErrorsAPIErrors as Errors, + type Breadcrumb as Breadcrumb, + type ErrorEvent as ErrorEvent, + type ErrorLevel as ErrorLevel, + type ExceptionInfo as ExceptionInfo, + type ExceptionMechanism as ExceptionMechanism, + type ErrorRequestInfo as RequestInfo, + type StackFrame as StackFrame, + type ErrorReportErrorsResponse as ErrorReportErrorsResponse, + type ErrorReportErrorsParams as ErrorReportErrorsParams, + }; + + export { + Events as Events, + type ResourceOperation as ResourceOperation, + type EventListResponse as EventListResponse, + type EventWatchResponse as EventWatchResponse, + type EventListResponsesEntriesPage as EventListResponsesEntriesPage, + type EventListParams as EventListParams, + type EventWatchParams as EventWatchParams, + }; + + export { Gateways as Gateways, type GatewayListParams as GatewayListParams }; + + export { + Groups as Groups, + type Group as Group, + type GroupCreateResponse as GroupCreateResponse, + type GroupRetrieveResponse as GroupRetrieveResponse, + type GroupUpdateResponse as GroupUpdateResponse, + type GroupDeleteResponse as GroupDeleteResponse, + type GroupsGroupsPage as GroupsGroupsPage, + type GroupCreateParams as GroupCreateParams, + type GroupRetrieveParams as GroupRetrieveParams, + type GroupUpdateParams as GroupUpdateParams, + type GroupListParams as GroupListParams, + type GroupDeleteParams as GroupDeleteParams, + }; + + export { + Identity as Identity, + type IDTokenVersion as IDTokenVersion, + type IdentityExchangeTokenResponse as IdentityExchangeTokenResponse, + type IdentityGetAuthenticatedIdentityResponse as IdentityGetAuthenticatedIdentityResponse, + type IdentityGetIDTokenResponse as IdentityGetIDTokenResponse, + type IdentityExchangeTokenParams as IdentityExchangeTokenParams, + type IdentityGetAuthenticatedIdentityParams as IdentityGetAuthenticatedIdentityParams, + type IdentityGetIDTokenParams as IdentityGetIDTokenParams, + }; + + export { + Organizations as Organizations, + type InviteDomains as InviteDomains, + type Organization as Organization, + type OrganizationMember as OrganizationMember, + type OrganizationCreateResponse as OrganizationCreateResponse, + type OrganizationRetrieveResponse as OrganizationRetrieveResponse, + type OrganizationUpdateResponse as OrganizationUpdateResponse, + type OrganizationDeleteResponse as OrganizationDeleteResponse, + type OrganizationJoinResponse as OrganizationJoinResponse, + type OrganizationLeaveResponse as OrganizationLeaveResponse, + type OrganizationSetRoleResponse as OrganizationSetRoleResponse, + type OrganizationMembersMembersPage as OrganizationMembersMembersPage, + type OrganizationCreateParams as OrganizationCreateParams, + type OrganizationRetrieveParams as OrganizationRetrieveParams, + type OrganizationUpdateParams as OrganizationUpdateParams, + type OrganizationDeleteParams as OrganizationDeleteParams, + type OrganizationJoinParams as OrganizationJoinParams, + type OrganizationLeaveParams as OrganizationLeaveParams, + type OrganizationListMembersParams as OrganizationListMembersParams, + type OrganizationSetRoleParams as OrganizationSetRoleParams, + }; + + export { + Prebuilds as Prebuilds, + type Prebuild as Prebuild, + type PrebuildMetadata as PrebuildMetadata, + type PrebuildPhase as PrebuildPhase, + type PrebuildSpec as PrebuildSpec, + type PrebuildStatus as PrebuildStatus, + type PrebuildTrigger as PrebuildTrigger, + type WarmPool as WarmPool, + type WarmPoolMetadata as WarmPoolMetadata, + type WarmPoolPhase as WarmPoolPhase, + type WarmPoolSpec as WarmPoolSpec, + type WarmPoolStatus as WarmPoolStatus, + type PrebuildCreateResponse as PrebuildCreateResponse, + type PrebuildRetrieveResponse as PrebuildRetrieveResponse, + type PrebuildDeleteResponse as PrebuildDeleteResponse, + type PrebuildCancelResponse as PrebuildCancelResponse, + type PrebuildCreateLogsTokenResponse as PrebuildCreateLogsTokenResponse, + type PrebuildCreateWarmPoolResponse as PrebuildCreateWarmPoolResponse, + type PrebuildDeleteWarmPoolResponse as PrebuildDeleteWarmPoolResponse, + type PrebuildRetrieveWarmPoolResponse as PrebuildRetrieveWarmPoolResponse, + type PrebuildUpdateWarmPoolResponse as PrebuildUpdateWarmPoolResponse, + type PrebuildsPrebuildsPage as PrebuildsPrebuildsPage, + type WarmPoolsWarmPoolsPage as WarmPoolsWarmPoolsPage, + type PrebuildCreateParams as PrebuildCreateParams, + type PrebuildRetrieveParams as PrebuildRetrieveParams, + type PrebuildListParams as PrebuildListParams, + type PrebuildDeleteParams as PrebuildDeleteParams, + type PrebuildCancelParams as PrebuildCancelParams, + type PrebuildCreateLogsTokenParams as PrebuildCreateLogsTokenParams, + type PrebuildCreateWarmPoolParams as PrebuildCreateWarmPoolParams, + type PrebuildDeleteWarmPoolParams as PrebuildDeleteWarmPoolParams, + type PrebuildListWarmPoolsParams as PrebuildListWarmPoolsParams, + type PrebuildRetrieveWarmPoolParams as PrebuildRetrieveWarmPoolParams, + type PrebuildUpdateWarmPoolParams as PrebuildUpdateWarmPoolParams, + }; + + export { + Projects as Projects, + type EnvironmentInitializer as EnvironmentInitializer, + type Project as Project, + type ProjectMetadata as ProjectMetadata, + type ProjectPhase as ProjectPhase, + type ProjectPrebuildConfiguration as ProjectPrebuildConfiguration, + type RecommendedEditors as RecommendedEditors, + type ProjectCreateResponse as ProjectCreateResponse, + type ProjectRetrieveResponse as ProjectRetrieveResponse, + type ProjectUpdateResponse as ProjectUpdateResponse, + type ProjectDeleteResponse as ProjectDeleteResponse, + type ProjectBulkCreateResponse as ProjectBulkCreateResponse, + type ProjectBulkDeleteResponse as ProjectBulkDeleteResponse, + type ProjectBulkUpdateResponse as ProjectBulkUpdateResponse, + type ProjectCreateFromEnvironmentResponse as ProjectCreateFromEnvironmentResponse, + type ProjectsProjectsPage as ProjectsProjectsPage, + type ProjectCreateParams as ProjectCreateParams, + type ProjectRetrieveParams as ProjectRetrieveParams, + type ProjectUpdateParams as ProjectUpdateParams, + type ProjectListParams as ProjectListParams, + type ProjectDeleteParams as ProjectDeleteParams, + type ProjectBulkCreateParams as ProjectBulkCreateParams, + type ProjectBulkDeleteParams as ProjectBulkDeleteParams, + type ProjectBulkUpdateParams as ProjectBulkUpdateParams, + type ProjectCreateFromEnvironmentParams as ProjectCreateFromEnvironmentParams, + }; + + export { + Runners as Runners, + type GatewayInfo as GatewayInfo, + type LogLevel as LogLevel, + type MetricsConfiguration as MetricsConfiguration, + type Runner as Runner, + type RunnerCapability as RunnerCapability, + type RunnerConfiguration as RunnerConfiguration, + type RunnerKind as RunnerKind, + type RunnerPhase as RunnerPhase, + type RunnerProvider as RunnerProvider, + type RunnerReleaseChannel as RunnerReleaseChannel, + type RunnerSpec as RunnerSpec, + type RunnerStatus as RunnerStatus, + type RunnerVariant as RunnerVariant, + type SearchMode as SearchMode, + type UpdateWindow as UpdateWindow, + type RunnerCreateResponse as RunnerCreateResponse, + type RunnerRetrieveResponse as RunnerRetrieveResponse, + type RunnerUpdateResponse as RunnerUpdateResponse, + type RunnerDeleteResponse as RunnerDeleteResponse, + type RunnerCheckAuthenticationForHostResponse as RunnerCheckAuthenticationForHostResponse, + type RunnerCheckRepositoryAccessResponse as RunnerCheckRepositoryAccessResponse, + type RunnerCreateLogsTokenResponse as RunnerCreateLogsTokenResponse, + type RunnerCreateRunnerTokenResponse as RunnerCreateRunnerTokenResponse, + type RunnerListScmOrganizationsResponse as RunnerListScmOrganizationsResponse, + type RunnerParseContextURLResponse as RunnerParseContextURLResponse, + type RunnerSearchRepositoriesResponse as RunnerSearchRepositoriesResponse, + type RunnersRunnersPage as RunnersRunnersPage, + type RunnerListScmOrganizationsResponsesOrganizationsPage as RunnerListScmOrganizationsResponsesOrganizationsPage, + type RunnerCreateParams as RunnerCreateParams, + type RunnerRetrieveParams as RunnerRetrieveParams, + type RunnerUpdateParams as RunnerUpdateParams, + type RunnerListParams as RunnerListParams, + type RunnerDeleteParams as RunnerDeleteParams, + type RunnerCheckAuthenticationForHostParams as RunnerCheckAuthenticationForHostParams, + type RunnerCheckRepositoryAccessParams as RunnerCheckRepositoryAccessParams, + type RunnerCreateLogsTokenParams as RunnerCreateLogsTokenParams, + type RunnerCreateRunnerTokenParams as RunnerCreateRunnerTokenParams, + type RunnerListScmOrganizationsParams as RunnerListScmOrganizationsParams, + type RunnerParseContextURLParams as RunnerParseContextURLParams, + type RunnerSearchRepositoriesParams as RunnerSearchRepositoriesParams, + }; + + export { + Secrets as Secrets, + type Secret as Secret, + type SecretScope as SecretScope, + type SecretCreateResponse as SecretCreateResponse, + type SecretDeleteResponse as SecretDeleteResponse, + type SecretGetValueResponse as SecretGetValueResponse, + type SecretUpdateValueResponse as SecretUpdateValueResponse, + type SecretsSecretsPage as SecretsSecretsPage, + type SecretCreateParams as SecretCreateParams, + type SecretListParams as SecretListParams, + type SecretDeleteParams as SecretDeleteParams, + type SecretGetValueParams as SecretGetValueParams, + type SecretUpdateValueParams as SecretUpdateValueParams, + }; + + export { + Usage as Usage, + type EnvironmentUsageRecord as EnvironmentUsageRecord, + type EnvironmentUsageRecordsRecordsPage as EnvironmentUsageRecordsRecordsPage, + type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams, + }; + + export { + Users as Users, + type User as User, + type UserDeleteUserResponse as UserDeleteUserResponse, + type UserGetAuthenticatedUserResponse as UserGetAuthenticatedUserResponse, + type UserGetUserResponse as UserGetUserResponse, + type UserSetSuspendedResponse as UserSetSuspendedResponse, + type UserDeleteUserParams as UserDeleteUserParams, + type UserGetAuthenticatedUserParams as UserGetAuthenticatedUserParams, + type UserGetUserParams as UserGetUserParams, + type UserSetSuspendedParams as UserSetSuspendedParams, + }; + + export type AutomationTrigger = API.AutomationTrigger; + export type CountResponseRelation = API.CountResponseRelation; + export type EnvironmentClass = API.EnvironmentClass; + export type EnvironmentVariableItem = API.EnvironmentVariableItem; + export type EnvironmentVariableSource = API.EnvironmentVariableSource; + export type ErrorCode = API.ErrorCode; + export type FieldValue = API.FieldValue; + export type Gateway = API.Gateway; + export type OrganizationRole = API.OrganizationRole; + export type OrganizationTier = API.OrganizationTier; + export type Principal = API.Principal; + export type ProjectEnvironmentClass = API.ProjectEnvironmentClass; + export type ResourceRole = API.ResourceRole; + export type ResourceType = API.ResourceType; + export type RunsOn = API.RunsOn; + export type SecretRef = API.SecretRef; + export type Sort = API.Sort; + export type SortOrder = API.SortOrder; + export type State = API.State; + export type Subject = API.Subject; + export type Task = API.Task; + export type TaskExecution = API.TaskExecution; + export type TaskExecutionMetadata = API.TaskExecutionMetadata; + export type TaskExecutionPhase = API.TaskExecutionPhase; + export type TaskExecutionSpec = API.TaskExecutionSpec; + export type TaskExecutionStatus = API.TaskExecutionStatus; + export type TaskMetadata = API.TaskMetadata; + export type TaskSpec = API.TaskSpec; + export type UserStatus = API.UserStatus; +} diff --git a/src/core/api-promise.ts b/src/core/api-promise.ts index 897d0f50..639a5457 100644 --- a/src/core/api-promise.ts +++ b/src/core/api-promise.ts @@ -16,7 +16,10 @@ export class APIPromise extends Promise { constructor( client: Gitpod, private responsePromise: Promise, - private parseResponse: (client: Gitpod, props: APIResponseProps) => PromiseOrValue = defaultParseResponse, + private parseResponse: ( + client: Gitpod, + props: APIResponseProps, + ) => PromiseOrValue = defaultParseResponse, ) { super((resolve) => { // this is maybe a bit weird but this has to be a no-op to not implicitly @@ -28,7 +31,9 @@ export class APIPromise extends Promise { } _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise { - return new APIPromise(this.#client, this.responsePromise, async (client, props) => transform(await this.parseResponse(client, props), props)); + return new APIPromise(this.#client, this.responsePromise, async (client, props) => + transform(await this.parseResponse(client, props), props), + ); } /** diff --git a/src/core/error.ts b/src/core/error.ts index e40b86ee..1b22334e 100644 --- a/src/core/error.ts +++ b/src/core/error.ts @@ -3,10 +3,13 @@ import { castToError } from '../internal/errors'; import * as Shared from '../resources/shared'; -export class GitpodError extends Error { -} +export class GitpodError extends Error {} -export class APIError extends GitpodError { +export class APIError< + TStatus extends number | undefined = number | undefined, + THeaders extends Headers | undefined = Headers | undefined, + TError extends Object | undefined = Object | undefined, +> extends GitpodError { /** HTTP status for the response that caused the error */ readonly status: TStatus; /** HTTP headers for the response that caused the error */ @@ -20,8 +23,6 @@ export class APIError { -} +export class BadRequestError extends APIError<400, Headers> {} -export class AuthenticationError extends APIError<401, Headers> { -} +export class AuthenticationError extends APIError<401, Headers> {} -export class PermissionDeniedError extends APIError<403, Headers> { -} +export class PermissionDeniedError extends APIError<403, Headers> {} -export class NotFoundError extends APIError<404, Headers> { -} +export class NotFoundError extends APIError<404, Headers> {} -export class ConflictError extends APIError<409, Headers> { -} +export class ConflictError extends APIError<409, Headers> {} -export class UnprocessableEntityError extends APIError<422, Headers> { -} +export class UnprocessableEntityError extends APIError<422, Headers> {} -export class RateLimitError extends APIError<429, Headers> { -} +export class RateLimitError extends APIError<429, Headers> {} -export class InternalServerError extends APIError { -} +export class InternalServerError extends APIError {} diff --git a/src/core/pagination.ts b/src/core/pagination.ts index 455889ee..c01757cf 100644 --- a/src/core/pagination.ts +++ b/src/core/pagination.ts @@ -87,7 +87,8 @@ export class PagePromise< super( client, request, - async (client, props) => new Page(client, props.response, await defaultParseResponse(client, props), props.options) + async (client, props) => + new Page(client, props.response, await defaultParseResponse(client, props), props.options), ); } @@ -124,12 +125,20 @@ export interface AgentExecutionsPageParams { token?: string; } -export class AgentExecutionsPage extends AbstractPage implements AgentExecutionsPageResponse { +export class AgentExecutionsPage + extends AbstractPage + implements AgentExecutionsPageResponse +{ agentExecutions: Array; pagination: AgentExecutionsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: AgentExecutionsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: AgentExecutionsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.agentExecutions = body.agentExecutions || []; @@ -141,7 +150,7 @@ export class AgentExecutionsPage extends AbstractPage implements Age } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -179,7 +188,12 @@ export class AssignmentsPage extends AbstractPage implements Assignm pagination: AssignmentsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: AssignmentsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: AssignmentsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.assignments = body.assignments || []; @@ -191,7 +205,7 @@ export class AssignmentsPage extends AbstractPage implements Assignm } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -224,12 +238,20 @@ export interface DomainVerificationsPageParams { token?: string; } -export class DomainVerificationsPage extends AbstractPage implements DomainVerificationsPageResponse { +export class DomainVerificationsPage + extends AbstractPage + implements DomainVerificationsPageResponse +{ domainVerifications: Array; pagination: DomainVerificationsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: DomainVerificationsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: DomainVerificationsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.domainVerifications = body.domainVerifications || []; @@ -241,7 +263,7 @@ export class DomainVerificationsPage extends AbstractPage implements } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -279,7 +301,12 @@ export class EditorsPage extends AbstractPage implements EditorsPage pagination: EditorsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: EditorsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: EditorsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.editors = body.editors || []; @@ -291,7 +318,7 @@ export class EditorsPage extends AbstractPage implements EditorsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -329,7 +356,12 @@ export class EntriesPage extends AbstractPage implements EntriesPage pagination: EntriesPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: EntriesPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: EntriesPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.entries = body.entries || []; @@ -341,7 +373,7 @@ export class EntriesPage extends AbstractPage implements EntriesPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -374,12 +406,20 @@ export interface EnvironmentClassesPageParams { token?: string; } -export class EnvironmentClassesPage extends AbstractPage implements EnvironmentClassesPageResponse { +export class EnvironmentClassesPage + extends AbstractPage + implements EnvironmentClassesPageResponse +{ environmentClasses: Array; pagination: EnvironmentClassesPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: EnvironmentClassesPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: EnvironmentClassesPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.environmentClasses = body.environmentClasses || []; @@ -391,7 +431,7 @@ export class EnvironmentClassesPage extends AbstractPage implements } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -429,7 +469,12 @@ export class EnvironmentsPage extends AbstractPage implements Enviro pagination: EnvironmentsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: EnvironmentsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: EnvironmentsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.environments = body.environments || []; @@ -441,7 +486,7 @@ export class EnvironmentsPage extends AbstractPage implements Enviro } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -479,7 +524,12 @@ export class GatewaysPage extends AbstractPage implements GatewaysPa pagination: GatewaysPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: GatewaysPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: GatewaysPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.gateways = body.gateways || []; @@ -491,7 +541,7 @@ export class GatewaysPage extends AbstractPage implements GatewaysPa } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -529,7 +579,12 @@ export class GroupsPage extends AbstractPage implements GroupsPageRe pagination: GroupsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: GroupsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: GroupsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.groups = body.groups || []; @@ -541,7 +596,7 @@ export class GroupsPage extends AbstractPage implements GroupsPageRe } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -579,7 +634,12 @@ export class IntegrationsPage extends AbstractPage implements Integr pagination: IntegrationsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: IntegrationsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: IntegrationsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.integrations = body.integrations || []; @@ -591,7 +651,7 @@ export class IntegrationsPage extends AbstractPage implements Integr } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -624,12 +684,20 @@ export interface JoinableOrganizationsPageParams { token?: string; } -export class JoinableOrganizationsPage extends AbstractPage implements JoinableOrganizationsPageResponse { +export class JoinableOrganizationsPage + extends AbstractPage + implements JoinableOrganizationsPageResponse +{ joinableOrganizations: Array; pagination: JoinableOrganizationsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: JoinableOrganizationsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: JoinableOrganizationsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.joinableOrganizations = body.joinableOrganizations || []; @@ -641,7 +709,7 @@ export class JoinableOrganizationsPage extends AbstractPage implemen } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -679,7 +747,12 @@ export class LoginProvidersPage extends AbstractPage implements Logi pagination: LoginProvidersPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: LoginProvidersPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: LoginProvidersPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.loginProviders = body.loginProviders || []; @@ -691,7 +764,7 @@ export class LoginProvidersPage extends AbstractPage implements Logi } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -729,7 +802,12 @@ export class LoginsPage extends AbstractPage implements LoginsPageRe pagination: LoginsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: LoginsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: LoginsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.logins = body.logins || []; @@ -741,7 +819,7 @@ export class LoginsPage extends AbstractPage implements LoginsPageRe } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -779,7 +857,12 @@ export class MembersPage extends AbstractPage implements MembersPage pagination: MembersPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: MembersPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: MembersPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.members = body.members || []; @@ -791,7 +874,7 @@ export class MembersPage extends AbstractPage implements MembersPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -829,7 +912,12 @@ export class OrganizationsPage extends AbstractPage implements Organ pagination: OrganizationsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: OrganizationsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: OrganizationsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.organizations = body.organizations || []; @@ -841,7 +929,7 @@ export class OrganizationsPage extends AbstractPage implements Organ } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -879,7 +967,12 @@ export class OutputsPage extends AbstractPage implements OutputsPage pagination: OutputsPageResponse.Pagination; - constructor(client: Gitpod, response: Response, body: OutputsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: OutputsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.outputs = body.outputs || []; @@ -891,7 +984,7 @@ export class OutputsPage extends AbstractPage implements OutputsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -924,12 +1017,20 @@ export interface PersonalAccessTokensPageParams { token?: string; } -export class PersonalAccessTokensPage extends AbstractPage implements PersonalAccessTokensPageResponse { +export class PersonalAccessTokensPage + extends AbstractPage + implements PersonalAccessTokensPageResponse +{ pagination: PersonalAccessTokensPageResponse.Pagination; personalAccessTokens: Array; - constructor(client: Gitpod, response: Response, body: PersonalAccessTokensPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: PersonalAccessTokensPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -941,7 +1042,7 @@ export class PersonalAccessTokensPage extends AbstractPage implement } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -979,7 +1080,12 @@ export class PoliciesPage extends AbstractPage implements PoliciesPa policies: Array; - constructor(client: Gitpod, response: Response, body: PoliciesPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: PoliciesPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -991,7 +1097,7 @@ export class PoliciesPage extends AbstractPage implements PoliciesPa } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1029,7 +1135,12 @@ export class PrebuildsPage extends AbstractPage implements Prebuilds prebuilds: Array; - constructor(client: Gitpod, response: Response, body: PrebuildsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: PrebuildsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1041,7 +1152,7 @@ export class PrebuildsPage extends AbstractPage implements Prebuilds } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1074,12 +1185,20 @@ export interface ProjectEnvironmentClassesPageParams { token?: string; } -export class ProjectEnvironmentClassesPage extends AbstractPage implements ProjectEnvironmentClassesPageResponse { +export class ProjectEnvironmentClassesPage + extends AbstractPage + implements ProjectEnvironmentClassesPageResponse +{ pagination: ProjectEnvironmentClassesPageResponse.Pagination; projectEnvironmentClasses: Array; - constructor(client: Gitpod, response: Response, body: ProjectEnvironmentClassesPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: ProjectEnvironmentClassesPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1091,7 +1210,7 @@ export class ProjectEnvironmentClassesPage extends AbstractPage impl } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1129,7 +1248,12 @@ export class ProjectsPage extends AbstractPage implements ProjectsPa projects: Array; - constructor(client: Gitpod, response: Response, body: ProjectsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: ProjectsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1141,7 +1265,7 @@ export class ProjectsPage extends AbstractPage implements ProjectsPa } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1179,7 +1303,12 @@ export class PromptsPage extends AbstractPage implements PromptsPage prompts: Array; - constructor(client: Gitpod, response: Response, body: PromptsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: PromptsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1191,7 +1320,7 @@ export class PromptsPage extends AbstractPage implements PromptsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1229,7 +1358,12 @@ export class RecordsPage extends AbstractPage implements RecordsPage records: Array; - constructor(client: Gitpod, response: Response, body: RecordsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: RecordsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1241,7 +1375,7 @@ export class RecordsPage extends AbstractPage implements RecordsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1279,7 +1413,12 @@ export class RepositoriesPage extends AbstractPage implements Reposi repositories: Array; - constructor(client: Gitpod, response: Response, body: RepositoriesPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: RepositoriesPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1291,7 +1430,7 @@ export class RepositoriesPage extends AbstractPage implements Reposi } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1329,7 +1468,12 @@ export class RunnersPage extends AbstractPage implements RunnersPage runners: Array; - constructor(client: Gitpod, response: Response, body: RunnersPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: RunnersPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1341,7 +1485,7 @@ export class RunnersPage extends AbstractPage implements RunnersPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1374,12 +1518,20 @@ export interface ScimConfigurationsPageParams { token?: string; } -export class ScimConfigurationsPage extends AbstractPage implements ScimConfigurationsPageResponse { +export class ScimConfigurationsPage + extends AbstractPage + implements ScimConfigurationsPageResponse +{ pagination: ScimConfigurationsPageResponse.Pagination; scimConfigurations: Array; - constructor(client: Gitpod, response: Response, body: ScimConfigurationsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: ScimConfigurationsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1391,7 +1543,7 @@ export class ScimConfigurationsPage extends AbstractPage implements } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1429,7 +1581,12 @@ export class SecretsPage extends AbstractPage implements SecretsPage secrets: Array; - constructor(client: Gitpod, response: Response, body: SecretsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: SecretsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1441,7 +1598,7 @@ export class SecretsPage extends AbstractPage implements SecretsPage } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1479,7 +1636,12 @@ export class ServicesPage extends AbstractPage implements ServicesPa services: Array; - constructor(client: Gitpod, response: Response, body: ServicesPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: ServicesPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1491,7 +1653,7 @@ export class ServicesPage extends AbstractPage implements ServicesPa } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1524,12 +1686,20 @@ export interface SSOConfigurationsPageParams { token?: string; } -export class SSOConfigurationsPage extends AbstractPage implements SSOConfigurationsPageResponse { +export class SSOConfigurationsPage + extends AbstractPage + implements SSOConfigurationsPageResponse +{ pagination: SSOConfigurationsPageResponse.Pagination; ssoConfigurations: Array; - constructor(client: Gitpod, response: Response, body: SSOConfigurationsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: SSOConfigurationsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1541,7 +1711,7 @@ export class SSOConfigurationsPage extends AbstractPage implements S } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1579,7 +1749,12 @@ export class TaskExecutionsPage extends AbstractPage implements Task taskExecutions: Array; - constructor(client: Gitpod, response: Response, body: TaskExecutionsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: TaskExecutionsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1591,7 +1766,7 @@ export class TaskExecutionsPage extends AbstractPage implements Task } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1629,7 +1804,12 @@ export class TasksPage extends AbstractPage implements TasksPageResp tasks: Array; - constructor(client: Gitpod, response: Response, body: TasksPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: TasksPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1641,7 +1821,7 @@ export class TasksPage extends AbstractPage implements TasksPageResp } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1679,7 +1859,12 @@ export class TokensPage extends AbstractPage implements TokensPageRe tokens: Array; - constructor(client: Gitpod, response: Response, body: TokensPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: TokensPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1691,7 +1876,7 @@ export class TokensPage extends AbstractPage implements TokensPageRe } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1729,7 +1914,12 @@ export class WarmPoolsPage extends AbstractPage implements WarmPools warmPools: Array; - constructor(client: Gitpod, response: Response, body: WarmPoolsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: WarmPoolsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1741,7 +1931,7 @@ export class WarmPoolsPage extends AbstractPage implements WarmPools } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1774,12 +1964,20 @@ export interface WorkflowExecutionActionsPageParams { token?: string; } -export class WorkflowExecutionActionsPage extends AbstractPage implements WorkflowExecutionActionsPageResponse { +export class WorkflowExecutionActionsPage + extends AbstractPage + implements WorkflowExecutionActionsPageResponse +{ pagination: WorkflowExecutionActionsPageResponse.Pagination; workflowExecutionActions: Array; - constructor(client: Gitpod, response: Response, body: WorkflowExecutionActionsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: WorkflowExecutionActionsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1791,7 +1989,7 @@ export class WorkflowExecutionActionsPage extends AbstractPage imple } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1824,12 +2022,20 @@ export interface WorkflowExecutionsPageParams { token?: string; } -export class WorkflowExecutionsPage extends AbstractPage implements WorkflowExecutionsPageResponse { +export class WorkflowExecutionsPage + extends AbstractPage + implements WorkflowExecutionsPageResponse +{ pagination: WorkflowExecutionsPageResponse.Pagination; workflowExecutions: Array; - constructor(client: Gitpod, response: Response, body: WorkflowExecutionsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: WorkflowExecutionsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1841,7 +2047,7 @@ export class WorkflowExecutionsPage extends AbstractPage implements } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } @@ -1879,7 +2085,12 @@ export class WorkflowsPage extends AbstractPage implements Workflows workflows: Array; - constructor(client: Gitpod, response: Response, body: WorkflowsPageResponse, options: FinalRequestOptions) { + constructor( + client: Gitpod, + response: Response, + body: WorkflowsPageResponse, + options: FinalRequestOptions, + ) { super(client, response, body, options); this.pagination = body.pagination || {}; @@ -1891,7 +2102,7 @@ export class WorkflowsPage extends AbstractPage implements Workflows } nextPageRequestOptions(): PageRequestOptions | null { - const cursor = this.pagination?.nextToken + const cursor = this.pagination?.nextToken; if (!cursor) { return null; } diff --git a/src/error.ts b/src/error.ts index d0832d34..fc55f46c 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/error instead */ -export * from "./core/error" \ No newline at end of file +export * from './core/error'; diff --git a/src/index.ts b/src/index.ts index a0328c4e..0eaf4c88 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,4 +6,18 @@ export { type Uploadable, toFile } from './core/uploads'; export { APIPromise } from './core/api-promise'; export { Gitpod, type ClientOptions } from './client'; export { PagePromise } from './core/pagination'; -export { GitpodError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError } from './core/error'; +export { + GitpodError, + APIError, + APIConnectionError, + APIConnectionTimeoutError, + APIUserAbortError, + NotFoundError, + ConflictError, + RateLimitError, + BadRequestError, + AuthenticationError, + InternalServerError, + PermissionDeniedError, + UnprocessableEntityError, +} from './core/error'; diff --git a/src/internal/builtin-types.ts b/src/internal/builtin-types.ts index 6059d5db..c23d3bde 100644 --- a/src/internal/builtin-types.ts +++ b/src/internal/builtin-types.ts @@ -1,23 +1,20 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export type Fetch = ( - input: string | URL | Request, - init?: RequestInit, -) => Promise +export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise; /** * An alias to the builtin `RequestInit` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/RequestInit + * + * https://developer.mozilla.org/docs/Web/API/RequestInit */ type _RequestInit = RequestInit; /** * An alias to the builtin `Response` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/Response + * + * https://developer.mozilla.org/docs/Web/API/Response */ type _Response = Response; @@ -54,7 +51,15 @@ type _Array = Array; */ type _Record = Record; -export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response }; +export type { + _Array as Array, + _BodyInit as BodyInit, + _HeadersInit as HeadersInit, + _Record as Record, + _RequestInfo as RequestInfo, + _RequestInit as RequestInit, + _Response as Response, +}; /** * A copy of the builtin `EndingType` type as it isn't fully supported in certain diff --git a/src/internal/detect-platform.ts b/src/internal/detect-platform.ts index 394ede88..e82d95c9 100644 --- a/src/internal/detect-platform.ts +++ b/src/internal/detect-platform.ts @@ -25,7 +25,11 @@ function getDetectedPlatform(): DetectedPlatform { if (typeof EdgeRuntime !== 'undefined') { return 'edge'; } - if (Object.prototype.toString.call(typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0) === '[object process]') { + if ( + Object.prototype.toString.call( + typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0, + ) === '[object process]' + ) { return 'node'; } return 'unknown'; diff --git a/src/internal/errors.ts b/src/internal/errors.ts index c14a742b..82c7b14d 100644 --- a/src/internal/errors.ts +++ b/src/internal/errors.ts @@ -2,12 +2,12 @@ export function isAbortError(err: unknown) { return ( - typeof err === 'object' && err !== null && ( - // Spec-compliant fetch implementations - ('name' in err && (err as any).name === 'AbortError') || + typeof err === 'object' && + err !== null && + // Spec-compliant fetch implementations + (('name' in err && (err as any).name === 'AbortError') || // Expo fetch - ('message' in err && String((err as any).message).includes('FetchRequestCanceledException')) - ) + ('message' in err && String((err as any).message).includes('FetchRequestCanceledException'))) ); } @@ -24,10 +24,10 @@ export const castToError = (err: any): Error => { if (err.name) error.name = err.name; return error; } - } catch { } + } catch {} try { return new Error(JSON.stringify(err)); - } catch { } + } catch {} } return new Error(err); }; diff --git a/src/internal/headers.ts b/src/internal/headers.ts index fa2ea2b9..c724a9d2 100644 --- a/src/internal/headers.ts +++ b/src/internal/headers.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { isReadonlyArray } from "./utils/values"; +import { isReadonlyArray } from './utils/values'; type HeaderValue = string | undefined | null; export type HeadersLike = @@ -51,7 +51,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator(client: Gitpod, props: APIResponseProps): Promise { const { response, requestLogID, retryOfRequestLogID, startTime } = props; const body = await (async () => { - // fetch refuses to read the body when the status code is 204. if (response.status === 204) { return null as T; @@ -43,6 +42,15 @@ export async function defaultParseResponse(client: Gitpod, props: APIResponse const text = await response.text(); return text as unknown as T; })(); - loggerFor(client).debug(`[${requestLogID}] response parsed`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, body, durationMs: Date.now() - startTime })); + loggerFor(client).debug( + `[${requestLogID}] response parsed`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + body, + durationMs: Date.now() - startTime, + }), + ); return body; } diff --git a/src/internal/request-options.ts b/src/internal/request-options.ts index a8558b20..2aabf9aa 100644 --- a/src/internal/request-options.ts +++ b/src/internal/request-options.ts @@ -76,14 +76,10 @@ export type RequestOptions = { defaultBaseURL?: string | undefined; __binaryResponse?: boolean | undefined; - }; export type EncodedContent = { bodyHeaders: HeadersLike; body: BodyInit }; -export type RequestEncoder = (request: { - headers: NullableHeaders; - body: unknown; -}) => EncodedContent; +export type RequestEncoder = (request: { headers: NullableHeaders; body: unknown }) => EncodedContent; export const FallbackEncoder: RequestEncoder = ({ headers, body }) => { return { diff --git a/src/internal/shim-types.ts b/src/internal/shim-types.ts index accbf576..8ddf7b0a 100644 --- a/src/internal/shim-types.ts +++ b/src/internal/shim-types.ts @@ -19,8 +19,8 @@ type _ConditionalNodeReadableStream = typeof globalThis extends { ReadableStream: any } ? never : _NodeReadableStream; type _ReadableStream = NeverToAny< - ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) | - ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) + | ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) + | ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) >; export type { _ReadableStream as ReadableStream }; diff --git a/src/internal/shims.ts b/src/internal/shims.ts index b2b6c739..284d15c0 100644 --- a/src/internal/shims.ts +++ b/src/internal/shims.ts @@ -27,7 +27,9 @@ export function makeReadableStream(...args: ReadableStreamArgs): ReadableStream if (typeof ReadableStream === 'undefined') { // Note: All of the platforms / runtimes we officially support already define // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes. - throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`'); + throw new Error( + '`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`', + ); } return new ReadableStream(...args); diff --git a/src/internal/to-file.ts b/src/internal/to-file.ts index c72a2b41..30eada32 100644 --- a/src/internal/to-file.ts +++ b/src/internal/to-file.ts @@ -1,4 +1,4 @@ -import { BlobPart, getName, makeFile, isAsyncIterable } from "./uploads"; +import { BlobPart, getName, makeFile, isAsyncIterable } from './uploads'; import type { FilePropertyBag } from './builtin-types'; import { checkFileSupport } from './uploads'; @@ -65,8 +65,11 @@ const isResponseLike = (value: any): value is ResponseLike => typeof value.url === 'string' && typeof value.blob === 'function'; -export type ToFileInput = FileLike | ResponseLike | Exclude | AsyncIterable; - +export type ToFileInput = + | FileLike + | ResponseLike + | Exclude + | AsyncIterable; /** * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats @@ -116,9 +119,7 @@ export async function toFile( return makeFile(parts, name, options); } -async function getBytes( - value: BlobLikePart | AsyncIterable, -): Promise> { +async function getBytes(value: BlobLikePart | AsyncIterable): Promise> { let parts: Array = []; if ( typeof value === 'string' || @@ -151,4 +152,3 @@ function propsForError(value: unknown): string { const props = Object.getOwnPropertyNames(value); return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; } - diff --git a/src/internal/types.ts b/src/internal/types.ts index c45fee32..b668dfc0 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -7,34 +7,40 @@ export type KeysEnum = { [P in keyof Required]: true }; export type FinalizedRequestInit = RequestInit & { headers: Headers }; -type NotAny = [0] extends [(1 & T)] ? never : T; +type NotAny = [0] extends [1 & T] ? never : T; /** * Some environments overload the global fetch function, and Parameters only gets the last signature. */ -type OverloadedParameters = T extends { - (...args: infer A): unknown; - (...args: infer B): unknown; - (...args: infer C): unknown; - (...args: infer D): unknown; -} - ? A | B | C | D - : T extends { +type OverloadedParameters = + T extends ( + { (...args: infer A): unknown; (...args: infer B): unknown; (...args: infer C): unknown; + (...args: infer D): unknown; } - ? A | B | C - : T extends { + ) ? + A | B | C | D + : T extends ( + { + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; + } + ) ? + A | B | C + : T extends ( + { (...args: infer A): unknown; (...args: infer B): unknown; } - ? A | B - : T extends (...args: infer A) => unknown - ? A + ) ? + A | B + : T extends (...args: infer A) => unknown ? A : never; - +/* eslint-disable */ /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -57,19 +63,19 @@ type OverloadedParameters = T extends { * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ +/** @ts-ignore For users with \@types/node */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ /* prettier-ignore */ +/** @ts-ignore For users with undici */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ +/** @ts-ignore For users with \@types/bun */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ +/** @ts-ignore For users with node-fetch@2 */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ /* prettier-ignore */ +/** @ts-ignore For users who use Deno */ type FetchRequestInit = NonNullable[1]>; - +/* eslint-enable */ type RequestInits = | NotAny diff --git a/src/internal/utils/log.ts b/src/internal/utils/log.ts index 723123e6..ce9d0523 100644 --- a/src/internal/utils/log.ts +++ b/src/internal/utils/log.ts @@ -4,7 +4,7 @@ import { hasOwn } from './values'; import { type Gitpod } from '../../client'; import { RequestOptions } from '../request-options'; -type LogFn = (message: string, ...rest: unknown[]) => void +type LogFn = (message: string, ...rest: unknown[]) => void; export type Logger = { error: LogFn; warn: LogFn; @@ -21,14 +21,22 @@ const levelNumbers = { debug: 500, }; -export const parseLogLevel = (maybeLevel: string | undefined, sourceName: string, client: Gitpod): LogLevel | undefined => { +export const parseLogLevel = ( + maybeLevel: string | undefined, + sourceName: string, + client: Gitpod, +): LogLevel | undefined => { if (!maybeLevel) { return undefined; } if (hasOwn(levelNumbers, maybeLevel)) { return maybeLevel; - }; - loggerFor(client).warn(`${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify(Object.keys(levelNumbers))}`); + } + loggerFor(client).warn( + `${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify( + Object.keys(levelNumbers), + )}`, + ); return undefined; }; @@ -89,11 +97,24 @@ export const formatRequestDetails = (details: { body?: unknown; }) => { if (details.options) { - details.options = {...details.options}; + details.options = { ...details.options }; delete details.options['headers']; // redundant + leaks internals } if (details.headers) { - details.headers = Object.fromEntries((details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map(([name, value]) => [name, name.toLowerCase() === 'authorization' || name.toLowerCase() === 'cookie' || name.toLowerCase() === 'set-cookie' ? '***' : value])) + details.headers = Object.fromEntries( + (details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map( + ([name, value]) => [ + name, + ( + name.toLowerCase() === 'authorization' || + name.toLowerCase() === 'cookie' || + name.toLowerCase() === 'set-cookie' + ) ? + '***' + : value, + ], + ), + ); } if ('retryOfRequestLogID' in details) { if (details.retryOfRequestLogID) { @@ -101,5 +122,5 @@ export const formatRequestDetails = (details: { } delete details.retryOfRequestLogID; } - return details -} + return details; +}; diff --git a/src/internal/utils/uuid.ts b/src/internal/utils/uuid.ts index 53708ba6..b0e53aaf 100644 --- a/src/internal/utils/uuid.ts +++ b/src/internal/utils/uuid.ts @@ -10,10 +10,8 @@ export let uuid4 = function () { return crypto.randomUUID(); } const u8 = new Uint8Array(1); - const randomByte = crypto - ? () => crypto.getRandomValues(u8)[0]! - : () => (Math.random() * 0xff) & 0xff; - return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => + const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff; + return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16), ); -} +}; diff --git a/src/pagination.ts b/src/pagination.ts index e1e5d091..90bf015e 100644 --- a/src/pagination.ts +++ b/src/pagination.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/pagination instead */ -export * from "./core/pagination" \ No newline at end of file +export * from './core/pagination'; diff --git a/src/resource.ts b/src/resource.ts index 57a27a94..363e3516 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/resource instead */ -export * from "./core/resource" \ No newline at end of file +export * from './core/resource'; diff --git a/src/resources/accounts.ts b/src/resources/accounts.ts index 8ee163da..14c69d46 100644 --- a/src/resources/accounts.ts +++ b/src/resources/accounts.ts @@ -3,7 +3,15 @@ import { APIResource } from '../core/resource'; import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; -import { JoinableOrganizationsPage, type JoinableOrganizationsPageParams, LoginProvidersPage, type LoginProvidersPageParams, LoginsPage, type LoginsPageParams, PagePromise } from '../core/pagination'; +import { + JoinableOrganizationsPage, + type JoinableOrganizationsPageParams, + LoginProvidersPage, + type LoginProvidersPageParams, + LoginsPage, + type LoginsPageParams, + PagePromise, +} from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; export class Accounts extends APIResource { @@ -103,7 +111,10 @@ export class Accounts extends APIResource { * }); * ``` */ - getSSOLoginURL(body: AccountGetSSOLoginURLParams, options?: RequestOptions): APIPromise { + getSSOLoginURL( + body: AccountGetSSOLoginURLParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.AccountService/GetSSOLoginURL', { body, ...options }); } @@ -134,9 +145,16 @@ export class Accounts extends APIResource { * } * ``` */ - listJoinableOrganizations(params: AccountListJoinableOrganizationsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.AccountService/ListJoinableOrganizations', JoinableOrganizationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listJoinableOrganizations( + params: AccountListJoinableOrganizationsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.AccountService/ListJoinableOrganizations', + JoinableOrganizationsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -180,9 +198,16 @@ export class Accounts extends APIResource { * } * ``` */ - listLoginProviders(params: AccountListLoginProvidersParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.AccountService/ListLoginProviders', LoginProvidersPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listLoginProviders( + params: AccountListLoginProvidersParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.AccountService/ListLoginProviders', + LoginProvidersPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -198,17 +223,24 @@ export class Accounts extends APIResource { * } * ``` */ - listSSOLogins(params: AccountListSSOLoginsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.AccountService/ListSSOLogins', LoginsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listSSOLogins( + params: AccountListSSOLoginsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.AccountService/ListSSOLogins', + LoginsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } } -export type JoinableOrganizationsJoinableOrganizationsPage = JoinableOrganizationsPage +export type JoinableOrganizationsJoinableOrganizationsPage = JoinableOrganizationsPage; -export type LoginProvidersLoginProvidersPage = LoginProvidersPage +export type LoginProvidersLoginProvidersPage = LoginProvidersPage; -export type AccountListSSOLoginsResponsesLoginsPage = LoginsPage +export type AccountListSSOLoginsResponsesLoginsPage = LoginsPage; export interface Account { id: string; @@ -492,7 +524,7 @@ export interface AccountRetrieveResponse { account: Account; } -export type AccountDeleteResponse = unknown +export type AccountDeleteResponse = unknown; export interface AccountGetSSOLoginURLResponse { /** @@ -666,6 +698,6 @@ export declare namespace Accounts { type AccountGetSSOLoginURLParams as AccountGetSSOLoginURLParams, type AccountListJoinableOrganizationsParams as AccountListJoinableOrganizationsParams, type AccountListLoginProvidersParams as AccountListLoginProvidersParams, - type AccountListSSOLoginsParams as AccountListSSOLoginsParams + type AccountListSSOLoginsParams as AccountListSSOLoginsParams, }; } diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 47142b78..ab11328d 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -4,7 +4,13 @@ import { APIResource } from '../core/resource'; import * as AgentsAPI from './agents'; import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; -import { AgentExecutionsPage, type AgentExecutionsPageParams, PagePromise, PromptsPage, type PromptsPageParams } from '../core/pagination'; +import { + AgentExecutionsPage, + type AgentExecutionsPageParams, + PagePromise, + PromptsPage, + type PromptsPageParams, +} from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; export class Agents extends APIResource { @@ -31,8 +37,14 @@ export class Agents extends APIResource { * }); * ``` */ - createExecutionConversationToken(body: AgentCreateExecutionConversationTokenParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.AgentService/CreateAgentExecutionConversationToken', { body, ...options }); + createExecutionConversationToken( + body: AgentCreateExecutionConversationTokenParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.AgentService/CreateAgentExecutionConversationToken', { + body, + ...options, + }); } /** @@ -48,7 +60,10 @@ export class Agents extends APIResource { * const response = await client.agents.createPrompt(); * ``` */ - createPrompt(body: AgentCreatePromptParams, options?: RequestOptions): APIPromise { + createPrompt( + body: AgentCreatePromptParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.AgentService/CreatePrompt', { body, ...options }); } @@ -126,9 +141,16 @@ export class Agents extends APIResource { * } * ``` */ - listExecutions(params: AgentListExecutionsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.AgentService/ListAgentExecutions', AgentExecutionsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listExecutions( + params: AgentListExecutionsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.AgentService/ListAgentExecutions', + AgentExecutionsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -158,9 +180,17 @@ export class Agents extends APIResource { * } * ``` */ - listPrompts(params: AgentListPromptsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.AgentService/ListPrompts', PromptsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listPrompts( + params: AgentListPromptsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.AgentService/ListPrompts', PromptsPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -188,7 +218,10 @@ export class Agents extends APIResource { * }); * ``` */ - retrieveExecution(body: AgentRetrieveExecutionParams, options?: RequestOptions): APIPromise { + retrieveExecution( + body: AgentRetrieveExecutionParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.AgentService/GetAgentExecution', { body, ...options }); } @@ -216,7 +249,10 @@ export class Agents extends APIResource { * }); * ``` */ - retrievePrompt(body: AgentRetrievePromptParams, options?: RequestOptions): APIPromise { + retrievePrompt( + body: AgentRetrievePromptParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.AgentService/GetPrompt', { body, ...options }); } @@ -282,7 +318,10 @@ export class Agents extends APIResource { * }); * ``` */ - startExecution(body: AgentStartExecutionParams, options?: RequestOptions): APIPromise { + startExecution( + body: AgentStartExecutionParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.AgentService/StartAgent', { body, ...options }); } @@ -326,14 +365,17 @@ export class Agents extends APIResource { * const response = await client.agents.updatePrompt(); * ``` */ - updatePrompt(body: AgentUpdatePromptParams, options?: RequestOptions): APIPromise { + updatePrompt( + body: AgentUpdatePromptParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.AgentService/UpdatePrompt', { body, ...options }); } } -export type AgentExecutionsAgentExecutionsPage = AgentExecutionsPage +export type AgentExecutionsAgentExecutionsPage = AgentExecutionsPage; -export type PromptsPromptsPage = PromptsPage +export type PromptsPromptsPage = PromptsPage; export interface AgentCodeContext { contextUrl?: AgentCodeContext.ContextURL; @@ -562,7 +604,10 @@ export namespace AgentExecution { /** * role is the role of the agent execution */ - role?: 'AGENT_EXECUTION_ROLE_UNSPECIFIED' | 'AGENT_EXECUTION_ROLE_DEFAULT' | 'AGENT_EXECUTION_ROLE_WORKFLOW'; + role?: + | 'AGENT_EXECUTION_ROLE_UNSPECIFIED' + | 'AGENT_EXECUTION_ROLE_DEFAULT' + | 'AGENT_EXECUTION_ROLE_WORKFLOW'; /** * A Timestamp represents a point in time independent of any time zone or local @@ -676,7 +721,12 @@ export namespace AgentExecution { /** * desired_phase is the desired phase of the agent run */ - desiredPhase?: 'PHASE_UNSPECIFIED' | 'PHASE_PENDING' | 'PHASE_RUNNING' | 'PHASE_WAITING_FOR_INPUT' | 'PHASE_STOPPED'; + desiredPhase?: + | 'PHASE_UNSPECIFIED' + | 'PHASE_PENDING' + | 'PHASE_RUNNING' + | 'PHASE_WAITING_FOR_INPUT' + | 'PHASE_STOPPED'; limits?: Spec.Limits; @@ -744,7 +794,13 @@ export namespace AgentExecution { /** * failure_reason contains a structured reason code for the failure. */ - failureReason?: 'AGENT_EXECUTION_FAILURE_REASON_UNSPECIFIED' | 'AGENT_EXECUTION_FAILURE_REASON_ENVIRONMENT' | 'AGENT_EXECUTION_FAILURE_REASON_SERVICE' | 'AGENT_EXECUTION_FAILURE_REASON_LLM_INTEGRATION' | 'AGENT_EXECUTION_FAILURE_REASON_INTERNAL' | 'AGENT_EXECUTION_FAILURE_REASON_AGENT_EXECUTION'; + failureReason?: + | 'AGENT_EXECUTION_FAILURE_REASON_UNSPECIFIED' + | 'AGENT_EXECUTION_FAILURE_REASON_ENVIRONMENT' + | 'AGENT_EXECUTION_FAILURE_REASON_SERVICE' + | 'AGENT_EXECUTION_FAILURE_REASON_LLM_INTEGRATION' + | 'AGENT_EXECUTION_FAILURE_REASON_INTERNAL' + | 'AGENT_EXECUTION_FAILURE_REASON_AGENT_EXECUTION'; inputTokensUsed?: string; @@ -776,7 +832,12 @@ export namespace AgentExecution { outputTokensUsed?: string; - phase?: 'PHASE_UNSPECIFIED' | 'PHASE_PENDING' | 'PHASE_RUNNING' | 'PHASE_WAITING_FOR_INPUT' | 'PHASE_STOPPED'; + phase?: + | 'PHASE_UNSPECIFIED' + | 'PHASE_PENDING' + | 'PHASE_RUNNING' + | 'PHASE_WAITING_FOR_INPUT' + | 'PHASE_STOPPED'; session?: string; @@ -790,7 +851,30 @@ export namespace AgentExecution { /** * supported_model is the LLM model being used by the agent execution. */ - supportedModel?: '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'; + supportedModel?: + | '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'; /** * transcript_url is the URL to the LLM transcript (all messages exchanged between @@ -863,7 +947,12 @@ export namespace AgentExecution { /** * phase is the current connection/health phase */ - phase?: 'MCP_INTEGRATION_PHASE_UNSPECIFIED' | 'MCP_INTEGRATION_PHASE_INITIALIZING' | 'MCP_INTEGRATION_PHASE_READY' | 'MCP_INTEGRATION_PHASE_FAILED' | 'MCP_INTEGRATION_PHASE_UNAVAILABLE'; + phase?: + | 'MCP_INTEGRATION_PHASE_UNSPECIFIED' + | 'MCP_INTEGRATION_PHASE_INITIALIZING' + | 'MCP_INTEGRATION_PHASE_READY' + | 'MCP_INTEGRATION_PHASE_FAILED' + | 'MCP_INTEGRATION_PHASE_UNAVAILABLE'; /** * warning_message contains warnings (e.g., rate limiting, degraded performance) @@ -905,7 +994,12 @@ export interface AgentMessage { /** * AgentMode defines the operational mode of an agent */ -export type AgentMode = 'AGENT_MODE_UNSPECIFIED' | 'AGENT_MODE_EXECUTION' | 'AGENT_MODE_PLANNING' | 'AGENT_MODE_RALPH' | 'AGENT_MODE_SPEC' +export type AgentMode = + | 'AGENT_MODE_UNSPECIFIED' + | 'AGENT_MODE_EXECUTION' + | 'AGENT_MODE_PLANNING' + | 'AGENT_MODE_RALPH' + | 'AGENT_MODE_SPEC'; export interface Prompt { id?: string; @@ -1151,9 +1245,9 @@ export interface PromptSpec { /** * Role identifies the sender's relationship in the parent/child hierarchy. */ -export type Role = 'ROLE_UNSPECIFIED' | 'ROLE_PARENT' | 'ROLE_CHILD' +export type Role = 'ROLE_UNSPECIFIED' | 'ROLE_PARENT' | 'ROLE_CHILD'; -export type Type = 'TYPE_UNSPECIFIED' | 'TYPE_UPDATE' | 'TYPE_COMPLETE' +export type Type = 'TYPE_UNSPECIFIED' | 'TYPE_UPDATE' | 'TYPE_COMPLETE'; export interface UserInputBlock { id?: string; @@ -1311,9 +1405,9 @@ export interface AgentCreatePromptResponse { prompt?: Prompt; } -export type AgentDeleteExecutionResponse = unknown +export type AgentDeleteExecutionResponse = unknown; -export type AgentDeletePromptResponse = unknown +export type AgentDeletePromptResponse = unknown; export interface AgentRetrieveExecutionResponse { agentExecution?: AgentExecution; @@ -1323,13 +1417,13 @@ export interface AgentRetrievePromptResponse { prompt?: Prompt; } -export type AgentSendToExecutionResponse = unknown +export type AgentSendToExecutionResponse = unknown; export interface AgentStartExecutionResponse { agentExecutionId?: string; } -export type AgentStopExecutionResponse = unknown +export type AgentStopExecutionResponse = unknown; export interface AgentUpdatePromptResponse { prompt?: Prompt; @@ -1391,7 +1485,9 @@ export namespace AgentListExecutionsParams { projectIds?: Array; - roles?: Array<'AGENT_EXECUTION_ROLE_UNSPECIFIED' | 'AGENT_EXECUTION_ROLE_DEFAULT' | 'AGENT_EXECUTION_ROLE_WORKFLOW'>; + roles?: Array< + 'AGENT_EXECUTION_ROLE_UNSPECIFIED' | 'AGENT_EXECUTION_ROLE_DEFAULT' | 'AGENT_EXECUTION_ROLE_WORKFLOW' + >; /** * session_ids filters the response to only executions belonging to the specified @@ -1399,7 +1495,9 @@ export namespace AgentListExecutionsParams { */ sessionIds?: Array; - statusPhases?: Array<'PHASE_UNSPECIFIED' | 'PHASE_PENDING' | 'PHASE_RUNNING' | 'PHASE_WAITING_FOR_INPUT' | 'PHASE_STOPPED'>; + statusPhases?: Array< + 'PHASE_UNSPECIFIED' | 'PHASE_PENDING' | 'PHASE_RUNNING' | 'PHASE_WAITING_FOR_INPUT' | 'PHASE_STOPPED' + >; } export interface Pagination { @@ -1641,6 +1739,6 @@ export declare namespace Agents { type AgentSendToExecutionParams as AgentSendToExecutionParams, type AgentStartExecutionParams as AgentStartExecutionParams, type AgentStopExecutionParams as AgentStopExecutionParams, - type AgentUpdatePromptParams as AgentUpdatePromptParams + type AgentUpdatePromptParams as AgentUpdatePromptParams, }; } diff --git a/src/resources/automations.ts b/src/resources/automations.ts index 47a94ad8..a17290d7 100644 --- a/src/resources/automations.ts +++ b/src/resources/automations.ts @@ -5,7 +5,17 @@ import * as AutomationsAPI from './automations'; import * as AgentsAPI from './agents'; import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; -import { OutputsPage, type OutputsPageParams, PagePromise, WorkflowExecutionActionsPage, type WorkflowExecutionActionsPageParams, WorkflowExecutionsPage, type WorkflowExecutionsPageParams, WorkflowsPage, type WorkflowsPageParams } from '../core/pagination'; +import { + OutputsPage, + type OutputsPageParams, + PagePromise, + WorkflowExecutionActionsPage, + type WorkflowExecutionActionsPageParams, + WorkflowExecutionsPage, + type WorkflowExecutionsPageParams, + WorkflowsPage, + type WorkflowsPageParams, +} from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; export class Automations extends APIResource { @@ -146,9 +156,17 @@ export class Automations extends APIResource { * } * ``` */ - list(params: AutomationListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflows', WorkflowsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: AutomationListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflows', WorkflowsPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -240,8 +258,14 @@ export class Automations extends APIResource { * }); * ``` */ - cancelExecutionAction(body: AutomationCancelExecutionActionParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.WorkflowService/CancelWorkflowExecutionAction', { body, ...options }); + cancelExecutionAction( + body: AutomationCancelExecutionActionParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.WorkflowService/CancelWorkflowExecutionAction', { + body, + ...options, + }); } /** @@ -283,9 +307,16 @@ export class Automations extends APIResource { * } * ``` */ - listExecutionActions(params: AutomationListExecutionActionsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflowExecutionActions', WorkflowExecutionActionsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listExecutionActions( + params: AutomationListExecutionActionsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.WorkflowService/ListWorkflowExecutionActions', + WorkflowExecutionActionsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -328,9 +359,16 @@ export class Automations extends APIResource { * } * ``` */ - listExecutionOutputs(params: AutomationListExecutionOutputsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflowExecutionOutputs', OutputsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listExecutionOutputs( + params: AutomationListExecutionOutputsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.WorkflowService/ListWorkflowExecutionOutputs', + OutputsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -370,9 +408,16 @@ export class Automations extends APIResource { * } * ``` */ - listExecutions(params: AutomationListExecutionsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.WorkflowService/ListWorkflowExecutions', WorkflowExecutionsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listExecutions( + params: AutomationListExecutionsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.WorkflowService/ListWorkflowExecutions', + WorkflowExecutionsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -404,7 +449,10 @@ export class Automations extends APIResource { * ); * ``` */ - retrieveExecution(body: AutomationRetrieveExecutionParams, options?: RequestOptions): APIPromise { + retrieveExecution( + body: AutomationRetrieveExecutionParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.WorkflowService/GetWorkflowExecution', { body, ...options }); } @@ -436,7 +484,10 @@ export class Automations extends APIResource { * }); * ``` */ - retrieveExecutionAction(body: AutomationRetrieveExecutionActionParams, options?: RequestOptions): APIPromise { + retrieveExecutionAction( + body: AutomationRetrieveExecutionActionParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.WorkflowService/GetWorkflowExecutionAction', { body, ...options }); } @@ -466,18 +517,23 @@ export class Automations extends APIResource { * }); * ``` */ - startExecution(body: AutomationStartExecutionParams, options?: RequestOptions): APIPromise { + startExecution( + body: AutomationStartExecutionParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.WorkflowService/StartWorkflow', { body, ...options }); } } -export type WorkflowsWorkflowsPage = WorkflowsPage +export type WorkflowsWorkflowsPage = WorkflowsPage; -export type WorkflowExecutionActionsWorkflowExecutionActionsPage = WorkflowExecutionActionsPage +export type WorkflowExecutionActionsWorkflowExecutionActionsPage = + WorkflowExecutionActionsPage; -export type AutomationListExecutionOutputsResponsesOutputsPage = OutputsPage +export type AutomationListExecutionOutputsResponsesOutputsPage = + OutputsPage; -export type WorkflowExecutionsWorkflowExecutionsPage = WorkflowExecutionsPage +export type WorkflowExecutionsWorkflowExecutionsPage = WorkflowExecutionsPage; /** * Workflow represents a workflow configuration. @@ -1235,7 +1291,15 @@ export namespace WorkflowExecution { pendingActionCount?: number; - phase?: 'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_PHASE_COMPLETED'; + phase?: + | 'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' + | 'WORKFLOW_EXECUTION_PHASE_PENDING' + | 'WORKFLOW_EXECUTION_PHASE_RUNNING' + | 'WORKFLOW_EXECUTION_PHASE_STOPPING' + | 'WORKFLOW_EXECUTION_PHASE_STOPPED' + | 'WORKFLOW_EXECUTION_PHASE_DELETING' + | 'WORKFLOW_EXECUTION_PHASE_DELETED' + | 'WORKFLOW_EXECUTION_PHASE_COMPLETED'; runningActionCount?: number; @@ -1258,7 +1322,10 @@ export namespace WorkflowExecution { /** * Error code identifying the type of error. */ - code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: + | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' + | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' + | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -1315,7 +1382,10 @@ export namespace WorkflowExecution { /** * Error code identifying the type of error. */ - code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: + | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' + | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' + | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -1639,7 +1709,15 @@ export namespace WorkflowExecutionAction { /** * WorkflowExecutionActionPhase defines the phases of workflow execution action. */ - phase?: 'WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DONE'; + phase?: + | 'WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_PENDING' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETING' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETED' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_DONE'; /** * Step-level progress tracking @@ -1663,7 +1741,10 @@ export namespace WorkflowExecutionAction { /** * Error code identifying the type of error. */ - code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: + | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' + | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' + | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -1814,7 +1895,13 @@ export namespace WorkflowExecutionAction { */ finishedAt?: string; - phase?: 'STEP_PHASE_UNSPECIFIED' | 'STEP_PHASE_PENDING' | 'STEP_PHASE_RUNNING' | 'STEP_PHASE_DONE' | 'STEP_PHASE_FAILED' | 'STEP_PHASE_CANCELLED'; + phase?: + | 'STEP_PHASE_UNSPECIFIED' + | 'STEP_PHASE_PENDING' + | 'STEP_PHASE_RUNNING' + | 'STEP_PHASE_DONE' + | 'STEP_PHASE_FAILED' + | 'STEP_PHASE_CANCELLED'; /** * A Timestamp represents a point in time independent of any time zone or local @@ -1929,7 +2016,10 @@ export namespace WorkflowExecutionAction { /** * Error code identifying the type of error. */ - code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: + | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' + | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' + | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -1987,7 +2077,10 @@ export namespace WorkflowExecutionAction { /** * Error code identifying the type of error. */ - code?: 'WORKFLOW_ERROR_CODE_UNSPECIFIED' | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; + code?: + | 'WORKFLOW_ERROR_CODE_UNSPECIFIED' + | 'WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR' + | 'WORKFLOW_ERROR_CODE_AGENT_ERROR'; /** * Human-readable error message. @@ -2182,7 +2275,16 @@ export namespace WorkflowTrigger { * for PRs in repositories matching the trigger context. */ export interface PullRequest { - events?: Array<'PULL_REQUEST_EVENT_UNSPECIFIED' | 'PULL_REQUEST_EVENT_OPENED' | 'PULL_REQUEST_EVENT_UPDATED' | 'PULL_REQUEST_EVENT_APPROVED' | 'PULL_REQUEST_EVENT_MERGED' | 'PULL_REQUEST_EVENT_CLOSED' | 'PULL_REQUEST_EVENT_READY_FOR_REVIEW' | 'PULL_REQUEST_EVENT_REVIEW_REQUESTED'>; + events?: Array< + | 'PULL_REQUEST_EVENT_UNSPECIFIED' + | 'PULL_REQUEST_EVENT_OPENED' + | 'PULL_REQUEST_EVENT_UPDATED' + | 'PULL_REQUEST_EVENT_APPROVED' + | 'PULL_REQUEST_EVENT_MERGED' + | 'PULL_REQUEST_EVENT_CLOSED' + | 'PULL_REQUEST_EVENT_READY_FOR_REVIEW' + | 'PULL_REQUEST_EVENT_REVIEW_REQUESTED' + >; /** * integration_id is the optional ID of an integration that acts as the source of @@ -2352,11 +2454,11 @@ export interface AutomationUpdateResponse { workflow?: Workflow; } -export type AutomationDeleteResponse = unknown +export type AutomationDeleteResponse = unknown; -export type AutomationCancelExecutionResponse = unknown +export type AutomationCancelExecutionResponse = unknown; -export type AutomationCancelExecutionActionResponse = unknown +export type AutomationCancelExecutionActionResponse = unknown; export interface AutomationListExecutionOutputsResponse { actionId?: string; @@ -2540,7 +2642,16 @@ export namespace AutomationListParams { * workflows whose most recent execution matches one of the specified phases are * returned. */ - statusPhases?: Array<'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_PHASE_COMPLETED'>; + statusPhases?: Array< + | 'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' + | 'WORKFLOW_EXECUTION_PHASE_PENDING' + | 'WORKFLOW_EXECUTION_PHASE_RUNNING' + | 'WORKFLOW_EXECUTION_PHASE_STOPPING' + | 'WORKFLOW_EXECUTION_PHASE_STOPPED' + | 'WORKFLOW_EXECUTION_PHASE_DELETING' + | 'WORKFLOW_EXECUTION_PHASE_DELETED' + | 'WORKFLOW_EXECUTION_PHASE_COMPLETED' + >; workflowIds?: Array; } @@ -2609,7 +2720,16 @@ export interface AutomationListExecutionActionsParams extends WorkflowExecutionA export namespace AutomationListExecutionActionsParams { export interface Filter { - phases?: Array<'WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_ACTION_PHASE_DONE'>; + phases?: Array< + | 'WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_PENDING' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETING' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_DELETED' + | 'WORKFLOW_EXECUTION_ACTION_PHASE_DONE' + >; workflowExecutionActionIds?: Array; @@ -2694,7 +2814,16 @@ export namespace AutomationListExecutionsParams { */ search?: string; - statusPhases?: Array<'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' | 'WORKFLOW_EXECUTION_PHASE_PENDING' | 'WORKFLOW_EXECUTION_PHASE_RUNNING' | 'WORKFLOW_EXECUTION_PHASE_STOPPING' | 'WORKFLOW_EXECUTION_PHASE_STOPPED' | 'WORKFLOW_EXECUTION_PHASE_DELETING' | 'WORKFLOW_EXECUTION_PHASE_DELETED' | 'WORKFLOW_EXECUTION_PHASE_COMPLETED'>; + statusPhases?: Array< + | 'WORKFLOW_EXECUTION_PHASE_UNSPECIFIED' + | 'WORKFLOW_EXECUTION_PHASE_PENDING' + | 'WORKFLOW_EXECUTION_PHASE_RUNNING' + | 'WORKFLOW_EXECUTION_PHASE_STOPPING' + | 'WORKFLOW_EXECUTION_PHASE_STOPPED' + | 'WORKFLOW_EXECUTION_PHASE_DELETING' + | 'WORKFLOW_EXECUTION_PHASE_DELETED' + | 'WORKFLOW_EXECUTION_PHASE_COMPLETED' + >; workflowExecutionIds?: Array; @@ -2780,6 +2909,6 @@ export declare namespace Automations { type AutomationListExecutionsParams as AutomationListExecutionsParams, type AutomationRetrieveExecutionParams as AutomationRetrieveExecutionParams, type AutomationRetrieveExecutionActionParams as AutomationRetrieveExecutionActionParams, - type AutomationStartExecutionParams as AutomationStartExecutionParams + type AutomationStartExecutionParams as AutomationStartExecutionParams, }; } diff --git a/src/resources/editors.ts b/src/resources/editors.ts index 5b4647e7..61ad8987 100644 --- a/src/resources/editors.ts +++ b/src/resources/editors.ts @@ -80,8 +80,13 @@ export class Editors extends APIResource { * ``` */ list(params: EditorListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.EditorService/ListEditors', EditorsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.EditorService/ListEditors', EditorsPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -120,7 +125,7 @@ export class Editors extends APIResource { } } -export type EditorsEditorsPage = EditorsPage +export type EditorsEditorsPage = EditorsPage; export interface Editor { id: string; @@ -247,6 +252,6 @@ export declare namespace Editors { type EditorsEditorsPage as EditorsEditorsPage, type EditorRetrieveParams as EditorRetrieveParams, type EditorListParams as EditorListParams, - type EditorResolveURLParams as EditorResolveURLParams + type EditorResolveURLParams as EditorResolveURLParams, }; } diff --git a/src/resources/environments/automations/automations.ts b/src/resources/environments/automations/automations.ts index 3add8697..92a13c4a 100644 --- a/src/resources/environments/automations/automations.ts +++ b/src/resources/environments/automations/automations.ts @@ -3,9 +3,44 @@ import { APIResource } from '../../../core/resource'; import * as Shared from '../../shared'; import * as ServicesAPI from './services'; -import { Service, ServiceCreateParams, ServiceCreateResponse, ServiceDeleteParams, ServiceDeleteResponse, ServiceListParams, ServiceMetadata, ServicePhase, ServiceRetrieveParams, ServiceRetrieveResponse, ServiceRole, ServiceSpec, ServiceStartParams, ServiceStartResponse, ServiceStatus, ServiceStopParams, ServiceStopResponse, ServiceUpdateParams, ServiceUpdateResponse, Services as ServicesAPIServices, ServicesServicesPage } from './services'; +import { + Service, + ServiceCreateParams, + ServiceCreateResponse, + ServiceDeleteParams, + ServiceDeleteResponse, + ServiceListParams, + ServiceMetadata, + ServicePhase, + ServiceRetrieveParams, + ServiceRetrieveResponse, + ServiceRole, + ServiceSpec, + ServiceStartParams, + ServiceStartResponse, + ServiceStatus, + ServiceStopParams, + ServiceStopResponse, + ServiceUpdateParams, + ServiceUpdateResponse, + Services as ServicesAPIServices, + ServicesServicesPage, +} from './services'; import * as TasksAPI from './tasks/tasks'; -import { TaskCreateParams, TaskCreateResponse, TaskDeleteParams, TaskDeleteResponse, TaskListParams, TaskRetrieveParams, TaskRetrieveResponse, TaskStartParams, TaskStartResponse, TaskUpdateParams, TaskUpdateResponse, Tasks as TasksAPITasks } from './tasks/tasks'; +import { + TaskCreateParams, + TaskCreateResponse, + TaskDeleteParams, + TaskDeleteResponse, + TaskListParams, + TaskRetrieveParams, + TaskRetrieveResponse, + TaskStartParams, + TaskStartResponse, + TaskUpdateParams, + TaskUpdateResponse, + Tasks as TasksAPITasks, +} from './tasks/tasks'; import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; @@ -79,7 +114,10 @@ export class Automations extends APIResource { * ``` */ upsert(body: AutomationUpsertParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentAutomationService/UpsertAutomationsFile', { body, ...options }); + return this._client.post('/gitpod.v1.EnvironmentAutomationService/UpsertAutomationsFile', { + body, + ...options, + }); } } @@ -243,7 +281,7 @@ export declare namespace Automations { export { type AutomationsFile as AutomationsFile, type AutomationUpsertResponse as AutomationUpsertResponse, - type AutomationUpsertParams as AutomationUpsertParams + type AutomationUpsertParams as AutomationUpsertParams, }; export { @@ -267,7 +305,7 @@ export declare namespace Automations { type ServiceListParams as ServiceListParams, type ServiceDeleteParams as ServiceDeleteParams, type ServiceStartParams as ServiceStartParams, - type ServiceStopParams as ServiceStopParams + type ServiceStopParams as ServiceStopParams, }; export { @@ -282,6 +320,6 @@ export declare namespace Automations { type TaskUpdateParams as TaskUpdateParams, type TaskListParams as TaskListParams, type TaskDeleteParams as TaskDeleteParams, - type TaskStartParams as TaskStartParams + type TaskStartParams as TaskStartParams, }; } diff --git a/src/resources/environments/automations/index.ts b/src/resources/environments/automations/index.ts index 17c94aa8..ae3513fc 100644 --- a/src/resources/environments/automations/index.ts +++ b/src/resources/environments/automations/index.ts @@ -1,5 +1,45 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Automations, type AutomationsFile, type AutomationUpsertResponse, type AutomationUpsertParams } from './automations';; -export { Services, type Service, type ServiceMetadata, type ServicePhase, type ServiceRole, type ServiceSpec, type ServiceStatus, type ServiceCreateResponse, type ServiceRetrieveResponse, type ServiceUpdateResponse, type ServiceDeleteResponse, type ServiceStartResponse, type ServiceStopResponse, type ServiceCreateParams, type ServiceRetrieveParams, type ServiceUpdateParams, type ServiceListParams, type ServiceDeleteParams, type ServiceStartParams, type ServiceStopParams, type ServicesServicesPage } from './services';; -export { Tasks, type TaskCreateResponse, type TaskRetrieveResponse, type TaskUpdateResponse, type TaskDeleteResponse, type TaskStartResponse, type TaskCreateParams, type TaskRetrieveParams, type TaskUpdateParams, type TaskListParams, type TaskDeleteParams, type TaskStartParams } from './tasks/index';; +export { + Automations, + type AutomationsFile, + type AutomationUpsertResponse, + type AutomationUpsertParams, +} from './automations'; +export { + Services, + type Service, + type ServiceMetadata, + type ServicePhase, + type ServiceRole, + type ServiceSpec, + type ServiceStatus, + type ServiceCreateResponse, + type ServiceRetrieveResponse, + type ServiceUpdateResponse, + type ServiceDeleteResponse, + type ServiceStartResponse, + type ServiceStopResponse, + type ServiceCreateParams, + type ServiceRetrieveParams, + type ServiceUpdateParams, + type ServiceListParams, + type ServiceDeleteParams, + type ServiceStartParams, + type ServiceStopParams, + type ServicesServicesPage, +} from './services'; +export { + Tasks, + type TaskCreateResponse, + type TaskRetrieveResponse, + type TaskUpdateResponse, + type TaskDeleteResponse, + type TaskStartResponse, + type TaskCreateParams, + type TaskRetrieveParams, + type TaskUpdateParams, + type TaskListParams, + type TaskDeleteParams, + type TaskStartParams, +} from './tasks/index'; diff --git a/src/resources/environments/automations/services.ts b/src/resources/environments/automations/services.ts index 31bf1f9e..375334cf 100644 --- a/src/resources/environments/automations/services.ts +++ b/src/resources/environments/automations/services.ts @@ -214,8 +214,12 @@ export class Services extends APIResource { * ``` */ list(params: ServiceListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.EnvironmentAutomationService/ListServices', ServicesPage, { query: { token, pageSize }, body, method: 'post', ...options }); + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.EnvironmentAutomationService/ListServices', + ServicesPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -327,7 +331,7 @@ export class Services extends APIResource { } } -export type ServicesServicesPage = ServicesPage +export type ServicesServicesPage = ServicesPage; export interface Service { id: string; @@ -383,9 +387,21 @@ export interface ServiceMetadata { triggeredBy?: Array; } -export type ServicePhase = 'SERVICE_PHASE_UNSPECIFIED' | 'SERVICE_PHASE_STARTING' | 'SERVICE_PHASE_RUNNING' | 'SERVICE_PHASE_STOPPING' | 'SERVICE_PHASE_STOPPED' | 'SERVICE_PHASE_FAILED' | 'SERVICE_PHASE_DELETED' - -export type ServiceRole = 'SERVICE_ROLE_UNSPECIFIED' | 'SERVICE_ROLE_DEFAULT' | 'SERVICE_ROLE_EDITOR' | 'SERVICE_ROLE_AI_AGENT' | 'SERVICE_ROLE_SECURITY_AGENT' +export type ServicePhase = + | 'SERVICE_PHASE_UNSPECIFIED' + | 'SERVICE_PHASE_STARTING' + | 'SERVICE_PHASE_RUNNING' + | 'SERVICE_PHASE_STOPPING' + | 'SERVICE_PHASE_STOPPED' + | 'SERVICE_PHASE_FAILED' + | 'SERVICE_PHASE_DELETED'; + +export type ServiceRole = + | 'SERVICE_ROLE_UNSPECIFIED' + | 'SERVICE_ROLE_DEFAULT' + | 'SERVICE_ROLE_EDITOR' + | 'SERVICE_ROLE_AI_AGENT' + | 'SERVICE_ROLE_SECURITY_AGENT'; export interface ServiceSpec { /** @@ -513,13 +529,13 @@ export interface ServiceRetrieveResponse { service: Service; } -export type ServiceUpdateResponse = unknown +export type ServiceUpdateResponse = unknown; -export type ServiceDeleteResponse = unknown +export type ServiceDeleteResponse = unknown; -export type ServiceStartResponse = unknown +export type ServiceStartResponse = unknown; -export type ServiceStopResponse = unknown +export type ServiceStopResponse = unknown; export interface ServiceCreateParams { environmentId?: string; @@ -766,6 +782,6 @@ export declare namespace Services { type ServiceListParams as ServiceListParams, type ServiceDeleteParams as ServiceDeleteParams, type ServiceStartParams as ServiceStartParams, - type ServiceStopParams as ServiceStopParams + type ServiceStopParams as ServiceStopParams, }; } diff --git a/src/resources/environments/automations/tasks/executions.ts b/src/resources/environments/automations/tasks/executions.ts index d0e60c1c..1f2483bd 100644 --- a/src/resources/environments/automations/tasks/executions.ts +++ b/src/resources/environments/automations/tasks/executions.ts @@ -37,7 +37,10 @@ export class Executions extends APIResource { * ``` */ retrieve(body: ExecutionRetrieveParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentAutomationService/GetTaskExecution', { body, ...options }); + return this._client.post('/gitpod.v1.EnvironmentAutomationService/GetTaskExecution', { + body, + ...options, + }); } /** @@ -91,9 +94,16 @@ export class Executions extends APIResource { * } * ``` */ - list(params: ExecutionListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions', TaskExecutionsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: ExecutionListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions', + TaskExecutionsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -124,7 +134,10 @@ export class Executions extends APIResource { * ``` */ stop(body: ExecutionStopParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentAutomationService/StopTaskExecution', { body, ...options }); + return this._client.post('/gitpod.v1.EnvironmentAutomationService/StopTaskExecution', { + body, + ...options, + }); } } @@ -132,7 +145,7 @@ export interface ExecutionRetrieveResponse { taskExecution: Shared.TaskExecution; } -export type ExecutionStopResponse = unknown +export type ExecutionStopResponse = unknown; export interface ExecutionRetrieveParams { id?: string; @@ -204,8 +217,8 @@ export declare namespace Executions { type ExecutionStopResponse as ExecutionStopResponse, type ExecutionRetrieveParams as ExecutionRetrieveParams, type ExecutionListParams as ExecutionListParams, - type ExecutionStopParams as ExecutionStopParams + type ExecutionStopParams as ExecutionStopParams, }; } -export { type TaskExecutionsTaskExecutionsPage } +export { type TaskExecutionsTaskExecutionsPage }; diff --git a/src/resources/environments/automations/tasks/index.ts b/src/resources/environments/automations/tasks/index.ts index 8012849c..1c21f289 100644 --- a/src/resources/environments/automations/tasks/index.ts +++ b/src/resources/environments/automations/tasks/index.ts @@ -1,4 +1,24 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Executions, type ExecutionRetrieveResponse, type ExecutionStopResponse, type ExecutionRetrieveParams, type ExecutionListParams, type ExecutionStopParams } from './executions';; -export { Tasks, type TaskCreateResponse, type TaskRetrieveResponse, type TaskUpdateResponse, type TaskDeleteResponse, type TaskStartResponse, type TaskCreateParams, type TaskRetrieveParams, type TaskUpdateParams, type TaskListParams, type TaskDeleteParams, type TaskStartParams } from './tasks';; +export { + Executions, + type ExecutionRetrieveResponse, + type ExecutionStopResponse, + type ExecutionRetrieveParams, + type ExecutionListParams, + type ExecutionStopParams, +} from './executions'; +export { + Tasks, + type TaskCreateResponse, + type TaskRetrieveResponse, + type TaskUpdateResponse, + type TaskDeleteResponse, + type TaskStartResponse, + type TaskCreateParams, + type TaskRetrieveParams, + type TaskUpdateParams, + type TaskListParams, + type TaskDeleteParams, + type TaskStartParams, +} from './tasks'; diff --git a/src/resources/environments/automations/tasks/tasks.ts b/src/resources/environments/automations/tasks/tasks.ts index 315cd2ed..16d9bf75 100644 --- a/src/resources/environments/automations/tasks/tasks.ts +++ b/src/resources/environments/automations/tasks/tasks.ts @@ -4,7 +4,14 @@ import { APIResource } from '../../../../core/resource'; import * as Shared from '../../../shared'; import { TasksTasksPage } from '../../../shared'; import * as ExecutionsAPI from './executions'; -import { ExecutionListParams, ExecutionRetrieveParams, ExecutionRetrieveResponse, ExecutionStopParams, ExecutionStopResponse, Executions } from './executions'; +import { + ExecutionListParams, + ExecutionRetrieveParams, + ExecutionRetrieveResponse, + ExecutionStopParams, + ExecutionStopResponse, + Executions, +} from './executions'; import { APIPromise } from '../../../../core/api-promise'; import { PagePromise, TasksPage, type TasksPageParams } from '../../../../core/pagination'; import { RequestOptions } from '../../../../internal/request-options'; @@ -199,8 +206,12 @@ export class Tasks extends APIResource { * ``` */ list(params: TaskListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.EnvironmentAutomationService/ListTasks', TasksPage, { query: { token, pageSize }, body, method: 'post', ...options }); + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.EnvironmentAutomationService/ListTasks', + TasksPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -275,9 +286,9 @@ export interface TaskRetrieveResponse { task: Shared.Task; } -export type TaskUpdateResponse = unknown +export type TaskUpdateResponse = unknown; -export type TaskDeleteResponse = unknown +export type TaskDeleteResponse = unknown; export interface TaskStartResponse { taskExecution: Shared.TaskExecution; @@ -407,7 +418,7 @@ export declare namespace Tasks { type TaskUpdateParams as TaskUpdateParams, type TaskListParams as TaskListParams, type TaskDeleteParams as TaskDeleteParams, - type TaskStartParams as TaskStartParams + type TaskStartParams as TaskStartParams, }; export { @@ -416,8 +427,8 @@ export declare namespace Tasks { type ExecutionStopResponse as ExecutionStopResponse, type ExecutionRetrieveParams as ExecutionRetrieveParams, type ExecutionListParams as ExecutionListParams, - type ExecutionStopParams as ExecutionStopParams + type ExecutionStopParams as ExecutionStopParams, }; } -export { type TasksTasksPage } +export { type TasksTasksPage }; diff --git a/src/resources/environments/classes.ts b/src/resources/environments/classes.ts index a31a04eb..77b5f68f 100644 --- a/src/resources/environments/classes.ts +++ b/src/resources/environments/classes.ts @@ -4,7 +4,11 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import { EnvironmentClassesEnvironmentClassesPage } from '../shared'; import * as RunnersAPI from '../runners/runners'; -import { EnvironmentClassesPage, type EnvironmentClassesPageParams, PagePromise } from '../../core/pagination'; +import { + EnvironmentClassesPage, + type EnvironmentClassesPageParams, + PagePromise, +} from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Classes extends APIResource { @@ -36,9 +40,16 @@ export class Classes extends APIResource { * } * ``` */ - list(params: ClassListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.EnvironmentService/ListEnvironmentClasses', EnvironmentClassesPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: ClassListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.EnvironmentService/ListEnvironmentClasses', + EnvironmentClassesPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } } @@ -108,9 +119,7 @@ export namespace ClassListParams { } export declare namespace Classes { - export { - type ClassListParams as ClassListParams - }; + export { type ClassListParams as ClassListParams }; } -export { type EnvironmentClassesEnvironmentClassesPage } +export { type EnvironmentClassesEnvironmentClassesPage }; diff --git a/src/resources/environments/environments.ts b/src/resources/environments/environments.ts index 1aca5996..73681ee8 100644 --- a/src/resources/environments/environments.ts +++ b/src/resources/environments/environments.ts @@ -9,7 +9,12 @@ import * as PoliciesAPI from '../organizations/policies'; import * as ProjectsAPI from '../projects/projects'; import * as RunnersAPI from '../runners/runners'; import * as AutomationsAPI from './automations/automations'; -import { AutomationUpsertParams, AutomationUpsertResponse, Automations, AutomationsFile as AutomationsAPIAutomationsFile } from './automations/automations'; +import { + AutomationUpsertParams, + AutomationUpsertResponse, + Automations, + AutomationsFile as AutomationsAPIAutomationsFile, +} from './automations/automations'; import { APIPromise } from '../../core/api-promise'; import { EnvironmentsPage, type EnvironmentsPageParams, PagePromise } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; @@ -136,7 +141,10 @@ export class Environments extends APIResource { * }); * ``` */ - retrieve(body: EnvironmentRetrieveParams, options?: RequestOptions): APIPromise { + retrieve( + body: EnvironmentRetrieveParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.EnvironmentService/GetEnvironment', { body, ...options }); } @@ -265,9 +273,16 @@ export class Environments extends APIResource { * } * ``` */ - list(params: EnvironmentListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.EnvironmentService/ListEnvironments', EnvironmentsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: EnvironmentListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.EnvironmentService/ListEnvironments', + EnvironmentsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -331,8 +346,14 @@ export class Environments extends APIResource { * }); * ``` */ - createEnvironmentToken(body: EnvironmentCreateEnvironmentTokenParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentAccessToken', { body, ...options }); + createEnvironmentToken( + body: EnvironmentCreateEnvironmentTokenParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentAccessToken', { + body, + ...options, + }); } /** @@ -381,8 +402,14 @@ export class Environments extends APIResource { * }); * ``` */ - createFromProject(body: EnvironmentCreateFromProjectParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentFromProject', { body, ...options }); + createFromProject( + body: EnvironmentCreateFromProjectParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentFromProject', { + body, + ...options, + }); } /** @@ -408,8 +435,14 @@ export class Environments extends APIResource { * }); * ``` */ - createLogsToken(body: EnvironmentCreateLogsTokenParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentLogsToken', { body, ...options }); + createLogsToken( + body: EnvironmentCreateLogsTokenParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.EnvironmentService/CreateEnvironmentLogsToken', { + body, + ...options, + }); } /** @@ -524,18 +557,26 @@ export class Environments extends APIResource { } } -export type EnvironmentsEnvironmentsPage = EnvironmentsPage +export type EnvironmentsEnvironmentsPage = EnvironmentsPage; /** * Admission level describes who can access an environment instance and its ports. */ -export type AdmissionLevel = 'ADMISSION_LEVEL_UNSPECIFIED' | 'ADMISSION_LEVEL_OWNER_ONLY' | 'ADMISSION_LEVEL_EVERYONE' | 'ADMISSION_LEVEL_ORGANIZATION' | 'ADMISSION_LEVEL_CREATOR_ONLY' +export type AdmissionLevel = + | 'ADMISSION_LEVEL_UNSPECIFIED' + | 'ADMISSION_LEVEL_OWNER_ONLY' + | 'ADMISSION_LEVEL_EVERYONE' + | 'ADMISSION_LEVEL_ORGANIZATION' + | 'ADMISSION_LEVEL_CREATOR_ONLY'; /** * BPFDebugLevel controls the verbosity of BPF trace_pipe output (bpf_printk). * Applies to all BPF-based agents (veto exec, future agents). */ -export type BpfDebugLevel = 'BPF_DEBUG_LEVEL_UNSPECIFIED' | 'BPF_DEBUG_LEVEL_INFO' | 'BPF_DEBUG_LEVEL_VERBOSE' +export type BpfDebugLevel = + | 'BPF_DEBUG_LEVEL_UNSPECIFIED' + | 'BPF_DEBUG_LEVEL_INFO' + | 'BPF_DEBUG_LEVEL_VERBOSE'; /** * +resource get environment @@ -662,12 +703,25 @@ export interface EnvironmentMetadata { runnerId?: string; } -export type EnvironmentPhase = 'ENVIRONMENT_PHASE_UNSPECIFIED' | 'ENVIRONMENT_PHASE_CREATING' | 'ENVIRONMENT_PHASE_STARTING' | 'ENVIRONMENT_PHASE_RUNNING' | 'ENVIRONMENT_PHASE_UPDATING' | 'ENVIRONMENT_PHASE_STOPPING' | 'ENVIRONMENT_PHASE_STOPPED' | 'ENVIRONMENT_PHASE_DELETING' | 'ENVIRONMENT_PHASE_DELETED' +export type EnvironmentPhase = + | 'ENVIRONMENT_PHASE_UNSPECIFIED' + | 'ENVIRONMENT_PHASE_CREATING' + | 'ENVIRONMENT_PHASE_STARTING' + | 'ENVIRONMENT_PHASE_RUNNING' + | 'ENVIRONMENT_PHASE_UPDATING' + | 'ENVIRONMENT_PHASE_STOPPING' + | 'ENVIRONMENT_PHASE_STOPPED' + | 'ENVIRONMENT_PHASE_DELETING' + | 'ENVIRONMENT_PHASE_DELETED'; /** * EnvironmentRole represents the role of an environment */ -export type EnvironmentRole = 'ENVIRONMENT_ROLE_UNSPECIFIED' | 'ENVIRONMENT_ROLE_DEFAULT' | 'ENVIRONMENT_ROLE_PREBUILD' | 'ENVIRONMENT_ROLE_WORKFLOW' +export type EnvironmentRole = + | 'ENVIRONMENT_ROLE_UNSPECIFIED' + | 'ENVIRONMENT_ROLE_DEFAULT' + | 'ENVIRONMENT_ROLE_PREBUILD' + | 'ENVIRONMENT_ROLE_WORKFLOW'; /** * EnvironmentSpec specifies the configuration of an environment for an environment @@ -919,7 +973,13 @@ export namespace EnvironmentSpec { * scope indicates where this secret originated from. Used to filter secrets during * build (only org and project secrets are injected). */ - scope?: 'SCOPE_UNSPECIFIED' | 'SCOPE_ORGANIZATION' | 'SCOPE_PROJECT' | 'SCOPE_USER' | 'SCOPE_SERVICE_ACCOUNT' | 'SCOPE_RUNNER'; + scope?: + | 'SCOPE_UNSPECIFIED' + | 'SCOPE_ORGANIZATION' + | 'SCOPE_PROJECT' + | 'SCOPE_USER' + | 'SCOPE_SERVICE_ACCOUNT' + | 'SCOPE_RUNNER'; /** * session indicated the current session of the secret. When the session does not @@ -1091,7 +1151,11 @@ export namespace EnvironmentStatus { * automations_file_presence indicates how an automations file is present in the * environment. */ - automationsFilePresence?: 'PRESENCE_UNSPECIFIED' | 'PRESENCE_ABSENT' | 'PRESENCE_DISCOVERED' | 'PRESENCE_SPECIFIED'; + automationsFilePresence?: + | 'PRESENCE_UNSPECIFIED' + | 'PRESENCE_ABSENT' + | 'PRESENCE_DISCOVERED' + | 'PRESENCE_SPECIFIED'; /** * failure_message contains the reason the automations file failed to be applied. @@ -1102,7 +1166,14 @@ export namespace EnvironmentStatus { /** * phase is the current phase of the automations file. */ - phase?: 'CONTENT_PHASE_UNSPECIFIED' | 'CONTENT_PHASE_CREATING' | 'CONTENT_PHASE_INITIALIZING' | 'CONTENT_PHASE_READY' | 'CONTENT_PHASE_UPDATING' | 'CONTENT_PHASE_FAILED' | 'CONTENT_PHASE_UNAVAILABLE'; + phase?: + | 'CONTENT_PHASE_UNSPECIFIED' + | 'CONTENT_PHASE_CREATING' + | 'CONTENT_PHASE_INITIALIZING' + | 'CONTENT_PHASE_READY' + | 'CONTENT_PHASE_UPDATING' + | 'CONTENT_PHASE_FAILED' + | 'CONTENT_PHASE_UNAVAILABLE'; /** * session is the automations file session that is currently applied in the @@ -1141,7 +1212,14 @@ export namespace EnvironmentStatus { /** * phase is the current phase of the environment content */ - phase?: 'CONTENT_PHASE_UNSPECIFIED' | 'CONTENT_PHASE_CREATING' | 'CONTENT_PHASE_INITIALIZING' | 'CONTENT_PHASE_READY' | 'CONTENT_PHASE_UPDATING' | 'CONTENT_PHASE_FAILED' | 'CONTENT_PHASE_UNAVAILABLE'; + phase?: + | 'CONTENT_PHASE_UNSPECIFIED' + | 'CONTENT_PHASE_CREATING' + | 'CONTENT_PHASE_INITIALIZING' + | 'CONTENT_PHASE_READY' + | 'CONTENT_PHASE_UPDATING' + | 'CONTENT_PHASE_FAILED' + | 'CONTENT_PHASE_UNAVAILABLE'; /** * session is the session that is currently active in the environment. @@ -1203,7 +1281,15 @@ export namespace EnvironmentStatus { /** * ChangeType is the type of change that happened to the file */ - changeType?: 'CHANGE_TYPE_UNSPECIFIED' | 'CHANGE_TYPE_ADDED' | 'CHANGE_TYPE_MODIFIED' | 'CHANGE_TYPE_DELETED' | 'CHANGE_TYPE_RENAMED' | 'CHANGE_TYPE_COPIED' | 'CHANGE_TYPE_UPDATED_BUT_UNMERGED' | 'CHANGE_TYPE_UNTRACKED'; + changeType?: + | 'CHANGE_TYPE_UNSPECIFIED' + | 'CHANGE_TYPE_ADDED' + | 'CHANGE_TYPE_MODIFIED' + | 'CHANGE_TYPE_DELETED' + | 'CHANGE_TYPE_RENAMED' + | 'CHANGE_TYPE_COPIED' + | 'CHANGE_TYPE_UPDATED_BUT_UNMERGED' + | 'CHANGE_TYPE_UNTRACKED'; /** * old_path is the previous path of the file before a rename or copy. Only set when @@ -1250,7 +1336,11 @@ export namespace EnvironmentStatus { * devcontainer_file_presence indicates how the devcontainer file is present in the * repo. */ - devcontainerFilePresence?: 'PRESENCE_UNSPECIFIED' | 'PRESENCE_GENERATED' | 'PRESENCE_DISCOVERED' | 'PRESENCE_SPECIFIED'; + devcontainerFilePresence?: + | 'PRESENCE_UNSPECIFIED' + | 'PRESENCE_GENERATED' + | 'PRESENCE_DISCOVERED' + | 'PRESENCE_SPECIFIED'; /** * failure_message contains the reason the devcontainer failed to operate. @@ -1353,7 +1443,15 @@ export namespace EnvironmentStatus { /** * phase is the current phase of the environment machine */ - phase?: 'PHASE_UNSPECIFIED' | 'PHASE_CREATING' | 'PHASE_STARTING' | 'PHASE_RUNNING' | 'PHASE_STOPPING' | 'PHASE_STOPPED' | 'PHASE_DELETING' | 'PHASE_DELETED'; + phase?: + | 'PHASE_UNSPECIFIED' + | 'PHASE_CREATING' + | 'PHASE_STARTING' + | 'PHASE_RUNNING' + | 'PHASE_STOPPING' + | 'PHASE_STOPPED' + | 'PHASE_DELETING' + | 'PHASE_DELETED'; /** * session is the session that is currently active in the machine. @@ -1400,7 +1498,11 @@ export namespace EnvironmentStatus { specVersion?: string; - statusCode?: 'STATUS_CODE_UNSPECIFIED' | 'STATUS_CODE_OK' | 'STATUS_CODE_INVALID_RESOURCE' | 'STATUS_CODE_FAILED_PRECONDITION'; + statusCode?: + | 'STATUS_CODE_UNSPECIFIED' + | 'STATUS_CODE_OK' + | 'STATUS_CODE_INVALID_RESOURCE' + | 'STATUS_CODE_FAILED_PRECONDITION'; } export interface Secret { @@ -1414,7 +1516,14 @@ export namespace EnvironmentStatus { */ failureMessage?: string; - phase?: 'CONTENT_PHASE_UNSPECIFIED' | 'CONTENT_PHASE_CREATING' | 'CONTENT_PHASE_INITIALIZING' | 'CONTENT_PHASE_READY' | 'CONTENT_PHASE_UPDATING' | 'CONTENT_PHASE_FAILED' | 'CONTENT_PHASE_UNAVAILABLE'; + phase?: + | 'CONTENT_PHASE_UNSPECIFIED' + | 'CONTENT_PHASE_CREATING' + | 'CONTENT_PHASE_INITIALIZING' + | 'CONTENT_PHASE_READY' + | 'CONTENT_PHASE_UPDATING' + | 'CONTENT_PHASE_FAILED' + | 'CONTENT_PHASE_UNAVAILABLE'; secretName?: string; @@ -1439,7 +1548,14 @@ export namespace EnvironmentStatus { /** * phase is the current phase of the public key */ - phase?: 'CONTENT_PHASE_UNSPECIFIED' | 'CONTENT_PHASE_CREATING' | 'CONTENT_PHASE_INITIALIZING' | 'CONTENT_PHASE_READY' | 'CONTENT_PHASE_UPDATING' | 'CONTENT_PHASE_FAILED' | 'CONTENT_PHASE_UNAVAILABLE'; + phase?: + | 'CONTENT_PHASE_UNSPECIFIED' + | 'CONTENT_PHASE_CREATING' + | 'CONTENT_PHASE_INITIALIZING' + | 'CONTENT_PHASE_READY' + | 'CONTENT_PHASE_UPDATING' + | 'CONTENT_PHASE_FAILED' + | 'CONTENT_PHASE_UNAVAILABLE'; } } @@ -1499,9 +1615,9 @@ export interface EnvironmentRetrieveResponse { environment: Environment; } -export type EnvironmentUpdateResponse = unknown +export type EnvironmentUpdateResponse = unknown; -export type EnvironmentDeleteResponse = unknown +export type EnvironmentDeleteResponse = unknown; export interface EnvironmentCreateEnvironmentTokenResponse { /** @@ -1524,13 +1640,13 @@ export interface EnvironmentCreateLogsTokenResponse { accessToken: string; } -export type EnvironmentMarkActiveResponse = unknown +export type EnvironmentMarkActiveResponse = unknown; -export type EnvironmentStartResponse = unknown +export type EnvironmentStartResponse = unknown; -export type EnvironmentStopResponse = unknown +export type EnvironmentStopResponse = unknown; -export type EnvironmentUnarchiveResponse = unknown +export type EnvironmentUnarchiveResponse = unknown; export interface EnvironmentCreateParams { /** @@ -1742,7 +1858,12 @@ export namespace EnvironmentListParams { /** * archival_status filters the response based on environment archive status */ - archivalStatus?: 'ARCHIVAL_STATUS_UNSPECIFIED' | 'ARCHIVAL_STATUS_ACTIVE' | 'ARCHIVAL_STATUS_ARCHIVED' | 'ARCHIVAL_STATUS_ALL' | null; + archivalStatus?: + | 'ARCHIVAL_STATUS_UNSPECIFIED' + | 'ARCHIVAL_STATUS_ACTIVE' + | 'ARCHIVAL_STATUS_ARCHIVED' + | 'ARCHIVAL_STATUS_ALL' + | null; /** * created_before filters environments created before this timestamp @@ -1942,18 +2063,15 @@ export declare namespace Environments { type EnvironmentMarkActiveParams as EnvironmentMarkActiveParams, type EnvironmentStartParams as EnvironmentStartParams, type EnvironmentStopParams as EnvironmentStopParams, - type EnvironmentUnarchiveParams as EnvironmentUnarchiveParams + type EnvironmentUnarchiveParams as EnvironmentUnarchiveParams, }; export { Automations as Automations, type AutomationsAPIAutomationsFile as AutomationsFile, type AutomationUpsertResponse as AutomationUpsertResponse, - type AutomationUpsertParams as AutomationUpsertParams + type AutomationUpsertParams as AutomationUpsertParams, }; - export { - Classes as Classes, - type ClassListParams as ClassListParams - }; + export { Classes as Classes, type ClassListParams as ClassListParams }; } diff --git a/src/resources/environments/index.ts b/src/resources/environments/index.ts index c5859e8b..b608089c 100644 --- a/src/resources/environments/index.ts +++ b/src/resources/environments/index.ts @@ -1,5 +1,47 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Automations, type AutomationsFile, type AutomationUpsertResponse, type AutomationUpsertParams } from './automations/index';; -export { Classes, type ClassListParams } from './classes';; -export { Environments, type AdmissionLevel, type BpfDebugLevel, type Environment, type EnvironmentActivitySignal, type EnvironmentMetadata, type EnvironmentPhase, type EnvironmentRole, type EnvironmentSpec, type EnvironmentStatus, type KernelControlsConfig, type Veto, type EnvironmentCreateResponse, type EnvironmentRetrieveResponse, type EnvironmentUpdateResponse, type EnvironmentDeleteResponse, type EnvironmentCreateEnvironmentTokenResponse, type EnvironmentCreateFromProjectResponse, type EnvironmentCreateLogsTokenResponse, type EnvironmentMarkActiveResponse, type EnvironmentStartResponse, type EnvironmentStopResponse, type EnvironmentUnarchiveResponse, type EnvironmentCreateParams, type EnvironmentRetrieveParams, type EnvironmentUpdateParams, type EnvironmentListParams, type EnvironmentDeleteParams, type EnvironmentCreateEnvironmentTokenParams, type EnvironmentCreateFromProjectParams, type EnvironmentCreateLogsTokenParams, type EnvironmentMarkActiveParams, type EnvironmentStartParams, type EnvironmentStopParams, type EnvironmentUnarchiveParams, type EnvironmentsEnvironmentsPage } from './environments';; +export { + Automations, + type AutomationsFile, + type AutomationUpsertResponse, + type AutomationUpsertParams, +} from './automations/index'; +export { Classes, type ClassListParams } from './classes'; +export { + Environments, + type AdmissionLevel, + type BpfDebugLevel, + type Environment, + type EnvironmentActivitySignal, + type EnvironmentMetadata, + type EnvironmentPhase, + type EnvironmentRole, + type EnvironmentSpec, + type EnvironmentStatus, + type KernelControlsConfig, + type Veto, + type EnvironmentCreateResponse, + type EnvironmentRetrieveResponse, + type EnvironmentUpdateResponse, + type EnvironmentDeleteResponse, + type EnvironmentCreateEnvironmentTokenResponse, + type EnvironmentCreateFromProjectResponse, + type EnvironmentCreateLogsTokenResponse, + type EnvironmentMarkActiveResponse, + type EnvironmentStartResponse, + type EnvironmentStopResponse, + type EnvironmentUnarchiveResponse, + type EnvironmentCreateParams, + type EnvironmentRetrieveParams, + type EnvironmentUpdateParams, + type EnvironmentListParams, + type EnvironmentDeleteParams, + type EnvironmentCreateEnvironmentTokenParams, + type EnvironmentCreateFromProjectParams, + type EnvironmentCreateLogsTokenParams, + type EnvironmentMarkActiveParams, + type EnvironmentStartParams, + type EnvironmentStopParams, + type EnvironmentUnarchiveParams, + type EnvironmentsEnvironmentsPage, +} from './environments'; diff --git a/src/resources/errors.ts b/src/resources/errors.ts index da02273d..921bcfdd 100644 --- a/src/resources/errors.ts +++ b/src/resources/errors.ts @@ -165,7 +165,13 @@ export interface ErrorEvent { /** * Error severity levels (aligned with Sentry levels) */ -export type ErrorLevel = 'ERROR_LEVEL_UNSPECIFIED' | 'ERROR_LEVEL_DEBUG' | 'ERROR_LEVEL_INFO' | 'ERROR_LEVEL_WARNING' | 'ERROR_LEVEL_ERROR' | 'ERROR_LEVEL_FATAL' +export type ErrorLevel = + | 'ERROR_LEVEL_UNSPECIFIED' + | 'ERROR_LEVEL_DEBUG' + | 'ERROR_LEVEL_INFO' + | 'ERROR_LEVEL_WARNING' + | 'ERROR_LEVEL_ERROR' + | 'ERROR_LEVEL_FATAL'; /** * Exception information (Sentry-compatible) @@ -316,7 +322,7 @@ export interface StackFrame { * is indicated by HTTP 200 status code, failures by other status codes Empty * response - success indicated by HTTP status code */ -export type ErrorReportErrorsResponse = unknown +export type ErrorReportErrorsResponse = unknown; export interface ErrorReportErrorsParams { /** @@ -335,6 +341,6 @@ export declare namespace Errors { type RequestInfo as RequestInfo, type StackFrame as StackFrame, type ErrorReportErrorsResponse as ErrorReportErrorsResponse, - type ErrorReportErrorsParams as ErrorReportErrorsParams + type ErrorReportErrorsParams as ErrorReportErrorsParams, }; } diff --git a/src/resources/events.ts b/src/resources/events.ts index 66f75d26..70e2d30b 100644 --- a/src/resources/events.ts +++ b/src/resources/events.ts @@ -61,9 +61,17 @@ export class Events extends APIResource { * } * ``` */ - list(params: EventListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.EventService/ListAuditLogs', EntriesPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: EventListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.EventService/ListAuditLogs', EntriesPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -91,13 +99,31 @@ export class Events extends APIResource { * ``` */ watch(body: EventWatchParams, options?: RequestOptions): APIPromise> { - return this._client.post('/gitpod.v1.EventService/WatchEvents', { body, ...options, headers: buildHeaders([{'Content-Type': 'application/jsonl', Accept: 'application/jsonl'}, options?.headers]), stream: true, __binaryResponse: true })._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)) as APIPromise>; + return this._client + .post('/gitpod.v1.EventService/WatchEvents', { + body, + ...options, + headers: buildHeaders([ + { 'Content-Type': 'application/jsonl', Accept: 'application/jsonl' }, + options?.headers, + ]), + stream: true, + __binaryResponse: true, + }) + ._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller)) as APIPromise< + JSONLDecoder + >; } } -export type EventListResponsesEntriesPage = EntriesPage +export type EventListResponsesEntriesPage = EntriesPage; -export type ResourceOperation = 'RESOURCE_OPERATION_UNSPECIFIED' | 'RESOURCE_OPERATION_CREATE' | 'RESOURCE_OPERATION_UPDATE' | 'RESOURCE_OPERATION_DELETE' | 'RESOURCE_OPERATION_UPDATE_STATUS' +export type ResourceOperation = + | 'RESOURCE_OPERATION_UNSPECIFIED' + | 'RESOURCE_OPERATION_CREATE' + | 'RESOURCE_OPERATION_UPDATE' + | 'RESOURCE_OPERATION_DELETE' + | 'RESOURCE_OPERATION_UPDATE_STATUS'; export interface EventListResponse { id?: string; @@ -327,6 +353,6 @@ export declare namespace Events { type EventWatchResponse as EventWatchResponse, type EventListResponsesEntriesPage as EventListResponsesEntriesPage, type EventListParams as EventListParams, - type EventWatchParams as EventWatchParams + type EventWatchParams as EventWatchParams, }; } diff --git a/src/resources/gateways.ts b/src/resources/gateways.ts index 60fe4318..4edba872 100644 --- a/src/resources/gateways.ts +++ b/src/resources/gateways.ts @@ -10,9 +10,17 @@ export class Gateways extends APIResource { /** * ListGateways */ - list(params: GatewayListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.GatewayService/ListGateways', GatewaysPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: GatewayListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.GatewayService/ListGateways', GatewaysPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } } @@ -43,9 +51,7 @@ export namespace GatewayListParams { } export declare namespace Gateways { - export { - type GatewayListParams as GatewayListParams - }; + export { type GatewayListParams as GatewayListParams }; } -export { type GatewaysGatewaysPage } +export { type GatewaysGatewaysPage }; diff --git a/src/resources/groups/groups.ts b/src/resources/groups/groups.ts index 5b3d50ad..de059d7e 100644 --- a/src/resources/groups/groups.ts +++ b/src/resources/groups/groups.ts @@ -2,11 +2,37 @@ import { APIResource } from '../../core/resource'; import * as MembershipsAPI from './memberships'; -import { GroupMembership, GroupMembershipsMembersPage, MembershipCreateParams, MembershipCreateResponse, MembershipDeleteParams, MembershipDeleteResponse, MembershipListParams, MembershipRetrieveParams, MembershipRetrieveResponse, Memberships } from './memberships'; +import { + GroupMembership, + GroupMembershipsMembersPage, + MembershipCreateParams, + MembershipCreateResponse, + MembershipDeleteParams, + MembershipDeleteResponse, + MembershipListParams, + MembershipRetrieveParams, + MembershipRetrieveResponse, + Memberships, +} from './memberships'; import * as RoleAssignmentsAPI from './role-assignments'; -import { RoleAssignment, RoleAssignmentCreateParams, RoleAssignmentCreateResponse, RoleAssignmentDeleteParams, RoleAssignmentDeleteResponse, RoleAssignmentListParams, RoleAssignments, RoleAssignmentsAssignmentsPage } from './role-assignments'; +import { + RoleAssignment, + RoleAssignmentCreateParams, + RoleAssignmentCreateResponse, + RoleAssignmentDeleteParams, + RoleAssignmentDeleteResponse, + RoleAssignmentListParams, + RoleAssignments, + RoleAssignmentsAssignmentsPage, +} from './role-assignments'; import * as SharesAPI from './shares'; -import { ShareCreateParams, ShareCreateResponse, ShareDeleteParams, ShareDeleteResponse, Shares } from './shares'; +import { + ShareCreateParams, + ShareCreateResponse, + ShareDeleteParams, + ShareDeleteResponse, + Shares, +} from './shares'; import { APIPromise } from '../../core/api-promise'; import { GroupsPage, type GroupsPageParams, PagePromise } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; @@ -172,8 +198,13 @@ export class Groups extends APIResource { * ``` */ list(params: GroupListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.GroupService/ListGroups', GroupsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.GroupService/ListGroups', GroupsPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -212,7 +243,7 @@ export class Groups extends APIResource { } } -export type GroupsGroupsPage = GroupsPage +export type GroupsGroupsPage = GroupsPage; export interface Group { id?: string; @@ -439,7 +470,7 @@ export interface GroupUpdateResponse { /** * Empty response */ -export type GroupDeleteResponse = unknown +export type GroupDeleteResponse = unknown; export interface GroupCreateParams { description?: string; @@ -552,7 +583,7 @@ export declare namespace Groups { type GroupRetrieveParams as GroupRetrieveParams, type GroupUpdateParams as GroupUpdateParams, type GroupListParams as GroupListParams, - type GroupDeleteParams as GroupDeleteParams + type GroupDeleteParams as GroupDeleteParams, }; export { @@ -565,7 +596,7 @@ export declare namespace Groups { type MembershipCreateParams as MembershipCreateParams, type MembershipRetrieveParams as MembershipRetrieveParams, type MembershipListParams as MembershipListParams, - type MembershipDeleteParams as MembershipDeleteParams + type MembershipDeleteParams as MembershipDeleteParams, }; export { @@ -576,7 +607,7 @@ export declare namespace Groups { type RoleAssignmentsAssignmentsPage as RoleAssignmentsAssignmentsPage, type RoleAssignmentCreateParams as RoleAssignmentCreateParams, type RoleAssignmentListParams as RoleAssignmentListParams, - type RoleAssignmentDeleteParams as RoleAssignmentDeleteParams + type RoleAssignmentDeleteParams as RoleAssignmentDeleteParams, }; export { @@ -584,6 +615,6 @@ export declare namespace Groups { type ShareCreateResponse as ShareCreateResponse, type ShareDeleteResponse as ShareDeleteResponse, type ShareCreateParams as ShareCreateParams, - type ShareDeleteParams as ShareDeleteParams + type ShareDeleteParams as ShareDeleteParams, }; } diff --git a/src/resources/groups/index.ts b/src/resources/groups/index.ts index 634e5c56..19d31d88 100644 --- a/src/resources/groups/index.ts +++ b/src/resources/groups/index.ts @@ -1,6 +1,45 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Groups, type Group, type GroupCreateResponse, type GroupRetrieveResponse, type GroupUpdateResponse, type GroupDeleteResponse, type GroupCreateParams, type GroupRetrieveParams, type GroupUpdateParams, type GroupListParams, type GroupDeleteParams, type GroupsGroupsPage } from './groups';; -export { Memberships, type GroupMembership, type MembershipCreateResponse, type MembershipRetrieveResponse, type MembershipDeleteResponse, type MembershipCreateParams, type MembershipRetrieveParams, type MembershipListParams, type MembershipDeleteParams, type GroupMembershipsMembersPage } from './memberships';; -export { RoleAssignments, type RoleAssignment, type RoleAssignmentCreateResponse, type RoleAssignmentDeleteResponse, type RoleAssignmentCreateParams, type RoleAssignmentListParams, type RoleAssignmentDeleteParams, type RoleAssignmentsAssignmentsPage } from './role-assignments';; -export { Shares, type ShareCreateResponse, type ShareDeleteResponse, type ShareCreateParams, type ShareDeleteParams } from './shares';; +export { + Groups, + type Group, + type GroupCreateResponse, + type GroupRetrieveResponse, + type GroupUpdateResponse, + type GroupDeleteResponse, + type GroupCreateParams, + type GroupRetrieveParams, + type GroupUpdateParams, + type GroupListParams, + type GroupDeleteParams, + type GroupsGroupsPage, +} from './groups'; +export { + Memberships, + type GroupMembership, + type MembershipCreateResponse, + type MembershipRetrieveResponse, + type MembershipDeleteResponse, + type MembershipCreateParams, + type MembershipRetrieveParams, + type MembershipListParams, + type MembershipDeleteParams, + type GroupMembershipsMembersPage, +} from './memberships'; +export { + RoleAssignments, + type RoleAssignment, + type RoleAssignmentCreateResponse, + type RoleAssignmentDeleteResponse, + type RoleAssignmentCreateParams, + type RoleAssignmentListParams, + type RoleAssignmentDeleteParams, + type RoleAssignmentsAssignmentsPage, +} from './role-assignments'; +export { + Shares, + type ShareCreateResponse, + type ShareDeleteResponse, + type ShareCreateParams, + type ShareDeleteParams, +} from './shares'; diff --git a/src/resources/groups/memberships.ts b/src/resources/groups/memberships.ts index 5415b150..b6ab33fd 100644 --- a/src/resources/groups/memberships.ts +++ b/src/resources/groups/memberships.ts @@ -127,9 +127,17 @@ export class Memberships extends APIResource { * } * ``` */ - list(params: MembershipListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.GroupService/ListMemberships', MembersPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: MembershipListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.GroupService/ListMemberships', MembersPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -167,7 +175,7 @@ export class Memberships extends APIResource { } } -export type GroupMembershipsMembersPage = MembersPage +export type GroupMembershipsMembersPage = MembersPage; /** * GroupMembership represents a subject's membership in a group @@ -216,7 +224,7 @@ export interface MembershipRetrieveResponse { /** * Empty response */ -export type MembershipDeleteResponse = unknown +export type MembershipDeleteResponse = unknown; export interface MembershipCreateParams { groupId?: string; @@ -300,6 +308,6 @@ export declare namespace Memberships { type MembershipCreateParams as MembershipCreateParams, type MembershipRetrieveParams as MembershipRetrieveParams, type MembershipListParams as MembershipListParams, - type MembershipDeleteParams as MembershipDeleteParams + type MembershipDeleteParams as MembershipDeleteParams, }; } diff --git a/src/resources/groups/role-assignments.ts b/src/resources/groups/role-assignments.ts index 6b96a103..1c8b950c 100644 --- a/src/resources/groups/role-assignments.ts +++ b/src/resources/groups/role-assignments.ts @@ -54,7 +54,10 @@ export class RoleAssignments extends APIResource { * }); * ``` */ - create(body: RoleAssignmentCreateParams, options?: RequestOptions): APIPromise { + create( + body: RoleAssignmentCreateParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.GroupService/CreateRoleAssignment', { body, ...options }); } @@ -109,9 +112,16 @@ export class RoleAssignments extends APIResource { * } * ``` */ - list(params: RoleAssignmentListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.GroupService/ListRoleAssignments', AssignmentsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: RoleAssignmentListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.GroupService/ListRoleAssignments', + AssignmentsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -149,7 +159,7 @@ export class RoleAssignments extends APIResource { } } -export type RoleAssignmentsAssignmentsPage = AssignmentsPage +export type RoleAssignmentsAssignmentsPage = AssignmentsPage; /** * RoleAssignment represents a role assigned to a group on a specific resource @@ -204,7 +214,7 @@ export interface RoleAssignmentCreateResponse { /** * Empty response */ -export type RoleAssignmentDeleteResponse = unknown +export type RoleAssignmentDeleteResponse = unknown; export interface RoleAssignmentCreateParams { groupId?: string; @@ -307,6 +317,6 @@ export declare namespace RoleAssignments { type RoleAssignmentsAssignmentsPage as RoleAssignmentsAssignmentsPage, type RoleAssignmentCreateParams as RoleAssignmentCreateParams, type RoleAssignmentListParams as RoleAssignmentListParams, - type RoleAssignmentDeleteParams as RoleAssignmentDeleteParams + type RoleAssignmentDeleteParams as RoleAssignmentDeleteParams, }; } diff --git a/src/resources/groups/shares.ts b/src/resources/groups/shares.ts index 59c3e8bc..03ddd62c 100644 --- a/src/resources/groups/shares.ts +++ b/src/resources/groups/shares.ts @@ -103,12 +103,12 @@ export class Shares extends APIResource { /** * Empty response on success */ -export type ShareCreateResponse = unknown +export type ShareCreateResponse = unknown; /** * Empty response on success */ -export type ShareDeleteResponse = unknown +export type ShareDeleteResponse = unknown; export interface ShareCreateParams { /** @@ -164,6 +164,6 @@ export declare namespace Shares { type ShareCreateResponse as ShareCreateResponse, type ShareDeleteResponse as ShareDeleteResponse, type ShareCreateParams as ShareCreateParams, - type ShareDeleteParams as ShareDeleteParams + type ShareDeleteParams as ShareDeleteParams, }; } diff --git a/src/resources/identity.ts b/src/resources/identity.ts index 224eea7c..efe362aa 100644 --- a/src/resources/identity.ts +++ b/src/resources/identity.ts @@ -32,7 +32,10 @@ export class Identity extends APIResource { * }); * ``` */ - exchangeToken(body: IdentityExchangeTokenParams, options?: RequestOptions): APIPromise { + exchangeToken( + body: IdentityExchangeTokenParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.IdentityService/ExchangeToken', { body, ...options }); } @@ -62,7 +65,10 @@ export class Identity extends APIResource { * await client.identity.getAuthenticatedIdentity(); * ``` */ - getAuthenticatedIdentity(body: IdentityGetAuthenticatedIdentityParams, options?: RequestOptions): APIPromise { + getAuthenticatedIdentity( + body: IdentityGetAuthenticatedIdentityParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.IdentityService/GetAuthenticatedIdentity', { body, ...options }); } @@ -106,12 +112,15 @@ export class Identity extends APIResource { * }); * ``` */ - getIDToken(body: IdentityGetIDTokenParams, options?: RequestOptions): APIPromise { + getIDToken( + body: IdentityGetIDTokenParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.IdentityService/GetIDToken', { body, ...options }); } } -export type IDTokenVersion = 'ID_TOKEN_VERSION_UNSPECIFIED' | 'ID_TOKEN_VERSION_V1' | 'ID_TOKEN_VERSION_V2' +export type IDTokenVersion = 'ID_TOKEN_VERSION_UNSPECIFIED' | 'ID_TOKEN_VERSION_V1' | 'ID_TOKEN_VERSION_V2'; export interface IdentityExchangeTokenResponse { /** @@ -163,6 +172,6 @@ export declare namespace Identity { type IdentityGetIDTokenResponse as IdentityGetIDTokenResponse, type IdentityExchangeTokenParams as IdentityExchangeTokenParams, type IdentityGetAuthenticatedIdentityParams as IdentityGetAuthenticatedIdentityParams, - type IdentityGetIDTokenParams as IdentityGetIDTokenParams + type IdentityGetIDTokenParams as IdentityGetIDTokenParams, }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index cc46f6d2..8658b6f1 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,20 +1,355 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export * from './shared';; -export { Accounts, type Account, type AccountMembership, type JoinableOrganization, type LoginProvider, type AccountRetrieveResponse, type AccountDeleteResponse, type AccountGetSSOLoginURLResponse, type AccountListSSOLoginsResponse, type AccountRetrieveParams, type AccountDeleteParams, type AccountGetSSOLoginURLParams, type AccountListJoinableOrganizationsParams, type AccountListLoginProvidersParams, type AccountListSSOLoginsParams, type JoinableOrganizationsJoinableOrganizationsPage, type LoginProvidersLoginProvidersPage, type AccountListSSOLoginsResponsesLoginsPage } from './accounts';; -export { Agents, type AgentCodeContext, type AgentExecution, type AgentMessage, type AgentMode, type Prompt, type PromptMetadata, type PromptSpec, type Role, type Type, type UserInputBlock, type UserInputMetadata, type WakeEvent, type AgentCreateExecutionConversationTokenResponse, type AgentCreatePromptResponse, type AgentDeleteExecutionResponse, type AgentDeletePromptResponse, type AgentRetrieveExecutionResponse, type AgentRetrievePromptResponse, type AgentSendToExecutionResponse, type AgentStartExecutionResponse, type AgentStopExecutionResponse, type AgentUpdatePromptResponse, type AgentCreateExecutionConversationTokenParams, type AgentCreatePromptParams, type AgentDeleteExecutionParams, type AgentDeletePromptParams, type AgentListExecutionsParams, type AgentListPromptsParams, type AgentRetrieveExecutionParams, type AgentRetrievePromptParams, type AgentSendToExecutionParams, type AgentStartExecutionParams, type AgentStopExecutionParams, type AgentUpdatePromptParams, type AgentExecutionsAgentExecutionsPage, type PromptsPromptsPage } from './agents';; -export { Automations, type Workflow, type WorkflowAction, type WorkflowExecution, type WorkflowExecutionAction, type WorkflowStep, type WorkflowTrigger, type WorkflowTriggerContext, type AutomationCreateResponse, type AutomationRetrieveResponse, type AutomationUpdateResponse, type AutomationDeleteResponse, type AutomationCancelExecutionResponse, type AutomationCancelExecutionActionResponse, type AutomationListExecutionOutputsResponse, type AutomationRetrieveExecutionResponse, type AutomationRetrieveExecutionActionResponse, type AutomationStartExecutionResponse, type AutomationCreateParams, type AutomationRetrieveParams, type AutomationUpdateParams, type AutomationListParams, type AutomationDeleteParams, type AutomationCancelExecutionParams, type AutomationCancelExecutionActionParams, type AutomationListExecutionActionsParams, type AutomationListExecutionOutputsParams, type AutomationListExecutionsParams, type AutomationRetrieveExecutionParams, type AutomationRetrieveExecutionActionParams, type AutomationStartExecutionParams, type WorkflowsWorkflowsPage, type WorkflowExecutionActionsWorkflowExecutionActionsPage, type AutomationListExecutionOutputsResponsesOutputsPage, type WorkflowExecutionsWorkflowExecutionsPage } from './automations';; -export { Editors, type Editor, type EditorVersion, type EditorRetrieveResponse, type EditorResolveURLResponse, type EditorRetrieveParams, type EditorListParams, type EditorResolveURLParams, type EditorsEditorsPage } from './editors';; -export { Environments, type AdmissionLevel, type BpfDebugLevel, type Environment, type EnvironmentActivitySignal, type EnvironmentMetadata, type EnvironmentPhase, type EnvironmentRole, type EnvironmentSpec, type EnvironmentStatus, type KernelControlsConfig, type Veto, type EnvironmentCreateResponse, type EnvironmentRetrieveResponse, type EnvironmentUpdateResponse, type EnvironmentDeleteResponse, type EnvironmentCreateEnvironmentTokenResponse, type EnvironmentCreateFromProjectResponse, type EnvironmentCreateLogsTokenResponse, type EnvironmentMarkActiveResponse, type EnvironmentStartResponse, type EnvironmentStopResponse, type EnvironmentUnarchiveResponse, type EnvironmentCreateParams, type EnvironmentRetrieveParams, type EnvironmentUpdateParams, type EnvironmentListParams, type EnvironmentDeleteParams, type EnvironmentCreateEnvironmentTokenParams, type EnvironmentCreateFromProjectParams, type EnvironmentCreateLogsTokenParams, type EnvironmentMarkActiveParams, type EnvironmentStartParams, type EnvironmentStopParams, type EnvironmentUnarchiveParams, type EnvironmentsEnvironmentsPage } from './environments/environments';; -export { Errors, type Breadcrumb, type ErrorEvent, type ErrorLevel, type ExceptionInfo, type ExceptionMechanism, type RequestInfo, type StackFrame, type ErrorReportErrorsResponse, type ErrorReportErrorsParams } from './errors';; -export { Events, type ResourceOperation, type EventListResponse, type EventWatchResponse, type EventListParams, type EventWatchParams, type EventListResponsesEntriesPage } from './events';; -export { Gateways, type GatewayListParams } from './gateways';; -export { Groups, type Group, type GroupCreateResponse, type GroupRetrieveResponse, type GroupUpdateResponse, type GroupDeleteResponse, type GroupCreateParams, type GroupRetrieveParams, type GroupUpdateParams, type GroupListParams, type GroupDeleteParams, type GroupsGroupsPage } from './groups/groups';; -export { Identity, type IDTokenVersion, type IdentityExchangeTokenResponse, type IdentityGetAuthenticatedIdentityResponse, type IdentityGetIDTokenResponse, type IdentityExchangeTokenParams, type IdentityGetAuthenticatedIdentityParams, type IdentityGetIDTokenParams } from './identity';; -export { Organizations, type InviteDomains, type Organization, type OrganizationMember, type OrganizationCreateResponse, type OrganizationRetrieveResponse, type OrganizationUpdateResponse, type OrganizationDeleteResponse, type OrganizationJoinResponse, type OrganizationLeaveResponse, type OrganizationSetRoleResponse, type OrganizationCreateParams, type OrganizationRetrieveParams, type OrganizationUpdateParams, type OrganizationDeleteParams, type OrganizationJoinParams, type OrganizationLeaveParams, type OrganizationListMembersParams, type OrganizationSetRoleParams, type OrganizationMembersMembersPage } from './organizations/organizations';; -export { Prebuilds, type Prebuild, type PrebuildMetadata, type PrebuildPhase, type PrebuildSpec, type PrebuildStatus, type PrebuildTrigger, type WarmPool, type WarmPoolMetadata, type WarmPoolPhase, type WarmPoolSpec, type WarmPoolStatus, type PrebuildCreateResponse, type PrebuildRetrieveResponse, type PrebuildDeleteResponse, type PrebuildCancelResponse, type PrebuildCreateLogsTokenResponse, type PrebuildCreateWarmPoolResponse, type PrebuildDeleteWarmPoolResponse, type PrebuildRetrieveWarmPoolResponse, type PrebuildUpdateWarmPoolResponse, type PrebuildCreateParams, type PrebuildRetrieveParams, type PrebuildListParams, type PrebuildDeleteParams, type PrebuildCancelParams, type PrebuildCreateLogsTokenParams, type PrebuildCreateWarmPoolParams, type PrebuildDeleteWarmPoolParams, type PrebuildListWarmPoolsParams, type PrebuildRetrieveWarmPoolParams, type PrebuildUpdateWarmPoolParams, type PrebuildsPrebuildsPage, type WarmPoolsWarmPoolsPage } from './prebuilds';; -export { Projects, type EnvironmentInitializer, type Project, type ProjectMetadata, type ProjectPhase, type ProjectPrebuildConfiguration, type RecommendedEditors, type ProjectCreateResponse, type ProjectRetrieveResponse, type ProjectUpdateResponse, type ProjectDeleteResponse, type ProjectBulkCreateResponse, type ProjectBulkDeleteResponse, type ProjectBulkUpdateResponse, type ProjectCreateFromEnvironmentResponse, type ProjectCreateParams, type ProjectRetrieveParams, type ProjectUpdateParams, type ProjectListParams, type ProjectDeleteParams, type ProjectBulkCreateParams, type ProjectBulkDeleteParams, type ProjectBulkUpdateParams, type ProjectCreateFromEnvironmentParams, type ProjectsProjectsPage } from './projects/projects';; -export { Runners, type GatewayInfo, type LogLevel, type MetricsConfiguration, type Runner, type RunnerCapability, type RunnerConfiguration, type RunnerKind, type RunnerPhase, type RunnerProvider, type RunnerReleaseChannel, type RunnerSpec, type RunnerStatus, type RunnerVariant, type SearchMode, type UpdateWindow, type RunnerCreateResponse, type RunnerRetrieveResponse, type RunnerUpdateResponse, type RunnerDeleteResponse, type RunnerCheckAuthenticationForHostResponse, type RunnerCheckRepositoryAccessResponse, type RunnerCreateLogsTokenResponse, type RunnerCreateRunnerTokenResponse, type RunnerListScmOrganizationsResponse, type RunnerParseContextURLResponse, type RunnerSearchRepositoriesResponse, type RunnerCreateParams, type RunnerRetrieveParams, type RunnerUpdateParams, type RunnerListParams, type RunnerDeleteParams, type RunnerCheckAuthenticationForHostParams, type RunnerCheckRepositoryAccessParams, type RunnerCreateLogsTokenParams, type RunnerCreateRunnerTokenParams, type RunnerListScmOrganizationsParams, type RunnerParseContextURLParams, type RunnerSearchRepositoriesParams, type RunnersRunnersPage, type RunnerListScmOrganizationsResponsesOrganizationsPage } from './runners/runners';; -export { Secrets, type Secret, type SecretScope, type SecretCreateResponse, type SecretDeleteResponse, type SecretGetValueResponse, type SecretUpdateValueResponse, type SecretCreateParams, type SecretListParams, type SecretDeleteParams, type SecretGetValueParams, type SecretUpdateValueParams, type SecretsSecretsPage } from './secrets';; -export { Usage, type EnvironmentUsageRecord, type UsageListEnvironmentRuntimeRecordsParams, type EnvironmentUsageRecordsRecordsPage } from './usage';; -export { Users, type User, type UserDeleteUserResponse, type UserGetAuthenticatedUserResponse, type UserGetUserResponse, type UserSetSuspendedResponse, type UserDeleteUserParams, type UserGetAuthenticatedUserParams, type UserGetUserParams, type UserSetSuspendedParams } from './users/users';; +export * from './shared'; +export { + Accounts, + type Account, + type AccountMembership, + type JoinableOrganization, + type LoginProvider, + type AccountRetrieveResponse, + type AccountDeleteResponse, + type AccountGetSSOLoginURLResponse, + type AccountListSSOLoginsResponse, + type AccountRetrieveParams, + type AccountDeleteParams, + type AccountGetSSOLoginURLParams, + type AccountListJoinableOrganizationsParams, + type AccountListLoginProvidersParams, + type AccountListSSOLoginsParams, + type JoinableOrganizationsJoinableOrganizationsPage, + type LoginProvidersLoginProvidersPage, + type AccountListSSOLoginsResponsesLoginsPage, +} from './accounts'; +export { + Agents, + type AgentCodeContext, + type AgentExecution, + type AgentMessage, + type AgentMode, + type Prompt, + type PromptMetadata, + type PromptSpec, + type Role, + type Type, + type UserInputBlock, + type UserInputMetadata, + type WakeEvent, + type AgentCreateExecutionConversationTokenResponse, + type AgentCreatePromptResponse, + type AgentDeleteExecutionResponse, + type AgentDeletePromptResponse, + type AgentRetrieveExecutionResponse, + type AgentRetrievePromptResponse, + type AgentSendToExecutionResponse, + type AgentStartExecutionResponse, + type AgentStopExecutionResponse, + type AgentUpdatePromptResponse, + type AgentCreateExecutionConversationTokenParams, + type AgentCreatePromptParams, + type AgentDeleteExecutionParams, + type AgentDeletePromptParams, + type AgentListExecutionsParams, + type AgentListPromptsParams, + type AgentRetrieveExecutionParams, + type AgentRetrievePromptParams, + type AgentSendToExecutionParams, + type AgentStartExecutionParams, + type AgentStopExecutionParams, + type AgentUpdatePromptParams, + type AgentExecutionsAgentExecutionsPage, + type PromptsPromptsPage, +} from './agents'; +export { + Automations, + type Workflow, + type WorkflowAction, + type WorkflowExecution, + type WorkflowExecutionAction, + type WorkflowStep, + type WorkflowTrigger, + type WorkflowTriggerContext, + type AutomationCreateResponse, + type AutomationRetrieveResponse, + type AutomationUpdateResponse, + type AutomationDeleteResponse, + type AutomationCancelExecutionResponse, + type AutomationCancelExecutionActionResponse, + type AutomationListExecutionOutputsResponse, + type AutomationRetrieveExecutionResponse, + type AutomationRetrieveExecutionActionResponse, + type AutomationStartExecutionResponse, + type AutomationCreateParams, + type AutomationRetrieveParams, + type AutomationUpdateParams, + type AutomationListParams, + type AutomationDeleteParams, + type AutomationCancelExecutionParams, + type AutomationCancelExecutionActionParams, + type AutomationListExecutionActionsParams, + type AutomationListExecutionOutputsParams, + type AutomationListExecutionsParams, + type AutomationRetrieveExecutionParams, + type AutomationRetrieveExecutionActionParams, + type AutomationStartExecutionParams, + type WorkflowsWorkflowsPage, + type WorkflowExecutionActionsWorkflowExecutionActionsPage, + type AutomationListExecutionOutputsResponsesOutputsPage, + type WorkflowExecutionsWorkflowExecutionsPage, +} from './automations'; +export { + Editors, + type Editor, + type EditorVersion, + type EditorRetrieveResponse, + type EditorResolveURLResponse, + type EditorRetrieveParams, + type EditorListParams, + type EditorResolveURLParams, + type EditorsEditorsPage, +} from './editors'; +export { + Environments, + type AdmissionLevel, + type BpfDebugLevel, + type Environment, + type EnvironmentActivitySignal, + type EnvironmentMetadata, + type EnvironmentPhase, + type EnvironmentRole, + type EnvironmentSpec, + type EnvironmentStatus, + type KernelControlsConfig, + type Veto, + type EnvironmentCreateResponse, + type EnvironmentRetrieveResponse, + type EnvironmentUpdateResponse, + type EnvironmentDeleteResponse, + type EnvironmentCreateEnvironmentTokenResponse, + type EnvironmentCreateFromProjectResponse, + type EnvironmentCreateLogsTokenResponse, + type EnvironmentMarkActiveResponse, + type EnvironmentStartResponse, + type EnvironmentStopResponse, + type EnvironmentUnarchiveResponse, + type EnvironmentCreateParams, + type EnvironmentRetrieveParams, + type EnvironmentUpdateParams, + type EnvironmentListParams, + type EnvironmentDeleteParams, + type EnvironmentCreateEnvironmentTokenParams, + type EnvironmentCreateFromProjectParams, + type EnvironmentCreateLogsTokenParams, + type EnvironmentMarkActiveParams, + type EnvironmentStartParams, + type EnvironmentStopParams, + type EnvironmentUnarchiveParams, + type EnvironmentsEnvironmentsPage, +} from './environments/environments'; +export { + Errors, + type Breadcrumb, + type ErrorEvent, + type ErrorLevel, + type ExceptionInfo, + type ExceptionMechanism, + type RequestInfo, + type StackFrame, + type ErrorReportErrorsResponse, + type ErrorReportErrorsParams, +} from './errors'; +export { + Events, + type ResourceOperation, + type EventListResponse, + type EventWatchResponse, + type EventListParams, + type EventWatchParams, + type EventListResponsesEntriesPage, +} from './events'; +export { Gateways, type GatewayListParams } from './gateways'; +export { + Groups, + type Group, + type GroupCreateResponse, + type GroupRetrieveResponse, + type GroupUpdateResponse, + type GroupDeleteResponse, + type GroupCreateParams, + type GroupRetrieveParams, + type GroupUpdateParams, + type GroupListParams, + type GroupDeleteParams, + type GroupsGroupsPage, +} from './groups/groups'; +export { + Identity, + type IDTokenVersion, + type IdentityExchangeTokenResponse, + type IdentityGetAuthenticatedIdentityResponse, + type IdentityGetIDTokenResponse, + type IdentityExchangeTokenParams, + type IdentityGetAuthenticatedIdentityParams, + type IdentityGetIDTokenParams, +} from './identity'; +export { + Organizations, + type InviteDomains, + type Organization, + type OrganizationMember, + type OrganizationCreateResponse, + type OrganizationRetrieveResponse, + type OrganizationUpdateResponse, + type OrganizationDeleteResponse, + type OrganizationJoinResponse, + type OrganizationLeaveResponse, + type OrganizationSetRoleResponse, + type OrganizationCreateParams, + type OrganizationRetrieveParams, + type OrganizationUpdateParams, + type OrganizationDeleteParams, + type OrganizationJoinParams, + type OrganizationLeaveParams, + type OrganizationListMembersParams, + type OrganizationSetRoleParams, + type OrganizationMembersMembersPage, +} from './organizations/organizations'; +export { + Prebuilds, + type Prebuild, + type PrebuildMetadata, + type PrebuildPhase, + type PrebuildSpec, + type PrebuildStatus, + type PrebuildTrigger, + type WarmPool, + type WarmPoolMetadata, + type WarmPoolPhase, + type WarmPoolSpec, + type WarmPoolStatus, + type PrebuildCreateResponse, + type PrebuildRetrieveResponse, + type PrebuildDeleteResponse, + type PrebuildCancelResponse, + type PrebuildCreateLogsTokenResponse, + type PrebuildCreateWarmPoolResponse, + type PrebuildDeleteWarmPoolResponse, + type PrebuildRetrieveWarmPoolResponse, + type PrebuildUpdateWarmPoolResponse, + type PrebuildCreateParams, + type PrebuildRetrieveParams, + type PrebuildListParams, + type PrebuildDeleteParams, + type PrebuildCancelParams, + type PrebuildCreateLogsTokenParams, + type PrebuildCreateWarmPoolParams, + type PrebuildDeleteWarmPoolParams, + type PrebuildListWarmPoolsParams, + type PrebuildRetrieveWarmPoolParams, + type PrebuildUpdateWarmPoolParams, + type PrebuildsPrebuildsPage, + type WarmPoolsWarmPoolsPage, +} from './prebuilds'; +export { + Projects, + type EnvironmentInitializer, + type Project, + type ProjectMetadata, + type ProjectPhase, + type ProjectPrebuildConfiguration, + type RecommendedEditors, + type ProjectCreateResponse, + type ProjectRetrieveResponse, + type ProjectUpdateResponse, + type ProjectDeleteResponse, + type ProjectBulkCreateResponse, + type ProjectBulkDeleteResponse, + type ProjectBulkUpdateResponse, + type ProjectCreateFromEnvironmentResponse, + type ProjectCreateParams, + type ProjectRetrieveParams, + type ProjectUpdateParams, + type ProjectListParams, + type ProjectDeleteParams, + type ProjectBulkCreateParams, + type ProjectBulkDeleteParams, + type ProjectBulkUpdateParams, + type ProjectCreateFromEnvironmentParams, + type ProjectsProjectsPage, +} from './projects/projects'; +export { + Runners, + type GatewayInfo, + type LogLevel, + type MetricsConfiguration, + type Runner, + type RunnerCapability, + type RunnerConfiguration, + type RunnerKind, + type RunnerPhase, + type RunnerProvider, + type RunnerReleaseChannel, + type RunnerSpec, + type RunnerStatus, + type RunnerVariant, + type SearchMode, + type UpdateWindow, + type RunnerCreateResponse, + type RunnerRetrieveResponse, + type RunnerUpdateResponse, + type RunnerDeleteResponse, + type RunnerCheckAuthenticationForHostResponse, + type RunnerCheckRepositoryAccessResponse, + type RunnerCreateLogsTokenResponse, + type RunnerCreateRunnerTokenResponse, + type RunnerListScmOrganizationsResponse, + type RunnerParseContextURLResponse, + type RunnerSearchRepositoriesResponse, + type RunnerCreateParams, + type RunnerRetrieveParams, + type RunnerUpdateParams, + type RunnerListParams, + type RunnerDeleteParams, + type RunnerCheckAuthenticationForHostParams, + type RunnerCheckRepositoryAccessParams, + type RunnerCreateLogsTokenParams, + type RunnerCreateRunnerTokenParams, + type RunnerListScmOrganizationsParams, + type RunnerParseContextURLParams, + type RunnerSearchRepositoriesParams, + type RunnersRunnersPage, + type RunnerListScmOrganizationsResponsesOrganizationsPage, +} from './runners/runners'; +export { + Secrets, + type Secret, + type SecretScope, + type SecretCreateResponse, + type SecretDeleteResponse, + type SecretGetValueResponse, + type SecretUpdateValueResponse, + type SecretCreateParams, + type SecretListParams, + type SecretDeleteParams, + type SecretGetValueParams, + type SecretUpdateValueParams, + type SecretsSecretsPage, +} from './secrets'; +export { + Usage, + type EnvironmentUsageRecord, + type UsageListEnvironmentRuntimeRecordsParams, + type EnvironmentUsageRecordsRecordsPage, +} from './usage'; +export { + Users, + type User, + type UserDeleteUserResponse, + type UserGetAuthenticatedUserResponse, + type UserGetUserResponse, + type UserSetSuspendedResponse, + type UserDeleteUserParams, + type UserGetAuthenticatedUserParams, + type UserGetUserParams, + type UserSetSuspendedParams, +} from './users/users'; diff --git a/src/resources/organizations/announcement-banner.ts b/src/resources/organizations/announcement-banner.ts index 64bb0c85..ab0ee6a1 100644 --- a/src/resources/organizations/announcement-banner.ts +++ b/src/resources/organizations/announcement-banner.ts @@ -36,7 +36,10 @@ export class AnnouncementBannerResource extends APIResource { * }); * ``` */ - update(body: AnnouncementBannerUpdateParams, options?: RequestOptions): APIPromise { + update( + body: AnnouncementBannerUpdateParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/UpdateAnnouncementBanner', { body, ...options }); } @@ -62,7 +65,10 @@ export class AnnouncementBannerResource extends APIResource { * }); * ``` */ - get(body: AnnouncementBannerGetParams, options?: RequestOptions): APIPromise { + get( + body: AnnouncementBannerGetParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetAnnouncementBanner', { body, ...options }); } } @@ -128,6 +134,6 @@ export declare namespace AnnouncementBannerResource { type AnnouncementBannerUpdateResponse as AnnouncementBannerUpdateResponse, type AnnouncementBannerGetResponse as AnnouncementBannerGetResponse, type AnnouncementBannerUpdateParams as AnnouncementBannerUpdateParams, - type AnnouncementBannerGetParams as AnnouncementBannerGetParams + type AnnouncementBannerGetParams as AnnouncementBannerGetParams, }; } diff --git a/src/resources/organizations/custom-domains.ts b/src/resources/organizations/custom-domains.ts index d19ea2dc..2e5f32d9 100644 --- a/src/resources/organizations/custom-domains.ts +++ b/src/resources/organizations/custom-domains.ts @@ -61,7 +61,10 @@ export class CustomDomains extends APIResource { * }); * ``` */ - retrieve(body: CustomDomainRetrieveParams, options?: RequestOptions): APIPromise { + retrieve( + body: CustomDomainRetrieveParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetCustomDomain', { body, ...options }); } @@ -183,7 +186,10 @@ export interface CustomDomain { * CustomDomainProvider represents the cloud provider for custom domain * configuration */ -export type CustomDomainProvider = 'CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED' | 'CUSTOM_DOMAIN_PROVIDER_AWS' | 'CUSTOM_DOMAIN_PROVIDER_GCP' +export type CustomDomainProvider = + | 'CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED' + | 'CUSTOM_DOMAIN_PROVIDER_AWS' + | 'CUSTOM_DOMAIN_PROVIDER_GCP'; /** * CreateCustomDomainResponse is the response message for creating a custom domain @@ -215,7 +221,7 @@ export interface CustomDomainUpdateResponse { /** * DeleteCustomDomainResponse is the response message for deleting a custom domain */ -export type CustomDomainDeleteResponse = unknown +export type CustomDomainDeleteResponse = unknown; export interface CustomDomainCreateParams { /** @@ -300,6 +306,6 @@ export declare namespace CustomDomains { type CustomDomainCreateParams as CustomDomainCreateParams, type CustomDomainRetrieveParams as CustomDomainRetrieveParams, type CustomDomainUpdateParams as CustomDomainUpdateParams, - type CustomDomainDeleteParams as CustomDomainDeleteParams + type CustomDomainDeleteParams as CustomDomainDeleteParams, }; } diff --git a/src/resources/organizations/domain-verifications.ts b/src/resources/organizations/domain-verifications.ts index 1330328b..e5044cbc 100644 --- a/src/resources/organizations/domain-verifications.ts +++ b/src/resources/organizations/domain-verifications.ts @@ -2,7 +2,11 @@ import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; -import { DomainVerificationsPage, type DomainVerificationsPageParams, PagePromise } from '../../core/pagination'; +import { + DomainVerificationsPage, + type DomainVerificationsPageParams, + PagePromise, +} from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class DomainVerifications extends APIResource { @@ -45,7 +49,10 @@ export class DomainVerifications extends APIResource { * }); * ``` */ - create(body: DomainVerificationCreateParams, options?: RequestOptions): APIPromise { + create( + body: DomainVerificationCreateParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/CreateDomainVerification', { body, ...options }); } @@ -77,7 +84,10 @@ export class DomainVerifications extends APIResource { * }); * ``` */ - retrieve(body: DomainVerificationRetrieveParams, options?: RequestOptions): APIPromise { + retrieve( + body: DomainVerificationRetrieveParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetDomainVerification', { body, ...options }); } @@ -127,9 +137,16 @@ export class DomainVerifications extends APIResource { * } * ``` */ - list(params: DomainVerificationListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.OrganizationService/ListDomainVerifications', DomainVerificationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: DomainVerificationListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.OrganizationService/ListDomainVerifications', + DomainVerificationsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -192,12 +209,15 @@ export class DomainVerifications extends APIResource { * }); * ``` */ - verify(body: DomainVerificationVerifyParams, options?: RequestOptions): APIPromise { + verify( + body: DomainVerificationVerifyParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/VerifyDomain', { body, ...options }); } } -export type DomainVerificationsDomainVerificationsPage = DomainVerificationsPage +export type DomainVerificationsDomainVerificationsPage = DomainVerificationsPage; export interface DomainVerification { id: string; @@ -395,7 +415,10 @@ export interface DomainVerification { verifiedAt?: string; } -export type DomainVerificationState = 'DOMAIN_VERIFICATION_STATE_UNSPECIFIED' | 'DOMAIN_VERIFICATION_STATE_PENDING' | 'DOMAIN_VERIFICATION_STATE_VERIFIED' +export type DomainVerificationState = + | 'DOMAIN_VERIFICATION_STATE_UNSPECIFIED' + | 'DOMAIN_VERIFICATION_STATE_PENDING' + | 'DOMAIN_VERIFICATION_STATE_VERIFIED'; export interface DomainVerificationCreateResponse { domainVerification: DomainVerification; @@ -405,7 +428,7 @@ export interface DomainVerificationRetrieveResponse { domainVerification: DomainVerification; } -export type DomainVerificationDeleteResponse = unknown +export type DomainVerificationDeleteResponse = unknown; export interface DomainVerificationVerifyResponse { domainVerification: DomainVerification; @@ -470,6 +493,6 @@ export declare namespace DomainVerifications { type DomainVerificationRetrieveParams as DomainVerificationRetrieveParams, type DomainVerificationListParams as DomainVerificationListParams, type DomainVerificationDeleteParams as DomainVerificationDeleteParams, - type DomainVerificationVerifyParams as DomainVerificationVerifyParams + type DomainVerificationVerifyParams as DomainVerificationVerifyParams, }; } diff --git a/src/resources/organizations/index.ts b/src/resources/organizations/index.ts index 92b1ce90..29e04f78 100644 --- a/src/resources/organizations/index.ts +++ b/src/resources/organizations/index.ts @@ -1,10 +1,119 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { AnnouncementBannerResource, type AnnouncementBanner, type AnnouncementBannerUpdateResponse, type AnnouncementBannerGetResponse, type AnnouncementBannerUpdateParams, type AnnouncementBannerGetParams } from './announcement-banner';; -export { CustomDomains, type CustomDomain, type CustomDomainProvider, type CustomDomainCreateResponse, type CustomDomainRetrieveResponse, type CustomDomainUpdateResponse, type CustomDomainDeleteResponse, type CustomDomainCreateParams, type CustomDomainRetrieveParams, type CustomDomainUpdateParams, type CustomDomainDeleteParams } from './custom-domains';; -export { DomainVerifications, type DomainVerification, type DomainVerificationState, type DomainVerificationCreateResponse, type DomainVerificationRetrieveResponse, type DomainVerificationDeleteResponse, type DomainVerificationVerifyResponse, type DomainVerificationCreateParams, type DomainVerificationRetrieveParams, type DomainVerificationListParams, type DomainVerificationDeleteParams, type DomainVerificationVerifyParams, type DomainVerificationsDomainVerificationsPage } from './domain-verifications';; -export { Invites, type OrganizationInvite, type InviteCreateResponse, type InviteRetrieveResponse, type InviteGetSummaryResponse, type InviteCreateParams, type InviteRetrieveParams, type InviteGetSummaryParams } from './invites';; -export { Organizations, type InviteDomains, type Organization, type OrganizationMember, type OrganizationCreateResponse, type OrganizationRetrieveResponse, type OrganizationUpdateResponse, type OrganizationDeleteResponse, type OrganizationJoinResponse, type OrganizationLeaveResponse, type OrganizationSetRoleResponse, type OrganizationCreateParams, type OrganizationRetrieveParams, type OrganizationUpdateParams, type OrganizationDeleteParams, type OrganizationJoinParams, type OrganizationLeaveParams, type OrganizationListMembersParams, type OrganizationSetRoleParams, type OrganizationMembersMembersPage } from './organizations';; -export { Policies, type AgentPolicy, type ConversationSharingPolicy, type CrowdStrikeConfig, type CustomAgentEnvMapping, type CustomSecurityAgent, type KernelControlsAction, type OrganizationPolicies, type SecurityAgentPolicy, type VetoExecPolicy, type PolicyRetrieveResponse, type PolicyUpdateResponse, type PolicyRetrieveParams, type PolicyUpdateParams } from './policies';; -export { SSOConfigurations, type AdditionalScopesUpdate, type ProviderType, type SSOConfiguration, type SSOConfigurationState, type SSOConfigurationCreateResponse, type SSOConfigurationRetrieveResponse, type SSOConfigurationUpdateResponse, type SSOConfigurationDeleteResponse, type SSOConfigurationCreateParams, type SSOConfigurationRetrieveParams, type SSOConfigurationUpdateParams, type SSOConfigurationListParams, type SSOConfigurationDeleteParams, type SSOConfigurationsSSOConfigurationsPage } from './sso-configurations';; -export { ScimConfigurations, type ScimConfiguration, type ScimConfigurationCreateResponse, type ScimConfigurationRetrieveResponse, type ScimConfigurationUpdateResponse, type ScimConfigurationDeleteResponse, type ScimConfigurationRegenerateTokenResponse, type ScimConfigurationCreateParams, type ScimConfigurationRetrieveParams, type ScimConfigurationUpdateParams, type ScimConfigurationListParams, type ScimConfigurationDeleteParams, type ScimConfigurationRegenerateTokenParams, type ScimConfigurationsScimConfigurationsPage } from './scim-configurations';; +export { + AnnouncementBannerResource, + type AnnouncementBanner, + type AnnouncementBannerUpdateResponse, + type AnnouncementBannerGetResponse, + type AnnouncementBannerUpdateParams, + type AnnouncementBannerGetParams, +} from './announcement-banner'; +export { + CustomDomains, + type CustomDomain, + type CustomDomainProvider, + type CustomDomainCreateResponse, + type CustomDomainRetrieveResponse, + type CustomDomainUpdateResponse, + type CustomDomainDeleteResponse, + type CustomDomainCreateParams, + type CustomDomainRetrieveParams, + type CustomDomainUpdateParams, + type CustomDomainDeleteParams, +} from './custom-domains'; +export { + DomainVerifications, + type DomainVerification, + type DomainVerificationState, + type DomainVerificationCreateResponse, + type DomainVerificationRetrieveResponse, + type DomainVerificationDeleteResponse, + type DomainVerificationVerifyResponse, + type DomainVerificationCreateParams, + type DomainVerificationRetrieveParams, + type DomainVerificationListParams, + type DomainVerificationDeleteParams, + type DomainVerificationVerifyParams, + type DomainVerificationsDomainVerificationsPage, +} from './domain-verifications'; +export { + Invites, + type OrganizationInvite, + type InviteCreateResponse, + type InviteRetrieveResponse, + type InviteGetSummaryResponse, + type InviteCreateParams, + type InviteRetrieveParams, + type InviteGetSummaryParams, +} from './invites'; +export { + Organizations, + type InviteDomains, + type Organization, + type OrganizationMember, + type OrganizationCreateResponse, + type OrganizationRetrieveResponse, + type OrganizationUpdateResponse, + type OrganizationDeleteResponse, + type OrganizationJoinResponse, + type OrganizationLeaveResponse, + type OrganizationSetRoleResponse, + type OrganizationCreateParams, + type OrganizationRetrieveParams, + type OrganizationUpdateParams, + type OrganizationDeleteParams, + type OrganizationJoinParams, + type OrganizationLeaveParams, + type OrganizationListMembersParams, + type OrganizationSetRoleParams, + type OrganizationMembersMembersPage, +} from './organizations'; +export { + Policies, + type AgentPolicy, + type ConversationSharingPolicy, + type CrowdStrikeConfig, + type CustomAgentEnvMapping, + type CustomSecurityAgent, + type KernelControlsAction, + type OrganizationPolicies, + type SecurityAgentPolicy, + type VetoExecPolicy, + type PolicyRetrieveResponse, + type PolicyUpdateResponse, + type PolicyRetrieveParams, + type PolicyUpdateParams, +} from './policies'; +export { + SSOConfigurations, + type AdditionalScopesUpdate, + type ProviderType, + type SSOConfiguration, + type SSOConfigurationState, + type SSOConfigurationCreateResponse, + type SSOConfigurationRetrieveResponse, + type SSOConfigurationUpdateResponse, + type SSOConfigurationDeleteResponse, + type SSOConfigurationCreateParams, + type SSOConfigurationRetrieveParams, + type SSOConfigurationUpdateParams, + type SSOConfigurationListParams, + type SSOConfigurationDeleteParams, + type SSOConfigurationsSSOConfigurationsPage, +} from './sso-configurations'; +export { + ScimConfigurations, + type ScimConfiguration, + type ScimConfigurationCreateResponse, + type ScimConfigurationRetrieveResponse, + type ScimConfigurationUpdateResponse, + type ScimConfigurationDeleteResponse, + type ScimConfigurationRegenerateTokenResponse, + type ScimConfigurationCreateParams, + type ScimConfigurationRetrieveParams, + type ScimConfigurationUpdateParams, + type ScimConfigurationListParams, + type ScimConfigurationDeleteParams, + type ScimConfigurationRegenerateTokenParams, + type ScimConfigurationsScimConfigurationsPage, +} from './scim-configurations'; diff --git a/src/resources/organizations/invites.ts b/src/resources/organizations/invites.ts index f6dbc107..ad18317b 100644 --- a/src/resources/organizations/invites.ts +++ b/src/resources/organizations/invites.ts @@ -79,7 +79,10 @@ export class Invites extends APIResource { * ``` */ getSummary(body: InviteGetSummaryParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.OrganizationService/GetOrganizationInviteSummary', { body, ...options }); + return this._client.post('/gitpod.v1.OrganizationService/GetOrganizationInviteSummary', { + body, + ...options, + }); } } @@ -127,6 +130,6 @@ export declare namespace Invites { type InviteGetSummaryResponse as InviteGetSummaryResponse, type InviteCreateParams as InviteCreateParams, type InviteRetrieveParams as InviteRetrieveParams, - type InviteGetSummaryParams as InviteGetSummaryParams + type InviteGetSummaryParams as InviteGetSummaryParams, }; } diff --git a/src/resources/organizations/organizations.ts b/src/resources/organizations/organizations.ts index dbd92882..3cdc46f4 100644 --- a/src/resources/organizations/organizations.ts +++ b/src/resources/organizations/organizations.ts @@ -3,31 +3,125 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import * as AnnouncementBannerAPI from './announcement-banner'; -import { AnnouncementBanner, AnnouncementBannerGetParams, AnnouncementBannerGetResponse, AnnouncementBannerResource, AnnouncementBannerUpdateParams, AnnouncementBannerUpdateResponse } from './announcement-banner'; +import { + AnnouncementBanner, + AnnouncementBannerGetParams, + AnnouncementBannerGetResponse, + AnnouncementBannerResource, + AnnouncementBannerUpdateParams, + AnnouncementBannerUpdateResponse, +} from './announcement-banner'; import * as CustomDomainsAPI from './custom-domains'; -import { CustomDomain, CustomDomainCreateParams, CustomDomainCreateResponse, CustomDomainDeleteParams, CustomDomainDeleteResponse, CustomDomainProvider, CustomDomainRetrieveParams, CustomDomainRetrieveResponse, CustomDomainUpdateParams, CustomDomainUpdateResponse, CustomDomains } from './custom-domains'; +import { + CustomDomain, + CustomDomainCreateParams, + CustomDomainCreateResponse, + CustomDomainDeleteParams, + CustomDomainDeleteResponse, + CustomDomainProvider, + CustomDomainRetrieveParams, + CustomDomainRetrieveResponse, + CustomDomainUpdateParams, + CustomDomainUpdateResponse, + CustomDomains, +} from './custom-domains'; import * as DomainVerificationsAPI from './domain-verifications'; -import { DomainVerification, DomainVerificationCreateParams, DomainVerificationCreateResponse, DomainVerificationDeleteParams, DomainVerificationDeleteResponse, DomainVerificationListParams, DomainVerificationRetrieveParams, DomainVerificationRetrieveResponse, DomainVerificationState, DomainVerificationVerifyParams, DomainVerificationVerifyResponse, DomainVerifications, DomainVerificationsDomainVerificationsPage } from './domain-verifications'; +import { + DomainVerification, + DomainVerificationCreateParams, + DomainVerificationCreateResponse, + DomainVerificationDeleteParams, + DomainVerificationDeleteResponse, + DomainVerificationListParams, + DomainVerificationRetrieveParams, + DomainVerificationRetrieveResponse, + DomainVerificationState, + DomainVerificationVerifyParams, + DomainVerificationVerifyResponse, + DomainVerifications, + DomainVerificationsDomainVerificationsPage, +} from './domain-verifications'; import * as InvitesAPI from './invites'; -import { InviteCreateParams, InviteCreateResponse, InviteGetSummaryParams, InviteGetSummaryResponse, InviteRetrieveParams, InviteRetrieveResponse, Invites, OrganizationInvite } from './invites'; +import { + InviteCreateParams, + InviteCreateResponse, + InviteGetSummaryParams, + InviteGetSummaryResponse, + InviteRetrieveParams, + InviteRetrieveResponse, + Invites, + OrganizationInvite, +} from './invites'; import * as PoliciesAPI from './policies'; -import { AgentPolicy, ConversationSharingPolicy, CrowdStrikeConfig, CustomAgentEnvMapping, CustomSecurityAgent, KernelControlsAction, OrganizationPolicies, Policies, PolicyRetrieveParams, PolicyRetrieveResponse, PolicyUpdateParams, PolicyUpdateResponse, SecurityAgentPolicy, VetoExecPolicy } from './policies'; +import { + AgentPolicy, + ConversationSharingPolicy, + CrowdStrikeConfig, + CustomAgentEnvMapping, + CustomSecurityAgent, + KernelControlsAction, + OrganizationPolicies, + Policies, + PolicyRetrieveParams, + PolicyRetrieveResponse, + PolicyUpdateParams, + PolicyUpdateResponse, + SecurityAgentPolicy, + VetoExecPolicy, +} from './policies'; import * as ScimConfigurationsAPI from './scim-configurations'; -import { ScimConfiguration, ScimConfigurationCreateParams, ScimConfigurationCreateResponse, ScimConfigurationDeleteParams, ScimConfigurationDeleteResponse, ScimConfigurationListParams, ScimConfigurationRegenerateTokenParams, ScimConfigurationRegenerateTokenResponse, ScimConfigurationRetrieveParams, ScimConfigurationRetrieveResponse, ScimConfigurationUpdateParams, ScimConfigurationUpdateResponse, ScimConfigurations, ScimConfigurationsScimConfigurationsPage } from './scim-configurations'; +import { + ScimConfiguration, + ScimConfigurationCreateParams, + ScimConfigurationCreateResponse, + ScimConfigurationDeleteParams, + ScimConfigurationDeleteResponse, + ScimConfigurationListParams, + ScimConfigurationRegenerateTokenParams, + ScimConfigurationRegenerateTokenResponse, + ScimConfigurationRetrieveParams, + ScimConfigurationRetrieveResponse, + ScimConfigurationUpdateParams, + ScimConfigurationUpdateResponse, + ScimConfigurations, + ScimConfigurationsScimConfigurationsPage, +} from './scim-configurations'; import * as SSOConfigurationsAPI from './sso-configurations'; -import { AdditionalScopesUpdate, ProviderType, SSOConfiguration, SSOConfigurationCreateParams, SSOConfigurationCreateResponse, SSOConfigurationDeleteParams, SSOConfigurationDeleteResponse, SSOConfigurationListParams, SSOConfigurationRetrieveParams, SSOConfigurationRetrieveResponse, SSOConfigurationState, SSOConfigurationUpdateParams, SSOConfigurationUpdateResponse, SSOConfigurations, SSOConfigurationsSSOConfigurationsPage } from './sso-configurations'; +import { + AdditionalScopesUpdate, + ProviderType, + SSOConfiguration, + SSOConfigurationCreateParams, + SSOConfigurationCreateResponse, + SSOConfigurationDeleteParams, + SSOConfigurationDeleteResponse, + SSOConfigurationListParams, + SSOConfigurationRetrieveParams, + SSOConfigurationRetrieveResponse, + SSOConfigurationState, + SSOConfigurationUpdateParams, + SSOConfigurationUpdateResponse, + SSOConfigurations, + SSOConfigurationsSSOConfigurationsPage, +} from './sso-configurations'; import { APIPromise } from '../../core/api-promise'; import { MembersPage, type MembersPageParams, PagePromise } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Organizations extends APIResource { - announcementBanner: AnnouncementBannerAPI.AnnouncementBannerResource = new AnnouncementBannerAPI.AnnouncementBannerResource(this._client); + announcementBanner: AnnouncementBannerAPI.AnnouncementBannerResource = + new AnnouncementBannerAPI.AnnouncementBannerResource(this._client); customDomains: CustomDomainsAPI.CustomDomains = new CustomDomainsAPI.CustomDomains(this._client); - domainVerifications: DomainVerificationsAPI.DomainVerifications = new DomainVerificationsAPI.DomainVerifications(this._client); + domainVerifications: DomainVerificationsAPI.DomainVerifications = + new DomainVerificationsAPI.DomainVerifications(this._client); invites: InvitesAPI.Invites = new InvitesAPI.Invites(this._client); policies: PoliciesAPI.Policies = new PoliciesAPI.Policies(this._client); - scimConfigurations: ScimConfigurationsAPI.ScimConfigurations = new ScimConfigurationsAPI.ScimConfigurations(this._client); - ssoConfigurations: SSOConfigurationsAPI.SSOConfigurations = new SSOConfigurationsAPI.SSOConfigurations(this._client); + scimConfigurations: ScimConfigurationsAPI.ScimConfigurations = new ScimConfigurationsAPI.ScimConfigurations( + this._client, + ); + ssoConfigurations: SSOConfigurationsAPI.SSOConfigurations = new SSOConfigurationsAPI.SSOConfigurations( + this._client, + ); /** * Creates a new organization with the specified name and settings. @@ -98,7 +192,10 @@ export class Organizations extends APIResource { * }); * ``` */ - retrieve(body: OrganizationRetrieveParams, options?: RequestOptions): APIPromise { + retrieve( + body: OrganizationRetrieveParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetOrganization', { body, ...options }); } @@ -297,9 +394,16 @@ export class Organizations extends APIResource { * } * ``` */ - listMembers(params: OrganizationListMembersParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.OrganizationService/ListMembers', MembersPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listMembers( + params: OrganizationListMembersParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.OrganizationService/ListMembers', + MembersPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -348,7 +452,7 @@ export class Organizations extends APIResource { } } -export type OrganizationMembersMembersPage = MembersPage +export type OrganizationMembersMembersPage = MembersPage; export interface InviteDomains { /** @@ -692,7 +796,7 @@ export interface OrganizationUpdateResponse { organization: Organization; } -export type OrganizationDeleteResponse = unknown +export type OrganizationDeleteResponse = unknown; export interface OrganizationJoinResponse { /** @@ -701,9 +805,9 @@ export interface OrganizationJoinResponse { member: OrganizationMember; } -export type OrganizationLeaveResponse = unknown +export type OrganizationLeaveResponse = unknown; -export type OrganizationSetRoleResponse = unknown +export type OrganizationSetRoleResponse = unknown; export interface OrganizationCreateParams { /** @@ -897,7 +1001,7 @@ export declare namespace Organizations { type OrganizationJoinParams as OrganizationJoinParams, type OrganizationLeaveParams as OrganizationLeaveParams, type OrganizationListMembersParams as OrganizationListMembersParams, - type OrganizationSetRoleParams as OrganizationSetRoleParams + type OrganizationSetRoleParams as OrganizationSetRoleParams, }; export { @@ -906,7 +1010,7 @@ export declare namespace Organizations { type AnnouncementBannerUpdateResponse as AnnouncementBannerUpdateResponse, type AnnouncementBannerGetResponse as AnnouncementBannerGetResponse, type AnnouncementBannerUpdateParams as AnnouncementBannerUpdateParams, - type AnnouncementBannerGetParams as AnnouncementBannerGetParams + type AnnouncementBannerGetParams as AnnouncementBannerGetParams, }; export { @@ -920,7 +1024,7 @@ export declare namespace Organizations { type CustomDomainCreateParams as CustomDomainCreateParams, type CustomDomainRetrieveParams as CustomDomainRetrieveParams, type CustomDomainUpdateParams as CustomDomainUpdateParams, - type CustomDomainDeleteParams as CustomDomainDeleteParams + type CustomDomainDeleteParams as CustomDomainDeleteParams, }; export { @@ -936,7 +1040,7 @@ export declare namespace Organizations { type DomainVerificationRetrieveParams as DomainVerificationRetrieveParams, type DomainVerificationListParams as DomainVerificationListParams, type DomainVerificationDeleteParams as DomainVerificationDeleteParams, - type DomainVerificationVerifyParams as DomainVerificationVerifyParams + type DomainVerificationVerifyParams as DomainVerificationVerifyParams, }; export { @@ -947,7 +1051,7 @@ export declare namespace Organizations { type InviteGetSummaryResponse as InviteGetSummaryResponse, type InviteCreateParams as InviteCreateParams, type InviteRetrieveParams as InviteRetrieveParams, - type InviteGetSummaryParams as InviteGetSummaryParams + type InviteGetSummaryParams as InviteGetSummaryParams, }; export { @@ -964,7 +1068,7 @@ export declare namespace Organizations { type PolicyRetrieveResponse as PolicyRetrieveResponse, type PolicyUpdateResponse as PolicyUpdateResponse, type PolicyRetrieveParams as PolicyRetrieveParams, - type PolicyUpdateParams as PolicyUpdateParams + type PolicyUpdateParams as PolicyUpdateParams, }; export { @@ -981,7 +1085,7 @@ export declare namespace Organizations { type ScimConfigurationUpdateParams as ScimConfigurationUpdateParams, type ScimConfigurationListParams as ScimConfigurationListParams, type ScimConfigurationDeleteParams as ScimConfigurationDeleteParams, - type ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams + type ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams, }; export { @@ -999,6 +1103,6 @@ export declare namespace Organizations { type SSOConfigurationRetrieveParams as SSOConfigurationRetrieveParams, type SSOConfigurationUpdateParams as SSOConfigurationUpdateParams, type SSOConfigurationListParams as SSOConfigurationListParams, - type SSOConfigurationDeleteParams as SSOConfigurationDeleteParams + type SSOConfigurationDeleteParams as SSOConfigurationDeleteParams, }; } diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index c3b92606..604b29e0 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -84,7 +84,10 @@ export class Policies extends APIResource { * ``` */ update(body: PolicyUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.OrganizationService/UpdateOrganizationPolicies', { body, ...options }); + return this._client.post('/gitpod.v1.OrganizationService/UpdateOrganizationPolicies', { + body, + ...options, + }); } } @@ -132,7 +135,10 @@ export interface AgentPolicy { /** * ConversationSharingPolicy controls how agent conversations can be shared. */ -export type ConversationSharingPolicy = 'CONVERSATION_SHARING_POLICY_UNSPECIFIED' | 'CONVERSATION_SHARING_POLICY_DISABLED' | 'CONVERSATION_SHARING_POLICY_ORGANIZATION' +export type ConversationSharingPolicy = + | 'CONVERSATION_SHARING_POLICY_UNSPECIFIED' + | 'CONVERSATION_SHARING_POLICY_DISABLED' + | 'CONVERSATION_SHARING_POLICY_ORGANIZATION'; /** * CrowdStrikeConfig configures CrowdStrike Falcon sensor deployment @@ -225,7 +231,10 @@ export interface CustomSecurityAgent { /** * KernelControlsAction defines how a kernel-level policy violation is handled. */ -export type KernelControlsAction = 'KERNEL_CONTROLS_ACTION_UNSPECIFIED' | 'KERNEL_CONTROLS_ACTION_BLOCK' | 'KERNEL_CONTROLS_ACTION_AUDIT' +export type KernelControlsAction = + | 'KERNEL_CONTROLS_ACTION_UNSPECIFIED' + | 'KERNEL_CONTROLS_ACTION_BLOCK' + | 'KERNEL_CONTROLS_ACTION_AUDIT'; export interface OrganizationPolicies { /** @@ -403,7 +412,7 @@ export interface PolicyRetrieveResponse { policies: OrganizationPolicies; } -export type PolicyUpdateResponse = unknown +export type PolicyUpdateResponse = unknown; export interface PolicyRetrieveParams { /** @@ -646,6 +655,6 @@ export declare namespace Policies { type PolicyRetrieveResponse as PolicyRetrieveResponse, type PolicyUpdateResponse as PolicyUpdateResponse, type PolicyRetrieveParams as PolicyRetrieveParams, - type PolicyUpdateParams as PolicyUpdateParams + type PolicyUpdateParams as PolicyUpdateParams, }; } diff --git a/src/resources/organizations/scim-configurations.ts b/src/resources/organizations/scim-configurations.ts index 62c2da3a..33dc2f84 100644 --- a/src/resources/organizations/scim-configurations.ts +++ b/src/resources/organizations/scim-configurations.ts @@ -2,7 +2,11 @@ import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; -import { PagePromise, ScimConfigurationsPage, type ScimConfigurationsPageParams } from '../../core/pagination'; +import { + PagePromise, + ScimConfigurationsPage, + type ScimConfigurationsPageParams, +} from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class ScimConfigurations extends APIResource { @@ -47,7 +51,10 @@ export class ScimConfigurations extends APIResource { * }); * ``` */ - create(body: ScimConfigurationCreateParams, options?: RequestOptions): APIPromise { + create( + body: ScimConfigurationCreateParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/CreateSCIMConfiguration', { body, ...options }); } @@ -79,7 +86,10 @@ export class ScimConfigurations extends APIResource { * }); * ``` */ - retrieve(body: ScimConfigurationRetrieveParams, options?: RequestOptions): APIPromise { + retrieve( + body: ScimConfigurationRetrieveParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetSCIMConfiguration', { body, ...options }); } @@ -121,7 +131,10 @@ export class ScimConfigurations extends APIResource { * }); * ``` */ - update(body: ScimConfigurationUpdateParams, options?: RequestOptions): APIPromise { + update( + body: ScimConfigurationUpdateParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/UpdateSCIMConfiguration', { body, ...options }); } @@ -155,9 +168,16 @@ export class ScimConfigurations extends APIResource { * } * ``` */ - list(params: ScimConfigurationListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.OrganizationService/ListSCIMConfigurations', ScimConfigurationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: ScimConfigurationListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.OrganizationService/ListSCIMConfigurations', + ScimConfigurationsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -232,12 +252,15 @@ export class ScimConfigurations extends APIResource { * ); * ``` */ - regenerateToken(body: ScimConfigurationRegenerateTokenParams, options?: RequestOptions): APIPromise { + regenerateToken( + body: ScimConfigurationRegenerateTokenParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/RegenerateSCIMToken', { body, ...options }); } } -export type ScimConfigurationsScimConfigurationsPage = ScimConfigurationsPage +export type ScimConfigurationsScimConfigurationsPage = ScimConfigurationsPage; /** * SCIMConfiguration represents a SCIM 2.0 provisioning configuration @@ -316,7 +339,7 @@ export interface ScimConfigurationUpdateResponse { scimConfiguration: ScimConfiguration; } -export type ScimConfigurationDeleteResponse = unknown +export type ScimConfigurationDeleteResponse = unknown; export interface ScimConfigurationRegenerateTokenResponse { /** @@ -443,6 +466,6 @@ export declare namespace ScimConfigurations { type ScimConfigurationUpdateParams as ScimConfigurationUpdateParams, type ScimConfigurationListParams as ScimConfigurationListParams, type ScimConfigurationDeleteParams as ScimConfigurationDeleteParams, - type ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams + type ScimConfigurationRegenerateTokenParams as ScimConfigurationRegenerateTokenParams, }; } diff --git a/src/resources/organizations/sso-configurations.ts b/src/resources/organizations/sso-configurations.ts index 15eac799..08d20208 100644 --- a/src/resources/organizations/sso-configurations.ts +++ b/src/resources/organizations/sso-configurations.ts @@ -55,7 +55,10 @@ export class SSOConfigurations extends APIResource { * }); * ``` */ - create(body: SSOConfigurationCreateParams, options?: RequestOptions): APIPromise { + create( + body: SSOConfigurationCreateParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/CreateSSOConfiguration', { body, ...options }); } @@ -87,7 +90,10 @@ export class SSOConfigurations extends APIResource { * }); * ``` */ - retrieve(body: SSOConfigurationRetrieveParams, options?: RequestOptions): APIPromise { + retrieve( + body: SSOConfigurationRetrieveParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetSSOConfiguration', { body, ...options }); } @@ -184,9 +190,16 @@ export class SSOConfigurations extends APIResource { * } * ``` */ - list(params: SSOConfigurationListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.OrganizationService/ListSSOConfigurations', SSOConfigurationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: SSOConfigurationListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.OrganizationService/ListSSOConfigurations', + SSOConfigurationsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -222,7 +235,7 @@ export class SSOConfigurations extends APIResource { } } -export type SSOConfigurationsSSOConfigurationsPage = SSOConfigurationsPage +export type SSOConfigurationsSSOConfigurationsPage = SSOConfigurationsPage; /** * AdditionalScopesUpdate wraps a list of OIDC scopes so that the update request @@ -233,7 +246,7 @@ export interface AdditionalScopesUpdate { scopes?: Array; } -export type ProviderType = 'PROVIDER_TYPE_UNSPECIFIED' | 'PROVIDER_TYPE_BUILTIN' | 'PROVIDER_TYPE_CUSTOM' +export type ProviderType = 'PROVIDER_TYPE_UNSPECIFIED' | 'PROVIDER_TYPE_BUILTIN' | 'PROVIDER_TYPE_CUSTOM'; export interface SSOConfiguration { /** @@ -290,7 +303,10 @@ export interface SSOConfiguration { emailDomains?: Array; } -export type SSOConfigurationState = 'SSO_CONFIGURATION_STATE_UNSPECIFIED' | 'SSO_CONFIGURATION_STATE_INACTIVE' | 'SSO_CONFIGURATION_STATE_ACTIVE' +export type SSOConfigurationState = + | 'SSO_CONFIGURATION_STATE_UNSPECIFIED' + | 'SSO_CONFIGURATION_STATE_INACTIVE' + | 'SSO_CONFIGURATION_STATE_ACTIVE'; export interface SSOConfigurationCreateResponse { /** @@ -306,9 +322,9 @@ export interface SSOConfigurationRetrieveResponse { ssoConfiguration: SSOConfiguration; } -export type SSOConfigurationUpdateResponse = unknown +export type SSOConfigurationUpdateResponse = unknown; -export type SSOConfigurationDeleteResponse = unknown +export type SSOConfigurationDeleteResponse = unknown; export interface SSOConfigurationCreateParams { /** @@ -460,6 +476,6 @@ export declare namespace SSOConfigurations { type SSOConfigurationRetrieveParams as SSOConfigurationRetrieveParams, type SSOConfigurationUpdateParams as SSOConfigurationUpdateParams, type SSOConfigurationListParams as SSOConfigurationListParams, - type SSOConfigurationDeleteParams as SSOConfigurationDeleteParams + type SSOConfigurationDeleteParams as SSOConfigurationDeleteParams, }; } diff --git a/src/resources/prebuilds.ts b/src/resources/prebuilds.ts index d5b12191..27212da8 100644 --- a/src/resources/prebuilds.ts +++ b/src/resources/prebuilds.ts @@ -4,7 +4,13 @@ import { APIResource } from '../core/resource'; import * as PrebuildsAPI from './prebuilds'; import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; -import { PagePromise, PrebuildsPage, type PrebuildsPageParams, WarmPoolsPage, type WarmPoolsPageParams } from '../core/pagination'; +import { + PagePromise, + PrebuildsPage, + type PrebuildsPageParams, + WarmPoolsPage, + type WarmPoolsPageParams, +} from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; /** @@ -100,8 +106,13 @@ export class Prebuilds extends APIResource { * ``` */ list(params: PrebuildListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.PrebuildService/ListPrebuilds', PrebuildsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.PrebuildService/ListPrebuilds', PrebuildsPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -191,7 +202,10 @@ export class Prebuilds extends APIResource { * }); * ``` */ - createLogsToken(body: PrebuildCreateLogsTokenParams, options?: RequestOptions): APIPromise { + createLogsToken( + body: PrebuildCreateLogsTokenParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.PrebuildService/CreatePrebuildLogsToken', { body, ...options }); } @@ -230,7 +244,10 @@ export class Prebuilds extends APIResource { * }); * ``` */ - createWarmPool(body: PrebuildCreateWarmPoolParams, options?: RequestOptions): APIPromise { + createWarmPool( + body: PrebuildCreateWarmPoolParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.PrebuildService/CreateWarmPool', { body, ...options }); } @@ -293,9 +310,17 @@ export class Prebuilds extends APIResource { * } * ``` */ - listWarmPools(params: PrebuildListWarmPoolsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.PrebuildService/ListWarmPools', WarmPoolsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listWarmPools( + params: PrebuildListWarmPoolsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.PrebuildService/ListWarmPools', WarmPoolsPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -322,7 +347,10 @@ export class Prebuilds extends APIResource { * }); * ``` */ - retrieveWarmPool(body: PrebuildRetrieveWarmPoolParams, options?: RequestOptions): APIPromise { + retrieveWarmPool( + body: PrebuildRetrieveWarmPoolParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.PrebuildService/GetWarmPool', { body, ...options }); } @@ -348,14 +376,17 @@ export class Prebuilds extends APIResource { * }); * ``` */ - updateWarmPool(body: PrebuildUpdateWarmPoolParams, options?: RequestOptions): APIPromise { + updateWarmPool( + body: PrebuildUpdateWarmPoolParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.PrebuildService/UpdateWarmPool', { body, ...options }); } } -export type PrebuildsPrebuildsPage = PrebuildsPage +export type PrebuildsPrebuildsPage = PrebuildsPage; -export type WarmPoolsWarmPoolsPage = WarmPoolsPage +export type WarmPoolsWarmPoolsPage = WarmPoolsPage; /** * Prebuild represents a prebuild for a project that creates a snapshot for faster @@ -439,7 +470,19 @@ export interface PrebuildMetadata { /** * PrebuildPhase represents the lifecycle phase of a prebuild */ -export type PrebuildPhase = 'PREBUILD_PHASE_UNSPECIFIED' | 'PREBUILD_PHASE_PENDING' | 'PREBUILD_PHASE_STARTING' | 'PREBUILD_PHASE_RUNNING' | 'PREBUILD_PHASE_STOPPING' | 'PREBUILD_PHASE_SNAPSHOTTING' | 'PREBUILD_PHASE_COMPLETED' | 'PREBUILD_PHASE_FAILED' | 'PREBUILD_PHASE_CANCELLING' | 'PREBUILD_PHASE_CANCELLED' | 'PREBUILD_PHASE_DELETING' | 'PREBUILD_PHASE_DELETED' +export type PrebuildPhase = + | 'PREBUILD_PHASE_UNSPECIFIED' + | 'PREBUILD_PHASE_PENDING' + | 'PREBUILD_PHASE_STARTING' + | 'PREBUILD_PHASE_RUNNING' + | 'PREBUILD_PHASE_STOPPING' + | 'PREBUILD_PHASE_SNAPSHOTTING' + | 'PREBUILD_PHASE_COMPLETED' + | 'PREBUILD_PHASE_FAILED' + | 'PREBUILD_PHASE_CANCELLING' + | 'PREBUILD_PHASE_CANCELLED' + | 'PREBUILD_PHASE_DELETING' + | 'PREBUILD_PHASE_DELETED'; /** * PrebuildSpec contains the configuration used to create a prebuild @@ -528,7 +571,10 @@ export interface PrebuildStatus { /** * PrebuildTrigger indicates how the prebuild was triggered */ -export type PrebuildTrigger = 'PREBUILD_TRIGGER_UNSPECIFIED' | 'PREBUILD_TRIGGER_MANUAL' | 'PREBUILD_TRIGGER_SCHEDULED' +export type PrebuildTrigger = + | 'PREBUILD_TRIGGER_UNSPECIFIED' + | 'PREBUILD_TRIGGER_MANUAL' + | 'PREBUILD_TRIGGER_SCHEDULED'; /** * WarmPool maintains pre-created environment instances from a prebuild snapshot @@ -596,7 +642,13 @@ export interface WarmPoolMetadata { /** * WarmPoolPhase represents the lifecycle phase of a warm pool */ -export type WarmPoolPhase = 'WARM_POOL_PHASE_UNSPECIFIED' | 'WARM_POOL_PHASE_PENDING' | 'WARM_POOL_PHASE_READY' | 'WARM_POOL_PHASE_DEGRADED' | 'WARM_POOL_PHASE_DELETING' | 'WARM_POOL_PHASE_DELETED' +export type WarmPoolPhase = + | 'WARM_POOL_PHASE_UNSPECIFIED' + | 'WARM_POOL_PHASE_PENDING' + | 'WARM_POOL_PHASE_READY' + | 'WARM_POOL_PHASE_DEGRADED' + | 'WARM_POOL_PHASE_DELETING' + | 'WARM_POOL_PHASE_DELETED'; /** * WarmPoolSpec contains the desired configuration for a warm pool @@ -702,7 +754,7 @@ export interface PrebuildRetrieveResponse { prebuild: Prebuild; } -export type PrebuildDeleteResponse = unknown +export type PrebuildDeleteResponse = unknown; export interface PrebuildCancelResponse { /** @@ -728,7 +780,7 @@ export interface PrebuildCreateWarmPoolResponse { warmPool: WarmPool; } -export type PrebuildDeleteWarmPoolResponse = unknown +export type PrebuildDeleteWarmPoolResponse = unknown; export interface PrebuildRetrieveWarmPoolResponse { /** @@ -1010,6 +1062,6 @@ export declare namespace Prebuilds { type PrebuildDeleteWarmPoolParams as PrebuildDeleteWarmPoolParams, type PrebuildListWarmPoolsParams as PrebuildListWarmPoolsParams, type PrebuildRetrieveWarmPoolParams as PrebuildRetrieveWarmPoolParams, - type PrebuildUpdateWarmPoolParams as PrebuildUpdateWarmPoolParams + type PrebuildUpdateWarmPoolParams as PrebuildUpdateWarmPoolParams, }; } diff --git a/src/resources/projects/environment-clases.ts b/src/resources/projects/environment-clases.ts index 976a3d99..728168b8 100644 --- a/src/resources/projects/environment-clases.ts +++ b/src/resources/projects/environment-clases.ts @@ -4,7 +4,11 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import { ProjectEnvironmentClassesProjectEnvironmentClassesPage } from '../shared'; import { APIPromise } from '../../core/api-promise'; -import { PagePromise, ProjectEnvironmentClassesPage, type ProjectEnvironmentClassesPageParams } from '../../core/pagination'; +import { + PagePromise, + ProjectEnvironmentClassesPage, + type ProjectEnvironmentClassesPageParams, +} from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class EnvironmentClases extends APIResource { @@ -47,7 +51,10 @@ export class EnvironmentClases extends APIResource { * ``` */ update(body: EnvironmentClaseUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.ProjectService/UpdateProjectEnvironmentClasses', { body, ...options }); + return this._client.post('/gitpod.v1.ProjectService/UpdateProjectEnvironmentClasses', { + body, + ...options, + }); } /** @@ -82,13 +89,20 @@ export class EnvironmentClases extends APIResource { * } * ``` */ - list(params: EnvironmentClaseListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.ProjectService/ListProjectEnvironmentClasses', ProjectEnvironmentClassesPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: EnvironmentClaseListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.ProjectService/ListProjectEnvironmentClasses', + ProjectEnvironmentClassesPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } } -export type EnvironmentClaseUpdateResponse = unknown +export type EnvironmentClaseUpdateResponse = unknown; export interface EnvironmentClaseUpdateParams { projectEnvironmentClasses?: Array; @@ -135,8 +149,8 @@ export declare namespace EnvironmentClases { export { type EnvironmentClaseUpdateResponse as EnvironmentClaseUpdateResponse, type EnvironmentClaseUpdateParams as EnvironmentClaseUpdateParams, - type EnvironmentClaseListParams as EnvironmentClaseListParams + type EnvironmentClaseListParams as EnvironmentClaseListParams, }; } -export { type ProjectEnvironmentClassesProjectEnvironmentClassesPage } +export { type ProjectEnvironmentClassesProjectEnvironmentClassesPage }; diff --git a/src/resources/projects/index.ts b/src/resources/projects/index.ts index 275a0b54..e26d15ed 100644 --- a/src/resources/projects/index.ts +++ b/src/resources/projects/index.ts @@ -1,5 +1,48 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { EnvironmentClases, type EnvironmentClaseUpdateResponse, type EnvironmentClaseUpdateParams, type EnvironmentClaseListParams } from './environment-clases';; -export { Policies, type ProjectPolicy, type ProjectRole, type PolicyCreateResponse, type PolicyUpdateResponse, type PolicyDeleteResponse, type PolicyCreateParams, type PolicyUpdateParams, type PolicyListParams, type PolicyDeleteParams, type ProjectPoliciesPoliciesPage } from './policies';; -export { Projects, type EnvironmentInitializer, type Project, type ProjectMetadata, type ProjectPhase, type ProjectPrebuildConfiguration, type RecommendedEditors, type ProjectCreateResponse, type ProjectRetrieveResponse, type ProjectUpdateResponse, type ProjectDeleteResponse, type ProjectBulkCreateResponse, type ProjectBulkDeleteResponse, type ProjectBulkUpdateResponse, type ProjectCreateFromEnvironmentResponse, type ProjectCreateParams, type ProjectRetrieveParams, type ProjectUpdateParams, type ProjectListParams, type ProjectDeleteParams, type ProjectBulkCreateParams, type ProjectBulkDeleteParams, type ProjectBulkUpdateParams, type ProjectCreateFromEnvironmentParams, type ProjectsProjectsPage } from './projects';; +export { + EnvironmentClases, + type EnvironmentClaseUpdateResponse, + type EnvironmentClaseUpdateParams, + type EnvironmentClaseListParams, +} from './environment-clases'; +export { + Policies, + type ProjectPolicy, + type ProjectRole, + type PolicyCreateResponse, + type PolicyUpdateResponse, + type PolicyDeleteResponse, + type PolicyCreateParams, + type PolicyUpdateParams, + type PolicyListParams, + type PolicyDeleteParams, + type ProjectPoliciesPoliciesPage, +} from './policies'; +export { + Projects, + type EnvironmentInitializer, + type Project, + type ProjectMetadata, + type ProjectPhase, + type ProjectPrebuildConfiguration, + type RecommendedEditors, + type ProjectCreateResponse, + type ProjectRetrieveResponse, + type ProjectUpdateResponse, + type ProjectDeleteResponse, + type ProjectBulkCreateResponse, + type ProjectBulkDeleteResponse, + type ProjectBulkUpdateResponse, + type ProjectCreateFromEnvironmentResponse, + type ProjectCreateParams, + type ProjectRetrieveParams, + type ProjectUpdateParams, + type ProjectListParams, + type ProjectDeleteParams, + type ProjectBulkCreateParams, + type ProjectBulkDeleteParams, + type ProjectBulkUpdateParams, + type ProjectCreateFromEnvironmentParams, + type ProjectsProjectsPage, +} from './projects'; diff --git a/src/resources/projects/policies.ts b/src/resources/projects/policies.ts index 3fef7471..3676967d 100644 --- a/src/resources/projects/policies.ts +++ b/src/resources/projects/policies.ts @@ -108,9 +108,16 @@ export class Policies extends APIResource { * } * ``` */ - list(params: PolicyListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.ProjectService/ListProjectPolicies', PoliciesPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: PolicyListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.ProjectService/ListProjectPolicies', + PoliciesPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -146,7 +153,7 @@ export class Policies extends APIResource { } } -export type ProjectPoliciesPoliciesPage = PoliciesPage +export type ProjectPoliciesPoliciesPage = PoliciesPage; export interface ProjectPolicy { groupId?: string; @@ -157,7 +164,11 @@ export interface ProjectPolicy { role?: ProjectRole; } -export type ProjectRole = 'PROJECT_ROLE_UNSPECIFIED' | 'PROJECT_ROLE_ADMIN' | 'PROJECT_ROLE_USER' | 'PROJECT_ROLE_EDITOR' +export type ProjectRole = + | 'PROJECT_ROLE_UNSPECIFIED' + | 'PROJECT_ROLE_ADMIN' + | 'PROJECT_ROLE_USER' + | 'PROJECT_ROLE_EDITOR'; export interface PolicyCreateResponse { policy?: ProjectPolicy; @@ -167,7 +178,7 @@ export interface PolicyUpdateResponse { policy?: ProjectPolicy; } -export type PolicyDeleteResponse = unknown +export type PolicyDeleteResponse = unknown; export interface PolicyCreateParams { /** @@ -252,6 +263,6 @@ export declare namespace Policies { type PolicyCreateParams as PolicyCreateParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyListParams as PolicyListParams, - type PolicyDeleteParams as PolicyDeleteParams + type PolicyDeleteParams as PolicyDeleteParams, }; } diff --git a/src/resources/projects/projects.ts b/src/resources/projects/projects.ts index 9845f84b..e0c90c51 100644 --- a/src/resources/projects/projects.ts +++ b/src/resources/projects/projects.ts @@ -4,16 +4,35 @@ import { APIResource } from '../../core/resource'; import * as ProjectsAPI from './projects'; import * as Shared from '../shared'; import * as EnvironmentClasesAPI from './environment-clases'; -import { EnvironmentClaseListParams, EnvironmentClaseUpdateParams, EnvironmentClaseUpdateResponse, EnvironmentClases } from './environment-clases'; +import { + EnvironmentClaseListParams, + EnvironmentClaseUpdateParams, + EnvironmentClaseUpdateResponse, + EnvironmentClases, +} from './environment-clases'; import * as PoliciesAPI from './policies'; -import { Policies, PolicyCreateParams, PolicyCreateResponse, PolicyDeleteParams, PolicyDeleteResponse, PolicyListParams, PolicyUpdateParams, PolicyUpdateResponse, ProjectPoliciesPoliciesPage, ProjectPolicy, ProjectRole } from './policies'; +import { + Policies, + PolicyCreateParams, + PolicyCreateResponse, + PolicyDeleteParams, + PolicyDeleteResponse, + PolicyListParams, + PolicyUpdateParams, + PolicyUpdateResponse, + ProjectPoliciesPoliciesPage, + ProjectPolicy, + ProjectRole, +} from './policies'; import * as RunnersAPI from '../runners/runners'; import { APIPromise } from '../../core/api-promise'; import { PagePromise, ProjectsPage, type ProjectsPageParams } from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Projects extends APIResource { - environmentClases: EnvironmentClasesAPI.EnvironmentClases = new EnvironmentClasesAPI.EnvironmentClases(this._client); + environmentClases: EnvironmentClasesAPI.EnvironmentClases = new EnvironmentClasesAPI.EnvironmentClases( + this._client, + ); policies: PoliciesAPI.Policies = new PoliciesAPI.Policies(this._client); /** @@ -188,8 +207,13 @@ export class Projects extends APIResource { * ``` */ list(params: ProjectListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.ProjectService/ListProjects', ProjectsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.ProjectService/ListProjects', ProjectsPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -400,12 +424,15 @@ export class Projects extends APIResource { * }); * ``` */ - createFromEnvironment(body: ProjectCreateFromEnvironmentParams, options?: RequestOptions): APIPromise { + createFromEnvironment( + body: ProjectCreateFromEnvironmentParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.ProjectService/CreateProjectFromEnvironment', { body, ...options }); } } -export type ProjectsProjectsPage = ProjectsPage +export type ProjectsProjectsPage = ProjectsPage; /** * EnvironmentInitializer specifies how an environment is to be initialized @@ -448,7 +475,13 @@ export namespace EnvironmentInitializer { /** * the target mode determines what gets checked out */ - targetMode?: 'CLONE_TARGET_MODE_UNSPECIFIED' | 'CLONE_TARGET_MODE_REMOTE_HEAD' | 'CLONE_TARGET_MODE_REMOTE_COMMIT' | 'CLONE_TARGET_MODE_REMOTE_BRANCH' | 'CLONE_TARGET_MODE_LOCAL_BRANCH' | 'CLONE_TARGET_MODE_REMOTE_TAG'; + targetMode?: + | 'CLONE_TARGET_MODE_UNSPECIFIED' + | 'CLONE_TARGET_MODE_REMOTE_HEAD' + | 'CLONE_TARGET_MODE_REMOTE_COMMIT' + | 'CLONE_TARGET_MODE_REMOTE_BRANCH' + | 'CLONE_TARGET_MODE_LOCAL_BRANCH' + | 'CLONE_TARGET_MODE_REMOTE_TAG'; /** * upstream_Remote_uri is the fork upstream of a repository @@ -734,7 +767,7 @@ export interface ProjectMetadata { updatedAt?: string; } -export type ProjectPhase = 'PROJECT_PHASE_UNSPECIFIED' | 'PROJECT_PHASE_ACTIVE' | 'PROJECT_PHASE_DELETED' +export type ProjectPhase = 'PROJECT_PHASE_UNSPECIFIED' | 'PROJECT_PHASE_ACTIVE' | 'PROJECT_PHASE_DELETED'; /** * ProjectPrebuildConfiguration defines how prebuilds are created for a project. @@ -845,7 +878,7 @@ export interface ProjectUpdateResponse { project?: Project; } -export type ProjectDeleteResponse = unknown +export type ProjectDeleteResponse = unknown; export interface ProjectBulkCreateResponse { /** @@ -1270,14 +1303,14 @@ export declare namespace Projects { type ProjectBulkCreateParams as ProjectBulkCreateParams, type ProjectBulkDeleteParams as ProjectBulkDeleteParams, type ProjectBulkUpdateParams as ProjectBulkUpdateParams, - type ProjectCreateFromEnvironmentParams as ProjectCreateFromEnvironmentParams + type ProjectCreateFromEnvironmentParams as ProjectCreateFromEnvironmentParams, }; export { EnvironmentClases as EnvironmentClases, type EnvironmentClaseUpdateResponse as EnvironmentClaseUpdateResponse, type EnvironmentClaseUpdateParams as EnvironmentClaseUpdateParams, - type EnvironmentClaseListParams as EnvironmentClaseListParams + type EnvironmentClaseListParams as EnvironmentClaseListParams, }; export { @@ -1291,6 +1324,6 @@ export declare namespace Projects { type PolicyCreateParams as PolicyCreateParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyListParams as PolicyListParams, - type PolicyDeleteParams as PolicyDeleteParams + type PolicyDeleteParams as PolicyDeleteParams, }; } diff --git a/src/resources/runners/configurations/configurations.ts b/src/resources/runners/configurations/configurations.ts index dae35e81..4db5ee0c 100644 --- a/src/resources/runners/configurations/configurations.ts +++ b/src/resources/runners/configurations/configurations.ts @@ -3,19 +3,59 @@ import { APIResource } from '../../../core/resource'; import * as Shared from '../../shared'; import * as EnvironmentClassesAPI from './environment-classes'; -import { EnvironmentClassCreateParams, EnvironmentClassCreateResponse, EnvironmentClassListParams, EnvironmentClassRetrieveParams, EnvironmentClassRetrieveResponse, EnvironmentClassUpdateParams, EnvironmentClassUpdateResponse, EnvironmentClasses } from './environment-classes'; +import { + EnvironmentClassCreateParams, + EnvironmentClassCreateResponse, + EnvironmentClassListParams, + EnvironmentClassRetrieveParams, + EnvironmentClassRetrieveResponse, + EnvironmentClassUpdateParams, + EnvironmentClassUpdateResponse, + EnvironmentClasses, +} from './environment-classes'; import * as HostAuthenticationTokensAPI from './host-authentication-tokens'; -import { HostAuthenticationToken, HostAuthenticationTokenCreateParams, HostAuthenticationTokenCreateResponse, HostAuthenticationTokenDeleteParams, HostAuthenticationTokenDeleteResponse, HostAuthenticationTokenListParams, HostAuthenticationTokenRetrieveParams, HostAuthenticationTokenRetrieveResponse, HostAuthenticationTokenSource, HostAuthenticationTokenUpdateParams, HostAuthenticationTokenUpdateResponse, HostAuthenticationTokens, HostAuthenticationTokensTokensPage } from './host-authentication-tokens'; +import { + HostAuthenticationToken, + HostAuthenticationTokenCreateParams, + HostAuthenticationTokenCreateResponse, + HostAuthenticationTokenDeleteParams, + HostAuthenticationTokenDeleteResponse, + HostAuthenticationTokenListParams, + HostAuthenticationTokenRetrieveParams, + HostAuthenticationTokenRetrieveResponse, + HostAuthenticationTokenSource, + HostAuthenticationTokenUpdateParams, + HostAuthenticationTokenUpdateResponse, + HostAuthenticationTokens, + HostAuthenticationTokensTokensPage, +} from './host-authentication-tokens'; import * as SchemaAPI from './schema'; import { RunnerConfigurationSchema, Schema, SchemaRetrieveParams, SchemaRetrieveResponse } from './schema'; import * as ScmIntegrationsAPI from './scm-integrations'; -import { ScmIntegration as ScmIntegrationsAPIScmIntegration, ScmIntegrationCreateParams, ScmIntegrationCreateResponse, ScmIntegrationDeleteParams, ScmIntegrationDeleteResponse, ScmIntegrationListParams, ScmIntegrationOAuthConfig, ScmIntegrationRetrieveParams, ScmIntegrationRetrieveResponse, ScmIntegrationUpdateParams, ScmIntegrationUpdateResponse, ScmIntegrations, ScmIntegrationsIntegrationsPage } from './scm-integrations'; +import { + ScmIntegration as ScmIntegrationsAPIScmIntegration, + ScmIntegrationCreateParams, + ScmIntegrationCreateResponse, + ScmIntegrationDeleteParams, + ScmIntegrationDeleteResponse, + ScmIntegrationListParams, + ScmIntegrationOAuthConfig, + ScmIntegrationRetrieveParams, + ScmIntegrationRetrieveResponse, + ScmIntegrationUpdateParams, + ScmIntegrationUpdateResponse, + ScmIntegrations, + ScmIntegrationsIntegrationsPage, +} from './scm-integrations'; import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; export class Configurations extends APIResource { - environmentClasses: EnvironmentClassesAPI.EnvironmentClasses = new EnvironmentClassesAPI.EnvironmentClasses(this._client); - hostAuthenticationTokens: HostAuthenticationTokensAPI.HostAuthenticationTokens = new HostAuthenticationTokensAPI.HostAuthenticationTokens(this._client); + environmentClasses: EnvironmentClassesAPI.EnvironmentClasses = new EnvironmentClassesAPI.EnvironmentClasses( + this._client, + ); + hostAuthenticationTokens: HostAuthenticationTokensAPI.HostAuthenticationTokens = + new HostAuthenticationTokensAPI.HostAuthenticationTokens(this._client); schema: SchemaAPI.Schema = new SchemaAPI.Schema(this._client); scmIntegrations: ScmIntegrationsAPI.ScmIntegrations = new ScmIntegrationsAPI.ScmIntegrations(this._client); @@ -59,8 +99,14 @@ export class Configurations extends APIResource { * }); * ``` */ - validate(body: ConfigurationValidateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/ValidateRunnerConfiguration', { body, ...options }); + validate( + body: ConfigurationValidateParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/ValidateRunnerConfiguration', { + body, + ...options, + }); } } @@ -171,7 +217,7 @@ export declare namespace Configurations { type FieldValidationError as FieldValidationError, type ScmIntegrationValidationResult as ScmIntegrationValidationResult, type ConfigurationValidateResponse as ConfigurationValidateResponse, - type ConfigurationValidateParams as ConfigurationValidateParams + type ConfigurationValidateParams as ConfigurationValidateParams, }; export { @@ -182,7 +228,7 @@ export declare namespace Configurations { type EnvironmentClassCreateParams as EnvironmentClassCreateParams, type EnvironmentClassRetrieveParams as EnvironmentClassRetrieveParams, type EnvironmentClassUpdateParams as EnvironmentClassUpdateParams, - type EnvironmentClassListParams as EnvironmentClassListParams + type EnvironmentClassListParams as EnvironmentClassListParams, }; export { @@ -198,14 +244,14 @@ export declare namespace Configurations { type HostAuthenticationTokenRetrieveParams as HostAuthenticationTokenRetrieveParams, type HostAuthenticationTokenUpdateParams as HostAuthenticationTokenUpdateParams, type HostAuthenticationTokenListParams as HostAuthenticationTokenListParams, - type HostAuthenticationTokenDeleteParams as HostAuthenticationTokenDeleteParams + type HostAuthenticationTokenDeleteParams as HostAuthenticationTokenDeleteParams, }; export { Schema as Schema, type RunnerConfigurationSchema as RunnerConfigurationSchema, type SchemaRetrieveResponse as SchemaRetrieveResponse, - type SchemaRetrieveParams as SchemaRetrieveParams + type SchemaRetrieveParams as SchemaRetrieveParams, }; export { @@ -221,6 +267,6 @@ export declare namespace Configurations { type ScmIntegrationRetrieveParams as ScmIntegrationRetrieveParams, type ScmIntegrationUpdateParams as ScmIntegrationUpdateParams, type ScmIntegrationListParams as ScmIntegrationListParams, - type ScmIntegrationDeleteParams as ScmIntegrationDeleteParams + type ScmIntegrationDeleteParams as ScmIntegrationDeleteParams, }; } diff --git a/src/resources/runners/configurations/environment-classes.ts b/src/resources/runners/configurations/environment-classes.ts index 4983bb85..2de936a3 100644 --- a/src/resources/runners/configurations/environment-classes.ts +++ b/src/resources/runners/configurations/environment-classes.ts @@ -5,7 +5,11 @@ import * as Shared from '../../shared'; import { EnvironmentClassesEnvironmentClassesPage } from '../../shared'; import * as RunnersAPI from '../runners'; import { APIPromise } from '../../../core/api-promise'; -import { EnvironmentClassesPage, type EnvironmentClassesPageParams, PagePromise } from '../../../core/pagination'; +import { + EnvironmentClassesPage, + type EnvironmentClassesPageParams, + PagePromise, +} from '../../../core/pagination'; import { RequestOptions } from '../../../internal/request-options'; export class EnvironmentClasses extends APIResource { @@ -51,8 +55,14 @@ export class EnvironmentClasses extends APIResource { * ); * ``` */ - create(body: EnvironmentClassCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateEnvironmentClass', { body, ...options }); + create( + body: EnvironmentClassCreateParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateEnvironmentClass', { + body, + ...options, + }); } /** @@ -85,8 +95,14 @@ export class EnvironmentClasses extends APIResource { * ); * ``` */ - retrieve(body: EnvironmentClassRetrieveParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/GetEnvironmentClass', { body, ...options }); + retrieve( + body: EnvironmentClassRetrieveParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/GetEnvironmentClass', { + body, + ...options, + }); } /** @@ -126,7 +142,10 @@ export class EnvironmentClasses extends APIResource { * ``` */ update(body: EnvironmentClassUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateEnvironmentClass', { body, ...options }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateEnvironmentClass', { + body, + ...options, + }); } /** @@ -175,9 +194,16 @@ export class EnvironmentClasses extends APIResource { * } * ``` */ - list(params: EnvironmentClassListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.RunnerConfigurationService/ListEnvironmentClasses', EnvironmentClassesPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: EnvironmentClassListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.RunnerConfigurationService/ListEnvironmentClasses', + EnvironmentClassesPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } } @@ -189,7 +215,7 @@ export interface EnvironmentClassRetrieveResponse { environmentClass?: Shared.EnvironmentClass; } -export type EnvironmentClassUpdateResponse = unknown +export type EnvironmentClassUpdateResponse = unknown; export interface EnvironmentClassCreateParams { configuration?: Array; @@ -288,8 +314,8 @@ export declare namespace EnvironmentClasses { type EnvironmentClassCreateParams as EnvironmentClassCreateParams, type EnvironmentClassRetrieveParams as EnvironmentClassRetrieveParams, type EnvironmentClassUpdateParams as EnvironmentClassUpdateParams, - type EnvironmentClassListParams as EnvironmentClassListParams + type EnvironmentClassListParams as EnvironmentClassListParams, }; } -export { type EnvironmentClassesEnvironmentClassesPage } +export { type EnvironmentClassesEnvironmentClassesPage }; diff --git a/src/resources/runners/configurations/host-authentication-tokens.ts b/src/resources/runners/configurations/host-authentication-tokens.ts index 3524251c..3d4715f5 100644 --- a/src/resources/runners/configurations/host-authentication-tokens.ts +++ b/src/resources/runners/configurations/host-authentication-tokens.ts @@ -48,8 +48,14 @@ export class HostAuthenticationTokens extends APIResource { * ); * ``` */ - create(body: HostAuthenticationTokenCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateHostAuthenticationToken', { body, ...options }); + create( + body: HostAuthenticationTokenCreateParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateHostAuthenticationToken', { + body, + ...options, + }); } /** @@ -79,8 +85,14 @@ export class HostAuthenticationTokens extends APIResource { * ); * ``` */ - retrieve(body: HostAuthenticationTokenRetrieveParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/GetHostAuthenticationToken', { body, ...options }); + retrieve( + body: HostAuthenticationTokenRetrieveParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/GetHostAuthenticationToken', { + body, + ...options, + }); } /** @@ -119,7 +131,10 @@ export class HostAuthenticationTokens extends APIResource { * ``` */ update(body: HostAuthenticationTokenUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateHostAuthenticationToken', { body, ...options }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateHostAuthenticationToken', { + body, + ...options, + }); } /** @@ -168,9 +183,16 @@ export class HostAuthenticationTokens extends APIResource { * } * ``` */ - list(params: HostAuthenticationTokenListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.RunnerConfigurationService/ListHostAuthenticationTokens', TokensPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: HostAuthenticationTokenListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.RunnerConfigurationService/ListHostAuthenticationTokens', + TokensPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -201,11 +223,14 @@ export class HostAuthenticationTokens extends APIResource { * ``` */ delete(body: HostAuthenticationTokenDeleteParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/DeleteHostAuthenticationToken', { body, ...options }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/DeleteHostAuthenticationToken', { + body, + ...options, + }); } } -export type HostAuthenticationTokensTokensPage = TokensPage +export type HostAuthenticationTokensTokensPage = TokensPage; export interface HostAuthenticationToken { id: string; @@ -335,7 +360,10 @@ export interface HostAuthenticationToken { userId?: string; } -export type HostAuthenticationTokenSource = 'HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED' | 'HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH' | 'HOST_AUTHENTICATION_TOKEN_SOURCE_PAT' +export type HostAuthenticationTokenSource = + | 'HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED' + | 'HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH' + | 'HOST_AUTHENTICATION_TOKEN_SOURCE_PAT'; export interface HostAuthenticationTokenCreateResponse { token: HostAuthenticationToken; @@ -345,9 +373,9 @@ export interface HostAuthenticationTokenRetrieveResponse { token: HostAuthenticationToken; } -export type HostAuthenticationTokenUpdateResponse = unknown +export type HostAuthenticationTokenUpdateResponse = unknown; -export type HostAuthenticationTokenDeleteResponse = unknown +export type HostAuthenticationTokenDeleteResponse = unknown; export interface HostAuthenticationTokenCreateParams { /** @@ -641,6 +669,6 @@ export declare namespace HostAuthenticationTokens { type HostAuthenticationTokenRetrieveParams as HostAuthenticationTokenRetrieveParams, type HostAuthenticationTokenUpdateParams as HostAuthenticationTokenUpdateParams, type HostAuthenticationTokenListParams as HostAuthenticationTokenListParams, - type HostAuthenticationTokenDeleteParams as HostAuthenticationTokenDeleteParams + type HostAuthenticationTokenDeleteParams as HostAuthenticationTokenDeleteParams, }; } diff --git a/src/resources/runners/configurations/index.ts b/src/resources/runners/configurations/index.ts index 64e31d2f..4a0a2137 100644 --- a/src/resources/runners/configurations/index.ts +++ b/src/resources/runners/configurations/index.ts @@ -1,7 +1,56 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Configurations, type EnvironmentClassValidationResult, type FieldValidationError, type ScmIntegrationValidationResult, type ConfigurationValidateResponse, type ConfigurationValidateParams } from './configurations';; -export { EnvironmentClasses, type EnvironmentClassCreateResponse, type EnvironmentClassRetrieveResponse, type EnvironmentClassUpdateResponse, type EnvironmentClassCreateParams, type EnvironmentClassRetrieveParams, type EnvironmentClassUpdateParams, type EnvironmentClassListParams } from './environment-classes';; -export { HostAuthenticationTokens, type HostAuthenticationToken, type HostAuthenticationTokenSource, type HostAuthenticationTokenCreateResponse, type HostAuthenticationTokenRetrieveResponse, type HostAuthenticationTokenUpdateResponse, type HostAuthenticationTokenDeleteResponse, type HostAuthenticationTokenCreateParams, type HostAuthenticationTokenRetrieveParams, type HostAuthenticationTokenUpdateParams, type HostAuthenticationTokenListParams, type HostAuthenticationTokenDeleteParams, type HostAuthenticationTokensTokensPage } from './host-authentication-tokens';; -export { Schema, type RunnerConfigurationSchema, type SchemaRetrieveResponse, type SchemaRetrieveParams } from './schema';; -export { ScmIntegrations, type ScmIntegration, type ScmIntegrationOAuthConfig, type ScmIntegrationCreateResponse, type ScmIntegrationRetrieveResponse, type ScmIntegrationUpdateResponse, type ScmIntegrationDeleteResponse, type ScmIntegrationCreateParams, type ScmIntegrationRetrieveParams, type ScmIntegrationUpdateParams, type ScmIntegrationListParams, type ScmIntegrationDeleteParams, type ScmIntegrationsIntegrationsPage } from './scm-integrations';; +export { + Configurations, + type EnvironmentClassValidationResult, + type FieldValidationError, + type ScmIntegrationValidationResult, + type ConfigurationValidateResponse, + type ConfigurationValidateParams, +} from './configurations'; +export { + EnvironmentClasses, + type EnvironmentClassCreateResponse, + type EnvironmentClassRetrieveResponse, + type EnvironmentClassUpdateResponse, + type EnvironmentClassCreateParams, + type EnvironmentClassRetrieveParams, + type EnvironmentClassUpdateParams, + type EnvironmentClassListParams, +} from './environment-classes'; +export { + HostAuthenticationTokens, + type HostAuthenticationToken, + type HostAuthenticationTokenSource, + type HostAuthenticationTokenCreateResponse, + type HostAuthenticationTokenRetrieveResponse, + type HostAuthenticationTokenUpdateResponse, + type HostAuthenticationTokenDeleteResponse, + type HostAuthenticationTokenCreateParams, + type HostAuthenticationTokenRetrieveParams, + type HostAuthenticationTokenUpdateParams, + type HostAuthenticationTokenListParams, + type HostAuthenticationTokenDeleteParams, + type HostAuthenticationTokensTokensPage, +} from './host-authentication-tokens'; +export { + Schema, + type RunnerConfigurationSchema, + type SchemaRetrieveResponse, + type SchemaRetrieveParams, +} from './schema'; +export { + ScmIntegrations, + type ScmIntegration, + type ScmIntegrationOAuthConfig, + type ScmIntegrationCreateResponse, + type ScmIntegrationRetrieveResponse, + type ScmIntegrationUpdateResponse, + type ScmIntegrationDeleteResponse, + type ScmIntegrationCreateParams, + type ScmIntegrationRetrieveParams, + type ScmIntegrationUpdateParams, + type ScmIntegrationListParams, + type ScmIntegrationDeleteParams, + type ScmIntegrationsIntegrationsPage, +} from './scm-integrations'; diff --git a/src/resources/runners/configurations/schema.ts b/src/resources/runners/configurations/schema.ts index 71e15e67..fd110fe5 100644 --- a/src/resources/runners/configurations/schema.ts +++ b/src/resources/runners/configurations/schema.ts @@ -33,7 +33,10 @@ export class Schema extends APIResource { * ``` */ retrieve(body: SchemaRetrieveParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/GetRunnerConfigurationSchema', { body, ...options }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/GetRunnerConfigurationSchema', { + body, + ...options, + }); } } @@ -259,6 +262,6 @@ export declare namespace Schema { export { type RunnerConfigurationSchema as RunnerConfigurationSchema, type SchemaRetrieveResponse as SchemaRetrieveResponse, - type SchemaRetrieveParams as SchemaRetrieveParams + type SchemaRetrieveParams as SchemaRetrieveParams, }; } diff --git a/src/resources/runners/configurations/scm-integrations.ts b/src/resources/runners/configurations/scm-integrations.ts index eebb9d4a..28daf0a7 100644 --- a/src/resources/runners/configurations/scm-integrations.ts +++ b/src/resources/runners/configurations/scm-integrations.ts @@ -43,8 +43,14 @@ export class ScmIntegrations extends APIResource { * ); * ``` */ - create(body: ScmIntegrationCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateSCMIntegration', { body, ...options }); + create( + body: ScmIntegrationCreateParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.RunnerConfigurationService/CreateSCMIntegration', { + body, + ...options, + }); } /** @@ -74,7 +80,10 @@ export class ScmIntegrations extends APIResource { * ); * ``` */ - retrieve(body: ScmIntegrationRetrieveParams, options?: RequestOptions): APIPromise { + retrieve( + body: ScmIntegrationRetrieveParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.RunnerConfigurationService/GetSCMIntegration', { body, ...options }); } @@ -112,7 +121,10 @@ export class ScmIntegrations extends APIResource { * ``` */ update(body: ScmIntegrationUpdateParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateSCMIntegration', { body, ...options }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/UpdateSCMIntegration', { + body, + ...options, + }); } /** @@ -152,9 +164,16 @@ export class ScmIntegrations extends APIResource { * } * ``` */ - list(params: ScmIntegrationListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.RunnerConfigurationService/ListSCMIntegrations', IntegrationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: ScmIntegrationListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.RunnerConfigurationService/ListSCMIntegrations', + IntegrationsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -185,11 +204,14 @@ export class ScmIntegrations extends APIResource { * ``` */ delete(body: ScmIntegrationDeleteParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.RunnerConfigurationService/DeleteSCMIntegration', { body, ...options }); + return this._client.post('/gitpod.v1.RunnerConfigurationService/DeleteSCMIntegration', { + body, + ...options, + }); } } -export type ScmIntegrationsIntegrationsPage = IntegrationsPage +export type ScmIntegrationsIntegrationsPage = IntegrationsPage; export interface ScmIntegration { /** @@ -252,9 +274,9 @@ export interface ScmIntegrationRetrieveResponse { integration?: ScmIntegration; } -export type ScmIntegrationUpdateResponse = unknown +export type ScmIntegrationUpdateResponse = unknown; -export type ScmIntegrationDeleteResponse = unknown +export type ScmIntegrationDeleteResponse = unknown; export interface ScmIntegrationCreateParams { host?: string; @@ -400,6 +422,6 @@ export declare namespace ScmIntegrations { type ScmIntegrationRetrieveParams as ScmIntegrationRetrieveParams, type ScmIntegrationUpdateParams as ScmIntegrationUpdateParams, type ScmIntegrationListParams as ScmIntegrationListParams, - type ScmIntegrationDeleteParams as ScmIntegrationDeleteParams + type ScmIntegrationDeleteParams as ScmIntegrationDeleteParams, }; } diff --git a/src/resources/runners/index.ts b/src/resources/runners/index.ts index 72c36eae..b11c33ee 100644 --- a/src/resources/runners/index.ts +++ b/src/resources/runners/index.ts @@ -1,5 +1,66 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Configurations, type EnvironmentClassValidationResult, type FieldValidationError, type ScmIntegrationValidationResult, type ConfigurationValidateResponse, type ConfigurationValidateParams } from './configurations/index';; -export { Policies, type RunnerPolicy, type RunnerRole, type PolicyCreateResponse, type PolicyUpdateResponse, type PolicyDeleteResponse, type PolicyCreateParams, type PolicyUpdateParams, type PolicyListParams, type PolicyDeleteParams, type RunnerPoliciesPoliciesPage } from './policies';; -export { Runners, type GatewayInfo, type LogLevel, type MetricsConfiguration, type Runner, type RunnerCapability, type RunnerConfiguration, type RunnerKind, type RunnerPhase, type RunnerProvider, type RunnerReleaseChannel, type RunnerSpec, type RunnerStatus, type RunnerVariant, type SearchMode, type UpdateWindow, type RunnerCreateResponse, type RunnerRetrieveResponse, type RunnerUpdateResponse, type RunnerDeleteResponse, type RunnerCheckAuthenticationForHostResponse, type RunnerCheckRepositoryAccessResponse, type RunnerCreateLogsTokenResponse, type RunnerCreateRunnerTokenResponse, type RunnerListScmOrganizationsResponse, type RunnerParseContextURLResponse, type RunnerSearchRepositoriesResponse, type RunnerCreateParams, type RunnerRetrieveParams, type RunnerUpdateParams, type RunnerListParams, type RunnerDeleteParams, type RunnerCheckAuthenticationForHostParams, type RunnerCheckRepositoryAccessParams, type RunnerCreateLogsTokenParams, type RunnerCreateRunnerTokenParams, type RunnerListScmOrganizationsParams, type RunnerParseContextURLParams, type RunnerSearchRepositoriesParams, type RunnersRunnersPage, type RunnerListScmOrganizationsResponsesOrganizationsPage } from './runners';; +export { + Configurations, + type EnvironmentClassValidationResult, + type FieldValidationError, + type ScmIntegrationValidationResult, + type ConfigurationValidateResponse, + type ConfigurationValidateParams, +} from './configurations/index'; +export { + Policies, + type RunnerPolicy, + type RunnerRole, + type PolicyCreateResponse, + type PolicyUpdateResponse, + type PolicyDeleteResponse, + type PolicyCreateParams, + type PolicyUpdateParams, + type PolicyListParams, + type PolicyDeleteParams, + type RunnerPoliciesPoliciesPage, +} from './policies'; +export { + Runners, + type GatewayInfo, + type LogLevel, + type MetricsConfiguration, + type Runner, + type RunnerCapability, + type RunnerConfiguration, + type RunnerKind, + type RunnerPhase, + type RunnerProvider, + type RunnerReleaseChannel, + type RunnerSpec, + type RunnerStatus, + type RunnerVariant, + type SearchMode, + type UpdateWindow, + type RunnerCreateResponse, + type RunnerRetrieveResponse, + type RunnerUpdateResponse, + type RunnerDeleteResponse, + type RunnerCheckAuthenticationForHostResponse, + type RunnerCheckRepositoryAccessResponse, + type RunnerCreateLogsTokenResponse, + type RunnerCreateRunnerTokenResponse, + type RunnerListScmOrganizationsResponse, + type RunnerParseContextURLResponse, + type RunnerSearchRepositoriesResponse, + type RunnerCreateParams, + type RunnerRetrieveParams, + type RunnerUpdateParams, + type RunnerListParams, + type RunnerDeleteParams, + type RunnerCheckAuthenticationForHostParams, + type RunnerCheckRepositoryAccessParams, + type RunnerCreateLogsTokenParams, + type RunnerCreateRunnerTokenParams, + type RunnerListScmOrganizationsParams, + type RunnerParseContextURLParams, + type RunnerSearchRepositoriesParams, + type RunnersRunnersPage, + type RunnerListScmOrganizationsResponsesOrganizationsPage, +} from './runners'; diff --git a/src/resources/runners/policies.ts b/src/resources/runners/policies.ts index 8bfc6a09..a49bcf50 100644 --- a/src/resources/runners/policies.ts +++ b/src/resources/runners/policies.ts @@ -108,9 +108,16 @@ export class Policies extends APIResource { * } * ``` */ - list(params: PolicyListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.RunnerService/ListRunnerPolicies', PoliciesPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: PolicyListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.RunnerService/ListRunnerPolicies', + PoliciesPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -146,7 +153,7 @@ export class Policies extends APIResource { } } -export type RunnerPoliciesPoliciesPage = PoliciesPage +export type RunnerPoliciesPoliciesPage = PoliciesPage; export interface RunnerPolicy { groupId?: string; @@ -157,7 +164,7 @@ export interface RunnerPolicy { role?: RunnerRole; } -export type RunnerRole = 'RUNNER_ROLE_UNSPECIFIED' | 'RUNNER_ROLE_ADMIN' | 'RUNNER_ROLE_USER' +export type RunnerRole = 'RUNNER_ROLE_UNSPECIFIED' | 'RUNNER_ROLE_ADMIN' | 'RUNNER_ROLE_USER'; export interface PolicyCreateResponse { policy: RunnerPolicy; @@ -167,7 +174,7 @@ export interface PolicyUpdateResponse { policy: RunnerPolicy; } -export type PolicyDeleteResponse = unknown +export type PolicyDeleteResponse = unknown; export interface PolicyCreateParams { /** @@ -252,6 +259,6 @@ export declare namespace Policies { type PolicyCreateParams as PolicyCreateParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyListParams as PolicyListParams, - type PolicyDeleteParams as PolicyDeleteParams + type PolicyDeleteParams as PolicyDeleteParams, }; } diff --git a/src/resources/runners/runners.ts b/src/resources/runners/runners.ts index 9b644883..9887aec3 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -4,11 +4,36 @@ import { APIResource } from '../../core/resource'; import * as RunnersAPI from './runners'; import * as Shared from '../shared'; import * as PoliciesAPI from './policies'; -import { Policies, PolicyCreateParams, PolicyCreateResponse, PolicyDeleteParams, PolicyDeleteResponse, PolicyListParams, PolicyUpdateParams, PolicyUpdateResponse, RunnerPoliciesPoliciesPage, RunnerPolicy, RunnerRole } from './policies'; +import { + Policies, + PolicyCreateParams, + PolicyCreateResponse, + PolicyDeleteParams, + PolicyDeleteResponse, + PolicyListParams, + PolicyUpdateParams, + PolicyUpdateResponse, + RunnerPoliciesPoliciesPage, + RunnerPolicy, + RunnerRole, +} from './policies'; import * as ConfigurationsAPI from './configurations/configurations'; -import { ConfigurationValidateParams, ConfigurationValidateResponse, Configurations, EnvironmentClassValidationResult, FieldValidationError, ScmIntegrationValidationResult } from './configurations/configurations'; +import { + ConfigurationValidateParams, + ConfigurationValidateResponse, + Configurations, + EnvironmentClassValidationResult, + FieldValidationError, + ScmIntegrationValidationResult, +} from './configurations/configurations'; import { APIPromise } from '../../core/api-promise'; -import { OrganizationsPage, type OrganizationsPageParams, PagePromise, RunnersPage, type RunnersPageParams } from '../../core/pagination'; +import { + OrganizationsPage, + type OrganizationsPageParams, + PagePromise, + RunnersPage, + type RunnersPageParams, +} from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Runners extends APIResource { @@ -195,8 +220,13 @@ export class Runners extends APIResource { * ``` */ list(params: RunnerListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.RunnerService/ListRunners', RunnersPage, { query: { token, pageSize }, body, method: 'post', ...options }); + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.RunnerService/ListRunners', RunnersPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -256,7 +286,10 @@ export class Runners extends APIResource { * }); * ``` */ - checkAuthenticationForHost(body: RunnerCheckAuthenticationForHostParams, options?: RequestOptions): APIPromise { + checkAuthenticationForHost( + body: RunnerCheckAuthenticationForHostParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.RunnerService/CheckAuthenticationForHost', { body, ...options }); } @@ -295,7 +328,10 @@ export class Runners extends APIResource { * ); * ``` */ - checkRepositoryAccess(body: RunnerCheckRepositoryAccessParams, options?: RequestOptions): APIPromise { + checkRepositoryAccess( + body: RunnerCheckRepositoryAccessParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.RunnerService/CheckRepositoryAccess', { body, ...options }); } @@ -321,7 +357,10 @@ export class Runners extends APIResource { * }); * ``` */ - createLogsToken(body: RunnerCreateLogsTokenParams, options?: RequestOptions): APIPromise { + createLogsToken( + body: RunnerCreateLogsTokenParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.RunnerService/CreateRunnerLogsToken', { body, ...options }); } @@ -353,7 +392,10 @@ export class Runners extends APIResource { * }); * ``` */ - createRunnerToken(body: RunnerCreateRunnerTokenParams, options?: RequestOptions): APIPromise { + createRunnerToken( + body: RunnerCreateRunnerTokenParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.RunnerService/CreateRunnerToken', { body, ...options }); } @@ -401,9 +443,16 @@ export class Runners extends APIResource { * } * ``` */ - listScmOrganizations(params: RunnerListScmOrganizationsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.RunnerService/ListSCMOrganizations', OrganizationsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listScmOrganizations( + params: RunnerListScmOrganizationsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.RunnerService/ListSCMOrganizations', + OrganizationsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -439,7 +488,10 @@ export class Runners extends APIResource { * }); * ``` */ - parseContextURL(body: RunnerParseContextURLParams, options?: RequestOptions): APIPromise { + parseContextURL( + body: RunnerParseContextURLParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.RunnerService/ParseContextURL', { body, ...options }); } @@ -482,14 +534,18 @@ export class Runners extends APIResource { * }); * ``` */ - searchRepositories(body: RunnerSearchRepositoriesParams, options?: RequestOptions): APIPromise { + searchRepositories( + body: RunnerSearchRepositoriesParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.RunnerService/SearchRepositories', { body, ...options }); } } -export type RunnersRunnersPage = RunnersPage +export type RunnersRunnersPage = RunnersPage; -export type RunnerListScmOrganizationsResponsesOrganizationsPage = OrganizationsPage +export type RunnerListScmOrganizationsResponsesOrganizationsPage = + OrganizationsPage; export interface GatewayInfo { /** @@ -503,7 +559,12 @@ export interface GatewayInfo { latency?: string; } -export type LogLevel = 'LOG_LEVEL_UNSPECIFIED' | 'LOG_LEVEL_DEBUG' | 'LOG_LEVEL_INFO' | 'LOG_LEVEL_WARN' | 'LOG_LEVEL_ERROR' +export type LogLevel = + | 'LOG_LEVEL_UNSPECIFIED' + | 'LOG_LEVEL_DEBUG' + | 'LOG_LEVEL_INFO' + | 'LOG_LEVEL_WARN' + | 'LOG_LEVEL_ERROR'; export interface MetricsConfiguration { /** @@ -583,7 +644,21 @@ export interface Runner { updatedAt?: string; } -export type RunnerCapability = 'RUNNER_CAPABILITY_UNSPECIFIED' | 'RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS' | 'RUNNER_CAPABILITY_SECRET_CONTAINER_REGISTRY' | 'RUNNER_CAPABILITY_AGENT_EXECUTION' | 'RUNNER_CAPABILITY_ALLOW_ENV_TOKEN_POPULATION' | 'RUNNER_CAPABILITY_DEFAULT_DEV_CONTAINER_IMAGE' | 'RUNNER_CAPABILITY_ENVIRONMENT_SNAPSHOT' | 'RUNNER_CAPABILITY_PREBUILDS_BEFORE_SNAPSHOT_TRIGGER' | 'RUNNER_CAPABILITY_LIST_SCM_ORGANIZATIONS' | 'RUNNER_CAPABILITY_CHECK_REPOSITORY_ACCESS' | 'RUNNER_CAPABILITY_RUNNER_SIDE_AGENT' | 'RUNNER_CAPABILITY_WARM_POOL' | 'RUNNER_CAPABILITY_ASG_WARM_POOL' | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION' +export type RunnerCapability = + | 'RUNNER_CAPABILITY_UNSPECIFIED' + | 'RUNNER_CAPABILITY_FETCH_LOCAL_SCM_INTEGRATIONS' + | 'RUNNER_CAPABILITY_SECRET_CONTAINER_REGISTRY' + | 'RUNNER_CAPABILITY_AGENT_EXECUTION' + | 'RUNNER_CAPABILITY_ALLOW_ENV_TOKEN_POPULATION' + | 'RUNNER_CAPABILITY_DEFAULT_DEV_CONTAINER_IMAGE' + | 'RUNNER_CAPABILITY_ENVIRONMENT_SNAPSHOT' + | 'RUNNER_CAPABILITY_PREBUILDS_BEFORE_SNAPSHOT_TRIGGER' + | 'RUNNER_CAPABILITY_LIST_SCM_ORGANIZATIONS' + | 'RUNNER_CAPABILITY_CHECK_REPOSITORY_ACCESS' + | 'RUNNER_CAPABILITY_RUNNER_SIDE_AGENT' + | 'RUNNER_CAPABILITY_WARM_POOL' + | 'RUNNER_CAPABILITY_ASG_WARM_POOL' + | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION'; export interface RunnerConfiguration { /** @@ -630,21 +705,42 @@ export interface RunnerConfiguration { /** * RunnerKind represents the kind of a runner */ -export type RunnerKind = 'RUNNER_KIND_UNSPECIFIED' | 'RUNNER_KIND_LOCAL' | 'RUNNER_KIND_REMOTE' | 'RUNNER_KIND_LOCAL_CONFIGURATION' +export type RunnerKind = + | 'RUNNER_KIND_UNSPECIFIED' + | 'RUNNER_KIND_LOCAL' + | 'RUNNER_KIND_REMOTE' + | 'RUNNER_KIND_LOCAL_CONFIGURATION'; /** * RunnerPhase represents the phase a runner is in */ -export type RunnerPhase = 'RUNNER_PHASE_UNSPECIFIED' | 'RUNNER_PHASE_CREATED' | 'RUNNER_PHASE_INACTIVE' | 'RUNNER_PHASE_ACTIVE' | 'RUNNER_PHASE_DELETING' | 'RUNNER_PHASE_DELETED' | 'RUNNER_PHASE_DEGRADED' +export type RunnerPhase = + | 'RUNNER_PHASE_UNSPECIFIED' + | 'RUNNER_PHASE_CREATED' + | 'RUNNER_PHASE_INACTIVE' + | 'RUNNER_PHASE_ACTIVE' + | 'RUNNER_PHASE_DELETING' + | 'RUNNER_PHASE_DELETED' + | 'RUNNER_PHASE_DEGRADED'; /** * RunnerProvider identifies the specific implementation type of a runner. Each * provider maps to a specific kind of runner (local or remote), as specified below * for each provider. */ -export type RunnerProvider = 'RUNNER_PROVIDER_UNSPECIFIED' | 'RUNNER_PROVIDER_AWS_EC2' | 'RUNNER_PROVIDER_LINUX_HOST' | 'RUNNER_PROVIDER_DESKTOP_MAC' | 'RUNNER_PROVIDER_MANAGED' | 'RUNNER_PROVIDER_GCP' | 'RUNNER_PROVIDER_DEV_AGENT' - -export type RunnerReleaseChannel = 'RUNNER_RELEASE_CHANNEL_UNSPECIFIED' | 'RUNNER_RELEASE_CHANNEL_STABLE' | 'RUNNER_RELEASE_CHANNEL_LATEST' +export type RunnerProvider = + | 'RUNNER_PROVIDER_UNSPECIFIED' + | 'RUNNER_PROVIDER_AWS_EC2' + | 'RUNNER_PROVIDER_LINUX_HOST' + | 'RUNNER_PROVIDER_DESKTOP_MAC' + | 'RUNNER_PROVIDER_MANAGED' + | 'RUNNER_PROVIDER_GCP' + | 'RUNNER_PROVIDER_DEV_AGENT'; + +export type RunnerReleaseChannel = + | 'RUNNER_RELEASE_CHANNEL_UNSPECIFIED' + | 'RUNNER_RELEASE_CHANNEL_STABLE' + | 'RUNNER_RELEASE_CHANNEL_LATEST'; export interface RunnerSpec { /** @@ -728,9 +824,12 @@ export interface RunnerStatus { version?: string; } -export type RunnerVariant = 'RUNNER_VARIANT_UNSPECIFIED' | 'RUNNER_VARIANT_STANDARD' | 'RUNNER_VARIANT_ENTERPRISE' +export type RunnerVariant = + | 'RUNNER_VARIANT_UNSPECIFIED' + | 'RUNNER_VARIANT_STANDARD' + | 'RUNNER_VARIANT_ENTERPRISE'; -export type SearchMode = 'SEARCH_MODE_UNSPECIFIED' | 'SEARCH_MODE_KEYWORD' | 'SEARCH_MODE_NATIVE' +export type SearchMode = 'SEARCH_MODE_UNSPECIFIED' | 'SEARCH_MODE_KEYWORD' | 'SEARCH_MODE_NATIVE'; /** * UpdateWindow defines a daily time window (UTC) during which auto-updates are @@ -770,9 +869,9 @@ export interface RunnerRetrieveResponse { runner: Runner; } -export type RunnerUpdateResponse = unknown +export type RunnerUpdateResponse = unknown; -export type RunnerDeleteResponse = unknown +export type RunnerDeleteResponse = unknown; export interface RunnerCheckAuthenticationForHostResponse { authenticated?: boolean; @@ -1478,7 +1577,7 @@ export declare namespace Runners { type RunnerCreateRunnerTokenParams as RunnerCreateRunnerTokenParams, type RunnerListScmOrganizationsParams as RunnerListScmOrganizationsParams, type RunnerParseContextURLParams as RunnerParseContextURLParams, - type RunnerSearchRepositoriesParams as RunnerSearchRepositoriesParams + type RunnerSearchRepositoriesParams as RunnerSearchRepositoriesParams, }; export { @@ -1487,7 +1586,7 @@ export declare namespace Runners { type FieldValidationError as FieldValidationError, type ScmIntegrationValidationResult as ScmIntegrationValidationResult, type ConfigurationValidateResponse as ConfigurationValidateResponse, - type ConfigurationValidateParams as ConfigurationValidateParams + type ConfigurationValidateParams as ConfigurationValidateParams, }; export { @@ -1501,6 +1600,6 @@ export declare namespace Runners { type PolicyCreateParams as PolicyCreateParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyListParams as PolicyListParams, - type PolicyDeleteParams as PolicyDeleteParams + type PolicyDeleteParams as PolicyDeleteParams, }; } diff --git a/src/resources/secrets.ts b/src/resources/secrets.ts index 460b2a1a..86012223 100644 --- a/src/resources/secrets.ts +++ b/src/resources/secrets.ts @@ -117,8 +117,13 @@ export class Secrets extends APIResource { * ``` */ list(params: SecretListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.SecretService/ListSecrets', SecretsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + const { token, pageSize, ...body } = params; + return this._client.getAPIList('/gitpod.v1.SecretService/ListSecrets', SecretsPage, { + query: { token, pageSize }, + body, + method: 'post', + ...options, + }); } /** @@ -212,7 +217,7 @@ export class Secrets extends APIResource { } } -export type SecretsSecretsPage = SecretsPage +export type SecretsSecretsPage = SecretsPage; export interface Secret { id?: string; @@ -466,13 +471,13 @@ export interface SecretCreateResponse { secret?: Secret; } -export type SecretDeleteResponse = unknown +export type SecretDeleteResponse = unknown; export interface SecretGetValueResponse { value?: string; } -export type SecretUpdateValueResponse = unknown +export type SecretUpdateValueResponse = unknown; export interface SecretCreateParams { /** @@ -598,6 +603,6 @@ export declare namespace Secrets { type SecretListParams as SecretListParams, type SecretDeleteParams as SecretDeleteParams, type SecretGetValueParams as SecretGetValueParams, - type SecretUpdateValueParams as SecretUpdateValueParams + type SecretUpdateValueParams as SecretUpdateValueParams, }; } diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 32d92463..c4b17c23 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -1,7 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import * as Shared from './shared'; -import { EnvironmentClassesPage, GatewaysPage, ProjectEnvironmentClassesPage, TaskExecutionsPage, TasksPage } from '../core/pagination'; +import { + EnvironmentClassesPage, + GatewaysPage, + ProjectEnvironmentClassesPage, + TaskExecutionsPage, + TasksPage, +} from '../core/pagination'; /** * An AutomationTrigger represents a trigger for an automation action. The `manual` @@ -33,7 +39,10 @@ export interface AutomationTrigger { prebuild?: boolean; } -export type CountResponseRelation = 'COUNT_RESPONSE_RELATION_UNSPECIFIED' | 'COUNT_RESPONSE_RELATION_EQ' | 'COUNT_RESPONSE_RELATION_GTE' +export type CountResponseRelation = + | 'COUNT_RESPONSE_RELATION_UNSPECIFIED' + | 'COUNT_RESPONSE_RELATION_EQ' + | 'COUNT_RESPONSE_RELATION_GTE'; export interface EnvironmentClass { /** @@ -104,7 +113,23 @@ export interface EnvironmentVariableSource { * The status code, which should be an enum value of * [google.rpc.Code][google.rpc.Code]. */ -export type ErrorCode = 'canceled' | 'unknown' | 'invalid_argument' | 'deadline_exceeded' | 'not_found' | 'already_exists' | 'permission_denied' | 'resource_exhausted' | 'failed_precondition' | 'aborted' | 'out_of_range' | 'unimplemented' | 'internal' | 'unavailable' | 'data_loss' | 'unauthenticated' +export type ErrorCode = + | 'canceled' + | 'unknown' + | 'invalid_argument' + | 'deadline_exceeded' + | 'not_found' + | 'already_exists' + | 'permission_denied' + | 'resource_exhausted' + | 'failed_precondition' + | 'aborted' + | 'out_of_range' + | 'unimplemented' + | 'internal' + | 'unavailable' + | 'data_loss' + | 'unauthenticated'; export interface FieldValue { key?: string; @@ -133,11 +158,26 @@ export interface Gateway { region?: string; } -export type OrganizationRole = 'ORGANIZATION_ROLE_UNSPECIFIED' | 'ORGANIZATION_ROLE_ADMIN' | 'ORGANIZATION_ROLE_MEMBER' - -export type OrganizationTier = 'ORGANIZATION_TIER_UNSPECIFIED' | 'ORGANIZATION_TIER_FREE' | 'ORGANIZATION_TIER_ENTERPRISE' | 'ORGANIZATION_TIER_CORE' | 'ORGANIZATION_TIER_FREE_ONA' - -export type Principal = 'PRINCIPAL_UNSPECIFIED' | 'PRINCIPAL_ACCOUNT' | 'PRINCIPAL_USER' | 'PRINCIPAL_RUNNER' | 'PRINCIPAL_ENVIRONMENT' | 'PRINCIPAL_SERVICE_ACCOUNT' | 'PRINCIPAL_RUNNER_MANAGER' +export type OrganizationRole = + | 'ORGANIZATION_ROLE_UNSPECIFIED' + | 'ORGANIZATION_ROLE_ADMIN' + | 'ORGANIZATION_ROLE_MEMBER'; + +export type OrganizationTier = + | 'ORGANIZATION_TIER_UNSPECIFIED' + | 'ORGANIZATION_TIER_FREE' + | 'ORGANIZATION_TIER_ENTERPRISE' + | 'ORGANIZATION_TIER_CORE' + | 'ORGANIZATION_TIER_FREE_ONA'; + +export type Principal = + | 'PRINCIPAL_UNSPECIFIED' + | 'PRINCIPAL_ACCOUNT' + | 'PRINCIPAL_USER' + | 'PRINCIPAL_RUNNER' + | 'PRINCIPAL_ENVIRONMENT' + | 'PRINCIPAL_SERVICE_ACCOUNT' + | 'PRINCIPAL_RUNNER_MANAGER'; export interface ProjectEnvironmentClass { /** @@ -161,9 +201,121 @@ export interface ProjectEnvironmentClass { * ResourceRole represents roles that can be assigned to groups on resources These * map directly to the roles defined in backend/db/rule/rbac/role/role.go */ -export type ResourceRole = 'RESOURCE_ROLE_UNSPECIFIED' | 'RESOURCE_ROLE_ORG_ADMIN' | 'RESOURCE_ROLE_ORG_MEMBER' | 'RESOURCE_ROLE_ORG_RUNNERS_ADMIN' | 'RESOURCE_ROLE_ORG_PROJECTS_ADMIN' | 'RESOURCE_ROLE_ORG_AUTOMATIONS_ADMIN' | 'RESOURCE_ROLE_ORG_GROUPS_ADMIN' | 'RESOURCE_ROLE_ORG_AUDIT_LOG_READER' | 'RESOURCE_ROLE_GROUP_ADMIN' | 'RESOURCE_ROLE_GROUP_VIEWER' | 'RESOURCE_ROLE_USER_IDENTITY' | 'RESOURCE_ROLE_USER_VIEWER' | 'RESOURCE_ROLE_USER_ADMIN' | 'RESOURCE_ROLE_ENVIRONMENT_IDENTITY' | 'RESOURCE_ROLE_ENVIRONMENT_ADMIN' | 'RESOURCE_ROLE_ENVIRONMENT_USER' | 'RESOURCE_ROLE_ENVIRONMENT_VIEWER' | 'RESOURCE_ROLE_ENVIRONMENT_RUNNER' | 'RESOURCE_ROLE_RUNNER_IDENTITY' | 'RESOURCE_ROLE_RUNNER_ADMIN' | 'RESOURCE_ROLE_RUNNER_LOCAL_ADMIN' | 'RESOURCE_ROLE_RUNNER_MANAGED_ADMIN' | 'RESOURCE_ROLE_RUNNER_USER' | 'RESOURCE_ROLE_RUNNER_CONFIGURATION_READER' | 'RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_ADMIN' | 'RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_UPDATER' | 'RESOURCE_ROLE_PROJECT_ADMIN' | 'RESOURCE_ROLE_PROJECT_USER' | 'RESOURCE_ROLE_PROJECT_EDITOR' | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_ADMIN' | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_VIEWER' | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_USER' | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_ENV' | 'RESOURCE_ROLE_ENVIRONMENT_TASK_ADMIN' | 'RESOURCE_ROLE_ENVIRONMENT_TASK_VIEWER' | 'RESOURCE_ROLE_ENVIRONMENT_TASK_USER' | 'RESOURCE_ROLE_ENVIRONMENT_TASK_ENV' | 'RESOURCE_ROLE_SERVICE_ACCOUNT_IDENTITY' | 'RESOURCE_ROLE_SERVICE_ACCOUNT_ADMIN' | 'RESOURCE_ROLE_AGENT_EXECUTION_USER' | 'RESOURCE_ROLE_AGENT_EXECUTION_ADMIN' | 'RESOURCE_ROLE_AGENT_EXECUTION_RUNNER' | 'RESOURCE_ROLE_AGENT_EXECUTION_OUTPUTS_REPORTER' | 'RESOURCE_ROLE_AGENT_EXECUTION_VIEWER' | 'RESOURCE_ROLE_AGENT_ADMIN' | 'RESOURCE_ROLE_AGENT_VIEWER' | 'RESOURCE_ROLE_AGENT_EXECUTOR' | 'RESOURCE_ROLE_WORKFLOW_ADMIN' | 'RESOURCE_ROLE_WORKFLOW_USER' | 'RESOURCE_ROLE_WORKFLOW_VIEWER' | 'RESOURCE_ROLE_WORKFLOW_EXECUTOR' | 'RESOURCE_ROLE_SNAPSHOT_ADMIN' | 'RESOURCE_ROLE_SNAPSHOT_RUNNER' | 'RESOURCE_ROLE_WEBHOOK_ADMIN' | 'RESOURCE_ROLE_WEBHOOK_VIEWER' | 'RESOURCE_ROLE_WARMPOOL_RUNNER' | 'RESOURCE_ROLE_WARMPOOL_ADMIN' | 'RESOURCE_ROLE_WARMPOOL_VIEWER' | 'RESOURCE_ROLE_SESSION_ADMIN' | 'RESOURCE_ROLE_SESSION_USER' | 'RESOURCE_ROLE_TEAM_ADMIN' | 'RESOURCE_ROLE_TEAM_VIEWER' - -export type ResourceType = 'RESOURCE_TYPE_UNSPECIFIED' | 'RESOURCE_TYPE_ENVIRONMENT' | 'RESOURCE_TYPE_RUNNER' | 'RESOURCE_TYPE_PROJECT' | 'RESOURCE_TYPE_TASK' | 'RESOURCE_TYPE_TASK_EXECUTION' | 'RESOURCE_TYPE_SERVICE' | 'RESOURCE_TYPE_ORGANIZATION' | 'RESOURCE_TYPE_USER' | 'RESOURCE_TYPE_ENVIRONMENT_CLASS' | 'RESOURCE_TYPE_RUNNER_SCM_INTEGRATION' | 'RESOURCE_TYPE_HOST_AUTHENTICATION_TOKEN' | 'RESOURCE_TYPE_GROUP' | 'RESOURCE_TYPE_PERSONAL_ACCESS_TOKEN' | 'RESOURCE_TYPE_USER_PREFERENCE' | 'RESOURCE_TYPE_SERVICE_ACCOUNT' | 'RESOURCE_TYPE_SECRET' | 'RESOURCE_TYPE_SSO_CONFIG' | 'RESOURCE_TYPE_DOMAIN_VERIFICATION' | 'RESOURCE_TYPE_AGENT_EXECUTION' | 'RESOURCE_TYPE_RUNNER_LLM_INTEGRATION' | 'RESOURCE_TYPE_AGENT' | 'RESOURCE_TYPE_ENVIRONMENT_SESSION' | 'RESOURCE_TYPE_USER_SECRET' | 'RESOURCE_TYPE_ORGANIZATION_POLICY' | 'RESOURCE_TYPE_ORGANIZATION_SECRET' | 'RESOURCE_TYPE_PROJECT_ENVIRONMENT_CLASS' | 'RESOURCE_TYPE_BILLING' | 'RESOURCE_TYPE_PROMPT' | 'RESOURCE_TYPE_COUPON' | 'RESOURCE_TYPE_COUPON_REDEMPTION' | 'RESOURCE_TYPE_ACCOUNT' | 'RESOURCE_TYPE_INTEGRATION' | 'RESOURCE_TYPE_WORKFLOW' | 'RESOURCE_TYPE_WORKFLOW_EXECUTION' | 'RESOURCE_TYPE_WORKFLOW_EXECUTION_ACTION' | 'RESOURCE_TYPE_SNAPSHOT' | 'RESOURCE_TYPE_PREBUILD' | 'RESOURCE_TYPE_ORGANIZATION_LLM_INTEGRATION' | 'RESOURCE_TYPE_CUSTOM_DOMAIN' | 'RESOURCE_TYPE_ROLE_ASSIGNMENT_CHANGED' | 'RESOURCE_TYPE_GROUP_MEMBERSHIP_CHANGED' | 'RESOURCE_TYPE_WEBHOOK' | 'RESOURCE_TYPE_SCIM_CONFIGURATION' | 'RESOURCE_TYPE_SERVICE_ACCOUNT_SECRET' | 'RESOURCE_TYPE_ANNOUNCEMENT_BANNER' | 'RESOURCE_TYPE_SERVICE_ACCOUNT_TOKEN' | 'RESOURCE_TYPE_ROLE_ASSIGNMENT' | 'RESOURCE_TYPE_WARM_POOL' | 'RESOURCE_TYPE_NOTIFICATION' +export type ResourceRole = + | 'RESOURCE_ROLE_UNSPECIFIED' + | 'RESOURCE_ROLE_ORG_ADMIN' + | 'RESOURCE_ROLE_ORG_MEMBER' + | 'RESOURCE_ROLE_ORG_RUNNERS_ADMIN' + | 'RESOURCE_ROLE_ORG_PROJECTS_ADMIN' + | 'RESOURCE_ROLE_ORG_AUTOMATIONS_ADMIN' + | 'RESOURCE_ROLE_ORG_GROUPS_ADMIN' + | 'RESOURCE_ROLE_ORG_AUDIT_LOG_READER' + | 'RESOURCE_ROLE_GROUP_ADMIN' + | 'RESOURCE_ROLE_GROUP_VIEWER' + | 'RESOURCE_ROLE_USER_IDENTITY' + | 'RESOURCE_ROLE_USER_VIEWER' + | 'RESOURCE_ROLE_USER_ADMIN' + | 'RESOURCE_ROLE_ENVIRONMENT_IDENTITY' + | 'RESOURCE_ROLE_ENVIRONMENT_ADMIN' + | 'RESOURCE_ROLE_ENVIRONMENT_USER' + | 'RESOURCE_ROLE_ENVIRONMENT_VIEWER' + | 'RESOURCE_ROLE_ENVIRONMENT_RUNNER' + | 'RESOURCE_ROLE_RUNNER_IDENTITY' + | 'RESOURCE_ROLE_RUNNER_ADMIN' + | 'RESOURCE_ROLE_RUNNER_LOCAL_ADMIN' + | 'RESOURCE_ROLE_RUNNER_MANAGED_ADMIN' + | 'RESOURCE_ROLE_RUNNER_USER' + | 'RESOURCE_ROLE_RUNNER_CONFIGURATION_READER' + | 'RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_ADMIN' + | 'RESOURCE_ROLE_HOST_AUTHENTICATION_TOKEN_UPDATER' + | 'RESOURCE_ROLE_PROJECT_ADMIN' + | 'RESOURCE_ROLE_PROJECT_USER' + | 'RESOURCE_ROLE_PROJECT_EDITOR' + | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_ADMIN' + | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_VIEWER' + | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_USER' + | 'RESOURCE_ROLE_ENVIRONMENT_SERVICE_ENV' + | 'RESOURCE_ROLE_ENVIRONMENT_TASK_ADMIN' + | 'RESOURCE_ROLE_ENVIRONMENT_TASK_VIEWER' + | 'RESOURCE_ROLE_ENVIRONMENT_TASK_USER' + | 'RESOURCE_ROLE_ENVIRONMENT_TASK_ENV' + | 'RESOURCE_ROLE_SERVICE_ACCOUNT_IDENTITY' + | 'RESOURCE_ROLE_SERVICE_ACCOUNT_ADMIN' + | 'RESOURCE_ROLE_AGENT_EXECUTION_USER' + | 'RESOURCE_ROLE_AGENT_EXECUTION_ADMIN' + | 'RESOURCE_ROLE_AGENT_EXECUTION_RUNNER' + | 'RESOURCE_ROLE_AGENT_EXECUTION_OUTPUTS_REPORTER' + | 'RESOURCE_ROLE_AGENT_EXECUTION_VIEWER' + | 'RESOURCE_ROLE_AGENT_ADMIN' + | 'RESOURCE_ROLE_AGENT_VIEWER' + | 'RESOURCE_ROLE_AGENT_EXECUTOR' + | 'RESOURCE_ROLE_WORKFLOW_ADMIN' + | 'RESOURCE_ROLE_WORKFLOW_USER' + | 'RESOURCE_ROLE_WORKFLOW_VIEWER' + | 'RESOURCE_ROLE_WORKFLOW_EXECUTOR' + | 'RESOURCE_ROLE_SNAPSHOT_ADMIN' + | 'RESOURCE_ROLE_SNAPSHOT_RUNNER' + | 'RESOURCE_ROLE_WEBHOOK_ADMIN' + | 'RESOURCE_ROLE_WEBHOOK_VIEWER' + | 'RESOURCE_ROLE_WARMPOOL_RUNNER' + | 'RESOURCE_ROLE_WARMPOOL_ADMIN' + | 'RESOURCE_ROLE_WARMPOOL_VIEWER' + | 'RESOURCE_ROLE_SESSION_ADMIN' + | 'RESOURCE_ROLE_SESSION_USER' + | 'RESOURCE_ROLE_TEAM_ADMIN' + | 'RESOURCE_ROLE_TEAM_VIEWER'; + +export type ResourceType = + | 'RESOURCE_TYPE_UNSPECIFIED' + | 'RESOURCE_TYPE_ENVIRONMENT' + | 'RESOURCE_TYPE_RUNNER' + | 'RESOURCE_TYPE_PROJECT' + | 'RESOURCE_TYPE_TASK' + | 'RESOURCE_TYPE_TASK_EXECUTION' + | 'RESOURCE_TYPE_SERVICE' + | 'RESOURCE_TYPE_ORGANIZATION' + | 'RESOURCE_TYPE_USER' + | 'RESOURCE_TYPE_ENVIRONMENT_CLASS' + | 'RESOURCE_TYPE_RUNNER_SCM_INTEGRATION' + | 'RESOURCE_TYPE_HOST_AUTHENTICATION_TOKEN' + | 'RESOURCE_TYPE_GROUP' + | 'RESOURCE_TYPE_PERSONAL_ACCESS_TOKEN' + | 'RESOURCE_TYPE_USER_PREFERENCE' + | 'RESOURCE_TYPE_SERVICE_ACCOUNT' + | 'RESOURCE_TYPE_SECRET' + | 'RESOURCE_TYPE_SSO_CONFIG' + | 'RESOURCE_TYPE_DOMAIN_VERIFICATION' + | 'RESOURCE_TYPE_AGENT_EXECUTION' + | 'RESOURCE_TYPE_RUNNER_LLM_INTEGRATION' + | 'RESOURCE_TYPE_AGENT' + | 'RESOURCE_TYPE_ENVIRONMENT_SESSION' + | 'RESOURCE_TYPE_USER_SECRET' + | 'RESOURCE_TYPE_ORGANIZATION_POLICY' + | 'RESOURCE_TYPE_ORGANIZATION_SECRET' + | 'RESOURCE_TYPE_PROJECT_ENVIRONMENT_CLASS' + | 'RESOURCE_TYPE_BILLING' + | 'RESOURCE_TYPE_PROMPT' + | 'RESOURCE_TYPE_COUPON' + | 'RESOURCE_TYPE_COUPON_REDEMPTION' + | 'RESOURCE_TYPE_ACCOUNT' + | 'RESOURCE_TYPE_INTEGRATION' + | 'RESOURCE_TYPE_WORKFLOW' + | 'RESOURCE_TYPE_WORKFLOW_EXECUTION' + | 'RESOURCE_TYPE_WORKFLOW_EXECUTION_ACTION' + | 'RESOURCE_TYPE_SNAPSHOT' + | 'RESOURCE_TYPE_PREBUILD' + | 'RESOURCE_TYPE_ORGANIZATION_LLM_INTEGRATION' + | 'RESOURCE_TYPE_CUSTOM_DOMAIN' + | 'RESOURCE_TYPE_ROLE_ASSIGNMENT_CHANGED' + | 'RESOURCE_TYPE_GROUP_MEMBERSHIP_CHANGED' + | 'RESOURCE_TYPE_WEBHOOK' + | 'RESOURCE_TYPE_SCIM_CONFIGURATION' + | 'RESOURCE_TYPE_SERVICE_ACCOUNT_SECRET' + | 'RESOURCE_TYPE_ANNOUNCEMENT_BANNER' + | 'RESOURCE_TYPE_SERVICE_ACCOUNT_TOKEN' + | 'RESOURCE_TYPE_ROLE_ASSIGNMENT' + | 'RESOURCE_TYPE_WARM_POOL' + | 'RESOURCE_TYPE_NOTIFICATION'; export interface RunsOn { docker?: RunsOn.Docker; @@ -201,12 +353,12 @@ export interface Sort { order?: SortOrder; } -export type SortOrder = 'SORT_ORDER_UNSPECIFIED' | 'SORT_ORDER_ASC' | 'SORT_ORDER_DESC' +export type SortOrder = 'SORT_ORDER_UNSPECIFIED' | 'SORT_ORDER_ASC' | 'SORT_ORDER_DESC'; /** * Current state of the pull request */ -export type State = 'STATE_UNSPECIFIED' | 'STATE_OPEN' | 'STATE_CLOSED' | 'STATE_MERGED' +export type State = 'STATE_UNSPECIFIED' | 'STATE_OPEN' | 'STATE_CLOSED' | 'STATE_MERGED'; export interface Subject { /** @@ -282,7 +434,13 @@ export interface TaskExecutionMetadata { taskId?: string; } -export type TaskExecutionPhase = 'TASK_EXECUTION_PHASE_UNSPECIFIED' | 'TASK_EXECUTION_PHASE_PENDING' | 'TASK_EXECUTION_PHASE_RUNNING' | 'TASK_EXECUTION_PHASE_SUCCEEDED' | 'TASK_EXECUTION_PHASE_FAILED' | 'TASK_EXECUTION_PHASE_STOPPED' +export type TaskExecutionPhase = + | 'TASK_EXECUTION_PHASE_UNSPECIFIED' + | 'TASK_EXECUTION_PHASE_PENDING' + | 'TASK_EXECUTION_PHASE_RUNNING' + | 'TASK_EXECUTION_PHASE_SUCCEEDED' + | 'TASK_EXECUTION_PHASE_FAILED' + | 'TASK_EXECUTION_PHASE_STOPPED'; export interface TaskExecutionSpec { /** @@ -445,14 +603,19 @@ export interface TaskSpec { runsOn?: RunsOn; } -export type UserStatus = 'USER_STATUS_UNSPECIFIED' | 'USER_STATUS_ACTIVE' | 'USER_STATUS_SUSPENDED' | 'USER_STATUS_LEFT' +export type UserStatus = + | 'USER_STATUS_UNSPECIFIED' + | 'USER_STATUS_ACTIVE' + | 'USER_STATUS_SUSPENDED' + | 'USER_STATUS_LEFT'; -export type TasksTasksPage = TasksPage +export type TasksTasksPage = TasksPage; -export type TaskExecutionsTaskExecutionsPage = TaskExecutionsPage +export type TaskExecutionsTaskExecutionsPage = TaskExecutionsPage; -export type EnvironmentClassesEnvironmentClassesPage = EnvironmentClassesPage +export type EnvironmentClassesEnvironmentClassesPage = EnvironmentClassesPage; -export type GatewaysGatewaysPage = GatewaysPage +export type GatewaysGatewaysPage = GatewaysPage; -export type ProjectEnvironmentClassesProjectEnvironmentClassesPage = ProjectEnvironmentClassesPage +export type ProjectEnvironmentClassesProjectEnvironmentClassesPage = + ProjectEnvironmentClassesPage; diff --git a/src/resources/usage.ts b/src/resources/usage.ts index cb77ed4c..0782706e 100644 --- a/src/resources/usage.ts +++ b/src/resources/usage.ts @@ -52,13 +52,20 @@ export class Usage extends APIResource { * } * ``` */ - listEnvironmentRuntimeRecords(params: UsageListEnvironmentRuntimeRecordsParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.UsageService/ListEnvironmentUsageRecords', RecordsPage, { query: { token, pageSize }, body, method: 'post', ...options }); + listEnvironmentRuntimeRecords( + params: UsageListEnvironmentRuntimeRecordsParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.UsageService/ListEnvironmentUsageRecords', + RecordsPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } } -export type EnvironmentUsageRecordsRecordsPage = RecordsPage +export type EnvironmentUsageRecordsRecordsPage = RecordsPage; /** * EnvironmentUsageRecord represents a record of an environment from start to stop. @@ -173,6 +180,6 @@ export declare namespace Usage { export { type EnvironmentUsageRecord as EnvironmentUsageRecord, type EnvironmentUsageRecordsRecordsPage as EnvironmentUsageRecordsRecordsPage, - type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams + type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams, }; } diff --git a/src/resources/users/dotfiles.ts b/src/resources/users/dotfiles.ts index 44fb4706..f3539f32 100644 --- a/src/resources/users/dotfiles.ts +++ b/src/resources/users/dotfiles.ts @@ -78,7 +78,7 @@ export interface DotfileGetResponse { dotfilesConfiguration: DotfilesConfiguration; } -export type DotfileSetResponse = unknown +export type DotfileSetResponse = unknown; export interface DotfileGetParams { empty?: boolean; @@ -94,6 +94,6 @@ export declare namespace Dotfiles { type DotfileGetResponse as DotfileGetResponse, type DotfileSetResponse as DotfileSetResponse, type DotfileGetParams as DotfileGetParams, - type DotfileSetParams as DotfileSetParams + type DotfileSetParams as DotfileSetParams, }; } diff --git a/src/resources/users/index.ts b/src/resources/users/index.ts index e6752305..be4f2782 100644 --- a/src/resources/users/index.ts +++ b/src/resources/users/index.ts @@ -1,5 +1,32 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Dotfiles, type DotfilesConfiguration, type DotfileGetResponse, type DotfileSetResponse, type DotfileGetParams, type DotfileSetParams } from './dotfiles';; -export { Pats, type PersonalAccessToken, type PatDeleteResponse, type PatGetResponse, type PatListParams, type PatDeleteParams, type PatGetParams, type PersonalAccessTokensPersonalAccessTokensPage } from './pats';; -export { Users, type User, type UserDeleteUserResponse, type UserGetAuthenticatedUserResponse, type UserGetUserResponse, type UserSetSuspendedResponse, type UserDeleteUserParams, type UserGetAuthenticatedUserParams, type UserGetUserParams, type UserSetSuspendedParams } from './users';; +export { + Dotfiles, + type DotfilesConfiguration, + type DotfileGetResponse, + type DotfileSetResponse, + type DotfileGetParams, + type DotfileSetParams, +} from './dotfiles'; +export { + Pats, + type PersonalAccessToken, + type PatDeleteResponse, + type PatGetResponse, + type PatListParams, + type PatDeleteParams, + type PatGetParams, + type PersonalAccessTokensPersonalAccessTokensPage, +} from './pats'; +export { + Users, + type User, + type UserDeleteUserResponse, + type UserGetAuthenticatedUserResponse, + type UserGetUserResponse, + type UserSetSuspendedResponse, + type UserDeleteUserParams, + type UserGetAuthenticatedUserParams, + type UserGetUserParams, + type UserSetSuspendedParams, +} from './users'; diff --git a/src/resources/users/pats.ts b/src/resources/users/pats.ts index 9f488ea5..38c83f31 100644 --- a/src/resources/users/pats.ts +++ b/src/resources/users/pats.ts @@ -3,7 +3,11 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import { APIPromise } from '../../core/api-promise'; -import { PagePromise, PersonalAccessTokensPage, type PersonalAccessTokensPageParams } from '../../core/pagination'; +import { + PagePromise, + PersonalAccessTokensPage, + type PersonalAccessTokensPageParams, +} from '../../core/pagination'; import { RequestOptions } from '../../internal/request-options'; export class Pats extends APIResource { @@ -44,9 +48,16 @@ export class Pats extends APIResource { * } * ``` */ - list(params: PatListParams, options?: RequestOptions): PagePromise { - const { token, pageSize, ...body } = params - return this._client.getAPIList('/gitpod.v1.UserService/ListPersonalAccessTokens', PersonalAccessTokensPage, { query: { token, pageSize }, body, method: 'post', ...options }); + list( + params: PatListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.UserService/ListPersonalAccessTokens', + PersonalAccessTokensPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); } /** @@ -112,7 +123,7 @@ export class Pats extends APIResource { } } -export type PersonalAccessTokensPersonalAccessTokensPage = PersonalAccessTokensPage +export type PersonalAccessTokensPersonalAccessTokensPage = PersonalAccessTokensPage; export interface PersonalAccessToken { id?: string; @@ -406,7 +417,7 @@ export interface PersonalAccessToken { userId?: string; } -export type PatDeleteResponse = unknown +export type PatDeleteResponse = unknown; export interface PatGetResponse { pat: PersonalAccessToken; @@ -464,6 +475,6 @@ export declare namespace Pats { type PersonalAccessTokensPersonalAccessTokensPage as PersonalAccessTokensPersonalAccessTokensPage, type PatListParams as PatListParams, type PatDeleteParams as PatDeleteParams, - type PatGetParams as PatGetParams + type PatGetParams as PatGetParams, }; } diff --git a/src/resources/users/users.ts b/src/resources/users/users.ts index d2ead463..f9f4b88d 100644 --- a/src/resources/users/users.ts +++ b/src/resources/users/users.ts @@ -3,9 +3,25 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import * as DotfilesAPI from './dotfiles'; -import { DotfileGetParams, DotfileGetResponse, DotfileSetParams, DotfileSetResponse, Dotfiles, DotfilesConfiguration } from './dotfiles'; +import { + DotfileGetParams, + DotfileGetResponse, + DotfileSetParams, + DotfileSetResponse, + Dotfiles, + DotfilesConfiguration, +} from './dotfiles'; import * as PatsAPI from './pats'; -import { PatDeleteParams, PatDeleteResponse, PatGetParams, PatGetResponse, PatListParams, Pats, PersonalAccessToken, PersonalAccessTokensPersonalAccessTokensPage } from './pats'; +import { + PatDeleteParams, + PatDeleteResponse, + PatGetParams, + PatGetResponse, + PatListParams, + Pats, + PersonalAccessToken, + PersonalAccessTokensPersonalAccessTokensPage, +} from './pats'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; @@ -51,7 +67,10 @@ export class Users extends APIResource { * const response = await client.users.getAuthenticatedUser(); * ``` */ - getAuthenticatedUser(body: UserGetAuthenticatedUserParams, options?: RequestOptions): APIPromise { + getAuthenticatedUser( + body: UserGetAuthenticatedUserParams, + options?: RequestOptions, + ): APIPromise { return this._client.post('/gitpod.v1.UserService/GetAuthenticatedUser', { body, ...options }); } @@ -165,7 +184,7 @@ export interface User { status?: Shared.UserStatus; } -export type UserDeleteUserResponse = unknown +export type UserDeleteUserResponse = unknown; export interface UserGetAuthenticatedUserResponse { user: User; @@ -175,7 +194,7 @@ export interface UserGetUserResponse { user: User; } -export type UserSetSuspendedResponse = unknown +export type UserSetSuspendedResponse = unknown; export interface UserDeleteUserParams { userId?: string; @@ -208,7 +227,7 @@ export declare namespace Users { type UserDeleteUserParams as UserDeleteUserParams, type UserGetAuthenticatedUserParams as UserGetAuthenticatedUserParams, type UserGetUserParams as UserGetUserParams, - type UserSetSuspendedParams as UserSetSuspendedParams + type UserSetSuspendedParams as UserSetSuspendedParams, }; export { @@ -217,7 +236,7 @@ export declare namespace Users { type DotfileGetResponse as DotfileGetResponse, type DotfileSetResponse as DotfileSetResponse, type DotfileGetParams as DotfileGetParams, - type DotfileSetParams as DotfileSetParams + type DotfileSetParams as DotfileSetParams, }; export { @@ -228,6 +247,6 @@ export declare namespace Users { type PersonalAccessTokensPersonalAccessTokensPage as PersonalAccessTokensPersonalAccessTokensPage, type PatListParams as PatListParams, type PatDeleteParams as PatDeleteParams, - type PatGetParams as PatGetParams + type PatGetParams as PatGetParams, }; } diff --git a/src/uploads.ts b/src/uploads.ts index d5437085..b2ef6471 100644 --- a/src/uploads.ts +++ b/src/uploads.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/uploads instead */ -export * from "./core/uploads" \ No newline at end of file +export * from './core/uploads'; diff --git a/src/version.ts b/src/version.ts index ec0d2a73..e2b0672c 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.14.0';// x-release-please-version +export const VERSION = '0.14.0'; // x-release-please-version diff --git a/tests/api-resources/accounts.test.ts b/tests/api-resources/accounts.test.ts index f2017a58..c632b8a1 100644 --- a/tests/api-resources/accounts.test.ts +++ b/tests/api-resources/accounts.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource accounts', () => { // Mock server tests are disabled @@ -31,7 +34,10 @@ describe('resource accounts', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.accounts.delete({ accountId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', reason: 'reason' }); + const response = await client.accounts.delete({ + accountId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', + reason: 'reason', + }); }); // Mock server tests are disabled @@ -48,7 +54,10 @@ describe('resource accounts', () => { // Mock server tests are disabled test.skip('getSSOLoginURL: required and optional params', async () => { - const response = await client.accounts.getSSOLoginURL({ email: 'user@company.com', returnTo: 'https://example.com' }); + const response = await client.accounts.getSSOLoginURL({ + email: 'user@company.com', + returnTo: 'https://example.com', + }); }); // Mock server tests are disabled @@ -90,11 +99,11 @@ describe('resource accounts', () => { // Mock server tests are disabled test.skip('listSSOLogins: required and optional params', async () => { const response = await client.accounts.listSSOLogins({ - email: 'dev@stainless.com', - token: 'token', - pageSize: 0, - pagination: { token: 'token', pageSize: 100 }, - returnTo: 'https://example.com', - }); + email: 'dev@stainless.com', + token: 'token', + pageSize: 0, + pagination: { token: 'token', pageSize: 100 }, + returnTo: 'https://example.com', + }); }); }); diff --git a/tests/api-resources/agents.test.ts b/tests/api-resources/agents.test.ts index a6fe2cad..59366e28 100644 --- a/tests/api-resources/agents.test.ts +++ b/tests/api-resources/agents.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource agents', () => { // Mock server tests are disabled diff --git a/tests/api-resources/automations.test.ts b/tests/api-resources/automations.test.ts index e569f6a3..c91fbf5d 100644 --- a/tests/api-resources/automations.test.ts +++ b/tests/api-resources/automations.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource automations', () => { // Mock server tests are disabled @@ -20,63 +23,69 @@ describe('resource automations', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.automations.create({ - action: { - limits: { - maxParallel: 0, - maxTotal: 0, - perExecution: { maxTime: '+9125115.360s' }, - }, - steps: [{ - agent: { prompt: 'prompt' }, - pullRequest: { - branch: 'branch', - description: 'description', - draft: true, - title: 'title', - }, - task: { command: 'command' }, - }], - }, - description: 'description', - executor: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' }, - name: 'name', - report: { - limits: { - maxParallel: 0, - maxTotal: 0, - perExecution: { maxTime: '+9125115.360s' }, - }, - steps: [{ - agent: { prompt: 'prompt' }, - pullRequest: { - branch: 'branch', - description: 'description', - draft: true, - title: 'title', - }, - task: { command: 'command' }, - }], - }, - triggers: [{ - context: { - agent: { prompt: 'prompt' }, - fromTrigger: {}, - projects: { projectIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'] }, - repositories: { - environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - repoSelector: { repoSearchString: 'x', scmHost: 'x' }, - repositoryUrls: { repoUrls: ['x'] }, - }, - }, - manual: {}, - pullRequest: { - events: ['PULL_REQUEST_EVENT_UNSPECIFIED'], - integrationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - webhookId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }, - time: { cronExpression: 'cronExpression' }, - }], - }); + action: { + limits: { + maxParallel: 0, + maxTotal: 0, + perExecution: { maxTime: '+9125115.360s' }, + }, + steps: [ + { + agent: { prompt: 'prompt' }, + pullRequest: { + branch: 'branch', + description: 'description', + draft: true, + title: 'title', + }, + task: { command: 'command' }, + }, + ], + }, + description: 'description', + executor: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' }, + name: 'name', + report: { + limits: { + maxParallel: 0, + maxTotal: 0, + perExecution: { maxTime: '+9125115.360s' }, + }, + steps: [ + { + agent: { prompt: 'prompt' }, + pullRequest: { + branch: 'branch', + description: 'description', + draft: true, + title: 'title', + }, + task: { command: 'command' }, + }, + ], + }, + triggers: [ + { + context: { + agent: { prompt: 'prompt' }, + fromTrigger: {}, + projects: { projectIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'] }, + repositories: { + environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + repoSelector: { repoSearchString: 'x', scmHost: 'x' }, + repositoryUrls: { repoUrls: ['x'] }, + }, + }, + manual: {}, + pullRequest: { + events: ['PULL_REQUEST_EVENT_UNSPECIFIED'], + integrationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + webhookId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }, + time: { cronExpression: 'cronExpression' }, + }, + ], + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/editors.test.ts b/tests/api-resources/editors.test.ts index d36f7ffa..7ab4511e 100644 --- a/tests/api-resources/editors.test.ts +++ b/tests/api-resources/editors.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource editors', () => { // Mock server tests are disabled @@ -37,10 +40,10 @@ describe('resource editors', () => { // Mock server tests are disabled test.skip('resolveURL: only required params', async () => { const responsePromise = client.editors.resolveURL({ - editorId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + editorId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -53,10 +56,10 @@ describe('resource editors', () => { // Mock server tests are disabled test.skip('resolveURL: required and optional params', async () => { const response = await client.editors.resolveURL({ - editorId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - version: 'version', - }); + editorId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + version: 'version', + }); }); }); diff --git a/tests/api-resources/environments/automations/automations.test.ts b/tests/api-resources/environments/automations/automations.test.ts index e1f526b1..18e6c4c4 100644 --- a/tests/api-resources/environments/automations/automations.test.ts +++ b/tests/api-resources/environments/automations/automations.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource automations', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/automations/services.test.ts b/tests/api-resources/environments/automations/services.test.ts index 310bff59..90acd206 100644 --- a/tests/api-resources/environments/automations/services.test.ts +++ b/tests/api-resources/environments/automations/services.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource services', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/automations/tasks/executions.test.ts b/tests/api-resources/environments/automations/tasks/executions.test.ts index 14c3883b..198d06da 100644 --- a/tests/api-resources/environments/automations/tasks/executions.test.ts +++ b/tests/api-resources/environments/automations/tasks/executions.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource executions', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/automations/tasks/tasks.test.ts b/tests/api-resources/environments/automations/tasks/tasks.test.ts index d993ab76..467bfedc 100644 --- a/tests/api-resources/environments/automations/tasks/tasks.test.ts +++ b/tests/api-resources/environments/automations/tasks/tasks.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource tasks', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/classes.test.ts b/tests/api-resources/environments/classes.test.ts index 9c90fc18..0d97bd45 100644 --- a/tests/api-resources/environments/classes.test.ts +++ b/tests/api-resources/environments/classes.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource classes', () => { // Mock server tests are disabled diff --git a/tests/api-resources/environments/environments.test.ts b/tests/api-resources/environments/environments.test.ts index bb731cb8..f2cec224 100644 --- a/tests/api-resources/environments/environments.test.ts +++ b/tests/api-resources/environments/environments.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource environments', () => { // Mock server tests are disabled @@ -19,7 +22,9 @@ describe('resource environments', () => { // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.environments.retrieve({ environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); + const responsePromise = client.environments.retrieve({ + environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -31,7 +36,9 @@ describe('resource environments', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.environments.retrieve({ environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); + const response = await client.environments.retrieve({ + environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', + }); }); // Mock server tests are disabled @@ -72,7 +79,9 @@ describe('resource environments', () => { // Mock server tests are disabled test.skip('createEnvironmentToken: only required params', async () => { - const responsePromise = client.environments.createEnvironmentToken({ environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); + const responsePromise = client.environments.createEnvironmentToken({ + environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -84,7 +93,9 @@ describe('resource environments', () => { // Mock server tests are disabled test.skip('createEnvironmentToken: required and optional params', async () => { - const response = await client.environments.createEnvironmentToken({ environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); + const response = await client.environments.createEnvironmentToken({ + environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/errors.test.ts b/tests/api-resources/errors.test.ts index 6786d24a..ee413092 100644 --- a/tests/api-resources/errors.test.ts +++ b/tests/api-resources/errors.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource errors', () => { // Mock server tests are disabled diff --git a/tests/api-resources/events.test.ts b/tests/api-resources/events.test.ts index 6c87975f..7cfdf0e8 100644 --- a/tests/api-resources/events.test.ts +++ b/tests/api-resources/events.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource events', () => { // Mock server tests are disabled diff --git a/tests/api-resources/gateways.test.ts b/tests/api-resources/gateways.test.ts index 8daaf21c..4186e205 100644 --- a/tests/api-resources/gateways.test.ts +++ b/tests/api-resources/gateways.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource gateways', () => { // Mock server tests are disabled diff --git a/tests/api-resources/groups/groups.test.ts b/tests/api-resources/groups/groups.test.ts index bfbe844d..3798086c 100644 --- a/tests/api-resources/groups/groups.test.ts +++ b/tests/api-resources/groups/groups.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource groups', () => { // Mock server tests are disabled diff --git a/tests/api-resources/groups/memberships.test.ts b/tests/api-resources/groups/memberships.test.ts index 8e9bd2a2..e9d8ad18 100644 --- a/tests/api-resources/groups/memberships.test.ts +++ b/tests/api-resources/groups/memberships.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource memberships', () => { // Mock server tests are disabled @@ -32,9 +35,9 @@ describe('resource memberships', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.groups.memberships.retrieve({ - subject: { id: 'f53d2330-3795-4c5d-a1f3-453121af9c60', principal: 'PRINCIPAL_USER' }, - groupId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - }); + subject: { id: 'f53d2330-3795-4c5d-a1f3-453121af9c60', principal: 'PRINCIPAL_USER' }, + groupId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/groups/role-assignments.test.ts b/tests/api-resources/groups/role-assignments.test.ts index 34bccb69..6b07ee9c 100644 --- a/tests/api-resources/groups/role-assignments.test.ts +++ b/tests/api-resources/groups/role-assignments.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource roleAssignments', () => { // Mock server tests are disabled diff --git a/tests/api-resources/groups/shares.test.ts b/tests/api-resources/groups/shares.test.ts index 1c5d7dcc..f86d3d6f 100644 --- a/tests/api-resources/groups/shares.test.ts +++ b/tests/api-resources/groups/shares.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource shares', () => { // Mock server tests are disabled diff --git a/tests/api-resources/identity.test.ts b/tests/api-resources/identity.test.ts index 25aa139b..961c99fb 100644 --- a/tests/api-resources/identity.test.ts +++ b/tests/api-resources/identity.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource identity', () => { // Mock server tests are disabled diff --git a/tests/api-resources/organizations/announcement-banner.test.ts b/tests/api-resources/organizations/announcement-banner.test.ts index 2bdbef37..754c8e0f 100644 --- a/tests/api-resources/organizations/announcement-banner.test.ts +++ b/tests/api-resources/organizations/announcement-banner.test.ts @@ -2,12 +2,17 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource announcementBanner', () => { // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.announcementBanner.update({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.announcementBanner.update({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -20,15 +25,17 @@ describe('resource announcementBanner', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.announcementBanner.update({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - enabled: false, - message: 'message', - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + enabled: false, + message: 'message', + }); }); // Mock server tests are disabled test.skip('get: only required params', async () => { - const responsePromise = client.organizations.announcementBanner.get({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.announcementBanner.get({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -40,6 +47,8 @@ describe('resource announcementBanner', () => { // Mock server tests are disabled test.skip('get: required and optional params', async () => { - const response = await client.organizations.announcementBanner.get({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const response = await client.organizations.announcementBanner.get({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); }); }); diff --git a/tests/api-resources/organizations/custom-domains.test.ts b/tests/api-resources/organizations/custom-domains.test.ts index 1f3ecbe9..9dc81ff7 100644 --- a/tests/api-resources/organizations/custom-domains.test.ts +++ b/tests/api-resources/organizations/custom-domains.test.ts @@ -2,12 +2,18 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource customDomains', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.organizations.customDomains.create({ domainName: 'workspaces.acme-corp.com', organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.customDomains.create({ + domainName: 'workspaces.acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -20,17 +26,19 @@ describe('resource customDomains', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.organizations.customDomains.create({ - domainName: 'workspaces.acme-corp.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - awsAccountId: '123456789012', - cloudAccountId: 'cloudAccountId', - provider: 'CUSTOM_DOMAIN_PROVIDER_AWS', - }); + domainName: 'workspaces.acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + awsAccountId: '123456789012', + cloudAccountId: 'cloudAccountId', + provider: 'CUSTOM_DOMAIN_PROVIDER_AWS', + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.customDomains.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.customDomains.retrieve({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -42,12 +50,17 @@ describe('resource customDomains', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.customDomains.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const response = await client.organizations.customDomains.retrieve({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.customDomains.update({ domainName: 'workspaces.acme-corp.com', organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.customDomains.update({ + domainName: 'workspaces.acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -60,17 +73,19 @@ describe('resource customDomains', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.customDomains.update({ - domainName: 'workspaces.acme-corp.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - awsAccountId: '987654321098', - cloudAccountId: 'cloudAccountId', - provider: 'CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED', - }); + domainName: 'workspaces.acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + awsAccountId: '987654321098', + cloudAccountId: 'cloudAccountId', + provider: 'CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED', + }); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.customDomains.delete({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.customDomains.delete({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -82,6 +97,8 @@ describe('resource customDomains', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.customDomains.delete({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const response = await client.organizations.customDomains.delete({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); }); }); diff --git a/tests/api-resources/organizations/domain-verifications.test.ts b/tests/api-resources/organizations/domain-verifications.test.ts index 1c859231..c204dd68 100644 --- a/tests/api-resources/organizations/domain-verifications.test.ts +++ b/tests/api-resources/organizations/domain-verifications.test.ts @@ -2,12 +2,18 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.create({ domain: 'acme-corp.com', organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.domainVerifications.create({ + domain: 'acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -19,12 +25,17 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { - const response = await client.organizations.domainVerifications.create({ domain: 'acme-corp.com', organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const response = await client.organizations.domainVerifications.create({ + domain: 'acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.retrieve({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.domainVerifications.retrieve({ + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -36,12 +47,16 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.domainVerifications.retrieve({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const response = await client.organizations.domainVerifications.retrieve({ + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); // Mock server tests are disabled test.skip('list: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.list({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.domainVerifications.list({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -54,16 +69,18 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.organizations.domainVerifications.list({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - token: 'token', - pageSize: 0, - pagination: { token: 'token', pageSize: 20 }, - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + token: 'token', + pageSize: 0, + pagination: { token: 'token', pageSize: 20 }, + }); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.delete({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.domainVerifications.delete({ + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -75,12 +92,16 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.domainVerifications.delete({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const response = await client.organizations.domainVerifications.delete({ + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); // Mock server tests are disabled test.skip('verify: only required params', async () => { - const responsePromise = client.organizations.domainVerifications.verify({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.domainVerifications.verify({ + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -92,6 +113,8 @@ describe('resource domainVerifications', () => { // Mock server tests are disabled test.skip('verify: required and optional params', async () => { - const response = await client.organizations.domainVerifications.verify({ domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const response = await client.organizations.domainVerifications.verify({ + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); }); diff --git a/tests/api-resources/organizations/invites.test.ts b/tests/api-resources/organizations/invites.test.ts index a84ac21f..5b82ca98 100644 --- a/tests/api-resources/organizations/invites.test.ts +++ b/tests/api-resources/organizations/invites.test.ts @@ -2,12 +2,17 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource invites', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.organizations.invites.create({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.invites.create({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -19,12 +24,16 @@ describe('resource invites', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { - const response = await client.organizations.invites.create({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const response = await client.organizations.invites.create({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.invites.retrieve({ organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }); + const responsePromise = client.organizations.invites.retrieve({ + organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -36,12 +45,16 @@ describe('resource invites', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.invites.retrieve({ organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }); + const response = await client.organizations.invites.retrieve({ + organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }); }); // Mock server tests are disabled test.skip('getSummary: only required params', async () => { - const responsePromise = client.organizations.invites.getSummary({ inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.invites.getSummary({ + inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -53,6 +66,8 @@ describe('resource invites', () => { // Mock server tests are disabled test.skip('getSummary: required and optional params', async () => { - const response = await client.organizations.invites.getSummary({ inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const response = await client.organizations.invites.getSummary({ + inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); }); diff --git a/tests/api-resources/organizations/organizations.test.ts b/tests/api-resources/organizations/organizations.test.ts index 21f88fca..89665f2b 100644 --- a/tests/api-resources/organizations/organizations.test.ts +++ b/tests/api-resources/organizations/organizations.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource organizations', () => { // Mock server tests are disabled @@ -20,15 +23,17 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.organizations.create({ - name: 'Acme Corp Engineering', - inviteAccountsWithMatchingDomain: true, - joinOrganization: true, - }); + name: 'Acme Corp Engineering', + inviteAccountsWithMatchingDomain: true, + joinOrganization: true, + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.retrieve({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -40,12 +45,16 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const response = await client.organizations.retrieve({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.update({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.update({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -58,15 +67,17 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.update({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - inviteDomains: { domains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'] }, - name: 'name', - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + inviteDomains: { domains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'] }, + name: 'name', + }); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.delete({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.delete({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -78,7 +89,9 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.delete({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const response = await client.organizations.delete({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); }); // Mock server tests are disabled @@ -112,7 +125,9 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('listMembers: only required params', async () => { - const responsePromise = client.organizations.listMembers({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.listMembers({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -125,25 +140,28 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('listMembers: required and optional params', async () => { const response = await client.organizations.listMembers({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - token: 'token', - pageSize: 0, - filter: { - excludeGroupIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], - excludeMembersInAnyTeam: true, - roles: ['ORGANIZATION_ROLE_UNSPECIFIED'], - search: 'search', - statuses: ['USER_STATUS_UNSPECIFIED'], - userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], - }, - pagination: { token: 'token', pageSize: 20 }, - sort: { field: 'SORT_FIELD_UNSPECIFIED', order: 'SORT_ORDER_UNSPECIFIED' }, - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + token: 'token', + pageSize: 0, + filter: { + excludeGroupIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], + excludeMembersInAnyTeam: true, + roles: ['ORGANIZATION_ROLE_UNSPECIFIED'], + search: 'search', + statuses: ['USER_STATUS_UNSPECIFIED'], + userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], + }, + pagination: { token: 'token', pageSize: 20 }, + sort: { field: 'SORT_FIELD_UNSPECIFIED', order: 'SORT_ORDER_UNSPECIFIED' }, + }); }); // Mock server tests are disabled test.skip('setRole: only required params', async () => { - const responsePromise = client.organizations.setRole({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60' }); + const responsePromise = client.organizations.setRole({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -156,9 +174,9 @@ describe('resource organizations', () => { // Mock server tests are disabled test.skip('setRole: required and optional params', async () => { const response = await client.organizations.setRole({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', - role: 'ORGANIZATION_ROLE_MEMBER', - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', + role: 'ORGANIZATION_ROLE_MEMBER', + }); }); }); diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 34203f92..7fd9de1a 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -2,12 +2,17 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource policies', () => { // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.policies.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.policies.retrieve({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -19,12 +24,16 @@ describe('resource policies', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.policies.retrieve({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const response = await client.organizations.policies.retrieve({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.policies.update({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.policies.update({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -37,42 +46,44 @@ describe('resource policies', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.policies.update({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - agentPolicy: { - commandDenyList: ['string'], - conversationSharingPolicy: 'CONVERSATION_SHARING_POLICY_UNSPECIFIED', - maxSubagentsPerEnvironment: 10, - mcpDisabled: true, - scmToolsAllowedGroupId: 'scmToolsAllowedGroupId', - scmToolsDisabled: true, - }, - allowedEditorIds: ['string'], - allowLocalRunners: true, - defaultEditorId: 'defaultEditorId', - defaultEnvironmentImage: 'defaultEnvironmentImage', - deleteArchivedEnvironmentsAfter: '+9125115.360s', - editorVersionRestrictions: { foo: { allowedVersions: ['string'] } }, - maximumEnvironmentLifetime: '+9125115.360s', - maximumEnvironmentsPerUser: '20', - maximumEnvironmentTimeout: '3600s', - maximumRunningEnvironmentsPerUser: '5', - membersCreateProjects: true, - membersRequireProjects: true, - portSharingDisabled: true, - requireCustomDomainAccess: true, - restrictAccountCreationToScim: true, - securityAgentPolicy: { crowdstrike: { - additionalOptions: { foo: 'string' }, - cidSecretId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - enabled: true, - image: 'image', - tags: 'tags', - } }, - vetoExecPolicy: { - action: 'KERNEL_CONTROLS_ACTION_UNSPECIFIED', - enabled: true, - executables: ['string'], - }, - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + agentPolicy: { + commandDenyList: ['string'], + conversationSharingPolicy: 'CONVERSATION_SHARING_POLICY_UNSPECIFIED', + maxSubagentsPerEnvironment: 10, + mcpDisabled: true, + scmToolsAllowedGroupId: 'scmToolsAllowedGroupId', + scmToolsDisabled: true, + }, + allowedEditorIds: ['string'], + allowLocalRunners: true, + defaultEditorId: 'defaultEditorId', + defaultEnvironmentImage: 'defaultEnvironmentImage', + deleteArchivedEnvironmentsAfter: '+9125115.360s', + editorVersionRestrictions: { foo: { allowedVersions: ['string'] } }, + maximumEnvironmentLifetime: '+9125115.360s', + maximumEnvironmentsPerUser: '20', + maximumEnvironmentTimeout: '3600s', + maximumRunningEnvironmentsPerUser: '5', + membersCreateProjects: true, + membersRequireProjects: true, + portSharingDisabled: true, + requireCustomDomainAccess: true, + restrictAccountCreationToScim: true, + securityAgentPolicy: { + crowdstrike: { + additionalOptions: { foo: 'string' }, + cidSecretId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + enabled: true, + image: 'image', + tags: 'tags', + }, + }, + vetoExecPolicy: { + action: 'KERNEL_CONTROLS_ACTION_UNSPECIFIED', + enabled: true, + executables: ['string'], + }, + }); }); }); diff --git a/tests/api-resources/organizations/scim-configurations.test.ts b/tests/api-resources/organizations/scim-configurations.test.ts index de8c02fa..bf121156 100644 --- a/tests/api-resources/organizations/scim-configurations.test.ts +++ b/tests/api-resources/organizations/scim-configurations.test.ts @@ -2,12 +2,18 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.create({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.scimConfigurations.create({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -20,16 +26,18 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.organizations.scimConfigurations.create({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - name: 'name', - tokenExpiresIn: '+9125115.360s', - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + name: 'name', + tokenExpiresIn: '+9125115.360s', + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.retrieve({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.scimConfigurations.retrieve({ + scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -41,12 +49,16 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.scimConfigurations.retrieve({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const response = await client.organizations.scimConfigurations.retrieve({ + scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.update({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.scimConfigurations.update({ + scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -59,11 +71,11 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.scimConfigurations.update({ - scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - enabled: false, - name: 'name', - ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }); + scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + enabled: false, + name: 'name', + ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }); }); // Mock server tests are disabled @@ -80,7 +92,9 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.delete({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.scimConfigurations.delete({ + scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -92,12 +106,16 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.scimConfigurations.delete({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const response = await client.organizations.scimConfigurations.delete({ + scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); // Mock server tests are disabled test.skip('regenerateToken: only required params', async () => { - const responsePromise = client.organizations.scimConfigurations.regenerateToken({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.scimConfigurations.regenerateToken({ + scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -109,6 +127,9 @@ describe('resource scimConfigurations', () => { // Mock server tests are disabled test.skip('regenerateToken: required and optional params', async () => { - const response = await client.organizations.scimConfigurations.regenerateToken({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', tokenExpiresIn: '+9125115.360s' }); + const response = await client.organizations.scimConfigurations.regenerateToken({ + scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + tokenExpiresIn: '+9125115.360s', + }); }); }); diff --git a/tests/api-resources/organizations/sso-configurations.test.ts b/tests/api-resources/organizations/sso-configurations.test.ts index 34d6b6c1..e6304844 100644 --- a/tests/api-resources/organizations/sso-configurations.test.ts +++ b/tests/api-resources/organizations/sso-configurations.test.ts @@ -2,17 +2,20 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.organizations.ssoConfigurations.create({ - clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', - clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', - issuerUrl: 'https://accounts.google.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - }); + clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', + clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', + issuerUrl: 'https://accounts.google.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -25,21 +28,23 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.create({ - clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', - clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', - issuerUrl: 'https://accounts.google.com', - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - additionalScopes: ['x'], - claimsExpression: 'claimsExpression', - displayName: 'displayName', - emailDomain: 'acme-corp.com', - emailDomains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'], - }); + clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', + clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', + issuerUrl: 'https://accounts.google.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + additionalScopes: ['x'], + claimsExpression: 'claimsExpression', + displayName: 'displayName', + emailDomain: 'acme-corp.com', + emailDomains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'], + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.organizations.ssoConfigurations.retrieve({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.ssoConfigurations.retrieve({ + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -51,12 +56,16 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.organizations.ssoConfigurations.retrieve({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const response = await client.organizations.ssoConfigurations.retrieve({ + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.organizations.ssoConfigurations.update({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.ssoConfigurations.update({ + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -69,23 +78,25 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.update({ - ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - additionalScopes: { scopes: ['x'] }, - claims: { foo: 'string' }, - claimsExpression: 'claimsExpression', - clientId: 'new-client-id', - clientSecret: 'new-client-secret', - displayName: 'displayName', - emailDomain: 'xxxx', - emailDomains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'], - issuerUrl: 'https://example.com', - state: 'SSO_CONFIGURATION_STATE_UNSPECIFIED', - }); + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + additionalScopes: { scopes: ['x'] }, + claims: { foo: 'string' }, + claimsExpression: 'claimsExpression', + clientId: 'new-client-id', + clientSecret: 'new-client-secret', + displayName: 'displayName', + emailDomain: 'xxxx', + emailDomains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'], + issuerUrl: 'https://example.com', + state: 'SSO_CONFIGURATION_STATE_UNSPECIFIED', + }); }); // Mock server tests are disabled test.skip('list: only required params', async () => { - const responsePromise = client.organizations.ssoConfigurations.list({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.organizations.ssoConfigurations.list({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -98,16 +109,18 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.list({ - organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - token: 'token', - pageSize: 0, - pagination: { token: 'token', pageSize: 20 }, - }); + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + token: 'token', + pageSize: 0, + pagination: { token: 'token', pageSize: 20 }, + }); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.organizations.ssoConfigurations.delete({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const responsePromise = client.organizations.ssoConfigurations.delete({ + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -119,6 +132,8 @@ describe('resource ssoConfigurations', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.organizations.ssoConfigurations.delete({ ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' }); + const response = await client.organizations.ssoConfigurations.delete({ + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); }); }); diff --git a/tests/api-resources/prebuilds.test.ts b/tests/api-resources/prebuilds.test.ts index ffbfeb59..9308e71c 100644 --- a/tests/api-resources/prebuilds.test.ts +++ b/tests/api-resources/prebuilds.test.ts @@ -2,15 +2,18 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.prebuilds.create({ - projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - spec: {}, - }); + projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + spec: {}, + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,14 +26,14 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.prebuilds.create({ - projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - spec: { - desiredPhase: 'PREBUILD_PHASE_UNSPECIFIED', - specVersion: 'specVersion', - timeout: '3600s', - }, - environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - }); + projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + spec: { + desiredPhase: 'PREBUILD_PHASE_UNSPECIFIED', + specVersion: 'specVersion', + timeout: '3600s', + }, + environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + }); }); // Mock server tests are disabled @@ -98,7 +101,9 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('createLogsToken: only required params', async () => { - const responsePromise = client.prebuilds.createLogsToken({ prebuildId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); + const responsePromise = client.prebuilds.createLogsToken({ + prebuildId: '07e03a28-65a5-4d98-b532-8ea67b188048', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -110,12 +115,17 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('createLogsToken: required and optional params', async () => { - const response = await client.prebuilds.createLogsToken({ prebuildId: '07e03a28-65a5-4d98-b532-8ea67b188048' }); + const response = await client.prebuilds.createLogsToken({ + prebuildId: '07e03a28-65a5-4d98-b532-8ea67b188048', + }); }); // Mock server tests are disabled test.skip('createWarmPool: only required params', async () => { - const responsePromise = client.prebuilds.createWarmPool({ environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047' }); + const responsePromise = client.prebuilds.createWarmPool({ + environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -128,17 +138,19 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('createWarmPool: required and optional params', async () => { const response = await client.prebuilds.createWarmPool({ - environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', - projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', - desiredSize: 2, - maxSize: 1, - minSize: 20, - }); + environmentClassId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + projectId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + desiredSize: 2, + maxSize: 1, + minSize: 20, + }); }); // Mock server tests are disabled test.skip('deleteWarmPool: only required params', async () => { - const responsePromise = client.prebuilds.deleteWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); + const responsePromise = client.prebuilds.deleteWarmPool({ + warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -150,7 +162,9 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('deleteWarmPool: required and optional params', async () => { - const response = await client.prebuilds.deleteWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); + const response = await client.prebuilds.deleteWarmPool({ + warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', + }); }); // Mock server tests are disabled @@ -167,7 +181,9 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('retrieveWarmPool: only required params', async () => { - const responsePromise = client.prebuilds.retrieveWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); + const responsePromise = client.prebuilds.retrieveWarmPool({ + warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -179,12 +195,16 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('retrieveWarmPool: required and optional params', async () => { - const response = await client.prebuilds.retrieveWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); + const response = await client.prebuilds.retrieveWarmPool({ + warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', + }); }); // Mock server tests are disabled test.skip('updateWarmPool: only required params', async () => { - const responsePromise = client.prebuilds.updateWarmPool({ warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab' }); + const responsePromise = client.prebuilds.updateWarmPool({ + warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -197,10 +217,10 @@ describe('resource prebuilds', () => { // Mock server tests are disabled test.skip('updateWarmPool: required and optional params', async () => { const response = await client.prebuilds.updateWarmPool({ - warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', - desiredSize: 5, - maxSize: 1, - minSize: 20, - }); + warmPoolId: 'a1b2c3d4-5678-9abc-def0-1234567890ab', + desiredSize: 5, + maxSize: 1, + minSize: 20, + }); }); }); diff --git a/tests/api-resources/projects/environment-clases.test.ts b/tests/api-resources/projects/environment-clases.test.ts index 76b09828..bd248651 100644 --- a/tests/api-resources/projects/environment-clases.test.ts +++ b/tests/api-resources/projects/environment-clases.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource environmentClases', () => { // Mock server tests are disabled diff --git a/tests/api-resources/projects/policies.test.ts b/tests/api-resources/projects/policies.test.ts index 41c45bca..7a394d6c 100644 --- a/tests/api-resources/projects/policies.test.ts +++ b/tests/api-resources/projects/policies.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource policies', () => { // Mock server tests are disabled diff --git a/tests/api-resources/projects/projects.test.ts b/tests/api-resources/projects/projects.test.ts index 5c11639c..7de717d1 100644 --- a/tests/api-resources/projects/projects.test.ts +++ b/tests/api-resources/projects/projects.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource projects', () => { // Mock server tests are disabled @@ -20,29 +23,33 @@ describe('resource projects', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.projects.create({ - initializer: { specs: [{ - contextUrl: { url: 'https://example.com' }, - git: { - checkoutLocation: 'checkoutLocation', - cloneTarget: 'cloneTarget', - remoteUri: 'https://github.com/org/repo', - targetMode: 'CLONE_TARGET_MODE_UNSPECIFIED', - upstreamRemoteUri: 'upstreamRemoteUri', - }, - }] }, - automationsFilePath: 'automationsFilePath', - devcontainerFilePath: 'devcontainerFilePath', - name: 'Web Application', - prebuildConfiguration: { - enabled: true, - enableJetbrainsWarmup: true, - environmentClassIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], - executor: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' }, - timeout: '+9125115.360s', - trigger: { dailySchedule: { hourUtc: 23 } }, - }, - technicalDescription: 'technicalDescription', - }); + initializer: { + specs: [ + { + contextUrl: { url: 'https://example.com' }, + git: { + checkoutLocation: 'checkoutLocation', + cloneTarget: 'cloneTarget', + remoteUri: 'https://github.com/org/repo', + targetMode: 'CLONE_TARGET_MODE_UNSPECIFIED', + upstreamRemoteUri: 'upstreamRemoteUri', + }, + }, + ], + }, + automationsFilePath: 'automationsFilePath', + devcontainerFilePath: 'devcontainerFilePath', + name: 'Web Application', + prebuildConfiguration: { + enabled: true, + enableJetbrainsWarmup: true, + environmentClassIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], + executor: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' }, + timeout: '+9125115.360s', + trigger: { dailySchedule: { hourUtc: 23 } }, + }, + technicalDescription: 'technicalDescription', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/configurations.test.ts b/tests/api-resources/runners/configurations/configurations.test.ts index 9a9e4ec2..5c85a81f 100644 --- a/tests/api-resources/runners/configurations/configurations.test.ts +++ b/tests/api-resources/runners/configurations/configurations.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource configurations', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/environment-classes.test.ts b/tests/api-resources/runners/configurations/environment-classes.test.ts index d00909dd..14262aca 100644 --- a/tests/api-resources/runners/configurations/environment-classes.test.ts +++ b/tests/api-resources/runners/configurations/environment-classes.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource environmentClasses', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/host-authentication-tokens.test.ts b/tests/api-resources/runners/configurations/host-authentication-tokens.test.ts index 110d607c..5f9d135d 100644 --- a/tests/api-resources/runners/configurations/host-authentication-tokens.test.ts +++ b/tests/api-resources/runners/configurations/host-authentication-tokens.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource hostAuthenticationTokens', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/schema.test.ts b/tests/api-resources/runners/configurations/schema.test.ts index 316cb444..006eb617 100644 --- a/tests/api-resources/runners/configurations/schema.test.ts +++ b/tests/api-resources/runners/configurations/schema.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource schema', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/configurations/scm-integrations.test.ts b/tests/api-resources/runners/configurations/scm-integrations.test.ts index 78ecf6a1..9aa22598 100644 --- a/tests/api-resources/runners/configurations/scm-integrations.test.ts +++ b/tests/api-resources/runners/configurations/scm-integrations.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource scmIntegrations', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/policies.test.ts b/tests/api-resources/runners/policies.test.ts index 95fac404..8a1fcd5a 100644 --- a/tests/api-resources/runners/policies.test.ts +++ b/tests/api-resources/runners/policies.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource policies', () => { // Mock server tests are disabled diff --git a/tests/api-resources/runners/runners.test.ts b/tests/api-resources/runners/runners.test.ts index d23126ee..8fae36b4 100644 --- a/tests/api-resources/runners/runners.test.ts +++ b/tests/api-resources/runners/runners.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource runners', () => { // Mock server tests are disabled diff --git a/tests/api-resources/secrets.test.ts b/tests/api-resources/secrets.test.ts index 833f0aa7..1d657a98 100644 --- a/tests/api-resources/secrets.test.ts +++ b/tests/api-resources/secrets.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource secrets', () => { // Mock server tests are disabled diff --git a/tests/api-resources/usage.test.ts b/tests/api-resources/usage.test.ts index 77f85ca6..5fc407b3 100644 --- a/tests/api-resources/usage.test.ts +++ b/tests/api-resources/usage.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource usage', () => { // Mock server tests are disabled diff --git a/tests/api-resources/users/dotfiles.test.ts b/tests/api-resources/users/dotfiles.test.ts index c2e381f0..55f4ed54 100644 --- a/tests/api-resources/users/dotfiles.test.ts +++ b/tests/api-resources/users/dotfiles.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource dotfiles', () => { // Mock server tests are disabled diff --git a/tests/api-resources/users/pats.test.ts b/tests/api-resources/users/pats.test.ts index c3790ac3..2c4b2bbc 100644 --- a/tests/api-resources/users/pats.test.ts +++ b/tests/api-resources/users/pats.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource pats', () => { // Mock server tests are disabled diff --git a/tests/api-resources/users/users.test.ts b/tests/api-resources/users/users.test.ts index 3ebdb693..4d1f2e32 100644 --- a/tests/api-resources/users/users.test.ts +++ b/tests/api-resources/users/users.test.ts @@ -2,7 +2,10 @@ import Gitpod from '@gitpod/sdk'; -const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); describe('resource users', () => { // Mock server tests are disabled diff --git a/tests/index.test.ts b/tests/index.test.ts index b0a4eabf..6acc8cc9 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -21,10 +21,10 @@ describe('instantiate client', () => { describe('defaultHeaders', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-My-Default-Header': '2' }, - bearerToken: 'My Bearer Token', -}) + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-My-Default-Header': '2' }, + bearerToken: 'My Bearer Token', + }); test('they are used in the request', async () => { const { req } = await client.buildRequest({ path: '/foo', method: 'post' }); @@ -49,191 +49,193 @@ describe('instantiate client', () => { expect(req.headers.has('x-my-default-header')).toBe(false); }); }); -describe('logging', () => { - const env = process.env; + describe('logging', () => { + const env = process.env; - beforeEach(() => { - process.env = { ...env }; - process.env['GITPOD_LOG'] = undefined; - }); + beforeEach(() => { + process.env = { ...env }; + process.env['GITPOD_LOG'] = undefined; + }); - afterEach(() => { - process.env = env; - }); + afterEach(() => { + process.env = env; + }); - const forceAPIResponseForClient = async (client: Gitpod) => { - await new APIPromise( - client, - Promise.resolve({ - response: new Response(), - controller: new AbortController(), - requestLogID: 'log_000000', - retryOfRequestLogID: undefined, - startTime: Date.now(), - options: { - method: 'get', - path: '/', - }, - }), - ); - }; - - test('debug logs when log level is debug', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), + const forceAPIResponseForClient = async (client: Gitpod) => { + await new APIPromise( + client, + Promise.resolve({ + response: new Response(), + controller: new AbortController(), + requestLogID: 'log_000000', + retryOfRequestLogID: undefined, + startTime: Date.now(), + options: { + method: 'get', + path: '/', + }, + }), + ); }; - const client = new Gitpod({ - logger: logger, - logLevel: 'debug', - bearerToken: 'My Bearer Token', -}); + test('debug logs when log level is debug', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + const client = new Gitpod({ + logger: logger, + logLevel: 'debug', + bearerToken: 'My Bearer Token', + }); - test('default logLevel is warn', async () => { - const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.logLevel).toBe('warn'); - }); + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - test('debug logs are skipped when log level is info', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('default logLevel is warn', async () => { + const client = new Gitpod({ bearerToken: 'My Bearer Token' }); + expect(client.logLevel).toBe('warn'); + }); - const client = new Gitpod({ - logger: logger, - logLevel: 'info', - bearerToken: 'My Bearer Token', -}); + test('debug logs are skipped when log level is info', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + const client = new Gitpod({ + logger: logger, + logLevel: 'info', + bearerToken: 'My Bearer Token', + }); - test('debug logs happen with debug env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - process.env['GITPOD_LOG'] = 'debug'; - const client = new Gitpod({ logger: logger, bearerToken: 'My Bearer Token' }); - expect(client.logLevel).toBe('debug'); + test('debug logs happen with debug env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + process.env['GITPOD_LOG'] = 'debug'; + const client = new Gitpod({ logger: logger, bearerToken: 'My Bearer Token' }); + expect(client.logLevel).toBe('debug'); - test('warn when env var level is invalid', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - process.env['GITPOD_LOG'] = 'not a log level'; - const client = new Gitpod({ logger: logger, bearerToken: 'My Bearer Token' }); - expect(client.logLevel).toBe('warn'); - expect(warnMock).toHaveBeenCalledWith('process.env[\'GITPOD_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]'); - }); + test('warn when env var level is invalid', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; - test('client log level overrides env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + process.env['GITPOD_LOG'] = 'not a log level'; + const client = new Gitpod({ logger: logger, bearerToken: 'My Bearer Token' }); + expect(client.logLevel).toBe('warn'); + expect(warnMock).toHaveBeenCalledWith( + 'process.env[\'GITPOD_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]', + ); + }); - process.env['GITPOD_LOG'] = 'debug'; - const client = new Gitpod({ - logger: logger, - logLevel: 'off', - bearerToken: 'My Bearer Token', -}); + test('client log level overrides env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + process.env['GITPOD_LOG'] = 'debug'; + const client = new Gitpod({ + logger: logger, + logLevel: 'off', + bearerToken: 'My Bearer Token', + }); - test('no warning logged for invalid env var level + valid client level', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - process.env['GITPOD_LOG'] = 'not a log level'; - const client = new Gitpod({ - logger: logger, - logLevel: 'debug', - bearerToken: 'My Bearer Token', -}); - expect(client.logLevel).toBe('debug'); - expect(warnMock).not.toHaveBeenCalled(); + test('no warning logged for invalid env var level + valid client level', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; + + process.env['GITPOD_LOG'] = 'not a log level'; + const client = new Gitpod({ + logger: logger, + logLevel: 'debug', + bearerToken: 'My Bearer Token', + }); + expect(client.logLevel).toBe('debug'); + expect(warnMock).not.toHaveBeenCalled(); + }); }); -}); describe('defaultQuery', () => { test('with null query params given', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo' }, - bearerToken: 'My Bearer Token', -}); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo' }, + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo'); }); test('multiple default query params', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo', hello: 'world' }, - bearerToken: 'My Bearer Token', -}); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo', hello: 'world' }, + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo&hello=world'); }); test('overriding with `undefined`', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultQuery: { hello: 'world' }, - bearerToken: 'My Bearer Token', -}) + baseURL: 'http://localhost:5000/', + defaultQuery: { hello: 'world' }, + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', { hello: undefined })).toEqual('http://localhost:5000/foo'); }); }); test('custom fetch', async () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - bearerToken: 'My Bearer Token', - fetch: (url) => { - return Promise.resolve( - new Response(JSON.stringify({ url, custom: true }), { - headers: { 'Content-Type': 'application/json' }, - }), - ); -}, -}); + baseURL: 'http://localhost:5000/', + bearerToken: 'My Bearer Token', + fetch: (url) => { + return Promise.resolve( + new Response(JSON.stringify({ url, custom: true }), { + headers: { 'Content-Type': 'application/json' }, + }), + ); + }, + }); const response = await client.get('/foo'); expect(response).toEqual({ url: 'http://localhost:5000/foo', custom: true }); @@ -242,37 +244,35 @@ describe('logging', () => { test('explicit global fetch', async () => { // make sure the global fetch type is assignable to our Fetch type const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - bearerToken: 'My Bearer Token', - fetch: defaultFetch, -}); + baseURL: 'http://localhost:5000/', + bearerToken: 'My Bearer Token', + fetch: defaultFetch, + }); }); test('custom signal', async () => { const client = new Gitpod({ - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', - bearerToken: 'My Bearer Token', - fetch: (...args) => { - return new Promise((resolve, reject) => - setTimeout( - () => - defaultFetch(...args) - .then(resolve) - .catch(reject), - 300, - ), - ); -}, -}); + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + bearerToken: 'My Bearer Token', + fetch: (...args) => { + return new Promise((resolve, reject) => + setTimeout( + () => + defaultFetch(...args) + .then(resolve) + .catch(reject), + 300, + ), + ); + }, + }); const controller = new AbortController(); setTimeout(() => controller.abort(), 200); const spy = jest.spyOn(client, 'request'); - await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError( - APIUserAbortError, - ); + await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError(APIUserAbortError); expect(spy).toHaveBeenCalledTimes(1); }); @@ -284,10 +284,10 @@ describe('logging', () => { }; const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - bearerToken: 'My Bearer Token', - fetch: testFetch, -}); + baseURL: 'http://localhost:5000/', + bearerToken: 'My Bearer Token', + fetch: testFetch, + }); await client.patch('/foo'); expect(capturedRequest?.method).toEqual('PATCH'); @@ -295,12 +295,18 @@ describe('logging', () => { describe('baseUrl', () => { test('trailing slash', () => { - const client = new Gitpod({ baseURL: 'http://localhost:5000/custom/path/', bearerToken: 'My Bearer Token' }); + const client = new Gitpod({ + baseURL: 'http://localhost:5000/custom/path/', + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); test('no trailing slash', () => { - const client = new Gitpod({ baseURL: 'http://localhost:5000/custom/path', bearerToken: 'My Bearer Token' }); + const client = new Gitpod({ + baseURL: 'http://localhost:5000/custom/path', + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); @@ -322,29 +328,35 @@ describe('logging', () => { test('empty env variable', () => { process.env['GITPOD_BASE_URL'] = ''; // empty const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.baseURL).toEqual('https://app.gitpod.io/api') + expect(client.baseURL).toEqual('https://app.gitpod.io/api'); }); test('blank env variable', () => { process.env['GITPOD_BASE_URL'] = ' '; // blank const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.baseURL).toEqual('https://app.gitpod.io/api') + expect(client.baseURL).toEqual('https://app.gitpod.io/api'); }); test('in request options', () => { const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/option/foo'); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( + 'http://localhost:5000/option/foo', + ); }); test('in request options overridden by client options', () => { const client = new Gitpod({ bearerToken: 'My Bearer Token', baseURL: 'http://localhost:5000/client' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/client/foo'); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( + 'http://localhost:5000/client/foo', + ); }); test('in request options overridden by env variable', () => { process.env['GITPOD_BASE_URL'] = 'http://localhost:5000/env'; const client = new Gitpod({ bearerToken: 'My Bearer Token' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/env/foo'); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( + 'http://localhost:5000/env/foo', + ); }); }); @@ -360,10 +372,10 @@ describe('logging', () => { describe('withOptions', () => { test('creates a new client with overridden options', async () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - maxRetries: 3, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + maxRetries: 3, + bearerToken: 'My Bearer Token', + }); const newClient = client.withOptions({ maxRetries: 5, @@ -385,11 +397,11 @@ describe('logging', () => { test('inherits options from the parent client', async () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-Test-Header': 'test-value' }, - defaultQuery: { 'test-param': 'test-value' }, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-Test-Header': 'test-value' }, + defaultQuery: { 'test-param': 'test-value' }, + bearerToken: 'My Bearer Token', + }); const newClient = client.withOptions({ baseURL: 'http://localhost:5001/', @@ -404,10 +416,10 @@ describe('logging', () => { test('respects runtime property changes when creating new client', () => { const client = new Gitpod({ - baseURL: 'http://localhost:5000/', - timeout: 1000, - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + timeout: 1000, + bearerToken: 'My Bearer Token', + }); // Modify the client properties directly after creation client.baseURL = 'http://localhost:6000/'; @@ -453,13 +465,18 @@ describe('request building', () => { describe('custom headers', () => { test('handles undefined', async () => { - const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: { value: 'hello' }, headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null } }); + const { req } = await client.buildRequest({ + path: '/foo', + method: 'post', + body: { value: 'hello' }, + headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null }, + }); expect(req.headers.get('x-foo')).toEqual('bar'); expect(req.headers.get('x-Foo')).toEqual('bar'); expect(req.headers.get('X-Foo')).toEqual('bar'); expect(req.headers.get('x-baz')).toEqual(null); }); - }) + }); }); describe('default encoder', () => { @@ -536,37 +553,40 @@ describe('default encoder', () => { describe('retries', () => { test('retry on timeout', async () => { let count = 0; - const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { - if (count++ === 0) { - return new Promise((resolve, reject) => - signal?.addEventListener('abort', () => reject(new Error('timed out'))), - ); - } - return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); - }; - - const client = new Gitpod({ - bearerToken: 'My Bearer Token', - timeout: 10, - fetch: testFetch, - }); + const testFetch = async ( + url: string | URL | Request, + { signal }: RequestInit = {}, + ): Promise => { + if (count++ === 0) { + return new Promise( + (resolve, reject) => signal?.addEventListener('abort', () => reject(new Error('timed out'))), + ); + } + return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); + }; - expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); - expect(count).toEqual(2); - expect( - await client - .request({ path: '/foo', method: 'get' }) - .asResponse() - .then((r) => r.text()), - ).toEqual(JSON.stringify({ a: 1 })); - expect(count).toEqual(3); + const client = new Gitpod({ + bearerToken: 'My Bearer Token', + timeout: 10, + fetch: testFetch, }); + expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); + expect(count).toEqual(2); + expect( + await client + .request({ path: '/foo', method: 'get' }) + .asResponse() + .then((r) => r.text()), + ).toEqual(JSON.stringify({ a: 1 })); + expect(count).toEqual(3); + }); + test('retry count header', async () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++ + count++; if (count <= 2) { return new Response(undefined, { status: 429, @@ -580,10 +600,10 @@ describe('retries', () => { }; const client = new Gitpod({ - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); @@ -595,7 +615,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++ + count++; if (count <= 2) { return new Response(undefined, { status: 429, @@ -608,10 +628,10 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new Gitpod({ - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -628,7 +648,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++ + count++; if (count <= 2) { return new Response(undefined, { status: 429, @@ -641,11 +661,11 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new Gitpod({ - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - defaultHeaders: { 'X-Stainless-Retry-Count': null }, - }); + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + defaultHeaders: { 'X-Stainless-Retry-Count': null }, + }); expect( await client.request({ @@ -661,7 +681,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++ + count++; if (count <= 2) { return new Response(undefined, { status: 429, @@ -674,10 +694,10 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new Gitpod({ - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -692,7 +712,10 @@ describe('retries', () => { test('retry on 429 with retry-after', async () => { let count = 0; - const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { + const testFetch = async ( + url: string | URL | Request, + { signal }: RequestInit = {}, + ): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, @@ -719,7 +742,10 @@ describe('retries', () => { test('retry on 429 with retry-after-ms', async () => { let count = 0; - const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { + const testFetch = async ( + url: string | URL | Request, + { signal }: RequestInit = {}, + ): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts index c33786c1..e60a5e41 100644 --- a/tests/stringifyQuery.test.ts +++ b/tests/stringifyQuery.test.ts @@ -2,24 +2,26 @@ import { stringifyQuery } from '@gitpod/sdk/internal/utils/query'; -describe(stringifyQuery, () => { for (const [input, expected] of [ - [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], - [{ a: null, b: false, c: undefined }, 'a=&b=false'], - [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], - [ - { 'a/b': 'c/d', 'e=f': 'g&h' }, - `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( - 'e=f', - )}=${encodeURIComponent('g&h')}`, - ], -] as const) { - it(`${JSON.stringify(input)} -> ${expected}`, () => { - expect(stringifyQuery(input)).toEqual(expected); - }); -} +describe(stringifyQuery, () => { + for (const [input, expected] of [ + [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], + [{ a: null, b: false, c: undefined }, 'a=&b=false'], + [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], + [ + { 'a/b': 'c/d', 'e=f': 'g&h' }, + `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( + 'e=f', + )}=${encodeURIComponent('g&h')}`, + ], + ] as const) { + it(`${JSON.stringify(input)} -> ${expected}`, () => { + expect(stringifyQuery(input)).toEqual(expected); + }); + } -for (const value of [[], {}, new Date()]) { - it(`${JSON.stringify(value)} -> `, () => { - expect(() => stringifyQuery({ value })).toThrow(`Cannot stringify type ${typeof value}`); - }); -} }) + for (const value of [[], {}, new Date()]) { + it(`${JSON.stringify(value)} -> `, () => { + expect(() => stringifyQuery({ value })).toThrow(`Cannot stringify type ${typeof value}`); + }); + } +}); diff --git a/yarn.lock b/yarn.lock index a55ecda1..7c98e7ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -709,6 +709,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@pkgr/core@^0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.4.tgz#d897170a2b0ba51f78a099edccd968f7b103387c" + integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw== + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -1586,6 +1591,14 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-plugin-prettier@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.1.tgz#99b55d7dd70047886b2222fdd853665f180b36af" + integrity sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg== + dependencies: + prettier-linter-helpers "^1.0.0" + synckit "^0.11.7" + eslint-plugin-unused-imports@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738" @@ -1737,6 +1750,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-diff@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -2916,6 +2934,13 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" @@ -3238,6 +3263,13 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +synckit@^0.11.7: + version "0.11.8" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.8.tgz#b2aaae998a4ef47ded60773ad06e7cb821f55457" + integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A== + dependencies: + "@pkgr/core" "^0.2.4" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" From 6e1e4babc9c8217ae56e243c9dfc42f0531e617b 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:30 +0000 Subject: [PATCH 052/217] 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 bed49045e5f23a7f683a8b8603cf1b50a2f7a433 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:05 +0000 Subject: [PATCH 053/217] feat: support setting headers via env --- src/client.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/client.ts b/src/client.ts index 3b70c390..18e1e195 100644 --- a/src/client.ts +++ b/src/client.ts @@ -595,6 +595,18 @@ export class Gitpod { this.fetch = options.fetch ?? Shims.getDefaultFetch(); this.#encoder = Opts.FallbackEncoder; + const customHeadersEnv = readEnv('GITPOD_CUSTOM_HEADERS'); + if (customHeadersEnv) { + const parsed: Record = {}; + for (const line of customHeadersEnv.split('\n')) { + const colon = line.indexOf(':'); + if (colon >= 0) { + parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim(); + } + } + options.defaultHeaders = { ...parsed, ...options.defaultHeaders }; + } + this._options = options; this.bearerToken = bearerToken; From 9fc32dcfbf9aab465f71b2d84227318826e589ee 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:53:34 +0000 Subject: [PATCH 054/217] feat(api): add maxPortAdmissionLevel to organization policies --- .stats.yml | 4 ++-- src/resources/organizations/policies.ts | 9 +++++++++ tests/api-resources/organizations/policies.test.ts | 1 + 3 files changed, 12 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/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index 604b29e0..c1e9b521 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../core/resource'; import * as PoliciesAPI from './policies'; +import * as EnvironmentsAPI from '../environments/environments'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; @@ -500,6 +501,14 @@ export interface PolicyUpdateParams { */ maximumRunningEnvironmentsPerUser?: string | null; + /** + * 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. + */ + maxPortAdmissionLevel?: EnvironmentsAPI.AdmissionLevel | null; + /** * members_create_projects controls whether members can create projects */ diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 7fd9de1a..adbb9030 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -65,6 +65,7 @@ describe('resource policies', () => { maximumEnvironmentsPerUser: '20', maximumEnvironmentTimeout: '3600s', maximumRunningEnvironmentsPerUser: '5', + maxPortAdmissionLevel: 'ADMISSION_LEVEL_UNSPECIFIED', membersCreateProjects: true, membersRequireProjects: true, portSharingDisabled: true, From 399376ebb5229c0e770ae7ae2153489aa06f291f 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:15 +0000 Subject: [PATCH 055/217] 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 0782de2e4cc157507a34c43a5db1a8f1700db98c 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:52:19 +0000 Subject: [PATCH 056/217] chore(format): run eslint and prettier separately --- eslint.config.mjs | 3 --- package.json | 1 - scripts/fast-format | 9 +++------ scripts/format | 3 +-- scripts/lint | 3 +++ src/internal/types.ts | 14 ++++++-------- yarn.lock | 32 -------------------------------- 7 files changed, 13 insertions(+), 52 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index a73ce380..0fd72164 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,6 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; -import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -14,11 +13,9 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, - prettier, }, rules: { 'no-unused-vars': 'off', - 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index 7364c376..2b4ce03a 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.39.1", - "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", diff --git a/scripts/fast-format b/scripts/fast-format index 53721ac0..f1873aef 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,10 +31,7 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -# format things eslint didn't -PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" -if ! [ -z "$PRETTIER_FILES" ]; then - echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ - '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +if ! [ -z "$FILE_LIST" ]; then + cat "$FILE_LIST" | xargs ./node_modules/.bin/prettier \ + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern --ignore-unknown fi diff --git a/scripts/format b/scripts/format index 7a756401..b1b2c17a 100755 --- a/scripts/format +++ b/scripts/format @@ -8,5 +8,4 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -# format things eslint didn't -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . diff --git a/scripts/lint b/scripts/lint index 3ffb78a6..1f532548 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,6 +4,9 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running prettier --check" +./node_modules/.bin/prettier --check . + echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/src/internal/types.ts b/src/internal/types.ts index b668dfc0..a050513a 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -40,7 +40,6 @@ type OverloadedParameters = : T extends (...args: infer A) => unknown ? A : never; -/* eslint-disable */ /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -63,19 +62,18 @@ type OverloadedParameters = * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ +/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ +/** @ts-ignore For users with undici */ /* prettier-ignore */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ +/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ +/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ +/** @ts-ignore For users who use Deno */ /* prettier-ignore */ type FetchRequestInit = NonNullable[1]>; -/* eslint-enable */ type RequestInits = | NotAny diff --git a/yarn.lock b/yarn.lock index 7c98e7ac..a55ecda1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -709,11 +709,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/core@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.4.tgz#d897170a2b0ba51f78a099edccd968f7b103387c" - integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw== - "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -1591,14 +1586,6 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-plugin-prettier@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.1.tgz#99b55d7dd70047886b2222fdd853665f180b36af" - integrity sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg== - dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.11.7" - eslint-plugin-unused-imports@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738" @@ -1750,11 +1737,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" - integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== - fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -2934,13 +2916,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - prettier@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" @@ -3263,13 +3238,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.11.7: - version "0.11.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.11.8.tgz#b2aaae998a4ef47ded60773ad06e7cb821f55457" - integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A== - dependencies: - "@pkgr/core" "^0.2.4" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" From 9f9f21920fe179fcce2d9166f777449d011f1b74 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:14 +0000 Subject: [PATCH 057/217] feat(api): add RESOURCE_ROLE_ORG_ENVIRONMENTS_READER to ResourceRole --- .stats.yml | 4 ++-- src/resources/shared.ts | 1 + 2 files changed, 3 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/resources/shared.ts b/src/resources/shared.ts index c4b17c23..b097a933 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -209,6 +209,7 @@ export type ResourceRole = | '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 9cd99a08b72966181265fe65a571f8c3e8eacac2 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:40 +0000 Subject: [PATCH 058/217] 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 49b46c7bb962e28c7a77b9256c043075bcd150c4 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:27 +0000 Subject: [PATCH 059/217] 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 7230cc87314327c17b2eb4d144b1fa6db99afb19 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:18 +0000 Subject: [PATCH 060/217] 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 1fe804bff8ff99f607d1dbeb699bdad18b00f354 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 061/217] 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 b8c19df0a20811e31c524b656a6305e40f8f6651 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:41 +0000 Subject: [PATCH 062/217] 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 f71e7e6436b2bca91fd705714106859a4693e33b 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:57 +0000 Subject: [PATCH 063/217] 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 c521a3efa0f39ccea79c239fa8ffe208c901309a 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:09 +0000 Subject: [PATCH 064/217] chore(types): remove deprecated accessToken from runners response types --- .stats.yml | 4 ++-- src/resources/runners/runners.ts | 10 ---------- 2 files changed, 2 insertions(+), 12 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/resources/runners/runners.ts b/src/resources/runners/runners.ts index 9887aec3..8630549c 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -852,11 +852,6 @@ export interface UpdateWindow { export interface RunnerCreateResponse { runner: Runner; - /** - * @deprecated deprecated, will be removed. Use exchange_token instead. - */ - accessToken?: string; - /** * exchange_token is a one-time use token that should be exchanged by the runner * for an access token, using the IdentityService.ExchangeToken rpc. The token @@ -975,11 +970,6 @@ export interface RunnerCreateLogsTokenResponse { } export interface RunnerCreateRunnerTokenResponse { - /** - * @deprecated deprecated, will be removed. Use exchange_token instead. - */ - accessToken?: string; - /** * exchange_token is a one-time use token that should be exchanged by the runner * for an access token, using the IdentityService.ExchangeToken rpc. The token From 3135e199a9b18ceb88ca3c3836ffb64ab26cd3d4 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:49 +0000 Subject: [PATCH 065/217] 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 aeabc1a521524624516c4e99f10147ce2d23a157 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 066/217] 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 78797afd7e399e0b483025c5d1de1997ed5eff21 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:39 +0000 Subject: [PATCH 067/217] 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 e16a73a4f0e88d139ad100713b333d99629e46e9 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:33 +0000 Subject: [PATCH 068/217] 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 eb856efd3fbac51d1c8556faef976e9a6f8dd09b 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:57 +0000 Subject: [PATCH 069/217] feat(api): add incident trigger to WorkflowTrigger and WorkflowExecution --- .stats.yml | 6 +++--- src/resources/automations.ts | 4 ++++ 2 files changed, 7 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/resources/automations.ts b/src/resources/automations.ts index a17290d7..7e3abe39 100644 --- a/src/resources/automations.ts +++ b/src/resources/automations.ts @@ -2247,6 +2247,8 @@ export interface WorkflowTrigger { * - 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) */ context: WorkflowTriggerContext; @@ -2332,6 +2334,8 @@ export namespace WorkflowTrigger { * - 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) */ export interface WorkflowTriggerContext { /** From dd096dcdf3c23ddb61d46c735358254dc78fc837 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:03 +0000 Subject: [PATCH 070/217] 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 90fa2a8c112f3717cd08c0cc25a64cfe0d880534 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:46 +0000 Subject: [PATCH 071/217] feat(api): add accessToken field to runners response types --- .stats.yml | 4 ++-- src/resources/runners/runners.ts | 10 ++++++++++ 2 files changed, 12 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/resources/runners/runners.ts b/src/resources/runners/runners.ts index 8630549c..9887aec3 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -852,6 +852,11 @@ export interface UpdateWindow { export interface RunnerCreateResponse { runner: Runner; + /** + * @deprecated deprecated, will be removed. Use exchange_token instead. + */ + accessToken?: string; + /** * exchange_token is a one-time use token that should be exchanged by the runner * for an access token, using the IdentityService.ExchangeToken rpc. The token @@ -970,6 +975,11 @@ export interface RunnerCreateLogsTokenResponse { } export interface RunnerCreateRunnerTokenResponse { + /** + * @deprecated deprecated, will be removed. Use exchange_token instead. + */ + accessToken?: string; + /** * exchange_token is a one-time use token that should be exchanged by the runner * for an access token, using the IdentityService.ExchangeToken rpc. The token From 2ac916655903bbc28b5b44ce7110f0f2c5b1b2a1 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 072/217] 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 71628f5d26d799800202f96d5a897a2615d5d5ca 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:38 +0000 Subject: [PATCH 073/217] 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 bf7aae1b4a21d19d7c425f4a792a1ef9a9344b8b 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:09 +0000 Subject: [PATCH 074/217] 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 d3f780c490653ad7f2a473b8bfc58f90fb034659 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:53 +0000 Subject: [PATCH 075/217] 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 dc2e7cce4e192aca420ab9eb9c270ae61a7df966 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 076/217] 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 c67a192f31447d27e1a5b077ea123cf9f18b402f 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:06 +0000 Subject: [PATCH 077/217] chore(internal): regenerate SDK with no functional changes --- .stats.yml | 4 ++-- src/resources/runners/runners.ts | 3 ++- 2 files changed, 4 insertions(+), 3 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/resources/runners/runners.ts b/src/resources/runners/runners.ts index 9887aec3..f8ceec7a 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -658,7 +658,8 @@ export type RunnerCapability = | 'RUNNER_CAPABILITY_RUNNER_SIDE_AGENT' | 'RUNNER_CAPABILITY_WARM_POOL' | 'RUNNER_CAPABILITY_ASG_WARM_POOL' - | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION'; + | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION' + | 'RUNNER_CAPABILITY_HORIZONTAL_SCALING'; export interface RunnerConfiguration { /** From 2598350538c8203fdb338f4fa41b1e81addd485b 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:51:29 +0000 Subject: [PATCH 078/217] chore: redact api-key headers in debug logs --- src/internal/utils/log.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/internal/utils/log.ts b/src/internal/utils/log.ts index ce9d0523..21ff220a 100644 --- a/src/internal/utils/log.ts +++ b/src/internal/utils/log.ts @@ -107,6 +107,8 @@ export const formatRequestDetails = (details: { name, ( name.toLowerCase() === 'authorization' || + name.toLowerCase() === 'api-key' || + name.toLowerCase() === 'x-api-key' || name.toLowerCase() === 'cookie' || name.toLowerCase() === 'set-cookie' ) ? From 1e6190f898a3bfd82c6431734bea4adad3c1ae37 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:40 +0000 Subject: [PATCH 079/217] feat(api): add credential_proxy to secrets, remove format from environments --- .stats.yml | 4 +- src/resources/environments/environments.ts | 6 -- src/resources/secrets.ts | 66 ++++++++++++++++++++++ 3 files changed, 68 insertions(+), 8 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/resources/environments/environments.ts b/src/resources/environments/environments.ts index 73681ee8..4ade7edf 100644 --- a/src/resources/environments/environments.ts +++ b/src/resources/environments/environments.ts @@ -1008,12 +1008,6 @@ export namespace EnvironmentSpec { * credential) and proxied at the same time. */ export interface CredentialProxy { - /** - * format describes how the secret value is encoded. The proxy uses this to decode - * the value before injecting it into the header. - */ - format?: 'FORMAT_UNSPECIFIED' | 'FORMAT_PLAIN' | 'FORMAT_BASE64'; - /** * header is the HTTP header name to inject (e.g. "Authorization"). */ diff --git a/src/resources/secrets.ts b/src/resources/secrets.ts index 86012223..7cbad510 100644 --- a/src/resources/secrets.ts +++ b/src/resources/secrets.ts @@ -329,6 +329,16 @@ export interface Secret { */ creator?: Shared.Subject; + /** + * 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. + */ + credentialProxy?: Secret.CredentialProxy; + /** * secret will be created as an Environment Variable with the same name as the * secret @@ -445,6 +455,29 @@ export interface Secret { updatedAt?: string; } +export namespace Secret { + /** + * 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. + */ + export interface CredentialProxy { + /** + * header is the HTTP header name to inject (e.g. "Authorization"). + */ + header?: string; + + /** + * 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. + */ + targetHosts?: Array; + } +} + export interface SecretScope { /** * organization_id is the Organization ID this Secret belongs to @@ -493,6 +526,16 @@ export interface SecretCreateParams { */ containerRegistryBasicAuthHost?: string; + /** + * 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. + */ + credentialProxy?: SecretCreateParams.CredentialProxy; + /** * secret will be created as an Environment Variable with the same name as the * secret @@ -528,6 +571,29 @@ export interface SecretCreateParams { value?: string; } +export namespace SecretCreateParams { + /** + * 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. + */ + export interface CredentialProxy { + /** + * header is the HTTP header name to inject (e.g. "Authorization"). + */ + header?: string; + + /** + * 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. + */ + targetHosts?: Array; + } +} + export interface SecretListParams extends SecretsPageParams { /** * Body param From 698278865fa9799094e84388eb980eed634869d5 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:34:00 +0000 Subject: [PATCH 080/217] 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 55ada8bd2d43b1958aecaf8d45555dcd02e798d6 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:38 +0000 Subject: [PATCH 081/217] 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 dd9d5ee7594587596834f0bb174400c6f3656865 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:08 +0000 Subject: [PATCH 082/217] 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 92ee2b004e18f998e94f54e6ae61e39f5a1f59f5 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:41 +0000 Subject: [PATCH 083/217] 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 e89f1e49474c709df3229907a0f9a434992010a0 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:25 +0000 Subject: [PATCH 084/217] 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 0c940860f8be53265078463c9ef17a3a2d70b234 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:37 +0000 Subject: [PATCH 085/217] feat(api): add allowUnverifiedEmailScimFallbackMatch to scim_configurations --- .stats.yml | 4 ++-- .../organizations/scim-configurations.ts | 21 +++++++++++++++++++ .../organizations/scim-configurations.test.ts | 2 ++ 3 files changed, 25 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/resources/organizations/scim-configurations.ts b/src/resources/organizations/scim-configurations.ts index 33dc2f84..4c2e2778 100644 --- a/src/resources/organizations/scim-configurations.ts +++ b/src/resources/organizations/scim-configurations.ts @@ -291,6 +291,13 @@ export interface ScimConfiguration { */ updatedAt: string; + /** + * 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 + */ + allowUnverifiedEmailAccountLinking?: boolean; + /** * enabled indicates if SCIM provisioning is active */ @@ -367,6 +374,13 @@ export interface ScimConfigurationCreateParams { */ ssoConfigurationId: string; + /** + * 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 + */ + allowUnverifiedEmailAccountLinking?: boolean | null; + /** * name is a human-readable name for the SCIM configuration */ @@ -392,6 +406,13 @@ export interface ScimConfigurationUpdateParams { */ scimConfigurationId: string; + /** + * 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 + */ + allowUnverifiedEmailAccountLinking?: boolean | null; + /** * enabled controls whether SCIM provisioning is active */ diff --git a/tests/api-resources/organizations/scim-configurations.test.ts b/tests/api-resources/organizations/scim-configurations.test.ts index bf121156..0da9bb8e 100644 --- a/tests/api-resources/organizations/scim-configurations.test.ts +++ b/tests/api-resources/organizations/scim-configurations.test.ts @@ -28,6 +28,7 @@ describe('resource scimConfigurations', () => { const response = await client.organizations.scimConfigurations.create({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + allowUnverifiedEmailAccountLinking: true, name: 'name', tokenExpiresIn: '+9125115.360s', }); @@ -72,6 +73,7 @@ describe('resource scimConfigurations', () => { test.skip('update: required and optional params', async () => { const response = await client.organizations.scimConfigurations.update({ scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + allowUnverifiedEmailAccountLinking: true, enabled: false, name: 'name', ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', From e96ca1a49605a2ddfccd4288862f5721d1d91ceb 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:08 +0000 Subject: [PATCH 086/217] feat(api): add agent_execution_cnf capability to runners --- .stats.yml | 4 ++-- src/resources/runners/runners.ts | 3 ++- 2 files changed, 4 insertions(+), 3 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/resources/runners/runners.ts b/src/resources/runners/runners.ts index f8ceec7a..6f1aeea2 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -659,7 +659,8 @@ export type RunnerCapability = | 'RUNNER_CAPABILITY_WARM_POOL' | 'RUNNER_CAPABILITY_ASG_WARM_POOL' | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION' - | 'RUNNER_CAPABILITY_HORIZONTAL_SCALING'; + | 'RUNNER_CAPABILITY_HORIZONTAL_SCALING' + | 'RUNNER_CAPABILITY_AGENT_EXECUTION_CNF'; export interface RunnerConfiguration { /** From 7d70a050bf8bd1a320c67df55d4c0816a71fbe8d 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:30 +0000 Subject: [PATCH 087/217] feat(api): add project_creation_defaults field to organization policies --- .stats.yml | 6 +-- api.md | 1 + src/resources/organizations/index.ts | 1 + src/resources/organizations/organizations.ts | 2 + src/resources/organizations/policies.ts | 37 +++++++++++++++++++ .../organizations/policies.test.ts | 1 + 6 files changed, 45 insertions(+), 3 deletions(-) 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 cd39152d..31ecf242 100644 --- a/api.md +++ b/api.md @@ -480,6 +480,7 @@ Types: - CustomSecurityAgent - KernelControlsAction - OrganizationPolicies +- ProjectCreationDefaults - SecurityAgentPolicy - VetoExecPolicy - PolicyRetrieveResponse diff --git a/src/resources/organizations/index.ts b/src/resources/organizations/index.ts index 29e04f78..bd455f8f 100644 --- a/src/resources/organizations/index.ts +++ b/src/resources/organizations/index.ts @@ -77,6 +77,7 @@ export { type CustomSecurityAgent, type KernelControlsAction, type OrganizationPolicies, + type ProjectCreationDefaults, type SecurityAgentPolicy, type VetoExecPolicy, type PolicyRetrieveResponse, diff --git a/src/resources/organizations/organizations.ts b/src/resources/organizations/organizations.ts index 3cdc46f4..ac7560a6 100644 --- a/src/resources/organizations/organizations.ts +++ b/src/resources/organizations/organizations.ts @@ -66,6 +66,7 @@ import { PolicyRetrieveResponse, PolicyUpdateParams, PolicyUpdateResponse, + ProjectCreationDefaults, SecurityAgentPolicy, VetoExecPolicy, } from './policies'; @@ -1063,6 +1064,7 @@ export declare namespace Organizations { type CustomSecurityAgent as CustomSecurityAgent, type KernelControlsAction as KernelControlsAction, type OrganizationPolicies as OrganizationPolicies, + type ProjectCreationDefaults as ProjectCreationDefaults, type SecurityAgentPolicy as SecurityAgentPolicy, type VetoExecPolicy as VetoExecPolicy, type PolicyRetrieveResponse as PolicyRetrieveResponse, diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index c1e9b521..69f93c64 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -349,6 +349,12 @@ export interface OrganizationPolicies { */ maximumEnvironmentTimeout?: string; + /** + * project_creation_defaults contains default settings applied to newly created + * projects. + */ + projectCreationDefaults?: ProjectCreationDefaults; + /** * security_agent_policy contains security agent configuration for the * organization. When configured, security agents are automatically deployed to all @@ -377,6 +383,18 @@ export namespace OrganizationPolicies { } } +/** + * ProjectCreationDefaults contains default settings applied to newly created + * projects. + */ +export interface ProjectCreationDefaults { + /** + * insights_enabled controls whether Insights (co-author attribution) is + * automatically enabled on newly created projects. + */ + insightsEnabled?: boolean; +} + /** * SecurityAgentPolicy contains security agent configuration for an organization. * When enabled, security agents are automatically deployed to all environments. @@ -527,6 +545,12 @@ export interface PolicyUpdateParams { */ portSharingDisabled?: boolean | null; + /** + * project_creation_defaults contains updates to default settings applied to newly + * created projects. + */ + projectCreationDefaults?: PolicyUpdateParams.ProjectCreationDefaults | null; + /** * 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. @@ -606,6 +630,18 @@ export namespace PolicyUpdateParams { allowedVersions?: Array; } + /** + * project_creation_defaults contains updates to default settings applied to newly + * created projects. + */ + export interface ProjectCreationDefaults { + /** + * insights_enabled controls whether Insights (co-author attribution) is + * automatically enabled on newly created projects. + */ + insightsEnabled?: boolean | null; + } + /** * security_agent_policy contains security agent configuration updates */ @@ -659,6 +695,7 @@ export declare namespace Policies { type CustomSecurityAgent as CustomSecurityAgent, type KernelControlsAction as KernelControlsAction, type OrganizationPolicies as OrganizationPolicies, + type ProjectCreationDefaults as ProjectCreationDefaults, type SecurityAgentPolicy as SecurityAgentPolicy, type VetoExecPolicy as VetoExecPolicy, type PolicyRetrieveResponse as PolicyRetrieveResponse, diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index adbb9030..c9afd3c5 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -69,6 +69,7 @@ describe('resource policies', () => { membersCreateProjects: true, membersRequireProjects: true, portSharingDisabled: true, + projectCreationDefaults: { insightsEnabled: true }, requireCustomDomainAccess: true, restrictAccountCreationToScim: true, securityAgentPolicy: { From af7aefc796d2bebbcac50136ea1cafd9c21a85c5 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:17 +0000 Subject: [PATCH 088/217] feat(api): add goal field to agent execution status --- .stats.yml | 4 ++-- src/resources/agents.ts | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 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/resources/agents.ts b/src/resources/agents.ts index ab11328d..899fa4ae 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -802,6 +802,11 @@ export namespace AgentExecution { | 'AGENT_EXECUTION_FAILURE_REASON_INTERNAL' | 'AGENT_EXECUTION_FAILURE_REASON_AGENT_EXECUTION'; + /** + * goal projects the current native Codex thread goal, if any. + */ + goal?: Status.Goal; + inputTokensUsed?: string; iterations?: string; @@ -923,6 +928,32 @@ export namespace AgentExecution { } } + /** + * goal projects the current native Codex thread goal, if any. + */ + export interface Goal { + /** + * objective is the current goal text tracked by the native Codex thread-goal + * subsystem. + */ + objective?: string; + + /** + * status is the lifecycle state of the current goal. + */ + status?: + | 'GOAL_STATUS_UNSPECIFIED' + | 'GOAL_STATUS_ACTIVE' + | 'GOAL_STATUS_PAUSED' + | 'GOAL_STATUS_COMPLETED' + | 'GOAL_STATUS_BUDGET_EXHAUSTED'; + + /** + * updated_at is the most recent native goal update timestamp, when available. + */ + updatedAt?: string; + } + /** * MCPIntegrationStatus represents the status of a single MCP integration within an * agent execution context From cd97df61a5ceb83c3fee1c12d014a484d6ab224f 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:06 +0000 Subject: [PATCH 089/217] 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 c7ae57b5da02a826ac212e749863a8374920a539 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 19:09:51 +0000 Subject: [PATCH 090/217] 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. From ffdedcbcbb2d505e195f18ea1f9c3e26fb654cc8 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:30 +0000 Subject: [PATCH 091/217] feat(api): add agentExecutionIds filter to agents list executions --- .stats.yml | 4 ++-- src/resources/agents.ts | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c248682d..730136a0 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 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-4766ec242b97dca5e0287fe5d6d068776d017f1d25201399681e66302b65ce12.yml +openapi_spec_hash: 8cc0170e79d6bf90d8bd1eb3216fcc97 config_hash: 9052d3b03d620cf6871184b15487e020 diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 899fa4ae..a51a52f9 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -1502,6 +1502,12 @@ export interface AgentListExecutionsParams extends AgentExecutionsPageParams { export namespace AgentListExecutionsParams { export interface Filter { + /** + * agent_execution_ids filters the response to only the specified executions. + * Useful for checking existence of a known set of execution IDs. + */ + agentExecutionIds?: Array; + agentIds?: Array; /** From 8d9be566a38463088be5e43ead0e5c6b566efec0 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:52 +0000 Subject: [PATCH 092/217] feat(api): add REDIS_STREAM to RunnerCapability enum in runners --- .stats.yml | 4 ++-- src/resources/runners/runners.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 730136a0..d2c47a0a 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-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: 9052d3b03d620cf6871184b15487e020 diff --git a/src/resources/runners/runners.ts b/src/resources/runners/runners.ts index 6f1aeea2..e0452646 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -660,7 +660,8 @@ export type RunnerCapability = | 'RUNNER_CAPABILITY_ASG_WARM_POOL' | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION' | 'RUNNER_CAPABILITY_HORIZONTAL_SCALING' - | 'RUNNER_CAPABILITY_AGENT_EXECUTION_CNF'; + | 'RUNNER_CAPABILITY_AGENT_EXECUTION_CNF' + | 'RUNNER_CAPABILITY_REDIS_STREAM'; export interface RunnerConfiguration { /** From 1a8ae4474aa07bc54f258733c768068dbdb022de 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:40 +0000 Subject: [PATCH 093/217] feat(api): add webBrowserDisabled field to organizations policies --- .stats.yml | 4 ++-- src/resources/organizations/policies.ts | 12 ++++++++++++ tests/api-resources/organizations/policies.test.ts | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d2c47a0a..e7a6d98c 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-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: 9052d3b03d620cf6871184b15487e020 diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index 69f93c64..abed40f9 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -315,6 +315,12 @@ export interface OrganizationPolicies { */ restrictAccountCreationToScim: boolean; + /** + * web_browser_disabled controls whether users can open the built-in web browser + * from environment pages. This does not affect VS Code Browser. + */ + webBrowserDisabled: boolean; + /** * delete_archived_environments_after controls how long archived environments are * kept before automatic deletion. 0 means no automatic deletion. Maximum duration @@ -573,6 +579,12 @@ export interface PolicyUpdateParams { * veto_exec_policy contains the veto exec policy for environments. */ vetoExecPolicy?: VetoExecPolicy | null; + + /** + * web_browser_disabled controls whether users can open the built-in web browser + * from environment pages. This does not affect VS Code Browser. + */ + webBrowserDisabled?: boolean | null; } export namespace PolicyUpdateParams { diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index c9afd3c5..9dde1afc 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -86,6 +86,7 @@ describe('resource policies', () => { enabled: true, executables: ['string'], }, + webBrowserDisabled: true, }); }); }); From e46e4a69e1dfb9ae210187ac062906700b4cf42d 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:54 +0000 Subject: [PATCH 094/217] feat(api): add disableFromScratch field to organization policies --- .stats.yml | 4 ++-- src/resources/organizations/policies.ts | 12 ++++++++++++ tests/api-resources/organizations/policies.test.ts | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e7a6d98c..5594dad7 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-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: 9052d3b03d620cf6871184b15487e020 diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index abed40f9..0bac93a7 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -267,6 +267,12 @@ export interface OrganizationPolicies { */ defaultEnvironmentImage: string; + /** + * disable_from_scratch controls whether non-admin users can create blank + * environments without a Git or URL initializer. + */ + disableFromScratch: boolean; + /** * maximum_environments_per_user limits total environments (running or stopped) per * user @@ -488,6 +494,12 @@ export interface PolicyUpdateParams { */ deleteArchivedEnvironmentsAfter?: string | null; + /** + * disable_from_scratch controls whether non-admin users can create blank + * environments without a Git or URL initializer. + */ + disableFromScratch?: boolean | null; + /** * editor_version_restrictions restricts which editor versions can be used. Maps * editor ID to version policy with allowed major versions. diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 9dde1afc..321a43eb 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -60,6 +60,7 @@ describe('resource policies', () => { defaultEditorId: 'defaultEditorId', defaultEnvironmentImage: 'defaultEnvironmentImage', deleteArchivedEnvironmentsAfter: '+9125115.360s', + disableFromScratch: true, editorVersionRestrictions: { foo: { allowedVersions: ['string'] } }, maximumEnvironmentLifetime: '+9125115.360s', maximumEnvironmentsPerUser: '20', From 4f78cc5f1222ee3a71adfbce422072825f82b889 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 13:08:17 +0000 Subject: [PATCH 095/217] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5594dad7..c80e6bbb 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-76936dc58c08c5be3342faf372620dd831d561f2d9d7b54b41053fad444601a9.yml -openapi_spec_hash: a677b2ab6e2b9065e6f2404d82180988 -config_hash: 9052d3b03d620cf6871184b15487e020 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-ba0de48d23dfc7339c274592f854e48d09349a33f44ec5036dc454d2c87dbadc.yml +openapi_spec_hash: 9a5309306926eecabf232b0f678fd00f +config_hash: b9336a86949216adce7dbbf72a029b57 From 7ee49d07c93cd507aad5aea82b32aec38b15a541 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:30 +0000 Subject: [PATCH 096/217] 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 8b24991d2939a243e4e67f607f1a13a2007068d9 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:20 +0000 Subject: [PATCH 097/217] 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 b78ed0001f6a2ee7ff86fef0baf24d704da73ff6 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 098/217] 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 253359feedb1230ed9c7c34cb98e393473220f0c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 20:24:08 +0000 Subject: [PATCH 099/217] chore(tests): remove redundant File import --- tests/uploads.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/uploads.test.ts b/tests/uploads.test.ts index 27bf8b32..a4e518e5 100644 --- a/tests/uploads.test.ts +++ b/tests/uploads.test.ts @@ -1,7 +1,6 @@ import fs from 'fs'; import type { ResponseLike } from '@gitpod/sdk/internal/to-file'; import { toFile } from '@gitpod/sdk/core/uploads'; -import { File } from 'node:buffer'; class MyClass { name: string = 'foo'; From 44ea48e8129ec5e7af0a643d35378e1b8536c8f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 May 2026 21:19:42 +0000 Subject: [PATCH 100/217] fix(typescript): upgrade tsc-multi so that it works with Node 26 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2b4ce03a..1cdecd5b 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "sshpk": "^1.18.0", "ts-jest": "^29.1.0", "ts-node": "^10.5.0", - "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz", + "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz", "tsconfig-paths": "^4.0.0", "tslib": "^2.8.1", "typescript": "5.8.3", diff --git a/yarn.lock b/yarn.lock index a55ecda1..21a0aabd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3311,9 +3311,9 @@ ts-node@^10.5.0: v8-compile-cache-lib "^3.0.0" yn "3.1.1" -"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz": - version "1.1.9" - resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz#777f6f5d9e26bf0e94e5170990dd3a841d6707cd" +"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz": + version "1.1.11" + resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.11/tsc-multi.tgz#010247051be13b55abdc98f787c017285149f4f2" dependencies: debug "^4.3.7" fast-glob "^3.3.2" From 066ffb92c77c42e6c5d0dc623067818e72da4308 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:47 +0000 Subject: [PATCH 101/217] feat(agent): add devcontainer rebuild wait schema --- .stats.yml | 4 ++-- src/resources/agents.ts | 15 +++++++++++++++ 2 files changed, 17 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 diff --git a/src/resources/agents.ts b/src/resources/agents.ts index a51a52f9..90839d44 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -1374,6 +1374,8 @@ export interface UserInputMetadata { * fires. Delivered via SendToAgentExecution as a new oneof variant. */ export interface WakeEvent { + devcontainerRebuild?: WakeEvent.DevcontainerRebuild; + environment?: WakeEvent.Environment; /** @@ -1387,6 +1389,19 @@ export interface WakeEvent { } export namespace WakeEvent { + export interface DevcontainerRebuild { + environmentId?: string; + + failureMessage?: Array; + + /** + * The devcontainer phase reached by the target session. + */ + phase?: string; + + sessionId?: string; + } + export interface Environment { environmentId?: string; From 5cb3eb3b68ba2247e17ba73189ab37d52248384f 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:58 +0000 Subject: [PATCH 102/217] 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 b0de5400a9f976a859695f8993fbd1980d14e68d 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:57 +0000 Subject: [PATCH 103/217] 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 b13d13c8779c7ecc6feff816a6d3e7518c5f1c48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 10:10:41 +0000 Subject: [PATCH 104/217] feat(api): add default environment class IDs to project creation defaults --- .stats.yml | 6 +- api.md | 3 + src/resources/organizations/index.ts | 3 + src/resources/organizations/organizations.ts | 6 + src/resources/organizations/policies.ts | 138 ++++++++++++++++++ .../organizations/policies.test.ts | 25 +++- 6 files changed, 177 insertions(+), 4 deletions(-) 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 31ecf242..09ee43fe 100644 --- a/api.md +++ b/api.md @@ -480,7 +480,10 @@ Types: - CustomSecurityAgent - KernelControlsAction - OrganizationPolicies +- ProjectCreationDefaultEnvironmentClass +- ProjectCreationDefaultEnvironmentClassWarmPool - ProjectCreationDefaults +- ProjectCreationDefaultsPrebuilds - SecurityAgentPolicy - VetoExecPolicy - PolicyRetrieveResponse diff --git a/src/resources/organizations/index.ts b/src/resources/organizations/index.ts index bd455f8f..5ff89273 100644 --- a/src/resources/organizations/index.ts +++ b/src/resources/organizations/index.ts @@ -77,7 +77,10 @@ export { type CustomSecurityAgent, type KernelControlsAction, type OrganizationPolicies, + type ProjectCreationDefaultEnvironmentClass, + type ProjectCreationDefaultEnvironmentClassWarmPool, type ProjectCreationDefaults, + type ProjectCreationDefaultsPrebuilds, type SecurityAgentPolicy, type VetoExecPolicy, type PolicyRetrieveResponse, diff --git a/src/resources/organizations/organizations.ts b/src/resources/organizations/organizations.ts index ac7560a6..f0bc90c3 100644 --- a/src/resources/organizations/organizations.ts +++ b/src/resources/organizations/organizations.ts @@ -66,7 +66,10 @@ import { PolicyRetrieveResponse, PolicyUpdateParams, PolicyUpdateResponse, + ProjectCreationDefaultEnvironmentClass, + ProjectCreationDefaultEnvironmentClassWarmPool, ProjectCreationDefaults, + ProjectCreationDefaultsPrebuilds, SecurityAgentPolicy, VetoExecPolicy, } from './policies'; @@ -1064,7 +1067,10 @@ export declare namespace Organizations { type CustomSecurityAgent as CustomSecurityAgent, type KernelControlsAction as KernelControlsAction, type OrganizationPolicies as OrganizationPolicies, + type ProjectCreationDefaultEnvironmentClass as ProjectCreationDefaultEnvironmentClass, + type ProjectCreationDefaultEnvironmentClassWarmPool as ProjectCreationDefaultEnvironmentClassWarmPool, type ProjectCreationDefaults as ProjectCreationDefaults, + type ProjectCreationDefaultsPrebuilds as ProjectCreationDefaultsPrebuilds, type SecurityAgentPolicy as SecurityAgentPolicy, type VetoExecPolicy as VetoExecPolicy, type PolicyRetrieveResponse as PolicyRetrieveResponse, diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index 0bac93a7..fd5347a9 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -2,6 +2,7 @@ import { APIResource } from '../../core/resource'; import * as PoliciesAPI from './policies'; +import * as Shared from '../shared'; import * as EnvironmentsAPI from '../environments/environments'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; @@ -395,16 +396,137 @@ export namespace OrganizationPolicies { } } +/** + * ProjectCreationDefaultEnvironmentClass configures a single environment class in + * the project creation defaults. + */ +export interface ProjectCreationDefaultEnvironmentClass { + /** + * environment_class_id is the ID of the environment class. + */ + environmentClassId?: string; + + /** + * order is the priority of this entry (lower = higher priority). + */ + order?: number; + + /** + * prebuild controls whether prebuilds are enabled for this environment class on + * newly created projects. + */ + prebuild?: boolean; + + /** + * warm_pool configures the warm pool for this environment class on newly created + * projects. Only meaningful when prebuild is true. + */ + warmPool?: ProjectCreationDefaultEnvironmentClassWarmPool; +} + +/** + * ProjectCreationDefaultEnvironmentClassWarmPool configures warm pool defaults for + * an environment class in the project creation defaults. + */ +export interface ProjectCreationDefaultEnvironmentClassWarmPool { + /** + * enabled controls whether a warm pool is created for this environment class. + */ + enabled?: boolean; + + /** + * max_size is the maximum number of warm instances. Must be >= min_size and <= 20. + */ + maxSize?: number; + + /** + * min_size is the minimum number of warm instances. Must be >= 0 and <= max_size. + */ + minSize?: number; +} + /** * ProjectCreationDefaults contains default settings applied to newly created * projects. */ export interface ProjectCreationDefaults { + /** + * 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. + */ + environmentClasses?: Array; + /** * insights_enabled controls whether Insights (co-author attribution) is * automatically enabled on newly created projects. */ insightsEnabled?: boolean; + + /** + * 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. + */ + prebuilds?: ProjectCreationDefaultsPrebuilds; +} + +/** + * ProjectCreationDefaultsPrebuilds configures default prebuild settings. Presence + * of this message means prebuilds can be enabled for the default environment + * classes. + */ +export interface ProjectCreationDefaultsPrebuilds { + /** + * enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during + * prebuilds on newly created projects. + */ + enableJetbrainsWarmup?: boolean; + + /** + * prebuild_executor is the service account used to run prebuilds on newly created + * projects. Must be a service account (not a user). + */ + prebuildExecutor?: Shared.Subject; + + /** + * 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. + */ + timeout?: string; + + /** + * trigger defines when prebuilds should be created on newly created projects. + */ + trigger?: ProjectCreationDefaultsPrebuilds.Trigger; +} + +export namespace ProjectCreationDefaultsPrebuilds { + /** + * trigger defines when prebuilds should be created on newly created projects. + */ + export interface Trigger { + /** + * daily_schedule triggers a prebuild once per day at the specified hour (UTC). The + * actual start time may vary slightly to distribute system load. + */ + dailySchedule: Trigger.DailySchedule; + } + + export namespace Trigger { + /** + * daily_schedule triggers a prebuild once per day at the specified hour (UTC). The + * actual start time may vary slightly to distribute system load. + */ + export interface DailySchedule { + /** + * 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. + */ + hourUtc?: number; + } + } } /** @@ -659,11 +781,24 @@ export namespace PolicyUpdateParams { * created projects. */ export interface ProjectCreationDefaults { + /** + * environment_classes replaces the full list of default environment classes and + * their per-class settings. Send an empty list to clear defaults. + */ + environmentClasses?: Array; + /** * insights_enabled controls whether Insights (co-author attribution) is * automatically enabled on newly created projects. */ insightsEnabled?: boolean | null; + + /** + * 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?: PoliciesAPI.ProjectCreationDefaultsPrebuilds | null; } /** @@ -719,7 +854,10 @@ export declare namespace Policies { type CustomSecurityAgent as CustomSecurityAgent, type KernelControlsAction as KernelControlsAction, type OrganizationPolicies as OrganizationPolicies, + type ProjectCreationDefaultEnvironmentClass as ProjectCreationDefaultEnvironmentClass, + type ProjectCreationDefaultEnvironmentClassWarmPool as ProjectCreationDefaultEnvironmentClassWarmPool, type ProjectCreationDefaults as ProjectCreationDefaults, + type ProjectCreationDefaultsPrebuilds as ProjectCreationDefaultsPrebuilds, type SecurityAgentPolicy as SecurityAgentPolicy, type VetoExecPolicy as VetoExecPolicy, type PolicyRetrieveResponse as PolicyRetrieveResponse, diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 321a43eb..6bd7283e 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -70,7 +70,30 @@ describe('resource policies', () => { membersCreateProjects: true, membersRequireProjects: true, portSharingDisabled: true, - projectCreationDefaults: { insightsEnabled: true }, + projectCreationDefaults: { + environmentClasses: [ + { + environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + order: 0, + prebuild: true, + warmPool: { + enabled: true, + maxSize: 20, + minSize: 20, + }, + }, + ], + insightsEnabled: true, + prebuilds: { + enableJetbrainsWarmup: true, + prebuildExecutor: { + id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + principal: 'PRINCIPAL_UNSPECIFIED', + }, + timeout: '+9125115.360s', + trigger: { dailySchedule: { hourUtc: 23 } }, + }, + }, requireCustomDomainAccess: true, restrictAccountCreationToScim: true, securityAgentPolicy: { From 5f64140733fa748bc10e9cea33a3b8af4a0ff95f 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:56 +0000 Subject: [PATCH 105/217] 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 9b0f094ecbd975bc48cb3e167ffa28cb2285ab46 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:56 +0000 Subject: [PATCH 106/217] 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 5eed7206580b4c1900a7728372f32a5dcafcd2b8 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:46 +0000 Subject: [PATCH 107/217] fix(api): wrap prebuild default updates --- .stats.yml | 4 +-- src/resources/organizations/policies.ts | 25 ++++++++++++++++--- .../organizations/policies.test.ts | 15 ++++++----- 3 files changed, 32 insertions(+), 12 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/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index fd5347a9..b07188aa 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -794,11 +794,28 @@ export namespace PolicyUpdateParams { insightsEnabled?: boolean | null; /** - * 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. */ - prebuilds?: PoliciesAPI.ProjectCreationDefaultsPrebuilds | null; + prebuilds?: ProjectCreationDefaults.Prebuilds | null; + } + + export namespace ProjectCreationDefaults { + /** + * prebuilds updates default prebuild settings for newly created projects. When + * absent, prebuild defaults are left unchanged. + */ + export interface Prebuilds { + /** + * disabled clears persisted prebuild defaults. + */ + disabled?: unknown; + + /** + * enabled sets or updates persisted prebuild defaults. + */ + enabled?: PoliciesAPI.ProjectCreationDefaultsPrebuilds; + } } /** diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 6bd7283e..18f5861a 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -85,13 +85,16 @@ describe('resource policies', () => { ], insightsEnabled: true, prebuilds: { - enableJetbrainsWarmup: true, - prebuildExecutor: { - id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - principal: 'PRINCIPAL_UNSPECIFIED', + disabled: {}, + enabled: { + enableJetbrainsWarmup: true, + prebuildExecutor: { + id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + principal: 'PRINCIPAL_UNSPECIFIED', + }, + timeout: '+9125115.360s', + trigger: { dailySchedule: { hourUtc: 23 } }, }, - timeout: '+9125115.360s', - trigger: { dailySchedule: { hourUtc: 23 } }, }, }, requireCustomDomainAccess: true, From 0f19f2d8a426c5be78abe8b807d38b444bdc15fc 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:28 +0000 Subject: [PATCH 108/217] 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 f35cbb900b6dbe9d6c601e6c83bec15ac47720db 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:37 +0000 Subject: [PATCH 109/217] 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 fca20c041164d9831a64c5d977e8e4da18be8dc8 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:03 +0000 Subject: [PATCH 110/217] 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 66e749662e88bd5c3e3899bc07421e17a029e584 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:07 +0000 Subject: [PATCH 111/217] feat(billing): add Enterprise AI user budget APIs --- .stats.yml | 6 +++--- yarn.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 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 diff --git a/yarn.lock b/yarn.lock index 21a0aabd..e419304f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1263,9 +1263,9 @@ bcrypt-pbkdf@^1.0.0, bcrypt-pbkdf@^1.0.2: tweetnacl "^0.14.3" brace-expansion@^2.0.2: - version "2.1.0" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae" - integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w== + version "2.1.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.1.tgz#c68b1c4111c76aae3a6fba55d496cee10c39dad8" + integrity sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA== dependencies: balanced-match "^1.0.0" From 4ead34c3700fd5aa8231b7898b610c21a0a4a398 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:49 +0000 Subject: [PATCH 112/217] 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 fa87ea5165c67c3056c31573eff7d37896f526fe 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:52 +0000 Subject: [PATCH 113/217] 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 9d6a7ba2f5951e570628155ff46faf72a636e730 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:43 +0000 Subject: [PATCH 114/217] 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 e7c0df38a2ae7e22676dd674cb1ecb0d133c185c 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:22 +0000 Subject: [PATCH 115/217] feat(api): add prebuild_requires_success field to TaskSpec --- .stats.yml | 4 ++-- src/resources/environments/automations/automations.ts | 8 ++++++++ src/resources/environments/automations/tasks/tasks.ts | 2 ++ src/resources/shared.ts | 9 +++++++++ 4 files changed, 21 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 diff --git a/src/resources/environments/automations/automations.ts b/src/resources/environments/automations/automations.ts index 92a13c4a..2ef56e21 100644 --- a/src/resources/environments/automations/automations.ts +++ b/src/resources/environments/automations/automations.ts @@ -250,6 +250,14 @@ export namespace AutomationsFile { name?: string; + /** + * 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. + */ + prebuildRequiresSuccess?: boolean; + runsOn?: Shared.RunsOn; triggeredBy?: Array<'manual' | 'postEnvironmentStart' | 'postDevcontainerStart' | 'prebuild'>; diff --git a/src/resources/environments/automations/tasks/tasks.ts b/src/resources/environments/automations/tasks/tasks.ts index 16d9bf75..b68e80e2 100644 --- a/src/resources/environments/automations/tasks/tasks.ts +++ b/src/resources/environments/automations/tasks/tasks.ts @@ -341,6 +341,8 @@ export namespace TaskUpdateParams { env?: Array; + prebuildRequiresSuccess?: boolean | null; + runsOn?: Shared.RunsOn | null; } } diff --git a/src/resources/shared.ts b/src/resources/shared.ts index b097a933..2a24922d 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -598,6 +598,15 @@ export interface TaskSpec { */ env?: Array; + /** + * 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). + */ + prebuildRequiresSuccess?: boolean; + /** * runs_on specifies the environment the task should run on. */ From dd159ea0bf200eee8b14194ddd68ebde631a1461 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:34 +0000 Subject: [PATCH 116/217] feat(api): add Codex agent settings shape --- .stats.yml | 6 ++--- api.md | 3 +++ src/client.ts | 6 +++++ src/resources/agents.ts | 55 +++++++++++++++++++++++++++++++++++++++++ src/resources/index.ts | 3 +++ 5 files changed, 70 insertions(+), 3 deletions(-) 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 09ee43fe..e5d6af7e 100644 --- a/api.md +++ b/api.md @@ -62,6 +62,9 @@ Types: - AgentExecution - AgentMessage - AgentMode +- CodexOpenAIModel +- CodexReasoningEffort +- CodexSettings - Prompt - PromptMetadata - PromptSpec diff --git a/src/client.ts b/src/client.ts index 18e1e195..d0e34220 100644 --- a/src/client.ts +++ b/src/client.ts @@ -149,6 +149,9 @@ import { AgentUpdatePromptParams, AgentUpdatePromptResponse, Agents, + CodexOpenAIModel, + CodexReasoningEffort, + CodexSettings, Prompt, PromptMetadata, PromptSpec, @@ -1427,6 +1430,9 @@ export declare namespace Gitpod { type AgentExecution as AgentExecution, type AgentMessage as AgentMessage, type AgentMode as AgentMode, + type CodexOpenAIModel as CodexOpenAIModel, + type CodexReasoningEffort as CodexReasoningEffort, + type CodexSettings as CodexSettings, type Prompt as Prompt, type PromptMetadata as PromptMetadata, type PromptSpec as PromptSpec, diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 90839d44..17e040b6 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -1032,6 +1032,47 @@ export type AgentMode = | 'AGENT_MODE_RALPH' | 'AGENT_MODE_SPEC'; +/** + * CodexOpenAIModel is the static allowlist of concrete OpenAI models that the + * Codex app runtime can select through Ona's Codex picker. + */ +export type CodexOpenAIModel = + | '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'; + +/** + * CodexReasoningEffort is the static allowlist of reasoning efforts supported by + * the Codex app runtime. + */ +export type CodexReasoningEffort = + | 'CODEX_REASONING_EFFORT_UNSPECIFIED' + | 'CODEX_REASONING_EFFORT_LOW' + | 'CODEX_REASONING_EFFORT_MEDIUM' + | 'CODEX_REASONING_EFFORT_HIGH' + | 'CODEX_REASONING_EFFORT_EXTRA_HIGH'; + +/** + * CodexSettings contains settings consumed only by the Codex app agent. + */ +export interface CodexSettings { + /** + * CodexOpenAIModel is the static allowlist of concrete OpenAI models that the + * Codex app runtime can select through Ona's Codex picker. + */ + model?: CodexOpenAIModel; + + /** + * CodexReasoningEffort is the static allowlist of reasoning efforts supported by + * the Codex app runtime. + */ + reasoningEffort?: CodexReasoningEffort; +} + export interface Prompt { id?: string; @@ -1637,6 +1678,12 @@ export interface AgentSendToExecutionParams { */ agentMessage?: AgentMessage; + /** + * codex_settings contains per-turn desired settings for Codex app user_input + * sends. + */ + codexSettings?: CodexSettings; + userInput?: UserInputBlock; /** @@ -1658,6 +1705,11 @@ export interface AgentStartExecutionParams { codeContext?: AgentCodeContext; + /** + * codex_settings contains desired manual settings for the Codex app agent. + */ + codexSettings?: CodexSettings; + /** * mode specifies the operational mode for this agent execution If not specified, * defaults to AGENT_MODE_EXECUTION @@ -1760,6 +1812,9 @@ export declare namespace Agents { type AgentExecution as AgentExecution, type AgentMessage as AgentMessage, type AgentMode as AgentMode, + type CodexOpenAIModel as CodexOpenAIModel, + type CodexReasoningEffort as CodexReasoningEffort, + type CodexSettings as CodexSettings, type Prompt as Prompt, type PromptMetadata as PromptMetadata, type PromptSpec as PromptSpec, diff --git a/src/resources/index.ts b/src/resources/index.ts index 8658b6f1..bb765c7a 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -27,6 +27,9 @@ export { type AgentExecution, type AgentMessage, type AgentMode, + type CodexOpenAIModel, + type CodexReasoningEffort, + type CodexSettings, type Prompt, type PromptMetadata, type PromptSpec, From 59e1f33352b62755e1ff79557c56369b4cb4ea95 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:52 +0000 Subject: [PATCH 117/217] 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 fad796b744861b6589f2fd1104d0fafc18d36d24 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:23 +0000 Subject: [PATCH 118/217] 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 f4c94fb36d3cecf72a537ae54a93ff5431660373 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 119/217] 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 e3005dbf9c7f405e672bf452f0cb5358041c11ac 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:08:42 +0000 Subject: [PATCH 120/217] 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 69941b122b99b83161a022da43478d26187631e8 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:25 +0000 Subject: [PATCH 121/217] 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 84172038b5ec3458849df6654372536c5653f57c 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 122/217] 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 d1bb7757dfcf7e837880e2d99fb7361b8dd4c18c 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 123/217] 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 463ebfa82280fa25fcdb187638b17b60efc069a5 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:58 +0000 Subject: [PATCH 124/217] 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 37665bb7cee982a44ddba89dd01997cddfbe5970 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:54 +0000 Subject: [PATCH 125/217] 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 395dcf7596382a22d67977efb5fb059e7de2922a 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 126/217] 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 c994c1712b19d34287dc691426e22d1d76da47f4 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:17 +0000 Subject: [PATCH 127/217] feat(api): add Codex fast mode setting --- .stats.yml | 6 +++--- api.md | 1 + src/client.ts | 2 ++ src/resources/agents.ts | 13 +++++++++++++ src/resources/index.ts | 1 + 5 files changed, 20 insertions(+), 3 deletions(-) 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 e5d6af7e..1def2ff7 100644 --- a/api.md +++ b/api.md @@ -64,6 +64,7 @@ Types: - AgentMode - CodexOpenAIModel - CodexReasoningEffort +- CodexServiceTier - CodexSettings - Prompt - PromptMetadata diff --git a/src/client.ts b/src/client.ts index d0e34220..85cc9b76 100644 --- a/src/client.ts +++ b/src/client.ts @@ -151,6 +151,7 @@ import { Agents, CodexOpenAIModel, CodexReasoningEffort, + CodexServiceTier, CodexSettings, Prompt, PromptMetadata, @@ -1432,6 +1433,7 @@ export declare namespace Gitpod { type AgentMode as AgentMode, type CodexOpenAIModel as CodexOpenAIModel, type CodexReasoningEffort as CodexReasoningEffort, + type CodexServiceTier as CodexServiceTier, type CodexSettings as CodexSettings, type Prompt as Prompt, type PromptMetadata as PromptMetadata, diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 17e040b6..5a47dfb5 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -1056,6 +1056,12 @@ export type CodexReasoningEffort = | 'CODEX_REASONING_EFFORT_HIGH' | 'CODEX_REASONING_EFFORT_EXTRA_HIGH'; +/** + * CodexServiceTier is the static allowlist of service tiers supported by the Codex + * app runtime. + */ +export type CodexServiceTier = 'CODEX_SERVICE_TIER_UNSPECIFIED' | 'CODEX_SERVICE_TIER_FAST'; + /** * CodexSettings contains settings consumed only by the Codex app agent. */ @@ -1071,6 +1077,12 @@ export interface CodexSettings { * the Codex app runtime. */ reasoningEffort?: CodexReasoningEffort; + + /** + * CodexServiceTier is the static allowlist of service tiers supported by the Codex + * app runtime. + */ + serviceTier?: CodexServiceTier; } export interface Prompt { @@ -1814,6 +1826,7 @@ export declare namespace Agents { type AgentMode as AgentMode, type CodexOpenAIModel as CodexOpenAIModel, type CodexReasoningEffort as CodexReasoningEffort, + type CodexServiceTier as CodexServiceTier, type CodexSettings as CodexSettings, type Prompt as Prompt, type PromptMetadata as PromptMetadata, diff --git a/src/resources/index.ts b/src/resources/index.ts index bb765c7a..7ccbecf4 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -29,6 +29,7 @@ export { type AgentMode, type CodexOpenAIModel, type CodexReasoningEffort, + type CodexServiceTier, type CodexSettings, type Prompt, type PromptMetadata, From bfe0f9d2bae84f5742d94a255c85042f2fff8257 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:58 +0000 Subject: [PATCH 128/217] 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 ebee6a868e190af4475edd49f9bc1156cf1ef596 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:43 +0000 Subject: [PATCH 129/217] 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 7ef6028c05f424f72d756af8602a983039af9a48 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:54 +0000 Subject: [PATCH 130/217] 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 7155c62889ece19a8f3367f8d5cc1b3ee0394536 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:58 +0000 Subject: [PATCH 131/217] refactor(api): default StartAgent agent ID --- .stats.yml | 4 ++-- src/resources/agents.ts | 5 +++++ 2 files changed, 7 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 diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 5a47dfb5..ba47f071 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -1706,6 +1706,11 @@ export interface AgentSendToExecutionParams { } export interface AgentStartExecutionParams { + /** + * 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. + */ agentId?: string; /** From d79028234621972d25619575f3b6f776a532c2c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 19:52:49 +0000 Subject: [PATCH 132/217] feat(api): add Opus 4.8 supported model --- .stats.yml | 4 ++-- src/resources/agents.ts | 1 + 2 files changed, 3 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 diff --git a/src/resources/agents.ts b/src/resources/agents.ts index ba47f071..6f4a1513 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -874,6 +874,7 @@ export namespace AgentExecution { | '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' From aa7b5d2495ae81924a238f7246ee074143724e5c 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:03 +0000 Subject: [PATCH 133/217] 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 85dc7c317c62f1cd802a5cabb1cc3afeeef271a3 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:31 +0000 Subject: [PATCH 134/217] 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 9d1ff23c474adb238e5b9dac965cd6dfaf136c29 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 135/217] docs(api): add customer-facing descriptions to runner enums and fix CreateRunner examples --- .stats.yml | 4 ++-- src/resources/runners/runners.ts | 30 +++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 9 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 diff --git a/src/resources/runners/runners.ts b/src/resources/runners/runners.ts index e0452646..3a39e042 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -53,12 +53,12 @@ export class Runners extends APIResource { * * ### 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 @@ -68,9 +68,25 @@ export class Runners extends APIResource { * 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" @@ -85,12 +101,12 @@ export class Runners extends APIResource { * @example * ```ts * const runner = await client.runners.create({ - * name: 'Production Runner', - * provider: 'RUNNER_PROVIDER_AWS_EC2', + * name: 'GCP Runner', + * provider: 'RUNNER_PROVIDER_GCP', * spec: { * configuration: { * autoUpdate: true, - * region: 'us-west', + * region: 'us-central1', * releaseChannel: 'RUNNER_RELEASE_CHANNEL_STABLE', * }, * desiredPhase: 'RUNNER_PHASE_ACTIVE', From 6e8941b4769289f708858599453edae7d5eadd0b 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:35 +0000 Subject: [PATCH 136/217] 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 54f3487244e97c098d5a0752510c38847dec5a11 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:37 +0000 Subject: [PATCH 137/217] 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 9370c0774f8b3717d0524e97ef82da56ab236664 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 30 May 2026 10:30:15 +0000 Subject: [PATCH 138/217] feat(rbac): add billing viewer role --- .stats.yml | 4 ++-- src/resources/shared.ts | 1 + 2 files changed, 3 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 diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 2a24922d..a871b67d 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -211,6 +211,7 @@ export type ResourceRole = | 'RESOURCE_ROLE_ORG_GROUPS_ADMIN' | 'RESOURCE_ROLE_ORG_ENVIRONMENTS_READER' | 'RESOURCE_ROLE_ORG_AUDIT_LOG_READER' + | 'RESOURCE_ROLE_ORG_BILLING_VIEWER' | 'RESOURCE_ROLE_GROUP_ADMIN' | 'RESOURCE_ROLE_GROUP_VIEWER' | 'RESOURCE_ROLE_USER_IDENTITY' From a1eb0d9242f7ad81dd7613395286bbbbf4868209 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:09 +0000 Subject: [PATCH 139/217] feat(rbac): add insights viewer role --- .stats.yml | 4 ++-- src/resources/shared.ts | 1 + 2 files changed, 3 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 diff --git a/src/resources/shared.ts b/src/resources/shared.ts index a871b67d..1580bedd 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -212,6 +212,7 @@ export type ResourceRole = | 'RESOURCE_ROLE_ORG_ENVIRONMENTS_READER' | 'RESOURCE_ROLE_ORG_AUDIT_LOG_READER' | 'RESOURCE_ROLE_ORG_BILLING_VIEWER' + | 'RESOURCE_ROLE_ORG_INSIGHTS_VIEWER' | 'RESOURCE_ROLE_GROUP_ADMIN' | 'RESOURCE_ROLE_GROUP_VIEWER' | 'RESOURCE_ROLE_USER_IDENTITY' From c5111800062b0134e8924ae716879897de79bfad 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:48 +0000 Subject: [PATCH 140/217] 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 ae2dfe6bf7073b12f9ba9f6635f4d981e28d72b3 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:20 +0000 Subject: [PATCH 141/217] 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 a1cbf4d45b9228b05064e356dbb31f0fd8ffda33 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:44 +0000 Subject: [PATCH 142/217] 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 24339e83e16019a816d9452b056903c897b1385c 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 143/217] 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 e0a52439c5da75ece92eff4132ca717e92166559 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:48 +0000 Subject: [PATCH 144/217] 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 c3f2dbeafdd2b8ee3f94e92b408b6fc674c6538f 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:26 +0000 Subject: [PATCH 145/217] 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 127420cfefb74a090ae551a26ea4d34d7fc073ec 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 146/217] 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 b56d658a6046de02a05a96d09c4cc100e835ea8e 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:22 +0000 Subject: [PATCH 147/217] 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 494ff81d98636b3d2760c4cefd2d55084faaa834 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 07:41:08 +0000 Subject: [PATCH 148/217] feat(api): add security policy CRUD --- .stats.yml | 6 +++--- src/resources/shared.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 5 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 diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 1580bedd..9d92e6b9 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -213,6 +213,7 @@ export type ResourceRole = | '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' @@ -266,7 +267,9 @@ export type ResourceRole = | 'RESOURCE_ROLE_SESSION_ADMIN' | 'RESOURCE_ROLE_SESSION_USER' | 'RESOURCE_ROLE_TEAM_ADMIN' - | 'RESOURCE_ROLE_TEAM_VIEWER'; + | 'RESOURCE_ROLE_TEAM_VIEWER' + | 'RESOURCE_ROLE_SECURITY_POLICY_ADMIN' + | 'RESOURCE_ROLE_SECURITY_POLICY_VIEWER'; export type ResourceType = | 'RESOURCE_TYPE_UNSPECIFIED' @@ -318,7 +321,8 @@ export type ResourceType = | 'RESOURCE_TYPE_SERVICE_ACCOUNT_TOKEN' | 'RESOURCE_TYPE_ROLE_ASSIGNMENT' | 'RESOURCE_TYPE_WARM_POOL' - | 'RESOURCE_TYPE_NOTIFICATION'; + | 'RESOURCE_TYPE_NOTIFICATION' + | 'RESOURCE_TYPE_SECURITY_POLICY'; export interface RunsOn { docker?: RunsOn.Docker; From 609765accf046ca934fc7532d55f7b2dff52abc0 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 149/217] feat(api): add agent turn controls --- .stats.yml | 6 +++--- src/resources/agents.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 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 diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 6f4a1513..ce4944d6 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -803,7 +803,7 @@ export namespace AgentExecution { | 'AGENT_EXECUTION_FAILURE_REASON_AGENT_EXECUTION'; /** - * goal projects the current native Codex thread goal, if any. + * goal projects the current agent goal, if any. */ goal?: Status.Goal; @@ -930,12 +930,11 @@ export namespace AgentExecution { } /** - * goal projects the current native Codex thread goal, if any. + * goal projects the current agent goal, if any. */ export interface Goal { /** - * objective is the current goal text tracked by the native Codex thread-goal - * subsystem. + * objective is the current goal text tracked by the agent. */ objective?: string; @@ -950,7 +949,7 @@ export namespace AgentExecution { | 'GOAL_STATUS_BUDGET_EXHAUSTED'; /** - * updated_at is the most recent native goal update timestamp, when available. + * updated_at is the most recent goal update timestamp, when available. */ updatedAt?: string; } @@ -1031,7 +1030,8 @@ export type AgentMode = | 'AGENT_MODE_EXECUTION' | 'AGENT_MODE_PLANNING' | 'AGENT_MODE_RALPH' - | 'AGENT_MODE_SPEC'; + | 'AGENT_MODE_SPEC' + | 'AGENT_MODE_GOAL'; /** * CodexOpenAIModel is the static allowlist of concrete OpenAI models that the From 83d82a37eaae42c2e2298d58187ba492dec8070e 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:47:40 +0000 Subject: [PATCH 150/217] feat(automations): pin agent and Codex model per automation --- .stats.yml | 6 +-- api.md | 8 ++-- src/client.ts | 12 ++--- src/resources/agents.ts | 61 +------------------------ src/resources/automations.ts | 12 +++++ src/resources/index.ts | 4 -- src/resources/shared.ts | 53 +++++++++++++++++++++ tests/api-resources/automations.test.ts | 5 ++ 8 files changed, 83 insertions(+), 78 deletions(-) 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/api.md b/api.md index 1def2ff7..9a7b82bb 100644 --- a/api.md +++ b/api.md @@ -3,6 +3,10 @@ Types: - AutomationTrigger +- CodexOpenAIModel +- CodexReasoningEffort +- CodexServiceTier +- CodexSettings - CountResponseRelation - EnvironmentClass - EnvironmentVariableItem @@ -62,10 +66,6 @@ Types: - AgentExecution - AgentMessage - AgentMode -- CodexOpenAIModel -- CodexReasoningEffort -- CodexServiceTier -- CodexSettings - Prompt - PromptMetadata - PromptSpec diff --git a/src/client.ts b/src/client.ts index 85cc9b76..fadb241a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -149,10 +149,6 @@ import { AgentUpdatePromptParams, AgentUpdatePromptResponse, Agents, - CodexOpenAIModel, - CodexReasoningEffort, - CodexServiceTier, - CodexSettings, Prompt, PromptMetadata, PromptSpec, @@ -1431,10 +1427,6 @@ export declare namespace Gitpod { type AgentExecution as AgentExecution, type AgentMessage as AgentMessage, type AgentMode as AgentMode, - type CodexOpenAIModel as CodexOpenAIModel, - type CodexReasoningEffort as CodexReasoningEffort, - type CodexServiceTier as CodexServiceTier, - type CodexSettings as CodexSettings, type Prompt as Prompt, type PromptMetadata as PromptMetadata, type PromptSpec as PromptSpec, @@ -1778,6 +1770,10 @@ export declare namespace Gitpod { }; export type AutomationTrigger = API.AutomationTrigger; + export type CodexOpenAIModel = API.CodexOpenAIModel; + export type CodexReasoningEffort = API.CodexReasoningEffort; + export type CodexServiceTier = API.CodexServiceTier; + export type CodexSettings = API.CodexSettings; export type CountResponseRelation = API.CountResponseRelation; export type EnvironmentClass = API.EnvironmentClass; export type EnvironmentVariableItem = API.EnvironmentVariableItem; diff --git a/src/resources/agents.ts b/src/resources/agents.ts index ce4944d6..c1dccbb8 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -1033,59 +1033,6 @@ export type AgentMode = | 'AGENT_MODE_SPEC' | 'AGENT_MODE_GOAL'; -/** - * CodexOpenAIModel is the static allowlist of concrete OpenAI models that the - * Codex app runtime can select through Ona's Codex picker. - */ -export type CodexOpenAIModel = - | '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'; - -/** - * CodexReasoningEffort is the static allowlist of reasoning efforts supported by - * the Codex app runtime. - */ -export type CodexReasoningEffort = - | 'CODEX_REASONING_EFFORT_UNSPECIFIED' - | 'CODEX_REASONING_EFFORT_LOW' - | 'CODEX_REASONING_EFFORT_MEDIUM' - | 'CODEX_REASONING_EFFORT_HIGH' - | 'CODEX_REASONING_EFFORT_EXTRA_HIGH'; - -/** - * CodexServiceTier is the static allowlist of service tiers supported by the Codex - * app runtime. - */ -export type CodexServiceTier = 'CODEX_SERVICE_TIER_UNSPECIFIED' | 'CODEX_SERVICE_TIER_FAST'; - -/** - * CodexSettings contains settings consumed only by the Codex app agent. - */ -export interface CodexSettings { - /** - * CodexOpenAIModel is the static allowlist of concrete OpenAI models that the - * Codex app runtime can select through Ona's Codex picker. - */ - model?: CodexOpenAIModel; - - /** - * CodexReasoningEffort is the static allowlist of reasoning efforts supported by - * the Codex app runtime. - */ - reasoningEffort?: CodexReasoningEffort; - - /** - * CodexServiceTier is the static allowlist of service tiers supported by the Codex - * app runtime. - */ - serviceTier?: CodexServiceTier; -} - export interface Prompt { id?: string; @@ -1695,7 +1642,7 @@ export interface AgentSendToExecutionParams { * codex_settings contains per-turn desired settings for Codex app user_input * sends. */ - codexSettings?: CodexSettings; + codexSettings?: Shared.CodexSettings; userInput?: UserInputBlock; @@ -1726,7 +1673,7 @@ export interface AgentStartExecutionParams { /** * codex_settings contains desired manual settings for the Codex app agent. */ - codexSettings?: CodexSettings; + codexSettings?: Shared.CodexSettings; /** * mode specifies the operational mode for this agent execution If not specified, @@ -1830,10 +1777,6 @@ export declare namespace Agents { type AgentExecution as AgentExecution, type AgentMessage as AgentMessage, type AgentMode as AgentMode, - type CodexOpenAIModel as CodexOpenAIModel, - type CodexReasoningEffort as CodexReasoningEffort, - type CodexServiceTier as CodexServiceTier, - type CodexSettings as CodexSettings, type Prompt as Prompt, type PromptMetadata as PromptMetadata, type PromptSpec as PromptSpec, diff --git a/src/resources/automations.ts b/src/resources/automations.ts index 7e3abe39..bb3a7535 100644 --- a/src/resources/automations.ts +++ b/src/resources/automations.ts @@ -2509,6 +2509,12 @@ export interface AutomationCreateParams { */ action: WorkflowAction; + /** + * Codex app agent settings. Only meaningful when agent_id refers to the Codex app + * agent. + */ + codexSettings?: Shared.CodexSettings; + /** * Description must be at most 500 characters: * @@ -2558,6 +2564,12 @@ export interface AutomationUpdateParams { */ action?: WorkflowAction | null; + /** + * Codex app agent settings. Only meaningful when agent_id refers to the Codex app + * agent. + */ + codexSettings?: Shared.CodexSettings | null; + /** * Description must be at most 500 characters: * diff --git a/src/resources/index.ts b/src/resources/index.ts index 7ccbecf4..8658b6f1 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -27,10 +27,6 @@ export { type AgentExecution, type AgentMessage, type AgentMode, - type CodexOpenAIModel, - type CodexReasoningEffort, - type CodexServiceTier, - type CodexSettings, type Prompt, type PromptMetadata, type PromptSpec, diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 9d92e6b9..63200eea 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -39,6 +39,59 @@ export interface AutomationTrigger { prebuild?: boolean; } +/** + * CodexOpenAIModel is the static allowlist of concrete OpenAI models that the + * Codex app runtime can select through Ona's Codex picker. + */ +export type CodexOpenAIModel = + | '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'; + +/** + * CodexReasoningEffort is the static allowlist of reasoning efforts supported by + * the Codex app runtime. + */ +export type CodexReasoningEffort = + | 'CODEX_REASONING_EFFORT_UNSPECIFIED' + | 'CODEX_REASONING_EFFORT_LOW' + | 'CODEX_REASONING_EFFORT_MEDIUM' + | 'CODEX_REASONING_EFFORT_HIGH' + | 'CODEX_REASONING_EFFORT_EXTRA_HIGH'; + +/** + * CodexServiceTier is the static allowlist of service tiers supported by the Codex + * app runtime. + */ +export type CodexServiceTier = 'CODEX_SERVICE_TIER_UNSPECIFIED' | 'CODEX_SERVICE_TIER_FAST'; + +/** + * CodexSettings contains settings consumed only by the Codex app agent. + */ +export interface CodexSettings { + /** + * CodexOpenAIModel is the static allowlist of concrete OpenAI models that the + * Codex app runtime can select through Ona's Codex picker. + */ + model?: CodexOpenAIModel; + + /** + * CodexReasoningEffort is the static allowlist of reasoning efforts supported by + * the Codex app runtime. + */ + reasoningEffort?: CodexReasoningEffort; + + /** + * CodexServiceTier is the static allowlist of service tiers supported by the Codex + * app runtime. + */ + serviceTier?: CodexServiceTier; +} + export type CountResponseRelation = | 'COUNT_RESPONSE_RELATION_UNSPECIFIED' | 'COUNT_RESPONSE_RELATION_EQ' diff --git a/tests/api-resources/automations.test.ts b/tests/api-resources/automations.test.ts index c91fbf5d..4e284185 100644 --- a/tests/api-resources/automations.test.ts +++ b/tests/api-resources/automations.test.ts @@ -42,6 +42,11 @@ describe('resource automations', () => { }, ], }, + codexSettings: { + model: 'CODEX_OPEN_AI_MODEL_UNSPECIFIED', + reasoningEffort: 'CODEX_REASONING_EFFORT_UNSPECIFIED', + serviceTier: 'CODEX_SERVICE_TIER_UNSPECIFIED', + }, description: 'description', executor: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' }, name: 'name', From e3c9f7b5e76fb915770daf395eac8ddc566b4f94 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:47 +0000 Subject: [PATCH 151/217] 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 5024cc955226c2b8fc01f6e7c2e13037a54c509a 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:43 +0000 Subject: [PATCH 152/217] feat(api): add Codex policy allowlists --- .stats.yml | 4 +- src/resources/organizations/policies.ts | 52 +++++++++++++++++++ .../organizations/policies.test.ts | 4 ++ 3 files changed, 58 insertions(+), 2 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/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index b07188aa..0172a1b0 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -115,6 +115,32 @@ export interface AgentPolicy { */ scmToolsDisabled: boolean; + /** + * allowed_agent_ids contains the agent IDs users may select when the codex_rollout + * feature flag is enabled. Empty means all agents are allowed. + */ + allowedAgentIds?: Array; + + /** + * allowed_codex_models contains the Codex models users may select when the + * codex_rollout feature flag is enabled. Empty means all Codex models are allowed. + */ + allowedCodexModels?: Array; + + /** + * 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. + */ + allowedCodexReasoningEfforts?: Array; + + /** + * 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. + */ + allowedCodexServiceTiers?: Array; + /** * conversation_sharing_policy controls whether agent conversations can be shared */ @@ -726,6 +752,32 @@ export namespace PolicyUpdateParams { * agent_policy contains agent-specific policy settings */ export interface AgentPolicy { + /** + * allowed_agent_ids contains the agent IDs users may select when the codex_rollout + * feature flag is enabled. Empty means all agents are allowed. + */ + allowedAgentIds?: Array; + + /** + * allowed_codex_models contains the Codex models users may select when the + * codex_rollout feature flag is enabled. Empty means all Codex models are allowed. + */ + allowedCodexModels?: Array; + + /** + * 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. + */ + allowedCodexReasoningEfforts?: Array; + + /** + * 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. + */ + allowedCodexServiceTiers?: Array; + /** * command_deny_list contains a list of commands that agents are not allowed to * execute diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 18f5861a..7a761e67 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -48,6 +48,10 @@ describe('resource policies', () => { const response = await client.organizations.policies.update({ organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', agentPolicy: { + allowedAgentIds: ['string'], + allowedCodexModels: ['CODEX_OPEN_AI_MODEL_UNSPECIFIED'], + allowedCodexReasoningEfforts: ['CODEX_REASONING_EFFORT_UNSPECIFIED'], + allowedCodexServiceTiers: ['CODEX_SERVICE_TIER_UNSPECIFIED'], commandDenyList: ['string'], conversationSharingPolicy: 'CONVERSATION_SHARING_POLICY_UNSPECIFIED', maxSubagentsPerEnvironment: 10, From eca06a8ecda5e30d578d78b63b3886aaaec2b5b5 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:28 +0000 Subject: [PATCH 153/217] 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 72c55494ac222be6355d6adcf5326f525647a628 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:30 +0000 Subject: [PATCH 154/217] 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 4cf378c3bc7a22ee089e03621c26f21e15b2f466 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:33 +0000 Subject: [PATCH 155/217] 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 0dd1b77ac855ed8ecaf21d8ae6918cee8d4ac3a0 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 156/217] 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 bd752183d95f9a625cbb185a5f61533b81985344 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:27 +0000 Subject: [PATCH 157/217] 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 739fc69fcc031fb5dd172564e9c07690038afd3e 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:56:43 +0000 Subject: [PATCH 158/217] 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 281551871b8e3715aaa18530718e5201ccad5706 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:47 +0000 Subject: [PATCH 159/217] feat(agents): add native goal set control --- .stats.yml | 6 +++--- api.md | 1 + src/client.ts | 2 ++ src/resources/agents.ts | 38 ++++++++++++++++++++++++++++++++------ src/resources/index.ts | 1 + 5 files changed, 39 insertions(+), 9 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 diff --git a/api.md b/api.md index 9a7b82bb..b1aede1a 100644 --- a/api.md +++ b/api.md @@ -66,6 +66,7 @@ Types: - AgentExecution - AgentMessage - AgentMode +- GoalStatus - Prompt - PromptMetadata - PromptSpec diff --git a/src/client.ts b/src/client.ts index fadb241a..7152eb93 100644 --- a/src/client.ts +++ b/src/client.ts @@ -149,6 +149,7 @@ import { AgentUpdatePromptParams, AgentUpdatePromptResponse, Agents, + GoalStatus, Prompt, PromptMetadata, PromptSpec, @@ -1427,6 +1428,7 @@ export declare namespace Gitpod { type AgentExecution as AgentExecution, type AgentMessage as AgentMessage, type AgentMode as AgentMode, + type GoalStatus as GoalStatus, type Prompt as Prompt, type PromptMetadata as PromptMetadata, type PromptSpec as PromptSpec, diff --git a/src/resources/agents.ts b/src/resources/agents.ts index c1dccbb8..452948a9 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -933,6 +933,11 @@ export namespace AgentExecution { * goal projects the current agent goal, if any. */ export interface Goal { + /** + * created_at is when the current goal was created, when available. + */ + createdAt?: string; + /** * objective is the current goal text tracked by the agent. */ @@ -941,12 +946,23 @@ export namespace AgentExecution { /** * status is the lifecycle state of the current goal. */ - status?: - | 'GOAL_STATUS_UNSPECIFIED' - | 'GOAL_STATUS_ACTIVE' - | 'GOAL_STATUS_PAUSED' - | 'GOAL_STATUS_COMPLETED' - | 'GOAL_STATUS_BUDGET_EXHAUSTED'; + status?: AgentsAPI.GoalStatus; + + /** + * time_used is the elapsed wall-clock time reported by the agent for this goal. + */ + timeUsed?: string; + + /** + * token_budget is the token budget reported by the agent for this goal, when one + * exists. + */ + tokenBudget?: string | null; + + /** + * tokens_used is the token usage reported by the agent for this goal. + */ + tokensUsed?: string; /** * updated_at is the most recent goal update timestamp, when available. @@ -1033,6 +1049,15 @@ export type AgentMode = | 'AGENT_MODE_SPEC' | 'AGENT_MODE_GOAL'; +export type GoalStatus = + | 'GOAL_STATUS_UNSPECIFIED' + | 'GOAL_STATUS_ACTIVE' + | 'GOAL_STATUS_PAUSED' + | 'GOAL_STATUS_COMPLETED' + | 'GOAL_STATUS_BUDGET_EXHAUSTED' + | 'GOAL_STATUS_BLOCKED' + | 'GOAL_STATUS_USAGE_LIMITED'; + export interface Prompt { id?: string; @@ -1777,6 +1802,7 @@ export declare namespace Agents { type AgentExecution as AgentExecution, type AgentMessage as AgentMessage, type AgentMode as AgentMode, + type GoalStatus as GoalStatus, type Prompt as Prompt, type PromptMetadata as PromptMetadata, type PromptSpec as PromptSpec, diff --git a/src/resources/index.ts b/src/resources/index.ts index 8658b6f1..1a1be170 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -27,6 +27,7 @@ export { type AgentExecution, type AgentMessage, type AgentMode, + type GoalStatus, type Prompt, type PromptMetadata, type PromptSpec, From 629b54fb47424b5d83026765a3d49c459af2041e 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:26 +0000 Subject: [PATCH 160/217] 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 92d2e9686b1fc00f7eec368674a1a58ce09e5bd1 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:38 +0000 Subject: [PATCH 161/217] 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 a22d444d5f1c13d2ac6243aa740729415094b7ad 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:26 +0000 Subject: [PATCH 162/217] refactor(agent)!: remove loop condition mechanism --- .stats.yml | 6 +++--- src/resources/agents.ts | 10 ---------- 2 files changed, 3 insertions(+), 13 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 diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 452948a9..4c78b9c3 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -730,8 +730,6 @@ export namespace AgentExecution { limits?: Spec.Limits; - loopConditions?: Array; - session?: string; /** @@ -750,14 +748,6 @@ export namespace AgentExecution { maxOutputTokens?: string; } - - export interface LoopCondition { - id?: string; - - description?: string; - - expression?: string; - } } /** From 16a2bd10d096b0fed307cdb8c63f647a464a89e5 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:15 +0000 Subject: [PATCH 163/217] 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 14526e53fb6c4b755634c4ed5ab598195f844872 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 15:47:51 +0000 Subject: [PATCH 164/217] fix(client): send content-type header for requests with an omitted optional body --- src/client.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 7152eb93..b4821d23 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1118,11 +1118,19 @@ export class Gitpod { return () => controller.abort(); } - private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): { + private buildBody({ options }: { options: FinalRequestOptions }): { bodyHeaders: HeadersLike; body: BodyInit | undefined; } { + const { body, headers: rawHeaders } = options; if (!body) { + // A resource method always passes a `body` key when its operation defines a + // request body, even if the caller omitted an optional body param. Keep the + // content-type for those, and only elide it for operations with no body at + // all (e.g. GET/DELETE). + if (body == null && 'body' in options) { + return this.#encoder({ body, headers: buildHeaders([rawHeaders]) }); + } return { bodyHeaders: undefined, body: undefined }; } const headers = buildHeaders([rawHeaders]); From 2a335c36b73fc0449e0403333130d63a5c3776a2 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 165/217] refactor(api): remove project defaults API surface --- .stats.yml | 6 +- api.md | 4 - src/resources/organizations/index.ts | 4 - src/resources/organizations/organizations.ts | 8 - src/resources/organizations/policies.ts | 191 ------------------ .../organizations/policies.test.ts | 27 --- 6 files changed, 3 insertions(+), 237 deletions(-) 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 b1aede1a..8af77097 100644 --- a/api.md +++ b/api.md @@ -485,10 +485,6 @@ Types: - CustomSecurityAgent - KernelControlsAction - OrganizationPolicies -- ProjectCreationDefaultEnvironmentClass -- ProjectCreationDefaultEnvironmentClassWarmPool -- ProjectCreationDefaults -- ProjectCreationDefaultsPrebuilds - SecurityAgentPolicy - VetoExecPolicy - PolicyRetrieveResponse diff --git a/src/resources/organizations/index.ts b/src/resources/organizations/index.ts index 5ff89273..29e04f78 100644 --- a/src/resources/organizations/index.ts +++ b/src/resources/organizations/index.ts @@ -77,10 +77,6 @@ export { type CustomSecurityAgent, type KernelControlsAction, type OrganizationPolicies, - type ProjectCreationDefaultEnvironmentClass, - type ProjectCreationDefaultEnvironmentClassWarmPool, - type ProjectCreationDefaults, - type ProjectCreationDefaultsPrebuilds, type SecurityAgentPolicy, type VetoExecPolicy, type PolicyRetrieveResponse, diff --git a/src/resources/organizations/organizations.ts b/src/resources/organizations/organizations.ts index f0bc90c3..3cdc46f4 100644 --- a/src/resources/organizations/organizations.ts +++ b/src/resources/organizations/organizations.ts @@ -66,10 +66,6 @@ import { PolicyRetrieveResponse, PolicyUpdateParams, PolicyUpdateResponse, - ProjectCreationDefaultEnvironmentClass, - ProjectCreationDefaultEnvironmentClassWarmPool, - ProjectCreationDefaults, - ProjectCreationDefaultsPrebuilds, SecurityAgentPolicy, VetoExecPolicy, } from './policies'; @@ -1067,10 +1063,6 @@ export declare namespace Organizations { type CustomSecurityAgent as CustomSecurityAgent, type KernelControlsAction as KernelControlsAction, type OrganizationPolicies as OrganizationPolicies, - type ProjectCreationDefaultEnvironmentClass as ProjectCreationDefaultEnvironmentClass, - type ProjectCreationDefaultEnvironmentClassWarmPool as ProjectCreationDefaultEnvironmentClassWarmPool, - type ProjectCreationDefaults as ProjectCreationDefaults, - type ProjectCreationDefaultsPrebuilds as ProjectCreationDefaultsPrebuilds, type SecurityAgentPolicy as SecurityAgentPolicy, type VetoExecPolicy as VetoExecPolicy, type PolicyRetrieveResponse as PolicyRetrieveResponse, diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index 0172a1b0..8a5fdd2f 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -388,12 +388,6 @@ export interface OrganizationPolicies { */ maximumEnvironmentTimeout?: string; - /** - * project_creation_defaults contains default settings applied to newly created - * projects. - */ - projectCreationDefaults?: ProjectCreationDefaults; - /** * security_agent_policy contains security agent configuration for the * organization. When configured, security agents are automatically deployed to all @@ -422,139 +416,6 @@ export namespace OrganizationPolicies { } } -/** - * ProjectCreationDefaultEnvironmentClass configures a single environment class in - * the project creation defaults. - */ -export interface ProjectCreationDefaultEnvironmentClass { - /** - * environment_class_id is the ID of the environment class. - */ - environmentClassId?: string; - - /** - * order is the priority of this entry (lower = higher priority). - */ - order?: number; - - /** - * prebuild controls whether prebuilds are enabled for this environment class on - * newly created projects. - */ - prebuild?: boolean; - - /** - * warm_pool configures the warm pool for this environment class on newly created - * projects. Only meaningful when prebuild is true. - */ - warmPool?: ProjectCreationDefaultEnvironmentClassWarmPool; -} - -/** - * ProjectCreationDefaultEnvironmentClassWarmPool configures warm pool defaults for - * an environment class in the project creation defaults. - */ -export interface ProjectCreationDefaultEnvironmentClassWarmPool { - /** - * enabled controls whether a warm pool is created for this environment class. - */ - enabled?: boolean; - - /** - * max_size is the maximum number of warm instances. Must be >= min_size and <= 20. - */ - maxSize?: number; - - /** - * min_size is the minimum number of warm instances. Must be >= 0 and <= max_size. - */ - minSize?: number; -} - -/** - * ProjectCreationDefaults contains default settings applied to newly created - * projects. - */ -export interface ProjectCreationDefaults { - /** - * 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. - */ - environmentClasses?: Array; - - /** - * insights_enabled controls whether Insights (co-author attribution) is - * automatically enabled on newly created projects. - */ - insightsEnabled?: boolean; - - /** - * 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. - */ - prebuilds?: ProjectCreationDefaultsPrebuilds; -} - -/** - * ProjectCreationDefaultsPrebuilds configures default prebuild settings. Presence - * of this message means prebuilds can be enabled for the default environment - * classes. - */ -export interface ProjectCreationDefaultsPrebuilds { - /** - * enable_jetbrains_warmup controls whether JetBrains IDE warmup runs during - * prebuilds on newly created projects. - */ - enableJetbrainsWarmup?: boolean; - - /** - * prebuild_executor is the service account used to run prebuilds on newly created - * projects. Must be a service account (not a user). - */ - prebuildExecutor?: Shared.Subject; - - /** - * 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. - */ - timeout?: string; - - /** - * trigger defines when prebuilds should be created on newly created projects. - */ - trigger?: ProjectCreationDefaultsPrebuilds.Trigger; -} - -export namespace ProjectCreationDefaultsPrebuilds { - /** - * trigger defines when prebuilds should be created on newly created projects. - */ - export interface Trigger { - /** - * daily_schedule triggers a prebuild once per day at the specified hour (UTC). The - * actual start time may vary slightly to distribute system load. - */ - dailySchedule: Trigger.DailySchedule; - } - - export namespace Trigger { - /** - * daily_schedule triggers a prebuild once per day at the specified hour (UTC). The - * actual start time may vary slightly to distribute system load. - */ - export interface DailySchedule { - /** - * 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. - */ - hourUtc?: number; - } - } -} - /** * SecurityAgentPolicy contains security agent configuration for an organization. * When enabled, security agents are automatically deployed to all environments. @@ -711,12 +572,6 @@ export interface PolicyUpdateParams { */ portSharingDisabled?: boolean | null; - /** - * project_creation_defaults contains updates to default settings applied to newly - * created projects. - */ - projectCreationDefaults?: PolicyUpdateParams.ProjectCreationDefaults | null; - /** * 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. @@ -828,48 +683,6 @@ export namespace PolicyUpdateParams { allowedVersions?: Array; } - /** - * project_creation_defaults contains updates to default settings applied to newly - * created projects. - */ - export interface ProjectCreationDefaults { - /** - * environment_classes replaces the full list of default environment classes and - * their per-class settings. Send an empty list to clear defaults. - */ - environmentClasses?: Array; - - /** - * insights_enabled controls whether Insights (co-author attribution) is - * automatically enabled on newly created projects. - */ - insightsEnabled?: boolean | null; - - /** - * prebuilds updates default prebuild settings for newly created projects. When - * absent, prebuild defaults are left unchanged. - */ - prebuilds?: ProjectCreationDefaults.Prebuilds | null; - } - - export namespace ProjectCreationDefaults { - /** - * prebuilds updates default prebuild settings for newly created projects. When - * absent, prebuild defaults are left unchanged. - */ - export interface Prebuilds { - /** - * disabled clears persisted prebuild defaults. - */ - disabled?: unknown; - - /** - * enabled sets or updates persisted prebuild defaults. - */ - enabled?: PoliciesAPI.ProjectCreationDefaultsPrebuilds; - } - } - /** * security_agent_policy contains security agent configuration updates */ @@ -923,10 +736,6 @@ export declare namespace Policies { type CustomSecurityAgent as CustomSecurityAgent, type KernelControlsAction as KernelControlsAction, type OrganizationPolicies as OrganizationPolicies, - type ProjectCreationDefaultEnvironmentClass as ProjectCreationDefaultEnvironmentClass, - type ProjectCreationDefaultEnvironmentClassWarmPool as ProjectCreationDefaultEnvironmentClassWarmPool, - type ProjectCreationDefaults as ProjectCreationDefaults, - type ProjectCreationDefaultsPrebuilds as ProjectCreationDefaultsPrebuilds, type SecurityAgentPolicy as SecurityAgentPolicy, type VetoExecPolicy as VetoExecPolicy, type PolicyRetrieveResponse as PolicyRetrieveResponse, diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 7a761e67..696f7eb5 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -74,33 +74,6 @@ describe('resource policies', () => { membersCreateProjects: true, membersRequireProjects: true, portSharingDisabled: true, - projectCreationDefaults: { - environmentClasses: [ - { - environmentClassId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - order: 0, - prebuild: true, - warmPool: { - enabled: true, - maxSize: 20, - minSize: 20, - }, - }, - ], - insightsEnabled: true, - prebuilds: { - disabled: {}, - enabled: { - enableJetbrainsWarmup: true, - prebuildExecutor: { - id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - principal: 'PRINCIPAL_UNSPECIFIED', - }, - timeout: '+9125115.360s', - trigger: { dailySchedule: { hourUtc: 23 } }, - }, - }, - }, requireCustomDomainAccess: true, restrictAccountCreationToScim: true, securityAgentPolicy: { From fa2100d2bc7f4ef32e07cec77fa9fcd5293a16d6 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:40 +0000 Subject: [PATCH 166/217] 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 5db47100fe99b7d627579548979e896e58a413f4 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:19 +0000 Subject: [PATCH 167/217] 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 45068197f827eed78e9998042430fd0d1b26fce9 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:42 +0000 Subject: [PATCH 168/217] 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 5ea36298d4b4f684cabb1f524cbec25bbfbaea7c 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:26 +0000 Subject: [PATCH 169/217] 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 aa8a160ce2fdf9df28ef1c4ca713bfa49d7f4498 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 170/217] 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 95ac757399d2890e7200605249da3d6139bf786a 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:08 +0000 Subject: [PATCH 171/217] 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 718c3e1c007bb538f033e559934fda15949529ff 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:21 +0000 Subject: [PATCH 172/217] 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 d6b48d0e0008b69338e9c706bcfe5f1f62d0ed91 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:31:41 +0000 Subject: [PATCH 173/217] feat(api): add Claude Sonnet 5 model enum --- .stats.yml | 4 ++-- src/resources/agents.ts | 1 + 2 files changed, 3 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 diff --git a/src/resources/agents.ts b/src/resources/agents.ts index 4c78b9c3..efb0094a 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -857,6 +857,7 @@ export namespace AgentExecution { | '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' From dfd0a27371bb3ebc9b769d83d10dcc8a53919a01 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:10 +0000 Subject: [PATCH 174/217] 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 26c9b84e5baede72909a93a3bf15b8c8ba08e97e 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:43 +0000 Subject: [PATCH 175/217] 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 3cbf284ae3a4bb9f65d169d06497ed198ac572ab 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:21 +0000 Subject: [PATCH 176/217] 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 01b5110ad00714c55338fd482dfcd6272dfcfafc 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:45 +0000 Subject: [PATCH 177/217] 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 1bb38e1966c07e9ce537d9c2caf51bd9c7131150 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:13 +0000 Subject: [PATCH 178/217] 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 fa80ce9e9ffc891932e0dbc2fd47f02bfeb0bdf8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 17:34:36 +0000 Subject: [PATCH 179/217] feat(api): expose usage insights API --- .stats.yml | 8 +- api.md | 33 +- src/client.ts | 54 ++ src/resources/agents.ts | 28 +- src/resources/index.ts | 27 + src/resources/usage.ts | 996 +++++++++++++++++++++++++++++- tests/api-resources/usage.test.ts | 171 +++++ 7 files changed, 1264 insertions(+), 53 deletions(-) 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 8af77097..3248d0b6 100644 --- a/api.md +++ b/api.md @@ -797,10 +797,37 @@ Methods: Types: +- AgentTraceModelBreakdown +- AgentTraceSummary +- AgentTraceTimeBucket +- CoAuthorSummary +- CoAuthorTimeBucket +- CoAuthorTool +- DateRange - EnvironmentUsageRecord - -Methods: - +- PrSummary +- PrTimeBucket +- Resolution +- SupportedModel +- TimeSeriesPoint +- ToolBreakdown +- UsageGetAdoptionUsageSummaryResponse +- UsageGetAgentTraceSummaryResponse +- UsageGetAgentTraceTimeSeriesResponse +- UsageGetCoAuthorSummaryResponse +- UsageGetCoAuthorTimeSeriesResponse +- UsageGetPrSummaryResponse +- UsageGetPrTimeSeriesResponse + +Methods: + +- client.usage.getAdoptionUsageSummary({ ...params }) -> UsageGetAdoptionUsageSummaryResponse +- client.usage.getAgentTraceSummary({ ...params }) -> UsageGetAgentTraceSummaryResponse +- client.usage.getAgentTraceTimeSeries({ ...params }) -> UsageGetAgentTraceTimeSeriesResponse +- client.usage.getCoAuthorSummary({ ...params }) -> UsageGetCoAuthorSummaryResponse +- client.usage.getCoAuthorTimeSeries({ ...params }) -> UsageGetCoAuthorTimeSeriesResponse +- client.usage.getPrSummary({ ...params }) -> UsageGetPrSummaryResponse +- client.usage.getPrTimeSeries({ ...params }) -> UsageGetPrTimeSeriesResponse - client.usage.listEnvironmentRuntimeRecords({ ...params }) -> EnvironmentUsageRecordsRecordsPage # Users diff --git a/src/client.ts b/src/client.ts index b4821d23..6a4904c5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -292,9 +292,36 @@ import { SecretsSecretsPage, } from './resources/secrets'; import { + AgentTraceModelBreakdown, + AgentTraceSummary, + AgentTraceTimeBucket, + CoAuthorSummary, + CoAuthorTimeBucket, + CoAuthorTool, + DateRange, EnvironmentUsageRecord, EnvironmentUsageRecordsRecordsPage, + PrSummary, + PrTimeBucket, + Resolution, + SupportedModel, + TimeSeriesPoint, + ToolBreakdown, Usage, + UsageGetAdoptionUsageSummaryParams, + UsageGetAdoptionUsageSummaryResponse, + UsageGetAgentTraceSummaryParams, + UsageGetAgentTraceSummaryResponse, + UsageGetAgentTraceTimeSeriesParams, + UsageGetAgentTraceTimeSeriesResponse, + UsageGetCoAuthorSummaryParams, + UsageGetCoAuthorSummaryResponse, + UsageGetCoAuthorTimeSeriesParams, + UsageGetCoAuthorTimeSeriesResponse, + UsageGetPrSummaryParams, + UsageGetPrSummaryResponse, + UsageGetPrTimeSeriesParams, + UsageGetPrTimeSeriesResponse, UsageListEnvironmentRuntimeRecordsParams, } from './resources/usage'; import { @@ -1761,8 +1788,35 @@ export declare namespace Gitpod { export { Usage as Usage, + type AgentTraceModelBreakdown as AgentTraceModelBreakdown, + type AgentTraceSummary as AgentTraceSummary, + type AgentTraceTimeBucket as AgentTraceTimeBucket, + type CoAuthorSummary as CoAuthorSummary, + type CoAuthorTimeBucket as CoAuthorTimeBucket, + type CoAuthorTool as CoAuthorTool, + type DateRange as DateRange, type EnvironmentUsageRecord as EnvironmentUsageRecord, + type PrSummary as PrSummary, + type PrTimeBucket as PrTimeBucket, + type Resolution as Resolution, + type SupportedModel as SupportedModel, + type TimeSeriesPoint as TimeSeriesPoint, + type ToolBreakdown as ToolBreakdown, + type UsageGetAdoptionUsageSummaryResponse as UsageGetAdoptionUsageSummaryResponse, + type UsageGetAgentTraceSummaryResponse as UsageGetAgentTraceSummaryResponse, + type UsageGetAgentTraceTimeSeriesResponse as UsageGetAgentTraceTimeSeriesResponse, + type UsageGetCoAuthorSummaryResponse as UsageGetCoAuthorSummaryResponse, + type UsageGetCoAuthorTimeSeriesResponse as UsageGetCoAuthorTimeSeriesResponse, + type UsageGetPrSummaryResponse as UsageGetPrSummaryResponse, + type UsageGetPrTimeSeriesResponse as UsageGetPrTimeSeriesResponse, type EnvironmentUsageRecordsRecordsPage as EnvironmentUsageRecordsRecordsPage, + type UsageGetAdoptionUsageSummaryParams as UsageGetAdoptionUsageSummaryParams, + type UsageGetAgentTraceSummaryParams as UsageGetAgentTraceSummaryParams, + type UsageGetAgentTraceTimeSeriesParams as UsageGetAgentTraceTimeSeriesParams, + type UsageGetCoAuthorSummaryParams as UsageGetCoAuthorSummaryParams, + type UsageGetCoAuthorTimeSeriesParams as UsageGetCoAuthorTimeSeriesParams, + type UsageGetPrSummaryParams as UsageGetPrSummaryParams, + type UsageGetPrTimeSeriesParams as UsageGetPrTimeSeriesParams, type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams, }; diff --git a/src/resources/agents.ts b/src/resources/agents.ts index efb0094a..688c3120 100644 --- a/src/resources/agents.ts +++ b/src/resources/agents.ts @@ -3,6 +3,7 @@ import { APIResource } from '../core/resource'; import * as AgentsAPI from './agents'; import * as Shared from './shared'; +import * as UsageAPI from './usage'; import { APIPromise } from '../core/api-promise'; import { AgentExecutionsPage, @@ -846,32 +847,7 @@ export namespace AgentExecution { /** * supported_model is the LLM model being used by the agent execution. */ - supportedModel?: - | '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'; + supportedModel?: UsageAPI.SupportedModel; /** * transcript_url is the URL to the LLM transcript (all messages exchanged between diff --git a/src/resources/index.ts b/src/resources/index.ts index 1a1be170..7326ceed 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -338,7 +338,34 @@ export { } from './secrets'; export { Usage, + type AgentTraceModelBreakdown, + type AgentTraceSummary, + type AgentTraceTimeBucket, + type CoAuthorSummary, + type CoAuthorTimeBucket, + type CoAuthorTool, + type DateRange, type EnvironmentUsageRecord, + type PrSummary, + type PrTimeBucket, + type Resolution, + type SupportedModel, + type TimeSeriesPoint, + type ToolBreakdown, + type UsageGetAdoptionUsageSummaryResponse, + type UsageGetAgentTraceSummaryResponse, + type UsageGetAgentTraceTimeSeriesResponse, + type UsageGetCoAuthorSummaryResponse, + type UsageGetCoAuthorTimeSeriesResponse, + type UsageGetPrSummaryResponse, + type UsageGetPrTimeSeriesResponse, + type UsageGetAdoptionUsageSummaryParams, + type UsageGetAgentTraceSummaryParams, + type UsageGetAgentTraceTimeSeriesParams, + type UsageGetCoAuthorSummaryParams, + type UsageGetCoAuthorTimeSeriesParams, + type UsageGetPrSummaryParams, + type UsageGetPrTimeSeriesParams, type UsageListEnvironmentRuntimeRecordsParams, type EnvironmentUsageRecordsRecordsPage, } from './usage'; diff --git a/src/resources/usage.ts b/src/resources/usage.ts index 0782706e..b629ebf7 100644 --- a/src/resources/usage.ts +++ b/src/resources/usage.ts @@ -1,6 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; +import * as UsageAPI from './usage'; +import { APIPromise } from '../core/api-promise'; import { PagePromise, RecordsPage, type RecordsPageParams } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; @@ -8,6 +10,272 @@ import { RequestOptions } from '../internal/request-options'; * UsageService provides usage information about environments, users, and projects. */ export class Usage extends APIResource { + /** + * 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" + * ``` + * + * @example + * ```ts + * const response = await client.usage.getAdoptionUsageSummary( + * { + * dateRange: { + * endTime: '2024-02-01T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * }, + * ); + * ``` + */ + getAdoptionUsageSummary( + body: UsageGetAdoptionUsageSummaryParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.UsageService/GetAdoptionUsageSummary', { body, ...options }); + } + + /** + * 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" + * ``` + * + * @example + * ```ts + * const response = await client.usage.getAgentTraceSummary({ + * dateRange: { + * endTime: '2024-02-01T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * }); + * ``` + */ + getAgentTraceSummary( + body: UsageGetAgentTraceSummaryParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.UsageService/GetAgentTraceSummary', { body, ...options }); + } + + /** + * 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" + * ``` + * + * @example + * ```ts + * const response = await client.usage.getAgentTraceTimeSeries( + * { + * dateRange: { + * endTime: '2024-02-01T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * resolution: 'RESOLUTION_WEEKLY', + * }, + * ); + * ``` + */ + getAgentTraceTimeSeries( + body: UsageGetAgentTraceTimeSeriesParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.UsageService/GetAgentTraceTimeSeries', { body, ...options }); + } + + /** + * 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" + * ``` + * + * @example + * ```ts + * const response = await client.usage.getCoAuthorSummary({ + * dateRange: { + * endTime: '2024-02-01T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * }); + * ``` + */ + getCoAuthorSummary( + body: UsageGetCoAuthorSummaryParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.UsageService/GetCoAuthorSummary', { body, ...options }); + } + + /** + * 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" + * ``` + * + * @example + * ```ts + * const response = await client.usage.getCoAuthorTimeSeries({ + * dateRange: { + * endTime: '2024-02-01T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * resolution: 'RESOLUTION_WEEKLY', + * }); + * ``` + */ + getCoAuthorTimeSeries( + body: UsageGetCoAuthorTimeSeriesParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.UsageService/GetCoAuthorTimeSeries', { body, ...options }); + } + + /** + * 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" + * ``` + * + * @example + * ```ts + * const response = await client.usage.getPrSummary({ + * dateRange: { + * endTime: '2024-02-01T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * }); + * ``` + */ + getPrSummary( + body: UsageGetPrSummaryParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.UsageService/GetPrSummary', { body, ...options }); + } + + /** + * 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" + * ``` + * + * @example + * ```ts + * const response = await client.usage.getPrTimeSeries({ + * dateRange: { + * endTime: '2024-02-01T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * resolution: 'RESOLUTION_WEEKLY', + * }); + * ``` + */ + getPrTimeSeries( + body: UsageGetPrTimeSeriesParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.UsageService/GetPrTimeSeries', { body, ...options }); + } + /** * Lists completed environment runtime records within a specified date range. * @@ -67,6 +335,226 @@ export class Usage extends APIResource { export type EnvironmentUsageRecordsRecordsPage = RecordsPage; +/** + * AgentTraceModelBreakdown contains stats for a single LLM model. + */ +export interface AgentTraceModelBreakdown { + /** + * Lines added by sessions using this model. + */ + linesAdded?: string; + + /** + * Lines removed by sessions using this model. + */ + linesRemoved?: string; + + /** + * The model these stats are for. + */ + model?: SupportedModel; + + /** + * Number of sessions that used this model. + */ + sessions?: string; +} + +/** + * AgentTraceSummary contains aggregate totals for a date range. + */ +export interface AgentTraceSummary { + /** + * Per-model breakdown of session stats. + */ + byModel?: Array; + + /** + * Total lines added across all sessions. + */ + totalLinesAdded?: string; + + /** + * Fractional change in total_lines_added compared to the previous period. + */ + totalLinesAddedTrend?: number; + + /** + * Total lines removed across all sessions. + */ + totalLinesRemoved?: string; + + /** + * Fractional change in total_lines_removed compared to the previous period. + */ + totalLinesRemovedTrend?: number; + + /** + * Total number of agent trace sessions in the date range. + */ + totalSessions?: string; + + /** + * 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. + */ + totalSessionsTrend?: number; +} + +/** + * AgentTraceTimeBucket contains stats for a single time period. + */ +export interface AgentTraceTimeBucket { + /** + * Per-model breakdown for this bucket. + */ + byModel?: Array; + + /** + * Start of this time bucket. + */ + startTime?: string; + + /** + * Total lines added in this bucket. + */ + totalLinesAdded?: string; + + /** + * Total lines removed in this bucket. + */ + totalLinesRemoved?: string; + + /** + * Number of agent trace sessions in this bucket. + */ + totalSessions?: string; +} + +/** + * CoAuthorSummary contains aggregate totals for a date range. + */ +export interface CoAuthorSummary { + /** + * Per-tool breakdown of contribution stats. + */ + byTool?: Array; + + /** + * Number of distinct authors (by author_hash). + */ + distinctAuthors?: string; + + /** + * Fractional change in distinct_authors compared to the previous period. + */ + distinctAuthorsTrend?: number; + + /** + * Total number of commits in the date range. + */ + totalCommits?: string; + + /** + * 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. + */ + totalCommitsTrend?: number; + + /** + * Total lines added across all commits. + */ + totalLinesAdded?: string; + + /** + * Fractional change in total_lines_added compared to the previous period. + */ + totalLinesAddedTrend?: number; + + /** + * Total lines removed across all commits. + */ + totalLinesRemoved?: string; + + /** + * Fractional change in total_lines_removed compared to the previous period. + */ + totalLinesRemovedTrend?: number; +} + +/** + * CoAuthorTimeBucket contains stats for a single time period. + */ +export interface CoAuthorTimeBucket { + /** + * Ratio of AI-assisted lines added to total lines added (0.0–1.0). + */ + aiRatio?: number; + + /** + * Per-tool breakdown for this bucket. + */ + byTool?: Array; + + /** + * Number of distinct authors (by author_hash) in this bucket. + */ + distinctAuthors?: string; + + /** + * Start of this time bucket. + */ + startTime?: string; + + /** + * Total number of commits in this bucket (across all tools). + */ + totalCommits?: string; + + /** + * Total lines added in this bucket (across all tools). + */ + totalLinesAdded?: string; + + /** + * Total lines removed in this bucket (across all tools). + */ + totalLinesRemoved?: string; +} + +/** + * CoAuthorTool identifies the AI tool that co-authored a commit. UNSPECIFIED (0) + * is the proto default and must not appear in reported data. Use HUMAN for commits + * with no AI co-author. + */ +export type CoAuthorTool = + | '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'; + +/** + * DateRange specifies a time period for queries. + */ +export interface DateRange { + /** + * End time of the date range (exclusive). + */ + endTime: string; + + /** + * Start time of the date range (inclusive). + */ + startTime: string; +} + /** * EnvironmentUsageRecord represents a record of an environment from start to stop. */ @@ -113,8 +601,466 @@ export interface EnvironmentUsageRecord { userId?: string; } -export interface UsageListEnvironmentRuntimeRecordsParams extends RecordsPageParams { - /** +/** + * PrSummary contains aggregate PR speed metrics for a date range. + */ +export interface PrSummary { + /** + * PRs merged to the default branch per week. + */ + deploymentFrequency?: number; + + /** + * Fractional change in deployment_frequency vs previous period. Computed as + * (current - previous) / previous. + */ + deploymentFrequencyTrend?: number; + + /** + * Median lead time for changes in seconds (first commit → merge). + */ + leadTimeSeconds?: number; + + /** + * Fractional change in lead_time_seconds vs previous period. Computed as + * (current - previous) / previous. + */ + leadTimeTrend?: number; + + /** + * Total PRs merged in the date range. + */ + prsMergedCount?: string; + + /** + * Fractional change in prs_merged_count vs previous period. Computed as (current - + * previous) / previous. + */ + prsMergedTrend?: number; + + /** + * Median time to first approval in seconds. Zero when no PRs in the range had + * approvals. + */ + timeToFirstApprovalSeconds?: number; + + /** + * Fractional change in time_to_first_approval_seconds vs previous period. Computed + * as (current - previous) / previous. + */ + timeToFirstApprovalTrend?: number; +} + +/** + * PrTimeBucket contains PR speed metrics for a single time period. + */ +export interface PrTimeBucket { + /** + * Total number of deploys (merged PRs) in this bucket. + */ + deploys?: string; + + /** + * Median lead time in seconds for PRs merged in this bucket. + */ + leadTimeSeconds?: number; + + /** + * Number of PRs merged in this bucket. + */ + prsMergedCount?: string; + + /** + * Start of this time bucket. + */ + startTime?: string; + + /** + * Median time to first approval in seconds for PRs in this bucket. Zero when no + * PRs in the bucket had approvals. + */ + timeToFirstApprovalSeconds?: number; +} + +/** + * Resolution specifies the time granularity for time series data. + */ +export type Resolution = + | 'RESOLUTION_UNSPECIFIED' + | 'RESOLUTION_HOURLY' + | 'RESOLUTION_DAILY' + | 'RESOLUTION_WEEKLY' + | 'RESOLUTION_MONTHLY'; + +/** + * SupportedModel enumerates the LLM models available for agent executions + */ +export type SupportedModel = + | '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'; + +export interface TimeSeriesPoint { + /** + * Timestamp for this data point. + */ + time?: string; + + /** + * The numerical value for this data point. + */ + value?: number; +} + +/** + * ToolBreakdown contains stats for a single AI tool (or human). + */ +export interface ToolBreakdown { + /** + * Number of commits attributed to this tool. + */ + commits?: string; + + /** + * Distinct authors who used this tool. + */ + distinctAuthors?: string; + + /** + * Lines added by this tool. + */ + linesAdded?: string; + + /** + * Lines removed by this tool. + */ + linesRemoved?: string; + + /** + * The tool these stats are for. + */ + tool?: CoAuthorTool; +} + +export interface UsageGetAdoptionUsageSummaryResponse { + /** + * Count of active users in the date range. + */ + activeUsersCount?: string; + + /** + * Fractional change in active_users_count vs previous period. Computed as + * (current - previous) / previous. + */ + activeUsersTrend?: number; + + /** + * Average environment runtime in seconds per active user. + */ + envRuntimePerUserSeconds?: number; + + /** + * Fractional change in env_runtime_per_user_seconds vs previous period. Computed + * as (current - previous) / previous. + */ + envRuntimePerUserTrend?: number; + + /** + * Count of power users in the date range. + */ + powerUsersCount?: string; + + /** + * Threshold in seconds used to determine power users. Displayed to users so they + * understand the definition. + */ + powerUsersThresholdSeconds?: string; + + /** + * Fractional change in power_users_count vs previous period. Computed as + * (current - previous) / previous. + */ + powerUsersTrend?: number; + + /** + * Count of environment sessions (total starts) in the date range. + */ + sessionsCount?: string; + + /** + * Fractional change in sessions_count vs previous period. Computed as (current - + * previous) / previous. + */ + sessionsTrend?: number; + + /** + * Sparkline data for the card's trend line (typically ~4 weekly points). + */ + sparkline?: Array; +} + +export interface UsageGetAgentTraceSummaryResponse { + /** + * Sparkline data for card rendering. + */ + sparkline?: Array; + + /** + * Summary totals and trends for the requested date range. + */ + summary?: AgentTraceSummary; +} + +export interface UsageGetAgentTraceTimeSeriesResponse { + /** + * Time series of agent trace stats, bucketed by the requested resolution. + */ + timeSeries?: Array; +} + +export interface UsageGetCoAuthorSummaryResponse { + /** + * Sparkline data for card rendering. + */ + sparkline?: Array; + + /** + * Summary totals and trends for the requested date range. + */ + summary?: CoAuthorSummary; +} + +export interface UsageGetCoAuthorTimeSeriesResponse { + /** + * Time series of contribution stats, bucketed by the requested resolution. + */ + timeSeries?: Array; +} + +export interface UsageGetPrSummaryResponse { + /** + * Sparkline data for card rendering. + */ + sparkline?: Array; + + /** + * Summary totals and trends for the requested date range. + */ + summary?: PrSummary; +} + +export interface UsageGetPrTimeSeriesResponse { + /** + * Time series of PR speed metrics, bucketed by the requested resolution. + */ + timeSeries?: Array; +} + +export interface UsageGetAdoptionUsageSummaryParams { + /** + * Date range to query metrics within. + */ + dateRange: DateRange; + + /** + * Optional project ID to filter metrics by. + */ + projectId?: string; + + /** + * Optional team ID to scope results to members of a specific team. + */ + teamId?: string; + + /** + * Optional user ID to filter metrics for a specific user (personal insights view). + */ + userId?: string; +} + +export interface UsageGetAgentTraceSummaryParams { + /** + * Date range to query within. + */ + dateRange: DateRange; + + /** + * Optional project ID to scope results. + */ + projectId?: string; + + /** + * Optional team ID to scope results to a specific team. Mutually exclusive with + * user_id. + */ + teamId?: string; + + /** + * Optional user ID to scope results to a specific user. Mutually exclusive with + * team_id. + */ + userId?: string; +} + +export interface UsageGetAgentTraceTimeSeriesParams { + /** + * Date range to query within. + */ + dateRange: DateRange; + + /** + * Optional project ID to scope results. + */ + projectId?: string; + + /** + * Time resolution for the series data. + */ + resolution?: Resolution; + + /** + * Optional team ID to scope results to a specific team. Mutually exclusive with + * user_id. + */ + teamId?: string; + + /** + * Optional user ID to scope results to a specific user. Mutually exclusive with + * team_id. + */ + userId?: string; +} + +export interface UsageGetCoAuthorSummaryParams { + /** + * Date range to query within. + */ + dateRange: DateRange; + + /** + * Optional project ID to scope results. + */ + projectId?: string; + + /** + * Optional team ID to scope results to a specific team. Mutually exclusive with + * user_id. + */ + teamId?: string; + + /** + * Optional user ID to scope results to a specific user. Mutually exclusive with + * team_id. + */ + userId?: string; +} + +export interface UsageGetCoAuthorTimeSeriesParams { + /** + * Date range to query within. + */ + dateRange: DateRange; + + /** + * Optional project ID to scope results. + */ + projectId?: string; + + /** + * Time resolution for the series data. + */ + resolution?: Resolution; + + /** + * Optional team ID to scope results to a specific team. Mutually exclusive with + * user_id. + */ + teamId?: string; + + /** + * Optional user ID to scope results to a specific user. Mutually exclusive with + * team_id. + */ + userId?: string; +} + +export interface UsageGetPrSummaryParams { + /** + * Date range to query within. + */ + dateRange: DateRange; + + /** + * Optional project ID to scope results. + */ + projectId?: string; + + /** + * Optional team ID to scope results to a specific team. Mutually exclusive with + * user_id. + */ + teamId?: string; + + /** + * Optional user ID to scope results to a specific user. Mutually exclusive with + * team_id. + */ + userId?: string; +} + +export interface UsageGetPrTimeSeriesParams { + /** + * Date range to query within. + */ + dateRange: DateRange; + + /** + * Optional project ID to scope results. + */ + projectId?: string; + + /** + * Time resolution for the series data. + */ + resolution?: Resolution; + + /** + * Optional team ID to scope results to a specific team. Mutually exclusive with + * user_id. + */ + teamId?: string; + + /** + * Optional user ID to scope results to a specific user. Mutually exclusive with + * team_id. + */ + userId?: string; +} + +export interface UsageListEnvironmentRuntimeRecordsParams extends RecordsPageParams { + /** * Body param: Filter options. */ filter?: UsageListEnvironmentRuntimeRecordsParams.Filter; @@ -133,7 +1079,7 @@ export namespace UsageListEnvironmentRuntimeRecordsParams { /** * Date range to query runtime records within. */ - dateRange: Filter.DateRange; + dateRange: UsageAPI.DateRange; /** * Optional project ID to filter runtime records by. @@ -141,23 +1087,6 @@ export namespace UsageListEnvironmentRuntimeRecordsParams { projectId?: string; } - export namespace Filter { - /** - * Date range to query runtime records within. - */ - export interface DateRange { - /** - * End time of the date range (exclusive). - */ - endTime: string; - - /** - * Start time of the date range (inclusive). - */ - startTime: string; - } - } - /** * Pagination options. */ @@ -178,8 +1107,35 @@ export namespace UsageListEnvironmentRuntimeRecordsParams { export declare namespace Usage { export { + type AgentTraceModelBreakdown as AgentTraceModelBreakdown, + type AgentTraceSummary as AgentTraceSummary, + type AgentTraceTimeBucket as AgentTraceTimeBucket, + type CoAuthorSummary as CoAuthorSummary, + type CoAuthorTimeBucket as CoAuthorTimeBucket, + type CoAuthorTool as CoAuthorTool, + type DateRange as DateRange, type EnvironmentUsageRecord as EnvironmentUsageRecord, + type PrSummary as PrSummary, + type PrTimeBucket as PrTimeBucket, + type Resolution as Resolution, + type SupportedModel as SupportedModel, + type TimeSeriesPoint as TimeSeriesPoint, + type ToolBreakdown as ToolBreakdown, + type UsageGetAdoptionUsageSummaryResponse as UsageGetAdoptionUsageSummaryResponse, + type UsageGetAgentTraceSummaryResponse as UsageGetAgentTraceSummaryResponse, + type UsageGetAgentTraceTimeSeriesResponse as UsageGetAgentTraceTimeSeriesResponse, + type UsageGetCoAuthorSummaryResponse as UsageGetCoAuthorSummaryResponse, + type UsageGetCoAuthorTimeSeriesResponse as UsageGetCoAuthorTimeSeriesResponse, + type UsageGetPrSummaryResponse as UsageGetPrSummaryResponse, + type UsageGetPrTimeSeriesResponse as UsageGetPrTimeSeriesResponse, type EnvironmentUsageRecordsRecordsPage as EnvironmentUsageRecordsRecordsPage, + type UsageGetAdoptionUsageSummaryParams as UsageGetAdoptionUsageSummaryParams, + type UsageGetAgentTraceSummaryParams as UsageGetAgentTraceSummaryParams, + type UsageGetAgentTraceTimeSeriesParams as UsageGetAgentTraceTimeSeriesParams, + type UsageGetCoAuthorSummaryParams as UsageGetCoAuthorSummaryParams, + type UsageGetCoAuthorTimeSeriesParams as UsageGetCoAuthorTimeSeriesParams, + type UsageGetPrSummaryParams as UsageGetPrSummaryParams, + type UsageGetPrTimeSeriesParams as UsageGetPrTimeSeriesParams, type UsageListEnvironmentRuntimeRecordsParams as UsageListEnvironmentRuntimeRecordsParams, }; } diff --git a/tests/api-resources/usage.test.ts b/tests/api-resources/usage.test.ts index 5fc407b3..62f6e5f0 100644 --- a/tests/api-resources/usage.test.ts +++ b/tests/api-resources/usage.test.ts @@ -8,6 +8,177 @@ const client = new Gitpod({ }); describe('resource usage', () => { + // Mock server tests are disabled + test.skip('getAdoptionUsageSummary: only required params', async () => { + const responsePromise = client.usage.getAdoptionUsageSummary({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getAdoptionUsageSummary: required and optional params', async () => { + const response = await client.usage.getAdoptionUsageSummary({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + teamId: 'teamId', + userId: 'userId', + }); + }); + + // Mock server tests are disabled + test.skip('getAgentTraceSummary: only required params', async () => { + const responsePromise = client.usage.getAgentTraceSummary({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getAgentTraceSummary: required and optional params', async () => { + const response = await client.usage.getAgentTraceSummary({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + teamId: 'teamId', + userId: 'userId', + }); + }); + + // Mock server tests are disabled + test.skip('getAgentTraceTimeSeries: only required params', async () => { + const responsePromise = client.usage.getAgentTraceTimeSeries({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getAgentTraceTimeSeries: required and optional params', async () => { + const response = await client.usage.getAgentTraceTimeSeries({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + resolution: 'RESOLUTION_WEEKLY', + teamId: 'teamId', + userId: 'userId', + }); + }); + + // Mock server tests are disabled + test.skip('getCoAuthorSummary: only required params', async () => { + const responsePromise = client.usage.getCoAuthorSummary({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getCoAuthorSummary: required and optional params', async () => { + const response = await client.usage.getCoAuthorSummary({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + teamId: 'teamId', + userId: 'userId', + }); + }); + + // Mock server tests are disabled + test.skip('getCoAuthorTimeSeries: only required params', async () => { + const responsePromise = client.usage.getCoAuthorTimeSeries({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getCoAuthorTimeSeries: required and optional params', async () => { + const response = await client.usage.getCoAuthorTimeSeries({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + resolution: 'RESOLUTION_WEEKLY', + teamId: 'teamId', + userId: 'userId', + }); + }); + + // Mock server tests are disabled + test.skip('getPrSummary: only required params', async () => { + const responsePromise = client.usage.getPrSummary({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getPrSummary: required and optional params', async () => { + const response = await client.usage.getPrSummary({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + teamId: 'teamId', + userId: 'userId', + }); + }); + + // Mock server tests are disabled + test.skip('getPrTimeSeries: only required params', async () => { + const responsePromise = client.usage.getPrTimeSeries({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getPrTimeSeries: required and optional params', async () => { + const response = await client.usage.getPrTimeSeries({ + dateRange: { endTime: '2024-02-01T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + projectId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + resolution: 'RESOLUTION_WEEKLY', + teamId: 'teamId', + userId: 'userId', + }); + }); + // Mock server tests are disabled test.skip('listEnvironmentRuntimeRecords', async () => { const responsePromise = client.usage.listEnvironmentRuntimeRecords({}); From 3138ce83141c309bedfbaa7a86a114d870002267 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:32 +0000 Subject: [PATCH 180/217] feat(codex): add GPT-5.6 model selection --- .stats.yml | 8 +- api.md | 49 +- src/client.ts | 115 ++- src/core/pagination.ts | 110 +++ src/resources/billing.ts | 1349 +++++++++++++++++++++++++++ src/resources/index.ts | 46 +- src/resources/shared.ts | 20 +- src/resources/usage.ts | 34 +- tests/api-resources/billing.test.ts | 213 +++++ yarn.lock | 6 +- 10 files changed, 1913 insertions(+), 37 deletions(-) create mode 100644 src/resources/billing.ts create mode 100644 tests/api-resources/billing.test.ts 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 3248d0b6..55199b4f 100644 --- a/api.md +++ b/api.md @@ -8,6 +8,7 @@ Types: - CodexServiceTier - CodexSettings - CountResponseRelation +- DateRange - EnvironmentClass - EnvironmentVariableItem - EnvironmentVariableSource @@ -139,6 +140,53 @@ Methods: - client.automations.retrieveExecutionAction({ ...params }) -> AutomationRetrieveExecutionActionResponse - client.automations.startExecution({ ...params }) -> AutomationStartExecutionResponse +# Billing + +Types: + +- 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.getCreditUsageExport({ ...params }) -> BillingGetCreditUsageExportResponse +- client.billing.getCreditUsageReport({ ...params }) -> BillingGetCreditUsageReportResponse +- client.billing.getCumulativeCreditUsage({ ...params }) -> BillingGetCumulativeCreditUsageResponse +- client.billing.getEnterpriseAIUsageSummary({ ...params }) -> BillingGetEnterpriseAIUsageSummaryResponse +- client.billing.getEnterpriseAIUsageTimeSeries({ ...params }) -> BillingGetEnterpriseAIUsageTimeSeriesResponse +- client.billing.listEnterpriseAITeamUsage({ ...params }) -> TeamEnterpriseAIUsagesTeamUsagePage +- client.billing.listEnterpriseAIUserUsage({ ...params }) -> UserCostBudgetUsagesUserUsagePage +- client.billing.listEnterpriseUserCreditUsage({ ...params }) -> UserCreditBudgetUsagesUserUsagePage + # Editors Types: @@ -803,7 +851,6 @@ Types: - CoAuthorSummary - CoAuthorTimeBucket - CoAuthorTool -- DateRange - EnvironmentUsageRecord - PrSummary - PrTimeBucket diff --git a/src/client.ts b/src/client.ts index 6a4904c5..cdeb803a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -86,8 +86,12 @@ import { TaskExecutionsPageResponse, type TasksPageParams, TasksPageResponse, + type TeamUsagePageParams, + TeamUsagePageResponse, type TokensPageParams, TokensPageResponse, + type UserUsagePageParams, + UserUsagePageResponse, type WarmPoolsPageParams, WarmPoolsPageResponse, type WorkflowExecutionActionsPageParams, @@ -197,6 +201,51 @@ import { WorkflowTriggerContext, WorkflowsWorkflowsPage, } from './resources/automations'; +import { + AgentExecutionCreditUsage, + Billing, + BillingCurrency, + BillingGetCreditUsageExportParams, + BillingGetCreditUsageExportResponse, + BillingGetCreditUsageReportParams, + BillingGetCreditUsageReportResponse, + BillingGetCumulativeCreditUsageParams, + BillingGetCumulativeCreditUsageResponse, + BillingGetEnterpriseAIUsageSummaryParams, + BillingGetEnterpriseAIUsageSummaryResponse, + BillingGetEnterpriseAIUsageTimeSeriesParams, + BillingGetEnterpriseAIUsageTimeSeriesResponse, + BillingListEnterpriseAITeamUsageParams, + BillingListEnterpriseAIUserUsageParams, + BillingListEnterpriseUserCreditUsageParams, + ByokRateCardTokenType, + CreditUsageExportGroupBy, + CreditUsageReportFilter, + CreditsByType, + CumulativeCreditUsage, + DailyCreditUsage, + DailyEnterpriseAIUsage, + EnterpriseAITokenUsage, + EnterpriseAIUsage, + EnterpriseAIUsageBudget, + EnterpriseAIUsageBudgetSource, + EnterpriseAIUsageByModel, + EnterpriseAIUsageByTokenType, + EnterpriseAIUsageTimeSeriesFilter, + EnterpriseAIUserBudgetPolicySource, + EnvironmentCreditUsage, + TeamCreditUsage, + TeamCumulativeCreditUsage, + TeamEnterpriseAIUsage, + TeamEnterpriseAIUsagesTeamUsagePage, + UsageType, + UserCostBudgetUsage, + UserCostBudgetUsagesUserUsagePage, + UserCreditBudgetUsage, + UserCreditBudgetUsagesUserUsagePage, + UserCreditUsage, + UserEnterpriseAIUsage, +} from './resources/billing'; import { Editor, EditorListParams, @@ -298,7 +347,6 @@ import { CoAuthorSummary, CoAuthorTimeBucket, CoAuthorTool, - DateRange, EnvironmentUsageRecord, EnvironmentUsageRecordsRecordsPage, PrSummary, @@ -1220,6 +1268,10 @@ export class Gitpod { accounts: API.Accounts = new API.Accounts(this); agents: API.Agents = new API.Agents(this); automations: API.Automations = new API.Automations(this); + /** + * BillingService provides billing and subscription management functionality. + */ + billing: API.Billing = new API.Billing(this); editors: API.Editors = new API.Editors(this); environments: API.Environments = new API.Environments(this); /** @@ -1250,6 +1302,7 @@ export class Gitpod { Gitpod.Accounts = Accounts; Gitpod.Agents = Agents; Gitpod.Automations = Automations; +Gitpod.Billing = Billing; Gitpod.Editors = Editors; Gitpod.Environments = Environments; Gitpod.Errors = ErrorsAPIErrors; @@ -1409,9 +1462,21 @@ export declare namespace Gitpod { export import TasksPage = Pagination.TasksPage; export { type TasksPageParams as TasksPageParams, type TasksPageResponse as TasksPageResponse }; + export import TeamUsagePage = Pagination.TeamUsagePage; + export { + type TeamUsagePageParams as TeamUsagePageParams, + type TeamUsagePageResponse as TeamUsagePageResponse, + }; + export import TokensPage = Pagination.TokensPage; export { type TokensPageParams as TokensPageParams, type TokensPageResponse as TokensPageResponse }; + export import UserUsagePage = Pagination.UserUsagePage; + export { + type UserUsagePageParams as UserUsagePageParams, + type UserUsagePageResponse as UserUsagePageResponse, + }; + export import WarmPoolsPage = Pagination.WarmPoolsPage; export { type WarmPoolsPageParams as WarmPoolsPageParams, @@ -1536,6 +1601,52 @@ export declare namespace Gitpod { type AutomationStartExecutionParams as AutomationStartExecutionParams, }; + export { + Billing as Billing, + type AgentExecutionCreditUsage as AgentExecutionCreditUsage, + type BillingCurrency as BillingCurrency, + type ByokRateCardTokenType as ByokRateCardTokenType, + type CreditUsageExportGroupBy as CreditUsageExportGroupBy, + type CreditUsageReportFilter as CreditUsageReportFilter, + type CreditsByType as CreditsByType, + type CumulativeCreditUsage as CumulativeCreditUsage, + type DailyCreditUsage as DailyCreditUsage, + type DailyEnterpriseAIUsage as DailyEnterpriseAIUsage, + type EnterpriseAITokenUsage as EnterpriseAITokenUsage, + type EnterpriseAIUsage as EnterpriseAIUsage, + type EnterpriseAIUsageBudget as EnterpriseAIUsageBudget, + type EnterpriseAIUsageBudgetSource as EnterpriseAIUsageBudgetSource, + type EnterpriseAIUsageByModel as EnterpriseAIUsageByModel, + type EnterpriseAIUsageByTokenType as EnterpriseAIUsageByTokenType, + type EnterpriseAIUsageTimeSeriesFilter as EnterpriseAIUsageTimeSeriesFilter, + type EnterpriseAIUserBudgetPolicySource as EnterpriseAIUserBudgetPolicySource, + type EnvironmentCreditUsage as EnvironmentCreditUsage, + type TeamCreditUsage as TeamCreditUsage, + type TeamCumulativeCreditUsage as TeamCumulativeCreditUsage, + type TeamEnterpriseAIUsage as TeamEnterpriseAIUsage, + type UsageType as UsageType, + type UserCostBudgetUsage as UserCostBudgetUsage, + type UserCreditBudgetUsage as UserCreditBudgetUsage, + type UserCreditUsage as UserCreditUsage, + type UserEnterpriseAIUsage as UserEnterpriseAIUsage, + type BillingGetCreditUsageExportResponse as BillingGetCreditUsageExportResponse, + type BillingGetCreditUsageReportResponse as BillingGetCreditUsageReportResponse, + type BillingGetCumulativeCreditUsageResponse as BillingGetCumulativeCreditUsageResponse, + type BillingGetEnterpriseAIUsageSummaryResponse as BillingGetEnterpriseAIUsageSummaryResponse, + type BillingGetEnterpriseAIUsageTimeSeriesResponse as BillingGetEnterpriseAIUsageTimeSeriesResponse, + type TeamEnterpriseAIUsagesTeamUsagePage as TeamEnterpriseAIUsagesTeamUsagePage, + type UserCostBudgetUsagesUserUsagePage as UserCostBudgetUsagesUserUsagePage, + type UserCreditBudgetUsagesUserUsagePage as UserCreditBudgetUsagesUserUsagePage, + type BillingGetCreditUsageExportParams as BillingGetCreditUsageExportParams, + type BillingGetCreditUsageReportParams as BillingGetCreditUsageReportParams, + type BillingGetCumulativeCreditUsageParams as BillingGetCumulativeCreditUsageParams, + type BillingGetEnterpriseAIUsageSummaryParams as BillingGetEnterpriseAIUsageSummaryParams, + type BillingGetEnterpriseAIUsageTimeSeriesParams as BillingGetEnterpriseAIUsageTimeSeriesParams, + type BillingListEnterpriseAITeamUsageParams as BillingListEnterpriseAITeamUsageParams, + type BillingListEnterpriseAIUserUsageParams as BillingListEnterpriseAIUserUsageParams, + type BillingListEnterpriseUserCreditUsageParams as BillingListEnterpriseUserCreditUsageParams, + }; + export { Editors as Editors, type Editor as Editor, @@ -1794,7 +1905,6 @@ export declare namespace Gitpod { type CoAuthorSummary as CoAuthorSummary, type CoAuthorTimeBucket as CoAuthorTimeBucket, type CoAuthorTool as CoAuthorTool, - type DateRange as DateRange, type EnvironmentUsageRecord as EnvironmentUsageRecord, type PrSummary as PrSummary, type PrTimeBucket as PrTimeBucket, @@ -1839,6 +1949,7 @@ export declare namespace Gitpod { export type CodexServiceTier = API.CodexServiceTier; export type CodexSettings = API.CodexSettings; export type CountResponseRelation = API.CountResponseRelation; + export type DateRange = API.DateRange; export type EnvironmentClass = API.EnvironmentClass; export type EnvironmentVariableItem = API.EnvironmentVariableItem; export type EnvironmentVariableSource = API.EnvironmentVariableSource; diff --git a/src/core/pagination.ts b/src/core/pagination.ts index c01757cf..ed1d7d4c 100644 --- a/src/core/pagination.ts +++ b/src/core/pagination.ts @@ -1836,6 +1836,61 @@ export class TasksPage extends AbstractPage implements TasksPageResp } } +export interface TeamUsagePageResponse { + pagination: TeamUsagePageResponse.Pagination; + + teamUsage: Array; +} + +export namespace TeamUsagePageResponse { + export interface Pagination { + nextToken?: string; + } +} + +export interface TeamUsagePageParams { + pageSize?: number; + + token?: string; +} + +export class TeamUsagePage extends AbstractPage implements TeamUsagePageResponse { + pagination: TeamUsagePageResponse.Pagination; + + teamUsage: Array; + + constructor( + client: Gitpod, + response: Response, + body: TeamUsagePageResponse, + options: FinalRequestOptions, + ) { + super(client, response, body, options); + + this.pagination = body.pagination || {}; + this.teamUsage = body.teamUsage || []; + } + + getPaginatedItems(): Item[] { + return this.teamUsage ?? []; + } + + nextPageRequestOptions(): PageRequestOptions | null { + const cursor = this.pagination?.nextToken; + if (!cursor) { + return null; + } + + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + token: cursor, + }, + }; + } +} + export interface TokensPageResponse { pagination: TokensPageResponse.Pagination; @@ -1891,6 +1946,61 @@ export class TokensPage extends AbstractPage implements TokensPageRe } } +export interface UserUsagePageResponse { + pagination: UserUsagePageResponse.Pagination; + + userUsage: Array; +} + +export namespace UserUsagePageResponse { + export interface Pagination { + nextToken?: string; + } +} + +export interface UserUsagePageParams { + pageSize?: number; + + token?: string; +} + +export class UserUsagePage extends AbstractPage implements UserUsagePageResponse { + pagination: UserUsagePageResponse.Pagination; + + userUsage: Array; + + constructor( + client: Gitpod, + response: Response, + body: UserUsagePageResponse, + options: FinalRequestOptions, + ) { + super(client, response, body, options); + + this.pagination = body.pagination || {}; + this.userUsage = body.userUsage || []; + } + + getPaginatedItems(): Item[] { + return this.userUsage ?? []; + } + + nextPageRequestOptions(): PageRequestOptions | null { + const cursor = this.pagination?.nextToken; + if (!cursor) { + return null; + } + + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + token: cursor, + }, + }; + } +} + export interface WarmPoolsPageResponse { pagination: WarmPoolsPageResponse.Pagination; diff --git a/src/resources/billing.ts b/src/resources/billing.ts new file mode 100644 index 00000000..a38f6043 --- /dev/null +++ b/src/resources/billing.ts @@ -0,0 +1,1349 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../core/resource'; +import * as Shared from './shared'; +import { APIPromise } from '../core/api-promise'; +import { + PagePromise, + TeamUsagePage, + type TeamUsagePageParams, + UserUsagePage, + type UserUsagePageParams, +} from '../core/pagination'; +import { RequestOptions } from '../internal/request-options'; + +/** + * BillingService provides billing and subscription management functionality. + */ +export class Billing extends APIResource { + /** + * 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. + * + * @example + * ```ts + * const response = await client.billing.getCreditUsageExport({ + * dateRange: { + * endTime: '2024-01-31T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * groupBy: 'CREDIT_USAGE_EXPORT_GROUP_BY_DAILY_SUMMARY', + * }); + * ``` + */ + getCreditUsageExport( + body: BillingGetCreditUsageExportParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.BillingService/GetCreditUsageExport', { body, ...options }); + } + + /** + * 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. + * + * @example + * ```ts + * const response = await client.billing.getCreditUsageReport({ + * dateRange: { + * endTime: '2024-01-31T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * }); + * ``` + */ + getCreditUsageReport( + body: BillingGetCreditUsageReportParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.BillingService/GetCreditUsageReport', { body, ...options }); + } + + /** + * 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. + * + * @example + * ```ts + * const response = + * await client.billing.getCumulativeCreditUsage({ + * organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * asOf: '2026-03-31T23:59:59Z', + * }); + * ``` + */ + getCumulativeCreditUsage( + body: BillingGetCumulativeCreditUsageParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.BillingService/GetCumulativeCreditUsage', { body, ...options }); + } + + /** + * 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. + * + * @example + * ```ts + * const response = + * await client.billing.getEnterpriseAIUsageSummary({ + * dateRange: { + * endTime: '2024-01-31T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * }); + * ``` + */ + getEnterpriseAIUsageSummary( + body: BillingGetEnterpriseAIUsageSummaryParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.BillingService/GetEnterpriseAIUsageSummary', { body, ...options }); + } + + /** + * 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. + * + * @example + * ```ts + * const response = + * await client.billing.getEnterpriseAIUsageTimeSeries({ + * dateRange: { + * endTime: '2024-01-31T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * }); + * ``` + */ + getEnterpriseAIUsageTimeSeries( + body: BillingGetEnterpriseAIUsageTimeSeriesParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.BillingService/GetEnterpriseAIUsageTimeSeries', { + body, + ...options, + }); + } + + /** + * 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. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const teamEnterpriseAIUsage of client.billing.listEnterpriseAITeamUsage( + * { + * dateRange: { + * endTime: '2024-01-31T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * }, + * )) { + * // ... + * } + * ``` + */ + listEnterpriseAITeamUsage( + params: BillingListEnterpriseAITeamUsageParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.BillingService/ListEnterpriseAITeamUsage', + TeamUsagePage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); + } + + /** + * 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. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const userCostBudgetUsage of client.billing.listEnterpriseAIUserUsage( + * { + * dateRange: { + * endTime: '2024-01-31T00:00:00Z', + * startTime: '2024-01-01T00:00:00Z', + * }, + * organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * }, + * )) { + * // ... + * } + * ``` + */ + listEnterpriseAIUserUsage( + params: BillingListEnterpriseAIUserUsageParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.BillingService/ListEnterpriseAIUserUsage', + UserUsagePage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); + } + + /** + * 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. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const userCreditBudgetUsage of client.billing.listEnterpriseUserCreditUsage( + * { + * organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * pagination: { pageSize: 50 }, + * }, + * )) { + * // ... + * } + * ``` + */ + listEnterpriseUserCreditUsage( + params: BillingListEnterpriseUserCreditUsageParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.BillingService/ListEnterpriseUserCreditUsage', + UserUsagePage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); + } +} + +export type TeamEnterpriseAIUsagesTeamUsagePage = TeamUsagePage; + +export type UserCostBudgetUsagesUserUsagePage = UserUsagePage; + +export type UserCreditBudgetUsagesUserUsagePage = UserUsagePage; + +/** + * AgentExecutionCreditUsage contains a single agent execution's credit usage for a + * day, broken down by type. + */ +export interface AgentExecutionCreditUsage { + /** + * Empty when representing the "Others" aggregation bucket. + */ + agentExecutionId?: string; + + displayName?: string; + + usage?: Array; +} + +export type BillingCurrency = + | 'BILLING_CURRENCY_UNSPECIFIED' + | 'BILLING_CURRENCY_USD' + | 'BILLING_CURRENCY_EUR' + | 'BILLING_CURRENCY_GBP'; + +export type ByokRateCardTokenType = + | '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'; + +/** + * How to group the credit usage export data. + */ +export type CreditUsageExportGroupBy = + | 'CREDIT_USAGE_EXPORT_GROUP_BY_UNSPECIFIED' + | 'CREDIT_USAGE_EXPORT_GROUP_BY_DAILY_SUMMARY' + | 'CREDIT_USAGE_EXPORT_GROUP_BY_RESOURCE'; + +/** + * 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. + */ +export interface CreditUsageReportFilter { + /** + * 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. + */ + subject?: Shared.Subject | null; +} + +/** + * CreditsByType contains credits consumed for a single usage type. + */ +export interface CreditsByType { + credits?: number; + + /** + * UsageType identifies the category of usage. + */ + usageType?: UsageType; +} + +/** + * CumulativeCreditUsage contains cumulative credit consumption totals. + */ +export interface CumulativeCreditUsage { + /** + * Total credits consumed. + */ + totalCredits?: number; + + /** + * Credits consumed broken down by usage type. + */ + usageByType?: Array; +} + +/** + * DailyCreditUsage contains credit usage for a single day. + */ +export interface DailyCreditUsage { + /** + * Per-agent-execution usage for this day (top conversations + "Others"). Empty + * agent_execution_id represents the "Others" aggregation bucket. + */ + conversationUsage?: Array; + + /** + * Start of the day (midnight in the requested timezone). + */ + date?: string; + + /** + * Per-environment usage for this day (top environments + "Others"). Empty + * environment_id represents the "Others" aggregation bucket. + */ + environmentUsage?: Array; + + /** + * Org-wide usage broken down by type. + */ + orgUsage?: Array; + + /** + * Per-team usage for this day (top teams + "Others"). Empty team_id represents the + * "Others" aggregation bucket. + */ + teamUsage?: Array; + + /** + * Org-wide intelligence usage broken down by model. + */ + usageByModel?: Array; + + /** + * Per-user usage for this day (top users + "Others"). + */ + userUsage?: Array; +} + +export interface DailyEnterpriseAIUsage { + /** + * 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. + */ + date: string; + + /** + * budget is unset when no monthly budget applies to the organization. + */ + budget?: EnterpriseAIUsageBudget; + + teamUsage?: Array; + + usage?: EnterpriseAIUsage; + + /** + * Usage for this day broken down by model. When the request filters by subject, + * contains only that subject's model usage. + */ + usageByModel?: Array; + + userUsage?: Array; +} + +export interface EnterpriseAITokenUsage { + cacheTokens?: string; + + inputTokens?: string; + + outputTokens?: string; + + totalTokens?: string; +} + +export interface EnterpriseAIUsage { + costMicrounits?: string; + + credits?: number; + + currency?: BillingCurrency; + + tokens?: EnterpriseAITokenUsage; +} + +export interface EnterpriseAIUsageBudget { + currency?: BillingCurrency; + + monthlyCostLimitMicrounits?: string | null; + + monthlyCreditLimit?: string | null; + + monthToDateUsage?: EnterpriseAIUsage; + + source?: EnterpriseAIUsageBudgetSource; + + utilizationPercent?: number; +} + +export type EnterpriseAIUsageBudgetSource = + | 'ENTERPRISE_AI_USAGE_BUDGET_SOURCE_UNSPECIFIED' + | 'ENTERPRISE_AI_USAGE_BUDGET_SOURCE_ORGANIZATION' + | 'ENTERPRISE_AI_USAGE_BUDGET_SOURCE_TEAM'; + +export interface EnterpriseAIUsageByModel { + model?: string; + + /** + * Usage excluded from spend because no matching BYOK rate was configured. + */ + unpricedUsage?: EnterpriseAIUsage; + + unpricedUsageByTokenType?: Array; + + usage?: EnterpriseAIUsage; + + usageByTokenType?: Array; +} + +export interface EnterpriseAIUsageByTokenType { + tokenType?: ByokRateCardTokenType; + + usage?: EnterpriseAIUsage; +} + +export interface EnterpriseAIUsageTimeSeriesFilter { + /** + * Restrict the per-user breakdown to a single subject. + */ + subject?: Shared.Subject | null; +} + +export type EnterpriseAIUserBudgetPolicySource = + | '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'; + +/** + * EnvironmentCreditUsage contains a single environment's credit usage for a day, + * broken down by type. + */ +export interface EnvironmentCreditUsage { + displayName?: string; + + /** + * Empty when representing the "Others" aggregation bucket. + */ + environmentId?: string; + + usage?: Array; +} + +/** + * TeamCreditUsage contains a single team's credit usage for a day, broken down by + * type. + */ +export interface TeamCreditUsage { + displayName?: string; + + /** + * Empty when representing the "Others" aggregation bucket. + */ + teamId?: string; + + usage?: Array; +} + +/** + * TeamCumulativeCreditUsage contains a team's cumulative credit usage and + * allocation. + */ +export interface TeamCumulativeCreditUsage { + /** + * The team's credit allocation (budget) in whole credits, if set. Not set means no + * allocation has been configured for this team. + */ + creditBudget?: string | null; + + displayName?: string; + + teamId?: string; + + /** + * Cumulative credit usage for this team. + */ + usage?: CumulativeCreditUsage; +} + +export interface TeamEnterpriseAIUsage { + /** + * budget is unset when no monthly budget applies to this team. + */ + budget?: EnterpriseAIUsageBudget; + + displayName?: string; + + teamId?: string; + + usage?: EnterpriseAIUsage; + + usageByTokenType?: Array; +} + +/** + * UsageType identifies the category of usage. + */ +export type UsageType = 'USAGE_TYPE_UNSPECIFIED' | 'USAGE_TYPE_ENVIRONMENT' | 'USAGE_TYPE_AGENTIC'; + +export interface UserCostBudgetUsage { + budgetSource?: EnterpriseAIUserBudgetPolicySource; + + currency?: BillingCurrency; + + displayName?: string; + + isServiceAccount?: boolean; + + monthlyCostLimitMicrounits?: string | null; + + /** + * Usage within the requested date range. Reflects true month-to-date usage when + * the range starts on the first day of the month. + */ + monthToDateUsage?: EnterpriseAIUsage; + + noCap?: boolean; + + overBudget?: boolean; + + userId?: string; + + utilizationPercent?: number; +} + +export interface UserCreditBudgetUsage { + budgetSource?: EnterpriseAIUserBudgetPolicySource; + + creditBudget?: string | null; + + displayName?: string; + + /** + * 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. + */ + isServiceAccount?: boolean; + + /** + * CumulativeCreditUsage contains cumulative credit consumption totals. + */ + monthToDateUsage?: CumulativeCreditUsage; + + noCap?: boolean; + + overBudget?: boolean; + + /** + * Month-to-date intelligence usage broken down by model. + */ + usageByModel?: Array; + + userId?: string; + + utilizationPercent?: number; +} + +/** + * UserCreditUsage contains a single user's credit usage, broken down by type. + */ +export interface UserCreditUsage { + displayName?: string; + + usage?: Array; + + /** + * Intelligence usage broken down by model. + */ + usageByModel?: Array; + + /** + * Empty when representing the "Others" aggregation bucket. + */ + userId?: string; +} + +export interface UserEnterpriseAIUsage { + displayName?: string; + + usage?: EnterpriseAIUsage; + + /** + * Empty when representing the "Others" aggregation bucket. + */ + userId?: string; +} + +export interface BillingGetCreditUsageExportResponse { + /** + * Signed download URL for the CSV export. Valid for five minutes, and only for the + * principal that requested it. + */ + downloadUrl?: string; +} + +export interface BillingGetCreditUsageReportResponse { + /** + * One entry per day in the requested date range. + */ + dailyUsage?: Array; + + /** + * Start of the billing period for this organization. Used by the frontend to + * filter out months before usage tracking began. + */ + periodStart?: string | null; + + /** + * When the report data was last computed. + */ + updatedAt?: string; +} + +export interface BillingGetCumulativeCreditUsageResponse { + /** + * Org-wide cumulative usage, broken down by type and total. + */ + orgUsage?: CumulativeCreditUsage; + + /** + * Start of the cumulative calculation period. Cumulative totals are computed from + * this date forward. + */ + periodStart?: string; + + /** + * Per-team cumulative usage with credit allocation comparison. Returns all teams + * (no top-N limit). + */ + teamUsage?: Array; + + /** + * Usage by members not assigned to any team. + */ + unteamedUsage?: CumulativeCreditUsage; + + /** + * 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. + */ + userUsage?: Array; +} + +export interface BillingGetEnterpriseAIUsageSummaryResponse { + /** + * budget is unset when no monthly budget applies to the organization. + */ + budget?: EnterpriseAIUsageBudget; + + /** + * calculated_at is the time through which usage has been calculated. Usage after + * this timestamp may still be processing. + */ + calculatedAt?: string; + + usage?: EnterpriseAIUsage; + + usageByModel?: Array; +} + +export interface BillingGetEnterpriseAIUsageTimeSeriesResponse { + /** + * calculated_at is the time through which usage has been calculated. Usage after + * this timestamp may still be processing. + */ + calculatedAt?: string; + + dailyUsage?: Array; +} + +export interface BillingGetCreditUsageExportParams { + /** + * 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. + */ + dateRange: Shared.DateRange; + + organizationId: string; + + /** + * How to group the export data. Defaults to DAILY_SUMMARY. + */ + groupBy?: CreditUsageExportGroupBy; +} + +export interface BillingGetCreditUsageReportParams { + /** + * 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. + */ + dateRange: Shared.DateRange; + + organizationId: string; + + /** + * 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. + */ + filter?: CreditUsageReportFilter; + + /** + * IANA timezone name (e.g. "America/New_York", "Europe/Berlin") used to bucket + * daily usage. When empty, defaults to "UTC". + */ + timezone?: string; +} + +export interface BillingGetCumulativeCreditUsageParams { + /** + * organization_id is the ID of the organization to get cumulative usage for. + */ + organizationId: string; + + /** + * as_of is the point in time to compute cumulative usage up to. Defaults to now if + * not set. + */ + asOf?: string | null; +} + +export interface BillingGetEnterpriseAIUsageSummaryParams { + /** + * 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. + */ + dateRange: Shared.DateRange; + + organizationId: string; + + /** + * IANA timezone name used to bucket usage. When empty, defaults to "UTC". + */ + timezone?: string; +} + +export interface BillingGetEnterpriseAIUsageTimeSeriesParams { + /** + * 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. + */ + dateRange: Shared.DateRange; + + organizationId: string; + + filter?: EnterpriseAIUsageTimeSeriesFilter; + + /** + * IANA timezone name used to bucket daily usage. When empty, defaults to "UTC". + */ + timezone?: string; +} + +export interface BillingListEnterpriseAITeamUsageParams extends TeamUsagePageParams { + /** + * Body param: 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. + */ + dateRange: Shared.DateRange; + + /** + * Body param + */ + organizationId: string; + + /** + * Body param + */ + filter?: BillingListEnterpriseAITeamUsageParams.Filter; + + /** + * Body param + */ + pagination?: BillingListEnterpriseAITeamUsageParams.Pagination; + + /** + * Body param: IANA timezone name used to bucket usage. When empty, defaults to + * "UTC". + */ + timezone?: string; +} + +export namespace BillingListEnterpriseAITeamUsageParams { + export interface Filter { + teamIds?: Array; + } + + export interface Pagination { + /** + * Token for the next set of results that was returned as next_token of a + * PaginationResponse + */ + token?: string; + + /** + * Page size is the maximum number of results to retrieve per page. Defaults to 25. + * Maximum 100. + */ + pageSize?: number; + } +} + +export interface BillingListEnterpriseAIUserUsageParams extends UserUsagePageParams { + /** + * Body param: 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. + */ + dateRange: Shared.DateRange; + + /** + * Body param + */ + organizationId: string; + + /** + * Body param: Optional filter narrowing the returned user usage. When set to a + * subject, the response contains only usage for that user or service account. + */ + filter?: BillingListEnterpriseAIUserUsageParams.Filter; + + /** + * Body param + */ + pagination?: BillingListEnterpriseAIUserUsageParams.Pagination; + + /** + * Body param: sort controls the ordering of results. Defaults to total spend + * descending. + */ + sort?: BillingListEnterpriseAIUserUsageParams.Sort; + + /** + * Body param: IANA timezone name used to bucket usage. When empty, defaults to + * "UTC". + */ + timezone?: string; +} + +export namespace BillingListEnterpriseAIUserUsageParams { + /** + * Optional filter narrowing the returned user usage. When set to a subject, the + * response contains only usage for that user or service account. + */ + export interface Filter { + /** + * 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. + */ + subject?: Shared.Subject | null; + } + + export interface Pagination { + /** + * Token for the next set of results that was returned as next_token of a + * PaginationResponse + */ + token?: string; + + /** + * Page size is the maximum number of results to retrieve per page. Defaults to 25. + * Maximum 100. + */ + pageSize?: number; + } + + /** + * sort controls the ordering of results. Defaults to total spend descending. + */ + export interface Sort { + field?: + | 'SORT_FIELD_UNSPECIFIED' + | 'SORT_FIELD_USAGE' + | 'SORT_FIELD_DISPLAY_NAME' + | 'SORT_FIELD_BUDGET' + | 'SORT_FIELD_BUDGET_USED'; + + order?: Shared.SortOrder; + } +} + +export interface BillingListEnterpriseUserCreditUsageParams extends UserUsagePageParams { + /** + * Body param: organization_id is the ID of the organization to list user credit + * usage for. + */ + organizationId: string; + + /** + * Body param: as_of is the point in time to compute month-to-date usage up to. + * Defaults to now if not set. + */ + asOf?: string | null; + + /** + * Body param + */ + pagination?: BillingListEnterpriseUserCreditUsageParams.Pagination; + + /** + * Body param: sort controls the ordering of results. Defaults to total credits + * descending. + */ + sort?: BillingListEnterpriseUserCreditUsageParams.Sort; +} + +export namespace BillingListEnterpriseUserCreditUsageParams { + export interface Pagination { + /** + * Token for the next set of results that was returned as next_token of a + * PaginationResponse + */ + token?: string; + + /** + * Page size is the maximum number of results to retrieve per page. Defaults to 25. + * Maximum 100. + */ + pageSize?: number; + } + + /** + * sort controls the ordering of results. Defaults to total credits descending. + */ + export interface Sort { + field?: + | 'SORT_FIELD_UNSPECIFIED' + | 'SORT_FIELD_USAGE' + | 'SORT_FIELD_DISPLAY_NAME' + | 'SORT_FIELD_BUDGET' + | 'SORT_FIELD_BUDGET_USED'; + + order?: Shared.SortOrder; + } +} + +export declare namespace Billing { + export { + type AgentExecutionCreditUsage as AgentExecutionCreditUsage, + type BillingCurrency as BillingCurrency, + type ByokRateCardTokenType as ByokRateCardTokenType, + type CreditUsageExportGroupBy as CreditUsageExportGroupBy, + type CreditUsageReportFilter as CreditUsageReportFilter, + type CreditsByType as CreditsByType, + type CumulativeCreditUsage as CumulativeCreditUsage, + type DailyCreditUsage as DailyCreditUsage, + type DailyEnterpriseAIUsage as DailyEnterpriseAIUsage, + type EnterpriseAITokenUsage as EnterpriseAITokenUsage, + type EnterpriseAIUsage as EnterpriseAIUsage, + type EnterpriseAIUsageBudget as EnterpriseAIUsageBudget, + type EnterpriseAIUsageBudgetSource as EnterpriseAIUsageBudgetSource, + type EnterpriseAIUsageByModel as EnterpriseAIUsageByModel, + type EnterpriseAIUsageByTokenType as EnterpriseAIUsageByTokenType, + type EnterpriseAIUsageTimeSeriesFilter as EnterpriseAIUsageTimeSeriesFilter, + type EnterpriseAIUserBudgetPolicySource as EnterpriseAIUserBudgetPolicySource, + type EnvironmentCreditUsage as EnvironmentCreditUsage, + type TeamCreditUsage as TeamCreditUsage, + type TeamCumulativeCreditUsage as TeamCumulativeCreditUsage, + type TeamEnterpriseAIUsage as TeamEnterpriseAIUsage, + type UsageType as UsageType, + type UserCostBudgetUsage as UserCostBudgetUsage, + type UserCreditBudgetUsage as UserCreditBudgetUsage, + type UserCreditUsage as UserCreditUsage, + type UserEnterpriseAIUsage as UserEnterpriseAIUsage, + type BillingGetCreditUsageExportResponse as BillingGetCreditUsageExportResponse, + type BillingGetCreditUsageReportResponse as BillingGetCreditUsageReportResponse, + type BillingGetCumulativeCreditUsageResponse as BillingGetCumulativeCreditUsageResponse, + type BillingGetEnterpriseAIUsageSummaryResponse as BillingGetEnterpriseAIUsageSummaryResponse, + type BillingGetEnterpriseAIUsageTimeSeriesResponse as BillingGetEnterpriseAIUsageTimeSeriesResponse, + type TeamEnterpriseAIUsagesTeamUsagePage as TeamEnterpriseAIUsagesTeamUsagePage, + type UserCostBudgetUsagesUserUsagePage as UserCostBudgetUsagesUserUsagePage, + type UserCreditBudgetUsagesUserUsagePage as UserCreditBudgetUsagesUserUsagePage, + type BillingGetCreditUsageExportParams as BillingGetCreditUsageExportParams, + type BillingGetCreditUsageReportParams as BillingGetCreditUsageReportParams, + type BillingGetCumulativeCreditUsageParams as BillingGetCumulativeCreditUsageParams, + type BillingGetEnterpriseAIUsageSummaryParams as BillingGetEnterpriseAIUsageSummaryParams, + type BillingGetEnterpriseAIUsageTimeSeriesParams as BillingGetEnterpriseAIUsageTimeSeriesParams, + type BillingListEnterpriseAITeamUsageParams as BillingListEnterpriseAITeamUsageParams, + type BillingListEnterpriseAIUserUsageParams as BillingListEnterpriseAIUserUsageParams, + type BillingListEnterpriseUserCreditUsageParams as BillingListEnterpriseUserCreditUsageParams, + }; +} diff --git a/src/resources/index.ts b/src/resources/index.ts index 7326ceed..09d21fdc 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -98,6 +98,51 @@ export { type AutomationListExecutionOutputsResponsesOutputsPage, type WorkflowExecutionsWorkflowExecutionsPage, } from './automations'; +export { + Billing, + type AgentExecutionCreditUsage, + type BillingCurrency, + type ByokRateCardTokenType, + type CreditUsageExportGroupBy, + type CreditUsageReportFilter, + type CreditsByType, + type CumulativeCreditUsage, + type DailyCreditUsage, + type DailyEnterpriseAIUsage, + type EnterpriseAITokenUsage, + type EnterpriseAIUsage, + type EnterpriseAIUsageBudget, + type EnterpriseAIUsageBudgetSource, + type EnterpriseAIUsageByModel, + type EnterpriseAIUsageByTokenType, + type EnterpriseAIUsageTimeSeriesFilter, + type EnterpriseAIUserBudgetPolicySource, + type EnvironmentCreditUsage, + type TeamCreditUsage, + type TeamCumulativeCreditUsage, + type TeamEnterpriseAIUsage, + type UsageType, + type UserCostBudgetUsage, + type UserCreditBudgetUsage, + type UserCreditUsage, + type UserEnterpriseAIUsage, + type BillingGetCreditUsageExportResponse, + type BillingGetCreditUsageReportResponse, + type BillingGetCumulativeCreditUsageResponse, + type BillingGetEnterpriseAIUsageSummaryResponse, + type BillingGetEnterpriseAIUsageTimeSeriesResponse, + type BillingGetCreditUsageExportParams, + type BillingGetCreditUsageReportParams, + type BillingGetCumulativeCreditUsageParams, + type BillingGetEnterpriseAIUsageSummaryParams, + type BillingGetEnterpriseAIUsageTimeSeriesParams, + type BillingListEnterpriseAITeamUsageParams, + type BillingListEnterpriseAIUserUsageParams, + type BillingListEnterpriseUserCreditUsageParams, + type TeamEnterpriseAIUsagesTeamUsagePage, + type UserCostBudgetUsagesUserUsagePage, + type UserCreditBudgetUsagesUserUsagePage, +} from './billing'; export { Editors, type Editor, @@ -344,7 +389,6 @@ export { type CoAuthorSummary, type CoAuthorTimeBucket, type CoAuthorTool, - type DateRange, type EnvironmentUsageRecord, type PrSummary, type PrTimeBucket, diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 63200eea..93a82f8b 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -50,7 +50,10 @@ export type CodexOpenAIModel = | '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_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'; /** * CodexReasoningEffort is the static allowlist of reasoning efforts supported by @@ -97,6 +100,21 @@ export type CountResponseRelation = | 'COUNT_RESPONSE_RELATION_EQ' | 'COUNT_RESPONSE_RELATION_GTE'; +/** + * DateRange specifies a time period for queries. + */ +export interface DateRange { + /** + * End time of the date range (exclusive). + */ + endTime: string; + + /** + * Start time of the date range (inclusive). + */ + startTime: string; +} + export interface EnvironmentClass { /** * id is the unique identifier of the environment class diff --git a/src/resources/usage.ts b/src/resources/usage.ts index b629ebf7..c5f3e9fb 100644 --- a/src/resources/usage.ts +++ b/src/resources/usage.ts @@ -1,7 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; -import * as UsageAPI from './usage'; +import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; import { PagePromise, RecordsPage, type RecordsPageParams } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; @@ -540,21 +540,6 @@ export type CoAuthorTool = | 'CO_AUTHOR_TOOL_CLAUDE' | 'CO_AUTHOR_TOOL_CODEX'; -/** - * DateRange specifies a time period for queries. - */ -export interface DateRange { - /** - * End time of the date range (exclusive). - */ - endTime: string; - - /** - * Start time of the date range (inclusive). - */ - startTime: string; -} - /** * EnvironmentUsageRecord represents a record of an environment from start to stop. */ @@ -882,7 +867,7 @@ export interface UsageGetAdoptionUsageSummaryParams { /** * Date range to query metrics within. */ - dateRange: DateRange; + dateRange: Shared.DateRange; /** * Optional project ID to filter metrics by. @@ -904,7 +889,7 @@ export interface UsageGetAgentTraceSummaryParams { /** * Date range to query within. */ - dateRange: DateRange; + dateRange: Shared.DateRange; /** * Optional project ID to scope results. @@ -928,7 +913,7 @@ export interface UsageGetAgentTraceTimeSeriesParams { /** * Date range to query within. */ - dateRange: DateRange; + dateRange: Shared.DateRange; /** * Optional project ID to scope results. @@ -957,7 +942,7 @@ export interface UsageGetCoAuthorSummaryParams { /** * Date range to query within. */ - dateRange: DateRange; + dateRange: Shared.DateRange; /** * Optional project ID to scope results. @@ -981,7 +966,7 @@ export interface UsageGetCoAuthorTimeSeriesParams { /** * Date range to query within. */ - dateRange: DateRange; + dateRange: Shared.DateRange; /** * Optional project ID to scope results. @@ -1010,7 +995,7 @@ export interface UsageGetPrSummaryParams { /** * Date range to query within. */ - dateRange: DateRange; + dateRange: Shared.DateRange; /** * Optional project ID to scope results. @@ -1034,7 +1019,7 @@ export interface UsageGetPrTimeSeriesParams { /** * Date range to query within. */ - dateRange: DateRange; + dateRange: Shared.DateRange; /** * Optional project ID to scope results. @@ -1079,7 +1064,7 @@ export namespace UsageListEnvironmentRuntimeRecordsParams { /** * Date range to query runtime records within. */ - dateRange: UsageAPI.DateRange; + dateRange: Shared.DateRange; /** * Optional project ID to filter runtime records by. @@ -1113,7 +1098,6 @@ export declare namespace Usage { type CoAuthorSummary as CoAuthorSummary, type CoAuthorTimeBucket as CoAuthorTimeBucket, type CoAuthorTool as CoAuthorTool, - type DateRange as DateRange, type EnvironmentUsageRecord as EnvironmentUsageRecord, type PrSummary as PrSummary, type PrTimeBucket as PrTimeBucket, diff --git a/tests/api-resources/billing.test.ts b/tests/api-resources/billing.test.ts new file mode 100644 index 00000000..03cce964 --- /dev/null +++ b/tests/api-resources/billing.test.ts @@ -0,0 +1,213 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Gitpod from '@gitpod/sdk'; + +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource billing', () => { + // Mock server tests are disabled + test.skip('getCreditUsageExport: only required params', async () => { + const responsePromise = client.billing.getCreditUsageExport({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getCreditUsageExport: required and optional params', async () => { + const response = await client.billing.getCreditUsageExport({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + groupBy: 'CREDIT_USAGE_EXPORT_GROUP_BY_DAILY_SUMMARY', + }); + }); + + // Mock server tests are disabled + test.skip('getCreditUsageReport: only required params', async () => { + const responsePromise = client.billing.getCreditUsageReport({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getCreditUsageReport: required and optional params', async () => { + const response = await client.billing.getCreditUsageReport({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + filter: { subject: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' } }, + timezone: 'timezone', + }); + }); + + // Mock server tests are disabled + test.skip('getCumulativeCreditUsage: only required params', async () => { + const responsePromise = client.billing.getCumulativeCreditUsage({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getCumulativeCreditUsage: required and optional params', async () => { + const response = await client.billing.getCumulativeCreditUsage({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + asOf: '2026-03-31T23:59:59Z', + }); + }); + + // Mock server tests are disabled + test.skip('getEnterpriseAIUsageSummary: only required params', async () => { + const responsePromise = client.billing.getEnterpriseAIUsageSummary({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getEnterpriseAIUsageSummary: required and optional params', async () => { + const response = await client.billing.getEnterpriseAIUsageSummary({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + timezone: 'timezone', + }); + }); + + // Mock server tests are disabled + test.skip('getEnterpriseAIUsageTimeSeries: only required params', async () => { + const responsePromise = client.billing.getEnterpriseAIUsageTimeSeries({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('getEnterpriseAIUsageTimeSeries: required and optional params', async () => { + const response = await client.billing.getEnterpriseAIUsageTimeSeries({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + filter: { subject: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' } }, + timezone: 'timezone', + }); + }); + + // Mock server tests are disabled + test.skip('listEnterpriseAITeamUsage: only required params', async () => { + const responsePromise = client.billing.listEnterpriseAITeamUsage({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('listEnterpriseAITeamUsage: required and optional params', async () => { + const response = await client.billing.listEnterpriseAITeamUsage({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + token: 'token', + pageSize: 0, + filter: { teamIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'] }, + pagination: { token: 'token', pageSize: 100 }, + timezone: 'timezone', + }); + }); + + // Mock server tests are disabled + test.skip('listEnterpriseAIUserUsage: only required params', async () => { + const responsePromise = client.billing.listEnterpriseAIUserUsage({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('listEnterpriseAIUserUsage: required and optional params', async () => { + const response = await client.billing.listEnterpriseAIUserUsage({ + dateRange: { endTime: '2024-01-31T00:00:00Z', startTime: '2024-01-01T00:00:00Z' }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + token: 'token', + pageSize: 0, + filter: { subject: { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', principal: 'PRINCIPAL_UNSPECIFIED' } }, + pagination: { token: 'token', pageSize: 100 }, + sort: { field: 'SORT_FIELD_UNSPECIFIED', order: 'SORT_ORDER_UNSPECIFIED' }, + timezone: 'timezone', + }); + }); + + // Mock server tests are disabled + test.skip('listEnterpriseUserCreditUsage: only required params', async () => { + const responsePromise = client.billing.listEnterpriseUserCreditUsage({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('listEnterpriseUserCreditUsage: required and optional params', async () => { + const response = await client.billing.listEnterpriseUserCreditUsage({ + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + token: 'token', + pageSize: 0, + asOf: '2019-12-27T18:11:19.117Z', + pagination: { token: 'token', pageSize: 50 }, + sort: { field: 'SORT_FIELD_UNSPECIFIED', order: 'SORT_ORDER_UNSPECIFIED' }, + }); + }); +}); diff --git a/yarn.lock b/yarn.lock index e419304f..a3e3ee0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1263,9 +1263,9 @@ bcrypt-pbkdf@^1.0.0, bcrypt-pbkdf@^1.0.2: tweetnacl "^0.14.3" brace-expansion@^2.0.2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.1.tgz#c68b1c4111c76aae3a6fba55d496cee10c39dad8" - integrity sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA== + version "2.1.2" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.2.tgz#0bba2271feb7d458b0d31ad13625aaa4754431e2" + integrity sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA== dependencies: balanced-match "^1.0.0" From 84248f5fddcd1a8e01565672a43daa7b8e271c32 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:12:00 +0000 Subject: [PATCH 181/217] 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 1396c15bd264e9eee7152ea2e9217557cb78d8fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 22:34:02 +0000 Subject: [PATCH 182/217] fix(ci): bump @arethetypeswrong/cli to ^0.18.0 and run CI workflows on Node 24 --- .github/workflows/ci.yml | 6 ++--- package.json | 2 +- yarn.lock | 51 +++++++++++++++++++++++++--------------- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5fc5df9..e54737d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Node uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: - node-version: '20' + node-version: '24' - name: Bootstrap run: ./scripts/bootstrap @@ -48,7 +48,7 @@ jobs: - name: Set up Node uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: - node-version: '20' + node-version: '24' - name: Bootstrap run: ./scripts/bootstrap @@ -85,7 +85,7 @@ jobs: - name: Set up Node uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: - node-version: '20' + node-version: '24' - name: Bootstrap run: ./scripts/bootstrap diff --git a/package.json b/package.json index 1cdecd5b..f6b61c8f 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "dependencies": {}, "devDependencies": { - "@arethetypeswrong/cli": "^0.17.0", + "@arethetypeswrong/cli": "^0.18.0", "@swc/core": "^1.3.102", "@swc/jest": "^0.2.29", "@types/jest": "^29.4.0", diff --git a/yarn.lock b/yarn.lock index a3e3ee0a..03caba0d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,12 +12,12 @@ resolved "https://registry.yarnpkg.com/@andrewbranch/untar.js/-/untar.js-1.0.3.tgz#ba9494f85eb83017c5c855763969caf1d0adea00" integrity sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw== -"@arethetypeswrong/cli@^0.17.0": - version "0.17.0" - resolved "https://registry.yarnpkg.com/@arethetypeswrong/cli/-/cli-0.17.0.tgz#f97f10926b3f9f9eb5117550242d2e06c25cadac" - integrity sha512-xSMW7bfzVWpYw5JFgZqBXqr6PdR0/REmn3DkxCES5N0JTcB0CVgbIynJCvKBFmXaPc3hzmmTrb7+yPDRoOSZdA== +"@arethetypeswrong/cli@^0.18.0": + version "0.18.4" + resolved "https://registry.yarnpkg.com/@arethetypeswrong/cli/-/cli-0.18.4.tgz#c31f54f3b0d0e0f3256ab3edb6530beeb5e64b4b" + integrity sha512-kNWo6LTzGAuLYPpJ7Sgo63whSUeeSuKMlYx6IBgzs4ONEG807gW4hSSENvpeCHzO2H2wIzG5EFl0OKBbqGBAyA== dependencies: - "@arethetypeswrong/core" "0.17.0" + "@arethetypeswrong/core" "0.18.4" chalk "^4.1.2" cli-table3 "^0.6.3" commander "^10.0.1" @@ -25,15 +25,16 @@ marked-terminal "^7.1.0" semver "^7.5.4" -"@arethetypeswrong/core@0.17.0": - version "0.17.0" - resolved "https://registry.yarnpkg.com/@arethetypeswrong/core/-/core-0.17.0.tgz#abb3b5f425056d37193644c2a2de4aecf866b76b" - integrity sha512-FHyhFizXNetigTVsIhqXKGYLpazPS5YNojEPpZEUcBPt9wVvoEbNIvG+hybuBR+pjlRcbyuqhukHZm1fr+bDgA== +"@arethetypeswrong/core@0.18.4": + version "0.18.4" + resolved "https://registry.yarnpkg.com/@arethetypeswrong/core/-/core-0.18.4.tgz#24edea3d651dea7d32bf6f1cc9ee9a00db39de49" + integrity sha512-M5F0ePyN6h2Z6XxRiyIPqjGbltotXLjR0CKA0uKspsDu0QmgTNYvRb4RSQPMUs2ZXZHCCYpbaZbFbYOXLxCjUA== dependencies: "@andrewbranch/untar.js" "^1.0.3" + "@loaderkit/resolve" "^1.0.2" cjs-module-lexer "^1.2.3" - fflate "^0.8.2" - lru-cache "^10.4.3" + fflate "^0.8.3" + lru-cache "^11.0.1" semver "^7.5.4" typescript "5.6.1-rc" validate-npm-package-name "^5.0.0" @@ -306,6 +307,11 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@braidai/lang@^1.0.0": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@braidai/lang/-/lang-1.1.2.tgz#65bc2bc1db6d00e153b95ac7006f4573e289e9be" + integrity sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA== + "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" @@ -688,6 +694,13 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@loaderkit/resolve@^1.0.2": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@loaderkit/resolve/-/resolve-1.0.6.tgz#8d45341e688faecc25b3ae919c0f45d94c4e26c9" + integrity sha512-G8FdIoF5CypfwmD9rl8BXod5HDn8JqB0CCNBXDTaRZ+yRYhARrrSToX1zg1zy9jX3zLqigsELwhT4gNtkdQAUg== + dependencies: + "@braidai/lang" "^1.0.0" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1772,10 +1785,10 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -fflate@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.8.2.tgz#fc8631f5347812ad6028bbe4a2308b2792aa1dea" - integrity sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A== +fflate@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.8.3.tgz#bc27d8eb30343d4d512abb03480202ce65d825fc" + integrity sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA== file-entry-cache@^8.0.0: version "8.0.0" @@ -2578,10 +2591,10 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lru-cache@^10.4.3: - version "10.4.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" - integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== +lru-cache@^11.0.1: + version "11.5.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.5.2.tgz#00e16665c90c620fba14a3c368732a976493f760" + integrity sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g== lru-cache@^5.1.1: version "5.1.1" From 9757dc7951950cecf2e9a19ac0b95e4ed67326f9 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:26 +0000 Subject: [PATCH 183/217] 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 0fd5089bbfdc5251bcf3aa57c13ee00af716fb17 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:36 +0000 Subject: [PATCH 184/217] 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 af7995656b6e9a9757dfe2e026f8938b8f4478bf 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:34 +0000 Subject: [PATCH 185/217] feat(api): add base snapshot build environment role --- .stats.yml | 4 ++-- src/resources/environments/environments.ts | 3 ++- 2 files changed, 4 insertions(+), 3 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 diff --git a/src/resources/environments/environments.ts b/src/resources/environments/environments.ts index 4ade7edf..bcffc926 100644 --- a/src/resources/environments/environments.ts +++ b/src/resources/environments/environments.ts @@ -721,7 +721,8 @@ export type EnvironmentRole = | 'ENVIRONMENT_ROLE_UNSPECIFIED' | 'ENVIRONMENT_ROLE_DEFAULT' | 'ENVIRONMENT_ROLE_PREBUILD' - | 'ENVIRONMENT_ROLE_WORKFLOW'; + | 'ENVIRONMENT_ROLE_WORKFLOW' + | 'ENVIRONMENT_ROLE_BASE_SNAPSHOT_BUILD'; /** * EnvironmentSpec specifies the configuration of an environment for an environment From 2cbf05b577b3d73bc5122582255561c032928392 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:53 +0000 Subject: [PATCH 186/217] feat(secrets): support JFrog OIDC secret sources --- .stats.yml | 6 ++-- src/resources/secrets.ts | 61 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 4 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 diff --git a/src/resources/secrets.ts b/src/resources/secrets.ts index 7cbad510..19e4bd72 100644 --- a/src/resources/secrets.ts +++ b/src/resources/secrets.ts @@ -362,6 +362,11 @@ export interface Secret { scope?: SecretScope; + /** + * Source of the secret + */ + source?: Secret.Source; + /** * 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 @@ -476,6 +481,30 @@ export namespace Secret { */ targetHosts?: Array; } + + /** + * Source of the secret + */ + export interface Source { + oidcJfrog?: Source.OidcJfrog; + + verbatim?: boolean; + } + + export namespace Source { + export interface OidcJfrog { + /** + * 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]))?$") + * ``` + */ + host?: string; + + providerName?: string; + } + } } export interface SecretScope { @@ -566,7 +595,13 @@ export interface SecretCreateParams { scope?: SecretScope; /** - * value is the plaintext value of the secret + * source is the source of the secret, possibly verbatim value + */ + source?: SecretCreateParams.Source; + + /** + * value is the plaintext value of the secret. When set, source must be unset or + * verbatim. */ value?: string; } @@ -592,6 +627,30 @@ export namespace SecretCreateParams { */ targetHosts?: Array; } + + /** + * source is the source of the secret, possibly verbatim value + */ + export interface Source { + oidcJfrog?: Source.OidcJfrog; + + verbatim?: boolean; + } + + export namespace Source { + export interface OidcJfrog { + /** + * 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]))?$") + * ``` + */ + host?: string; + + providerName?: string; + } + } } export interface SecretListParams extends SecretsPageParams { From 692e0ff37021d3b2a60f5f92cc5a0d8c009e72f6 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:24 +0000 Subject: [PATCH 187/217] 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 65d99dedbc727cac17b224893801e4a2542e1915 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:26 +0000 Subject: [PATCH 188/217] 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 6ac2747beb4c1631370bd9636244f45aca6544ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 11:39:35 +0000 Subject: [PATCH 189/217] feat(api): add base snapshot runner capability --- .stats.yml | 4 ++-- src/resources/runners/runners.ts | 3 ++- 2 files changed, 4 insertions(+), 3 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 diff --git a/src/resources/runners/runners.ts b/src/resources/runners/runners.ts index 3a39e042..932d8449 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -677,7 +677,8 @@ export type RunnerCapability = | 'RUNNER_CAPABILITY_PORT_AUTHENTICATION' | 'RUNNER_CAPABILITY_HORIZONTAL_SCALING' | 'RUNNER_CAPABILITY_AGENT_EXECUTION_CNF' - | 'RUNNER_CAPABILITY_REDIS_STREAM'; + | 'RUNNER_CAPABILITY_REDIS_STREAM' + | 'RUNNER_CAPABILITY_BASE_SNAPSHOT'; export interface RunnerConfiguration { /** From 34dcdba3dcc47d30366d0ac578d904d80df0cc96 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:31 +0000 Subject: [PATCH 190/217] feat(api): add codex model policy states --- .stats.yml | 6 +-- api.md | 1 + src/resources/organizations/index.ts | 1 + src/resources/organizations/organizations.ts | 2 + src/resources/organizations/policies.ts | 40 +++++++++++++++++-- .../organizations/policies.test.ts | 1 + 6 files changed, 44 insertions(+), 7 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 diff --git a/api.md b/api.md index 55199b4f..4b86e21d 100644 --- a/api.md +++ b/api.md @@ -527,6 +527,7 @@ Methods: Types: - AgentPolicy +- CodexModelPolicy - ConversationSharingPolicy - CrowdStrikeConfig - CustomAgentEnvMapping diff --git a/src/resources/organizations/index.ts b/src/resources/organizations/index.ts index 29e04f78..896fe7b8 100644 --- a/src/resources/organizations/index.ts +++ b/src/resources/organizations/index.ts @@ -71,6 +71,7 @@ export { export { Policies, type AgentPolicy, + type CodexModelPolicy, type ConversationSharingPolicy, type CrowdStrikeConfig, type CustomAgentEnvMapping, diff --git a/src/resources/organizations/organizations.ts b/src/resources/organizations/organizations.ts index 3cdc46f4..781fcdc5 100644 --- a/src/resources/organizations/organizations.ts +++ b/src/resources/organizations/organizations.ts @@ -55,6 +55,7 @@ import { import * as PoliciesAPI from './policies'; import { AgentPolicy, + CodexModelPolicy, ConversationSharingPolicy, CrowdStrikeConfig, CustomAgentEnvMapping, @@ -1057,6 +1058,7 @@ export declare namespace Organizations { export { Policies as Policies, type AgentPolicy as AgentPolicy, + type CodexModelPolicy as CodexModelPolicy, type ConversationSharingPolicy as ConversationSharingPolicy, type CrowdStrikeConfig as CrowdStrikeConfig, type CustomAgentEnvMapping as CustomAgentEnvMapping, diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index 8a5fdd2f..1c1fe3c5 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -122,8 +122,9 @@ export interface AgentPolicy { allowedAgentIds?: Array; /** - * allowed_codex_models contains the Codex models users may select when the - * codex_rollout feature flag is enabled. Empty means all Codex models are allowed. + * @deprecated Deprecated: use codex_model_policy. This legacy allowlist cannot + * distinguish omitted from intentionally empty on update requests. Empty means all + * Codex models are allowed. */ allowedCodexModels?: Array; @@ -141,6 +142,12 @@ export interface AgentPolicy { */ allowedCodexServiceTiers?: Array; + /** + * codex_model_policy contains explicit per-model Codex availability states. + * Missing policy or missing model entries mean allowed. + */ + codexModelPolicy?: CodexModelPolicy; + /** * conversation_sharing_policy controls whether agent conversations can be shared */ @@ -160,6 +167,22 @@ export interface AgentPolicy { scmToolsAllowedGroupId?: string; } +/** + * CodexModelPolicy controls per-model availability for Codex. + */ +export interface CodexModelPolicy { + /** + * model_states maps CodexOpenAIModel enum names to explicit policy states. Missing + * entries are treated as allowed. + */ + modelStates?: { + [key: string]: + | 'CODEX_MODEL_POLICY_STATE_UNSPECIFIED' + | 'CODEX_MODEL_POLICY_STATE_ALLOWED' + | 'CODEX_MODEL_POLICY_STATE_DISABLED'; + }; +} + /** * ConversationSharingPolicy controls how agent conversations can be shared. */ @@ -614,8 +637,9 @@ export namespace PolicyUpdateParams { allowedAgentIds?: Array; /** - * allowed_codex_models contains the Codex models users may select when the - * codex_rollout feature flag is enabled. Empty means all Codex models are allowed. + * @deprecated Deprecated: use codex_model_policy. This legacy allowlist cannot + * distinguish omitted from intentionally empty on update requests. Empty means all + * Codex models are allowed. */ allowedCodexModels?: Array; @@ -633,6 +657,13 @@ export namespace PolicyUpdateParams { */ allowedCodexServiceTiers?: Array; + /** + * 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. + */ + codexModelPolicy?: PoliciesAPI.CodexModelPolicy; + /** * command_deny_list contains a list of commands that agents are not allowed to * execute @@ -730,6 +761,7 @@ export namespace PolicyUpdateParams { export declare namespace Policies { export { type AgentPolicy as AgentPolicy, + type CodexModelPolicy as CodexModelPolicy, type ConversationSharingPolicy as ConversationSharingPolicy, type CrowdStrikeConfig as CrowdStrikeConfig, type CustomAgentEnvMapping as CustomAgentEnvMapping, diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 696f7eb5..80d51065 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -52,6 +52,7 @@ describe('resource policies', () => { allowedCodexModels: ['CODEX_OPEN_AI_MODEL_UNSPECIFIED'], allowedCodexReasoningEfforts: ['CODEX_REASONING_EFFORT_UNSPECIFIED'], allowedCodexServiceTiers: ['CODEX_SERVICE_TIER_UNSPECIFIED'], + codexModelPolicy: { modelStates: { foo: 'CODEX_MODEL_POLICY_STATE_UNSPECIFIED' } }, commandDenyList: ['string'], conversationSharingPolicy: 'CONVERSATION_SHARING_POLICY_UNSPECIFIED', maxSubagentsPerEnvironment: 10, From 2ecffb7e343e9e7807e1f525bf1fc5722c17592c 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:09 +0000 Subject: [PATCH 191/217] 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 d0a4934b242a2c2c386422ec199716c615aba496 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:55 +0000 Subject: [PATCH 192/217] feat: add base snapshot resource types --- .stats.yml | 4 ++-- src/resources/shared.ts | 4 +++- 2 files changed, 5 insertions(+), 3 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 diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 93a82f8b..bb01bfed 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -393,7 +393,9 @@ export type ResourceType = | 'RESOURCE_TYPE_ROLE_ASSIGNMENT' | 'RESOURCE_TYPE_WARM_POOL' | 'RESOURCE_TYPE_NOTIFICATION' - | 'RESOURCE_TYPE_SECURITY_POLICY'; + | 'RESOURCE_TYPE_SECURITY_POLICY' + | 'RESOURCE_TYPE_BASE_SNAPSHOT' + | 'RESOURCE_TYPE_BASE_SNAPSHOT_CONFIG'; export interface RunsOn { docker?: RunsOn.Docker; From 4ec5e648e650ea3bfc9acb0b5f485e8175a40fd8 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:50 +0000 Subject: [PATCH 193/217] 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 b4f4c3cc0625828d95631814fff1e37e96764688 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:42 +0000 Subject: [PATCH 194/217] 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 a3bdd04b68778edcdce0894d4194e131a3ab161c 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:57 +0000 Subject: [PATCH 195/217] 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 b0d348a92d8222855a630d1a7648cc625e734548 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:56:50 +0000 Subject: [PATCH 196/217] feat(api): expose audit log entry kind --- .stats.yml | 4 ++-- src/resources/events.ts | 6 ++++++ 2 files changed, 8 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 diff --git a/src/resources/events.ts b/src/resources/events.ts index 70e2d30b..9a9bbb21 100644 --- a/src/resources/events.ts +++ b/src/resources/events.ts @@ -226,6 +226,12 @@ export interface EventListResponse { */ createdAt?: string; + /** + * AuditLogEntryKind identifies the typed details associated with an audit-log + * entry. No concrete kinds are defined yet. + */ + kind?: 'AUDIT_LOG_ENTRY_KIND_UNSPECIFIED'; + subjectId?: string; subjectType?: Shared.ResourceType; From 4bbecf52a1cbcbc8b354d060cf856416f9fdc2e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 17:23:19 +0000 Subject: [PATCH 197/217] feat(stlc): configurable CI runner and private-production-repo support in workflow templates --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e54737d1..bbf65ad6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/gitpod-typescript' && '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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -37,7 +37,7 @@ jobs: build: timeout-minutes: 5 name: build - runs-on: ${{ github.repository == 'stainless-sdks/gitpod-typescript' && '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') permissions: contents: read @@ -77,7 +77,7 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ${{ github.repository == 'stainless-sdks/gitpod-typescript' && '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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 From 0044e8ab1c6029e7fab6e7b967fa7523dd0a2e70 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:49 +0000 Subject: [PATCH 198/217] feat(api): expose Veto Exec security policies --- .stats.yml | 6 +- api.md | 18 + src/client.ts | 39 + src/core/pagination.ts | 58 ++ src/resources/index.ts | 14 + src/resources/security-policies.ts | 701 ++++++++++++++++++ tests/api-resources/security-policies.test.ts | 90 +++ 7 files changed, 923 insertions(+), 3 deletions(-) create mode 100644 src/resources/security-policies.ts create mode 100644 tests/api-resources/security-policies.test.ts 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 diff --git a/api.md b/api.md index 4b86e21d..1a040d64 100644 --- a/api.md +++ b/api.md @@ -842,6 +842,24 @@ Methods: - client.secrets.getValue({ ...params }) -> SecretGetValueResponse - client.secrets.updateValue({ ...params }) -> unknown +# SecurityPolicies + +Types: + +- SecurityPolicy +- SecurityPolicyCreateResponse +- SecurityPolicyRetrieveResponse +- SecurityPolicyUpdateResponse +- SecurityPolicyDeleteResponse + +Methods: + +- client.securityPolicies.create({ ...params }) -> SecurityPolicyCreateResponse +- client.securityPolicies.retrieve({ ...params }) -> SecurityPolicyRetrieveResponse +- client.securityPolicies.update({ ...params }) -> SecurityPolicyUpdateResponse +- client.securityPolicies.list({ ...params }) -> SecurityPoliciesSecurityPoliciesPage +- client.securityPolicies.delete({ ...params }) -> unknown + # Usage Types: diff --git a/src/client.ts b/src/client.ts index cdeb803a..ca351365 100644 --- a/src/client.ts +++ b/src/client.ts @@ -80,6 +80,8 @@ import { ScimConfigurationsPageResponse, type SecretsPageParams, SecretsPageResponse, + type SecurityPoliciesPageParams, + SecurityPoliciesPageResponse, type ServicesPageParams, ServicesPageResponse, type TaskExecutionsPageParams, @@ -340,6 +342,20 @@ import { Secrets, SecretsSecretsPage, } from './resources/secrets'; +import { + SecurityPolicies, + SecurityPoliciesSecurityPoliciesPage, + SecurityPolicy, + SecurityPolicyCreateParams, + SecurityPolicyCreateResponse, + SecurityPolicyDeleteParams, + SecurityPolicyDeleteResponse, + SecurityPolicyListParams, + SecurityPolicyRetrieveParams, + SecurityPolicyRetrieveResponse, + SecurityPolicyUpdateParams, + SecurityPolicyUpdateResponse, +} from './resources/security-policies'; import { AgentTraceModelBreakdown, AgentTraceSummary, @@ -1292,6 +1308,7 @@ export class Gitpod { projects: API.Projects = new API.Projects(this); runners: API.Runners = new API.Runners(this); secrets: API.Secrets = new API.Secrets(this); + securityPolicies: API.SecurityPolicies = new API.SecurityPolicies(this); /** * UsageService provides usage information about environments, users, and projects. */ @@ -1315,6 +1332,7 @@ Gitpod.Prebuilds = Prebuilds; Gitpod.Projects = Projects; Gitpod.Runners = Runners; Gitpod.Secrets = Secrets; +Gitpod.SecurityPolicies = SecurityPolicies; Gitpod.Usage = Usage; Gitpod.Users = Users; @@ -1444,6 +1462,12 @@ export declare namespace Gitpod { export import SecretsPage = Pagination.SecretsPage; export { type SecretsPageParams as SecretsPageParams, type SecretsPageResponse as SecretsPageResponse }; + export import SecurityPoliciesPage = Pagination.SecurityPoliciesPage; + export { + type SecurityPoliciesPageParams as SecurityPoliciesPageParams, + type SecurityPoliciesPageResponse as SecurityPoliciesPageResponse, + }; + export import ServicesPage = Pagination.ServicesPage; export { type ServicesPageParams as ServicesPageParams, type ServicesPageResponse as ServicesPageResponse }; @@ -1897,6 +1921,21 @@ export declare namespace Gitpod { type SecretUpdateValueParams as SecretUpdateValueParams, }; + export { + SecurityPolicies as SecurityPolicies, + type SecurityPolicy as SecurityPolicy, + type SecurityPolicyCreateResponse as SecurityPolicyCreateResponse, + type SecurityPolicyRetrieveResponse as SecurityPolicyRetrieveResponse, + type SecurityPolicyUpdateResponse as SecurityPolicyUpdateResponse, + type SecurityPolicyDeleteResponse as SecurityPolicyDeleteResponse, + type SecurityPoliciesSecurityPoliciesPage as SecurityPoliciesSecurityPoliciesPage, + type SecurityPolicyCreateParams as SecurityPolicyCreateParams, + type SecurityPolicyRetrieveParams as SecurityPolicyRetrieveParams, + type SecurityPolicyUpdateParams as SecurityPolicyUpdateParams, + type SecurityPolicyListParams as SecurityPolicyListParams, + type SecurityPolicyDeleteParams as SecurityPolicyDeleteParams, + }; + export { Usage as Usage, type AgentTraceModelBreakdown as AgentTraceModelBreakdown, diff --git a/src/core/pagination.ts b/src/core/pagination.ts index ed1d7d4c..80410c7b 100644 --- a/src/core/pagination.ts +++ b/src/core/pagination.ts @@ -1613,6 +1613,64 @@ export class SecretsPage extends AbstractPage implements SecretsPage } } +export interface SecurityPoliciesPageResponse { + pagination: SecurityPoliciesPageResponse.Pagination; + + securityPolicies: Array; +} + +export namespace SecurityPoliciesPageResponse { + export interface Pagination { + nextToken?: string; + } +} + +export interface SecurityPoliciesPageParams { + pageSize?: number; + + token?: string; +} + +export class SecurityPoliciesPage + extends AbstractPage + implements SecurityPoliciesPageResponse +{ + pagination: SecurityPoliciesPageResponse.Pagination; + + securityPolicies: Array; + + constructor( + client: Gitpod, + response: Response, + body: SecurityPoliciesPageResponse, + options: FinalRequestOptions, + ) { + super(client, response, body, options); + + this.pagination = body.pagination || {}; + this.securityPolicies = body.securityPolicies || []; + } + + getPaginatedItems(): Item[] { + return this.securityPolicies ?? []; + } + + nextPageRequestOptions(): PageRequestOptions | null { + const cursor = this.pagination?.nextToken; + if (!cursor) { + return null; + } + + return { + ...this.options, + query: { + ...maybeObj(this.options.query), + token: cursor, + }, + }; + } +} + export interface ServicesPageResponse { pagination: ServicesPageResponse.Pagination; diff --git a/src/resources/index.ts b/src/resources/index.ts index 09d21fdc..7bfb6a99 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -381,6 +381,20 @@ export { type SecretUpdateValueParams, type SecretsSecretsPage, } from './secrets'; +export { + SecurityPolicies, + type SecurityPolicy, + type SecurityPolicyCreateResponse, + type SecurityPolicyRetrieveResponse, + type SecurityPolicyUpdateResponse, + type SecurityPolicyDeleteResponse, + type SecurityPolicyCreateParams, + type SecurityPolicyRetrieveParams, + type SecurityPolicyUpdateParams, + type SecurityPolicyListParams, + type SecurityPolicyDeleteParams, + type SecurityPoliciesSecurityPoliciesPage, +} from './security-policies'; export { Usage, type AgentTraceModelBreakdown, diff --git a/src/resources/security-policies.ts b/src/resources/security-policies.ts new file mode 100644 index 00000000..b5ea7736 --- /dev/null +++ b/src/resources/security-policies.ts @@ -0,0 +1,701 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../core/resource'; +import { APIPromise } from '../core/api-promise'; +import { PagePromise, SecurityPoliciesPage, type SecurityPoliciesPageParams } from '../core/pagination'; +import { RequestOptions } from '../internal/request-options'; + +export class SecurityPolicies extends APIResource { + /** + * 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 + * ``` + * + * @example + * ```ts + * const securityPolicy = await client.securityPolicies.create( + * { + * metadata: { name: 'Veto Exec audit-first' }, + * spec: { + * executables: { + * defaultEffect: 'EFFECT_ALLOW', + * rules: [ + * { effect: 'EFFECT_AUDIT', path: 'npx' }, + * { effect: 'EFFECT_BLOCK', path: '/usr/bin/curl' }, + * ], + * }, + * }, + * organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * }, + * ); + * ``` + */ + create( + body: SecurityPolicyCreateParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.SecurityService/CreateSecurityPolicy', { body, ...options }); + } + + /** + * 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" + * ``` + * + * @example + * ```ts + * const securityPolicy = + * await client.securityPolicies.retrieve({ + * securityPolicyId: + * 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * }); + * ``` + */ + retrieve( + body: SecurityPolicyRetrieveParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.SecurityService/GetSecurityPolicy', { body, ...options }); + } + + /** + * 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 + * ``` + * + * @example + * ```ts + * const securityPolicy = await client.securityPolicies.update( + * { + * securityPolicyId: + * 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * spec: { + * executables: { + * defaultEffect: 'EFFECT_ALLOW', + * rules: [ + * { effect: 'EFFECT_BLOCK', path: 'npx' }, + * { effect: 'EFFECT_BLOCK', path: '/usr/bin/curl' }, + * ], + * }, + * }, + * }, + * ); + * ``` + */ + update( + body: SecurityPolicyUpdateParams, + options?: RequestOptions, + ): APIPromise { + return this._client.post('/gitpod.v1.SecurityService/UpdateSecurityPolicy', { body, ...options }); + } + + /** + * 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 + * ``` + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const securityPolicy of client.securityPolicies.list( + * { + * filter: { + * organizationId: + * 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + * }, + * pagination: { pageSize: 20 }, + * }, + * )) { + * // ... + * } + * ``` + */ + list( + params: SecurityPolicyListParams, + options?: RequestOptions, + ): PagePromise { + const { token, pageSize, ...body } = params; + return this._client.getAPIList( + '/gitpod.v1.SecurityService/ListSecurityPolicies', + SecurityPoliciesPage, + { query: { token, pageSize }, body, method: 'post', ...options }, + ); + } + + /** + * 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" + * ``` + * + * @example + * ```ts + * const securityPolicy = await client.securityPolicies.delete( + * { + * securityPolicyId: + * 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * }, + * ); + * ``` + */ + delete(body: SecurityPolicyDeleteParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.SecurityService/DeleteSecurityPolicy', { body, ...options }); + } +} + +export type SecurityPoliciesSecurityPoliciesPage = SecurityPoliciesPage; + +export interface SecurityPolicy { + metadata: SecurityPolicy.Metadata; + + /** + * Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + * security/proxy use. These can be modeled later as explicit fields if needed. + */ + spec: SecurityPolicy.Spec; + + id?: string; + + /** + * 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. + */ + createdAt?: string; + + organizationId?: string; + + /** + * 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. + */ + updatedAt?: string; +} + +export namespace SecurityPolicy { + export interface Metadata { + name?: string; + } + + /** + * Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + * security/proxy use. These can be modeled later as explicit fields if needed. + */ + export interface Spec { + /** + * executables is the public Veto Exec GA policy surface. + */ + executables?: Spec.Executables; + } + + export namespace Spec { + /** + * executables is the public Veto Exec GA policy surface. + */ + export interface Executables { + /** + * 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. + */ + defaultEffect?: 'EFFECT_UNSPECIFIED' | 'EFFECT_ALLOW' | 'EFFECT_BLOCK' | 'EFFECT_AUDIT'; + + /** + * rules contains executable-specific audit or block decisions. + */ + rules?: Array; + } + + export namespace Executables { + export interface Rule { + /** + * effect must be EFFECT_AUDIT or EFFECT_BLOCK. EFFECT_ALLOW is not supported on an + * executable rule. + */ + effect?: 'EFFECT_UNSPECIFIED' | 'EFFECT_ALLOW' | 'EFFECT_BLOCK' | 'EFFECT_AUDIT'; + + /** + * 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. + */ + path?: string; + } + } + } +} + +export interface SecurityPolicyCreateResponse { + securityPolicy: SecurityPolicy; +} + +export interface SecurityPolicyRetrieveResponse { + securityPolicy: SecurityPolicy; +} + +export interface SecurityPolicyUpdateResponse { + securityPolicy: SecurityPolicy; +} + +export type SecurityPolicyDeleteResponse = unknown; + +export interface SecurityPolicyCreateParams { + metadata: SecurityPolicyCreateParams.Metadata; + + /** + * Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + * security/proxy use. These can be modeled later as explicit fields if needed. + */ + spec: SecurityPolicyCreateParams.Spec; + + organizationId?: string; +} + +export namespace SecurityPolicyCreateParams { + export interface Metadata { + name?: string; + } + + /** + * Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + * security/proxy use. These can be modeled later as explicit fields if needed. + */ + export interface Spec { + /** + * executables is the public Veto Exec GA policy surface. + */ + executables?: Spec.Executables; + } + + export namespace Spec { + /** + * executables is the public Veto Exec GA policy surface. + */ + export interface Executables { + /** + * 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. + */ + defaultEffect?: 'EFFECT_UNSPECIFIED' | 'EFFECT_ALLOW' | 'EFFECT_BLOCK' | 'EFFECT_AUDIT'; + + /** + * rules contains executable-specific audit or block decisions. + */ + rules?: Array; + } + + export namespace Executables { + export interface Rule { + /** + * effect must be EFFECT_AUDIT or EFFECT_BLOCK. EFFECT_ALLOW is not supported on an + * executable rule. + */ + effect?: 'EFFECT_UNSPECIFIED' | 'EFFECT_ALLOW' | 'EFFECT_BLOCK' | 'EFFECT_AUDIT'; + + /** + * 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. + */ + path?: string; + } + } + } +} + +export interface SecurityPolicyRetrieveParams { + securityPolicyId?: string; +} + +export interface SecurityPolicyUpdateParams { + metadata?: SecurityPolicyUpdateParams.Metadata; + + securityPolicyId?: string; + + /** + * Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + * security/proxy use. These can be modeled later as explicit fields if needed. + */ + spec?: SecurityPolicyUpdateParams.Spec; +} + +export namespace SecurityPolicyUpdateParams { + export interface Metadata { + name?: string; + } + + /** + * Mandate/deploy security agents, e.g. CrowdStrike. Mandate credential + * security/proxy use. These can be modeled later as explicit fields if needed. + */ + export interface Spec { + /** + * executables is the public Veto Exec GA policy surface. + */ + executables?: Spec.Executables; + } + + export namespace Spec { + /** + * executables is the public Veto Exec GA policy surface. + */ + export interface Executables { + /** + * 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. + */ + defaultEffect?: 'EFFECT_UNSPECIFIED' | 'EFFECT_ALLOW' | 'EFFECT_BLOCK' | 'EFFECT_AUDIT'; + + /** + * rules contains executable-specific audit or block decisions. + */ + rules?: Array; + } + + export namespace Executables { + export interface Rule { + /** + * effect must be EFFECT_AUDIT or EFFECT_BLOCK. EFFECT_ALLOW is not supported on an + * executable rule. + */ + effect?: 'EFFECT_UNSPECIFIED' | 'EFFECT_ALLOW' | 'EFFECT_BLOCK' | 'EFFECT_AUDIT'; + + /** + * 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. + */ + path?: string; + } + } + } +} + +export interface SecurityPolicyListParams extends SecurityPoliciesPageParams { + /** + * Body param + */ + filter?: SecurityPolicyListParams.Filter; + + /** + * Body param + */ + pagination?: SecurityPolicyListParams.Pagination; +} + +export namespace SecurityPolicyListParams { + export interface Filter { + organizationId?: string; + + search?: string; + + securityPolicyIds?: Array; + } + + export interface Pagination { + /** + * Token for the next set of results that was returned as next_token of a + * PaginationResponse + */ + token?: string; + + /** + * Page size is the maximum number of results to retrieve per page. Defaults to 25. + * Maximum 100. + */ + pageSize?: number; + } +} + +export interface SecurityPolicyDeleteParams { + securityPolicyId?: string; +} + +export declare namespace SecurityPolicies { + export { + type SecurityPolicy as SecurityPolicy, + type SecurityPolicyCreateResponse as SecurityPolicyCreateResponse, + type SecurityPolicyRetrieveResponse as SecurityPolicyRetrieveResponse, + type SecurityPolicyUpdateResponse as SecurityPolicyUpdateResponse, + type SecurityPolicyDeleteResponse as SecurityPolicyDeleteResponse, + type SecurityPoliciesSecurityPoliciesPage as SecurityPoliciesSecurityPoliciesPage, + type SecurityPolicyCreateParams as SecurityPolicyCreateParams, + type SecurityPolicyRetrieveParams as SecurityPolicyRetrieveParams, + type SecurityPolicyUpdateParams as SecurityPolicyUpdateParams, + type SecurityPolicyListParams as SecurityPolicyListParams, + type SecurityPolicyDeleteParams as SecurityPolicyDeleteParams, + }; +} diff --git a/tests/api-resources/security-policies.test.ts b/tests/api-resources/security-policies.test.ts new file mode 100644 index 00000000..3364d280 --- /dev/null +++ b/tests/api-resources/security-policies.test.ts @@ -0,0 +1,90 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Gitpod from '@gitpod/sdk'; + +const client = new Gitpod({ + bearerToken: 'My Bearer Token', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource securityPolicies', () => { + // Mock server tests are disabled + test.skip('create: only required params', async () => { + const responsePromise = client.securityPolicies.create({ + metadata: {}, + spec: {}, + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('create: required and optional params', async () => { + const response = await client.securityPolicies.create({ + metadata: { name: 'Veto Exec audit-first' }, + spec: { + executables: { + defaultEffect: 'EFFECT_ALLOW', + rules: [ + { effect: 'EFFECT_AUDIT', path: 'npx' }, + { effect: 'EFFECT_BLOCK', path: '/usr/bin/curl' }, + ], + }, + }, + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + }); + }); + + // Mock server tests are disabled + test.skip('retrieve', async () => { + const responsePromise = client.securityPolicies.retrieve({}); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('update', async () => { + const responsePromise = client.securityPolicies.update({}); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('list', async () => { + const responsePromise = client.securityPolicies.list({}); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('delete', async () => { + const responsePromise = client.securityPolicies.delete({}); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); +}); From 438a4fe4996d8e4fd7c90dc38df7d0ed7055ca9b 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:03 +0000 Subject: [PATCH 199/217] feat(api): expose default security policy assignment --- .stats.yml | 4 ++-- src/resources/organizations/policies.ts | 18 ++++++++++++++++++ .../organizations/policies.test.ts | 1 + 3 files changed, 21 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 diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index 1c1fe3c5..dd9caf9b 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -418,6 +418,15 @@ export interface OrganizationPolicies { */ securityAgentPolicy?: SecurityAgentPolicy; + /** + * 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. + */ + securityPolicyId?: string; + /** * veto_exec_policy contains the veto exec policy for environments. */ @@ -613,6 +622,15 @@ export interface PolicyUpdateParams { */ securityAgentPolicy?: PolicyUpdateParams.SecurityAgentPolicy | null; + /** + * 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. + */ + securityPolicyId?: string | null; + /** * veto_exec_policy contains the veto exec policy for environments. */ diff --git a/tests/api-resources/organizations/policies.test.ts b/tests/api-resources/organizations/policies.test.ts index 80d51065..ca502ead 100644 --- a/tests/api-resources/organizations/policies.test.ts +++ b/tests/api-resources/organizations/policies.test.ts @@ -86,6 +86,7 @@ describe('resource policies', () => { tags: 'tags', }, }, + securityPolicyId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', vetoExecPolicy: { action: 'KERNEL_CONTROLS_ACTION_UNSPECIFIED', enabled: true, From 66f9053f07a68a3ad66d49170abaa18afeb336de 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:41 +0000 Subject: [PATCH 200/217] 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 3d6999d43b8eee8b3f6ab872e05afed6d77a221e 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:41 +0000 Subject: [PATCH 201/217] 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 0120ae7829b82b840fbbe5ba8d763fa3570ef7e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 13:39:32 +0000 Subject: [PATCH 202/217] feat(audit): store and retrieve Veto Exec details --- .stats.yml | 8 +- api.md | 6 +- src/client.ts | 9 + src/resources/environments/environments.ts | 3 +- src/resources/events.ts | 277 ++++++++++++++++++- src/resources/index.ts | 4 + src/resources/organizations/index.ts | 1 - src/resources/organizations/organizations.ts | 2 - src/resources/organizations/policies.ts | 11 +- src/resources/shared.ts | 8 + tests/api-resources/events.test.ts | 21 ++ 11 files changed, 327 insertions(+), 23 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 diff --git a/api.md b/api.md index 1a040d64..23cbb07e 100644 --- a/api.md +++ b/api.md @@ -15,6 +15,7 @@ Types: - ErrorCode - FieldValue - Gateway +- KernelControlsAction - OrganizationRole - OrganizationTier - Principal @@ -341,12 +342,16 @@ Methods: Types: +- AuditLogEntryDetails +- Process - ResourceOperation +- EventRetrieveResponse - EventListResponse - EventWatchResponse Methods: +- client.events.retrieve({ ...params }) -> EventRetrieveResponse - client.events.list({ ...params }) -> EventListResponsesEntriesPage - client.events.watch({ ...params }) -> EventWatchResponse @@ -532,7 +537,6 @@ Types: - CrowdStrikeConfig - CustomAgentEnvMapping - CustomSecurityAgent -- KernelControlsAction - OrganizationPolicies - SecurityAgentPolicy - VetoExecPolicy diff --git a/src/client.ts b/src/client.ts index ca351365..afe39b5c 100644 --- a/src/client.ts +++ b/src/client.ts @@ -272,12 +272,16 @@ import { StackFrame, } from './resources/errors'; import { + AuditLogEntryDetails, EventListParams, EventListResponse, EventListResponsesEntriesPage, + EventRetrieveParams, + EventRetrieveResponse, EventWatchParams, EventWatchResponse, Events, + Process, ResourceOperation, } from './resources/events'; import { GatewayListParams, Gateways } from './resources/gateways'; @@ -1737,10 +1741,14 @@ export declare namespace Gitpod { export { Events as Events, + type AuditLogEntryDetails as AuditLogEntryDetails, + type Process as Process, type ResourceOperation as ResourceOperation, + type EventRetrieveResponse as EventRetrieveResponse, type EventListResponse as EventListResponse, type EventWatchResponse as EventWatchResponse, type EventListResponsesEntriesPage as EventListResponsesEntriesPage, + type EventRetrieveParams as EventRetrieveParams, type EventListParams as EventListParams, type EventWatchParams as EventWatchParams, }; @@ -1995,6 +2003,7 @@ export declare namespace Gitpod { export type ErrorCode = API.ErrorCode; export type FieldValue = API.FieldValue; export type Gateway = API.Gateway; + export type KernelControlsAction = API.KernelControlsAction; export type OrganizationRole = API.OrganizationRole; export type OrganizationTier = API.OrganizationTier; export type Principal = API.Principal; diff --git a/src/resources/environments/environments.ts b/src/resources/environments/environments.ts index bcffc926..7e50b130 100644 --- a/src/resources/environments/environments.ts +++ b/src/resources/environments/environments.ts @@ -5,7 +5,6 @@ import * as EnvironmentsAPI from './environments'; import * as Shared from '../shared'; import * as ClassesAPI from './classes'; import { ClassListParams, Classes } from './classes'; -import * as PoliciesAPI from '../organizations/policies'; import * as ProjectsAPI from '../projects/projects'; import * as RunnersAPI from '../runners/runners'; import * as AutomationsAPI from './automations/automations'; @@ -1582,7 +1581,7 @@ export namespace Veto { /** * action specifies what action kernel-level controls take on policy violations */ - action?: PoliciesAPI.KernelControlsAction; + action?: Shared.KernelControlsAction; /** * denylist is the list of executable paths or names to block diff --git a/src/resources/events.ts b/src/resources/events.ts index 9a9bbb21..5589e9f1 100644 --- a/src/resources/events.ts +++ b/src/resources/events.ts @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; +import * as EventsAPI from './events'; import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; import { EntriesPage, type EntriesPageParams, PagePromise } from '../core/pagination'; @@ -9,6 +10,33 @@ import { RequestOptions } from '../internal/request-options'; import { JSONLDecoder } from '../internal/decoders/jsonl'; export class Events extends APIResource { + /** + * 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" + * ``` + * + * @example + * ```ts + * const event = await client.events.retrieve({ + * auditLogEntryId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + * }); + * ``` + */ + retrieve(body: EventRetrieveParams, options?: RequestOptions): APIPromise { + return this._client.post('/gitpod.v1.EventService/GetAuditLog', { body, ...options }); + } + /** * Lists audit logs with filtering and pagination options. * @@ -118,6 +146,102 @@ export class Events extends APIResource { export type EventListResponsesEntriesPage = EntriesPage; +/** + * AuditLogEntryDetails contains the typed evidence stored with an audit-log entry. + */ +export interface AuditLogEntryDetails { + /** + * veto_exec contains Veto Exec event details without process.cmdline. + */ + vetoExec: AuditLogEntryDetails.VetoExec; +} + +export namespace AuditLogEntryDetails { + /** + * veto_exec contains Veto Exec event details without process.cmdline. + */ + export interface VetoExec { + /** + * process contains metadata about the process that triggered the event. + */ + process: EventsAPI.Process; + + /** + * timestamp is when the event occurred in the environment. + */ + timestamp: string; + + /** + * action is the enforcement action taken (block or audit). + */ + action?: Shared.KernelControlsAction; + + /** + * environment_id is the environment where the event occurred. + */ + environmentId?: string; + + /** + * 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. + */ + executable?: string; + + /** + * 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. + */ + filename?: string; + } +} + +/** + * 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. + */ +export interface Process { + /** + * name is the process name (comm). 2x kernel TASK_COMM_LEN=16 + */ + name?: string; + + /** + * pgid is the process group ID. + */ + pgid?: number; + + /** + * pid is the userspace process ID (kernel thread group ID, tgid). + */ + pid?: number; + + /** + * ppid is the parent process ID. + */ + ppid?: number; + + /** + * sid is the session ID. + */ + sid?: number; + + /** + * started_at is when the process started. + */ + startedAt?: string; + + /** + * tid is the userspace thread ID (kernel pid). + */ + tid?: number; +} + export type ResourceOperation = | 'RESOURCE_OPERATION_UNSPECIFIED' | 'RESOURCE_OPERATION_CREATE' @@ -125,6 +249,139 @@ export type ResourceOperation = | 'RESOURCE_OPERATION_DELETE' | 'RESOURCE_OPERATION_UPDATE_STATUS'; +export interface EventRetrieveResponse { + /** + * entry contains the common audit-log fields also returned by ListAuditLogs. + */ + entry: EventRetrieveResponse.Entry; + + /** + * details contains typed evidence captured with the audit entry. It is absent when + * the entry has no supported, valid details. + */ + details?: AuditLogEntryDetails; +} + +export namespace EventRetrieveResponse { + /** + * entry contains the common audit-log fields also returned by ListAuditLogs. + */ + export interface Entry { + id?: string; + + action?: string; + + actorId?: string; + + actorPrincipal?: Shared.Principal; + + /** + * 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. + */ + createdAt?: string; + + /** + * AuditLogEntryKind identifies the semantic event represented by an audit-log + * entry. + */ + kind?: + | 'AUDIT_LOG_ENTRY_KIND_UNSPECIFIED' + | 'AUDIT_LOG_ENTRY_KIND_AGENT_SECURITY_EXEC_BLOCKED' + | 'AUDIT_LOG_ENTRY_KIND_AGENT_SECURITY_EXEC_AUDITED'; + + subjectId?: string; + + subjectType?: Shared.ResourceType; + } +} + export interface EventListResponse { id?: string; @@ -227,10 +484,13 @@ export interface EventListResponse { createdAt?: string; /** - * AuditLogEntryKind identifies the typed details associated with an audit-log - * entry. No concrete kinds are defined yet. + * AuditLogEntryKind identifies the semantic event represented by an audit-log + * entry. */ - kind?: 'AUDIT_LOG_ENTRY_KIND_UNSPECIFIED'; + kind?: + | 'AUDIT_LOG_ENTRY_KIND_UNSPECIFIED' + | 'AUDIT_LOG_ENTRY_KIND_AGENT_SECURITY_EXEC_BLOCKED' + | 'AUDIT_LOG_ENTRY_KIND_AGENT_SECURITY_EXEC_AUDITED'; subjectId?: string; @@ -245,6 +505,13 @@ export interface EventWatchResponse { resourceType?: Shared.ResourceType; } +export interface EventRetrieveParams { + /** + * audit_log_entry_id is the ID of the audit-log entry to retrieve. + */ + auditLogEntryId: string; +} + export interface EventListParams extends EntriesPageParams { /** * Body param @@ -354,10 +621,14 @@ export namespace EventWatchParams { export declare namespace Events { export { + type AuditLogEntryDetails as AuditLogEntryDetails, + type Process as Process, type ResourceOperation as ResourceOperation, + type EventRetrieveResponse as EventRetrieveResponse, type EventListResponse as EventListResponse, type EventWatchResponse as EventWatchResponse, type EventListResponsesEntriesPage as EventListResponsesEntriesPage, + type EventRetrieveParams as EventRetrieveParams, type EventListParams as EventListParams, type EventWatchParams as EventWatchParams, }; diff --git a/src/resources/index.ts b/src/resources/index.ts index 7bfb6a99..7bdc5aa7 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -206,9 +206,13 @@ export { } from './errors'; export { Events, + type AuditLogEntryDetails, + type Process, type ResourceOperation, + type EventRetrieveResponse, type EventListResponse, type EventWatchResponse, + type EventRetrieveParams, type EventListParams, type EventWatchParams, type EventListResponsesEntriesPage, diff --git a/src/resources/organizations/index.ts b/src/resources/organizations/index.ts index 896fe7b8..04d46137 100644 --- a/src/resources/organizations/index.ts +++ b/src/resources/organizations/index.ts @@ -76,7 +76,6 @@ export { type CrowdStrikeConfig, type CustomAgentEnvMapping, type CustomSecurityAgent, - type KernelControlsAction, type OrganizationPolicies, type SecurityAgentPolicy, type VetoExecPolicy, diff --git a/src/resources/organizations/organizations.ts b/src/resources/organizations/organizations.ts index 781fcdc5..17343971 100644 --- a/src/resources/organizations/organizations.ts +++ b/src/resources/organizations/organizations.ts @@ -60,7 +60,6 @@ import { CrowdStrikeConfig, CustomAgentEnvMapping, CustomSecurityAgent, - KernelControlsAction, OrganizationPolicies, Policies, PolicyRetrieveParams, @@ -1063,7 +1062,6 @@ export declare namespace Organizations { type CrowdStrikeConfig as CrowdStrikeConfig, type CustomAgentEnvMapping as CustomAgentEnvMapping, type CustomSecurityAgent as CustomSecurityAgent, - type KernelControlsAction as KernelControlsAction, type OrganizationPolicies as OrganizationPolicies, type SecurityAgentPolicy as SecurityAgentPolicy, type VetoExecPolicy as VetoExecPolicy, diff --git a/src/resources/organizations/policies.ts b/src/resources/organizations/policies.ts index dd9caf9b..2b4cacd6 100644 --- a/src/resources/organizations/policies.ts +++ b/src/resources/organizations/policies.ts @@ -279,14 +279,6 @@ export interface CustomSecurityAgent { startCommand?: string; } -/** - * KernelControlsAction defines how a kernel-level policy violation is handled. - */ -export type KernelControlsAction = - | 'KERNEL_CONTROLS_ACTION_UNSPECIFIED' - | 'KERNEL_CONTROLS_ACTION_BLOCK' - | 'KERNEL_CONTROLS_ACTION_AUDIT'; - export interface OrganizationPolicies { /** * agent_policy contains agent-specific policy settings @@ -467,7 +459,7 @@ export interface VetoExecPolicy { /** * action specifies what action kernel-level controls take on policy violations */ - action?: KernelControlsAction; + action?: Shared.KernelControlsAction; /** * enabled controls whether executable blocking is active @@ -784,7 +776,6 @@ export declare namespace Policies { type CrowdStrikeConfig as CrowdStrikeConfig, type CustomAgentEnvMapping as CustomAgentEnvMapping, type CustomSecurityAgent as CustomSecurityAgent, - type KernelControlsAction as KernelControlsAction, type OrganizationPolicies as OrganizationPolicies, type SecurityAgentPolicy as SecurityAgentPolicy, type VetoExecPolicy as VetoExecPolicy, diff --git a/src/resources/shared.ts b/src/resources/shared.ts index bb01bfed..90f27665 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -229,6 +229,14 @@ export interface Gateway { region?: string; } +/** + * KernelControlsAction defines how a kernel-level policy violation is handled. + */ +export type KernelControlsAction = + | 'KERNEL_CONTROLS_ACTION_UNSPECIFIED' + | 'KERNEL_CONTROLS_ACTION_BLOCK' + | 'KERNEL_CONTROLS_ACTION_AUDIT'; + export type OrganizationRole = | 'ORGANIZATION_ROLE_UNSPECIFIED' | 'ORGANIZATION_ROLE_ADMIN' diff --git a/tests/api-resources/events.test.ts b/tests/api-resources/events.test.ts index 7cfdf0e8..838655bb 100644 --- a/tests/api-resources/events.test.ts +++ b/tests/api-resources/events.test.ts @@ -8,6 +8,27 @@ const client = new Gitpod({ }); describe('resource events', () => { + // Mock server tests are disabled + test.skip('retrieve: only required params', async () => { + const responsePromise = client.events.retrieve({ + auditLogEntryId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('retrieve: required and optional params', async () => { + const response = await client.events.retrieve({ + auditLogEntryId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', + }); + }); + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.events.list({}); From a15e9bf01cb0780254621237084709b15e830742 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:10 +0000 Subject: [PATCH 203/217] 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 0d90d7d1b248a0ea37d1ff177df377df59e4eed9 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 204/217] 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 f2f1532b7246e897d6a2f12fab0fdffde335bb5f 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:18 +0000 Subject: [PATCH 205/217] 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 263bbddebb6681f4d11a7c0bd3ddac0bdfe4004e 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 206/217] 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 148e8c0be7db2e70e7b127f8c106ff6666096693 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:27 +0000 Subject: [PATCH 207/217] 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 a7def948b098bceb2b70baba34c5ae285359469e 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:19 +0000 Subject: [PATCH 208/217] feat(api): add dynamic LLM header contracts --- .stats.yml | 6 +++--- src/resources/runners/runners.ts | 3 ++- 2 files changed, 5 insertions(+), 4 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 diff --git a/src/resources/runners/runners.ts b/src/resources/runners/runners.ts index 932d8449..69f15e81 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -678,7 +678,8 @@ export type RunnerCapability = | 'RUNNER_CAPABILITY_HORIZONTAL_SCALING' | 'RUNNER_CAPABILITY_AGENT_EXECUTION_CNF' | 'RUNNER_CAPABILITY_REDIS_STREAM' - | 'RUNNER_CAPABILITY_BASE_SNAPSHOT'; + | 'RUNNER_CAPABILITY_BASE_SNAPSHOT' + | 'RUNNER_CAPABILITY_DYNAMIC_LLM_REQUEST_HEADERS'; export interface RunnerConfiguration { /** From 8cb85e9d61e6429a43ce79304d1837029b710cf5 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:40 +0000 Subject: [PATCH 209/217] 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 50441ce868c9bb5e394685065853b6f1dd878bed 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:38 +0000 Subject: [PATCH 210/217] 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 6ed27d71045b355e9448f9c34315559945bf5fa5 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:16 +0000 Subject: [PATCH 211/217] 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 77312e0c060b92e664f712605772b47103af457b 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:25 +0000 Subject: [PATCH 212/217] 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 26828866bfa4a0a50231e2212d7bc3767ba9a45d 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 213/217] 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 13532de2fac6af62633fe4d35ef778b6284ac413 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 214/217] feat(audit): curate audit events at their producers --- .stats.yml | 4 ++-- src/resources/events.ts | 18 ++++++++++++------ yarn.lock | 6 +++--- 3 files changed, 17 insertions(+), 11 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 diff --git a/src/resources/events.ts b/src/resources/events.ts index 5589e9f1..b1d33c66 100644 --- a/src/resources/events.ts +++ b/src/resources/events.ts @@ -368,13 +368,16 @@ export namespace EventRetrieveResponse { createdAt?: string; /** - * AuditLogEntryKind identifies the semantic event represented by an audit-log - * entry. + * AuditLogEntryKind identifies the coarse query and rendering family of an + * audit-log entry. */ kind?: | '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_AGENT_SECURITY_EXEC_AUDITED' + | 'AUDIT_LOG_ENTRY_KIND_RESOURCE_CHANGE' + | 'AUDIT_LOG_ENTRY_KIND_CREDENTIAL_ACCESS' + | 'AUDIT_LOG_ENTRY_KIND_ENVIRONMENT_VETO'; subjectId?: string; @@ -484,13 +487,16 @@ export interface EventListResponse { createdAt?: string; /** - * AuditLogEntryKind identifies the semantic event represented by an audit-log - * entry. + * AuditLogEntryKind identifies the coarse query and rendering family of an + * audit-log entry. */ kind?: | '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_AGENT_SECURITY_EXEC_AUDITED' + | 'AUDIT_LOG_ENTRY_KIND_RESOURCE_CHANGE' + | 'AUDIT_LOG_ENTRY_KIND_CREDENTIAL_ACCESS' + | 'AUDIT_LOG_ENTRY_KIND_ENVIRONMENT_VETO'; subjectId?: string; diff --git a/yarn.lock b/yarn.lock index 03caba0d..d890f91c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1276,9 +1276,9 @@ bcrypt-pbkdf@^1.0.0, bcrypt-pbkdf@^1.0.2: tweetnacl "^0.14.3" brace-expansion@^2.0.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.2.tgz#0bba2271feb7d458b0d31ad13625aaa4754431e2" - integrity sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA== + version "2.1.3" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.3.tgz#1bf69aacdf6a4380ca17c284d9f928d4aa6401bc" + integrity sha512-DRdx5neNsG/QXbniLFWi2YmC/68oeOOmKz6zOjVk6ZS1ZLXgLIKqVEc6hWsmkjBbgii0SwaBTcJ5XKj5gzY/4A== dependencies: balanced-match "^1.0.0" From 29a0347f333bbbf92207f4b00319f13eec216a5d 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:48 +0000 Subject: [PATCH 215/217] 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 94558de6ea076bba9115b589393ccade2dd2f496 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:15:44 +0000 Subject: [PATCH 216/217] fix(api)!: narrow public SDK surface --- .stats.yml | 8 +- api.md | 17 -- src/client.ts | 31 --- src/resources/errors.ts | 346 ----------------------------- src/resources/index.ts | 12 - src/resources/runners/runners.ts | 4 +- tests/api-resources/errors.test.ts | 22 -- yarn.lock | 6 +- 8 files changed, 9 insertions(+), 437 deletions(-) delete mode 100644 src/resources/errors.ts delete mode 100644 tests/api-resources/errors.test.ts 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 diff --git a/api.md b/api.md index 23cbb07e..ea1ba85e 100644 --- a/api.md +++ b/api.md @@ -321,23 +321,6 @@ Methods: - client.environments.classes.list({ ...params }) -> EnvironmentClassesEnvironmentClassesPage -# Errors - -Types: - -- Breadcrumb -- ErrorEvent -- ErrorLevel -- ExceptionInfo -- ExceptionMechanism -- RequestInfo -- StackFrame -- ErrorReportErrorsResponse - -Methods: - -- client.errors.reportErrors({ ...params }) -> unknown - # Events Types: diff --git a/src/client.ts b/src/client.ts index afe39b5c..b2ed03c4 100644 --- a/src/client.ts +++ b/src/client.ts @@ -259,18 +259,6 @@ import { Editors, EditorsEditorsPage, } from './resources/editors'; -import { - Breadcrumb, - ErrorEvent, - ErrorLevel, - ErrorReportErrorsParams, - ErrorReportErrorsResponse, - Errors as ErrorsAPIErrors, - ExceptionInfo, - ExceptionMechanism, - RequestInfo as ErrorRequestInfo, - StackFrame, -} from './resources/errors'; import { AuditLogEntryDetails, EventListParams, @@ -1294,11 +1282,6 @@ export class Gitpod { billing: API.Billing = new API.Billing(this); editors: API.Editors = new API.Editors(this); environments: API.Environments = new API.Environments(this); - /** - * ErrorsService provides endpoints for clients to report errors - * that will be sent to error reporting systems. - */ - errors: API.Errors = new API.Errors(this); events: API.Events = new API.Events(this); gateways: API.Gateways = new API.Gateways(this); groups: API.Groups = new API.Groups(this); @@ -1326,7 +1309,6 @@ Gitpod.Automations = Automations; Gitpod.Billing = Billing; Gitpod.Editors = Editors; Gitpod.Environments = Environments; -Gitpod.Errors = ErrorsAPIErrors; Gitpod.Events = Events; Gitpod.Gateways = Gateways; Gitpod.Groups = Groups; @@ -1726,19 +1708,6 @@ export declare namespace Gitpod { type EnvironmentUnarchiveParams as EnvironmentUnarchiveParams, }; - export { - ErrorsAPIErrors as Errors, - type Breadcrumb as Breadcrumb, - type ErrorEvent as ErrorEvent, - type ErrorLevel as ErrorLevel, - type ExceptionInfo as ExceptionInfo, - type ExceptionMechanism as ExceptionMechanism, - type ErrorRequestInfo as RequestInfo, - type StackFrame as StackFrame, - type ErrorReportErrorsResponse as ErrorReportErrorsResponse, - type ErrorReportErrorsParams as ErrorReportErrorsParams, - }; - export { Events as Events, type AuditLogEntryDetails as AuditLogEntryDetails, diff --git a/src/resources/errors.ts b/src/resources/errors.ts deleted file mode 100644 index 921bcfdd..00000000 --- a/src/resources/errors.ts +++ /dev/null @@ -1,346 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../core/resource'; -import { APIPromise } from '../core/api-promise'; -import { RequestOptions } from '../internal/request-options'; - -/** - * ErrorsService provides endpoints for clients to report errors - * that will be sent to error reporting systems. - */ -export class Errors extends APIResource { - /** - * 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. - */ - reportErrors(body: ErrorReportErrorsParams, options?: RequestOptions): APIPromise { - return this._client.post('/gitpod.v1.ErrorsService/ReportErrors', { body, ...options }); - } -} - -/** - * Breadcrumb information (Sentry-compatible) - */ -export interface Breadcrumb { - /** - * Breadcrumb category - */ - category?: string; - - /** - * Additional breadcrumb data - */ - data?: { [key: string]: string }; - - /** - * Breadcrumb level - */ - level?: ErrorLevel; - - /** - * Breadcrumb message - */ - message?: string; - - /** - * When the breadcrumb occurred - */ - timestamp?: string; - - /** - * Breadcrumb type (e.g., "navigation", "http", "user", "error") - */ - type?: string; -} - -/** - * ErrorEvent contains comprehensive error information (Sentry-compatible) - */ -export interface ErrorEvent { - /** - * Breadcrumbs leading up to the error - */ - breadcrumbs?: Array; - - /** - * Environment (e.g., "production", "staging", "development") - */ - environment?: string; - - /** - * Unique event identifier (required by Sentry) - */ - eventId?: string; - - /** - * Exception information (primary error data) - */ - exceptions?: Array; - - /** - * Additional arbitrary metadata - */ - extra?: { [key: string]: string }; - - /** - * Custom fingerprint for grouping - */ - fingerprint?: Array; - - /** - * Identity ID of the user (UUID) - */ - identityId?: string; - - /** - * Error severity level - */ - level?: ErrorLevel; - - /** - * Logger name - */ - logger?: string; - - /** - * Modules/dependencies information - */ - modules?: { [key: string]: string }; - - /** - * Platform identifier (required by Sentry) - */ - platform?: string; - - /** - * Release version - */ - release?: string; - - /** - * Request information - */ - request?: RequestInfo; - - /** - * SDK information - */ - sdk?: { [key: string]: string }; - - /** - * Server/host name - */ - serverName?: string; - - /** - * Tags for filtering and grouping - */ - tags?: { [key: string]: string }; - - /** - * When the event occurred (required by Sentry) - */ - timestamp?: string; - - /** - * Transaction name (e.g., route name, function name) - */ - transaction?: string; -} - -/** - * Error severity levels (aligned with Sentry levels) - */ -export type ErrorLevel = - | 'ERROR_LEVEL_UNSPECIFIED' - | 'ERROR_LEVEL_DEBUG' - | 'ERROR_LEVEL_INFO' - | 'ERROR_LEVEL_WARNING' - | 'ERROR_LEVEL_ERROR' - | 'ERROR_LEVEL_FATAL'; - -/** - * Exception information (Sentry-compatible) - */ -export interface ExceptionInfo { - /** - * Exception mechanism - */ - mechanism?: ExceptionMechanism; - - /** - * Module or package where the exception type is defined - */ - module?: string; - - /** - * Stack trace frames - */ - stacktrace?: Array; - - /** - * Thread ID if applicable - */ - threadId?: string; - - /** - * Exception type/class name - */ - type?: string; - - /** - * Exception message/value - */ - value?: string; -} - -/** - * Exception mechanism information (Sentry-compatible) - */ -export interface ExceptionMechanism { - /** - * Additional mechanism-specific data - */ - data?: { [key: string]: string }; - - /** - * Human-readable description of the mechanism - */ - description?: string; - - /** - * Whether the exception was handled by user code - */ - handled?: boolean; - - /** - * Whether this is a synthetic exception (created by SDK) - */ - synthetic?: boolean; - - /** - * Type of mechanism (e.g., "generic", "promise", "onerror") - */ - type?: string; -} - -/** - * Request information (Sentry-compatible) - */ -export interface RequestInfo { - /** - * Request body (truncated if large) - */ - data?: string; - - /** - * Request headers - */ - headers?: { [key: string]: string }; - - /** - * HTTP method - */ - method?: string; - - /** - * Query parameters - */ - queryString?: { [key: string]: string }; - - /** - * Request URL - */ - url?: string; -} - -/** - * Stack trace frame information (Sentry-compatible) - */ -export interface StackFrame { - /** - * Column number in the line - */ - colno?: number; - - contextLine?: string; - - /** - * File name or path - */ - filename?: string; - - /** - * Function name - */ - function?: string; - - /** - * Whether this frame is in application code (vs library/framework code) - */ - inApp?: boolean; - - /** - * Line number in the file - */ - lineno?: number; - - /** - * Module or package name - */ - module?: string; - - postContext?: Array; - - /** - * Source code context around the error line - */ - preContext?: Array; - - /** - * Additional frame-specific variables/locals - */ - vars?: { [key: string]: string }; -} - -/** - * ReportErrorsResponse confirms that the errors were successfully received Success - * is indicated by HTTP 200 status code, failures by other status codes Empty - * response - success indicated by HTTP status code - */ -export type ErrorReportErrorsResponse = unknown; - -export interface ErrorReportErrorsParams { - /** - * Error events to be reported (batch) - now using Sentry-compatible structure - */ - events?: Array; -} - -export declare namespace Errors { - export { - type Breadcrumb as Breadcrumb, - type ErrorEvent as ErrorEvent, - type ErrorLevel as ErrorLevel, - type ExceptionInfo as ExceptionInfo, - type ExceptionMechanism as ExceptionMechanism, - type RequestInfo as RequestInfo, - type StackFrame as StackFrame, - type ErrorReportErrorsResponse as ErrorReportErrorsResponse, - type ErrorReportErrorsParams as ErrorReportErrorsParams, - }; -} diff --git a/src/resources/index.ts b/src/resources/index.ts index 7bdc5aa7..0e327f07 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -192,18 +192,6 @@ export { type EnvironmentUnarchiveParams, type EnvironmentsEnvironmentsPage, } from './environments/environments'; -export { - Errors, - type Breadcrumb, - type ErrorEvent, - type ErrorLevel, - type ExceptionInfo, - type ExceptionMechanism, - type RequestInfo, - type StackFrame, - type ErrorReportErrorsResponse, - type ErrorReportErrorsParams, -} from './errors'; export { Events, type AuditLogEntryDetails, diff --git a/src/resources/runners/runners.ts b/src/resources/runners/runners.ts index 69f15e81..3302fb95 100644 --- a/src/resources/runners/runners.ts +++ b/src/resources/runners/runners.ts @@ -1174,8 +1174,8 @@ export namespace RunnerParseContextURLResponse { export interface RunnerSearchRepositoriesResponse { /** - * Deprecated: Use pagination token instead. Total pages can be extracted from - * token. + * @deprecated Deprecated: Use pagination token instead. Total pages can be + * extracted from token. */ lastPage?: number; diff --git a/tests/api-resources/errors.test.ts b/tests/api-resources/errors.test.ts deleted file mode 100644 index ee413092..00000000 --- a/tests/api-resources/errors.test.ts +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Gitpod from '@gitpod/sdk'; - -const client = new Gitpod({ - bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource errors', () => { - // Mock server tests are disabled - test.skip('reportErrors', async () => { - const responsePromise = client.errors.reportErrors({}); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); -}); diff --git a/yarn.lock b/yarn.lock index d890f91c..289b05f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1276,9 +1276,9 @@ bcrypt-pbkdf@^1.0.0, bcrypt-pbkdf@^1.0.2: tweetnacl "^0.14.3" brace-expansion@^2.0.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.3.tgz#1bf69aacdf6a4380ca17c284d9f928d4aa6401bc" - integrity sha512-DRdx5neNsG/QXbniLFWi2YmC/68oeOOmKz6zOjVk6ZS1ZLXgLIKqVEc6hWsmkjBbgii0SwaBTcJ5XKj5gzY/4A== + version "2.1.4" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.4.tgz#589dab11c0018d0366be64cd8bf12c8dbecc8326" + integrity sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg== dependencies: balanced-match "^1.0.0" From 7dbe904ec3c46093d92246a9b665c1ed203a352c 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:17:14 +0000 Subject: [PATCH 217/217] release: 0.15.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 104 ++++++++++++++++++++++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 107 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 727e2bea..f87262aa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.14.0" + ".": "0.15.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index c4a175c6..edb31043 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,109 @@ # Changelog +## 0.15.0 (2026-07-30) + +Full Changelog: [v0.14.0...v0.15.0](https://github.com/gitpod-io/gitpod-sdk-typescript/compare/v0.14.0...v0.15.0) + +### ⚠ BREAKING CHANGES + +* **api:** narrow public SDK surface +* **agent:** remove loop condition mechanism + +### Features + +* add base snapshot resource types ([d0a4934](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/d0a4934b242a2c2c386422ec199716c615aba496)) +* **agent:** add devcontainer rebuild wait schema ([066ffb9](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/066ffb92c77c42e6c5d0dc623067818e72da4308)) +* **agents:** add native goal set control ([2815518](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/281551871b8e3715aaa18530718e5201ccad5706)) +* **api:** add accessToken field to runners response types ([90fa2a8](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/90fa2a8c112f3717cd08c0cc25a64cfe0d880534)) +* **api:** add agent turn controls ([609765a](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/609765accf046ca934fc7532d55f7b2dff52abc0)) +* **api:** add agent_execution_cnf capability to runners ([e96ca1a](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/e96ca1a49605a2ddfccd4288862f5721d1d91ceb)) +* **api:** add agentExecutionIds filter to agents list executions ([ffdedcb](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/ffdedcbcbb2d505e195f18ea1f9c3e26fb654cc8)) +* **api:** add allowUnverifiedEmailScimFallbackMatch to scim_configurations ([0c94086](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/0c940860f8be53265078463c9ef17a3a2d70b234)) +* **api:** add base snapshot build environment role ([af79956](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/af7995656b6e9a9757dfe2e026f8938b8f4478bf)) +* **api:** add base snapshot runner capability ([6ac2747](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/6ac2747beb4c1631370bd9636244f45aca6544ec)) +* **api:** add Claude Sonnet 5 model enum ([d6b48d0](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/d6b48d0e0008b69338e9c706bcfe5f1f62d0ed91)) +* **api:** add Codex agent settings shape ([dd159ea](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/dd159ea0bf200eee8b14194ddd68ebde631a1461)) +* **api:** add Codex fast mode setting ([c994c17](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/c994c1712b19d34287dc691426e22d1d76da47f4)) +* **api:** add codex model policy states ([34dcdba](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/34dcdba3dcc47d30366d0ac578d904d80df0cc96)) +* **api:** add Codex policy allowlists ([5024cc9](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/5024cc955226c2b8fc01f6e7c2e13037a54c509a)) +* **api:** add credential_proxy to secrets, remove format from environments ([1e6190f](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/1e6190f898a3bfd82c6431734bea4adad3c1ae37)) +* **api:** add default environment class IDs to project creation defaults ([b13d13c](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/b13d13c8779c7ecc6feff816a6d3e7518c5f1c48)) +* **api:** add disableFromScratch field to organization policies ([e46e4a6](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/e46e4a69e1dfb9ae210187ac062906700b4cf42d)) +* **api:** add dynamic LLM header contracts ([a7def94](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/a7def948b098bceb2b70baba34c5ae285359469e)) +* **api:** add goal field to agent execution status ([af7aefc](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/af7aefc796d2bebbcac50136ea1cafd9c21a85c5)) +* **api:** add incident trigger to WorkflowTrigger and WorkflowExecution ([eb856ef](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/eb856efd3fbac51d1c8556faef976e9a6f8dd09b)) +* **api:** add integration_id, update webhook_id in WorkflowTrigger ([e1591e6](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/e1591e617c7e29729f6ada19f03fa53a4161a1c3)) +* **api:** add maxPortAdmissionLevel to organization policies ([9fc32dc](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/9fc32dcfbf9aab465f71b2d84227318826e589ee)) +* **api:** add oldPath field to EnvironmentStatus file changes ([e179ba6](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/e179ba6bb9bc0ca5a37262a15235e5f9185a98f6)) +* **api:** add OPENAI_AUTO model option to agents ([ae690a1](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/ae690a1a744c174030a9679206f02372fd06af90)) +* **api:** add opus 4.7 model support to agent execution ([27772ea](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/27772ea9c32c3336e654df4675500ec83ab01f6a)) +* **api:** add Opus 4.8 supported model ([d790282](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/d79028234621972d25619575f3b6f776a532c2c1)) +* **api:** add pagination and search to runners listScmOrganizations method ([6a6e0a8](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/6a6e0a84e2a9daf23db95877e0b0c015fb51a9c4)) +* **api:** add port_authentication capability to RunnerCapability ([c8eb1d6](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/c8eb1d63e97c6570e5156f90c58e29141ed1e68c)) +* **api:** add prebuild trigger value to automations ([452d5e0](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/452d5e08209708511f3505402a1b9bd883f59721)) +* **api:** add prebuild_requires_success field to TaskSpec ([e7c0df3](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/e7c0df38a2ae7e22676dd674cb1ecb0d133c185c)) +* **api:** add project_creation_defaults field to organization policies ([7d70a05](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/7d70a050bf8bd1a320c67df55d4c0816a71fbe8d)) +* **api:** add PULL_REQUEST_EVENT_REVIEW_REQUESTED event type to WorkflowTrigger ([a7fe947](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/a7fe947b77f988afdc6e93d77e7629991b6709f3)) +* **api:** add readinessTimeout to automations and services ([3e90e74](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/3e90e745e1a3929292bef99678be2b6e18363b4b)) +* **api:** add REDIS_STREAM to RunnerCapability enum in runners ([8d9be56](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/8d9be566a38463088be5e43ead0e5c6b566efec0)) +* **api:** add RESOURCE_ROLE_ORG_ENVIRONMENTS_READER to ResourceRole ([9f9f219](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/9f9f21920fe179fcce2d9166f777449d011f1b74)) +* **api:** add security policy CRUD ([494ff81](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/494ff81d98636b3d2760c4cefd2d55084faaa834)) +* **api:** add UserInputMetadata type to agents ([6c834b9](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/6c834b99652dd3da17781e08d5449480cd835fcd)) +* **api:** add webBrowserDisabled field to organizations policies ([1a8ae44](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/1a8ae4474aa07bc54f258733c768068dbdb022de)) +* **api:** expose audit log entry kind ([b0d348a](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/b0d348a92d8222855a630d1a7648cc625e734548)) +* **api:** expose default security policy assignment ([438a4fe](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/438a4fe4996d8e4fd7c90dc38df7d0ed7055ca9b)) +* **api:** expose usage insights API ([fa80ce9](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/fa80ce9e9ffc891932e0dbc2fd47f02bfeb0bdf8)) +* **api:** expose Veto Exec security policies ([0044e8a](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/0044e8ab1c6029e7fab6e7b967fa7523dd0a2e70)) +* **api:** remove terminal field from RunsOn ([85d6ef2](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/85d6ef2d704eb140512d7edf3c1e6495f1da12d5)) +* **audit:** curate audit events at their producers ([13532de](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/13532de2fac6af62633fe4d35ef778b6284ac413)) +* **audit:** store and retrieve Veto Exec details ([0120ae7](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/0120ae7829b82b840fbbe5ba8d763fa3570ef7e9)) +* **automations:** pin agent and Codex model per automation ([83d82a3](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/83d82a37eaae42c2e2298d58187ba492dec8070e)) +* **billing:** add Enterprise AI user budget APIs ([66e7496](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/66e749662e88bd5c3e3899bc07421e17a029e584)) +* **codex:** add GPT-5.6 model selection ([3138ce8](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/3138ce83141c309bedfbaa7a86a114d870002267)) +* **rbac:** add billing viewer role ([9370c07](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/9370c0774f8b3717d0524e97ef82da56ab236664)) +* **rbac:** add insights viewer role ([a1eb0d9](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/a1eb0d9242f7ad81dd7613395286bbbbf4868209)) +* **secrets:** support JFrog OIDC secret sources ([2cbf05b](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/2cbf05b577b3d73bc5122582255561c032928392)) +* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([4bbecf5](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/4bbecf52a1cbcbc8b354d060cf856416f9fdc2e6)) +* support setting headers via env ([bed4904](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/bed49045e5f23a7f683a8b8603cf1b50a2f7a433)) +* **types:** add Report and related schema types to automations ([f9c394a](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/f9c394ab4ed90dcea009c21471bbeeec3871bdd6)) + + +### Bug Fixes + +* **api:** narrow public SDK surface ([94558de](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/94558de6ea076bba9115b589393ccade2dd2f496)) +* **api:** wrap prebuild default updates ([5eed720](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/5eed7206580b4c1900a7728372f32a5dcafcd2b8)) +* **ci:** bump @arethetypeswrong/cli to ^0.18.0 and run CI workflows on Node 24 ([1396c15](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/1396c15bd264e9eee7152ea2e9217557cb78d8fe)) +* **client:** send content-type header for requests with an omitted optional body ([14526e5](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/14526e53fb6c4b755634c4ed5ab598195f844872)) +* **typescript:** upgrade tsc-multi so that it works with Node 26 ([44ea48e](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/44ea48e8129ec5e7af0a643d35378e1b8536c8f4)) + + +### Chores + +* **format:** run eslint and prettier separately ([0782de2](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/0782de2e4cc157507a34c43a5db1a8f1700db98c)) +* **formatter:** run prettier and eslint separately ([e354bf8](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/e354bf849b97e421b9694b55a1d7b0f41e7ba4fe)) +* **internal:** codegen related update ([f0055f7](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/f0055f7c6bb9420bc0ae3c6267651393832213f3)) +* **internal:** codegen related update ([afd15ee](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/afd15eebed86ae40238ac2e8a34c448e48097aed)) +* **internal:** codegen related update ([cfd1e9a](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/cfd1e9a15f844e398d089cfc9189b604628b9c33)) +* **internal:** more robust bootstrap script ([306e1fa](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/306e1fa51525f0ba764898ed4ee57a4ccb002d8c)) +* **internal:** regenerate SDK with no functional changes ([c67a192](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/c67a192f31447d27e1a5b077ea123cf9f18b402f)) +* redact api-key headers in debug logs ([2598350](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/2598350538c8203fdb338f4fa41b1e81addd485b)) +* **tests:** remove redundant File import ([253359f](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/253359feedb1230ed9c7c34cb98e393473220f0c)) +* **types:** remove deprecated accessToken from runners response types ([c521a3e](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/c521a3efa0f39ccea79c239fa8ffe208c901309a)) + + +### Documentation + +* **api:** add customer-facing descriptions to runner enums and fix CreateRunner examples ([9d1ff23](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/9d1ff23c474adb238e5b9dac965cd6dfaf136c29)) +* **types:** clarify trigger restrictions in AutomationTrigger ([fadafca](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/fadafca48ec3301694befe6e3d71f14321642500)) +* **types:** deprecate isAdmin in runners organization response ([7aa6263](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/7aa6263936e7a45c43801dc818e384d43e1249c5)) + + +### Refactors + +* **agent:** remove loop condition mechanism ([a22d444](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/a22d444d5f1c13d2ac6243aa740729415094b7ad)) +* **api:** default StartAgent agent ID ([7155c62](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/7155c62889ece19a8f3367f8d5cc1b3ee0394536)) +* **api:** remove project defaults API surface ([2a335c3](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/2a335c36b73fc0449e0403333130d63a5c3776a2)) + ## 0.14.0 (2026-04-02) Full Changelog: [v0.13.0...v0.14.0](https://github.com/gitpod-io/gitpod-sdk-typescript/compare/v0.13.0...v0.14.0) diff --git a/package.json b/package.json index f6b61c8f..c2306d69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gitpod/sdk", - "version": "0.14.0", + "version": "0.15.0", "description": "The official TypeScript library for the Gitpod API", "author": "Gitpod ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index e2b0672c..b67001ee 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.14.0'; // x-release-please-version +export const VERSION = '0.15.0'; // x-release-please-version