Skip to content

Commit 84cd88f

Browse files
feat: [backend] Introduce role and member status filtering for ListMembers
1 parent b473c48 commit 84cd88f

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 160
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-3a8fb9d6b9645a483a08206e944cc388325e210f0bd54daa9e15ee561a37fabc.yml
3-
openapi_spec_hash: fe42cbf3b012e4aebf56f64a675c3dd3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-13ed0159480c5c02ed02394764e7c528c1110cdc42d2a0ff5fac228f48403a08.yml
3+
openapi_spec_hash: e1b4c20a8a5faee0f2dd22b449e7a106
44
config_hash: f36d04c8359fe8baec226396a18b309e

src/resources/organizations/organizations.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,10 +872,20 @@ export interface OrganizationListMembersParams extends MembersPageParams {
872872

873873
export namespace OrganizationListMembersParams {
874874
export interface Filter {
875+
/**
876+
* roles filters members by their organization role
877+
*/
878+
roles?: Array<Shared.OrganizationRole>;
879+
875880
/**
876881
* search performs case-insensitive search across member name and email
877882
*/
878883
search?: string;
884+
885+
/**
886+
* status filters members by their user status
887+
*/
888+
statuses?: Array<Shared.UserStatus>;
879889
}
880890

881891
/**

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ describe('resource organizations', () => {
143143
organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047',
144144
token: 'token',
145145
pageSize: 0,
146-
filter: { search: 'search' },
146+
filter: {
147+
roles: ['ORGANIZATION_ROLE_UNSPECIFIED'],
148+
search: 'search',
149+
statuses: ['USER_STATUS_UNSPECIFIED'],
150+
},
147151
pagination: { token: 'token', pageSize: 20 },
148152
sort: { field: 'SORT_FIELD_UNSPECIFIED', order: 'SORT_ORDER_UNSPECIFIED' },
149153
});

0 commit comments

Comments
 (0)