Documentation
¶
Index ¶
- Constants
- Variables
- func ConfirmId() string
- func Gentime() int64
- func IsoDatetime(dt time.Time) string
- func NullableIsoDatetime(dt *time.Time) *string
- func SourceDir() string
- func ValidUid(s string) bool
- type ActiveUserDailyStat
- type ActiveUserDailyStatList
- type AnyEvent
- type BaseEvent
- type CallDevice
- type CallEvent
- type CallOnliner
- type Chat
- type ChatCounters
- type ChatMessages
- type ChatShort
- type ChatType
- type ClientActivity
- type ClientCallBuzz
- type ClientCallBuzzCancel
- type ClientCallLeave
- type ClientCallMuteAll
- type ClientCallOffer
- type ClientCallReject
- type ClientCallSound
- type ClientCallTrickle
- type ClientChatComposing
- type ClientChatLastread
- type ClientConfirm
- type ClientMessageDeleted
- type ClientMessageUpdated
- type ClientMessageUpdatedParams
- type ClientPing
- type ColorRule
- type Contact
- type ContactCustomFields
- type ContactPreview
- type ContactShort
- type Country
- type DeletedChat
- type DeletedRemind
- type DeletedSection
- type DeletedTag
- type DeletedTeam
- type Dist
- type Event
- type Features
- type GroupAccessRequest
- type GroupMembership
- type GroupStatus
- type HasJid
- type ICEServer
- type ISODateTimeString
- type IconData
- type Integration
- type IntegrationField
- type IntegrationForm
- type IntegrationKind
- type Integrations
- type Invitation
- type JID
- func (jid JID) ChatType() ChatType
- func (jid JID) Empty() bool
- func (jid JID) Equal(other JID) bool
- func (jid JID) IsDirect() bool
- func (jid JID) IsGroup() bool
- func (jid JID) IsSection() bool
- func (jid JID) IsTask() bool
- func (jid JID) JID() *JID
- func (jid JID) MarshalJSON() ([]byte, error)
- func (jid JID) MarshalMsgpack() ([]byte, error)
- func (jid JID) String() string
- func (jid JID) Uid() string
- func (jid *JID) UnmarshalJSON(data []byte) error
- func (jid *JID) UnmarshalMsgpack(data []byte) error
- func (jid JID) Valid() bool
- func (jid JID) Value() string
- type JSEP
- type MarkupEntity
- type MarkupType
- type Mediasubtype
- type Mediatype
- type Message
- type MessageContent
- type MessageLink
- type MessageLinkPreview
- type MessageLinks
- type MessagePush
- type MessageReaction
- type MessageReactionDetail
- type OAuthService
- type OnlineCall
- type OnlineContact
- type PaginatedChats
- type PaginatedContacts
- type PaginatedMessages
- type PaginatedUploadShortMessages
- type PdfVersion
- type PushDevice
- type PushDeviceType
- type ReceivedMessage
- type Remind
- type Roster
- type Section
- type ServerCallAnswer
- type ServerCallBuzz
- type ServerCallBuzzcancel
- type ServerCallCheckFingerprint
- type ServerCallLeave
- type ServerCallMuteall
- type ServerCallReject
- type ServerCallRestart
- type ServerCallSound
- type ServerCallState
- type ServerCallTalking
- type ServerChatComposing
- type ServerChatDeleted
- type ServerChatDraft
- type ServerChatLastread
- type ServerChatUpdated
- type ServerConfirm
- type ServerContactUpdated
- type ServerDebug
- type ServerLogin
- type ServerMessagePush
- type ServerMessageReceived
- type ServerMessageUpdated
- type ServerOnline
- type ServerPanic
- type ServerProcessing
- type ServerRemindDeleted
- type ServerRemindFired
- type ServerRemindUpdated
- type ServerRoster
- type ServerSectionDeleted
- type ServerSectionUpdated
- type ServerTagDeleted
- type ServerTagUpdated
- type ServerTeamCounters
- type ServerTeamDeleted
- type ServerTeamUpdated
- type ServerTime
- type ServerUiSettings
- type ServerUploadUpdated
- type ServerWarning
- type Session
- type ShortMessage
- type SimpleDailyIntStats
- type SingleIcon
- type Sticker
- type Stickerpack
- type Subtask
- type Tag
- type TaskColor
- type TaskCounters
- type TaskFilter
- type TaskFilterKey
- type TaskItem
- type TaskItems
- type TaskPreview
- type TaskSort
- type TaskSortKey
- type TaskStatus
- type TaskTab
- type TaskTabKey
- type Team
- type TeamCounter
- type TeamShort
- type TeamStatus
- type TeamUnread
- type Terms
- type Theme
- type UiSettings
- type Unread
- type Upload
- type UploadPreview
- type UploadShortMessage
- type User
- type UserAuth
- type UserWithMe
- type Wallpaper
- type WikiPage
Constants ¶
const ( ContactPrefix = "d-" GroupPrefix = "g-" TaskPrefix = "t-" ContactSectionPrefix = "sd-" GroupSectionPrefix = "sg-" TaskSectionPrefix = "st-" )
const ( PushDeviceAndroid = PushDeviceType(1) PushDeviceIOS = PushDeviceType(2) PushDeviceWeb = PushDeviceType(3) PushDeviceSafari = PushDeviceType(4) PushDeviceIOSFB = PushDeviceType(5) )
const ( AuthBySecureCookie = "cookie" AuthByInsecureCookie = "insecure cookie" AuthByToken = "token" AuthByBotToken = "bot token" )
Variables ¶
var AndroidPushDevices = []PushDeviceType{ PushDeviceAndroid, }
var IOSPushDevices = []PushDeviceType{ PushDeviceIOS, PushDeviceIOSFB, }
var MobilePushDevices = []PushDeviceType{ PushDeviceAndroid, PushDeviceIOSFB, PushDeviceIOS, }
Functions ¶
func IsoDatetime ¶ added in v0.0.9
func NullableIsoDatetime ¶ added in v0.0.9
Types ¶
type ActiveUserDailyStat ¶ added in v1.6.0
type ActiveUserDailyStat struct {
Day time.Time `json:"day"`
UserId int `json:"user_id"`
FamilyName *string `json:"family_name,omitempty"`
GivenName *string `json:"given_name,omitempty"`
Patronymic *string `json:"patronymic,omitempty"`
Phone *string `json:"phone,omitempty"`
MessagesCount *int `json:"messages_count,omitempty"`
CallsCount *int `json:"calls_count,omitempty"`
CallSecondsTotal *int `json:"call_seconds_total,omitempty"`
}
type ActiveUserDailyStatList ¶ added in v1.6.0
type ActiveUserDailyStatList []ActiveUserDailyStat
type AnyEvent ¶ added in v0.0.9
func NewAnyEvent ¶ added in v0.0.9
type BaseEvent ¶ added in v0.0.9
func (BaseEvent) GetConfirmId ¶ added in v0.0.9
type CallDevice ¶ added in v0.0.8
type CallDevice struct {
// Device muted
Muted bool `json:"muted"`
// Device description
Useragent string `json:"useragent"`
}
Call participant device
type CallEvent ¶ added in v0.0.8
type CallEvent struct {
// Call start, iso date
Start *string `json:"start"`
// Call finish, iso date
Finish *string `json:"finish"`
// Call record enabled
Audiorecord bool `json:"audiorecord"`
// Call members
Onliners []CallOnliner `json:"onliners"`
}
Audio call information
type CallOnliner ¶ added in v0.0.8
type CallOnliner struct {
// Contact id
Jid JID `json:"jid"`
// Contact name
DisplayName string `json:"display_name"`
// Contact role
Role string `json:"role"`
// Contact icon
Icon string `json:"icon"`
// Microphone muted. Computed from devices muted states
Muted bool `json:"muted"`
// Member devices, strictly one for now
Devices []CallDevice `json:"devices"`
}
Call participant
type Chat ¶ added in v0.0.8
type Chat struct {
// Group/Task/Contact id
Jid JID `json:"jid"`
// Chat type
ChatType ChatType `json:"chat_type"`
// Base fields (not related to concrete participant) version
BaseGentime int64 `json:"base_gentime,omitempty"`
// Chat fields related to concrete participant) version
Gentime int64 `json:"gentime"`
// Creation date, iso datetime
Created ISODateTimeString `json:"created"`
// Title
DisplayName string `json:"display_name"`
// Icons info
Icons *IconData `json:"icons"`
// Include unread messages to counters
CountersEnabled bool `json:"counters_enabled,omitempty"`
// Can I call to this chat
CanCall bool `json:"can_call,omitempty"`
// Can I send message to this chat
CanSendMessage bool `json:"can_send_message,omitempty"`
// Why I can't send message to this chat (if can't)
CantSendMessageReason string `json:"cant_send_message_reason,omitempty"`
// Description collapsed. Used for tasks only
Collapsed bool `json:"collapsed,omitempty"`
// Last message draft, if any
Draft string `json:"draft,omitempty"`
// Last message draft version , if any
DraftNum int64 `json:"draft_num,omitempty"`
// Hidden chat
Hidden bool `json:"hidden,omitempty"`
// Push notifications enabled
NotificationsEnabled bool `json:"notifications_enabled,omitempty"`
// Number of important messages
NumImportants int `json:"num_importants,omitempty"`
// Unread counter
NumUnread uint `json:"num_unread,omitempty"`
// Mentions (@) counter
NumUnreadNotices uint `json:"num_unread_notices,omitempty"`
// Last message object
LastMessage *Message `json:"last_message,omitempty"`
// Last read message id, if any
LastReadMessageId string `json:"last_read_message_id,omitempty"`
// Project / section id, if any
Section string `json:"section,omitempty"`
// List of editable fields
ChangeableFields []string `json:"changeable_fields,omitempty"`
// Is chat pinned on top
Pinned bool `json:"pinned,omitempty"`
// Sort ordering for pinned chat
PinnedSortOrdering int `json:"pinned_sort_ordering,omitempty"`
// Non-archive participants number
NumMembers *uint `json:"num_members,omitempty"`
// Can I delete this chat
CanDelete bool `json:"can_delete,omitempty"`
// Group or task description
Description string `json:"description,omitempty"`
// Markup entities for description field. Experimental
Markup []MarkupEntity `json:"markup,omitempty" tdproto:"readonly"`
// Present in feed (main screen)
Feed bool `json:"feed,omitempty"`
// Pinned message for this chat
PinnedMessage *Message `json:"pinned_message,omitempty"`
// Custom color index from table of colors. Tasks only
ColorIndex *uint16 `chattype:"task" json:"color_index,omitempty"`
// Items in checklist. Tasks only
NumItems *uint `chattype:"task" json:"num_items,omitempty"`
// Checked items in checklist. Tasks only
NumCheckedItems *uint `chattype:"task" json:"num_checked_items,omitempty"`
// Assignee contact id. Tasks only
Assignee *JID `chattype:"task" json:"assignee,omitempty"`
// Task number in this team
Num uint `chattype:"task" json:"num,omitempty"`
// Task followers id's. TODO: rename to "followers"
Observers *[]JID `chattype:"task" json:"observers,omitempty"`
// Task creator
Owner *JID `chattype:"task" json:"owner,omitempty"`
// Task status. May be custom
TaskStatus string `chattype:"task" json:"task_status,omitempty"`
// Task title. Generated from number and description
Title string `chattype:"task" json:"title,omitempty"`
// Task done date in iso format, if any
Done string `chattype:"task" json:"done,omitempty"`
// Task done reason, if any
DoneReason string `chattype:"task" json:"done_reason,omitempty"`
// Task deadline in iso format, if any
Deadline string `chattype:"task" json:"deadline,omitempty"`
// Is task deadline expired
DeadlineExpired bool `chattype:"task" json:"deadline_expired,omitempty"`
// Links in description
Links MessageLinks `chattype:"task" json:"links,omitempty"`
// Task tags list, if any
Tags []string `chattype:"task" json:"tags,omitempty"`
// Task importance, if available in team
Importance *int `chattype:"task" json:"importance,omitempty"`
// Task urgency, if available in team
Urgency *int `chattype:"task" json:"urgency,omitempty"`
// Task spent time, number
SpentTime *int `chattype:"task" json:"spent_time,omitempty"`
// Task complexity, number
Complexity *int `chattype:"task" json:"complexity,omitempty"`
// Used for "Create task from messages..."
LinkedMessages []interface{} `chattype:"task" json:"linked_messages,omitempty"`
// Upload uids for request, upload objects for response
Uploads []Upload `chattype:"task" json:"uploads,omitempty"`
// Checklist items. Task only
Items []TaskItem `chattype:"task" json:"items,omitempty"`
// Parent tasks
Parents []Subtask `chattype:"task" json:"parents,omitempty"`
// Tab names
Tabs *[]TaskTabKey `chattype:"task" json:"tabs,omitempty"`
// My status in group chat
Status *GroupStatus `chattype:"group" json:"status,omitempty"`
// Group chat members
Members []GroupMembership `chattype:"group" json:"members,omitempty"`
// Can I add member to this group chat
CanAddMember bool `chattype:"group" json:"can_add_member,omitempty"`
// Can I remove member from this group chat
CanRemoveMember bool `chattype:"group" json:"can_remove_member,omitempty"`
// Can I change member status in this group chat
CanChangeMemberStatus bool `chattype:"group" json:"can_change_member_status,omitempty"`
// deprecated: use changeable fields
CanChangeSettings bool `chattype:"group" json:"can_change_settings,omitempty"`
// Any new team member will be added to this group chat
DefaultForAll bool `chattype:"group" json:"default_for_all,omitempty"`
// Readonly for non-admins group chat (Like Channels in Telegram bug switchable)
ReadonlyForMembers bool `chattype:"group" json:"readonly_for_members,omitempty"`
// Delete messages in this chat in seconds. Experimental function
AutocleanupAge *int `chattype:"group" json:"autocleanup_age,omitempty"`
// Can other team member see this task/group chat
Public bool `chattype:"group,task" json:"public,omitempty"`
// Can I join to this public group/task
CanJoin bool `chattype:"group,task" json:"can_join,omitempty"`
// Can I delete any message in this chat
CanDeleteAnyMessage bool `json:"can_delete_any_message,omitempty"`
// Can I change Important flag in any message in this chat
CanSetImportantAnyMessage bool `json:"can_set_important_any_message,omitempty"`
}
Chat (direct, group, task) representation
type ChatCounters ¶ added in v0.0.7
type ChatMessages ¶ added in v0.0.8
type ChatMessages struct {
Messages []Message `json:"messages"`
}
type ChatShort ¶ added in v0.2.0
type ChatShort struct {
// Group/Task/Contact id
Jid JID `json:"jid"`
// Chat type
ChatType ChatType `json:"chat_type"`
// Title
DisplayName string `json:"display_name"`
// Icon data
Icons *IconData `json:"icons"`
}
Minimal chat representation
type ClientActivity ¶ added in v0.0.11
type ClientActivity struct {
BaseEvent
Params clientActivityParams `json:"params"`
}
func NewClientActivity ¶ added in v0.1.1
func NewClientActivity(afk bool) (r ClientActivity)
func (ClientActivity) GetName ¶ added in v1.3.3
func (p ClientActivity) GetName() string
type ClientCallBuzz ¶ added in v0.0.9
type ClientCallBuzz struct {
BaseEvent
Params clientCallBuzzParams `json:"params"`
}
deprecated: use http api
func (ClientCallBuzz) GetName ¶ added in v1.3.3
func (p ClientCallBuzz) GetName() string
type ClientCallBuzzCancel ¶ added in v0.0.10
type ClientCallBuzzCancel struct {
BaseEvent
Params clientCallBuzzCancelParams `json:"params"`
}
deprecated: use http api
func (ClientCallBuzzCancel) GetName ¶ added in v1.3.3
func (p ClientCallBuzzCancel) GetName() string
type ClientCallLeave ¶ added in v0.0.9
type ClientCallLeave struct {
BaseEvent
Params clientCallLeaveParams `json:"params"`
}
deprecated: use http api
func (ClientCallLeave) GetName ¶ added in v1.3.3
func (p ClientCallLeave) GetName() string
type ClientCallMuteAll ¶ added in v0.0.9
type ClientCallMuteAll struct {
BaseEvent
Params clientCallMuteAllParams `json:"params"`
}
deprecated: use http api
func (ClientCallMuteAll) GetName ¶ added in v1.3.3
func (p ClientCallMuteAll) GetName() string
type ClientCallOffer ¶ added in v0.0.9
type ClientCallOffer struct {
BaseEvent
Params clientCallOfferParams `json:"params"`
}
deprecated: use http api
func (ClientCallOffer) GetName ¶ added in v1.3.3
func (p ClientCallOffer) GetName() string
type ClientCallReject ¶ added in v0.0.9
type ClientCallReject struct {
BaseEvent
Params clientCallRejectParams `json:"params"`
}
deprecated: use http api
func (ClientCallReject) GetName ¶ added in v1.3.3
func (p ClientCallReject) GetName() string
type ClientCallSound ¶ added in v0.0.9
type ClientCallSound struct {
BaseEvent
Params clientCallSoundParams `json:"params"`
}
deprecated: use http api
func (ClientCallSound) GetName ¶ added in v1.3.3
func (p ClientCallSound) GetName() string
type ClientCallTrickle ¶ added in v0.0.9
type ClientCallTrickle struct {
BaseEvent
Params clientCallTrickleParams `json:"params"`
}
deprecated: use http api
func (ClientCallTrickle) GetName ¶ added in v1.3.3
func (p ClientCallTrickle) GetName() string
type ClientChatComposing ¶ added in v0.0.11
type ClientChatComposing struct {
BaseEvent
Params clientChatComposingParams `json:"params"`
}
func NewClientChatComposing ¶ added in v0.1.1
func NewClientChatComposing(jid JID, composing bool, draft *string) (r ClientChatComposing)
func (ClientChatComposing) GetName ¶ added in v1.3.3
func (p ClientChatComposing) GetName() string
type ClientChatLastread ¶ added in v0.0.11
type ClientChatLastread struct {
BaseEvent
Params clientChatLastreadParams `json:"params"`
}
func NewClientChatLastread ¶ added in v0.1.1
func NewClientChatLastread(jid JID, messageId *string) (r ClientChatLastread)
func (ClientChatLastread) GetName ¶ added in v1.3.3
func (p ClientChatLastread) GetName() string
type ClientConfirm ¶ added in v0.0.11
type ClientConfirm struct {
BaseEvent
Params clientConfirmParams `json:"params"`
}
func NewClientConfirm ¶ added in v0.0.13
func NewClientConfirm(confirmId string) (r ClientConfirm)
func (ClientConfirm) GetName ¶ added in v1.3.3
func (p ClientConfirm) GetName() string
type ClientMessageDeleted ¶ added in v0.0.11
type ClientMessageDeleted struct {
BaseEvent
Params clientMessageDeletedParams `json:"params"`
}
func NewClientMessageDeleted ¶ added in v0.0.13
func NewClientMessageDeleted(messageId string) (r ClientMessageDeleted)
func (ClientMessageDeleted) GetName ¶ added in v1.3.3
func (p ClientMessageDeleted) GetName() string
type ClientMessageUpdated ¶ added in v0.0.9
type ClientMessageUpdated struct {
BaseEvent
Params ClientMessageUpdatedParams `json:"params"`
}
func NewClientMessageUpdated ¶ added in v0.0.13
func NewClientMessageUpdated(p ClientMessageUpdatedParams) (r ClientMessageUpdated)
func (ClientMessageUpdated) GetName ¶ added in v1.3.3
func (p ClientMessageUpdated) GetName() string
type ClientMessageUpdatedParams ¶ added in v0.0.9
type ClientMessageUpdatedParams struct {
// Chat, task or contact jid. Required.
To JID `json:"to"`
// Message content. Required.
Content MessageContent `json:"content"`
// Uid created by client. Recommended.
MessageId string `json:"message_id,omitempty"`
// Replied to message id. Not required.
ReplyTo string `json:"reply_to,omitempty"`
// Forwarded messages (previously was for reply too). Not required.
LinkedMessages []string `json:"linked_messages,omitempty"`
// Important flag. Not required. Default: false
Important bool `json:"important,omitempty"`
// Disable links preview generation. Not required. Default: false
Nopreview bool `json:"nopreview,omitempty"`
// Message attachments
Uploads []string `json:"uploads,omitempty"`
// Backward compatibility mode
OldStyleAttachment bool `json:"old_style_attachment,omitempty"`
// Deprecated
Comment string `json:"comment,omitempty"`
}
type ClientPing ¶ added in v0.0.11
type ClientPing struct {
BaseEvent
}
func NewClientPing ¶ added in v0.0.13
func NewClientPing() (r ClientPing)
func (ClientPing) GetName ¶ added in v1.3.3
func (p ClientPing) GetName() string
type ColorRule ¶ added in v0.0.8
type ColorRule struct {
Uid string `json:"uid"`
Priority int `json:"priority"`
ColorIndex uint16 `json:"color_index"`
Section string `json:"section,omitempty"`
Tags []string `json:"tags,omitempty"`
Description string `json:"description,omitempty"`
TaskStatus string `json:"task_status,omitempty"`
TaskImportance *int `json:"task_importance,omitempty"`
TaskUrgency *int `json:"task_urgency,omitempty"`
SectionEnabled *bool `json:"section_enabled,omitempty"`
TaskImportanceEnabled *bool `json:"task_importance_enabled,omitempty"`
TaskUrgencyEnabled *bool `json:"task_urgency_enabled,omitempty"`
TagsEnabled *bool `json:"tags_enabled,omitempty"`
}
Set of rules to apply to tasks for coloring.
type Contact ¶ added in v0.0.7
type Contact struct {
// Contact Id
Jid JID `json:"jid"`
// Full name in chats
DisplayName string `json:"display_name"`
// Short name in chats
ShortName string `json:"short_name"`
// Contact email in this team
ContactEmail string `json:"contact_email"`
// Contact phone in this team
ContactPhone string `json:"contact_phone"`
// Icons data
Icons *IconData `json:"icons"`
// Role in this team
Role string `json:"role"`
// Mood in this team
Mood string `json:"mood,omitempty"`
// Status in this team
TeamStatus TeamStatus `json:"status"`
// Last activity in this team (iso datetime)
LastActivity *string `json:"last_activity"`
// Can contact add users to this team
AddToTeamRights bool `json:"add_to_team_rights,omitempty"`
// Contact deleted
IsArchive bool `json:"is_archive,omitempty"`
// Bot name. Empty for users
Botname string `json:"botname,omitempty"`
// Section ids
Sections []string `json:"sections"`
// Can I send message to this contact
CanSendMessage bool `json:"can_send_message,omitempty"`
// Why I can't send message to this chat (if can't)
CantSendMessageReason string `json:"cant_send_message_reason,omitempty"`
// Can I call to this contact
CanCall bool `json:"can_call,omitempty"`
// Can I call create task for this contact
CanCreateTask bool `json:"can_create_task,omitempty"`
// Can I add this contact to group chats
CanAddToGroup bool `json:"can_add_to_group,omitempty"`
// Can I remove this contact from team
CanDelete bool `json:"can_delete,omitempty"`
// Changeable fields
ChangeableFields *[]string `json:"changeable_fields,omitempty"`
// Family name
FamilyName *string `json:"family_name,omitempty"`
// Given name
GivenName *string `json:"given_name,omitempty"`
// Patronymic, if any
Patronymic *string `json:"patronymic,omitempty"`
// Default language code
DefaultLang *string `json:"default_lang,omitempty"`
// Enable debug messages in UI
DebugShowActivity *bool `json:"debug_show_activity,omitempty"`
// Enable remove all messages experimental features
DropallEnabled *bool `json:"dropall_enabled,omitempty"`
// Use Ctrl/Cmd + Enter instead Enter
AltSend *bool `json:"alt_send,omitempty"`
// Use * as @ for mentions
AsteriskMention *bool `json:"asterisk_mention,omitempty"`
// Send push notifications even contact is online
AlwaysSendPushes *bool `json:"always_send_pushes,omitempty"`
// Timezone, if any
Timezone *string `json:"timezone,omitempty"`
// Quiet time start
QuietTimeStart *string `json:"quiet_time_start,omitempty"`
// Quiet time finish
QuietTimeFinish *string `json:"quiet_time_finish,omitempty"`
// Push notifications for group chats
GroupNotificationsEnabled *bool `json:"group_notifications_enabled,omitempty"`
// Push notifications for task chats
TaskNotificationsEnabled *bool `json:"task_notifications_enabled,omitempty"`
// Short view in contact list
ContactShortView *bool `json:"contact_short_view,omitempty"`
// Short view in group list
GroupShortView *bool `json:"group_short_view,omitempty"`
// Short view in task list
TaskShortView *bool `json:"task_short_view,omitempty"`
// Short view in contact list in mobile app
ContactMshortView *bool `json:"contact_mshort_view,omitempty"`
// Short view in group list in mobile app
GroupMshortView *bool `json:"group_mshort_view,omitempty"`
// Short view in task list in mobile app
TaskMshortView *bool `json:"task_mshort_view,omitempty"`
// Show archived contacts in contact list
ContactShowArchived *bool `json:"contact_show_archived,omitempty"`
// Show unread chats first in feed
UnreadFirst *bool `json:"unread_first,omitempty"`
// Show unread chats first in feed in mobile app
MUnreadFirst *bool `json:"munread_first,omitempty"`
// Can I add new members to this team
CanAddToTeam bool `json:"can_add_to_team,omitempty"`
// Can I manage sections in this team
CanManageSections bool `json:"can_manage_sections,omitempty"`
// Can I manage tags in this team
CanManageTags bool `json:"can_manage_tags,omitempty"`
// Can I manage integrations in this team
CanManageIntegrations bool `json:"can_manage_integrations,omitempty"`
// Can I manage color rules in this team
CanManageColorRules bool `json:"can_manage_color_rules,omitempty"`
// Can I create group chats in this team
CanCreateGroup bool `json:"can_create_group,omitempty"`
// Can I view/join public group in this team
CanJoinPublicGroups bool `json:"can_join_public_groups,omitempty"`
// Can I view/join public tasks in this team
CanJoinPublicTasks bool `json:"can_join_public_tasks,omitempty"`
// Deprecated: use CanDeleteAnyMessage in chat object
CanDeleteAnyMessage bool `json:"can_delete_any_message,omitempty"`
// Extra contact fields
CustomFields *ContactCustomFields `json:"custom_fields,omitempty"`
}
Contact
type ContactCustomFields ¶ added in v0.0.7
type ContactCustomFields struct {
Company string `json:"company,omitempty"`
Department string `json:"department,omitempty"`
Title string `json:"title,omitempty"`
MobilePhone string `json:"mobile_phone,omitempty"`
Source string `json:"source,omitempty"`
}
Extra contact fields
type ContactPreview ¶ added in v0.0.7
type ContactShort ¶ added in v0.2.0
type ContactShort struct {
// Contact Id
Jid JID `json:"jid"`
// Full name in chats
DisplayName string `json:"display_name"`
// Short name in chats
ShortName string `json:"short_name"`
// Icons data
Icons *IconData `json:"icons"`
}
Short contact representation
type Country ¶ added in v0.0.8
type Country struct {
// Country code
Code string `json:"code"`
// Country name
Name string `json:"name"`
// Selected by default
Default bool `json:"default,omitempty"`
// Is popular, need to cache
Popular bool `json:"popular,omitempty"`
}
Country for phone numbers selection on login screen
type DeletedChat ¶ added in v0.0.8
type DeletedChat struct {
// Group/Task/Contact id
Jid JID `json:"jid"`
// Chat type
ChatType ChatType `json:"chat_type"`
// Chat fields (related to concrete participant) version
Gentime int64 `json:"gentime"`
// Archive flag. Always true for this structure
IsArchive bool `json:"is_archive"`
}
Minimal chat representation for deletion
type DeletedRemind ¶ added in v0.0.8
type DeletedRemind struct {
// Remind id
Uid string `json:"uid"`
}
Remind deleted message
type DeletedSection ¶ added in v0.0.8
type DeletedSection struct {
Uid string `json:"uid"`
}
type DeletedTag ¶ added in v0.0.8
type DeletedTag struct {
// Tag id
Uid string `json:"uid"`
}
Delete tag message
type DeletedTeam ¶ added in v0.0.7
type DeletedTeam struct {
// Team id
Uid string `json:"uid"`
// Team deleted
IsArchive bool `json:"is_archive"`
// Object version
Gentime int64 `json:"gentime"`
}
Team deletion message. Readonly.
type Features ¶
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"`
// 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"`
// Default UI theme
Theme string `json:"theme"`
// Minimal application version required for this server. Used for breaking changes
MinAppVersion string `json:"min_app_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 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 project and contact's sections names
MaxSectionLength int `json:"max_section_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"`
// 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"`
// External services
OAuthServices []OAuthService `json:"oauth_services,omitempty"`
// ICE servers for WebRTC
ICEServers []ICEServer `json:"ice_servers"`
// True for premise installation
CustomServer bool `json:"custom_server"`
// Name of installation
InstallationType string `json:"installation_type"`
// Testing installation
IsTesting bool `json:"is_testing"`
// Yandex metrika counter id
Metrika string `json:"metrika"`
// 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 functions enabled
Calls bool `json:"calls"`
// Calls functions enabled for mobile applications
MobileCalls bool `json:"mobile_calls"`
// Calls record enabled
CallsRecord bool `json:"calls_record"`
// Disallow call from multiply 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
AllowAdminMute bool `json:"allow_admin_mute,omitempty"`
// Default wallpaper url for mobile apps, if any
DefaultWallpaper string `json:"default_wallpaper,omitempty"`
// 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"`
}
Server information. Readonly.
type GroupAccessRequest ¶ added in v0.0.8
type GroupAccessRequest struct {
Uid string `json:"uid"`
Created ISODateTimeString `json:"created"`
Subject *JID `json:"subject"`
}
type GroupMembership ¶ added in v0.0.8
type GroupMembership struct {
// Contact id
Jid *JID `json:"jid"`
// Status in group
Status GroupStatus `json:"status"`
// Can I remove this member
CanRemove bool `json:"can_remove,omitempty"`
}
Group chat membership status
type GroupStatus ¶ added in v0.0.8
type GroupStatus string
Status in team
const ( // Group administrator GroupAdmin GroupStatus = "admin" // 2 // Group member GroupMember GroupStatus = "member" // 3 )
type ICEServer ¶
type ICEServer struct {
// URls
Urls string `json:"urls"`
}
Interactive Connectivity Establishment Server for WEB Rtc connection. Readonly.
type ISODateTimeString ¶ added in v1.17.0
type ISODateTimeString = string
type IconData ¶ added in v0.0.7
type IconData struct {
// Small icon
Sm *SingleIcon `json:"sm,omitempty"`
// Large image
Lg *SingleIcon `json:"lg,omitempty"`
// Generated image with 1-2 letters
Stub string `json:"stub,omitempty"`
// Letters from stub icon
Letters string `json:"letters,omitempty"`
// Stub icon background color
Color string `json:"color,omitempty"`
}
Icon data. Contains sm+lg (for uploaded image) OR stub+letters+color (for icon generated from display name)
func (*IconData) SmUrlOrStub ¶ added in v0.0.7
type Integration ¶ added in v0.0.8
type Integration struct {
// Id
Uid string `json:"uid,omitempty"`
// Comment, if any
Comment string `json:"comment"`
// Creation datetime, iso
Created ISODateTimeString `json:"created,omitempty"`
// Integration enabled
Enabled bool `json:"enabled"`
// Integration form
Form IntegrationForm `json:"form"`
// Chat id
Group JID `json:"group"`
// Full description
Help string `json:"help,omitempty"`
// Unique integration name
Kind string `json:"kind"`
Title string `json:"-"`
}
Integration for concrete chat
type IntegrationField ¶ added in v0.0.8
type IntegrationField struct {
// Label
Label string `json:"label"`
// Is field readonly
Readonly bool `json:"readonly"`
// Current value
Value string `json:"value"`
}
Integration form field
type IntegrationForm ¶ added in v0.0.8
type IntegrationForm struct {
// Api key field, if any
ApiKey *IntegrationField `json:"api_key,omitempty"`
// Webhook url, if any
WebhookUrl *IntegrationField `json:"webhook_url,omitempty"`
// Url, if any
Url *IntegrationField `json:"url,omitempty"`
}
Integration form
type IntegrationKind ¶ added in v0.0.8
type IntegrationKind struct {
// Integration unique name
Kind string `json:"kind"`
// Plugin title
Title string `json:"title"`
// Integration template
Template Integration `json:"template"`
// Path to icon
Icon string `json:"icon"`
// Plugin description
Description string `json:"description"`
}
Integration kind
type Integrations ¶ added in v0.0.8
type Integrations struct {
// Currently existing integrations
Integrations []Integration `json:"integrations"`
// Types of integrations available for setup
Kinds []IntegrationKind `json:"kinds"`
}
Complete integrations data, as received from server
type Invitation ¶ added in v0.0.8
type Invitation struct {
Uid string `json:"uid"`
Token string `json:"token"`
Created ISODateTimeString `json:"created"`
Qr string `json:"qr"`
}
type JID ¶ added in v0.0.4
type JID struct {
// contains filtered or unexported fields
}
func (JID) MarshalJSON ¶ added in v0.0.4
func (JID) MarshalMsgpack ¶ added in v1.3.4
func (*JID) UnmarshalJSON ¶ added in v0.0.4
func (*JID) UnmarshalMsgpack ¶ added in v1.3.4
type MarkupEntity ¶ added in v1.5.0
type MarkupEntity struct {
// Open marker offset
Open int `json:"op"`
// Open marker length
OpenLength int `json:"oplen,omitempty"`
// Close marker offset
Close int `json:"cl"`
// Close marker length
CloseLength int `json:"cllen,omitempty"`
// Marker type
Type MarkupType `json:"typ"`
// Url, for Link type
Url string `json:"url,omitempty"`
// Text replacement.
Repl string `json:"repl,omitempty"`
// Time, for Time type
Time string `json:"time,omitempty"`
// List of internal markup entities
Childs []MarkupEntity `json:"childs,omitempty"`
}
Markup entity. Experimental
func (MarkupEntity) String ¶ added in v1.5.0
func (e MarkupEntity) String() string
type MarkupType ¶ added in v1.17.0
type MarkupType string
Markup type
const ( // Bold text Bold MarkupType = "bold" // Italic text Italic MarkupType = "italic" // Underscore text Underscore MarkupType = "underscore" // Striked text Strike MarkupType = "strike" // Inlined code Code MarkupType = "code" // Code block CodeBlock MarkupType = "codeblock" // Quote Quote MarkupType = "quote" // Link Link MarkupType = "link" // Datetime Time MarkupType = "time" // Unsafe html element Unsafe MarkupType = "unsafe" )
type Mediasubtype ¶ added in v0.0.4
type Mediasubtype string
const ( MediaSubtypeSticker Mediasubtype = "sticker" MediaSubtypeNewtask Mediasubtype = "newtask" )
type Mediatype ¶ added in v0.0.4
type Mediatype string
const ( MediatypePlain Mediatype = "plain" MediatypeChange Mediatype = "change" MediatypeDeleted Mediatype = "deleted" MediatypeFile Mediatype = "file" MediatypeImage Mediatype = "image" MediatypeVideo Mediatype = "video" MediatypeAudiomsg Mediatype = "audiomsg" MediatypeContact Mediatype = "contact" MediatypePdf Mediatype = "pdf" )
type Message ¶ added in v0.0.4
type Message struct {
// Message content struct
Content MessageContent `json:"content"`
// Simple plaintext message representation
PushText string `json:"push_text,omitempty" tdproto:"readonly"`
// Sender contact id
From JID `json:"from" tdproto:"readonly"`
// Recipient id (group, task or contact)
To JID `json:"to"`
// Message uid
MessageId string `json:"message_id"`
// Message creation datetime (set by server side) or sending datetime in future for draft messages
Created ISODateTimeString `json:"created" tdproto:"readonly"`
// Creation datetime for draft messages
Drafted ISODateTimeString `json:"drafted,omitempty" tdproto:"readonly"`
// Object version
Gentime int64 `json:"gentime" tdproto:"readonly"`
// Chat type
ChatType ChatType `json:"chat_type" tdproto:"readonly"`
// Chat id
Chat JID `json:"chat" tdproto:"readonly"`
// External/internals links
Links MessageLinks `json:"links,omitempty" tdproto:"readonly"`
// Markup entities. Experimental
Markup []MarkupEntity `json:"markup,omitempty" tdproto:"readonly"`
// Importance flag
Important bool `json:"important,omitempty"`
// ISODateTimeString of message modification or deletion
Edited ISODateTimeString `json:"edited,omitempty" tdproto:"readonly"`
// Message was seen by anybody in chat. True or null
Received bool `json:"received,omitempty" tdproto:"readonly"`
// Unused yet
NumReceived int `json:"num_received,omitempty" tdproto:"readonly"`
// Disable link previews. True or null
Nopreview bool `json:"nopreview,omitempty"`
// Has link previews. True or null
HasPreviews bool `json:"has_previews,omitempty" tdproto:"readonly"`
// Previous message id in this chat. Uid or null
Prev string `json:"prev,omitempty" tdproto:"readonly"`
// This message is first in this chat. True or null
IsFirst bool `json:"is_first,omitempty" tdproto:"readonly"`
// This message is first in this chat. True or null
IsLast bool `json:"is_last,omitempty" tdproto:"readonly"`
// Message uploads
Uploads []Upload `json:"uploads,omitempty"`
// Message reactions struct. Can be null
Reactions []MessageReaction `json:"reactions,omitempty" tdproto:"readonly"`
// Message that was replied to, if any
ReplyTo *Message `json:"reply_to,omitempty"`
// Forwarded messages. Can be null. Also contains double of ReplyTo for backward compatibility
LinkedMessages []Message `json:"linked_messages,omitempty"`
// Has mention (@). True or null
Notice bool `json:"notice,omitempty" tdproto:"readonly"`
// Message has no pushes and did not affect any counters
Silently bool `json:"silently,omitempty" tdproto:"readonly"`
// Author can change this message until date. Can be null
EditableUntil ISODateTimeString `json:"editable_until,omitempty" tdproto:"readonly"`
// Index number of this message. Starts from 0. Null for deleted messages. Changes when any previous message wad deleted.
Num *int `json:"num,omitempty" tdproto:"readonly"`
// This message is archive. True or null
IsArchive bool `json:"is_archive,omitempty" tdproto:"readonly"`
// Debug information, if any
Debug string `json:"_debug,omitempty" tdproto:"readonly"`
}
Chat message
type MessageContent ¶ added in v0.0.4
type MessageContent struct {
// Text representation of message
Text string `json:"text"`
// Message type
Type Mediatype `json:"type"`
// Message subtype, if any
Subtype Mediasubtype `json:"subtype,omitempty"`
// Upload id, if any. Deprecated: use Uploads instead
Upload string `mediatype:"audiomsg,image,video,file" json:"upload,omitempty"`
// Upload url, if any. Deprecated: use Uploads instead
MediaUrl string `mediatype:"audiomsg,image,video,file" json:"mediaURL,omitempty"`
// Upload size, if any. Deprecated: use Uploads instead
Size int `mediatype:"audiomsg,image,video,file" json:"size,omitempty"`
// Upload duration, if any. Deprecated: use Uploads instead
Duration *uint `mediatype:"audiomsg,video" json:"duration,omitempty"`
// Upload still processing, if any. Deprecated: use Uploads instead
Processing bool `mediatype:"video" json:"processing,omitempty"`
// Upload preview height, in pixels, if any. Deprecated: use Uploads instead
PreviewHeight int `mediatype:"image,video" json:"previewHeight,omitempty"`
// Upload width, in pixels, if any. Deprecated: use Uploads instead
PreviewWidth int `mediatype:"image,video" json:"previewWidth,omitempty"`
// Upload preview absolute url, if any. Deprecated: use Uploads instead
PreviewUrl string `mediatype:"image,video" json:"previewURL,omitempty"`
// Upload high resolution preview absolute url, if any. Deprecated: use Uploads instead
Preview2xUrl string `mediatype:"image,video" json:"preview2xURL,omitempty"`
// Upload name, if any. Deprecated: use Uploads instead
Name string `mediatype:"image,video,file" json:"name,omitempty"`
// Upload is animated image, if any. Deprecated: use Uploads instead
Animated bool `mediatype:"image" json:"animated,omitempty"`
// Change title (for "change" mediatype)
Title string `mediatype:"change" json:"title,omitempty"`
// Change old value (for "change" mediatype)
Old *string `mediatype:"change" json:"old,omitempty"`
// Change new value (for "change" mediatype)
New *string `mediatype:"change" json:"new,omitempty"`
// Change actor contact id (for "change" mediatype)
Actor *JID `mediatype:"change" json:"actor,omitempty"`
// Comment. For audio message.
Comment string `mediatype:"progress" json:"comment,omitempty"`
// Given name (for "contact" mediatype)
GivenName *string `mediatype:"contact" json:"given_name,omitempty"`
// Family name (for "contact" mediatype)
FamilyName *string `mediatype:"contact" json:"family_name,omitempty"`
// Patronymic name (for "contact" mediatype)
Patronymic *string `mediatype:"contact" json:"patronymic,omitempty"`
// Contact phones list (for "contact" mediatype)
Phones *[]string `mediatype:"contact" json:"phones,omitempty"`
// Emails list (for "contact" mediatype)
Emails *[]string `mediatype:"contact" json:"emails,omitempty"`
// Stickerpack name (for "sticker" subtype)
Stickerpack string `mediasubtype:"sticker" json:"stickerpack,omitempty"`
// Pdf version, if any
PdfVersion *PdfVersion `json:"pdf_version,omitempty"`
}
Chat message content
type MessageLink ¶ added in v0.0.4
type MessageLink struct {
// Text fragment that should be replaced by link
Pattern string `json:"pattern"`
// Internal or external link
Url string `json:"url"`
// Text replacement.
Text string `json:"text"`
// Optional preview info, for websites
Preview *MessageLinkPreview `json:"preview,omitempty"`
// Optional upload info
Uploads []Upload `json:"uploads,omitempty"`
// Website previews disabled
NoPreview bool `json:"nopreview,omitempty"`
// Optional youtube movie id
YoutubeId string `json:"youtube_id,omitempty"`
}
Checked message links. In short: "Click here: {link.Pattern}" => "Click here: <a href='{link.Url}'>{link.Text}</a>"
type MessageLinkPreview ¶ added in v0.0.4
type MessageLinkPreview struct {
// Website title or og:title content
Title string `json:"title"`
// Website description
Description string `json:"description,omitempty"`
}
Website title and description
type MessageLinks ¶ added in v0.0.4
type MessageLinks []MessageLink
type MessagePush ¶ added in v0.0.9
type MessagePush struct {
// Push title
Title string `json:"title"`
// Push subtitle
Subtitle string `json:"subtitle"`
// Push body
Message string `json:"message"`
// Absolute url to push icon
IconUrl string `json:"icon_url"`
// Url opened on click
ClickAction string `json:"click_action"`
// Push tag (for join pushes)
Tag string `json:"tag"`
// Team uid
Team string `json:"team"`
// Sender contact id
Sender *JID `json:"sender"`
// Chat id
Chat *JID `json:"chat"`
// Message id
MessageId string `json:"message_id"`
// Message creation iso datetime
Created ISODateTimeString `json:"created"`
}
Push message over websockets. Readonly.
type MessageReaction ¶ added in v0.0.4
type MessageReaction struct {
// Emoji
Name string `json:"name"`
// Number of reactions
Counter int `json:"counter"`
// Details
Details []MessageReactionDetail `json:"details"`
}
Message emoji reaction
type MessageReactionDetail ¶ added in v0.0.4
type MessageReactionDetail struct {
// When reaction added, iso datetime
Created ISODateTimeString `json:"created"`
// Reaction author
Sender *JID `json:"sender"`
// Reaction emoji
Name string `json:"name"`
}
Message reaction detail
type OAuthService ¶ added in v1.19.0
type OAuthService struct {
// Integration title
Name string `json:"name"`
// Redirect url
Url string `json:"url"`
}
OAuth service
type OnlineCall ¶ added in v0.0.9
type OnlineContact ¶ added in v0.0.9
type PaginatedChats ¶ added in v0.0.8
type PaginatedContacts ¶ added in v0.0.8
type PaginatedMessages ¶ added in v0.0.8
type PaginatedUploadShortMessages ¶ added in v1.20.1
type PaginatedUploadShortMessages struct {
Objects []UploadShortMessage `json:"objects"`
Count int `json:"count"`
Limit int `json:"limit"`
Offset int `json:"offset"`
}
type PdfVersion ¶ added in v0.0.4
type PdfVersion struct {
// Absolute url
Url string `json:"url"`
// First string of text content
TextPreview string `json:"text_preview,omitempty"`
}
PDF preview of mediafile. Experimental
type PushDevice ¶ added in v0.0.8
type PushDevice struct {
Type string `json:"type"`
DeviceId string `json:"device_id"`
NotificationToken string `json:"notification_token"`
VoipNotificationToken string `json:"voip_notification_token"`
AllowedNotifications bool `json:"allowed_notifications"` // deprecated
Name string `json:"name"`
DataPushes bool `json:"data_pushes"`
DataBadges bool `json:"data_badges"`
}
type PushDeviceType ¶ added in v0.0.8
type PushDeviceType int
func (PushDeviceType) DbValue ¶ added in v0.0.8
func (t PushDeviceType) DbValue() int16
func (PushDeviceType) Mobile ¶ added in v0.0.8
func (t PushDeviceType) Mobile() bool
func (PushDeviceType) Name ¶ added in v0.0.8
func (t PushDeviceType) Name() string
func (PushDeviceType) String ¶ added in v0.0.8
func (t PushDeviceType) String() string
type ReceivedMessage ¶ added in v0.0.9
type Remind ¶ added in v0.0.8
type Remind struct {
// Remind id
Uid string `json:"uid"`
// Chat id
Chat *JID `json:"chat"`
// Activation time, iso
FireAt string `json:"fire_at"`
// Comment, if any
Comment string `json:"comment,omitempty"`
}
Remind
type Roster ¶ added in v0.0.8
type Roster struct {
Badge *uint `json:"badge"` // TODO: ,omitempty
ContactSections []Section `json:"contact_sections"` // TODO: ,omitempty
Contacts []Contact `json:"contacts"` // TODO: ,omitempty
Devices []PushDevice `json:"devices"` // TODO: ,omitempty
Groups []Chat `json:"groups"` // TODO: ,omitempty
DirectChats []Chat `json:"direct_chats"` // TODO: ,omitempty
GroupSections []Section `json:"group_sections"` // TODO: ,omitempty
TaskChats []Chat `json:"task_chats"` // TODO: ,omitempty
TaskSections []Section `json:"task_sections"` // TODO: ,omitempty
TaskTabs []TaskTab `json:"task_tabs"` // TODO: ,omitempty
}
deprecated
type ServerCallAnswer ¶ added in v0.0.9
type ServerCallAnswer struct {
BaseEvent
Params serverCallAnswerParams `json:"params"`
}
func NewServerCallAnswer ¶ added in v0.0.9
func NewServerCallAnswer(jid JID, sdp string, onliners []CallOnliner, uid string) (r ServerCallAnswer)
func (ServerCallAnswer) GetName ¶ added in v1.3.3
func (p ServerCallAnswer) GetName() string
type ServerCallBuzz ¶ added in v0.0.9
type ServerCallBuzz struct {
BaseEvent
Params serverCallBuzzParams `json:"params"`
}
func NewServerCallBuzz ¶ added in v0.0.9
func NewServerCallBuzz(teamShort TeamShort, chatShort ChatShort, actorShort ContactShort, uid string, timeout time.Duration) (r ServerCallBuzz)
func (ServerCallBuzz) GetName ¶ added in v1.3.3
func (p ServerCallBuzz) GetName() string
type ServerCallBuzzcancel ¶ added in v0.0.9
type ServerCallBuzzcancel struct {
BaseEvent
Params serverCallBuzzcancelParams `json:"params"`
}
func NewServerCallBuzzcancel ¶ added in v0.0.9
func NewServerCallBuzzcancel(chat *JID, teamUid string, uid string) (r ServerCallBuzzcancel)
func (ServerCallBuzzcancel) GetName ¶ added in v1.3.3
func (p ServerCallBuzzcancel) GetName() string
type ServerCallCheckFingerprint ¶ added in v0.0.9
type ServerCallCheckFingerprint struct {
BaseEvent
Params serverCallCheckFingerprintParams `json:"params"`
}
func NewServerCallCheckFingerprint ¶ added in v0.0.9
func NewServerCallCheckFingerprint(fingerprint string) (r ServerCallCheckFingerprint)
func (ServerCallCheckFingerprint) GetName ¶ added in v1.3.3
func (p ServerCallCheckFingerprint) GetName() string
type ServerCallLeave ¶ added in v0.0.9
type ServerCallLeave struct {
BaseEvent
Params serverCallLeaveParams `json:"params"`
}
func NewServerCallLeave ¶ added in v0.0.9
func NewServerCallLeave(jid JID, uid string) (r ServerCallLeave)
func (ServerCallLeave) GetName ¶ added in v1.3.3
func (p ServerCallLeave) GetName() string
type ServerCallMuteall ¶ added in v0.0.9
type ServerCallMuteall struct {
BaseEvent
Params serverCallMuteallParams `json:"params"`
}
func NewServerCallMuteall ¶ added in v0.0.9
func NewServerCallMuteall(jid JID, muted bool) (r ServerCallMuteall)
func (ServerCallMuteall) GetName ¶ added in v1.3.3
func (p ServerCallMuteall) GetName() string
type ServerCallReject ¶ added in v0.0.9
type ServerCallReject struct {
BaseEvent
Params serverCallRejectParams `json:"params"`
}
func NewServerCallReject ¶ added in v0.0.9
func NewServerCallReject(jid JID, reason string, uid string) (r ServerCallReject)
func (ServerCallReject) GetName ¶ added in v1.3.3
func (p ServerCallReject) GetName() string
type ServerCallRestart ¶ added in v0.0.9
type ServerCallRestart struct {
BaseEvent
Params serverCallRestartParams `json:"params"`
}
func NewServerCallRestart ¶ added in v0.0.9
func NewServerCallRestart(chat *JID, teamUid string, uid string) (r ServerCallRestart)
func (ServerCallRestart) GetName ¶ added in v1.3.3
func (p ServerCallRestart) GetName() string
type ServerCallSound ¶ added in v0.0.9
type ServerCallSound struct {
BaseEvent
Params serverCallSoundParams `json:"params"`
}
func NewServerCallSound ¶ added in v0.0.9
func NewServerCallSound(jid JID, muted bool) (r ServerCallSound)
func (ServerCallSound) GetName ¶ added in v1.3.3
func (p ServerCallSound) GetName() string
type ServerCallState ¶ added in v0.0.9
type ServerCallState struct {
BaseEvent
Params serverCallStateParams `json:"params"`
}
func NewServerCallState ¶ added in v0.0.9
func NewServerCallState(chat HasJid, startCall, finishCall *time.Time, onliners []CallOnliner, audiorecord, buzz bool, uid string, timestamp int64) (r ServerCallState)
func (ServerCallState) GetName ¶ added in v1.3.3
func (p ServerCallState) GetName() string
type ServerCallTalking ¶ added in v0.0.9
type ServerCallTalking struct {
BaseEvent
Params serverCallTalkingParams `json:"params"`
}
func NewServerCallTalking ¶ added in v0.0.9
func NewServerCallTalking(talking bool, chat, actor *JID) (r ServerCallTalking)
func (ServerCallTalking) GetName ¶ added in v1.3.3
func (p ServerCallTalking) GetName() string
type ServerChatComposing ¶ added in v0.0.9
type ServerChatComposing struct {
BaseEvent
Params serverChatComposingParams `json:"params"`
}
func NewServerChatComposing ¶ added in v0.0.9
func NewServerChatComposing(composing, isAudio bool, chat, actor *JID) (r ServerChatComposing)
func (ServerChatComposing) GetName ¶ added in v1.3.3
func (p ServerChatComposing) GetName() string
type ServerChatDeleted ¶ added in v0.0.9
type ServerChatDeleted struct {
BaseEvent
Params serverChatDeletedParams `json:"params"`
}
func NewServerChatDeleted ¶ added in v0.0.9
func NewServerChatDeleted(chat DeletedChat, teamUnread *TeamUnread, badge uint) (r ServerChatDeleted)
func (ServerChatDeleted) GetName ¶ added in v1.3.3
func (p ServerChatDeleted) GetName() string
type ServerChatDraft ¶ added in v0.0.9
type ServerChatDraft struct {
BaseEvent
Params serverChatDraftParams `json:"params"`
}
func NewServerChatDraft ¶ added in v0.0.9
func NewServerChatDraft(jid *JID, draft string, draftNum int64) (r ServerChatDraft)
func (ServerChatDraft) GetName ¶ added in v1.3.3
func (p ServerChatDraft) GetName() string
type ServerChatLastread ¶ added in v0.0.9
type ServerChatLastread struct {
BaseEvent
Params serverChatLastreadParams `json:"params"`
}
func NewServerChatLastread ¶ added in v0.0.9
func NewServerChatLastread(counters ChatCounters, teamUnread *TeamUnread, badge uint) (r ServerChatLastread)
func (ServerChatLastread) GetName ¶ added in v1.3.3
func (p ServerChatLastread) GetName() string
type ServerChatUpdated ¶ added in v0.0.9
type ServerChatUpdated struct {
BaseEvent
Params serverChatUpdatedParams `json:"params"`
}
func NewServerChatUpdated ¶ added in v0.0.9
func NewServerChatUpdated(chat Chat, teamUnread *TeamUnread, badge uint) (r ServerChatUpdated)
func (ServerChatUpdated) GetName ¶ added in v1.3.3
func (p ServerChatUpdated) GetName() string
type ServerConfirm ¶ added in v0.0.9
type ServerConfirm struct {
BaseEvent
Params serverConfirmParams `json:"params"`
}
func NewServerConfirm ¶ added in v0.0.9
func NewServerConfirm(v string) (r ServerConfirm)
func (ServerConfirm) GetName ¶ added in v1.3.3
func (p ServerConfirm) GetName() string
type ServerContactUpdated ¶ added in v0.0.9
type ServerContactUpdated struct {
BaseEvent
Params serverContactUpdatedParams `json:"params"`
}
func NewServerContactUpdated ¶ added in v0.0.9
func NewServerContactUpdated(contacts ...Contact) (r ServerContactUpdated)
func (ServerContactUpdated) GetName ¶ added in v1.3.3
func (p ServerContactUpdated) GetName() string
type ServerDebug ¶ added in v0.0.9
type ServerDebug struct {
BaseEvent
Params serverDebugParams `json:"params"`
}
func NewServerDebug ¶ added in v0.0.9
func NewServerDebug(text string) (r ServerDebug)
func (ServerDebug) GetName ¶ added in v1.3.3
func (p ServerDebug) GetName() string
type ServerLogin ¶ added in v0.0.9
type ServerLogin struct {
BaseEvent
Params serverLoginParams `json:"params"`
}
func NewServerLogin ¶ added in v0.0.9
func NewServerLogin(deviceName string) (r ServerLogin)
func (ServerLogin) GetName ¶ added in v1.3.3
func (p ServerLogin) GetName() string
type ServerMessagePush ¶ added in v0.0.9
type ServerMessagePush struct {
BaseEvent
Params MessagePush `json:"params"`
}
func NewServerMessagePush ¶ added in v0.0.9
func NewServerMessagePush(p MessagePush) (r ServerMessagePush)
func (ServerMessagePush) GetName ¶ added in v1.3.3
func (p ServerMessagePush) GetName() string
type ServerMessageReceived ¶ added in v0.0.9
type ServerMessageReceived struct {
BaseEvent
Params serverMessageReceivedParams `json:"params"`
}
func NewServerMessageReceived ¶ added in v0.0.9
func NewServerMessageReceived(messages []ReceivedMessage) (r ServerMessageReceived)
func (ServerMessageReceived) GetName ¶ added in v1.3.3
func (p ServerMessageReceived) GetName() string
type ServerMessageUpdated ¶ added in v0.0.9
type ServerMessageUpdated struct {
BaseEvent
Params serverMessageUpdatedParams `json:"params"`
}
func NewServerMessageUpdated ¶ added in v0.0.9
func NewServerMessageUpdated(messages []Message, delayed bool, counters *ChatCounters, teamUnread *TeamUnread, badge *uint) (r ServerMessageUpdated)
func (ServerMessageUpdated) GetName ¶ added in v1.3.3
func (p ServerMessageUpdated) GetName() string
type ServerOnline ¶ added in v0.0.9
type ServerOnline struct {
BaseEvent
Params serverOnlineParams `json:"params"`
}
func NewServerOnline ¶ added in v0.0.9
func NewServerOnline(contacts []OnlineContact, calls []OnlineCall) (r ServerOnline)
func (ServerOnline) GetName ¶ added in v1.3.3
func (p ServerOnline) GetName() string
type ServerPanic ¶ added in v0.0.9
type ServerPanic struct {
BaseEvent
Params serverPanicParams `json:"params"`
}
func NewServerPanic ¶ added in v0.0.9
func NewServerPanic(code string) (r ServerPanic)
func (ServerPanic) GetName ¶ added in v1.3.3
func (p ServerPanic) GetName() string
type ServerProcessing ¶ added in v0.0.9
type ServerProcessing struct {
BaseEvent
Params serverProcessingParams `json:"params"`
}
func NewServerProcessing ¶ added in v0.0.9
func NewServerProcessing(num, total int, action, message string, hasError bool) (r ServerProcessing)
func (ServerProcessing) GetName ¶ added in v1.3.3
func (p ServerProcessing) GetName() string
type ServerRemindDeleted ¶ added in v0.0.9
type ServerRemindDeleted struct {
BaseEvent
Params serverRemindDeletedParams `json:"params"`
}
func NewServerRemindDeleted ¶ added in v0.0.9
func NewServerRemindDeleted(uid string) (r ServerRemindDeleted)
func (ServerRemindDeleted) GetName ¶ added in v1.3.3
func (p ServerRemindDeleted) GetName() string
type ServerRemindFired ¶ added in v0.0.9
type ServerRemindFired struct {
BaseEvent
Params serverRemindFiredParams `json:"params"`
}
func NewServerRemindFired ¶ added in v0.0.9
func NewServerRemindFired(remind Remind) (r ServerRemindFired)
func (ServerRemindFired) GetName ¶ added in v1.3.3
func (p ServerRemindFired) GetName() string
type ServerRemindUpdated ¶ added in v0.0.9
type ServerRemindUpdated struct {
BaseEvent
Params serverRemindUpdatedParams `json:"params"`
}
func NewServerRemindUpdated ¶ added in v0.0.9
func NewServerRemindUpdated(reminds ...Remind) (r ServerRemindUpdated)
func (ServerRemindUpdated) GetName ¶ added in v1.3.3
func (p ServerRemindUpdated) GetName() string
type ServerRoster ¶ added in v0.0.9
deprecated
func NewServerRoster ¶ added in v0.0.9
func NewServerRoster(roster Roster) (r ServerRoster)
deprecated
func (ServerRoster) GetName ¶ added in v1.3.3
func (p ServerRoster) GetName() string
type ServerSectionDeleted ¶ added in v0.0.9
type ServerSectionDeleted struct {
BaseEvent
Params serverSectionDeletedParams `json:"params"`
}
func NewServerSectionDeleted ¶ added in v0.0.9
func NewServerSectionDeleted(ct ChatType, section DeletedSection) (r ServerSectionDeleted)
func (ServerSectionDeleted) GetName ¶ added in v1.3.3
func (p ServerSectionDeleted) GetName() string
type ServerSectionUpdated ¶ added in v0.0.9
type ServerSectionUpdated struct {
BaseEvent
Params serverSectionUpdatedParams `json:"params"`
}
func NewServerSectionUpdated ¶ added in v0.0.9
func NewServerSectionUpdated(ct ChatType, sections ...Section) (r ServerSectionUpdated)
func (ServerSectionUpdated) GetName ¶ added in v1.3.3
func (p ServerSectionUpdated) GetName() string
type ServerTagDeleted ¶ added in v0.0.9
type ServerTagDeleted struct {
BaseEvent
Params serverTagDeletedParams `json:"params"`
}
func NewServerTagDeleted ¶ added in v0.0.9
func NewServerTagDeleted(tags ...DeletedTag) (r ServerTagDeleted)
func (ServerTagDeleted) GetName ¶ added in v1.3.3
func (p ServerTagDeleted) GetName() string
type ServerTagUpdated ¶ added in v0.0.9
type ServerTagUpdated struct {
BaseEvent
Params serverTagUpdatedParams `json:"params"`
}
func NewServerTagUpdated ¶ added in v0.0.9
func NewServerTagUpdated(tags ...Tag) (r ServerTagUpdated)
func (ServerTagUpdated) GetName ¶ added in v1.3.3
func (p ServerTagUpdated) GetName() string
type ServerTeamCounters ¶ added in v0.0.9
type ServerTeamCounters struct {
BaseEvent
Params serverTeamCountersParams `json:"params"`
}
func NewServerTeamCounters ¶ added in v0.0.9
func NewServerTeamCounters(counters []TeamCounter, badge uint) ServerTeamCounters
TODO: remove empty
func (ServerTeamCounters) GetName ¶ added in v1.3.3
func (p ServerTeamCounters) GetName() string
type ServerTeamDeleted ¶ added in v0.0.9
type ServerTeamDeleted struct {
BaseEvent
Params serverTeamDeletedParams `json:"params"`
}
func NewServerTeamDeleted ¶ added in v0.0.9
func NewServerTeamDeleted(uid string, gentime int64) (r ServerTeamDeleted)
func (ServerTeamDeleted) GetName ¶ added in v1.3.3
func (p ServerTeamDeleted) GetName() string
type ServerTeamUpdated ¶ added in v0.0.9
type ServerTeamUpdated struct {
BaseEvent
Params serverTeamUpdatedParams `json:"params"`
}
func NewServerTeamUpdated ¶ added in v0.0.9
func NewServerTeamUpdated(team Team) (r ServerTeamUpdated)
func (ServerTeamUpdated) GetName ¶ added in v1.3.3
func (p ServerTeamUpdated) GetName() string
type ServerTime ¶ added in v0.0.9
type ServerTime struct {
BaseEvent
Params serverTimeParams `json:"params"`
}
func NewServerTime ¶ added in v0.0.9
func NewServerTime() (r ServerTime)
func (ServerTime) GetName ¶ added in v1.3.3
func (p ServerTime) GetName() string
type ServerUiSettings ¶ added in v0.0.9
type ServerUiSettings struct {
BaseEvent
Params *UiSettings `json:"params"`
}
func NewServerUiSettings ¶ added in v0.0.9
func NewServerUiSettings(v *UiSettings) (r ServerUiSettings)
func (ServerUiSettings) GetName ¶ added in v1.3.3
func (p ServerUiSettings) GetName() string
type ServerUploadUpdated ¶ added in v1.9.0
type ServerUploadUpdated struct {
BaseEvent
Params serverUploadUpdatedParams `json:"params"`
}
func NewServerUploadUpdated ¶ added in v1.9.0
func NewServerUploadUpdated(uploads ...Upload) (r ServerUploadUpdated)
func (ServerUploadUpdated) GetName ¶ added in v1.9.0
func (p ServerUploadUpdated) GetName() string
type ServerWarning ¶ added in v0.0.9
type ServerWarning struct {
BaseEvent
Params serverWarningParams `json:"params"`
}
func NewServerWarning ¶ added in v0.0.9
func NewServerWarning(message, orig string) (r ServerWarning)
func (ServerWarning) GetName ¶ added in v1.3.3
func (p ServerWarning) GetName() string
type Session ¶ added in v1.8.0
type Session struct {
// Session id
Uid string `json:"uid"`
// Creation datetime
Created ISODateTimeString `json:"created"`
// Language code
Lang string `json:"lang,omitempty"`
// Team id
Team string `json:"team,omitempty"`
// Mobile
IsMobile bool `json:"is_mobile,omitempty"`
// Away from keyboard
Afk bool `json:"afk,omitempty"`
// User agent
Useragent string `json:"useragent,omitempty"`
// IP address
Addr string `json:"addr,omitempty"`
}
Websocket session
type ShortMessage ¶ added in v1.20.0
type ShortMessage struct {
// Sender contact id
From JID `json:"from" tdproto:"readonly"`
// Recipient id (group, task or contact)
To JID `json:"to"`
// Message uid
MessageId string `json:"message_id"`
// Message creation datetime (set by server side) or sending datetime in future for draft messages
Created ISODateTimeString `json:"created" tdproto:"readonly"`
// Object version
Gentime int64 `json:"gentime" tdproto:"readonly"`
// Chat type
ChatType ChatType `json:"chat_type" tdproto:"readonly"`
// Chat id
Chat JID `json:"chat" tdproto:"readonly"`
// This message is archive. True or null
IsArchive bool `json:"is_archive,omitempty" tdproto:"readonly"`
}
Short message based on chat message
type SimpleDailyIntStats ¶ added in v1.1.0
type SingleIcon ¶ added in v0.0.7
type SingleIcon struct {
// absolute url to icon
Url string `json:"url"`
// Icon width, in pixels
Width int `json:"width"`
// Icon height, in pixels
Height int `json:"height"`
}
Small or large icon
type Stickerpack ¶ added in v1.2.4
type Subtask ¶ added in v0.0.8
type Subtask struct {
// Task id
Jid JID `json:"jid"`
// Assignee contact id. Tasks only
Assignee JID `json:"assignee"`
// Task title. Generated from number and description
Title string `json:"title"`
// Task number in this team
Num uint `json:"num"`
// Title
DisplayName string `json:"display_name"`
// Can other team member see this task/group chat
Public bool `json:"public,omitempty"`
}
Link to sub/sup task
type TaskColor ¶ added in v0.0.8
type TaskColor struct {
Regular string `json:"regular"`
Dark string `json:"dark"`
Light string `json:"light"`
}
Task color rules color
type TaskCounters ¶ added in v1.13.2
type TaskCounters struct {
// Task jid
Jid JID `json:"jid"`
// Unreads conuter
NumUnread uint `json:"num_unread,omitempty"`
// Mentions (@) counter
NumUnreadNotices uint `json:"num_unread_notices,omitempty"`
}
Tasks counters
type TaskFilter ¶ added in v0.0.8
type TaskFilter struct {
// Task filter field
Field TaskFilterKey `json:"field"`
// Filter title
Title string `json:"title"`
}
Task filter
type TaskFilterKey ¶ added in v0.0.8
type TaskFilterKey string
func (TaskFilterKey) String ¶ added in v0.0.8
func (key TaskFilterKey) String() string
type TaskItem ¶ added in v0.0.8
type TaskItem struct {
// Id
Uid string `json:"uid,omitempty"`
// Sort ordering
SortOrdering uint `json:"sort_ordering,omitempty"`
// Text or "#{OtherTaskNumber}"
Text string `json:"text"`
// Item checked
Checked bool `json:"checked,omitempty"`
// Can I toggle this item
CanToggle bool `json:"can_toggle,omitempty"`
// Link to subtask. Optional
Subtask *Subtask `json:"subtask,omitempty"`
}
Task checklist item
type TaskPreview ¶ added in v0.0.8
type TaskSort ¶ added in v0.0.8
type TaskSort struct {
// Field
Key TaskSortKey `json:"key"`
// Sort title
Title string `json:"title"`
}
Task sort type
type TaskSortKey ¶ added in v0.0.8
type TaskSortKey string
type TaskStatus ¶ added in v0.0.8
type TaskStatus struct {
// Status id
Uid string `json:"uid,omitempty"`
// Status sort ordering
SortOrdering uint `json:"sort_ordering"`
// Status internal name
Name string `json:"name"`
// Status localized name
Title string `json:"title"`
// Status not used anymore
IsArchive bool `json:"is_archive,omitempty"`
}
Custom task status
type TaskTab ¶ added in v0.0.8
type TaskTab struct {
// Tab name
Key TaskTabKey `json:"key"`
// Tab title
Title string `json:"title"`
// Disable this tab when it has no contents
HideEmpty bool `json:"hide_empty"`
// Show unread badge
ShowCounter bool `json:"show_counter"`
// Enable pagination
Pagination bool `json:"pagination"`
// Filters inside tab
Filters []TaskFilter `json:"filters"`
// Sort available in tab
Sort []TaskSort `json:"sort"`
// Unread tasks with jid and counters
UnreadTasks []TaskCounters `json:"unread_tasks"`
}
Task tab
type TaskTabKey ¶ added in v0.0.8
type TaskTabKey string
type Team ¶ added in v0.0.7
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 mebers
ChangeableStatuses []TeamStatus `json:"changeable_statuses,omitempty" tdproto:"readonly"`
// My profile in this team isn't full
BadProfile bool `json:"bad_profile,omitempty" tdproto:"readonly"`
// Neet 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
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 imporance. Default is 1
TaskImportanceMin int `json:"task_importance_min,omitempty"`
// Maximum value of task imporance. 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" tdproto:"readonly"`
// My profile in this team
Me Contact `json:"me" tdproto:"readonly"`
// 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
type TeamCounter ¶ added in v0.0.7
type TeamCounter struct {
// Team id
Uid string `json:"uid"`
// Unread message counters
Unreads TeamUnread `json:"unread"`
}
Unread message counters
type TeamShort ¶ added in v0.2.0
type TeamShort struct {
// Team id
Uid string `json:"uid"`
// Team name
Name string `json:"name"`
// Team icons
Icons IconData `json:"icons"`
}
Short team representation. For invites, push notifications, etc. Readonly.
type TeamStatus ¶ added in v0.0.7
type TeamStatus string
Team status
const ( // Team owner. Can do anything TeamOwner TeamStatus = "owner" // Team administrator TeamAdmin TeamStatus = "admin" // Team member TeamMember TeamStatus = "member" // Team guest. Restricted account TeamGuest TeamStatus = "guest" )
type TeamUnread ¶ added in v0.0.7
func EmptyTeamUnread ¶ added in v0.0.7
func EmptyTeamUnread() TeamUnread
func (TeamUnread) Empty ¶ added in v0.0.7
func (unread TeamUnread) Empty() bool
type Terms ¶
type Terms struct {
EnInTeam string
EnTeam string
EnTeamAccess string
EnTeamAdmin string
EnTeamAdmins string
EnTeamGuest string
EnTeamMember string
EnTeamMembers string
EnTeamOwner string
EnTeamSettings string
RuTeamSettings string
EnTeams string
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
}
Experimental translation fields for "team" entity renaming. Readonly.
type Theme ¶ added in v0.0.7
type Theme struct {
BgColor string
BgHoverColor string
TextColor string
MutedTextColor string
AccentColor string
AccentHoverColor string
TextOnAccentHoverColor string
MainAccent string
MainAccentHover string
MainLightAccent string
MainLink string
AppAccentColor string
AppPrimaryColor string
}
Color theme
type UiSettings ¶ added in v0.0.9
type UiSettings map[string]interface{}
type Unread ¶ added in v0.0.7
type Unread struct {
// Total unread messages
NumMessages uint `json:"messages"`
// Total unread messages with mentions
NumNoticeMessages uint `json:"notice_messages"`
// Total chats with unread messages
NumChats uint `json:"chats"`
}
Unread message counters
type Upload ¶ added in v0.0.4
type Upload struct {
// Upload id
Uid string `json:"uid"`
// Uploaded at
Created ISODateTimeString `json:"created"`
// Upload size in bytes
Size int `json:"size"`
// Mediafile duration (for audio/video only)
Duration uint `json:"duration,omitempty"`
// Filename
Name string `json:"name"`
// Absolute url
Url string `json:"url"`
// Preview details
Preview *UploadPreview `json:"preview,omitempty"`
// Content type
ContentType string `json:"content_type"`
// Is animated (images only)
Animated bool `json:"animated,omitempty"`
// File still processing (video only)
Processing bool `json:"processing,omitempty"`
// PDF version of file. Experimental
PdfVersion *PdfVersion `json:"pdf_version,omitempty"`
}
Uploaded media
type UploadPreview ¶ added in v0.0.4
type UploadPreview struct {
// Absolute url to image
Url string `json:"url"`
// Absolute url to high resolution image (retina)
Url2x string `json:"url_2x"`
// Width in pixels
Width int `json:"width"`
// Height in pixels
Height int `json:"height"`
}
Upload preview
type UploadShortMessage ¶ added in v1.20.0
type UploadShortMessage struct {
Upload Upload `json:"upload"`
Message ShortMessage `json:"message"`
}
Upload + ShortMessage
type User ¶ added in v0.0.8
type User struct {
// Phone for login
Phone string `json:"phone,omitempty"`
// Email for login
Email string `json:"email,omitempty"`
// Family name
FamilyName string `json:"family_name,omitempty"`
// Given name
GivenName string `json:"given_name,omitempty"`
// Patronymic, if any
Patronymic string `json:"patronymic,omitempty"`
// Default language code
DefaultLang string `json:"default_lang,omitempty"`
// Use Ctrl/Cmd + Enter instead Enter
AltSend bool `json:"alt_send"`
// Use * as @ for mentions
AsteriskMention bool `json:"asterisk_mention"`
// Send pushes even user is online
AlwaysSendPushes bool `json:"always_send_pushes"`
// Show unread chats in chat list first
UnreadFirst bool `json:"unread_first"`
// Show unread chats in chat list first on mobiles
MUnreadFirst bool `json:"munread_first"`
// Timezone
Timezone string `json:"timezone"`
// Start silently time (no pushes, no sounds)
QuietTimeStart *string `json:"quiet_time_start"`
// Finish silently time (no pushes, no sounds)
QuietTimeFinish *string `json:"quiet_time_finish"`
}
Account data
type UserWithMe ¶ added in v0.0.8
type UserWithMe struct {
User
Inviter *JID `json:"inviter,omitempty"`
Teams []Team `json:"teams"`
Devices []PushDevice `json:"devices"`
}
Source Files
¶
- call_event.go
- chat.go
- chat_type.go
- client_activity.go
- client_call_buzz.go
- client_call_buzzcancel.go
- client_call_leave.go
- client_call_muteall.go
- client_call_offer.go
- client_call_reject.go
- client_call_sound.go
- client_call_trickle.go
- client_chat_composing.go
- client_chat_lastread.go
- client_confirm.go
- client_message_deleted.go
- client_message_updated.go
- client_ping.go
- color_rule.go
- contact.go
- contact_preview.go
- counters.go
- country.go
- date.go
- dist.go
- event.go
- features.go
- group_access_request.go
- group_status.go
- icon_data.go
- integrations.go
- invitation.go
- jid.go
- markup_entity.go
- markup_type.go
- message.go
- message_push.go
- oauth_service.go
- paginated.go
- pdf_version.go
- push_device.go
- push_device_type.go
- remind.go
- roster.go
- section.go
- server_call_answer.go
- server_call_buzz.go
- server_call_buzzcancel.go
- server_call_checkfingerprint.go
- server_call_leave.go
- server_call_muteall.go
- server_call_reject.go
- server_call_restart.go
- server_call_sound.go
- server_call_state.go
- server_call_talking.go
- server_chat_composing.go
- server_chat_deleted.go
- server_chat_draft.go
- server_chat_lastread.go
- server_chat_updated.go
- server_confirm.go
- server_contact_updated.go
- server_debug.go
- server_login.go
- server_message_received.go
- server_message_updated.go
- server_online.go
- server_panic.go
- server_processing.go
- server_push.go
- server_remind_deleted.go
- server_remind_fired.go
- server_remind_updated.go
- server_roster.go
- server_section_deleted.go
- server_section_updated.go
- server_tag_deleted.go
- server_tag_updated.go
- server_team_counters.go
- server_team_deleted.go
- server_team_updated.go
- server_time.go
- server_uisettings.go
- server_upload_updated.go
- server_warning.go
- session.go
- short_message.go
- stats.go
- stickerpack.go
- tag.go
- task_colors.go
- task_preview.go
- task_status.go
- task_tabs.go
- team.go
- team_status.go
- theme.go
- ui_settings.go
- upload.go
- user.go
- user_auth.go
- utils.go
- wallpaper.go
- wiki_page.go