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 01/90] 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 82c3873..e93723a 100644 --- a/.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 9646efd..7e54e6c 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 0da8a86..a78bcf2 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 02/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e93723a..ab88598 100644 --- a/.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 03/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ab88598..f39bf49 100644 --- a/.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 04/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index f39bf49..d93c13e 100644 --- a/.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 05/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d93c13e..5284245 100644 --- a/.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 06/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5284245..a75e53d 100644 --- a/.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 07/90] 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 2d84800..cc5fa0f 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 08/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a75e53d..0e153d5 100644 --- a/.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 09/90] 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 0e153d5..4533569 100644 --- a/.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 efb056c..3a5a9df 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 10/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4533569..4764b18 100644 --- a/.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 11/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4764b18..14a1d63 100644 --- a/.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 12/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 14a1d63..e293ff0 100644 --- a/.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 13/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e293ff0..7ff68c5 100644 --- a/.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 14/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7ff68c5..bb79b8b 100644 --- a/.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 15/90] 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 bb79b8b..d879ff2 100644 --- a/.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 eb9d721..73681ee 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 16/90] 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 d879ff2..f0b85f4 100644 --- a/.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 3a5a9df..c4b17c2 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 17/90] chore(internal): codegen related update --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9d56243..7c98e7a 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 18/90] 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 f0b85f4..71f636c 100644 --- a/.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 8860894..23bb791 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 19/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 71f636c..c99a655 100644 --- a/.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 20/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c99a655..9cc0d2e 100644 --- a/.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 21/90] 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 9cc0d2e..96f9664 100644 --- a/.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 7e54e6c..a30dfda 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 a78bcf2..c91fbf5 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 22/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 96f9664..4ed0bd1 100644 --- a/.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 23/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4ed0bd1..3043de4 100644 --- a/.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 24/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3043de4..1d52292 100644 --- a/.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 25/90] 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 1d52292..2b98967 100644 --- a/.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 b362321..e4cc912 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 26/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2b98967..8ba6610 100644 --- a/.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 27/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8ba6610..3684387 100644 --- a/.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 28/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3684387..d839543 100644 --- a/.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 29/90] 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 d839543..983ecb0 100644 --- a/.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 a30dfda..a17290d 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 30/90] 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 983ecb0..b0ef81a 100644 --- a/.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 27755f1..22d5381 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 31/90] 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 b0ef81a..340b672 100644 --- a/.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 96536d5..8a8fd84 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 ad0dd92..fbeac4f 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 22d5381..26c0623 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 17be502..d554033 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 32/90] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 340b672..41e2159 100644 --- a/.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 33/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 41e2159..c44ca44 100644 --- a/.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 34/90] 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 c44ca44..f1758b6 100644 --- a/.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 26c0623..ab11328 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 35/90] 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 3417182..7db27b1 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 36/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f1758b6..e9f120d 100644 --- a/.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 37/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e9f120d..c6cf393 100644 --- a/.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 38/90] 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 c6cf393..4922351 100644 --- a/.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 e4cc912..cae1026 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 39/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4922351..bc7328f 100644 --- a/.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 40/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bc7328f..8aefc1e 100644 --- a/.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 41/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8aefc1e..b207c5a 100644 --- a/.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 42/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index b207c5a..fde64ca 100644 --- a/.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 43/90] 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 fde64ca..f88f298 100644 --- a/.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 8a8fd84..cd39152 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 fbeac4f..f15b0fa 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 d3e0bc6..c01757c 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 d554033..8658b6f 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 fb79083..b11c33e 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 cae1026..9887aec 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 44/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f88f298..31cb8c2 100644 --- a/.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 45/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 31cb8c2..2a5eaf4 100644 --- a/.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 46/90] 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 a73ce38..0fd7216 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 7364c37..2b4ce03 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 53721ac..e172313 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 7a75640..b1b2c17 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 3ffb78a..1f53254 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 8c775ee..4e70128 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 f15b0fa..9fda7c5 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 639a545..897d0f5 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 1b22334..e40b86e 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 c01757c..455889e 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 fc55f46..d0832d3 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 0eaf4c8..a0328c4 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 c23d3bd..6059d5d 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 e82d95c..394ede8 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 82c7b14..c14a742 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 c724a9d..fa2ea2b 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 2aabf9a..a8558b2 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 8ddf7b0..accbf57 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 284d15c..b2b6c73 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 30eada3..c72a2b4 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 b668dfc..c45fee3 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 ce9d052..723123e 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 b0e53aa..53708ba 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 90bf015..e1e5d09 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 363e351..57a27a9 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 14c69d4..8ee163d 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 ab11328..47142b7 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 a17290d..47a94ad 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 61ad898..5b4647e 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 23bb791..a9dcef4 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 ae3513f..17c94aa 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 b10dd0c..45632e8 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 1f2483b..d0e60c1 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 1c21f28..8012849 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 16d9bf7..315cd2e 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 77b5f68..a31a04e 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 73681ee..1aca599 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 b608089..c5859e8 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 921bcfd..da02273 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 70e2d30..66f75d2 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 4edba87..60fe431 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 de059d7..5b3d50a 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 19d31d8..634e5c5 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 b6ab33f..5415b15 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 1c8b950..6b96a10 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 03ddd62..59c3e8b 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 efe362a..224eea7 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 8658b6f..cc46f6d 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 ab0ee6a..64bb0c8 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 2e5f32d..d19ea2d 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 e5044cb..1330328 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 29e04f7..92b1ce9 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 ad18317..f6dbc10 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 3cdc46f..dbd9288 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 604b29e..c3b9260 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 33dc2f8..62c2da3 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 08d2020..15eac79 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 27212da..d5b1219 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 728168b..976a3d9 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 e26d15e..275a0b5 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 3676967..3fef747 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 e0c90c5..9845f84 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 4db5ee0..dae35e8 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 2de936a..4983bb8 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 3d4715f..3524251 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 4a0a213..64e31d2 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 fd110fe..71e15e6 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 28daf0a..eebb9d4 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 b11c33e..72c36ea 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 a49bcf5..8bfc6a0 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 9887aec..9b64488 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 8601222..460b2a1 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 c4b17c2..32d9246 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 0782706..cb77ed4 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 f3539f3..44fb470 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 be4f278..e675230 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 38c83f3..9f488ea 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 f9f4b88..d2ead46 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 b2ef647..d543708 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 e2b0672..ec0d2a7 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 c632b8a..f2017a5 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 59366e2..a6fe2ca 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 c91fbf5..e569f6a 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 7ab4511..d36f7ff 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 18e6c4c..e1f526b 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 90acd20..310bff5 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 198d06d..14c3883 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 467bfed..d993ab7 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 0d97bd4..9c90fc1 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 f2cec22..bb731cb 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 ee41309..6786d24 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 7cfdf0e..6c87975 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 4186e20..8daaf21 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 3798086..bfbe844 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 e9d8ad1..8e9bd2a 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 6b07ee9..34bccb6 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 f86d3d6..1c5d7dc 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 961c99f..25aa139 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 754c8e0..2bdbef3 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 9dc81ff..1f3ecbe 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 c204dd6..1c85923 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 5b82ca9..a84ac21 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 89665f2..21f88fc 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 7fd9de1..34203f9 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 bf12115..de8c02f 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 e630484..34d6b6c 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 9308e71..ffbfeb5 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 bd24865..76b0982 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 7a394d6..41c45bc 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 7de717d..5c11639 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 5c85a81..9a9e4ec 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 14262ac..d00909d 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 5f9d135..110d607 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 006eb61..316cb44 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 9aa2259..78ecf6a 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 8a1fcd5..95fac40 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 8fae36b..d23126e 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 1d657a9..833f0aa 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 5fc407b..77f85ca 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 55f4ed5..c2e381f 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 2c4b2bb..c3790ac 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 4d1f2e3..3ebdb69 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 6acc8cc..b0a4eab 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 e60a5e4..c33786c 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 7c98e7a..a55ecda 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 47/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2a5eaf4..957e8bd 100644 --- a/.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 48/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 957e8bd..9733976 100644 --- a/.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 49/90] 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 9733976..ef9a213 100644 --- a/.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 a9dcef4..3add869 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 45632e8..31bf1f9 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 50/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ef9a213..d4935d1 100644 --- a/.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 51/90] 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 0fd7216..a73ce38 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 2b4ce03..7364c37 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 e172313..53721ac 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 b1b2c17..7a75640 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 1f53254..3ffb78a 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 deae575..a8cdeb7 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 4e70128..8c775ee 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 9fda7c5..3b70c39 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 897d0f5..639a545 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 e40b86e..1b22334 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 455889e..c01757c 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 d0832d3..fc55f46 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 a0328c4..0eaf4c8 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 6059d5d..c23d3bd 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 394ede8..e82d95c 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 c14a742..82c7b14 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 fa2ea2b..c724a9d 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 a8558b2..2aabf9a 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 accbf57..8ddf7b0 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 b2b6c73..284d15c 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 c72a2b4..30eada3 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 c45fee3..b668dfc 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 723123e..ce9d052 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 53708ba..b0e53aa 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 e1e5d09..90bf015 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 57a27a9..363e351 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 8ee163d..14c69d4 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 47142b7..ab11328 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 47a94ad..a17290d 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 5b4647e..61ad898 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 3add869..92a13c4 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 17c94aa..ae3513f 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 31bf1f9..375334c 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 d0e60c1..1f2483b 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 8012849..1c21f28 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 315cd2e..16d9bf7 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 a31a04e..77b5f68 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 1aca599..73681ee 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 c5859e8..b608089 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 da02273..921bcfd 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 66f75d2..70e2d30 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 60fe431..4edba87 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 5b3d50a..de059d7 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 634e5c5..19d31d8 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 5415b15..b6ab33f 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 6b96a10..1c8b950 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 59c3e8b..03ddd62 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 224eea7..efe362a 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 cc46f6d..8658b6f 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 64bb0c8..ab0ee6a 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 d19ea2d..2e5f32d 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 1330328..e5044cb 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 92b1ce9..29e04f7 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 f6dbc10..ad18317 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 dbd9288..3cdc46f 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 c3b9260..604b29e 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 62c2da3..33dc2f8 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 15eac79..08d2020 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 d5b1219..27212da 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 976a3d9..728168b 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 275a0b5..e26d15e 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 3fef747..3676967 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 9845f84..e0c90c5 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 dae35e8..4db5ee0 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 4983bb8..2de936a 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 3524251..3d4715f 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 64e31d2..4a0a213 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 71e15e6..fd110fe 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 eebb9d4..28daf0a 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 72c36ea..b11c33e 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 8bfc6a0..a49bcf5 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 9b64488..9887aec 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 460b2a1..8601222 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 32d9246..c4b17c2 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 cb77ed4..0782706 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 44fb470..f3539f3 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 e675230..be4f278 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 9f488ea..38c83f3 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 d2ead46..f9f4b88 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 d543708..b2ef647 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 ec0d2a7..e2b0672 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 f2017a5..c632b8a 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 a6fe2ca..59366e2 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 e569f6a..c91fbf5 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 d36f7ff..7ab4511 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 e1f526b..18e6c4c 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 310bff5..90acd20 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 14c3883..198d06d 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 d993ab7..467bfed 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 9c90fc1..0d97bd4 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 bb731cb..f2cec22 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 6786d24..ee41309 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 6c87975..7cfdf0e 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 8daaf21..4186e20 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 bfbe844..3798086 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 8e9bd2a..e9d8ad1 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 34bccb6..6b07ee9 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 1c5d7dc..f86d3d6 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 25aa139..961c99f 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 2bdbef3..754c8e0 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 1f3ecbe..9dc81ff 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 1c85923..c204dd6 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 a84ac21..5b82ca9 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 21f88fc..89665f2 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 34203f9..7fd9de1 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 de8c02f..bf12115 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 34d6b6c..e630484 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 ffbfeb5..9308e71 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 76b0982..bd24865 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 41c45bc..7a394d6 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 5c11639..7de717d 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 9a9e4ec..5c85a81 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 d00909d..14262ac 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 110d607..5f9d135 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 316cb44..006eb61 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 78ecf6a..9aa2259 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 95fac40..8a1fcd5 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 d23126e..8fae36b 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 833f0aa..1d657a9 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 77f85ca..5fc407b 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 c2e381f..55f4ed5 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 c3790ac..2c4b2bb 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 3ebdb69..4d1f2e3 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 b0a4eab..6acc8cc 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 c33786c..e60a5e4 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 a55ecda..7c98e7a 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 52/90] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d4935d1..a50613a 100644 --- a/.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 53/90] 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 3b70c39..18e1e19 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 54/90] 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 a50613a..50f4f10 100644 --- a/.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 604b29e..c1e9b52 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 7fd9de1..adbb903 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 55/90] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 50f4f10..ccd7f9e 100644 --- a/.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 56/90] 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 a73ce38..0fd7216 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 7364c37..2b4ce03 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 53721ac..f1873ae 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 7a75640..b1b2c17 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 3ffb78a..1f53254 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 b668dfc..a050513 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 7c98e7a..a55ecda 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 57/90] 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 ccd7f9e..b5bc25e 100644 --- a/.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 c4b17c2..b097a93 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 58/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b5bc25e..1e9cf56 100644 --- a/.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 59/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1e9cf56..57b7fd5 100644 --- a/.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 60/90] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 57b7fd5..ad88f2f 100644 --- a/.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 61/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index ad88f2f..63252a1 100644 --- a/.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 62/90] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 63252a1..050a108 100644 --- a/.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 63/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 050a108..2a356b3 100644 --- a/.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 64/90] 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 2a356b3..e1b4c81 100644 --- a/.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 9887aec..8630549 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 65/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e1b4c81..1e2e971 100644 --- a/.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 66/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1e2e971..e95a802 100644 --- a/.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 67/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e95a802..3f8356d 100644 --- a/.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 68/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3f8356d..e05cc61 100644 --- a/.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 69/90] 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 e05cc61..8815384 100644 --- a/.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 a17290d..7e3abe3 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 70/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8815384..9d1708a 100644 --- a/.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 71/90] 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 9d1708a..3aa3af9 100644 --- a/.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 8630549..9887aec 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 72/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3aa3af9..7831331 100644 --- a/.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 73/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7831331..cff0229 100644 --- a/.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 74/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cff0229..77d3144 100644 --- a/.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 75/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 77d3144..2bb8cde 100644 --- a/.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 76/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2bb8cde..491e273 100644 --- a/.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 77/90] 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 491e273..596b02e 100644 --- a/.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 9887aec..f8ceec7 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 78/90] 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 ce9d052..21ff220 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 79/90] 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 596b02e..e8a97e5 100644 --- a/.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 73681ee..4ade7ed 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 8601222..7cbad51 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 80/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e8a97e5..1762e46 100644 --- a/.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 81/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1762e46..399384b 100644 --- a/.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 82/90] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 399384b..5672489 100644 --- a/.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 83/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5672489..8b8112a 100644 --- a/.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 84/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8b8112a..27beeef 100644 --- a/.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 85/90] 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 27beeef..3c14460 100644 --- a/.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 33dc2f8..4c2e277 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 bf12115..0da9bb8 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 86/90] 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 3c14460..2b0e31c 100644 --- a/.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 f8ceec7..6f1aeea 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 87/90] 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 2b0e31c..9aad6c5 100644 --- a/.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 cd39152..31ecf24 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 29e04f7..bd455f8 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 3cdc46f..ac7560a 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 c1e9b52..69f93c6 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 adbb903..c9afd3c 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 88/90] 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 9aad6c5..6550d7c 100644 --- a/.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 ab11328..899fa4a 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 89/90] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6550d7c..c248682 100644 --- a/.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 682d6c74f95859bbfa8d99cb817d0ce7e7d5467c 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:58:06 +0000 Subject: [PATCH 90/90] release: 0.15.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 48 +++++++++++++++++++++++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 727e2be..f87262a 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 c4a175c..9e5278d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,53 @@ # Changelog +## 0.15.0 (2026-05-12) + +Full Changelog: [v0.14.0...v0.15.0](https://github.com/gitpod-io/gitpod-sdk-typescript/compare/v0.14.0...v0.15.0) + +### Features + +* **api:** add accessToken field to runners response types ([90fa2a8](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/90fa2a8c112f3717cd08c0cc25a64cfe0d880534)) +* **api:** add agent_execution_cnf capability to runners ([e96ca1a](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/e96ca1a49605a2ddfccd4288862f5721d1d91ceb)) +* **api:** add allowUnverifiedEmailScimFallbackMatch to scim_configurations ([0c94086](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/0c940860f8be53265078463c9ef17a3a2d70b234)) +* **api:** add credential_proxy to secrets, remove format from environments ([1e6190f](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/1e6190f898a3bfd82c6431734bea4adad3c1ae37)) +* **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 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 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 RESOURCE_ROLE_ORG_ENVIRONMENTS_READER to ResourceRole ([9f9f219](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/9f9f21920fe179fcce2d9166f777449d011f1b74)) +* **api:** add UserInputMetadata type to agents ([6c834b9](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/6c834b99652dd3da17781e08d5449480cd835fcd)) +* **api:** remove terminal field from RunsOn ([85d6ef2](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/85d6ef2d704eb140512d7edf3c1e6495f1da12d5)) +* 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)) + + +### 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)) +* **types:** remove deprecated accessToken from runners response types ([c521a3e](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/c521a3efa0f39ccea79c239fa8ffe208c901309a)) + + +### Documentation + +* **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)) + ## 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 2b4ce03..34b4be8 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 e2b0672..b67001e 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