Skip to content

Commit a457960

Browse files
feat(api): update with latest API spec (#5)
1 parent d5ef759 commit a457960

File tree

3 files changed

+36
-18
lines changed

3 files changed

+36
-18
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-a058dd6f8c83b32adb6f30bae2db8295468b8ffc391342a960ec6f393c50b83e.yml

src/resources/editors.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -37,40 +37,40 @@ export class Editors extends APIResource {
3737
export type EditorsEditorsPage = EditorsPage<Editor>;
3838

3939
export interface Editor {
40-
id?: string;
40+
id: string;
4141

42-
alias?: string;
42+
alias: string;
4343

44-
iconUrl?: string;
44+
iconUrl: string;
4545

46-
installationInstructions?: string;
46+
installationInstructions: string;
4747

48-
name?: string;
48+
name: string;
4949

50-
shortDescription?: string;
50+
shortDescription: string;
5151

52-
urlTemplate?: string;
52+
urlTemplate: string;
5353
}
5454

5555
export interface EditorRetrieveResponse {
5656
/**
5757
* editor contains the editor
5858
*/
59-
editor?: Editor;
59+
editor: Editor;
6060
}
6161

6262
export interface EditorResolveURLResponse {
6363
/**
6464
* url is the resolved editor URL
6565
*/
66-
url?: string;
66+
url: string;
6767
}
6868

6969
export interface EditorRetrieveParams {
7070
/**
7171
* id is the ID of the editor to get
7272
*/
73-
id?: string;
73+
id: string;
7474
}
7575

7676
export interface EditorListParams extends EditorsPageParams {
@@ -103,17 +103,17 @@ export interface EditorResolveURLParams {
103103
/**
104104
* editorId is the ID of the editor to resolve the URL for
105105
*/
106-
editorId?: string;
106+
editorId: string;
107107

108108
/**
109109
* environmentId is the ID of the environment to resolve the URL for
110110
*/
111-
environmentId?: string;
111+
environmentId: string;
112112

113113
/**
114114
* organizationId is the ID of the organization to resolve the URL for
115115
*/
116-
organizationId?: string;
116+
organizationId: string;
117117
}
118118

119119
export declare namespace Editors {

tests/api-resources/editors.test.ts

+22-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const client = new Gitpod({
99

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

23+
// skipped: tests are disabled for the time being
24+
test.skip('retrieve: required and optional params', async () => {
25+
const response = await client.editors.retrieve({ id: 'id' });
26+
});
27+
2328
// skipped: tests are disabled for the time being
2429
test.skip('list', async () => {
2530
const responsePromise = client.editors.list({});
@@ -33,8 +38,12 @@ describe('resource editors', () => {
3338
});
3439

3540
// skipped: tests are disabled for the time being
36-
test.skip('resolveURL', async () => {
37-
const responsePromise = client.editors.resolveURL({});
41+
test.skip('resolveURL: only required params', async () => {
42+
const responsePromise = client.editors.resolveURL({
43+
editorId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
44+
environmentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
45+
organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
46+
});
3847
const rawResponse = await responsePromise.asResponse();
3948
expect(rawResponse).toBeInstanceOf(Response);
4049
const response = await responsePromise;
@@ -43,4 +52,13 @@ describe('resource editors', () => {
4352
expect(dataAndResponse.data).toBe(response);
4453
expect(dataAndResponse.response).toBe(rawResponse);
4554
});
55+
56+
// skipped: tests are disabled for the time being
57+
test.skip('resolveURL: required and optional params', async () => {
58+
const response = await client.editors.resolveURL({
59+
editorId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
60+
environmentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
61+
organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
62+
});
63+
});
4664
});

0 commit comments

Comments
 (0)