This commit is contained in:
lendry
2026-06-25 07:23:34 +03:00
parent f2366a69a0
commit 71b270fcb3
19 changed files with 1410 additions and 112 deletions

View File

@@ -184,6 +184,7 @@ message PublicUser {
bool canManageSettings = 18;
bool canViewUsers = 19;
bool canViewUserDocuments = 20;
bool hasPassword = 21;
}
message AuthTokens {

View File

@@ -8,6 +8,9 @@ service ProfileService {
rpc UpdateProfile (UpdateProfileRequest) returns (ProfileResponse);
rpc UpdateContacts (UpdateContactsRequest) returns (ProfileResponse);
rpc SetPassword (SetPasswordRequest) returns (SetPasswordResponse);
rpc SendPasswordVerificationOtp (SendPasswordVerificationOtpRequest) returns (PasswordVerificationOtpResponse);
rpc ChangePassword (ChangePasswordRequest) returns (SetPasswordResponse);
rpc RemovePassword (RemovePasswordRequest) returns (SetPasswordResponse);
rpc SoftDeleteProfile (UserProfileRequest) returns (SoftDeleteProfileResponse);
}
@@ -16,6 +19,33 @@ message SetPasswordRequest {
string password = 2;
}
message SendPasswordVerificationOtpRequest {
string userId = 1;
string channel = 2;
}
message PasswordVerificationOtpResponse {
bool sent = 1;
string maskedTarget = 2;
}
message ChangePasswordRequest {
string userId = 1;
string newPassword = 2;
optional string currentPassword = 3;
optional string otpCode = 4;
optional string otpChannel = 5;
optional string totpCode = 6;
}
message RemovePasswordRequest {
string userId = 1;
optional string currentPassword = 2;
optional string otpCode = 3;
optional string otpChannel = 4;
optional string totpCode = 5;
}
message SetPasswordResponse {
bool hasPassword = 1;
}
@@ -64,6 +94,7 @@ message ProfileResponse {
optional string backupEmail = 12;
optional string backupPhone = 13;
optional string birthDate = 15;
bool hasPassword = 16;
}
message SoftDeleteProfileResponse {