feat: add methods for chats
All checks were successful
Publish / Publish Job (push) Successful in 2m23s
All checks were successful
Publish / Publish Job (push) Successful in 2m23s
This commit is contained in:
@@ -10,6 +10,30 @@ service UsersService {
|
||||
// Для системного использования (вызывается из Auth/Admin)
|
||||
rpc CreateProfile (CreateProfileRequest) returns (CreateProfileResponse);
|
||||
rpc SoftDeleteProfile(SoftDeleteProfileRequest) returns (SoftDeleteProfileResponse);
|
||||
|
||||
// --- НОВЫЕ МЕТОДЫ МЕССЕНДЖЕРА ---
|
||||
rpc BlockUser (BlockUserRequest) returns (BlockUserResponse);
|
||||
rpc UnblockUser (UnblockUserRequest) returns (UnblockUserResponse);
|
||||
rpc GetBlockedUsers (GetBlockedUsersRequest) returns (GetBlockedUsersResponse);
|
||||
rpc AddContact (AddContactRequest) returns (AddContactResponse);
|
||||
rpc GetContacts (GetContactsRequest) returns (GetContactsResponse);
|
||||
}
|
||||
|
||||
message UserSettingsMessage {
|
||||
string privacy_phone = 1;
|
||||
string privacy_last_seen = 2;
|
||||
string privacy_photo = 3;
|
||||
string privacy_bio = 4;
|
||||
string privacy_calls = 5;
|
||||
string privacy_groups = 6;
|
||||
string privacy_voice_msgs = 7;
|
||||
bool notify_private_chats = 8;
|
||||
bool notify_groups = 9;
|
||||
bool notify_channels = 10;
|
||||
bool show_message_preview = 11;
|
||||
string theme = 12;
|
||||
int32 text_size = 13;
|
||||
optional string chat_background = 14;
|
||||
}
|
||||
|
||||
message GetProfileRequest {
|
||||
@@ -27,6 +51,7 @@ message GetProfileResponse {
|
||||
string language = 8;
|
||||
optional string custom_status_text = 9;
|
||||
optional string custom_status_emoji = 10;
|
||||
optional UserSettingsMessage settings = 11;
|
||||
}
|
||||
|
||||
message UpdateProfileRequest {
|
||||
@@ -40,6 +65,7 @@ message UpdateProfileRequest {
|
||||
optional string timezone = 8;
|
||||
optional string language = 9;
|
||||
optional bool is_public = 10;
|
||||
optional UserSettingsMessage settings = 11;
|
||||
}
|
||||
|
||||
message UpdateProfileResponse {
|
||||
@@ -66,4 +92,41 @@ message SoftDeleteProfileRequest {
|
||||
|
||||
message SoftDeleteProfileResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
|
||||
message ContactItem {
|
||||
string contact_id = 1;
|
||||
optional string alias = 2;
|
||||
}
|
||||
message AddContactRequest {
|
||||
string user_id = 1;
|
||||
string contact_id = 2;
|
||||
optional string alias = 3;
|
||||
}
|
||||
message AddContactResponse { bool success = 1; }
|
||||
message GetContactsRequest {
|
||||
string user_id = 1;
|
||||
}
|
||||
message GetContactsResponse {
|
||||
repeated ContactItem contacts = 1;
|
||||
}
|
||||
message BlockedUserItem {
|
||||
string blocked_id = 1;
|
||||
string blocked_at = 2;
|
||||
}
|
||||
message BlockUserRequest {
|
||||
string blocker_id = 1;
|
||||
string blocked_id = 2;
|
||||
}
|
||||
message BlockUserResponse { bool success = 1; }
|
||||
message UnblockUserRequest {
|
||||
string blocker_id = 1;
|
||||
string blocked_id = 2;
|
||||
}
|
||||
message UnblockUserResponse { bool success = 1; }
|
||||
message GetBlockedUsersRequest {
|
||||
string blocker_id = 1;
|
||||
}
|
||||
message GetBlockedUsersResponse {
|
||||
repeated BlockedUserItem blocked_users = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user