Skip to content

Commit 289a15f

Browse files
feat(api): server-side search on GET /projects
1 parent 0b2a1db commit 289a15f

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 112
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-718b49461ceaa1d6cac7854c29dfef9036a83f6632e756c9d1ecf31fd77c57f6.yml
3-
openapi_spec_hash: f3d12a3a0a5e9ce711fb1c571ee36f9c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-86e061884d273a27064593a0de3a4ba366a12a1001181741addb4f781be18ec9.yml
3+
openapi_spec_hash: e0a4ddf4a3302599376756127099488c
44
config_hash: 08d55086449943a8fec212b870061a3f

src/resources/projects/projects.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,12 @@ export interface ProjectUpdateParams {
155155
status?: 'active' | 'archived';
156156
}
157157

158-
export interface ProjectListParams extends OffsetPaginationParams {}
158+
export interface ProjectListParams extends OffsetPaginationParams {
159+
/**
160+
* Case-insensitive substring match against project name
161+
*/
162+
query?: string;
163+
}
159164

160165
Projects.Limits = Limits;
161166

tests/api-resources/projects/projects.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ describe('resource projects', () => {
6565
test.skip('list: request options and params are passed correctly', async () => {
6666
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
6767
await expect(
68-
client.projects.list({ limit: 100, offset: 0 }, { path: '/_stainless_unknown_path' }),
68+
client.projects.list(
69+
{
70+
limit: 100,
71+
offset: 0,
72+
query: 'query',
73+
},
74+
{ path: '/_stainless_unknown_path' },
75+
),
6976
).rejects.toThrow(Kernel.NotFoundError);
7077
});
7178

0 commit comments

Comments
 (0)