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