first commit
This commit is contained in:
69
shared/proto/profile.proto
Normal file
69
shared/proto/profile.proto
Normal file
@@ -0,0 +1,69 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package profile;
|
||||
|
||||
service ProfileService {
|
||||
rpc GetProfile (UserProfileRequest) returns (ProfileResponse);
|
||||
rpc UpdateAvatar (UpdateAvatarRequest) returns (ProfileResponse);
|
||||
rpc UpdateProfile (UpdateProfileRequest) returns (ProfileResponse);
|
||||
rpc UpdateContacts (UpdateContactsRequest) returns (ProfileResponse);
|
||||
rpc SetPassword (SetPasswordRequest) returns (SetPasswordResponse);
|
||||
rpc SoftDeleteProfile (UserProfileRequest) returns (SoftDeleteProfileResponse);
|
||||
}
|
||||
|
||||
message SetPasswordRequest {
|
||||
string userId = 1;
|
||||
string password = 2;
|
||||
}
|
||||
|
||||
message SetPasswordResponse {
|
||||
bool hasPassword = 1;
|
||||
}
|
||||
|
||||
message UserProfileRequest {
|
||||
string userId = 1;
|
||||
}
|
||||
|
||||
message UpdateAvatarRequest {
|
||||
string userId = 1;
|
||||
optional string avatarUrl = 2;
|
||||
optional string avatarStorageKey = 3;
|
||||
}
|
||||
|
||||
message UpdateProfileRequest {
|
||||
string userId = 1;
|
||||
optional string firstName = 2;
|
||||
optional string lastName = 3;
|
||||
optional string bio = 4;
|
||||
optional int32 age = 5;
|
||||
optional string gender = 6;
|
||||
}
|
||||
|
||||
message UpdateContactsRequest {
|
||||
string userId = 1;
|
||||
optional string email = 2;
|
||||
optional string phone = 3;
|
||||
optional string backupEmail = 4;
|
||||
optional string backupPhone = 5;
|
||||
}
|
||||
|
||||
message ProfileResponse {
|
||||
string id = 1;
|
||||
string userId = 2;
|
||||
string displayName = 3;
|
||||
optional string avatarUrl = 4;
|
||||
optional bool hasAvatar = 14;
|
||||
optional string firstName = 5;
|
||||
optional string lastName = 6;
|
||||
optional string bio = 7;
|
||||
optional int32 age = 8;
|
||||
optional string gender = 9;
|
||||
optional string email = 10;
|
||||
optional string phone = 11;
|
||||
optional string backupEmail = 12;
|
||||
optional string backupPhone = 13;
|
||||
}
|
||||
|
||||
message SoftDeleteProfileResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user