github.com/tada-team/tdproto@v1.51.57/contact.go (about) 1 package tdproto 2 3 // Contact 4 type Contact struct { 5 // Contact Id 6 Jid JID `json:"jid"` 7 8 // Node uid for external users 9 Node string `json:"node,omitempty"` 10 11 // Full name in chats 12 DisplayName string `json:"display_name"` 13 14 // Short name in chats 15 ShortName string `json:"short_name"` 16 17 // Contact email in this team 18 ContactEmail string `json:"contact_email"` 19 20 // Contact phone in this team 21 ContactPhone string `json:"contact_phone"` 22 23 // Icons data 24 Icons IconData `json:"icons"` 25 26 // Object version 27 Gentime int64 `json:"gentime"` 28 29 // Role in this team 30 Role string `json:"role"` 31 32 // Public Status 33 PublicStatus *ContactPublicStatus `json:"public_status,omitempty"` 34 35 // Mood in this team 36 Mood string `json:"mood,omitempty"` 37 38 // Status in this team 39 TeamStatus TeamStatus `json:"status"` 40 41 // Last activity in this team (iso datetime) 42 LastActivity ISODateTimeString `json:"last_activity,omitempty"` 43 44 // Contact deleted 45 IsArchive bool `json:"is_archive,omitempty"` 46 47 // Bot name. Empty for users 48 Botname string `json:"botname,omitempty"` 49 50 // Section ids 51 Sections []string `json:"sections"` 52 53 // Can I send message to this contact 54 CanSendMessage bool `json:"can_send_message,omitempty"` 55 56 // Why I can't send message to this chat (if can't) 57 CantSendMessageReason string `json:"cant_send_message_reason,omitempty"` 58 59 // Can I call to this contact 60 CanCall bool `json:"can_call,omitempty"` 61 62 // Can I create task for this contact 63 CanCreateTask bool `json:"can_create_task,omitempty"` 64 65 // Can I import tasks in this team 66 CanImportTasks bool `json:"can_import_tasks,omitempty"` 67 68 // Can I add this contact to group chats 69 CanAddToGroup bool `json:"can_add_to_group,omitempty"` 70 71 // Can I remove this contact from team 72 CanDelete bool `json:"can_delete,omitempty"` 73 74 // Changeable fields 75 ChangeableFields []string `json:"changeable_fields,omitempty"` 76 77 // Family name 78 FamilyName string `json:"family_name,omitempty"` 79 80 // Given name 81 GivenName string `json:"given_name,omitempty"` 82 83 // Patronymic, if any 84 Patronymic string `json:"patronymic,omitempty"` 85 86 // Default language code 87 DefaultLang *string `json:"default_lang,omitempty"` 88 89 // Enable debug messages in UI 90 DebugShowActivity *bool `json:"debug_show_activity,omitempty"` 91 92 // Enable remove all messages experimental features 93 DropallEnabled *bool `json:"dropall_enabled,omitempty"` 94 95 // Use Ctrl/Cmd + Enter instead Enter 96 AltSend *bool `json:"alt_send,omitempty"` 97 98 // Use * as @ for mentions 99 AsteriskMention *bool `json:"asterisk_mention,omitempty"` 100 101 // Send push notifications even contact is online 102 AlwaysSendPushes *bool `json:"always_send_pushes,omitempty"` 103 104 // Hide pushes body 105 HidePushesContent *bool `json:"hide_pushes_content,omitempty"` 106 107 // Timezone, if any 108 Timezone *string `json:"timezone,omitempty"` 109 110 // Quiet time start 111 QuietTimeStart *string `json:"quiet_time_start,omitempty"` 112 113 // Quiet time finish 114 QuietTimeFinish *string `json:"quiet_time_finish,omitempty"` 115 116 // Focus mode enabled until 117 FocusUntil ISODateTimeString `json:"focus_until,omitempty"` 118 119 // Push notifications for group chats 120 GroupNotificationsEnabled *bool `json:"group_notifications_enabled,omitempty"` 121 122 // Push notifications for task chats 123 TaskNotificationsEnabled *bool `json:"task_notifications_enabled,omitempty"` 124 125 // Push notifications for meeting chats 126 MeetingNotificationsEnabled *bool `json:"meeting_notifications_enabled,omitempty"` 127 128 // Push notifications from systembot 129 SystembotNotificationsEnabled *bool `json:"systembot_notifications_enabled,omitempty"` 130 131 // Push notifications for reactions 132 ReactionNotificationsEnabled *bool `json:"reaction_notifications_enabled,omitempty"` 133 134 // Short view in contact list 135 ContactShortView *bool `json:"contact_short_view,omitempty"` 136 137 // Short view in group list 138 GroupShortView *bool `json:"group_short_view,omitempty"` 139 140 // Short view in task list 141 TaskShortView *bool `json:"task_short_view,omitempty"` 142 143 // Short view in meeting list 144 MeetingShortView *bool `json:"meeting_short_view,omitempty"` 145 146 // Short view in contact list in mobile app 147 ContactMshortView *bool `json:"contact_mshort_view,omitempty"` 148 149 // Short view in group list in mobile app 150 GroupMshortView *bool `json:"group_mshort_view,omitempty"` 151 152 // Two-factor authentication is configured and confirmed 153 Auth2faEnabled bool `json:"auth_2fa_enabled,omitempty"` 154 155 // Two-factor authentication status 156 Auth2faStatus string `json:"auth_2fa_status,omitempty"` 157 158 // Short view in task list in mobile app 159 TaskMshortView *bool `json:"task_mshort_view,omitempty"` 160 161 // Short view in meeting list in mobile app 162 MeetingMshortView *bool `json:"meeting_mshort_view,omitempty"` 163 164 // Show archived contacts in contact list 165 ContactShowArchived *bool `json:"contact_show_archived,omitempty"` 166 167 // Show unread chats first in feed 168 UnreadFirst *bool `json:"unread_first,omitempty"` 169 170 // Show unread chats first in feed in mobile app 171 MUnreadFirst *bool `json:"munread_first,omitempty"` 172 173 // Can I add new members to this team 174 CanAddToTeam bool `json:"can_add_to_team,omitempty"` 175 176 // Can I manage contact sections in this team 177 CanManageSections bool `json:"can_manage_sections,omitempty"` 178 179 // Can I manage task projects in this team 180 CanManageProjects bool `json:"can_manage_projects,omitempty"` 181 182 // Can I manage tags in this team 183 CanManageTags bool `json:"can_manage_tags,omitempty"` 184 185 // Can I manage integrations in this team 186 CanManageIntegrations bool `json:"can_manage_integrations,omitempty"` 187 188 // Can I manage color rules in this team 189 CanManageColorRules bool `json:"can_manage_color_rules,omitempty"` 190 191 // Can I create group chats in this team 192 CanCreateGroup bool `json:"can_create_group,omitempty"` 193 194 // Can I create meetings in this team 195 CanCreateMeeting bool `json:"can_create_meeting,omitempty"` 196 197 // Can I view/join public group in this team 198 CanJoinPublicGroups bool `json:"can_join_public_groups,omitempty"` 199 200 // Can I view/join public tasks in this team 201 CanJoinPublicTasks bool `json:"can_join_public_tasks,omitempty"` 202 203 // Can I import chats from external services (now its only telegram) 204 CanImportChats bool `json:"can_import_chats,omitempty"` 205 206 // Can i create new team 207 CanCreateTeam bool `json:"can_create_team,omitempty"` 208 209 // Extra contact fields 210 CustomFields *ContactCustomFields `json:"custom_fields,omitempty"` 211 212 // Deprecated 213 CanDeleteAnyMessage bool `json:"can_delete_any_message,omitempty"` 214 } 215 216 // Extra contact fields 217 type ContactCustomFields struct { 218 // Company 219 Company string `json:"company,omitempty"` 220 221 // Department 222 Department string `json:"department,omitempty"` 223 224 // Title 225 Title string `json:"title,omitempty"` 226 227 // MobilePhone 228 MobilePhone string `json:"mobile_phone,omitempty"` 229 230 // Import source 231 Source string `json:"source,omitempty"` 232 233 // User UUID in Active Directory 234 ADUid string `json:"ad_uid,omitempty"` 235 } 236 237 // Short contact representation 238 type ContactShort struct { 239 // Contact Id 240 Jid JID `json:"jid"` 241 242 // Full name in chats 243 DisplayName string `json:"display_name"` 244 245 // Short name in chats 246 ShortName string `json:"short_name"` 247 248 // Icons data 249 Icons IconData `json:"icons"` 250 251 // Object version 252 Gentime int64 `json:"gentime"` 253 } 254 255 type ContactsSectionGetRequest struct { 256 // Team Section 257 SectionUid string `schema:"section_uid"` 258 259 // * ?is_archived= 260 IsArchived *bool `schema:"is_archived"` 261 262 // * ?is_bot= 263 IsBot *bool `schema:"is_bot"` 264 265 Limit int `schema:"limit"` 266 267 Offset int `schema:"offset"` 268 }