@@ -43,6 +43,8 @@ service GroupService {
4343 rpc AddMember (GroupServiceAddMemberRequest ) returns (GroupServiceAddMemberResponse ) {}
4444 // RemoveMember removes a user from a group
4545 rpc RemoveMember (GroupServiceRemoveMemberRequest ) returns (GroupServiceRemoveMemberResponse ) {}
46+ // ListPendingInvitations retrieves pending invitations for a group
47+ rpc ListPendingInvitations (GroupServiceListPendingInvitationsRequest ) returns (GroupServiceListPendingInvitationsResponse ) {}
4648}
4749
4850// GroupServiceCreateRequest contains the information needed to create a new group
@@ -160,6 +162,31 @@ message GroupServiceRemoveMemberRequest {
160162// GroupServiceRemoveMemberResponse is returned upon successful removal of a user from a group
161163message GroupServiceRemoveMemberResponse {}
162164
165+ message GroupServiceListPendingInvitationsRequest {
166+ // IdentityReference is used to specify the group by either its ID or name
167+ IdentityReference group_reference = 1 [(buf.validate.field ).required = true ];
168+ // Pagination parameters to limit and offset results
169+ OffsetPaginationRequest pagination = 2 ;
170+ }
171+
172+ // GroupServiceListPendingInvitationsResponse contains a list of pending invitations for a group
173+ message GroupServiceListPendingInvitationsResponse {
174+ // List of pending invitations for the group
175+ repeated PendingGroupInvitation invitations = 1 ;
176+ // Pagination information for the response
177+ OffsetPaginationResponse pagination = 2 ;
178+ }
179+
180+ // PendingInvitation represents an invitation to join a group that has not yet been accepted
181+ message PendingGroupInvitation {
182+ // The email address of the user invited to the group
183+ string user_email = 1 [(buf.validate.field ) .string.email = true ];
184+ // The user who sent the invitation
185+ optional User invited_by = 2 ;
186+ // Timestamp when the invitation was created
187+ google.protobuf.Timestamp created_at = 3 ;
188+ }
189+
163190// Group represents a collection of users with shared access to resources
164191message Group {
165192 // Unique identifier for the group
0 commit comments