Files
contracts/proto/users/users.proto
Дмитрий 8146b671dd
All checks were successful
Publish / Publish Job (push) Successful in 2m20s
ebanuy mileardnuy commit
2026-04-11 20:02:46 +03:00

69 lines
1.9 KiB
Protocol Buffer

syntax = "proto3";
package users.v1;
option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb";
service UsersService {
rpc GetProfile (GetProfileRequest) returns (GetProfileResponse);
rpc UpdateProfile (UpdateProfileRequest) returns (UpdateProfileResponse);
// Для системного использования (вызывается из Auth/Admin)
rpc CreateProfile (CreateProfileRequest) returns (CreateProfileResponse);
rpc SoftDeleteProfile(SoftDeleteProfileRequest) returns (SoftDeleteProfileResponse);
}
message GetProfileRequest {
string user_id = 1; // Берется из access токена на API шлюзе
}
message GetProfileResponse {
string id = 1;
optional string email = 2;
optional string phone = 3;
optional string full_name = 4;
optional string avatar_url = 5;
bool is_public = 6;
string timezone = 7;
string language = 8;
optional string custom_status_text = 9;
optional string custom_status_emoji = 10;
}
message UpdateProfileRequest {
string user_id = 1;
optional string email = 2;
optional string phone = 3;
optional string full_name = 4;
optional string avatar_url = 5;
optional string custom_status_text = 6;
optional string custom_status_emoji = 7;
optional string timezone = 8;
optional string language = 9;
optional bool is_public = 10;
}
message UpdateProfileResponse {
bool success = 1;
string message = 2;
}
// Вызывается другими сервисами при создании аккаунта
message CreateProfileRequest {
string user_id = 1; // Обязательно передаем ID созданного аккаунта!
optional string email = 2;
optional string full_name = 3;
optional string phone = 4;
optional string avatar_url = 5;
}
message CreateProfileResponse {
bool success = 1;
}
message SoftDeleteProfileRequest {
string user_id = 1;
}
message SoftDeleteProfileResponse {
bool success = 1;
}