Skip to content

feat(api): manual updates #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0c37e687e2a070abfe49501156af6d906ff166b6eaad779ee6c2b568515f2b7e.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-f6598ab5d6827f66b642201769e92590ea32af84ebbf24b18cc32b33dee5107e.yml
98 changes: 92 additions & 6 deletions src/resources/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,81 @@ import { RequestOptions } from '../internal/request-options';

export class Accounts extends APIResource {
/**
* GetAccount retrieves a single Account.
* Gets information about the currently authenticated account.
*
* Use this method to:
*
* - Retrieve account profile information
* - Check organization memberships
* - View account settings
* - Get joinable organizations
*
* ### Examples
*
* - Get account details:
*
* Retrieves information about the authenticated account.
*
* ```yaml
* {}
* ```
*/
retrieve(body: AccountRetrieveParams, options?: RequestOptions): APIPromise<AccountRetrieveResponse> {
return this._client.post('/gitpod.v1.AccountService/GetAccount', { body, ...options });
}

/**
* DeleteAccount deletes an Account. To Delete an Account, the Account must not be
* an active member of any Organization.
* Deletes an account permanently.
*
* Use this method to:
*
* - Remove unused accounts
* - Clean up test accounts
* - Complete account deletion requests
*
* The account must not be an active member of any organization.
*
* ### Examples
*
* - Delete account:
*
* Permanently removes an account.
*
* ```yaml
* accountId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
* ```
*/
delete(body: AccountDeleteParams, options?: RequestOptions): APIPromise<unknown> {
return this._client.post('/gitpod.v1.AccountService/DeleteAccount', { body, ...options });
}

/**
* GetSSOLoginURL returns the URL to redirect the user to for SSO login.
* Gets the SSO login URL for a specific email domain.
*
* Use this method to:
*
* - Initiate SSO authentication
* - Get organization-specific login URLs
* - Handle SSO redirects
*
* ### Examples
*
* - Get login URL:
*
* Retrieves SSO URL for email domain.
*
* ```yaml
* email: "[email protected]"
* ```
*
* - Get URL with return path:
*
* Gets SSO URL with specific return location.
*
* ```yaml
* email: "[email protected]"
* returnTo: "https://gitpod.io/workspaces"
* ```
*/
getSSOLoginURL(
body: AccountGetSSOLoginURLParams,
Expand All @@ -33,8 +92,35 @@ export class Accounts extends APIResource {
}

/**
* ListLoginProviders returns the list of login providers matching the provided
* filters.
* Lists available login providers with optional filtering.
*
* Use this method to:
*
* - View supported authentication methods
* - Get provider-specific login URLs
* - Filter providers by invite
*
* ### Examples
*
* - List all providers:
*
* Shows all available login providers.
*
* ```yaml
* pagination:
* pageSize: 20
* ```
*
* - List for specific invite:
*
* Shows providers available for an invite.
*
* ```yaml
* filter:
* inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
* pagination:
* pageSize: 20
* ```
*/
listLoginProviders(
params: AccountListLoginProvidersParams,
Expand Down
58 changes: 55 additions & 3 deletions src/resources/editors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,47 @@ import { RequestOptions } from '../internal/request-options';

export class Editors extends APIResource {
/**
* GetEditor returns the editor with the given ID
* Gets details about a specific editor.
*
* Use this method to:
*
* - View editor information
* - Get editor configuration
*
* ### Examples
*
* - Get editor details:
*
* Retrieves information about a specific editor.
*
* ```yaml
* id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
* ```
*/
retrieve(body: EditorRetrieveParams, options?: RequestOptions): APIPromise<EditorRetrieveResponse> {
return this._client.post('/gitpod.v1.EditorService/GetEditor', { body, ...options });
}

/**
* ListEditors lists all editors available to the caller
* Lists all available code editors.
*
* Use this method to:
*
* - View supported editors
* - Get editor capabilities
* - Browse editor options
* - Check editor availability
*
* ### Examples
*
* - List editors:
*
* Shows all available editors with pagination.
*
* ```yaml
* pagination:
* pageSize: 20
* ```
*/
list(params: EditorListParams, options?: RequestOptions): PagePromise<EditorsEditorsPage, Editor> {
const { token, pageSize, ...body } = params;
Expand All @@ -27,7 +60,26 @@ export class Editors extends APIResource {
}

/**
* ResolveEditorURL resolves the editor's URL for an environment
* Resolves the URL for accessing an editor in a specific environment.
*
* Use this method to:
*
* - Get editor access URLs
* - Launch editors for environments
* - Set up editor connections
* - Configure editor access
*
* ### Examples
*
* - Resolve editor URL:
*
* Gets the URL for accessing an editor in an environment.
*
* ```yaml
* editorId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
* environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
* organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
* ```
*/
resolveURL(body: EditorResolveURLParams, options?: RequestOptions): APIPromise<EditorResolveURLResponse> {
return this._client.post('/gitpod.v1.EditorService/ResolveEditorURL', { body, ...options });
Expand Down
35 changes: 34 additions & 1 deletion src/resources/environments/automations/automations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,40 @@ export class Automations extends APIResource {
tasks: TasksAPI.Tasks = new TasksAPI.Tasks(this._client);

/**
* UpsertAutomationsFile upserts the automations file for the given environment.
* Upserts the automations file for the given environment.
*
* Use this method to:
*
* - Configure environment automations
* - Update automation settings
* - Manage automation files
*
* ### Examples
*
* - Update automations file:
*
* Updates or creates the automations configuration.
*
* ```yaml
* environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
* automationsFile:
* services:
* web-server:
* name: "Web Server"
* description: "Development web server"
* commands:
* start: "npm run dev"
* ready: "curl -s http://localhost:3000"
* triggeredBy:
* - postDevcontainerStart
* tasks:
* build:
* name: "Build Project"
* description: "Builds the project artifacts"
* command: "npm run build"
* triggeredBy:
* - postEnvironmentStart
* ```
*/
upsert(body: AutomationUpsertParams, options?: RequestOptions): APIPromise<AutomationUpsertResponse> {
return this._client.post('/gitpod.v1.EnvironmentAutomationService/UpsertAutomationsFile', {
Expand Down
Loading