115 lines
2.4 KiB
Protocol Buffer
115 lines
2.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package account.v1;
|
|
|
|
option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb";
|
|
|
|
service AccountService {
|
|
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);
|
|
rpc ChangePassword (ChangePasswordRequest) returns (ChangePasswordResponse);
|
|
rpc ChangeData(ChangeDataRequest) returns (ChangeDataResponse);
|
|
rpc SetPin (SetPinRequest) returns (SetPinResponse);
|
|
rpc UnlockPin (UnlockPinRequest) returns (UnlockPinResponse);
|
|
rpc GetPinStatus (GetPinStatusRequest) returns (GetPinStatusResponse);
|
|
rpc RemovePin (RemovePinRequest) returns (RemovePinResponse);
|
|
}
|
|
|
|
message GetAccountRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message GetAccountResponse {
|
|
string id = 1;
|
|
string username = 2;
|
|
string email = 3;
|
|
string phone = 4;
|
|
string full_name = 5;
|
|
bool is_ldap = 6;
|
|
string status = 7;
|
|
repeated string roles = 8;
|
|
string avatar_url = 9;
|
|
optional string employee_id = 10;
|
|
string presence = 11;
|
|
string last_active = 12;
|
|
string custom_status_text = 13;
|
|
string custom_status_emoji = 14;
|
|
string timezone = 15;
|
|
string language = 16;
|
|
bool two_fa_enabled = 17;
|
|
bool has_pin = 18;
|
|
}
|
|
|
|
message ChangePasswordRequest {
|
|
string user_id = 1;
|
|
string old_password = 3;
|
|
string new_password = 4;
|
|
optional string code = 5;
|
|
string session_id = 6;
|
|
}
|
|
|
|
message ChangePasswordResponse {
|
|
bool success = 1;
|
|
string message = 2;
|
|
}
|
|
|
|
message ChangeDataRequest {
|
|
string user_id = 1;
|
|
string session_id = 2;
|
|
optional string email = 3;
|
|
optional string phone = 4;
|
|
optional string full_name = 5;
|
|
optional string avatar_url = 6;
|
|
optional string custom_status_text = 7;
|
|
optional string custom_status_emoji = 8;
|
|
optional string timezone = 9;
|
|
optional string language = 10;
|
|
}
|
|
|
|
message ChangeDataResponse {
|
|
bool success = 1;
|
|
string message = 2;
|
|
}
|
|
|
|
message SetPinRequest {
|
|
string user_id = 1;
|
|
string session_id = 2;
|
|
string pin = 3;
|
|
}
|
|
|
|
message SetPinResponse {
|
|
bool success = 1;
|
|
string message = 2;
|
|
}
|
|
|
|
message UnlockPinRequest {
|
|
string user_id = 1;
|
|
string session_id = 2;
|
|
string pin = 3;
|
|
}
|
|
|
|
message UnlockPinResponse {
|
|
bool success = 1;
|
|
string message = 2;
|
|
}
|
|
|
|
message GetPinStatusRequest {
|
|
string user_id = 1;
|
|
string session_id = 2;
|
|
}
|
|
|
|
message GetPinStatusResponse {
|
|
bool has_pin = 1;
|
|
bool is_locked = 2;
|
|
string lock_until = 3;
|
|
}
|
|
|
|
message RemovePinRequest {
|
|
string pin = 1;
|
|
string user_id = 2;
|
|
string session_id=3;
|
|
}
|
|
message RemovePinResponse {
|
|
bool success = 1;
|
|
string message = 2;
|
|
}
|