feat: add new methods users for microservice transports
All checks were successful
Publish / Publish Job (push) Successful in 2m21s
All checks were successful
Publish / Publish Job (push) Successful in 2m21s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lendry-erp/contracts",
|
||||
"version": "1.2.12",
|
||||
"version": "1.2.13",
|
||||
"description": "Protobuf definitions and generated TypeScript types",
|
||||
"type": "commonjs",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -5,56 +5,56 @@ package users.v1;
|
||||
option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb";
|
||||
|
||||
service UsersService {
|
||||
rpc GetMe(GetMeRequest) returns (GetMeResponse);
|
||||
rpc ChangeMe(ChangeMeRequest) returns (ChangeMeResponse);
|
||||
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
|
||||
rpc GetProfile (GetProfileRequest) returns (GetProfileResponse);
|
||||
rpc UpdateProfile (UpdateProfileRequest) returns (UpdateProfileResponse);
|
||||
// Для системного использования (вызывается из Auth/Admin)
|
||||
rpc CreateProfile (CreateProfileRequest) returns (CreateProfileResponse);
|
||||
}
|
||||
message GetMeRequest {
|
||||
|
||||
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 GetMeResponse {
|
||||
User user = 1;
|
||||
}
|
||||
message CreateUserRequest {
|
||||
string id = 1;
|
||||
}
|
||||
message CreateUserResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
message ChangeMeRequest {
|
||||
|
||||
message UpdateProfileRequest {
|
||||
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;
|
||||
optional bool is_public = 11;
|
||||
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 ChangeMeResponse {
|
||||
|
||||
message UpdateProfileResponse {
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
}
|
||||
message User {
|
||||
string id = 1;
|
||||
optional string username = 2;
|
||||
optional string email = 3;
|
||||
|
||||
// Вызывается другими сервисами при создании аккаунта
|
||||
message CreateProfileRequest {
|
||||
string user_id = 1; // Обязательно передаем ID созданного аккаунта!
|
||||
optional string email = 2;
|
||||
optional string full_name = 3;
|
||||
optional string phone = 4;
|
||||
optional string full_name = 5;
|
||||
bool is_ldap = 6;
|
||||
optional string status = 7;
|
||||
repeated string roles = 8;
|
||||
optional string avatar_url = 9;
|
||||
optional string employee_id = 10;
|
||||
optional string presence = 11;
|
||||
optional string last_active = 12;
|
||||
optional string custom_status_text = 13;
|
||||
optional string custom_status_emoji = 14;
|
||||
optional string timezone = 15;
|
||||
optional string language = 16;
|
||||
bool two_fa_enabled = 17;
|
||||
bool has_pin = 18;
|
||||
optional string avatar_url = 5;
|
||||
}
|
||||
|
||||
message CreateProfileResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user