feat: add a paginated organization members endpoint (#16835)

Closes
[coder/internal#460](https://github.com/coder/internal/issues/460)
This commit is contained in:
brettkolodny
2025-03-10 14:42:07 -04:00
committed by GitHub
parent 191b0efb80
commit 8c0350e20c
18 changed files with 548 additions and 1 deletions
+11
View File
@@ -81,6 +81,17 @@ type OrganizationMemberWithUserData struct {
OrganizationMember `table:"m,recursive_inline"`
}
type PaginatedMembersRequest struct {
OrganizationID uuid.UUID `table:"organization id" json:"organization_id" format:"uuid"`
Limit int `json:"limit,omitempty"`
Offset int `json:"offset,omitempty"`
}
type PaginatedMembersResponse struct {
Members []OrganizationMemberWithUserData
Count int `json:"count"`
}
type CreateOrganizationRequest struct {
Name string `json:"name" validate:"required,organization_name"`
// DisplayName will default to the same value as `Name` if not provided.