Skip to content

Commit 5a079e7

Browse files
feat(api): update via SDK Studio (#5)
1 parent 8352f84 commit 5a079e7

File tree

6 files changed

+4
-46
lines changed

6 files changed

+4
-46
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lightswitch%2Flightswitch-f5e7ce8a04c0381c90319a2a1062f84c5f3e0d70325961827a04f2742a9c3b28.yml
1+
configured_endpoints: 6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lightswitch%2Flightswitch-6dc2430da32f769677553172dba258ce0d23e8a260f803a5667d344159e8f57a.yml

api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Types:
2020
Methods:
2121

2222
- <code title="post /tasks">client.tasks.<a href="./src/resources/tasks.ts">create</a>({ ...params }) -> void</code>
23-
- <code title="put /tasks">client.tasks.<a href="./src/resources/tasks.ts">update</a>({ ...params }) -> void</code>
2423
- <code title="get /tasks">client.tasks.<a href="./src/resources/tasks.ts">list</a>() -> TaskListResponse</code>
2524

2625
# Users

src/client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { type Fetch } from './internal/builtin-types';
1919
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
2020
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
2121
import { Project, ProjectCreateParams, ProjectListResponse, Projects } from './resources/projects';
22-
import { Task, TaskCreateParams, TaskListResponse, TaskUpdateParams, Tasks } from './resources/tasks';
22+
import { Task, TaskCreateParams, TaskListResponse, Tasks } from './resources/tasks';
2323
import { User, UserCreateParams, UserListResponse, Users } from './resources/users';
2424
import { readEnv } from './internal/utils/env';
2525
import { logger } from './internal/utils/log';
@@ -632,7 +632,6 @@ export declare namespace Lightswitch {
632632
type Task as Task,
633633
type TaskListResponse as TaskListResponse,
634634
type TaskCreateParams as TaskCreateParams,
635-
type TaskUpdateParams as TaskUpdateParams,
636635
};
637636

638637
export {

src/resources/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
export { Projects, type Project, type ProjectListResponse, type ProjectCreateParams } from './projects';
4-
export {
5-
Tasks,
6-
type Task,
7-
type TaskListResponse,
8-
type TaskCreateParams,
9-
type TaskUpdateParams,
10-
} from './tasks';
4+
export { Tasks, type Task, type TaskListResponse, type TaskCreateParams } from './tasks';
115
export { Users, type User, type UserListResponse, type UserCreateParams } from './users';

src/resources/tasks.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@ export class Tasks extends APIResource {
1717
});
1818
}
1919

20-
/**
21-
* Update a task
22-
*/
23-
update(body: TaskUpdateParams, options?: RequestOptions): APIPromise<void> {
24-
return this._client.put('/tasks', {
25-
body,
26-
...options,
27-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
28-
});
29-
}
30-
3120
/**
3221
* Get all tasks
3322
*/
@@ -58,21 +47,10 @@ export interface TaskCreateParams {
5847
title?: string;
5948
}
6049

61-
export interface TaskUpdateParams {
62-
id?: number;
63-
64-
projectId?: number;
65-
66-
status?: string;
67-
68-
title?: string;
69-
}
70-
7150
export declare namespace Tasks {
7251
export {
7352
type Task as Task,
7453
type TaskListResponse as TaskListResponse,
7554
type TaskCreateParams as TaskCreateParams,
76-
type TaskUpdateParams as TaskUpdateParams,
7755
};
7856
}

tests/api-resources/tasks.test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,6 @@ describe('resource tasks', () => {
1717
expect(dataAndResponse.response).toBe(rawResponse);
1818
});
1919

20-
// skipped: tests are disabled for the time being
21-
test.skip('update', async () => {
22-
const responsePromise = client.tasks.update({});
23-
const rawResponse = await responsePromise.asResponse();
24-
expect(rawResponse).toBeInstanceOf(Response);
25-
const response = await responsePromise;
26-
expect(response).not.toBeInstanceOf(Response);
27-
const dataAndResponse = await responsePromise.withResponse();
28-
expect(dataAndResponse.data).toBe(response);
29-
expect(dataAndResponse.response).toBe(rawResponse);
30-
});
31-
3220
// skipped: tests are disabled for the time being
3321
test.skip('list', async () => {
3422
const responsePromise = client.tasks.list();

0 commit comments

Comments
 (0)