feat: add paginated API endpoint for groups (#27603)

backend-only changes from #27271; see that PR for summary of changes +
implementation details
This commit is contained in:
Andrew Aquino
2026-08-10 13:23:14 -07:00
committed by GitHub
parent ddb2799009
commit 6e07e2610f
19 changed files with 1189 additions and 0 deletions
+41
View File
@@ -6917,6 +6917,47 @@ export interface OrganizationSyncSettings {
readonly organization_assign_default: boolean;
}
// From codersdk/groups.go
/**
* PaginatedGroup is a group summary returned by the paginated groups endpoint.
* It deliberately omits the member roster (which the endpoint does not return)
* and exposes only the total member count. Fetch the roster via the group
* members endpoint.
*/
export interface PaginatedGroup {
readonly id: string;
readonly name: string;
readonly display_name: string;
readonly organization_id: string;
/**
* TotalMemberCount is the number of members in the group, shown even when
* the caller cannot read individual members. The roster itself is not
* returned by this endpoint.
*/
readonly total_member_count: number;
readonly avatar_url: string;
readonly quota_allowance: number;
readonly source: GroupSource;
readonly organization_name: string;
readonly organization_display_name: string;
}
// From codersdk/groups.go
/**
* PaginatedGroupsRequest are the filters for a paginated groups request.
* Groups only support free-text search, so unlike UsersRequest it exposes no
* key:value filters that the endpoint would reject.
*/
export interface PaginatedGroupsRequest extends Pagination {
readonly q?: string;
}
// From codersdk/groups.go
export interface PaginatedGroupsResponse {
readonly groups: readonly PaginatedGroup[];
readonly count: number;
}
// From codersdk/organizations.go
export interface PaginatedMembersRequest {
readonly limit?: number;