Skip to content

Commit

Permalink
feat: add getInvitationsForUser API (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishtigupta authored Sep 24, 2024
1 parent f19ec6d commit b601ab6
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions proto/global_admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ option csharp_namespace = "Momento.Protos.GlobalAdmin";
package global_admin;

service GlobalAdmin {
rpc GetAccounts(_GetAccountsRequest) returns(_GetAccountsResponse) {}
rpc GetAccounts(_GetAccountsRequest) returns (_GetAccountsResponse) {}
rpc GetInvitationsForUser(_GetInvitationsForUserRequest) returns (_GetInvitationsForUserResponse) {

}
rpc GetAccountSessionToken (_GetAccountSessionTokenRequest) returns(_GetAccountSessionTokenResponse) {}
rpc AddMember(_AddMemberRequest) returns(_AddMemberResponse) {}
rpc RemoveMember(_RemoveMemberRequest) returns(_RemoveMemberResponse) {}
Expand All @@ -26,8 +29,7 @@ message _SetAccountNameRequest {
string account_name = 1;
}

message _SetAccountNameResponse {
}
message _SetAccountNameResponse {}

// No parameters required - we derive identity from the auth header.
message _GetAccountsRequest {
Expand All @@ -37,6 +39,18 @@ message _GetAccountsResponse {
repeated _Account accounts = 1;
}

message _GetInvitationsForUserRequest {}

message UserInvitation {
string account_id = 1;
string account_name = 2;
string invitation_id = 3;
}

message _GetInvitationsForUserResponse {
repeated UserInvitation invitations = 1;
}

message _Account {
string id = 1;
string account_name = 2;
Expand Down Expand Up @@ -126,6 +140,7 @@ message _RemoveMemberRequest {
// These are some of the Errors and their corresponding GRPC status codes:
// 1. User is not a Member. grpc code = FAILED_PRECONDITION. Metadata: "err" -> "user_is_not_a_member".
// 2. a non-owner Member may not be removed. grpc code = PERMISSION_DENIED. Metadata: "err" -> "owner_cannot_be_removed".
//
// Note that to remove an Owner, customers need to reach out to us so we can run mm commands for them.
message _RemoveMemberResponse {
}
Expand All @@ -137,7 +152,7 @@ message _ListMembersRequest {

enum Role {
OWNER = 0;
MEMBER = 1;
OPERATOR = 1;
}

message _Member {
Expand Down

0 comments on commit b601ab6

Please sign in to comment.