diff --git a/gen/go/users/users.pb.go b/gen/go/users/users.pb.go index e1387fa..3c1747a 100644 --- a/gen/go/users/users.pb.go +++ b/gen/go/users/users.pb.go @@ -21,6 +21,154 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type UserSettingsMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + PrivacyPhone string `protobuf:"bytes,1,opt,name=privacy_phone,json=privacyPhone,proto3" json:"privacy_phone,omitempty"` + PrivacyLastSeen string `protobuf:"bytes,2,opt,name=privacy_last_seen,json=privacyLastSeen,proto3" json:"privacy_last_seen,omitempty"` + PrivacyPhoto string `protobuf:"bytes,3,opt,name=privacy_photo,json=privacyPhoto,proto3" json:"privacy_photo,omitempty"` + PrivacyBio string `protobuf:"bytes,4,opt,name=privacy_bio,json=privacyBio,proto3" json:"privacy_bio,omitempty"` + PrivacyCalls string `protobuf:"bytes,5,opt,name=privacy_calls,json=privacyCalls,proto3" json:"privacy_calls,omitempty"` + PrivacyGroups string `protobuf:"bytes,6,opt,name=privacy_groups,json=privacyGroups,proto3" json:"privacy_groups,omitempty"` + PrivacyVoiceMsgs string `protobuf:"bytes,7,opt,name=privacy_voice_msgs,json=privacyVoiceMsgs,proto3" json:"privacy_voice_msgs,omitempty"` + NotifyPrivateChats bool `protobuf:"varint,8,opt,name=notify_private_chats,json=notifyPrivateChats,proto3" json:"notify_private_chats,omitempty"` + NotifyGroups bool `protobuf:"varint,9,opt,name=notify_groups,json=notifyGroups,proto3" json:"notify_groups,omitempty"` + NotifyChannels bool `protobuf:"varint,10,opt,name=notify_channels,json=notifyChannels,proto3" json:"notify_channels,omitempty"` + ShowMessagePreview bool `protobuf:"varint,11,opt,name=show_message_preview,json=showMessagePreview,proto3" json:"show_message_preview,omitempty"` + Theme string `protobuf:"bytes,12,opt,name=theme,proto3" json:"theme,omitempty"` + TextSize int32 `protobuf:"varint,13,opt,name=text_size,json=textSize,proto3" json:"text_size,omitempty"` + ChatBackground *string `protobuf:"bytes,14,opt,name=chat_background,json=chatBackground,proto3,oneof" json:"chat_background,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserSettingsMessage) Reset() { + *x = UserSettingsMessage{} + mi := &file_users_users_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserSettingsMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserSettingsMessage) ProtoMessage() {} + +func (x *UserSettingsMessage) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserSettingsMessage.ProtoReflect.Descriptor instead. +func (*UserSettingsMessage) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{0} +} + +func (x *UserSettingsMessage) GetPrivacyPhone() string { + if x != nil { + return x.PrivacyPhone + } + return "" +} + +func (x *UserSettingsMessage) GetPrivacyLastSeen() string { + if x != nil { + return x.PrivacyLastSeen + } + return "" +} + +func (x *UserSettingsMessage) GetPrivacyPhoto() string { + if x != nil { + return x.PrivacyPhoto + } + return "" +} + +func (x *UserSettingsMessage) GetPrivacyBio() string { + if x != nil { + return x.PrivacyBio + } + return "" +} + +func (x *UserSettingsMessage) GetPrivacyCalls() string { + if x != nil { + return x.PrivacyCalls + } + return "" +} + +func (x *UserSettingsMessage) GetPrivacyGroups() string { + if x != nil { + return x.PrivacyGroups + } + return "" +} + +func (x *UserSettingsMessage) GetPrivacyVoiceMsgs() string { + if x != nil { + return x.PrivacyVoiceMsgs + } + return "" +} + +func (x *UserSettingsMessage) GetNotifyPrivateChats() bool { + if x != nil { + return x.NotifyPrivateChats + } + return false +} + +func (x *UserSettingsMessage) GetNotifyGroups() bool { + if x != nil { + return x.NotifyGroups + } + return false +} + +func (x *UserSettingsMessage) GetNotifyChannels() bool { + if x != nil { + return x.NotifyChannels + } + return false +} + +func (x *UserSettingsMessage) GetShowMessagePreview() bool { + if x != nil { + return x.ShowMessagePreview + } + return false +} + +func (x *UserSettingsMessage) GetTheme() string { + if x != nil { + return x.Theme + } + return "" +} + +func (x *UserSettingsMessage) GetTextSize() int32 { + if x != nil { + return x.TextSize + } + return 0 +} + +func (x *UserSettingsMessage) GetChatBackground() string { + if x != nil && x.ChatBackground != nil { + return *x.ChatBackground + } + return "" +} + type GetProfileRequest struct { state protoimpl.MessageState `protogen:"open.v1"` UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // Берется из access токена на API шлюзе @@ -30,7 +178,7 @@ type GetProfileRequest struct { func (x *GetProfileRequest) Reset() { *x = GetProfileRequest{} - mi := &file_users_users_proto_msgTypes[0] + mi := &file_users_users_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -42,7 +190,7 @@ func (x *GetProfileRequest) String() string { func (*GetProfileRequest) ProtoMessage() {} func (x *GetProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_users_users_proto_msgTypes[0] + mi := &file_users_users_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55,7 +203,7 @@ func (x *GetProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProfileRequest.ProtoReflect.Descriptor instead. func (*GetProfileRequest) Descriptor() ([]byte, []int) { - return file_users_users_proto_rawDescGZIP(), []int{0} + return file_users_users_proto_rawDescGZIP(), []int{1} } func (x *GetProfileRequest) GetUserId() string { @@ -77,13 +225,14 @@ type GetProfileResponse struct { Language string `protobuf:"bytes,8,opt,name=language,proto3" json:"language,omitempty"` CustomStatusText *string `protobuf:"bytes,9,opt,name=custom_status_text,json=customStatusText,proto3,oneof" json:"custom_status_text,omitempty"` CustomStatusEmoji *string `protobuf:"bytes,10,opt,name=custom_status_emoji,json=customStatusEmoji,proto3,oneof" json:"custom_status_emoji,omitempty"` + Settings *UserSettingsMessage `protobuf:"bytes,11,opt,name=settings,proto3,oneof" json:"settings,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetProfileResponse) Reset() { *x = GetProfileResponse{} - mi := &file_users_users_proto_msgTypes[1] + mi := &file_users_users_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -95,7 +244,7 @@ func (x *GetProfileResponse) String() string { func (*GetProfileResponse) ProtoMessage() {} func (x *GetProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_users_users_proto_msgTypes[1] + mi := &file_users_users_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108,7 +257,7 @@ func (x *GetProfileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetProfileResponse.ProtoReflect.Descriptor instead. func (*GetProfileResponse) Descriptor() ([]byte, []int) { - return file_users_users_proto_rawDescGZIP(), []int{1} + return file_users_users_proto_rawDescGZIP(), []int{2} } func (x *GetProfileResponse) GetId() string { @@ -181,6 +330,13 @@ func (x *GetProfileResponse) GetCustomStatusEmoji() string { return "" } +func (x *GetProfileResponse) GetSettings() *UserSettingsMessage { + if x != nil { + return x.Settings + } + return nil +} + type UpdateProfileRequest struct { state protoimpl.MessageState `protogen:"open.v1"` UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` @@ -193,13 +349,14 @@ type UpdateProfileRequest struct { Timezone *string `protobuf:"bytes,8,opt,name=timezone,proto3,oneof" json:"timezone,omitempty"` Language *string `protobuf:"bytes,9,opt,name=language,proto3,oneof" json:"language,omitempty"` IsPublic *bool `protobuf:"varint,10,opt,name=is_public,json=isPublic,proto3,oneof" json:"is_public,omitempty"` + Settings *UserSettingsMessage `protobuf:"bytes,11,opt,name=settings,proto3,oneof" json:"settings,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *UpdateProfileRequest) Reset() { *x = UpdateProfileRequest{} - mi := &file_users_users_proto_msgTypes[2] + mi := &file_users_users_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -211,7 +368,7 @@ func (x *UpdateProfileRequest) String() string { func (*UpdateProfileRequest) ProtoMessage() {} func (x *UpdateProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_users_users_proto_msgTypes[2] + mi := &file_users_users_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -224,7 +381,7 @@ func (x *UpdateProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateProfileRequest.ProtoReflect.Descriptor instead. func (*UpdateProfileRequest) Descriptor() ([]byte, []int) { - return file_users_users_proto_rawDescGZIP(), []int{2} + return file_users_users_proto_rawDescGZIP(), []int{3} } func (x *UpdateProfileRequest) GetUserId() string { @@ -297,6 +454,13 @@ func (x *UpdateProfileRequest) GetIsPublic() bool { return false } +func (x *UpdateProfileRequest) GetSettings() *UserSettingsMessage { + if x != nil { + return x.Settings + } + return nil +} + type UpdateProfileResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` @@ -307,7 +471,7 @@ type UpdateProfileResponse struct { func (x *UpdateProfileResponse) Reset() { *x = UpdateProfileResponse{} - mi := &file_users_users_proto_msgTypes[3] + mi := &file_users_users_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -319,7 +483,7 @@ func (x *UpdateProfileResponse) String() string { func (*UpdateProfileResponse) ProtoMessage() {} func (x *UpdateProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_users_users_proto_msgTypes[3] + mi := &file_users_users_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -332,7 +496,7 @@ func (x *UpdateProfileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateProfileResponse.ProtoReflect.Descriptor instead. func (*UpdateProfileResponse) Descriptor() ([]byte, []int) { - return file_users_users_proto_rawDescGZIP(), []int{3} + return file_users_users_proto_rawDescGZIP(), []int{4} } func (x *UpdateProfileResponse) GetSuccess() bool { @@ -363,7 +527,7 @@ type CreateProfileRequest struct { func (x *CreateProfileRequest) Reset() { *x = CreateProfileRequest{} - mi := &file_users_users_proto_msgTypes[4] + mi := &file_users_users_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -375,7 +539,7 @@ func (x *CreateProfileRequest) String() string { func (*CreateProfileRequest) ProtoMessage() {} func (x *CreateProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_users_users_proto_msgTypes[4] + mi := &file_users_users_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -388,7 +552,7 @@ func (x *CreateProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateProfileRequest.ProtoReflect.Descriptor instead. func (*CreateProfileRequest) Descriptor() ([]byte, []int) { - return file_users_users_proto_rawDescGZIP(), []int{4} + return file_users_users_proto_rawDescGZIP(), []int{5} } func (x *CreateProfileRequest) GetUserId() string { @@ -435,7 +599,7 @@ type CreateProfileResponse struct { func (x *CreateProfileResponse) Reset() { *x = CreateProfileResponse{} - mi := &file_users_users_proto_msgTypes[5] + mi := &file_users_users_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -447,7 +611,7 @@ func (x *CreateProfileResponse) String() string { func (*CreateProfileResponse) ProtoMessage() {} func (x *CreateProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_users_users_proto_msgTypes[5] + mi := &file_users_users_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -460,7 +624,7 @@ func (x *CreateProfileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateProfileResponse.ProtoReflect.Descriptor instead. func (*CreateProfileResponse) Descriptor() ([]byte, []int) { - return file_users_users_proto_rawDescGZIP(), []int{5} + return file_users_users_proto_rawDescGZIP(), []int{6} } func (x *CreateProfileResponse) GetSuccess() bool { @@ -479,7 +643,7 @@ type SoftDeleteProfileRequest struct { func (x *SoftDeleteProfileRequest) Reset() { *x = SoftDeleteProfileRequest{} - mi := &file_users_users_proto_msgTypes[6] + mi := &file_users_users_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -491,7 +655,7 @@ func (x *SoftDeleteProfileRequest) String() string { func (*SoftDeleteProfileRequest) ProtoMessage() {} func (x *SoftDeleteProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_users_users_proto_msgTypes[6] + mi := &file_users_users_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -504,7 +668,7 @@ func (x *SoftDeleteProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SoftDeleteProfileRequest.ProtoReflect.Descriptor instead. func (*SoftDeleteProfileRequest) Descriptor() ([]byte, []int) { - return file_users_users_proto_rawDescGZIP(), []int{6} + return file_users_users_proto_rawDescGZIP(), []int{7} } func (x *SoftDeleteProfileRequest) GetUserId() string { @@ -523,7 +687,7 @@ type SoftDeleteProfileResponse struct { func (x *SoftDeleteProfileResponse) Reset() { *x = SoftDeleteProfileResponse{} - mi := &file_users_users_proto_msgTypes[7] + mi := &file_users_users_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -535,7 +699,7 @@ func (x *SoftDeleteProfileResponse) String() string { func (*SoftDeleteProfileResponse) ProtoMessage() {} func (x *SoftDeleteProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_users_users_proto_msgTypes[7] + mi := &file_users_users_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -548,7 +712,7 @@ func (x *SoftDeleteProfileResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SoftDeleteProfileResponse.ProtoReflect.Descriptor instead. func (*SoftDeleteProfileResponse) Descriptor() ([]byte, []int) { - return file_users_users_proto_rawDescGZIP(), []int{7} + return file_users_users_proto_rawDescGZIP(), []int{8} } func (x *SoftDeleteProfileResponse) GetSuccess() bool { @@ -558,13 +722,607 @@ func (x *SoftDeleteProfileResponse) GetSuccess() bool { return false } +type ContactItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + ContactId string `protobuf:"bytes,1,opt,name=contact_id,json=contactId,proto3" json:"contact_id,omitempty"` + Alias *string `protobuf:"bytes,2,opt,name=alias,proto3,oneof" json:"alias,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContactItem) Reset() { + *x = ContactItem{} + mi := &file_users_users_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContactItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContactItem) ProtoMessage() {} + +func (x *ContactItem) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContactItem.ProtoReflect.Descriptor instead. +func (*ContactItem) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{9} +} + +func (x *ContactItem) GetContactId() string { + if x != nil { + return x.ContactId + } + return "" +} + +func (x *ContactItem) GetAlias() string { + if x != nil && x.Alias != nil { + return *x.Alias + } + return "" +} + +type AddContactRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ContactId string `protobuf:"bytes,2,opt,name=contact_id,json=contactId,proto3" json:"contact_id,omitempty"` + Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddContactRequest) Reset() { + *x = AddContactRequest{} + mi := &file_users_users_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddContactRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddContactRequest) ProtoMessage() {} + +func (x *AddContactRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddContactRequest.ProtoReflect.Descriptor instead. +func (*AddContactRequest) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{10} +} + +func (x *AddContactRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *AddContactRequest) GetContactId() string { + if x != nil { + return x.ContactId + } + return "" +} + +func (x *AddContactRequest) GetAlias() string { + if x != nil && x.Alias != nil { + return *x.Alias + } + return "" +} + +type AddContactResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddContactResponse) Reset() { + *x = AddContactResponse{} + mi := &file_users_users_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddContactResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddContactResponse) ProtoMessage() {} + +func (x *AddContactResponse) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddContactResponse.ProtoReflect.Descriptor instead. +func (*AddContactResponse) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{11} +} + +func (x *AddContactResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type GetContactsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetContactsRequest) Reset() { + *x = GetContactsRequest{} + mi := &file_users_users_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetContactsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetContactsRequest) ProtoMessage() {} + +func (x *GetContactsRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetContactsRequest.ProtoReflect.Descriptor instead. +func (*GetContactsRequest) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{12} +} + +func (x *GetContactsRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type GetContactsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Contacts []*ContactItem `protobuf:"bytes,1,rep,name=contacts,proto3" json:"contacts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetContactsResponse) Reset() { + *x = GetContactsResponse{} + mi := &file_users_users_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetContactsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetContactsResponse) ProtoMessage() {} + +func (x *GetContactsResponse) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetContactsResponse.ProtoReflect.Descriptor instead. +func (*GetContactsResponse) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{13} +} + +func (x *GetContactsResponse) GetContacts() []*ContactItem { + if x != nil { + return x.Contacts + } + return nil +} + +type BlockedUserItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockedId string `protobuf:"bytes,1,opt,name=blocked_id,json=blockedId,proto3" json:"blocked_id,omitempty"` + BlockedAt string `protobuf:"bytes,2,opt,name=blocked_at,json=blockedAt,proto3" json:"blocked_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockedUserItem) Reset() { + *x = BlockedUserItem{} + mi := &file_users_users_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockedUserItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockedUserItem) ProtoMessage() {} + +func (x *BlockedUserItem) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockedUserItem.ProtoReflect.Descriptor instead. +func (*BlockedUserItem) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{14} +} + +func (x *BlockedUserItem) GetBlockedId() string { + if x != nil { + return x.BlockedId + } + return "" +} + +func (x *BlockedUserItem) GetBlockedAt() string { + if x != nil { + return x.BlockedAt + } + return "" +} + +type BlockUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockerId string `protobuf:"bytes,1,opt,name=blocker_id,json=blockerId,proto3" json:"blocker_id,omitempty"` + BlockedId string `protobuf:"bytes,2,opt,name=blocked_id,json=blockedId,proto3" json:"blocked_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockUserRequest) Reset() { + *x = BlockUserRequest{} + mi := &file_users_users_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockUserRequest) ProtoMessage() {} + +func (x *BlockUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockUserRequest.ProtoReflect.Descriptor instead. +func (*BlockUserRequest) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{15} +} + +func (x *BlockUserRequest) GetBlockerId() string { + if x != nil { + return x.BlockerId + } + return "" +} + +func (x *BlockUserRequest) GetBlockedId() string { + if x != nil { + return x.BlockedId + } + return "" +} + +type BlockUserResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockUserResponse) Reset() { + *x = BlockUserResponse{} + mi := &file_users_users_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockUserResponse) ProtoMessage() {} + +func (x *BlockUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockUserResponse.ProtoReflect.Descriptor instead. +func (*BlockUserResponse) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{16} +} + +func (x *BlockUserResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type UnblockUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockerId string `protobuf:"bytes,1,opt,name=blocker_id,json=blockerId,proto3" json:"blocker_id,omitempty"` + BlockedId string `protobuf:"bytes,2,opt,name=blocked_id,json=blockedId,proto3" json:"blocked_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnblockUserRequest) Reset() { + *x = UnblockUserRequest{} + mi := &file_users_users_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnblockUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnblockUserRequest) ProtoMessage() {} + +func (x *UnblockUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnblockUserRequest.ProtoReflect.Descriptor instead. +func (*UnblockUserRequest) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{17} +} + +func (x *UnblockUserRequest) GetBlockerId() string { + if x != nil { + return x.BlockerId + } + return "" +} + +func (x *UnblockUserRequest) GetBlockedId() string { + if x != nil { + return x.BlockedId + } + return "" +} + +type UnblockUserResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnblockUserResponse) Reset() { + *x = UnblockUserResponse{} + mi := &file_users_users_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnblockUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnblockUserResponse) ProtoMessage() {} + +func (x *UnblockUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnblockUserResponse.ProtoReflect.Descriptor instead. +func (*UnblockUserResponse) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{18} +} + +func (x *UnblockUserResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type GetBlockedUsersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockerId string `protobuf:"bytes,1,opt,name=blocker_id,json=blockerId,proto3" json:"blocker_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBlockedUsersRequest) Reset() { + *x = GetBlockedUsersRequest{} + mi := &file_users_users_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBlockedUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockedUsersRequest) ProtoMessage() {} + +func (x *GetBlockedUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockedUsersRequest.ProtoReflect.Descriptor instead. +func (*GetBlockedUsersRequest) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{19} +} + +func (x *GetBlockedUsersRequest) GetBlockerId() string { + if x != nil { + return x.BlockerId + } + return "" +} + +type GetBlockedUsersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockedUsers []*BlockedUserItem `protobuf:"bytes,1,rep,name=blocked_users,json=blockedUsers,proto3" json:"blocked_users,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBlockedUsersResponse) Reset() { + *x = GetBlockedUsersResponse{} + mi := &file_users_users_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBlockedUsersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockedUsersResponse) ProtoMessage() {} + +func (x *GetBlockedUsersResponse) ProtoReflect() protoreflect.Message { + mi := &file_users_users_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBlockedUsersResponse.ProtoReflect.Descriptor instead. +func (*GetBlockedUsersResponse) Descriptor() ([]byte, []int) { + return file_users_users_proto_rawDescGZIP(), []int{20} +} + +func (x *GetBlockedUsersResponse) GetBlockedUsers() []*BlockedUserItem { + if x != nil { + return x.BlockedUsers + } + return nil +} + var File_users_users_proto protoreflect.FileDescriptor const file_users_users_proto_rawDesc = "" + "\n" + - "\x11users/users.proto\x12\busers.v1\",\n" + + "\x11users/users.proto\x12\busers.v1\"\xcd\x04\n" + + "\x13UserSettingsMessage\x12#\n" + + "\rprivacy_phone\x18\x01 \x01(\tR\fprivacyPhone\x12*\n" + + "\x11privacy_last_seen\x18\x02 \x01(\tR\x0fprivacyLastSeen\x12#\n" + + "\rprivacy_photo\x18\x03 \x01(\tR\fprivacyPhoto\x12\x1f\n" + + "\vprivacy_bio\x18\x04 \x01(\tR\n" + + "privacyBio\x12#\n" + + "\rprivacy_calls\x18\x05 \x01(\tR\fprivacyCalls\x12%\n" + + "\x0eprivacy_groups\x18\x06 \x01(\tR\rprivacyGroups\x12,\n" + + "\x12privacy_voice_msgs\x18\a \x01(\tR\x10privacyVoiceMsgs\x120\n" + + "\x14notify_private_chats\x18\b \x01(\bR\x12notifyPrivateChats\x12#\n" + + "\rnotify_groups\x18\t \x01(\bR\fnotifyGroups\x12'\n" + + "\x0fnotify_channels\x18\n" + + " \x01(\bR\x0enotifyChannels\x120\n" + + "\x14show_message_preview\x18\v \x01(\bR\x12showMessagePreview\x12\x14\n" + + "\x05theme\x18\f \x01(\tR\x05theme\x12\x1b\n" + + "\ttext_size\x18\r \x01(\x05R\btextSize\x12,\n" + + "\x0fchat_background\x18\x0e \x01(\tH\x00R\x0echatBackground\x88\x01\x01B\x12\n" + + "\x10_chat_background\",\n" + "\x11GetProfileRequest\x12\x17\n" + - "\auser_id\x18\x01 \x01(\tR\x06userId\"\xbd\x03\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\"\x8a\x04\n" + "\x12GetProfileResponse\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x19\n" + "\x05email\x18\x02 \x01(\tH\x00R\x05email\x88\x01\x01\x12\x19\n" + @@ -577,14 +1335,16 @@ const file_users_users_proto_rawDesc = "" + "\blanguage\x18\b \x01(\tR\blanguage\x121\n" + "\x12custom_status_text\x18\t \x01(\tH\x04R\x10customStatusText\x88\x01\x01\x123\n" + "\x13custom_status_emoji\x18\n" + - " \x01(\tH\x05R\x11customStatusEmoji\x88\x01\x01B\b\n" + + " \x01(\tH\x05R\x11customStatusEmoji\x88\x01\x01\x12>\n" + + "\bsettings\x18\v \x01(\v2\x1d.users.v1.UserSettingsMessageH\x06R\bsettings\x88\x01\x01B\b\n" + "\x06_emailB\b\n" + "\x06_phoneB\f\n" + "\n" + "_full_nameB\r\n" + "\v_avatar_urlB\x15\n" + "\x13_custom_status_textB\x16\n" + - "\x14_custom_status_emoji\"\xff\x03\n" + + "\x14_custom_status_emojiB\v\n" + + "\t_settings\"\xcc\x04\n" + "\x14UpdateProfileRequest\x12\x17\n" + "\auser_id\x18\x01 \x01(\tR\x06userId\x12\x19\n" + "\x05email\x18\x02 \x01(\tH\x00R\x05email\x88\x01\x01\x12\x19\n" + @@ -597,7 +1357,8 @@ const file_users_users_proto_rawDesc = "" + "\btimezone\x18\b \x01(\tH\x06R\btimezone\x88\x01\x01\x12\x1f\n" + "\blanguage\x18\t \x01(\tH\aR\blanguage\x88\x01\x01\x12 \n" + "\tis_public\x18\n" + - " \x01(\bH\bR\bisPublic\x88\x01\x01B\b\n" + + " \x01(\bH\bR\bisPublic\x88\x01\x01\x12>\n" + + "\bsettings\x18\v \x01(\v2\x1d.users.v1.UserSettingsMessageH\tR\bsettings\x88\x01\x01B\b\n" + "\x06_emailB\b\n" + "\x06_phoneB\f\n" + "\n" + @@ -608,7 +1369,8 @@ const file_users_users_proto_rawDesc = "" + "\t_timezoneB\v\n" + "\t_languageB\f\n" + "\n" + - "_is_public\"K\n" + + "_is_publicB\v\n" + + "\t_settings\"K\n" + "\x15UpdateProfileResponse\x12\x18\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + "\amessage\x18\x02 \x01(\tR\amessage\"\xdc\x01\n" + @@ -629,13 +1391,60 @@ const file_users_users_proto_rawDesc = "" + "\x18SoftDeleteProfileRequest\x12\x17\n" + "\auser_id\x18\x01 \x01(\tR\x06userId\"5\n" + "\x19SoftDeleteProfileResponse\x12\x18\n" + - "\asuccess\x18\x01 \x01(\bR\asuccess2\xd9\x02\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"Q\n" + + "\vContactItem\x12\x1d\n" + + "\n" + + "contact_id\x18\x01 \x01(\tR\tcontactId\x12\x19\n" + + "\x05alias\x18\x02 \x01(\tH\x00R\x05alias\x88\x01\x01B\b\n" + + "\x06_alias\"p\n" + + "\x11AddContactRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\x12\x1d\n" + + "\n" + + "contact_id\x18\x02 \x01(\tR\tcontactId\x12\x19\n" + + "\x05alias\x18\x03 \x01(\tH\x00R\x05alias\x88\x01\x01B\b\n" + + "\x06_alias\".\n" + + "\x12AddContactResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"-\n" + + "\x12GetContactsRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\"H\n" + + "\x13GetContactsResponse\x121\n" + + "\bcontacts\x18\x01 \x03(\v2\x15.users.v1.ContactItemR\bcontacts\"O\n" + + "\x0fBlockedUserItem\x12\x1d\n" + + "\n" + + "blocked_id\x18\x01 \x01(\tR\tblockedId\x12\x1d\n" + + "\n" + + "blocked_at\x18\x02 \x01(\tR\tblockedAt\"P\n" + + "\x10BlockUserRequest\x12\x1d\n" + + "\n" + + "blocker_id\x18\x01 \x01(\tR\tblockerId\x12\x1d\n" + + "\n" + + "blocked_id\x18\x02 \x01(\tR\tblockedId\"-\n" + + "\x11BlockUserResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"R\n" + + "\x12UnblockUserRequest\x12\x1d\n" + + "\n" + + "blocker_id\x18\x01 \x01(\tR\tblockerId\x12\x1d\n" + + "\n" + + "blocked_id\x18\x02 \x01(\tR\tblockedId\"/\n" + + "\x13UnblockUserResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"7\n" + + "\x16GetBlockedUsersRequest\x12\x1d\n" + + "\n" + + "blocker_id\x18\x01 \x01(\tR\tblockerId\"Y\n" + + "\x17GetBlockedUsersResponse\x12>\n" + + "\rblocked_users\x18\x01 \x03(\v2\x19.users.v1.BlockedUserItemR\fblockedUsers2\xd8\x05\n" + "\fUsersService\x12G\n" + "\n" + "GetProfile\x12\x1b.users.v1.GetProfileRequest\x1a\x1c.users.v1.GetProfileResponse\x12P\n" + "\rUpdateProfile\x12\x1e.users.v1.UpdateProfileRequest\x1a\x1f.users.v1.UpdateProfileResponse\x12P\n" + "\rCreateProfile\x12\x1e.users.v1.CreateProfileRequest\x1a\x1f.users.v1.CreateProfileResponse\x12\\\n" + - "\x11SoftDeleteProfile\x12\".users.v1.SoftDeleteProfileRequest\x1a#.users.v1.SoftDeleteProfileResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3" + "\x11SoftDeleteProfile\x12\".users.v1.SoftDeleteProfileRequest\x1a#.users.v1.SoftDeleteProfileResponse\x12D\n" + + "\tBlockUser\x12\x1a.users.v1.BlockUserRequest\x1a\x1b.users.v1.BlockUserResponse\x12J\n" + + "\vUnblockUser\x12\x1c.users.v1.UnblockUserRequest\x1a\x1d.users.v1.UnblockUserResponse\x12V\n" + + "\x0fGetBlockedUsers\x12 .users.v1.GetBlockedUsersRequest\x1a!.users.v1.GetBlockedUsersResponse\x12G\n" + + "\n" + + "AddContact\x12\x1b.users.v1.AddContactRequest\x1a\x1c.users.v1.AddContactResponse\x12J\n" + + "\vGetContacts\x12\x1c.users.v1.GetContactsRequest\x1a\x1d.users.v1.GetContactsResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3" var ( file_users_users_proto_rawDescOnce sync.Once @@ -649,31 +1458,58 @@ func file_users_users_proto_rawDescGZIP() []byte { return file_users_users_proto_rawDescData } -var file_users_users_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_users_users_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_users_users_proto_goTypes = []any{ - (*GetProfileRequest)(nil), // 0: users.v1.GetProfileRequest - (*GetProfileResponse)(nil), // 1: users.v1.GetProfileResponse - (*UpdateProfileRequest)(nil), // 2: users.v1.UpdateProfileRequest - (*UpdateProfileResponse)(nil), // 3: users.v1.UpdateProfileResponse - (*CreateProfileRequest)(nil), // 4: users.v1.CreateProfileRequest - (*CreateProfileResponse)(nil), // 5: users.v1.CreateProfileResponse - (*SoftDeleteProfileRequest)(nil), // 6: users.v1.SoftDeleteProfileRequest - (*SoftDeleteProfileResponse)(nil), // 7: users.v1.SoftDeleteProfileResponse + (*UserSettingsMessage)(nil), // 0: users.v1.UserSettingsMessage + (*GetProfileRequest)(nil), // 1: users.v1.GetProfileRequest + (*GetProfileResponse)(nil), // 2: users.v1.GetProfileResponse + (*UpdateProfileRequest)(nil), // 3: users.v1.UpdateProfileRequest + (*UpdateProfileResponse)(nil), // 4: users.v1.UpdateProfileResponse + (*CreateProfileRequest)(nil), // 5: users.v1.CreateProfileRequest + (*CreateProfileResponse)(nil), // 6: users.v1.CreateProfileResponse + (*SoftDeleteProfileRequest)(nil), // 7: users.v1.SoftDeleteProfileRequest + (*SoftDeleteProfileResponse)(nil), // 8: users.v1.SoftDeleteProfileResponse + (*ContactItem)(nil), // 9: users.v1.ContactItem + (*AddContactRequest)(nil), // 10: users.v1.AddContactRequest + (*AddContactResponse)(nil), // 11: users.v1.AddContactResponse + (*GetContactsRequest)(nil), // 12: users.v1.GetContactsRequest + (*GetContactsResponse)(nil), // 13: users.v1.GetContactsResponse + (*BlockedUserItem)(nil), // 14: users.v1.BlockedUserItem + (*BlockUserRequest)(nil), // 15: users.v1.BlockUserRequest + (*BlockUserResponse)(nil), // 16: users.v1.BlockUserResponse + (*UnblockUserRequest)(nil), // 17: users.v1.UnblockUserRequest + (*UnblockUserResponse)(nil), // 18: users.v1.UnblockUserResponse + (*GetBlockedUsersRequest)(nil), // 19: users.v1.GetBlockedUsersRequest + (*GetBlockedUsersResponse)(nil), // 20: users.v1.GetBlockedUsersResponse } var file_users_users_proto_depIdxs = []int32{ - 0, // 0: users.v1.UsersService.GetProfile:input_type -> users.v1.GetProfileRequest - 2, // 1: users.v1.UsersService.UpdateProfile:input_type -> users.v1.UpdateProfileRequest - 4, // 2: users.v1.UsersService.CreateProfile:input_type -> users.v1.CreateProfileRequest - 6, // 3: users.v1.UsersService.SoftDeleteProfile:input_type -> users.v1.SoftDeleteProfileRequest - 1, // 4: users.v1.UsersService.GetProfile:output_type -> users.v1.GetProfileResponse - 3, // 5: users.v1.UsersService.UpdateProfile:output_type -> users.v1.UpdateProfileResponse - 5, // 6: users.v1.UsersService.CreateProfile:output_type -> users.v1.CreateProfileResponse - 7, // 7: users.v1.UsersService.SoftDeleteProfile:output_type -> users.v1.SoftDeleteProfileResponse - 4, // [4:8] is the sub-list for method output_type - 0, // [0:4] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: users.v1.GetProfileResponse.settings:type_name -> users.v1.UserSettingsMessage + 0, // 1: users.v1.UpdateProfileRequest.settings:type_name -> users.v1.UserSettingsMessage + 9, // 2: users.v1.GetContactsResponse.contacts:type_name -> users.v1.ContactItem + 14, // 3: users.v1.GetBlockedUsersResponse.blocked_users:type_name -> users.v1.BlockedUserItem + 1, // 4: users.v1.UsersService.GetProfile:input_type -> users.v1.GetProfileRequest + 3, // 5: users.v1.UsersService.UpdateProfile:input_type -> users.v1.UpdateProfileRequest + 5, // 6: users.v1.UsersService.CreateProfile:input_type -> users.v1.CreateProfileRequest + 7, // 7: users.v1.UsersService.SoftDeleteProfile:input_type -> users.v1.SoftDeleteProfileRequest + 15, // 8: users.v1.UsersService.BlockUser:input_type -> users.v1.BlockUserRequest + 17, // 9: users.v1.UsersService.UnblockUser:input_type -> users.v1.UnblockUserRequest + 19, // 10: users.v1.UsersService.GetBlockedUsers:input_type -> users.v1.GetBlockedUsersRequest + 10, // 11: users.v1.UsersService.AddContact:input_type -> users.v1.AddContactRequest + 12, // 12: users.v1.UsersService.GetContacts:input_type -> users.v1.GetContactsRequest + 2, // 13: users.v1.UsersService.GetProfile:output_type -> users.v1.GetProfileResponse + 4, // 14: users.v1.UsersService.UpdateProfile:output_type -> users.v1.UpdateProfileResponse + 6, // 15: users.v1.UsersService.CreateProfile:output_type -> users.v1.CreateProfileResponse + 8, // 16: users.v1.UsersService.SoftDeleteProfile:output_type -> users.v1.SoftDeleteProfileResponse + 16, // 17: users.v1.UsersService.BlockUser:output_type -> users.v1.BlockUserResponse + 18, // 18: users.v1.UsersService.UnblockUser:output_type -> users.v1.UnblockUserResponse + 20, // 19: users.v1.UsersService.GetBlockedUsers:output_type -> users.v1.GetBlockedUsersResponse + 11, // 20: users.v1.UsersService.AddContact:output_type -> users.v1.AddContactResponse + 13, // 21: users.v1.UsersService.GetContacts:output_type -> users.v1.GetContactsResponse + 13, // [13:22] is the sub-list for method output_type + 4, // [4:13] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_users_users_proto_init() } @@ -681,16 +1517,19 @@ func file_users_users_proto_init() { if File_users_users_proto != nil { return } - file_users_users_proto_msgTypes[1].OneofWrappers = []any{} + file_users_users_proto_msgTypes[0].OneofWrappers = []any{} file_users_users_proto_msgTypes[2].OneofWrappers = []any{} - file_users_users_proto_msgTypes[4].OneofWrappers = []any{} + file_users_users_proto_msgTypes[3].OneofWrappers = []any{} + file_users_users_proto_msgTypes[5].OneofWrappers = []any{} + file_users_users_proto_msgTypes[9].OneofWrappers = []any{} + file_users_users_proto_msgTypes[10].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_users_users_proto_rawDesc), len(file_users_users_proto_rawDesc)), NumEnums: 0, - NumMessages: 8, + NumMessages: 21, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/go/users/users_grpc.pb.go b/gen/go/users/users_grpc.pb.go index 8c86518..71d9c73 100644 --- a/gen/go/users/users_grpc.pb.go +++ b/gen/go/users/users_grpc.pb.go @@ -23,6 +23,11 @@ const ( UsersService_UpdateProfile_FullMethodName = "/users.v1.UsersService/UpdateProfile" UsersService_CreateProfile_FullMethodName = "/users.v1.UsersService/CreateProfile" UsersService_SoftDeleteProfile_FullMethodName = "/users.v1.UsersService/SoftDeleteProfile" + UsersService_BlockUser_FullMethodName = "/users.v1.UsersService/BlockUser" + UsersService_UnblockUser_FullMethodName = "/users.v1.UsersService/UnblockUser" + UsersService_GetBlockedUsers_FullMethodName = "/users.v1.UsersService/GetBlockedUsers" + UsersService_AddContact_FullMethodName = "/users.v1.UsersService/AddContact" + UsersService_GetContacts_FullMethodName = "/users.v1.UsersService/GetContacts" ) // UsersServiceClient is the client API for UsersService service. @@ -34,6 +39,12 @@ type UsersServiceClient interface { // Для системного использования (вызывается из Auth/Admin) CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*CreateProfileResponse, error) SoftDeleteProfile(ctx context.Context, in *SoftDeleteProfileRequest, opts ...grpc.CallOption) (*SoftDeleteProfileResponse, error) + // --- НОВЫЕ МЕТОДЫ МЕССЕНДЖЕРА --- + BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error) + UnblockUser(ctx context.Context, in *UnblockUserRequest, opts ...grpc.CallOption) (*UnblockUserResponse, error) + GetBlockedUsers(ctx context.Context, in *GetBlockedUsersRequest, opts ...grpc.CallOption) (*GetBlockedUsersResponse, error) + AddContact(ctx context.Context, in *AddContactRequest, opts ...grpc.CallOption) (*AddContactResponse, error) + GetContacts(ctx context.Context, in *GetContactsRequest, opts ...grpc.CallOption) (*GetContactsResponse, error) } type usersServiceClient struct { @@ -84,6 +95,56 @@ func (c *usersServiceClient) SoftDeleteProfile(ctx context.Context, in *SoftDele return out, nil } +func (c *usersServiceClient) BlockUser(ctx context.Context, in *BlockUserRequest, opts ...grpc.CallOption) (*BlockUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BlockUserResponse) + err := c.cc.Invoke(ctx, UsersService_BlockUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) UnblockUser(ctx context.Context, in *UnblockUserRequest, opts ...grpc.CallOption) (*UnblockUserResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UnblockUserResponse) + err := c.cc.Invoke(ctx, UsersService_UnblockUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) GetBlockedUsers(ctx context.Context, in *GetBlockedUsersRequest, opts ...grpc.CallOption) (*GetBlockedUsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBlockedUsersResponse) + err := c.cc.Invoke(ctx, UsersService_GetBlockedUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) AddContact(ctx context.Context, in *AddContactRequest, opts ...grpc.CallOption) (*AddContactResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AddContactResponse) + err := c.cc.Invoke(ctx, UsersService_AddContact_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *usersServiceClient) GetContacts(ctx context.Context, in *GetContactsRequest, opts ...grpc.CallOption) (*GetContactsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetContactsResponse) + err := c.cc.Invoke(ctx, UsersService_GetContacts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // UsersServiceServer is the server API for UsersService service. // All implementations must embed UnimplementedUsersServiceServer // for forward compatibility. @@ -93,6 +154,12 @@ type UsersServiceServer interface { // Для системного использования (вызывается из Auth/Admin) CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error) SoftDeleteProfile(context.Context, *SoftDeleteProfileRequest) (*SoftDeleteProfileResponse, error) + // --- НОВЫЕ МЕТОДЫ МЕССЕНДЖЕРА --- + BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error) + UnblockUser(context.Context, *UnblockUserRequest) (*UnblockUserResponse, error) + GetBlockedUsers(context.Context, *GetBlockedUsersRequest) (*GetBlockedUsersResponse, error) + AddContact(context.Context, *AddContactRequest) (*AddContactResponse, error) + GetContacts(context.Context, *GetContactsRequest) (*GetContactsResponse, error) mustEmbedUnimplementedUsersServiceServer() } @@ -115,6 +182,21 @@ func (UnimplementedUsersServiceServer) CreateProfile(context.Context, *CreatePro func (UnimplementedUsersServiceServer) SoftDeleteProfile(context.Context, *SoftDeleteProfileRequest) (*SoftDeleteProfileResponse, error) { return nil, status.Error(codes.Unimplemented, "method SoftDeleteProfile not implemented") } +func (UnimplementedUsersServiceServer) BlockUser(context.Context, *BlockUserRequest) (*BlockUserResponse, error) { + return nil, status.Error(codes.Unimplemented, "method BlockUser not implemented") +} +func (UnimplementedUsersServiceServer) UnblockUser(context.Context, *UnblockUserRequest) (*UnblockUserResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UnblockUser not implemented") +} +func (UnimplementedUsersServiceServer) GetBlockedUsers(context.Context, *GetBlockedUsersRequest) (*GetBlockedUsersResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetBlockedUsers not implemented") +} +func (UnimplementedUsersServiceServer) AddContact(context.Context, *AddContactRequest) (*AddContactResponse, error) { + return nil, status.Error(codes.Unimplemented, "method AddContact not implemented") +} +func (UnimplementedUsersServiceServer) GetContacts(context.Context, *GetContactsRequest) (*GetContactsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetContacts not implemented") +} func (UnimplementedUsersServiceServer) mustEmbedUnimplementedUsersServiceServer() {} func (UnimplementedUsersServiceServer) testEmbeddedByValue() {} @@ -208,6 +290,96 @@ func _UsersService_SoftDeleteProfile_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _UsersService_BlockUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlockUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).BlockUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_BlockUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).BlockUser(ctx, req.(*BlockUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_UnblockUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnblockUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).UnblockUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_UnblockUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).UnblockUser(ctx, req.(*UnblockUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_GetBlockedUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockedUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).GetBlockedUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_GetBlockedUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).GetBlockedUsers(ctx, req.(*GetBlockedUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_AddContact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddContactRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).AddContact(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_AddContact_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).AddContact(ctx, req.(*AddContactRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UsersService_GetContacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetContactsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UsersServiceServer).GetContacts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UsersService_GetContacts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UsersServiceServer).GetContacts(ctx, req.(*GetContactsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // UsersService_ServiceDesc is the grpc.ServiceDesc for UsersService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -231,6 +403,26 @@ var UsersService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SoftDeleteProfile", Handler: _UsersService_SoftDeleteProfile_Handler, }, + { + MethodName: "BlockUser", + Handler: _UsersService_BlockUser_Handler, + }, + { + MethodName: "UnblockUser", + Handler: _UsersService_UnblockUser_Handler, + }, + { + MethodName: "GetBlockedUsers", + Handler: _UsersService_GetBlockedUsers_Handler, + }, + { + MethodName: "AddContact", + Handler: _UsersService_AddContact_Handler, + }, + { + MethodName: "GetContacts", + Handler: _UsersService_GetContacts_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "users/users.proto", diff --git a/gen/users/users.ts b/gen/users/users.ts index ea80386..79f4237 100644 --- a/gen/users/users.ts +++ b/gen/users/users.ts @@ -11,6 +11,23 @@ import { Observable } from "rxjs"; export const protobufPackage = "users.v1"; +export interface UserSettingsMessage { + privacyPhone: string; + privacyLastSeen: string; + privacyPhoto: string; + privacyBio: string; + privacyCalls: string; + privacyGroups: string; + privacyVoiceMsgs: string; + notifyPrivateChats: boolean; + notifyGroups: boolean; + notifyChannels: boolean; + showMessagePreview: boolean; + theme: string; + textSize: number; + chatBackground?: string | undefined; +} + export interface GetProfileRequest { /** Берется из access токена на API шлюзе */ userId: string; @@ -27,6 +44,7 @@ export interface GetProfileResponse { language: string; customStatusText?: string | undefined; customStatusEmoji?: string | undefined; + settings?: UserSettingsMessage | undefined; } export interface UpdateProfileRequest { @@ -40,6 +58,7 @@ export interface UpdateProfileRequest { timezone?: string | undefined; language?: string | undefined; isPublic?: boolean | undefined; + settings?: UserSettingsMessage | undefined; } export interface UpdateProfileResponse { @@ -69,6 +88,60 @@ export interface SoftDeleteProfileResponse { success: boolean; } +export interface ContactItem { + contactId: string; + alias?: string | undefined; +} + +export interface AddContactRequest { + userId: string; + contactId: string; + alias?: string | undefined; +} + +export interface AddContactResponse { + success: boolean; +} + +export interface GetContactsRequest { + userId: string; +} + +export interface GetContactsResponse { + contacts: ContactItem[]; +} + +export interface BlockedUserItem { + blockedId: string; + blockedAt: string; +} + +export interface BlockUserRequest { + blockerId: string; + blockedId: string; +} + +export interface BlockUserResponse { + success: boolean; +} + +export interface UnblockUserRequest { + blockerId: string; + blockedId: string; +} + +export interface UnblockUserResponse { + success: boolean; +} + +export interface GetBlockedUsersRequest { + blockerId: string; +} + +export interface GetBlockedUsersResponse { + blockedUsers: BlockedUserItem[]; +} + export const USERS_V1_PACKAGE_NAME = "users.v1"; export interface UsersServiceClient { @@ -81,6 +154,18 @@ export interface UsersServiceClient { createProfile(request: CreateProfileRequest, metadata?: Metadata): Observable; softDeleteProfile(request: SoftDeleteProfileRequest, metadata?: Metadata): Observable; + + /** --- НОВЫЕ МЕТОДЫ МЕССЕНДЖЕРА --- */ + + blockUser(request: BlockUserRequest, metadata?: Metadata): Observable; + + unblockUser(request: UnblockUserRequest, metadata?: Metadata): Observable; + + getBlockedUsers(request: GetBlockedUsersRequest, metadata?: Metadata): Observable; + + addContact(request: AddContactRequest, metadata?: Metadata): Observable; + + getContacts(request: GetContactsRequest, metadata?: Metadata): Observable; } export interface UsersServiceController { @@ -105,11 +190,48 @@ export interface UsersServiceController { request: SoftDeleteProfileRequest, metadata?: Metadata, ): Promise | Observable | SoftDeleteProfileResponse; + + /** --- НОВЫЕ МЕТОДЫ МЕССЕНДЖЕРА --- */ + + blockUser( + request: BlockUserRequest, + metadata?: Metadata, + ): Promise | Observable | BlockUserResponse; + + unblockUser( + request: UnblockUserRequest, + metadata?: Metadata, + ): Promise | Observable | UnblockUserResponse; + + getBlockedUsers( + request: GetBlockedUsersRequest, + metadata?: Metadata, + ): Promise | Observable | GetBlockedUsersResponse; + + addContact( + request: AddContactRequest, + metadata?: Metadata, + ): Promise | Observable | AddContactResponse; + + getContacts( + request: GetContactsRequest, + metadata?: Metadata, + ): Promise | Observable | GetContactsResponse; } export function UsersServiceControllerMethods() { return function (constructor: Function) { - const grpcMethods: string[] = ["getProfile", "updateProfile", "createProfile", "softDeleteProfile"]; + const grpcMethods: string[] = [ + "getProfile", + "updateProfile", + "createProfile", + "softDeleteProfile", + "blockUser", + "unblockUser", + "getBlockedUsers", + "addContact", + "getContacts", + ]; for (const method of grpcMethods) { const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); GrpcMethod("UsersService", method)(constructor.prototype[method], method, descriptor);