Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add getInvitationsForUser API #297

Merged
merged 1 commit into from
Sep 24, 2024
Merged
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
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
Loading