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:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lendry-erp/contracts",
|
"name": "@lendry-erp/contracts",
|
||||||
"version": "1.2.24",
|
"version": "1.2.25",
|
||||||
"description": "Protobuf definitions and generated TypeScript types",
|
"description": "Protobuf definitions and generated TypeScript types",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
|
|||||||
@@ -10,6 +10,30 @@ service UsersService {
|
|||||||
// Для системного использования (вызывается из Auth/Admin)
|
// Для системного использования (вызывается из Auth/Admin)
|
||||||
rpc CreateProfile (CreateProfileRequest) returns (CreateProfileResponse);
|
rpc CreateProfile (CreateProfileRequest) returns (CreateProfileResponse);
|
||||||
rpc SoftDeleteProfile(SoftDeleteProfileRequest) returns (SoftDeleteProfileResponse);
|
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 {
|
message GetProfileRequest {
|
||||||
@@ -27,6 +51,7 @@ message GetProfileResponse {
|
|||||||
string language = 8;
|
string language = 8;
|
||||||
optional string custom_status_text = 9;
|
optional string custom_status_text = 9;
|
||||||
optional string custom_status_emoji = 10;
|
optional string custom_status_emoji = 10;
|
||||||
|
optional UserSettingsMessage settings = 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
message UpdateProfileRequest {
|
message UpdateProfileRequest {
|
||||||
@@ -40,6 +65,7 @@ message UpdateProfileRequest {
|
|||||||
optional string timezone = 8;
|
optional string timezone = 8;
|
||||||
optional string language = 9;
|
optional string language = 9;
|
||||||
optional bool is_public = 10;
|
optional bool is_public = 10;
|
||||||
|
optional UserSettingsMessage settings = 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
message UpdateProfileResponse {
|
message UpdateProfileResponse {
|
||||||
@@ -67,3 +93,40 @@ message SoftDeleteProfileRequest {
|
|||||||
message SoftDeleteProfileResponse {
|
message SoftDeleteProfileResponse {
|
||||||
bool success = 1;
|
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