Skip to content

Commit 169d2bb

Browse files
authored
feat(groups): Allow to list projects a group is member of (#2248)
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent f75ad1d commit 169d2bb

28 files changed

+1857
-469
lines changed

app/controlplane/api/controlplane/v1/group.pb.go

Lines changed: 433 additions & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controlplane/api/controlplane/v1/group.proto

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ service GroupService {
4747
rpc UpdateMemberMaintainerStatus(GroupServiceUpdateMemberMaintainerStatusRequest) returns (GroupServiceUpdateMemberMaintainerStatusResponse) {}
4848
// ListPendingInvitations retrieves pending invitations for a group
4949
rpc ListPendingInvitations(GroupServiceListPendingInvitationsRequest) returns (GroupServiceListPendingInvitationsResponse) {}
50+
// ListProjects retrieves a paginated list of projects the group is a member of
51+
rpc ListProjects(GroupServiceListProjectsRequest) returns (GroupServiceListProjectsResponse) {}
5052
}
5153

5254
// GroupServiceCreateRequest contains the information needed to create a new group
@@ -236,3 +238,35 @@ message GroupServiceUpdateMemberMaintainerStatusRequest {
236238

237239
// GroupServiceUpdateMemberMaintainerStatusResponse is returned upon successful update of a member's maintainer status
238240
message GroupServiceUpdateMemberMaintainerStatusResponse {}
241+
242+
// GroupServiceListProjectsRequest contains parameters for filtering and paginating project results for a group
243+
message GroupServiceListProjectsRequest {
244+
// IdentityReference is used to specify the group by either its ID or name
245+
IdentityReference group_reference = 1 [(buf.validate.field).required = true];
246+
// Pagination parameters to limit and offset results
247+
OffsetPaginationRequest pagination = 2;
248+
}
249+
250+
// GroupServiceListProjectsResponse contains a paginated list of projects for a group
251+
message GroupServiceListProjectsResponse {
252+
// List of projects memberships matching the request criteria
253+
repeated ProjectInfo projects = 1;
254+
// Pagination information for the response
255+
OffsetPaginationResponse pagination = 2;
256+
}
257+
258+
// ProjectInfo represents detailed information about a project that a group is a member of
259+
message ProjectInfo {
260+
// Unique identifier of the project
261+
string id = 1;
262+
// Name of the project
263+
string name = 2;
264+
// Description of the project
265+
string description = 3;
266+
// Role of the group in the project (admin or viewer)
267+
ProjectMemberRole role = 4;
268+
// The latest version ID of the project, if available
269+
optional string latest_version_id = 5;
270+
// Timestamp when the project was created
271+
google.protobuf.Timestamp created_at = 6;
272+
}

app/controlplane/api/controlplane/v1/group_grpc.pb.go

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)