github.com/tada-team/tdproto@v1.51.57/features.go (about) 1 package tdproto 2 3 const ( 4 SupportedFeaturesHeader = "X-Supported-Features" 5 Feature2FactorAuth = "2FactorAuth" 6 ) 7 8 // Server information. Readonly. 9 type Features struct { 10 // Current host 11 Host string `json:"host"` 12 13 // Build/revision of server side 14 Build string `json:"build"` 15 16 // Desktop application version 17 DesktopVersion string `json:"desktop_version"` 18 19 // Webclient version 20 FrontVersion string `json:"front_version"` 21 22 // Application title 23 AppTitle string `json:"app_title"` 24 25 // Landing page address, if any 26 LandingUrl string `json:"landing_url,omitempty"` 27 28 // Local applications urls 29 AppSchemes []string `json:"app_schemes"` 30 31 // Static files server address 32 Userver string `json:"userver"` 33 34 // Link to AppStore 35 IOSApp string `json:"ios_app"` 36 37 // Link to Google Play 38 AndroidApp string `json:"android_app"` 39 40 // Link to AppStore for corporate app 41 IOSCorpApp string `json:"ios_corp_app"` 42 43 // Link to Google Play for corporate app 44 AndroidCorpApp string `json:"android_corp_app"` 45 46 // Link to Rumarket store 47 RumarketApp string `json:"rumarket_app"` 48 49 // Default UI theme 50 Theme string `json:"theme"` 51 52 // Minimal iOS application version required for this server. Used for breaking changes 53 MinIOSVersion string `json:"min_ios_version"` 54 55 // Minimal android application version required for this server. Used for breaking changes 56 MinAndroidVersion string `json:"min_android_version"` 57 58 // Minimal iOS corp application version required for this server. Used for breaking changes 59 MinCorpIOSVersion string `json:"min_corp_ios_version"` 60 61 // Minimal android corp application version required for this server. Used for breaking changes 62 MinCorpAndroidVersion string `json:"min_corp_android_version"` 63 64 // Free registration allowed 65 FreeRegistration bool `json:"free_registration"` 66 67 // Maximum size of user's upload 68 MaxUploadMb int `json:"max_upload_mb"` 69 70 // Maximum number of forwarded messages 71 MaxLinkedMessages int `json:"max_linked_messages"` 72 73 // Maximum number of message uploads 74 MaxMessageUploads int `json:"max_message_uploads"` 75 76 // Maximum chars for: family_name, given_name, patronymic if any 77 MaxUsernamePartLength int `json:"max_username_part_length"` 78 79 // Maximum chars for group chat name 80 MaxGroupTitleLength int `json:"max_group_title_length"` 81 82 // Maximum chars for team name 83 MaxTeamTitleLength int `json:"max_team_title_length"` 84 85 // Maximum chars for role in team 86 MaxRoleLength int `json:"max_role_length"` 87 88 // Maximum chars for mood in team 89 MaxMoodLength int `json:"max_mood_length"` 90 91 // Maximum chars for text message 92 MaxMessageLength int `json:"max_message_length"` 93 94 // Maximum length for contact's sections names 95 MaxSectionLength int `json:"max_section_length"` 96 97 // Maximum length for project 98 MaxProjectLength int `json:"max_project_length"` 99 100 // Maximum length for tags 101 MaxTagLength int `json:"max_tag_length"` 102 103 // Maximum length for task title 104 MaxTaskTitleLength int `json:"max_task_title_length"` 105 106 // Maximum length for ColorRule description 107 MaxColorRuleDescriptionLength int `json:"max_color_rule_description_length"` 108 109 // Maximum length for urls 110 MaxUrlLength int `json:"max_url_length"` 111 112 // Maximum length for Integration comment 113 MaxIntegrationCommentLength int `json:"max_integration_comment_length"` 114 115 // Maximum teams for one account 116 MaxTeams int `json:"max_teams"` 117 118 // Maximum search result 119 MaxMessageSearchLimit int `json:"max_message_search_limit"` 120 121 // Multi nodes mode (federation) enabled 122 MultiNodes bool `json:"multi_nodes,omitempty"` 123 124 // Max inactivity seconds 125 AfkAge int `json:"afk_age"` 126 127 // Password authentication enabled 128 AuthByPassword bool `json:"auth_by_password,omitempty"` 129 130 // QR-code / link authentication enabled 131 AuthByQrCode bool `json:"auth_by_qr_code,omitempty"` 132 133 // SMS authentication enabled 134 AuthBySms bool `json:"auth_by_sms,omitempty"` 135 136 // Two-factor authentication (2FA) enabled 137 Auth2fa bool `json:"auth_2fa,omitempty"` 138 139 // Kerberos authentication enabled 140 AuthByKerberos bool `json:"auth_by_kerberos,omitempty"` 141 142 // Captcha enabled 143 ReCaptchaEnabled bool `json:"is_recaptcha_enabled,omitempty"` 144 145 // ReCaptcha Web Key V3 146 ReCaptchaWebKeyV3 string `json:"recaptcha_web_key_v3,omitempty"` 147 148 // ReCaptcha Web Key V2 149 ReCaptchaWebKeyV2 string `json:"recaptcha_web_key_v2,omitempty"` 150 151 // Mandatory setting of the pin code in the application 152 IsPinCodeRequired bool `json:"is_pin_code_required"` 153 154 // Max number of attempts to enter an invalid PIN code 155 PinCodeWrongLimit int `json:"pin_code_wrong_limit"` 156 157 // External services 158 OAuthServices []OAuthService `json:"oauth_services,omitempty"` 159 160 // ICE servers for WebRTC 161 ICEServers []ICEServer `json:"ice_servers"` 162 163 // IceTransportPolicy a ice transport policy 164 IceTransportPolicy ICETransportPolicy `json:"ice_transport_policy,omitempty"` 165 166 // True for premise installation 167 CustomServer bool `json:"custom_server"` 168 169 // Name of installation 170 InstallationType string `json:"installation_type"` 171 172 // Installation title, used on login screen 173 InstallationTitle string `json:"installation_title,omitempty"` 174 175 // Custom application icon name, if any 176 CustomAppIconName string `json:"custom_app_icon_name,omitempty"` 177 178 // AppBackground image url, if any 179 AppLoginBackground string `json:"app_login_background,omitempty"` 180 181 // WebBackground image url, if any 182 WebLoginBackground string `json:"web_login_background,omitempty"` 183 184 // Testing installation 185 IsTesting bool `json:"is_testing"` 186 187 // Yandex metrika counter id 188 Metrika string `json:"metrika"` 189 190 // Amplitude api key 191 AmplitudeApiKey string `json:"amplitude_api_key,omitempty"` 192 193 // Minimal chars number for starting global search 194 MinSearchLength int `json:"min_search_length"` 195 196 // Resend message in n seconds if no confirmation from server given 197 ResendTimeout int `json:"resend_timeout"` 198 199 // Frontend sentry.io settings 200 SentryDsnJS string `json:"sentry_dsn_js"` 201 202 // Message drafts saved on server 203 ServerDrafts bool `json:"server_drafts"` 204 205 // Firebase settings for web-push notifications 206 FirebaseAppId string `json:"firebase_app_id"` 207 208 // Firebase settings for web-push notifications 209 FirebaseSenderId string `json:"firebase_sender_id"` 210 211 // Firebase settings for web-push notifications 212 FirebaseApiKey string `json:"firebase_api_key"` 213 214 // Firebase settings for web-push notifications 215 FirebaseAuthDomain string `json:"firebase_auth_domain"` 216 217 // Firebase settings for web-push notifications 218 FirebaseDatabaseUrl string `json:"firebase_database_url"` 219 220 // Firebase settings for web-push notifications 221 FirebaseProjectId string `json:"firebase_project_id"` 222 223 // Firebase settings for web-push notifications 224 FirebaseStorageBucket string `json:"firebase_storage_bucket"` 225 226 // Calls version. 0 = disabled, 1 = audio only, 2 = audio+video 227 // Deprecated: use CallsAudioEnabled and CallsVideoEnabled 228 CallsVersion int `json:"calls_version"` 229 230 // CallsAudioEnabled enabled or disabled audio calls 231 CallsAudioEnabled bool `json:"calls_audio_enabled"` 232 233 // CallsVideoEnabled enabled or disabled video calls 234 CallsVideoEnabled bool `json:"calls_video_enabled"` 235 236 // CallsVideoMultistreamEnabled enabled or disabled video in multistream mode (for janus) 237 CallsVideoMultistreamEnabled bool `json:"calls_video_multistream_enabled"` 238 239 // VcsEnabled enabled or disabled vcs 240 VcsEnabled bool `json:"vcs_enabled"` 241 242 // Calls functions enabled for mobile applications 243 MobileCalls bool `json:"mobile_calls"` 244 245 // Calls record enabled 246 CallsRecord bool `json:"calls_record"` 247 248 // Disallow call from multiple devices. Experimental 249 OnlyOneDevicePerCall bool `json:"only_one_device_per_call,omitempty"` 250 251 // Maximum number of participants per call 252 MaxParticipantsPerCall int `json:"max_participants_per_call,omitempty"` 253 254 // Safari push id for web-push notifications 255 SafariPushId string `json:"safari_push_id"` 256 257 // Multiple message uploads 258 MessageUploads bool `json:"message_uploads"` 259 260 // Team entity naming. Experimental. 261 Terms Terms `json:"terms"` 262 263 // Cross team communication. Experimental. 264 SingleGroupTeams bool `json:"single_group_teams"` 265 266 // Wiki pages in chats. Experimental 267 WikiPages bool `json:"wiki_pages"` 268 269 // Wiki pages in chats. Experimental 270 // Deprecated: this field is not used 271 AllowAdminMute bool `json:"allow_admin_mute,omitempty"` 272 273 // Default wallpaper url for mobile apps, if any 274 DefaultWallpaper *Wallpaper `json:"default_wallpaper,omitempty"` 275 276 // Support email 277 SupportEmail string `json:"support_email"` 278 279 // True if server has custom theme 280 CustomTheme bool `json:"custom_theme"` 281 282 // Deprecated 283 TaskChecklist bool `json:"task_checklist"` 284 285 // Deprecated 286 ReadonlyGroups bool `json:"readonly_groups"` 287 288 // Deprecated 289 TaskDashboard bool `json:"task_dashboard"` 290 291 // Deprecated 292 TaskMessages bool `json:"task_messages"` 293 294 // Deprecated 295 TaskPublic bool `json:"task_public"` 296 297 // Deprecated 298 TaskTags bool `json:"task_tags"` 299 300 // Deprecated 301 Calls bool `json:"calls"` 302 303 // Billing services integrations 304 Billing bool `json:"billing,omitempty"` 305 306 // Deprecated 307 MinAppVersion string `json:"min_app_version"` 308 309 // File Extension Whitelist 310 FileExtensionWhitelist []string `json:"file_extension_whitelist,omitempty"` 311 312 // File Extension Blacklist 313 FileExtensionBlacklist []string `json:"file_extension_blacklist,omitempty"` 314 315 // File Extension Whitelist Priority 316 FileExtensionWhitelistPriority bool `json:"file_extension_whitelist_priority,omitempty"` 317 318 // Thread enabled flag 319 ThreadsEnabled bool `json:"threads_enabled,omitempty"` 320 } 321 322 // Interactive Connectivity Establishment Server for WEB Rtc connection. Readonly. 323 type ICEServer struct { 324 // Urls - STUN or TURN addresses 325 Urls string `json:"urls"` 326 327 // UserName - username for TURN server 328 UserName string `json:"username,omitempty"` 329 330 // Credential - credential for TURN server 331 Credential string `json:"credential,omitempty"` 332 } 333 334 // ICETransportPolicy is a string indicating the transport selection policy 335 // the ICE agent should use during negotiation of connections. 336 // Available values: 'all', 'relay' 337 type ICETransportPolicy string 338 339 const ( 340 // ICETransportPolicyRelay for get only TURN candidate pairs 341 ICETransportPolicyRelay ICETransportPolicy = "relay" 342 343 // ICETransportPolicyAll for get both STUN and TURN candidate pairs 344 ICETransportPolicyAll ICETransportPolicy = "all" 345 ) 346 347 // Experimental translation fields for "team" entity renaming. Readonly. 348 type Terms struct { 349 // "in team" 350 EnInTeam string 351 352 // "team" 353 EnTeam string 354 355 // "access to team" 356 EnTeamAccess string 357 358 // "team admin" 359 EnTeamAdmin string 360 361 // "team admins" 362 EnTeamAdmins string 363 364 // "team guest" 365 EnTeamGuest string 366 367 // "team member" 368 EnTeamMember string 369 370 // "team members" 371 EnTeamMembers string 372 373 // "team owner", 374 EnTeamOwner string 375 376 // "team settings" 377 EnTeamSettings string 378 379 // "настройки команды" 380 RuTeamSettings string 381 382 // "teams" 383 EnTeams string 384 385 // "to team" 386 EnToTeam string 387 388 // "в команде" 389 RuInTeam string 390 391 // "команда" 392 RuTeam string 393 394 // "доступ к команде" 395 RuTeamAccess string 396 397 // "администратор команды" 398 RuTeamAdmin string 399 400 // "администраторы команды" 401 RuTeamAdmins string 402 403 // "команде" 404 RuTeamD string 405 406 // "гость команды" 407 RuTeamGuest string 408 409 // "участник команды" 410 RuTeamMember string 411 412 // "участники команды" 413 RuTeamMembers string 414 415 // "владелец команды" 416 RuTeamOwner string 417 418 // "команде" 419 RuTeamP string 420 421 // "команды" 422 RuTeamR string 423 424 // "команды" 425 RuTeams string 426 427 // "командам" 428 RuTeamsD string 429 430 // "командах" 431 RuTeamsP string 432 433 // "команд" 434 RuTeamsR string 435 436 // "командами" 437 RuTeamsT string 438 439 // "команды" 440 RuTeamsV string 441 442 // "командой" 443 RuTeamT string 444 445 // "команду" 446 RuTeamV string 447 448 // "в команду" 449 RuToTeam string 450 }