mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
Generated
+41
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user