-
Notifications
You must be signed in to change notification settings - Fork 0
/
team.go
124 lines (86 loc) · 3.52 KB
/
team.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
package tdproto
// Team
type Team struct {
// Team id
Uid string `json:"uid" tdproto:"readonly"`
// Team deleted
IsArchive bool `json:"is_archive,omitempty" tdproto:"readonly"`
// Object version
Gentime int64 `json:"gentime" tdproto:"readonly"`
// Team name
Name string `json:"name"`
// Default task deadline
DefaultTaskDeadline string `json:"default_task_deadline,omitempty"`
// Max message update/deletion age, in seconds
MaxMessageUpdateAge int `json:"max_message_update_age"`
// Team icons
Icons IconData `json:"icons" tdproto:"readonly"`
// User last activity was in this team
LastActive bool `json:"last_active" tdproto:"readonly"`
// What status I can set to other team members
ChangeableStatuses []TeamStatus `json:"changeable_statuses,omitempty" tdproto:"readonly"`
// My profile in this team isn't full
BadProfile bool `json:"bad_profile,omitempty" tdproto:"readonly"`
// Need confirmation after invite to this team
NeedConfirmation bool `json:"need_confirmation" tdproto:"readonly"`
// Patronymic in usernames for this team
UsePatronymic bool `json:"use_patronymic,omitempty"`
// Username fields ordering. Possible values: "family_name", "given_name", "patronymic"
UserFields []string `json:"user_fields" tdproto:"readonly"`
// Family name should be first in display name
DisplayFamilyNameFirst bool `json:"display_family_name_first,omitempty"`
// Use importance field in task
UseTaskImportance bool `json:"use_task_importance,omitempty"`
// Minimal value of task importance. Default is 1
TaskImportanceMin int `json:"task_importance_min,omitempty"`
// Maximum value of task importance. Default is 5
TaskImportanceMax int `json:"task_importance_max,omitempty"`
// Bigger number = bigger importance. Default: lower number = bigger importance
TaskImportanceRev bool `json:"task_importance_rev,omitempty"`
// Use urgency field in task
UseTaskUrgency bool `json:"use_task_urgency,omitempty"`
// Use complexity field in task
UseTaskComplexity bool `json:"use_task_complexity,omitempty"`
// Use spent time field in task
UseTaskSpentTime bool `json:"use_task_spent_time,omitempty"`
// Total uploads size, bytes
UploadsSize int64 `json:"uploads_size,omitempty" tdproto:"readonly"`
// Maximum uploads size, bytes, if any
UploadsSizeLimit int64 `json:"uploads_size_limit,omitempty" tdproto:"readonly"`
// Unread message counters
Unreads *TeamUnread `json:"unread"`
// My profile in this team
Me Contact `json:"me"`
// Team contacts. Used only for team creation
Contacts []Contact `json:"contacts,omitempty" tdproto:"readonly"`
// For single group teams, jid of chat
SingleGroup JID `json:"single_group,omitempty" tdproto:"readonly"`
// Color theme, if any
Theme *Theme `json:"theme,omitempty" tdproto:"readonly"`
// Don't show archived users by default
HideArchivedUsers bool `json:"hide_archived_users,omitempty"`
// Team pinned
Pinned bool `json:"pinned,omitempty"`
// Team's available tariff by includig archive ones
AvailableTariffs []string `json:"available_tariffs,omitempty"`
// Сurrent team subscription
Subscription Subscription `json:"subscription,omitempty"`
}
// Short team representation. For invites, push notifications, etc. Readonly.
type TeamShort struct {
// Team id
Uid string `json:"uid"`
// Team name
Name string `json:"name"`
// Team icons
Icons IconData `json:"icons"`
}
// Team deletion message. Readonly.
type DeletedTeam struct {
// Team id
Uid string `json:"uid"`
// Team deleted
IsArchive bool `json:"is_archive"`
// Object version
Gentime int64 `json:"gentime"`
}