Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 128 additions & 126 deletions app/controlplane/api/controlplane/v1/group.pb.go

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions app/controlplane/api/controlplane/v1/group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,20 @@ message GroupServiceListProjectsResponse {
repeated ProjectInfo projects = 1;
// Pagination information for the response
OffsetPaginationResponse pagination = 2;
}

// ProjectInfo represents detailed information about a project that a group is a member of
message ProjectInfo {
// Unique identifier of the project
string id = 1;
// Name of the project
string name = 2;
// Description of the project
string description = 3;
// Role of the group in the project (admin or viewer)
ProjectMemberRole role = 4;
// The latest version ID of the project, if available
optional string latest_version_id = 5;
// Timestamp when the project was created
google.protobuf.Timestamp created_at = 6;
// ProjectInfo represents detailed information about a project that a group is a member of
message ProjectInfo {
// Unique identifier of the project
string id = 1;
// Name of the project
string name = 2;
// Description of the project
string description = 3;
// Role of the group in the project (admin or viewer)
ProjectMemberRole role = 4;
// The latest version ID of the project, if available
optional string latest_version_id = 5;
// Timestamp when the membership was created
google.protobuf.Timestamp created_at = 6;
}
}
46 changes: 27 additions & 19 deletions app/controlplane/api/gen/frontend/controlplane/v1/group.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/controlplane/internal/service/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ func (g *GroupService) ListProjects(ctx context.Context, req *pb.GroupServiceLis
}

// Convert the GroupProjectInfo to protobuf messages
result := make([]*pb.ProjectInfo, 0, len(projectInfoList))
result := make([]*pb.GroupServiceListProjectsResponse_ProjectInfo, 0, len(projectInfoList))
for _, project := range projectInfoList {
result = append(result, bizGroupProjectInfoToPb(project))
}
Expand Down Expand Up @@ -576,8 +576,8 @@ func bizOrgInvitationToPendingGroupInvitationPb(inv *biz.OrgInvitation) *pb.Pend
}

// bizGroupProjectInfoToPb converts a biz.GroupProjectInfo to a pb.ProjectInfo protobuf message.
func bizGroupProjectInfoToPb(info *biz.GroupProjectInfo) *pb.ProjectInfo {
projectInfo := &pb.ProjectInfo{
func bizGroupProjectInfoToPb(info *biz.GroupProjectInfo) *pb.GroupServiceListProjectsResponse_ProjectInfo {
projectInfo := &pb.GroupServiceListProjectsResponse_ProjectInfo{
Id: info.ID.String(),
Name: info.Name,
Description: info.Description,
Expand Down
2 changes: 1 addition & 1 deletion app/controlplane/pkg/biz/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ type GroupProjectInfo struct {
Role authz.Role
// LatestVersionID is the ID of the latest version of the project, if available
LatestVersionID *uuid.UUID
// CreatedAt is the timestamp when the project was created
// CreatedAt is the timestamp when the membership was created
CreatedAt *time.Time
}

Expand Down
2 changes: 1 addition & 1 deletion app/controlplane/pkg/data/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ func (g GroupRepo) ListProjectsByGroup(ctx context.Context, orgID uuid.UUID, gro
Name: pr.Name,
Description: pr.Description,
Role: m.Role,
CreatedAt: toTimePtr(pr.CreatedAt),
CreatedAt: toTimePtr(m.CreatedAt),
}

// If the project has versions, include the latest version ID
Expand Down
Loading