Skip to content

feat(api): update with latest API spec #5

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 13, 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-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-a058dd6f8c83b32adb6f30bae2db8295468b8ffc391342a960ec6f393c50b83e.yml
26 changes: 13 additions & 13 deletions src/resources/editors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,40 @@ export class Editors extends APIResource {
export type EditorsEditorsPage = EditorsPage<Editor>;

export interface Editor {
id?: string;
id: string;

alias?: string;
alias: string;

iconUrl?: string;
iconUrl: string;

installationInstructions?: string;
installationInstructions: string;

name?: string;
name: string;

shortDescription?: string;
shortDescription: string;

urlTemplate?: string;
urlTemplate: string;
}

export interface EditorRetrieveResponse {
/**
* editor contains the editor
*/
editor?: Editor;
editor: Editor;
}

export interface EditorResolveURLResponse {
/**
* url is the resolved editor URL
*/
url?: string;
url: string;
}

export interface EditorRetrieveParams {
/**
* id is the ID of the editor to get
*/
id?: string;
id: string;
}

export interface EditorListParams extends EditorsPageParams {
Expand Down Expand Up @@ -103,17 +103,17 @@ export interface EditorResolveURLParams {
/**
* editorId is the ID of the editor to resolve the URL for
*/
editorId?: string;
editorId: string;

/**
* environmentId is the ID of the environment to resolve the URL for
*/
environmentId?: string;
environmentId: string;

/**
* organizationId is the ID of the organization to resolve the URL for
*/
organizationId?: string;
organizationId: string;
}

export declare namespace Editors {
Expand Down
26 changes: 22 additions & 4 deletions tests/api-resources/editors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const client = new Gitpod({

describe('resource editors', () => {
// skipped: tests are disabled for the time being
test.skip('retrieve', async () => {
const responsePromise = client.editors.retrieve({});
test.skip('retrieve: only required params', async () => {
const responsePromise = client.editors.retrieve({ id: 'id' });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -20,6 +20,11 @@ describe('resource editors', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
test.skip('retrieve: required and optional params', async () => {
const response = await client.editors.retrieve({ id: 'id' });
});

// skipped: tests are disabled for the time being
test.skip('list', async () => {
const responsePromise = client.editors.list({});
Expand All @@ -33,8 +38,12 @@ describe('resource editors', () => {
});

// skipped: tests are disabled for the time being
test.skip('resolveURL', async () => {
const responsePromise = client.editors.resolveURL({});
test.skip('resolveURL: only required params', async () => {
const responsePromise = client.editors.resolveURL({
editorId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
environmentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -43,4 +52,13 @@ describe('resource editors', () => {
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
test.skip('resolveURL: required and optional params', async () => {
const response = await client.editors.resolveURL({
editorId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
environmentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
});
});
});