tdproto

package module
v1.51.57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 12 Imported by: 10

README

Documentation

Overview

eXtra fast shortcuts

Index

Constants

View Source
const (
	EnquiryTypeUnspecified EnquiryType = "ENQUIRY_TYPE_UNSPECIFIED"
	EnquiryTypeRenewal     EnquiryType = "ENQUIRY_TYPE_RENEWAL"
	EnquiryTypeBasic       EnquiryType = "ENQUIRY_TYPE_BASIC"
	EnquiryTypeExtension   EnquiryType = "ENQUIRY_TYPE_EXTENSION"

	PaymentTypeUnspecified                  PaymentType = "PAYMENT_TYPE_UNSPECIFIED"
	PaymentTypePaperDocumentManagement      PaymentType = "PAYMENT_TYPE_PAPER_DOCUMENT_MANAGEMENT"
	PaymentTypeElectronicDocumentManagement PaymentType = "PAYMENT_TYPE_ELECTRONIC_DOCUMENT_MANAGEMENT"
	PaymentTypeBankCard                     PaymentType = "PAYMENT_TYPE_BANK_CARD"
	PaymentTypeTechnical                    PaymentType = "PAYMENT_TYPE_TECHNICAL"

	EnquiryStatusUnspecified EnquiryStatus = "ENQUIRY_STATUS_UNSPECIFIED"
	EnquiryStatusWaiting     EnquiryStatus = "ENQUIRY_STATUS_WAITING"
	EnquiryStatusCancelled   EnquiryStatus = "ENQUIRY_STATUS_CANCELLED"
	EnquiryStatusActive      EnquiryStatus = "ENQUIRY_STATUS_ACTIVE"
	EnquiryStatusExpired     EnquiryStatus = "ENQUIRY_STATUS_EXPIRED"
	EnquiryStatusDone        EnquiryStatus = "ENQUIRY_STATUS_DONE"

	EnquiryPaymentStatusUnspecified         EnquiryPaymentStatus = "ENQUIRY_PAYMENT_STATUS"
	EnquiryPaymentStatusWaitingConfirmation EnquiryPaymentStatus = "ENQUIRY_PAYMENT_STATUS_WAITING_CONFIRMATION"
	EnquiryPaymentStatusWaitingCrediting    EnquiryPaymentStatus = "ENQUIRY_PAYMENT_STATUS_WAITING_CREDITING"
	EnquiryPaymentStatusPaid                EnquiryPaymentStatus = "ENQUIRY_PAYMENT_STATUS_PAID"
)
View Source
const (
	SupportedFeaturesHeader = "X-Supported-Features"
	Feature2FactorAuth      = "2FactorAuth"
)
View Source
const (
	ContactPrefix        = "d-"
	GroupPrefix          = "g-"
	TaskPrefix           = "t-"
	ContactSectionPrefix = "sd-"
	GroupSectionPrefix   = "sg-"
	TaskSectionPrefix    = "st-"
	MeetingPrefix        = "m-"
	ThreadPrefix         = "th-"
)
View Source
const (
	ParseErrCodeInvalidZip            = ParseErrCode(1001)
	ParseErrCodeResultJsonNotFound    = ParseErrCode(1002)
	ParseErrCodeResultJsonIsCorrupted = ParseErrCode(1003)
	ParseErrCodeInvalidJsonFormat     = ParseErrCode(1004)
	ParseErrCodeUploadNotFound        = ParseErrCode(1005)
	ParseErrCodeServerError           = ParseErrCode(1006)
)

1001: ZIP - не zip 1002: result.json - отсутствует 1003: result.json - неверный формат json 1004: result.json - неправильный формат(отсутствие, например, create_time) 1005: отсутсвует нужный upload 1006: сервер не сервер

View Source
const (
	PushDeviceAndroid = PushDeviceType(1)
	PushDeviceIOS     = PushDeviceType(2)
	PushDeviceWeb     = PushDeviceType(3)
	PushDeviceSafari  = PushDeviceType(4)
	PushDeviceIOSFB   = PushDeviceType(5)
)
View Source
const (
	AuthBySecureCookie   = "cookie"
	AuthByInsecureCookie = "insecure cookie"
	AuthByToken          = "token"
	AuthByBotToken       = "bot token"
)

Variables

View Source
var AndroidPushDevices = []PushDeviceType{
	PushDeviceAndroid,
}

Functions

func ConfirmId added in v0.0.9

func ConfirmId() string

func Gentime added in v0.0.6

func Gentime() int64

func IsoDatetime added in v0.0.9

func IsoDatetime(dt time.Time) string

func SourceDir added in v1.2.3

func SourceDir() string

func ValidUid added in v0.0.5

func ValidUid(s string) bool

func XClientConfirm added in v1.25.0

func XClientConfirm(confirmId string) []byte

func XClientPing added in v1.25.0

func XClientPing(confirmId string) []byte

func XServerConfirm added in v1.25.0

func XServerConfirm(confirmId string) []byte

Types

type ActionType added in v1.51.3

type ActionType string

ActionType for server.processing event

const (
	// ActionTypeContactImport ...
	ActionTypeContactImport ActionType = "contact_import"

	// ActionTypeTaskImport ...
	ActionTypeTaskImport ActionType = "task_import"

	// ActionTypeArchiveUnpacking ...
	ActionTypeArchiveUnpacking ActionType = "archive_unpacking"

	// ActionTypeGenerateChat ...
	ActionTypeGenerateChat ActionType = "generate_chat"
)

func (ActionType) String added in v1.51.3

func (at ActionType) String() string

type ActivatePersonalAccountResponse added in v1.49.8

type ActivatePersonalAccountResponse struct {
	Success bool `json:"success"`
}

ActivatePersonalAccountResponse response on activate suspended personal account

type ActivateWorkplacesOnPersonalAccountRequest added in v1.49.8

type ActivateWorkplacesOnPersonalAccountRequest struct {
	CountWorkplaces int32 `json:"count_workplaces"`
}

ActivateWorkplacesOnPersonalAccountRequest request on activate workplace on personal account

type ActivateWorkplacesOnPersonalAccountResponse added in v1.49.8

type ActivateWorkplacesOnPersonalAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

ActivateWorkplacesOnPersonalAccountResponse response on activate workplace on personal account

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"`
}

Active daily users statistics

type ActiveUserDailyStatList added in v1.6.0

type ActiveUserDailyStatList []ActiveUserDailyStat

type AddTeamOnPersonalAccountRequest added in v1.49.8

type AddTeamOnPersonalAccountRequest struct {
	TeamBilling
}

AddTeamOnPersonalAccountRequest request on add team on personal account

type AddTeamOnPersonalAccountResponse added in v1.49.8

type AddTeamOnPersonalAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

AddTeamOnPersonalAccountResponse response on add team on personal account

type AddUserInWorkplaceByJidRequest added in v1.49.15

type AddUserInWorkplaceByJidRequest struct {
	ContactUuid string `json:"contact_uuid,omitempty"`
}

AddUserInWorkplaceByJidRequest request on add user on workplace by contact JID

type AddUserInWorkplaceByJidResponse added in v1.49.15

type AddUserInWorkplaceByJidResponse struct {
	UserInfo
}

AddUserInWorkplaceByJidResponse response on add user on workplace by contact JID

type AddUserInWorkplaceRequest added in v1.49.8

type AddUserInWorkplaceRequest struct {
	UserUuid string `json:"user_uuid"`
}

AddUserInWorkplaceRequest request on add user in workplace on personal account

type AddUserInWorkplaceResponse added in v1.49.8

type AddUserInWorkplaceResponse struct {
	Success bool `json:"success,omitempty"`
}

AddUserInWorkplaceResponse response on add user in workplace on personal account

type AddWorkplacesOnPersonalAccountRequest added in v1.49.8

type AddWorkplacesOnPersonalAccountRequest struct {
	WorkplacesCount int32 `json:"workplaces_count"`
}

AddWorkplacesOnPersonalAccountRequest request on add workplace on personal account

type AddWorkplacesOnPersonalAccountResponse added in v1.49.8

type AddWorkplacesOnPersonalAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

AddWorkplacesOnPersonalAccountResponse response on add workplace on personal account

type AnyEvent added in v0.0.9

type AnyEvent struct {
	BaseEvent
	Params *map[string]interface{} `json:"params"`
}

Generic event representation

func NewAnyEvent added in v0.0.9

func NewAnyEvent(name string) AnyEvent

type Auth added in v1.50.1

type Auth struct {
	Token       string     `json:"token,omitempty"`
	Me          UserWithMe `json:"me"`
	Required2fa bool       `json:"required2fa"`
	Recovery2fa bool       `json:"recovery2fa"`
	Method2fa   string     `json:"method2fa"`
}

type AvatarColors added in v1.49.16

type AvatarColors struct {
	// TaskDefault color
	TaskDefault RGBColor `json:"task_default"`
}

AvatarColors avatar colors for app

type BaseEvent added in v0.0.9

type BaseEvent struct {
	Name      string `json:"event"`
	ConfirmId string `json:"confirm_id,omitempty"`
}

Base of all events

func (BaseEvent) GetConfirmId added in v0.0.9

func (ev BaseEvent) GetConfirmId() string

func (BaseEvent) GetName added in v0.0.9

func (ev BaseEvent) GetName() string

func (BaseEvent) String added in v0.0.9

func (ev BaseEvent) String() string

type Bg added in v1.49.18

type Bg struct {
	// BadgeBackground color
	BadgeBackground RGBColor `json:"badge_background"`

	// Fade color
	Fade RGBColor `json:"fade"`
}

Bg bg colors for app

type BlockPersonalAccountResponse added in v1.49.8

type BlockPersonalAccountResponse struct {
	Success bool `json:"success"`
}

BlockPersonalAccountResponse response on block unblocked personal account

type ButtonColors added in v1.22.2

type ButtonColors struct {
	// Brand static color
	BrandStatic RGBColor `json:"brand_static"`

	// Brand active color
	BrandActive RGBColor `json:"brand_active"`

	// Brand disable color
	BrandDisable RGBColor `json:"brand_disable"`

	// Simple static color
	SimpleStatic RGBColor `json:"simple_static"`

	// Simple active color
	SimpleActive RGBColor `json:"simple_active"`

	// Simple disable color
	SimpleDisable RGBColor `json:"simple_disable"`
}

ButtonColors button colors for app

type CallColors added in v1.49.18

type CallColors struct {
	// CallBarBackground color
	CallBarBackground RGBColor `json:"callbar_background"`

	// IconCallBar color
	IconCallBar RGBColor `json:"icon_callbar"`

	// ButtonActive color
	ButtonActive RGBColor `json:"button_active"`

	// ButtonEndCall color
	ButtonEndCall RGBColor `json:"button_end_call"`
}

CallColors call colors for app

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 {
	// Chat or contact id
	Jid JID `json:"jid"`

	// Call id
	Uid string `json:"uid"`

	// Call buzzing
	Buzz bool `json:"buzz,omitempty"`

	// Creation date, iso datetime
	Created ISODateTimeString `json:"created"`

	// Call start. For direct calls can be empty when buzzing
	Start ISODateTimeString `json:"start,omitempty"`

	// Call finish
	Finish ISODateTimeString `json:"finish,omitempty"`

	// Call record enabled
	Audiorecord bool `json:"audiorecord"`

	// Call participants
	Onliners []CallOnliner `json:"onliners,omitempty"`

	// Version
	Gentime int64 `json:"gentime"`

	// Deprecated: use gentime or created
	Timestamp int64 `json:"timestamp"`
}

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"`

	// Video state
	EnabledVideo bool `json:"enabled_video"`

	// Screenshare state
	EnabledScreenshare bool `json:"enabled_screenshare"`

	// Member devices, strictly one for now
	Devices []CallDevice `json:"devices"`
}

Call participant

type CallType added in v1.49.8

type CallType string

CallType ...

const (
	// CallTypeAudio is a audio room
	CallTypeAudio CallType = "audio"

	// CallTypeVideo is a video room
	CallTypeVideo CallType = "video"

	// CallTypeVideoMultistream is a video room in multistream mode
	CallTypeVideoMultistream CallType = "video_multistream"
)

func (CallType) IsAudio added in v1.49.8

func (ct CallType) IsAudio() bool

func (CallType) IsVideo added in v1.49.8

func (ct CallType) IsVideo() bool

func (CallType) String added in v1.49.8

func (ct CallType) String() string

type ChangeTariffBilling added in v1.49.13

type ChangeTariffBilling struct {
	TariffId   string    `json:"tariff_id"` // TODO: must be int64
	OpenDate   time.Time `json:"open_date,omitempty"`
	CloseDate  time.Time `json:"close_date,omitempty"`
	CreateDate time.Time `json:"create_date,omitempty"`
}

ChangeTariffBilling struct of changes tariffs by personal account

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"`

	// Public Status
	PublicStatus *PublicStatus `json:"public_status,omitempty"`

	// 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"`

	// Deprecated: use DraftRevision instead.
	// Last message draft version, if any
	DraftGentime int64 `json:"draft_gentime,omitempty"`

	// Last message draft version, if any. unixtime(ms)
	DraftRevision int64 `json:"draft_revision,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 ISODateTimeString `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 ISODateTimeString `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 but 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"`

	// Can I mute all in call
	CanMuteAll bool `json:"can_mute_all,omitempty"`

	// Date of the last message sent even if it was deleted
	LastActivity ISODateTimeString `json:"last_activity,omitempty"`

	// Deprecated: use DraftRevision instead.
	DraftNum int64 `json:"draft_num,omitempty"`

	// Start date of meeting chat
	MeetingStartAt ISODateTimeString `json:"meeting_start_at,omitempty"`

	// Meeting has frequency
	MeetingFreq bool `json:"meeting_freq,omitempty"`

	// Meeting duration
	MeetingDuration int32 `json:"meeting_duration,omitempty"`

	// Parent message uid for thread
	ParentMessageId string `json:"parent_message_id,omitempty"`

	// Parent chat uid for thread
	ParentChatId JID `json:"parent_chat_id,omitempty"`
}

Chat (direct, group, task) representation

type ChatCounters added in v0.0.7

type ChatCounters struct {
	Jid                JID               `json:"jid"`
	ChatType           ChatType          `json:"chat_type"`
	Gentime            int64             `json:"gentime"`
	NumUnread          uint              `json:"num_unread"`
	NumUnreadNotices   uint              `json:"num_unread_notices"`
	LastReadMessageUid *string           `json:"last_read_message_id"`
	LastActivity       ISODateTimeString `json:"last_activity,omitempty"`
}

Unread messages counter

type ChatMessages added in v0.0.8

type ChatMessages struct {
	Messages []Message `json:"messages"`
}

Chat 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 ChatType added in v0.0.4

type ChatType string

Chat type

const (
	// Direct chat
	DirectChatType ChatType = "direct"

	// Group chat
	GroupChatType ChatType = "group"

	// Task
	TaskChatType ChatType = "task"

	//Meeting
	MeetingChatType ChatType = "meeting"

	// Thread chat
	ThreadChatType ChatType = "thread"
)

func (ChatType) IsDirect added in v0.0.4

func (ct ChatType) IsDirect() bool

func (ChatType) IsGroup added in v0.0.4

func (ct ChatType) IsGroup() bool

func (ChatType) IsMeeting added in v1.50.13

func (ct ChatType) IsMeeting() bool

func (ChatType) IsTask added in v0.0.4

func (ct ChatType) IsTask() bool

func (ChatType) IsThread added in v1.51.49

func (ct ChatType) IsThread() bool

func (ChatType) JidPrefix added in v0.0.4

func (ct ChatType) JidPrefix() string

func (ChatType) String added in v0.0.4

func (ct ChatType) String() string

type CheckActivePersonalAccountResponse added in v1.49.13

type CheckActivePersonalAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

CheckActivePersonalAccountResponse response on check active personal account

type ClientActivity added in v0.0.11

type ClientActivity struct {
	BaseEvent
	Params clientActivityParams `json:"params"`
}

Change AFK (away from keyboard) status

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"`
}

Call buzzing cancelled

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"`
}

Leave call

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"`
}

Mute all other call participants

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"`
}

Start a call

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"`
}

Reject the call

func (ClientCallReject) GetName added in v1.3.3

func (p ClientCallReject) GetName() string

type ClientCallScreenShare added in v1.49.20

type ClientCallScreenShare struct {
	BaseEvent
	Params clientCallScreenShareParams `json:"params"`
}

ClientCallScreenShare event for enable/disable screen share

func (ClientCallScreenShare) GetName added in v1.49.20

func (p ClientCallScreenShare) GetName() string

type ClientCallSdp added in v1.32.2

type ClientCallSdp struct {
	BaseEvent
	Params clientCallSdpParams `json:"params"`
}

For exchange Session Description with server when client's Local Session Description is changed

func (ClientCallSdp) GetName added in v1.32.2

func (p ClientCallSdp) GetName() string

type ClientCallSound added in v0.0.9

type ClientCallSound struct {
	BaseEvent
	Params clientCallSoundParams `json:"params"`
}

Change mute state in call

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"`
}

Send trickle candidate for webrtc connection

func (ClientCallTrickle) GetName added in v1.3.3

func (p ClientCallTrickle) GetName() string

type ClientCallVideo added in v1.49.2

type ClientCallVideo struct {
	BaseEvent
	Params clientCallVideoParams `json:"params"`
}

Change video state in call

func (ClientCallVideo) GetName added in v1.49.2

func (p ClientCallVideo) GetName() string

type ClientChatComposing added in v0.0.11

type ClientChatComposing struct {
	BaseEvent
	Params clientChatComposingParams `json:"params"`
}

Typing or recording audiomessage

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"`
}

Last read message in chat changed

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"`
}

Client confirmed server message

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"`
}

Message deleted

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"`
}

Message created or changed

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"`
}

Params of the client.message.updated event

type ClientPing added in v0.0.11

type ClientPing struct {
	BaseEvent
}

Empty message for checking server connection

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 {
	// Rule id
	Uid string `json:"uid"`

	// Rule priority
	Priority int `json:"priority"`

	// Rule description
	Description string `json:"description,omitempty"`

	// Color index
	ColorIndex uint16 `json:"color_index"`

	// Project filter enabled
	ProjectEnabled *bool `json:"section_enabled,omitempty"` // TODO: rename to "project_enabled

	// Project id if project filter enabled
	Project string `json:"section,omitempty"` // TODO: rename to "project"

	// Tags filter enabled
	TagsEnabled *bool `json:"tags_enabled,omitempty"`

	// Tag ids if tags filter enabled
	Tags []string `json:"tags,omitempty"`

	// Task status
	TaskStatus string `json:"task_status,omitempty"`

	// Task importance filter enabled
	TaskImportanceEnabled *bool `json:"task_importance_enabled,omitempty"`

	// Task importance if task importance filter enabled
	TaskImportance *int `json:"task_importance,omitempty"`

	// Task urgency filter enabled
	TaskUrgencyEnabled *bool `json:"task_urgency_enabled,omitempty"`

	// Task urgency if task urgency filter enabled
	TaskUrgency *int `json:"task_urgency,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"`

	// Node uid for external users
	Node string `json:"node,omitempty"`

	// 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"`

	// Object version
	Gentime int64 `json:"gentime"`

	// Role in this team
	Role string `json:"role"`

	// Public Status
	PublicStatus *ContactPublicStatus `json:"public_status,omitempty"`

	// 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 ISODateTimeString `json:"last_activity,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 create task for this contact
	CanCreateTask bool `json:"can_create_task,omitempty"`

	// Can I import tasks in this team
	CanImportTasks bool `json:"can_import_tasks,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"`

	// Hide pushes body
	HidePushesContent *bool `json:"hide_pushes_content,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"`

	// Focus mode enabled until
	FocusUntil ISODateTimeString `json:"focus_until,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"`

	// Push notifications for meeting chats
	MeetingNotificationsEnabled *bool `json:"meeting_notifications_enabled,omitempty"`

	// Push notifications from systembot
	SystembotNotificationsEnabled *bool `json:"systembot_notifications_enabled,omitempty"`

	// Push notifications for reactions
	ReactionNotificationsEnabled *bool `json:"reaction_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 meeting list
	MeetingShortView *bool `json:"meeting_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"`

	// Two-factor authentication is configured and confirmed
	Auth2faEnabled bool `json:"auth_2fa_enabled,omitempty"`

	// Two-factor authentication status
	Auth2faStatus string `json:"auth_2fa_status,omitempty"`

	// Short view in task list in mobile app
	TaskMshortView *bool `json:"task_mshort_view,omitempty"`

	// Short view in meeting list in mobile app
	MeetingMshortView *bool `json:"meeting_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 contact sections in this team
	CanManageSections bool `json:"can_manage_sections,omitempty"`

	// Can I manage task projects in this team
	CanManageProjects bool `json:"can_manage_projects,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 create meetings in this team
	CanCreateMeeting bool `json:"can_create_meeting,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"`

	// Can I import chats from external services (now its only telegram)
	CanImportChats bool `json:"can_import_chats,omitempty"`

	// Can i create new team
	CanCreateTeam bool `json:"can_create_team,omitempty"`

	// Extra contact fields
	CustomFields *ContactCustomFields `json:"custom_fields,omitempty"`

	// Deprecated
	CanDeleteAnyMessage bool `json:"can_delete_any_message,omitempty"`
}

Contact

type ContactCustomFields added in v0.0.7

type ContactCustomFields struct {
	// Company
	Company string `json:"company,omitempty"`

	// Department
	Department string `json:"department,omitempty"`

	// Title
	Title string `json:"title,omitempty"`

	// MobilePhone
	MobilePhone string `json:"mobile_phone,omitempty"`

	// Import source
	Source string `json:"source,omitempty"`

	// User UUID in Active Directory
	ADUid string `json:"ad_uid,omitempty"`
}

Extra contact fields

type ContactPreview added in v0.0.7

type ContactPreview struct {
	Error      string `json:"_error,omitempty"`
	Phone      string `json:"phone"`
	GivenName  string `json:"given_name"`
	FamilyName string `json:"family_name"`
	Patronymic string `json:"patronymic,omitempty"`
	Role       string `json:"role"`
	Section    string `json:"section"`
}

Contact preview

type ContactPublicStatus added in v1.51.54

type ContactPublicStatus struct {
	// Public Status
	Status PublicStatus `json:"status"`

	// Expires at (iso datetime)
	ExpiresAt ISODateTimeString `json:"expires_at"`
}

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"`

	// Object version
	Gentime int64 `json:"gentime"`
}

Short contact representation

type ContactsSectionGetRequest added in v1.51.36

type ContactsSectionGetRequest struct {
	// Team Section
	SectionUid string `schema:"section_uid"`

	// * ?is_archived=
	IsArchived *bool `schema:"is_archived"`

	// * ?is_bot=
	IsBot *bool `schema:"is_bot"`

	Limit int `schema:"limit"`

	Offset int `schema:"offset"`
}

type Counterparty added in v1.51.44

type Counterparty struct {
	Id                                string           `json:"id"`
	PersonalAccountId                 string           `json:"personal_account_id"`
	ElectronicDocumentManagementId    string           `json:"electronic_document_management_id,omitempty"`
	FullName                          string           `json:"full_name"`
	TaxpayerIdentificationNumber      string           `json:"taxpayer_identification_number"`
	LegalAddress                      string           `json:"legal_address"`
	PhysicalAddress                   string           `json:"physical_address"`
	AccountingDictionaryCode          string           `json:"accounting_dictionary_code,omitempty"`
	ClassifierOfIndustrialEnterprises string           `json:"classifier_of_industrial_enterprises,omitempty"`
	CreatedAt                         time.Time        `json:"created_at"`
	CounterpartyType                  CounterpartyType `json:"counterparty_type"`
}

type CounterpartyCreateRequest added in v1.51.44

type CounterpartyCreateRequest struct {
	PersonalAccountId                 string           `json:"personal_account_id"`
	ElectronicDocumentManagementId    string           `json:"electronic_document_management_id,omitempty"`
	FullName                          string           `json:"full_name"`
	TaxpayerIdentificationNumber      string           `json:"taxpayer_identification_number"`
	LegalAddress                      string           `json:"legal_address"`
	PhysicalAddress                   string           `json:"physical_address"`
	AccountingDictionaryCode          string           `json:"accounting_dictionary_code,omitempty"`
	ClassifierOfIndustrialEnterprises string           `json:"classifier_of_industrial_enterprises,omitempty"`
	CounterpartyType                  CounterpartyType `json:"counterparty_type"`
}

type CounterpartyCreateResponse added in v1.51.44

type CounterpartyCreateResponse struct {
	Counterparty
}

type CounterpartyGetRequest added in v1.51.44

type CounterpartyGetRequest struct {
	CounterpartyIds          string `json:"counterparty_ids,omitempty"`
	AccountingDictionaryCode string `json:"accounting_dictionary_code,omitempty"`
	PersonalAccountId        string `json:"personal_account_id,omitempty"`
	Limit                    uint32 `json:"limit,omitempty"`
	Offset                   uint32 `json:"offset,omitempty"`
}

type CounterpartyGetResponse added in v1.51.44

type CounterpartyGetResponse struct {
	CounterpartyList []Counterparty `json:"counterparty_list"`
}

type CounterpartyType added in v1.51.44

type CounterpartyType string
const (
	CounterpartyTypeUnspecified  CounterpartyType = "COUNTERPARTY_TYPE_UNSPECIFIED"
	CounterpartyTypePhysical     CounterpartyType = "COUNTERPARTY_TYPE_PHYSICAL"
	CounterpartyTypeSelfemployed CounterpartyType = "COUNTERPARTY_TYPE_SELFEMPLOYED"
	CounterpartyTypeEntrepreneur CounterpartyType = "COUNTERPARTY_TYPE_ENTREPRENEUR"
	CounterpartyTypeJuridical    CounterpartyType = "COUNTERPARTY_TYPE_JURIDICAL"
)

type CounterpartyUpdateRequest added in v1.51.44

type CounterpartyUpdateRequest struct {
	PersonalAccountId                 string           `json:"personal_account_id"`
	ElectronicDocumentManagementId    string           `json:"electronic_document_management_id,omitempty"`
	FullName                          string           `json:"full_name"`
	TaxpayerIdentificationNumber      string           `json:"taxpayer_identification_number"`
	LegalAddress                      string           `json:"legal_address"`
	PhysicalAddress                   string           `json:"physical_address"`
	AccountingDictionaryCode          string           `json:"accounting_dictionary_code,omitempty"`
	ClassifierOfIndustrialEnterprises string           `json:"classifier_of_industrial_enterprises,omitempty"`
	CounterpartyType                  CounterpartyType `json:"counterparty_type"`
}

type CounterpartyUpdateResponse added in v1.51.44

type CounterpartyUpdateResponse struct {
	Counterparty
}

type Country added in v0.0.8

type Country struct {
	// Phone code
	Code string `json:"code"`

	// Country ISO code
	Iso string `json:"iso"`

	// 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 CreateBillingContactRequest added in v1.50.3

type CreateBillingContactRequest struct {
	Phone      string     `json:"phone"`
	GivenName  string     `json:"given_name,omitempty"`
	FamilyName string     `json:"family_name,omitempty"`
	Patronymic string     `json:"patronymic,omitempty"`
	Status     TeamStatus `json:"status,omitempty"`
	Role       string     `json:"role,omitempty"`
	UserUid    string     `json:"user_uid,omitempty"`
	Sections   []string   `json:"sections,omitempty"`
}

type CreateChangeTariffOnPersonalAccountRequest added in v1.49.13

type CreateChangeTariffOnPersonalAccountRequest struct {
	TariffId string    `json:"tariff_id"` // TODO: must be int64
	OpenDate time.Time `json:"open_date,omitempty"`
}

CreateChangeTariffOnPersonalAccountRequest request on create change tariff on personal account

type CreateChangeTariffOnPersonalAccountResponse added in v1.49.13

type CreateChangeTariffOnPersonalAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

CreateChangeTariffOnPersonalAccountResponse response on create change tariff on personal account

type CreatePersonalAccountRequest added in v1.49.8

type CreatePersonalAccountRequest struct {
	OwnerUuid string `json:"owner_uuid"`
	FullName  string `json:"full_name,omitempty"`
	Phone     string `json:"phone,omitempty"`
	TeamUuid  string `json:"team_uuid"`
}

CreatePersonalAccountRequest request on create personal account

type CreatePersonalAccountResponse added in v1.49.8

type CreatePersonalAccountResponse struct {
	PersonalAccountBilling
}

CreatePersonalAccountResponse response on create personal account

type CreateTariffRequest added in v1.49.8

type CreateTariffRequest struct {
	// Name of tariff
	Name string `json:"name"`

	// Nomenclature name of tariff
	NomenclatureName string `json:"nomenclature_name"`

	// Description of tariff
	Description string `json:"description,omitempty"`

	// Benefit of tariff
	Benefit string `json:"benefit,omitempty"`

	// Currency of tariff
	Currency Currency `json:"currency"`

	// Cost of one workplace
	CostWorkplace string `json:"cost_workplace"`

	// Priority of tariff
	Priority uint32 `json:"priority,omitempty"`

	// Count of maximum workspaces on tariff
	MaxWorkplaceCount uint32 `json:"max_workplace_count,omitempty"`

	// Count of minimum workspaces on tariff
	MinWorkplaceCount uint32 `json:"min_workplace_count,omitempty"`

	// Count of free workspaces
	FreeWorkplaceCount uint32 `json:"free_workplace_countt,omitempty"`

	// Minimum step of change count workspaces on tariff
	StepIncreasingWorkplaces uint32 `json:"step_increasing_workplaces,omitempty"`

	// Disk space limit per user
	DiskSpaceQuotaMb string `json:"disk_space_quota_mb,omitempty"`

	// Number of paid days
	PeriodDays uint32 `json:"period_days"`

	// Maximum count of users in voice conference
	MaxVoiceUser uint32 `json:"max_voice_user,omitempty"`

	// Maximum count of users in video conference
	MaxVideoUser uint32 `json:"max_video_user,omitempty"`

	// Bitrate of video in video co
	VideoCallBitrate uint32 `json:"video_call_bitrate,omitempty"`

	// Bitrate of video in video sharing
	VideoSharingBitrate uint32 `json:"video_sharing_bitrate,omitempty"`

	// Flag of availability of free seats when exceeding FreeWorkplace
	IsFree bool `json:"is_free,omitempty"`

	// Flag of publicity
	IsPublic bool `json:"is_public,omitempty"`

	// Default tariff flag that is set when registering an account
	IsDefault bool `json:"is_default,omitempty"`

	// Date of opening tariff
	OpenDate *time.Time `json:"open_date,omitempty"`
}

Request to create the tariff

type Currency added in v1.49.11

type Currency string

ISO 4217 currency code

const (
	// Euro
	EUR Currency = "EUR"

	// Russian ruble
	RUB Currency = "RUB"

	// United States dollar
	USD Currency = "USD"
)

type DLPBasicData added in v1.49.0

type DLPBasicData struct {
	UUID        string `json:"uuid"`
	Number      uint   `json:"number"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

DLPBasicData structure for basic data (used for team, group, task, etc.)

type DLPEvent added in v1.49.0

type DLPEvent struct {
	UUID         string         `json:"uuid"`
	EventChannel ChatType       `json:"event_channel"`
	EventTime    time.Time      `json:"event_time"`
	MediaType    Mediatype      `json:"media_type"`
	TeamData     DLPBasicData   `json:"team_data"`
	SenderData   DLPUserData    `json:"sender_data"`
	DirectData   DLPUserData    `json:"direct_data"`
	GroupData    DLPBasicData   `json:"group_data"`
	TaskData     DLPBasicData   `json:"task_data"`
	FileData     DLPFileData    `json:"file_data"`
	MessageData  DLPMessageData `json:"message_data"`
}

DLPEvent structure to store all information about event

type DLPFileData added in v1.49.0

type DLPFileData struct {
	Link string `json:"link"` // TODO
	// Content []byte `json:"content"` // TODO
	Comment string `json:"comment"` // TODO
}

DLPFileData structure to store information about file event

type DLPMessageData added in v1.49.0

type DLPMessageData struct {
	Text    string `json:"text"`
	Comment string `json:"comment"`
}

DLPMessageData structure to store information about message

type DLPUserData added in v1.49.0

type DLPUserData struct {
	UUID         string `json:"uuid"`
	ContactUUID  string `json:"contact_uuid"`
	Name         string `json:"name"`
	FirstName    string `json:"first_name"`
	MiddleName   string `json:"middle_name"`
	LastName     string `json:"last_name"`
	Role         string `json:"role"`
	ContactPhone string `json:"contact_phone"`
	ContactEmail string `json:"contact_email"`
	IsBot        bool   `json:"is_bot"`
}

DLPUserData structure to store sender/receiver user information

type DeleteChangeTariffOnPersonalAccountRequest added in v1.49.13

type DeleteChangeTariffOnPersonalAccountRequest struct {
	TariffId string `json:"tariff_id"` // TODO: must be int64
}

DeleteChangeTariffOnPersonalAccountRequest request on delete change tariff on personal account

type DeleteChangeTariffOnPersonalAccountResponse added in v1.49.13

type DeleteChangeTariffOnPersonalAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

DeleteChangeTariffOnPersonalAccountResponse response on delete change tariff om personal account

type DeleteTeamFromPersonalAccountRequest added in v1.49.8

type DeleteTeamFromPersonalAccountRequest struct {
	TeamBilling
}

DeleteTeamFromPersonalAccountRequest request on delete team from personal account

type DeleteTeamFromPersonalAccountResponse added in v1.49.8

type DeleteTeamFromPersonalAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

DeleteTeamFromPersonalAccountResponse response on delete team from personal account

type DeleteUserFromWorkplaceRequest added in v1.49.8

type DeleteUserFromWorkplaceRequest struct {
	UserUuid string `json:"user_uuid"`
}

DeleteUserFromWorkplaceRequest request on delete user from workplace on personal account

type DeleteUserFromWorkplaceResponse added in v1.49.8

type DeleteUserFromWorkplaceResponse struct {
	Success bool `json:"success,omitempty"`
}

DeleteUserFromWorkplaceResponse response on delete user from workplace on personal account

type DeleteWorkplacesOnPersonalAccountRequest added in v1.49.8

type DeleteWorkplacesOnPersonalAccountRequest struct {
	CountWorkplaces int32 `json:"count_workplaces"`
}

DeleteWorkplacesOnPersonalAccountRequest request on delete workplace on personal account

type DeleteWorkplacesOnPersonalAccountResponse added in v1.49.8

type DeleteWorkplacesOnPersonalAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

DeleteWorkplacesOnPersonalAccountResponse response on delete workplace on personal account

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 {
	// Section uid
	Uid string `json:"uid"`

	// Object version
	Gentime int64 `json:"gentime"`
}

Deleted task project or contact section

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 Dist added in v0.0.8

type Dist struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

Distribution information

type Emoji added in v1.29.5

type Emoji struct {
	// Unicode symbol
	Char string `json:"char"`

	// Text representation
	Key string `json:"key"`
}

Emoji

type Enquiry added in v1.51.46

type Enquiry struct {
	Id                       string  `json:"id"`
	PersonalAccountId        string  `json:"personal_account_id"`
	SelectableWorkplaceCount uint32  `json:"selectable_workplace_count"`
	Amount                   float64 `json:"amount"`

	TariffName         string  `json:"tariff_name"`
	WorkplacePrice     float64 `json:"workplace_price"`
	PeriodDays         uint32  `json:"period_days"`
	FreeWorkplaceCount uint32  `json:"free_workplace_count"`

	ActivationDate   *time.Time `json:"activation_date,omitempty"`
	DeactivationDate *time.Time `json:"deactivation_date,omitempty"`
	CreatedAt        *time.Time `json:"created_at,omitempty"`
	CreditedAt       *time.Time `json:"credited_at,omitempty"`
	ActuallyPaidAt   *time.Time `json:"actually_paid_at,omitempty"`
	FixationPaidAt   *time.Time `json:"fixation_paid_at,omitempty"`
	ExpirationDate   *time.Time `json:"expiration_date,omitempty"`
	ExpiredAt        *time.Time `json:"expired_at,omitempty"`
	ActivateAt       *time.Time `json:"activate_at,omitempty"`
	DeactivateAt     *time.Time `json:"deactivate_at,omitempty"`

	EnquiryType   EnquiryType          `json:"enquiry_type"`
	Status        EnquiryStatus        `json:"status"`
	PaymentStatus EnquiryPaymentStatus `json:"payment_status"`
	PaymentType   PaymentType          `json:"payment_type"`

	FileName string `json:"file_name,omitempty"`
	MediaUrl string `json:"media_url,omitempty"`
}

type EnquiryCreateRequest added in v1.51.46

type EnquiryCreateRequest struct {
	SelectableTariffId       string `json:"selectable_tariff_id"`
	SelectableWorkplaceCount uint32 `json:"selectable_workplace_count"`
	CounterpartyId           string `json:"counterparty_id"`
}

type EnquiryCreateResponse added in v1.51.46

type EnquiryCreateResponse struct {
	Enquiry
}

type EnquiryGetListRequest added in v1.51.46

type EnquiryGetListRequest struct {
	DateCreateFrom   *time.Time    `json:"date_create_from,omitempty"`
	DateCreateTo     *time.Time    `json:"date_create_to,omitempty"`
	DateActivateTo   *time.Time    `json:"date_activate_to,omitempty"`
	DateDeactivateTo *time.Time    `json:"date_deactivate_to,omitempty"`
	Status           EnquiryStatus `json:"status,omitempty"`
	Limit            *uint32       `json:"limit,omitempty"`
	Offset           *uint32       `json:"offset,omitempty"`
}

type EnquiryGetListResponse added in v1.51.46

type EnquiryGetListResponse struct {
	PaginatedBillingEnquiries
}

type EnquiryPaymentStatus added in v1.51.49

type EnquiryPaymentStatus string

type EnquiryStatus added in v1.51.46

type EnquiryStatus string

type EnquiryType added in v1.51.46

type EnquiryType string

type Event added in v0.0.9

type Event interface {
	GetName() string
	GetConfirmId() string
}

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"`

	// 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"`
}

Server information. Readonly.

type FontColors added in v1.22.8

type FontColors struct {
	// Text color
	Text RGBColor `json:"text"`

	// Title color
	Title RGBColor `json:"title"`

	// Sub color
	Sub RGBColor `json:"sub"`

	// Brand button color
	BrandButton RGBColor `json:"brand_button"`

	// Simple button color
	SimpleButton RGBColor `json:"simple_button"`

	// Bubble sent color
	BubbleSent RGBColor `json:"bubble_sent"`

	// Bubble received color
	BubbleReceived RGBColor `json:"bubble_received"`

	// TextAvatar color
	TextAvatar RGBColor `json:"text_avatar"`

	// TextBadge color
	TextBadge RGBColor `json:"text_badge"`
}

FontColors font colors for app

type Freq added in v1.50.19

type Freq struct {
	Frequency                int32                    `json:"frequency"`
	FreqDays                 []int32                  `json:"freq_days,omitempty"`
	RepeatabilityType        MeetingRepeatabilityType `json:"repeatability_type"`
	RepeatabilityDescription string                   `json:"repeatability_description,omitempty"`
}

type GetActiveTariffsListResponse added in v1.49.8

type GetActiveTariffsListResponse struct {
	TariffList []TariffBilling `json:"tariff_list"`
}

Response from getting a list of active tariffs

type GetChangesTariffsByPersonalAccountResponse added in v1.49.13

type GetChangesTariffsByPersonalAccountResponse struct {
	TariffsChanges []ChangeTariffBilling `json:"tariffs_changes,omitempty"`
}

GetChangesTariffsByPersonalAccountResponse response on get changes tariffs by personal account

type GetPersonalAccountByIDResponse added in v1.49.8

type GetPersonalAccountByIDResponse struct {
	PersonalAccountBilling
}

GetPersonalAccountByIDResponse response on get personal account by ID

type GetPersonalAccountsListResponse added in v1.49.8

type GetPersonalAccountsListResponse struct {
	PersonalAccounts []PersonalAccountBilling `json:"personal_accounts,omitempty"`
}

GetPersonalAccountsListResponse response on get list of personal accounts

type GetTariffsListResponse added in v1.49.8

type GetTariffsListResponse struct {
	TariffList []TariffBilling `json:"tariff_list"`
}

Response from getting a list of tariffs

type GetTeamOnPersonalAccountResponse added in v1.50.5

type GetTeamOnPersonalAccountResponse struct {
	PersonalAccountId string    `json:"personal_account_id"`
	TeamId            string    `json:"team_id"`
	TeamUuid          string    `json:"team_uuid"`
	OpenDate          time.Time `json:"open_date"`
	CloseDate         time.Time `json:"close_date,omitempty"`
}

type GetTeamsFilter added in v1.51.46

type GetTeamsFilter struct {
	Status TeamStatus `json:"status,omitempty"`
}

type GetTeamsOnPersonalAccountResponse added in v1.50.5

type GetTeamsOnPersonalAccountResponse struct {
	Teams []GetTeamOnPersonalAccountResponse `json:"teams"`
}

type GetUnpaidWorkplacesByPersonalAccountResponse added in v1.49.13

type GetUnpaidWorkplacesByPersonalAccountResponse struct {
	Count int32 `json:"count,omitempty"`
}

GetUnpaidWorkplacesByPersonalAccountResponse response on get count unpaid workplaces by personal account

type GetUsersInfoByUserUUIDArrayExcludingTeamMembersRequest added in v1.49.14

type GetUsersInfoByUserUUIDArrayExcludingTeamMembersRequest struct {
	UserUuid []string `json:"user_uuid"`
	TeamUuid string   `json:"team_uuid"`
	Limit    int32    `json:"limit,omitempty"`
	Offset   int32    `json:"offset,omitempty"`
}

GetUsersInfoByUserUUIDArrayExcludingTeamMembersRequest request on get user information by array of UUID's users excluding team members in uuid team

type GetUsersInfoByUserUUIDArrayExcludingTeamMembersResponse added in v1.49.14

type GetUsersInfoByUserUUIDArrayExcludingTeamMembersResponse struct {
	UserInfo []UserInfo `json:"user_info,omitempty"`
}

GetUsersInfoByUserUUIDArrayExcludingTeamMembersResponse response on get user information by array of UUID's users excluding team members in uuid team

type GetUsersInfoByUserUUIDArrayRequest added in v1.49.14

type GetUsersInfoByUserUUIDArrayRequest struct {
	UserUuid []string `json:"user_uuid"`
	Limit    int32    `json:"limit,omitempty"`
	Offset   int32    `json:"offset,omitempty"`
}

GetUsersInfoByUserUUIDArrayRequest request on get user information by array of UUID's users

type GetUsersInfoByUserUUIDArrayResponse added in v1.49.14

type GetUsersInfoByUserUUIDArrayResponse struct {
	UserList []UserInfo `json:"user_list,omitempty"`
}

GetUsersInfoByUserUUIDArrayResponse response on get user information by array of UUID's users

type GetWorkplaceByPersonalAccountResponse added in v1.49.13

type GetWorkplaceByPersonalAccountResponse struct {
	WorkplaceBilling
}

GetWorkplaceByPersonalAccountResponse response on get workplace by personal account

type GetWorkplacesByPersonalAccountRequest added in v1.49.13

type GetWorkplacesByPersonalAccountRequest struct {
	Options *WorkplaceOptions `json:"options,omitempty"`
}

GetWorkplacesByPersonalAccountRequest request on get workplaces by personal account

type GetWorkplacesByPersonalAccountResponse added in v1.49.13

type GetWorkplacesByPersonalAccountResponse struct {
	Workplaces []WorkplaceBilling `json:"workplaces,omitempty"`
}

GetWorkplacesByPersonalAccountResponse response on get workplaces by personal account

type GroupAccessRequest added in v0.0.8

type GroupAccessRequest struct {
	Uid     string            `json:"uid"`
	Created ISODateTimeString `json:"created"`
	Subject JID               `json:"subject"`
}

Group Access Request

type GroupMembership added in v0.0.8

type GroupMembership struct {
	// Contact id
	Jid JID `json:"jid"`

	// Status in group
	Status GroupStatus `json:"status,omitempty"`

	// 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 HasJid added in v0.0.4

type HasJid interface {
	JID() JID
}

type ICEServer

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"`
}

Interactive Connectivity Establishment Server for WEB Rtc connection. Readonly.

type ICETransportPolicy added in v1.50.17

type ICETransportPolicy string

ICETransportPolicy is a string indicating the transport selection policy the ICE agent should use during negotiation of connections. Available values: 'all', 'relay'

const (
	// ICETransportPolicyRelay for get only TURN candidate pairs
	ICETransportPolicyRelay ICETransportPolicy = "relay"

	// ICETransportPolicyAll for get both STUN and TURN candidate pairs
	ICETransportPolicyAll ICETransportPolicy = "all"
)

type ISODateTimeString added in v1.17.0

type ISODateTimeString = string

Date and time in RFC3339 format. Example: “2019-09-18T00:00:07.435409Z“

type IVCSInfo added in v1.51.25

type IVCSInfo struct {
	ConferenceID string `json:"conference_id,omitempty"`
	JoinToken    string `json:"join_token,omitempty"`
	InviteLink   string `json:"invite_link,omitempty"`
}

type IconColors added in v1.22.7

type IconColors struct {
	// Title color
	Title RGBColor `json:"title"`

	// Brand color
	Brand RGBColor `json:"brand"`

	// Other color
	Other RGBColor `json:"other"`
}

IconColors icon colors for app

type IconData added in v0.0.7

type IconData struct {
	// Small icon
	Sm SingleIcon `json:"sm"`

	// Large image
	Lg SingleIcon `json:"lg"`

	// Letters (only for stub icon)
	Letters string `json:"letters,omitempty"`

	// Icon background color (only for stub icon)
	Color string `json:"color,omitempty"`

	// Compact representation of a placeholder for an image (experimental)
	Blurhash string `json:"blurhash,omitempty"`

	// Deprecated
	Stub string `json:"stub,omitempty"`
}

Icon data. For icon generated from display name contains Letters + Color fields.

type InputColors added in v1.22.2

type InputColors struct {
	// Static color
	Static RGBColor `json:"static"`

	// Active color
	Active RGBColor `json:"active"`

	// Disable color
	Disable RGBColor `json:"disable"`

	// Error color
	Error RGBColor `json:"error"`

	// Selection color
	Selection RGBColor `json:"selection"`
}

InputColors input colors for app

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 InvitableUser added in v1.34.4

type InvitableUser struct {
	// Account id
	Uid string `json:"uid"`

	// Node uid for external users
	Node string `json:"node,omitempty"`

	// Full name
	DisplayName string `json:"display_name"`

	// Icons
	Icons IconData `json:"icons"`

	// Common team uids, if any
	Teams []string `json:"teams,omitempty"`

	// Флаг нахождения пользователя на другом аккаунте
	FromAnotherAccount bool `json:"from_another_account,omitempty"`
}

Account from other team, Active Directory or node

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"`
}

Invitation to team

type InvitationToMeeting added in v1.51.32

type InvitationToMeeting struct {
	Description string            `json:"description"`
	DateStart   ISODateTimeString `json:"date_start"`
	MeetingJid  string            `json:"meeting_jid"`
}

InvitationToMeeting Preview

type JID added in v0.0.4

type JID string

func (JID) ChatType added in v0.0.4

func (jid JID) ChatType() ChatType

func (JID) Empty added in v0.0.4

func (jid JID) Empty() bool

func (JID) IsDirect added in v0.0.4

func (jid JID) IsDirect() bool

func (JID) IsGroup added in v0.0.4

func (jid JID) IsGroup() bool

func (JID) IsMeeting added in v1.50.13

func (jid JID) IsMeeting() bool

func (JID) IsSection added in v0.0.4

func (jid JID) IsSection() bool

func (JID) IsTask added in v0.0.4

func (jid JID) IsTask() bool

func (JID) IsThread added in v1.51.49

func (jid JID) IsThread() bool

func (JID) JID added in v0.0.4

func (jid JID) JID() JID

func (JID) MarshalCBOR added in v1.36.0

func (jid JID) MarshalCBOR() ([]byte, error)

func (JID) MarshalJSON added in v0.0.4

func (jid JID) MarshalJSON() ([]byte, error)

func (JID) MarshalMsgpack added in v1.3.4

func (jid JID) MarshalMsgpack() ([]byte, error)

func (JID) String added in v0.0.4

func (jid JID) String() string

func (JID) Uid added in v0.0.4

func (jid JID) Uid() string

func (*JID) UnmarshalCBOR added in v1.36.0

func (jid *JID) UnmarshalCBOR(data []byte) error

func (*JID) UnmarshalJSON added in v0.0.4

func (jid *JID) UnmarshalJSON(data []byte) error

func (*JID) UnmarshalMsgpack added in v1.3.4

func (jid *JID) UnmarshalMsgpack(data []byte) error

func (*JID) UnmarshalText added in v1.25.6

func (jid *JID) UnmarshalText(data []byte) error

func (JID) Valid added in v0.0.4

func (jid JID) Valid() bool

func (JID) Value added in v0.0.4

func (jid JID) Value() string

type JSEP added in v0.0.9

type JSEP struct {
	// Session Description Protocol information
	SDP string `json:"sdp"`
	// See https://rtcweb-wg.github.io/jsep/#rfc.section.4.1.8
	Type string `json:"type"`
}

JavaScript Session Establishment Protocol

type MappedUser added in v1.51.0

type MappedUser struct {
	// Contact tada contact data
	Contact *Contact `json:"contact,omitempty"`

	// ExternalUserID user id from messenger
	ExternalUserID string `json:"external_user_id"`

	// ExternalUserName user name from messenger
	ExternalUserName string `json:"external_user_name"`

	// IsDeleted flag of deleted user from messenger
	IsDeleted bool `json:"is_deleted"`

	// IsArchive flag of archive user
	IsArchive bool `json:"is_archive"`

	// IsAdmin group admin flag
	IsAdmin bool `json:"is_admin"`
}

MappedUser struct for map internal user with external user

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"
	MediaSubtypeNamed   Mediasubtype = "named"
)

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 Meeting added in v1.50.10

type Meeting struct {
	Id                     string                 `json:"id"`
	TeamUuid               string                 `json:"team_uuid,omitempty"`
	OwnerContactUuid       JID                    `json:"owner_contact_uuid,omitempty"`
	OwnerUserUuid          string                 `json:"owner_user_uuid,omitempty"`
	PersonalAccountId      string                 `json:"personal_account_id,omitempty"`
	StartAt                ISODateTimeString      `json:"start_at"`
	EndAt                  ISODateTimeString      `json:"end_at"`
	Duration               int32                  `json:"duration"`
	Freq                   *Freq                  `json:"freq,omitempty"`
	IsArchive              bool                   `json:"is_archive,omitempty"`
	IsOutside              *bool                  `json:"is_outside,omitempty"`
	IsRequired             bool                   `json:"is_required,omitempty"`
	CanEdit                bool                   `json:"can_edit,omitempty"`
	MeetingMembers         []MeetingMember        `json:"meeting_members,omitempty"`
	VCSEnabled             bool                   `json:"vcs_enabled,omitempty"`
	IVCSInfo               *IVCSInfo              `json:"ivcs_info,omitempty"`
	MeetingRecipientStatus MeetingRecipientStatus `json:"meeting_recipient_status"`
	Chat
}

type MeetingMember added in v1.50.10

type MeetingMember struct {
	MeetingId         string                `json:"meeting_id"`
	ChatUuid          string                `json:"chat_uuid"`
	Contact           Contact               `json:"contact"`
	Presence          MeetingPresenceStatus `json:"presence"`
	Status            MeetingMemberStatus   `json:"status"`
	CanChangePresence bool                  `json:"can_change_presence,omitempty"`
	CanChangeStatus   bool                  `json:"can_change_status,omitempty"`
	CanRemove         bool                  `json:"can_remove,omitempty"`
}

type MeetingMemberStatus added in v1.50.10

type MeetingMemberStatus string
const (
	MeetingMemberStatusOwner          MeetingMemberStatus = "MEETING_MEMBER_STATUS_OWNER"
	MeetingMemberStatusAdmin          MeetingMemberStatus = "MEETING_MEMBER_STATUS_ADMIN"
	MeetingMemberStatusMember         MeetingMemberStatus = "MEETING_MEMBER_STATUS_MEMBER"
	MeetingMemberStatusOptionalMember MeetingMemberStatus = "MEETING_MEMBER_STATUS_OPTIONAL_MEMBER"
)

type MeetingNewGuest added in v1.51.32

type MeetingNewGuest struct {
	FullName string `json:"full_name"`
}

Guest Invitation Form

type MeetingPresenceStatus added in v1.50.12

type MeetingPresenceStatus string
const (
	MeetingPresenceStatusAccepted MeetingPresenceStatus = "MEETING_PRESENCE_STATUS_ACCEPTED"
	MeetingPresenceStatusRejected MeetingPresenceStatus = "MEETING_PRESENCE_STATUS_REJECTED"
	MeetingPresenceStatusDoubts   MeetingPresenceStatus = "MEETING_PRESENCE_STATUS_DOUBTS"
	MeetingPresenceStatusWaiting  MeetingPresenceStatus = "MEETING_PRESENCE_STATUS_WAITING"
)

type MeetingRecipientStatus added in v1.51.28

type MeetingRecipientStatus string
const (
	MeetingRecipientStatusUnspecified      MeetingRecipientStatus = "MEETING_RECIPIENT_STATUS_UNSPECIFIED"
	MeetingRecipientStatusMine             MeetingRecipientStatus = "MEETING_RECIPIENT_STATUS_MINE"
	MeetingRecipientStatusMineOtherTeam    MeetingRecipientStatus = "MEETING_RECIPIENT_STATUS_MINE_OTHER_TEAM"
	MeetingRecipientStatusMineOther        MeetingRecipientStatus = "MEETING_RECIPIENT_STATUS_MINE_OTHER"
	MeetingRecipientStatusAnother          MeetingRecipientStatus = "MEETING_RECIPIENT_STATUS_ANOTHER"
	MeetingRecipientStatusAnotherOtherTeam MeetingRecipientStatus = "MEETING_RECIPIENT_STATUS_ANOTHER_OTHER_TEAM"
	MeetingRecipientStatusAnotherOther     MeetingRecipientStatus = "MEETING_RECIPIENT_STATUS_ANOTHER_OTHER"
)

type MeetingRepeatabilityType added in v1.50.19

type MeetingRepeatabilityType string
const (
	MeetingRepeatabilityStatusUnspecified MeetingRepeatabilityType = "MEETING_PRESENCE_STATUS_UNSPECIFIED"
	MeetingRepeatabilityStatusDaily       MeetingRepeatabilityType = "MEETING_PRESENCE_STATUS_DAILY"
	MeetingRepeatabilityTypeWeekly        MeetingRepeatabilityType = "MEETING_PRESENCE_STATUS_WEEKLY"
	MeetingRepeatabilityTypeMonthly       MeetingRepeatabilityType = "MEETING_PRESENCE_STATUS_MONTHLY"
	MeetingRepeatabilityTypeNDOW          MeetingRepeatabilityType = "MEETING_PRESENCE_STATUS_NDOW"
	MeetingRepeatabilityTypeAnnually      MeetingRepeatabilityType = "MEETING_PRESENCE_STATUS_ANNUALLY"
)

type MeetingsCountResponse added in v1.50.35

type MeetingsCountResponse struct {
	CountCells    int32 `json:"count_cells"`
	CountMeetings int32 `json:"count_meetings"`
}

type MeetingsCreateRequest added in v1.50.10

type MeetingsCreateRequest struct {
	OwnerContactUuid JID                          `json:"owner_contact_uuid"`
	TeamUuid         string                       `json:"team_uuid"`
	Title            string                       `json:"title,omitempty"`
	Description      string                       `json:"description,omitempty"`
	StartAt          string                       `json:"start_at"`
	Duration         int32                        `json:"duration"`
	Freq             *Freq                        `json:"freq,omitempty"`
	Members          []MeetingsMemberCreateParams `json:"members"`
	IsPublic         bool                         `json:"is_public,omitempty"`
	IsOutside        *bool                        `json:"is_outside,omitempty"`
	VCSEnabled       bool                         `json:"vcs_enabled,omitempty"`
}

type MeetingsDatesResponse added in v1.50.29

type MeetingsDatesResponse struct {
	Dates []string `json:"dates"`
}

type MeetingsDeleteRequestParams added in v1.50.11

type MeetingsDeleteRequestParams struct {
	TeamUuid string            `json:"team_uuid"`
	Date     ISODateTimeString `json:"date,omitempty"`
}

type MeetingsGetFrequencyDescriptionParams added in v1.51.20

type MeetingsGetFrequencyDescriptionParams struct {
	Frequency         int32                    `json:"frequency"`
	FreqDays          *string                  `json:"freq_days,omitempty"`
	RepeatabilityType MeetingRepeatabilityType `json:"repeatability_type"`
}

type MeetingsGetRequest added in v1.50.26

type MeetingsGetRequest struct {
	TeamUuid    string  `json:"team_uuid"`
	DateFrom    string  `json:"date_from"`
	DateTo      string  `json:"date_to"`
	Limit       *int32  `json:"limit,omitempty"`
	Offset      *int32  `json:"offset,omitempty"`
	IsArchive   *bool   `json:"is_archive,omitempty"`
	IsFreq      *bool   `json:"is_freq,omitempty"`
	IsPublic    *bool   `json:"is_public,omitempty"`
	IsOutside   *bool   `json:"is_outside,omitempty"`
	IsRequired  *bool   `json:"is_required,omitempty"`
	MembersJids *string `json:"members_jids,omitempty"`
}

type MeetingsMemberCreateParams added in v1.50.26

type MeetingsMemberCreateParams struct {
	Jid    JID                 `json:"jid"`
	Status MeetingMemberStatus `json:"status,omitempty"`
}

type MeetingsMembersBatchDeleteRequestParams added in v1.50.37

type MeetingsMembersBatchDeleteRequestParams struct {
	TeamUuid    string `json:"team_uuid"`
	MembersJids []JID  `json:"members_jids"`
}

type MeetingsMembersCreateRequest added in v1.50.10

type MeetingsMembersCreateRequest struct {
	Members  []MeetingsMemberCreateParams `json:"members"`
	TeamUuid string                       `json:"team_uuid"`
}

type MeetingsMembersCreateResponse added in v1.50.18

type MeetingsMembersCreateResponse struct {
	Members []MeetingMember `json:"members,omitempty"`
	Errors  []string        `json:"errors,omitempty"`
}

type MeetingsMembersDeleteRequestParams added in v1.50.18

type MeetingsMembersDeleteRequestParams struct {
	TeamUuid string `json:"team_uuid"`
}

type MeetingsMembersGetRequestParams added in v1.50.26

type MeetingsMembersGetRequestParams struct {
	MeetingId    string                 `json:"meeting_id"`
	TeamUuid     string                 `json:"team_uuid"`
	UuidSections []string               `json:"uuid_sections,omitempty"`
	Presence     *MeetingPresenceStatus `json:"presence,omitempty"`
	Status       *MeetingMemberStatus   `json:"status,omitempty"`
	Limit        *int32                 `json:"limit,omitempty"`
	Offset       *int32                 `json:"offset,omitempty"`
}

type MeetingsMembersResponse added in v1.50.10

type MeetingsMembersResponse struct {
	Items  []MeetingMember `json:"items"`
	Limit  *int32          `json:"limit,omitempty"`
	Offset *int32          `json:"offset,omitempty"`
	Total  *int32          `json:"total,omitempty"`
}

type MeetingsMembersUpdateRequest added in v1.50.10

type MeetingsMembersUpdateRequest struct {
	Status   MeetingMemberStatus `json:"status,omitempty"`
	TeamUuid string              `json:"team_uuid"`
}

type MeetingsResponse added in v1.50.10

type MeetingsResponse struct {
	PaginatedMeetings
}

type MeetingsUpdateCellRequest added in v1.51.33

type MeetingsUpdateCellRequest struct {
	MeetingId        string `json:"meeting_id"`
	TeamUuid         string `json:"team_uuid"`
	Duration         int32  `json:"duration"`
	CellStartOldDate string `json:"cell_start_old_date"`
	CellStartNewDate string `json:"cell_start_new_date"`
}

type MeetingsUpdateRequest added in v1.50.10

type MeetingsUpdateRequest struct {
	MeetingId            string                       `json:"meeting_id"`
	TeamUuid             string                       `json:"team_uuid"`
	StartAt              *string                      `json:"start_at,omitempty"`
	Duration             *int32                       `json:"duration,omitempty"`
	Freq                 *Freq                        `json:"freq,omitempty"`
	IsPublic             *bool                        `json:"is_public,omitempty"`
	IsOutside            *bool                        `json:"is_outside,omitempty"`
	Title                *string                      `json:"title,omitempty"`
	Description          *string                      `json:"description,omitempty"`
	AddMembers           []MeetingsMemberCreateParams `json:"add_members,omitempty"`
	RemoveMembers        []JID                        `json:"remove_members,omitempty"`
	NotificationsEnabled *bool                        `json:"notifications_enabled,omitempty"`
	CountersEnabled      *bool                        `json:"counters_enabled,omitempty"`
	VCSEnabled           *bool                        `json:"vcs_enabled,omitempty"`
}

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 last 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"`

	// ThreadJID
	ThreadJID JID `json:"thread_jid,omitempty"`

	// Thread Messages Count
	ThreadMessagesCount int `json:"thread_messages_count,omitempty"`
}

Chat message

type MessageColors added in v1.22.8

type MessageColors struct {
	// Bubble sent color
	BubbleSent RGBColor `json:"bubble_sent"`

	// Bubble received color
	BubbleReceived RGBColor `json:"bubble_received"`

	// Bubble important color
	BubbleImportant RGBColor `json:"bubble_important"`

	// Status feed color
	StatusFeed RGBColor `json:"status_feed"`

	// Status bubble color
	StatusBubble RGBColor `json:"status_bubble"`

	// Allocated color
	Allocated RGBColor `json:"allocated"`
}

MessageColors message colors for app

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"`

	// Compact representation of a placeholder for an image. Deprecated: use Uploads instead
	Blurhash string `mediatype:"image" json:"blurhash,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 "audiomsg" mediatype)
	Comment string `mediatype:"audiomsg" 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 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 []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 MessengerType added in v1.51.0

type MessengerType string

MessengerType type of messenger. Ex. Telegram, WhatsApp etc.

const (
	MessengerTypeTelegram MessengerType = "telegram"
)

type Node added in v1.34.3

type Node struct {
	// Node uid
	Uid string `json:"uid"`

	// Node title
	Title string `json:"title"`

	// Synchronization with node works
	Enabled bool `json:"enabled"`
}

Node (for external users)

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 OnlineCall struct {
	// Chat or contact id
	Jid JID `json:"jid"`

	// Call id
	Uid string `json:"uid"`

	// Call start
	Start ISODateTimeString `json:"start,omitempty"`

	// Number participants in call
	OnlineCount int `json:"online_count,omitempty"`

	// CallType is a type of call("audio" - audio room, "video" - video room)
	CallType CallType `json:"call_type"`
}

Active call status

type OnlineContact added in v0.0.9

type OnlineContact struct {
	// Contact id
	Jid JID `json:"jid"`

	// Is away from keyboard
	Afk bool `json:"afk,omitempty"`

	// Focus mode enabled
	Focused bool `json:"focused,omitempty"`

	// Is mobile client
	Mobile bool `json:"mobile"` // TODO: omitempty. 17feb2020
}

Contact online status

type PaginatedBillingEnquiries added in v1.51.46

type PaginatedBillingEnquiries struct {
	Objects []Enquiry `json:"objects"`
	Count   int       `json:"count"`
	Limit   int       `json:"limit"`
	Offset  int       `json:"offset"`
}

Paginated billing enquirires

type PaginatedChats added in v0.0.8

type PaginatedChats struct {
	Contacts []Contact `json:"contacts,omitempty"`
	Objects  []Chat    `json:"objects"`
	Count    int       `json:"count"`
	Limit    int       `json:"limit"`
	Offset   int       `json:"offset"`
}

Paginated chats

type PaginatedContacts added in v0.0.8

type PaginatedContacts struct {
	Objects []Contact `json:"objects"`
	Count   int       `json:"count"`
	Limit   int       `json:"limit"`
	Offset  int       `json:"offset"`
}

Paginated contacts

type PaginatedMeetings added in v1.50.28

type PaginatedMeetings struct {
	Objects []Meeting `json:"objects"`
	Count   int       `json:"count"`
	Limit   int       `json:"limit"`
	Offset  int       `json:"offset"`
}

Paginated meetings

type PaginatedMessages added in v0.0.8

type PaginatedMessages struct {
	Objects []Message `json:"objects"`
	Count   int       `json:"count"`
	Limit   int       `json:"limit"`
	Offset  int       `json:"offset"`
}

Paginated messages

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"`
}

Paginated UploadShortMessage

type ParseErrCode added in v1.51.12

type ParseErrCode uint64

type ParseState added in v1.51.12

type ParseState string

ParseState parse status

const (
	ParseStateNotFound    ParseState = "not_found"
	ParseStateUnpacking   ParseState = "unpacking"
	ParseStateNeedMapping ParseState = "need_mapping"
	ParseStateGenerating  ParseState = "generating"
)

func (ParseState) String added in v1.51.12

func (ps ParseState) String() string

type Payment added in v1.46.6

type Payment struct {
	TariffUid       string `json:"tariff_uid"`
	TeamUid         string `json:"team_uid"`
	UserUid         string `json:"user_uid"`
	ConfirmationUrl string `json:"confirmation_url"`
}

type PaymentType added in v1.51.46

type PaymentType string

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 PersonalAccountBilling added in v1.49.8

type PersonalAccountBilling struct {

	// PersonalAccountBilling ID
	PersonalAccountId string `json:"personal_account_id"`

	// ID User who owns this personal account
	OwnerID string `json:"owner_id"`

	// UUID of User who owns this personal account
	OwnerUuid string `json:"owner_uuid"`

	// Count of teams on personal account
	TeamsCount uint32 `json:"teams_count"`

	// Count of workplaces on personal account
	WorkplaceCount uint32 `json:"workplace_count"`

	// Count of empty workplaces on personal account
	EmptyWorkplaceCount uint32 `json:"empty_workplace_count"`

	// Count of occupied workplaces on personal account
	OccupiedWorkplaceCount uint32 `json:"occupied_workplace_count"`

	// Count of free workplaces on personal account
	FreeWorkplaceCount uint32 `json:"free_workplace_count"`

	// Count of paid workplaces on personal account
	PaidWorkplaceCount uint32 `json:"paid_workplace_count"`

	// Is the account blocked
	IsBlocked bool `json:"is_blocked"`

	// Is the account suspended
	IsSuspended bool `json:"is_suspended"`

	// Date of next debiting funds
	NextBillingDate *time.Time `json:"next_billing_date,omitempty"`

	// Account blocking date
	BlockDate *time.Time `json:"block_date,omitempty"`

	// Account suspending date
	SuspendDate *time.Time `json:"suspend_date,omitempty"`

	// Status of personal account
	Status PersonalAccountStatus `json:"status"`

	// Tariff on this personal account
	Tariff TariffBilling `json:"tariff"`

	// Owner of this personal account
	Owner Contact `json:"owner,omitempty"`
}

PersonalAccountBilling struct of billing api

type PersonalAccountStatus added in v1.49.10

type PersonalAccountStatus string

PersonalAccountStatus account status

const (
	// ActiveAccount account is active
	ActiveAccount PersonalAccountStatus = "PERSONAL_ACCOUNT_STATUS_ACTIVE"

	// SuspendedAccount account is under financial blocking
	SuspendedAccount PersonalAccountStatus = "PERSONAL_ACCOUNT_STATUS_SUSPENDED"

	// BlockedAccount account is under administrative blocking
	BlockedAccount PersonalAccountStatus = "PERSONAL_ACCOUNT_STATUS_BLOCKED"

	// UnspecifiedStatus Unknown account status
	UnspecifiedStatus PersonalAccountStatus = "PERSONAL_ACCOUNT_STATUS_UNSPECIFIED"
)

type PublicStatus added in v1.51.54

type PublicStatus struct {
	// Public Status Type
	Type PublicStatusType `json:"type"`

	// Display emoji
	Emoji string `json:"emoji"`

	// Status Label Russian
	StatusRu string `json:"status_ru"`

	// Status Label English
	StatusEn string `json:"status_en"`

	// Duration in seconds
	DurationSeconds int32 `json:"duration_seconds"`

	// Duration Label
	DurationLabel string `json:"duration_label"`
}

Public Status

type PublicStatusType added in v1.51.54

type PublicStatusType string

Public Status Types

const (
	PublicStatusNone         PublicStatusType = "none"
	PublicStatusRemote       PublicStatusType = "remote"
	PublicStatusVacation     PublicStatusType = "vacation"
	PublicStatusSick         PublicStatusType = "sick"
	PublicStatusCommuting    PublicStatusType = "commuting"
	PublicStatusDoNotDisturb PublicStatusType = "do_not_disturb"
	PublicStatusLunch        PublicStatusType = "lunch"
	PublicStatusBeRightBack  PublicStatusType = "be_right_back"
)

type PushDevice added in v0.0.8

type PushDevice struct {
	// Type: android, ios, web, safari
	Type string `json:"type"`

	// Device id generated by client library
	DeviceId string `json:"device_id"`

	// Notification token
	NotificationToken string `json:"notification_token"`

	// Notification token for VOIP (iOS only)
	VoipNotificationToken string `json:"voip_notification_token"`

	// Readable device name
	Name string `json:"name"`

	// Send silently data pushes that must be fully processed by app. Must be true for modern mobile clients
	DataPushes bool `json:"data_pushes"`

	// Send badge value as data. Experimental
	DataBadges bool `json:"data_badges"`

	// deprecated
	AllowedNotifications bool `json:"allowed_notifications"`
}

Push device info

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 RGBColor added in v1.29.3

type RGBColor = string

Color in “#rrggbb“ format where “rr“, “gg“, “bb“ are hexadecimal numbers from 00 to ff of red, green and blue channels correspondingly. (yellow would be “#ffff00“)

type Reaction added in v1.29.5

type Reaction struct {
	// Unicode symbol
	Name string `json:"name"`
}

Emoji reaction

type ReceivedMessage added in v0.0.9

type ReceivedMessage struct {
	// Chat or contact id
	Chat JID `json:"chat"`

	// Message id
	MessageId string `json:"message_id"`

	// Is received
	Received bool `json:"received"`

	// Number of contacts received this message. Experimental.
	NumReceived int `json:"num_received,omitempty"`

	// Debug message, if any
	Debug string `json:"_debug,omitempty"`
}

Message receiving status

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 ISODateTimeString `json:"fire_at"`

	// Comment, if any
	Comment string `json:"comment,omitempty"`
}

Remind

type ResponsiblePerson added in v1.51.45

type ResponsiblePerson struct {
	Id          string  `json:"id"`
	DisplayName string  `json:"display_name"`
	FirstName   string  `json:"first_name"`
	LastName    string  `json:"last_name"`
	Patronymic  *string `json:"patronymic,omitempty"`
	Phone       string  `json:"phone"`
	Email       string  `json:"email"`
	HeldPost    *string `json:"held_post,omitempty"`
}

type ResponsiblePersonCreateRequest added in v1.51.45

type ResponsiblePersonCreateRequest struct {
	FirstName  string  `json:"first_name"`
	LastName   string  `json:"last_name"`
	Patronymic *string `json:"patronymic,omitempty"`
	Phone      string  `json:"phone"`
	Email      string  `json:"email"`
	HeldPost   *string `json:"held_post,omitempty"`
}

type ResponsiblePersonCreateResponse added in v1.51.45

type ResponsiblePersonCreateResponse struct {
	ResponsiblePerson
}

type ResponsiblePersonDeleteRequest added in v1.51.45

type ResponsiblePersonDeleteRequest struct {
	Id string `json:"id"`
}

type ResponsiblePersonGetListRequest added in v1.51.45

type ResponsiblePersonGetListRequest struct {
	Limit  *uint32 `json:"limit,omitempty"`
	Offset *uint64 `json:"offset,omitempty"`
}

type ResponsiblePersonGetRequest added in v1.51.45

type ResponsiblePersonGetRequest struct {
	ResponsiblePersonIds string `json:"responsible_person_ids"`
}

type ResponsiblePersonGetResponse added in v1.51.45

type ResponsiblePersonGetResponse struct {
	ResponsiblePersonList []ResponsiblePerson `json:"responsible_person_list"`
}

type ResponsiblePersonUpdateRequest added in v1.51.45

type ResponsiblePersonUpdateRequest struct {
	Id          string  `json:"id"`
	DisplayName string  `json:"display_name"`
	FirstName   string  `json:"first_name"`
	LastName    string  `json:"last_name"`
	Patronymic  *string `json:"patronymic,omitempty"`
	Phone       string  `json:"phone"`
	Email       string  `json:"email"`
	HeldPost    *string `json:"held_post,omitempty"`
}

type ResponsiblePersonUpdateResponse added in v1.51.45

type ResponsiblePersonUpdateResponse struct {
	ResponsiblePerson
}

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 Section added in v0.0.8

type Section struct {
	// Section uid
	Uid string `json:"uid"`

	// Sort ordering
	SortOrdering uint `json:"sort_ordering"`

	// Name
	Name string `json:"name"`

	// Object version
	Gentime int64 `json:"gentime"`

	// Description, if any
	Description string `json:"description,omitempty"`

	// Is deleted
	IsArchive bool `json:"is_archive,omitempty"`
}

Task project or contact section

type ServerAccountUpdated added in v1.50.6

type ServerAccountUpdated struct {
	BaseEvent
	Params serverAccountUpdatedParams `json:"params"`
}

Personal Account created or updated

func NewServerAccountUpdated added in v1.50.6

func NewServerAccountUpdated(account PersonalAccountBilling) (r ServerAccountUpdated)

func (ServerAccountUpdated) GetName added in v1.50.6

func (p ServerAccountUpdated) GetName() string

type ServerCallAnswer added in v0.0.9

type ServerCallAnswer struct {
	BaseEvent
	Params serverCallAnswerParams `json:"params"`
}

Call parameters (deprecated: use `ServerCallSdp`)

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"`
}

Call buzzing

func NewServerCallBuzz added in v0.0.9

func NewServerCallBuzz(teamShort TeamShort, chatShort ChatShort, actorShort ContactShort, uid string, callType CallType, 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"`
}

Call cancelled on buzzing

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"`
}

Experimental function

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"`
}

Participant leave a call

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"`
}

All participants in call muted

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"`
}

Call rejected

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"`
}

Call restarted

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 ServerCallScreenShare added in v1.49.20

type ServerCallScreenShare struct {
	BaseEvent
	Params serverCallScreenShareParams `json:"params"`
}

ServerCallScreenShare screen share event

func NewServerCallScreenShare added in v1.49.20

func NewServerCallScreenShare(screenShareEnabled bool, callJid, actorJid JID) (r ServerCallScreenShare)

func (ServerCallScreenShare) GetName added in v1.49.20

func (p ServerCallScreenShare) GetName() string

type ServerCallSdp added in v1.32.2

type ServerCallSdp struct {
	BaseEvent
	Params serverCallSdpParams `json:"params"`
}

For exchange Session Description with client when server's Local Session Description is changed

func NewServerCallSdp added in v1.32.2

func NewServerCallSdp(jid JID, uid, sdpType, sdp string, jids []JID) (r ServerCallSdp)

func (ServerCallSdp) GetName added in v1.32.2

func (p ServerCallSdp) GetName() string

type ServerCallSound added in v0.0.9

type ServerCallSound struct {
	BaseEvent
	Params ServerCallSoundParams `json:"params"`
}

Mute/unmute call participant

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 ServerCallSoundParams added in v0.0.9

type ServerCallSoundParams struct {
	// Chat or contact id
	Jid JID `json:"jid"`

	// Mute state
	Muted bool `json:"muted"`
}

Params of the server.call.sound event

type ServerCallState added in v0.0.9

type ServerCallState struct {
	BaseEvent
	Params CallEvent `json:"params"`
}

Call information

func NewServerCallState added in v0.0.9

func NewServerCallState(callEvent CallEvent) (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"`
}

Someone talks in call

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"`
}

Someone typing or recording audiomessage in chat

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"`
}

Chat deleted

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"`
}

Changed draft message in chat

func NewServerChatDraft added in v0.0.9

func NewServerChatDraft(jid JID, draft string, gentime int64, revision 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"`
}

Changed last read message in chat

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"`
}

Chat created or updated

func NewServerChatUpdated added in v0.0.9

func NewServerChatUpdated(chat Chat, teamUnread *TeamUnread, badge uint) (r ServerChatUpdated)

func NewServerChatsUpdated added in v1.45.2

func NewServerChatsUpdated(chats []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"`
}

Server confirmed client message

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"`
}

Contact created or updated

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"`
}

Debug message

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"`
}

Login from other device

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 ServerLogout added in v1.51.46

type ServerLogout struct {
	BaseEvent
	Params serverLogoutParams `json:"params"`
}

func NewServerLogout added in v1.51.46

func NewServerLogout(reason string) (r ServerLogout)

func (ServerLogout) GetName added in v1.51.46

func (p ServerLogout) GetName() string

type ServerMeetingCellUpdated added in v1.51.33

type ServerMeetingCellUpdated struct {
	BaseEvent
	Params serverMeetingCellUpdatedParams `json:"params"`
}

Meeting Cell updated

func NewServerMeetingCellUpdated added in v1.51.33

func NewServerMeetingCellUpdated(meetingID string, startAtOld, startAtNew ISODateTimeString, duration int32) (r ServerMeetingCellUpdated)

func (ServerMeetingCellUpdated) GetName added in v1.51.33

func (p ServerMeetingCellUpdated) GetName() string

type ServerMeetingDeleted added in v1.50.51

type ServerMeetingDeleted struct {
	BaseEvent
	Params serverMeetingDeletedParams `json:"params"`
}

Meeting deleted

func NewServerMeetingDeleted added in v1.50.51

func NewServerMeetingDeleted(meetingIds ...string) (r ServerMeetingDeleted)

func (ServerMeetingDeleted) GetName added in v1.50.51

func (p ServerMeetingDeleted) GetName() string

type ServerMeetingUpdated added in v1.50.34

type ServerMeetingUpdated struct {
	BaseEvent
	Params serverMeetingUpdatedParams `json:"params"`
}

Meeting created or updated

func NewServerMeetingUpdated added in v1.50.34

func NewServerMeetingUpdated(meeting Meeting, countTeam, countUser int32) (r ServerMeetingUpdated)

func NewServerMeetingsUpdated added in v1.50.36

func NewServerMeetingsUpdated(meetings []Meeting, countTeam, countUser int32) (r ServerMeetingUpdated)

func (ServerMeetingUpdated) GetName added in v1.50.36

func (p ServerMeetingUpdated) GetName() string

type ServerMessagePush added in v0.0.9

type ServerMessagePush struct {
	BaseEvent
	Params MessagePush `json:"params"`
}

Push replacement for desktop application

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"`
}

Message received by someone in chat

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"`
}

Chat message created, updated or deleted

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"`
}

Online team members and current active calls

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 ServerProcessing added in v0.0.9

type ServerProcessing struct {
	BaseEvent
	Params serverProcessingParams `json:"params"`
}

Status of background operation

func NewServerProcessing added in v0.0.9

func NewServerProcessing(num, total int, action, message, body string, hasError bool, actionType ActionType) (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"`
}

Task or group remind deleted

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"`
}

Task or group remind fired

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"`
}

Task/group remind created or changed

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

type ServerRoster struct {
	BaseEvent
	Params Roster `json:"params"`
}

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"`
}

Contact section or task project deleted

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"`
}

Contact section or task project created or changed

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"`
}

Tag deleted

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"`
}

Tag created or changed

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"`
}

Counters form other teams

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"`
}

Team archived

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"`
}

Team created or changed

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"`
}

Current server time

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 ServerUiSettingsParams `json:"params"`
}

Part of UI settings changed

func NewServerUiSettings added in v0.0.9

func NewServerUiSettings(namespace string, data UiSettingsData) (r ServerUiSettings)

func (ServerUiSettings) GetName added in v1.3.3

func (p ServerUiSettings) GetName() string

type ServerUiSettingsParams added in v1.46.0

type ServerUiSettingsParams struct {
	// Namespace. For example: web, app
	Namespace string `json:"namespace"`

	// UiSettingsData
	Data UiSettingsData `json:"data"`
}

type ServerUploadUpdated added in v1.9.0

type ServerUploadUpdated struct {
	BaseEvent
	Params serverUploadUpdatedParams `json:"params"`
}

Upload object created or changed

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"`
}

Something went wrong with client message

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 ServerWorkplaceUpdated added in v1.50.8

type ServerWorkplaceUpdated struct {
	BaseEvent
	Params serverWorkplaceUpdatedParams `json:"params"`
}

ServerWorkplaceUpdated Workplace created or updated

func NewServerWorkplaceUpdated added in v1.50.8

func NewServerWorkplaceUpdated(workplaces []UserInfo) (r ServerWorkplaceUpdated)

func (ServerWorkplaceUpdated) GetName added in v1.50.8

func (p ServerWorkplaceUpdated) 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 SimpleDailyIntStats map[time.Time]int

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 Sticker added in v1.2.4

type Sticker struct {
	Uid            string         `json:"uid"`
	Icon64         string         `json:"icon64"`
	Icon100        string         `json:"icon100"`
	Icon128        string         `json:"icon128"`
	Icon200        string         `json:"icon200"`
	MessageContent MessageContent `json:"message_content"`
}

Single sticker

type Stickerpack added in v1.2.4

type Stickerpack struct {
	Uid        string    `json:"uid"`
	Name       string    `json:"name"`
	Title      string    `json:"title"`
	Author     string    `json:"author,omitempty"`
	AuthorLink string    `json:"author_link,omitempty"`
	Stickers   []Sticker `json:"stickers"`
}

Collection of stickers

type Subscription added in v1.46.6

type Subscription struct {
	// Subscription id
	Uid string `json:"uid"`
	// Subscription activation time
	Activated *time.Time `json:"activated,omitempty"`
	// Subscription expiration time
	Expires *time.Time `json:"expires,omitempty"`
	// ID of the tariff for which the subscription is valid
	TariffUid string `json:"tariff_uid,omitempty"`
	// ID of the user who subscribed
	UserUid string `json:"user_uid,omitempty"`
	// EmptyWorkplaceCount empty workplace count
	EmptyWorkplaceCount uint32 `json:"empty_workplace_count,omitempty"`
}

Subscription - an entity that signifies the fact of subscribing to the tariff of any team for a certain period (not defined, in the case of the default tariff)

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"`

	// Is task or group public for non-guests
	Public bool `json:"public,omitempty"`

	// Subtask task status
	TaskStatus string `json:"task_status,omitempty"`

	// Subtask deadline in iso format, if any
	Deadline ISODateTimeString `json:"deadline,omitempty"`

	// Is subtask deadline expired
	DeadlineExpired bool `json:"deadline_expired,omitempty"`

	// Subtask importance, if available in team
	Importance *int `chattype:"task" json:"importance,omitempty"`

	// Subtask complexity, number
	Complexity *int `chattype:"task" json:"complexity,omitempty"`
}

Link to sub/sup task

type SuspendPersonalAccountResponse added in v1.49.8

type SuspendPersonalAccountResponse struct {
	Success bool `json:"success"`
}

SuspendPersonalAccountResponse response on suspend active personal account

type SwipeColors added in v1.49.18

type SwipeColors struct {
	// Notification color
	Notification RGBColor `json:"notification"`

	// Call color
	Call RGBColor `json:"call"`

	// EndCall
	EndCall RGBColor `json:"end_call"`

	// Hide color
	Hide RGBColor `json:"hide"`

	// Pin color
	Pin RGBColor `json:"pin"`

	// Message color
	Message RGBColor `json:"message"`
}

SwipeColors swipe colors for app

type SwitcherColors added in v1.22.2

type SwitcherColors struct {
	// On color
	On RGBColor `json:"on"`

	// Off color
	Off RGBColor `json:"off"`
}

SwitcherColors switcher colors for app

type Tag added in v0.0.8

type Tag struct {
	// Tag id
	Uid string `json:"uid"`

	// Tag name
	Name string `json:"name"`
}

Task tag

type Tariff added in v1.36.2

type Tariff struct {
	// Tariff id
	Uid string `json:"uid"`

	// Title of tariff in enlish
	TitleEn string `json:"title_en"`

	// Title of tariff in russian
	TitleRu string `json:"title_ru"`

	// Price of tariff
	Price string `json:"price,omitempty"`

	// Cloud space reserved for storing team users uploads in megabytes
	CloudSpace int64 `json:"cloud_space,omitempty"`

	// Maximum allowed number of members in a team
	MaxMembersInTeam int `json:"max_members_in_team,omitempty"`

	// Maximum number of participants per call
	MaxParticipantsPerCall int `json:"max_participants_per_call,omitempty"`

	//maximum file size for uploading
	MaxUploadFilesize int64 `json:"max_upload_filesize,omitempty"`
}

Tariff for teams

type TariffBilling added in v1.49.3

type TariffBilling struct {
	// Tariff id
	Id string `json:"id"`

	// Name of tariff
	Name string `json:"name"`

	// Nomenclature name of tariff
	NomenclatureName string `json:"nomenclature_name"`

	// Description of tariff
	Description string `json:"description"`

	// Benefit of tariff
	Benefit string `json:"benefit,omitempty"`

	// Currency of tariff
	Currency Currency `json:"currency"`

	// Priority of tariff
	Priority uint32 `json:"priority,omitempty"`

	// Cost of one workplace
	CostWorkplace float64 `json:"cost_workplace"`

	// Count of maximum workspaces on tariff
	MaxWorkplaceCount uint32 `json:"max_workplace_count,omitempty"`

	// Count of minimum workspaces on tariff
	MinWorkplaceCount uint32 `json:"min_workplace_count,omitempty"`

	// Count of free workspaces
	FreeWorkplaceCount uint32 `json:"free_workplace_count"`

	// Minimum step of change count workspaces on tariff
	StepIncreasingWorkplaces uint32 `json:"step_increasing_workplaces"`

	// Disk space limit per user
	DiskSpaceQuotaMb float64 `json:"disk_space_quota_mb"`

	// Number of paid days
	PeriodDays uint32 `json:"period_days"`

	// Maximum count of users in voice conference
	MaxVoiceUser uint32 `json:"max_voice_user"`

	// Maximum count of users in video conference
	MaxVideoUser uint32 `json:"max_video_user"`

	// Bitrate of video in video co
	VideoCallBitrate uint32 `json:"video_call_bitrate"`

	// Bitrate of video in video sharing
	VideoSharingBitrate uint32 `json:"video_sharing_bitrate"`

	// Flag of availability of free seats when exceeding FreeWorkplace
	IsFree bool `json:"is_free"`

	// Flag of publicity
	IsPublic bool `json:"is_public"`

	// Default tariff flag that is set when registering an account
	IsDefault bool `json:"is_default"`

	// Date of opening tariff
	OpenDate *time.Time `json:"open_date"`

	// Date of closing tariff
	CloseDate *time.Time `json:"close_date,omitempty"`

	// Status of tariff
	Status TariffStatus `json:"status"`
}

Tariff struct of billing API

type TariffStatus added in v1.49.10

type TariffStatus string

Tariff status

const (
	// Tariff is active
	ActiveTariff TariffStatus = "TARIFF_STATUS_ACTIVE"

	// Tariff in archive
	ArchiveTariff TariffStatus = "TARIFF_STATUS_ARCHIVE"

	// Tariff is unknown
	UnspecifiedTariff TariffStatus = "TARIFF_STATUS_UNSPECIFIED"
)

type TaskColor added in v0.0.8

type TaskColor struct {
	// Regular color
	Regular RGBColor `json:"regular"`

	// Dark color
	Dark RGBColor `json:"dark"`

	// Light color
	Light RGBColor `json:"light"`
}

Task color rules color

type TaskCounters added in v1.13.2

type TaskCounters struct {
	// Task jid
	Jid JID `json:"jid"`

	// Unreads counter
	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"`

	// Object version
	Gentime int64 `json:"gentime" tdproto:"readonly"`

	// 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"`

	// Can I change this item
	CanChange bool `json:"can_change,omitempty"`

	// Link to subtask. Optional
	Subtask *Subtask `json:"subtask,omitempty"`
}

Task checklist item

type TaskItems added in v0.0.8

type TaskItems struct {
	Name    string `json:"name"`
	Checked bool   `json:"checked"`
}

Task item

type TaskPreview added in v0.0.8

type TaskPreview struct {
	Error       string      `json:"_error,omitempty"`
	Assignee    JID         `json:"assignee"`
	Deadline    *time.Time  `json:"deadline"`
	Description string      `json:"description"`
	Section     string      `json:"section"`
	Public      bool        `json:"public"`
	Tags        []string    `json:"tags"`
	Items       []TaskItems `json:"items"`
}

Task Preview

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 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"`

	// Sort ordering for pinned team
	PinnedSortOrdering int `json:"pinned_sort_ordering,omitempty"`

	// Team's available tariff by includig archive ones
	AvailableTariffs []string `json:"available_tariffs,omitempty"`

	// Сurrent team subscription
	Subscription Subscription `json:"subscription,omitempty"`

	// Сurrent team favorites bot, jid of chat
	Notebot JID `json:"notebot,omitempty" tdproto:"readonly"`

	// Personal account status for current team
	AccountStatus PersonalAccountStatus `json:"account_status" tdproto:"readonly"`

	// Team owner
	Owner Contact `json:"owner,omitempty"`
}

Team

type TeamBilling added in v1.49.8

type TeamBilling struct {
	TeamUuid   string    `json:"team_uuid,omitempty"`
	DeleteDate time.Time `json:"delete_date,omitempty"`
}

TeamBilling struct of billing api

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

type TeamUnread map[ChatType]*Unread

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 {
	// "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
}

Experimental translation fields for "team" entity renaming. Readonly.

type Theme added in v0.0.7

type Theme struct {
	// BgColor for web
	BgColor RGBColor

	// BgHoverColor for web
	BgHoverColor RGBColor

	// TextColor for web
	TextColor RGBColor

	// MutedTextColor for web
	MutedTextColor RGBColor

	// AccentColor for web
	AccentColor RGBColor

	// AccentHoverColor for web
	AccentHoverColor RGBColor

	// TextOnAccentHoverColor for web
	TextOnAccentHoverColor RGBColor

	// MainAccent for web
	MainAccent RGBColor

	// MainAccentHover for web
	MainAccentHover RGBColor

	// MainLightAccent for web
	MainLightAccent RGBColor

	// MainLink for web
	MainLink RGBColor

	// Brand color for app
	Brand RGBColor `json:"brand"`

	// BrandDark color for app
	BrandDark RGBColor `json:"brand_dark"`

	// Brand light color for app
	BrandLight RGBColor `json:"brand_light"`

	// Back light color for app
	Back RGBColor `json:"back"`

	// Back light color for app
	BackLight RGBColor `json:"back_light"`

	// Back dark color for app
	BackDark RGBColor `json:"back_dark"`

	// Success color for app
	Success RGBColor `json:"success"`

	// Success light color for app
	SuccessLight RGBColor `json:"success_light"`

	// Error color for app
	Error RGBColor `json:"error"`

	// Error light color for app
	ErrorLight RGBColor `json:"error_light"`

	// Background color for app
	Background RGBColor `json:"background"`

	// Tab background color for app
	TabBackground RGBColor `json:"tab_background"`

	// Chat input background color for app
	ChatInputBackground RGBColor `json:"chat_input_background"`

	// Substrate background color for app
	SubstrateBackground RGBColor `json:"substrate_background"`

	// Modal background color for app
	ModalBackground RGBColor `json:"modal_background"`

	// Title background color for app
	TitleBackground RGBColor `json:"title_background"`

	// Attention color for app
	Attention RGBColor `json:"attention"`

	// Attention light color for app
	AttentionLight RGBColor `json:"attention_light"`

	// Font colors for app
	Font *FontColors `json:"font"`

	// Message colors for app
	Message *MessageColors `json:"message"`

	// Switcher colors for app
	Switcher *SwitcherColors `json:"switcher"`

	// Button colors for app
	Button *ButtonColors `json:"button"`

	// Input colors for app
	Input *InputColors `json:"input"`

	// Icon colors for app
	Icon *IconColors `json:"ic"`

	// Avatar colors for app
	Avatar *AvatarColors `json:"avatar"`

	// WebBase colors for web
	WebBase *WebBase `json:"web_base"`

	// Bg colors for app
	Bg *Bg `json:"bg"`

	// Swipe colors for app
	Swipe *SwipeColors `json:"swipe"`

	// Call colors for app
	CallColors *CallColors `json:"call"`

	// Deprecated
	AppAccentColor RGBColor

	// Deprecated
	AppPrimaryColor RGBColor
}

Color theme

type UiSettingsData added in v1.46.0

type UiSettingsData map[string]interface{}

Any user data

type UnblockPersonalAccountResponse added in v1.49.8

type UnblockPersonalAccountResponse struct {
	Success bool `json:"success"`
}

UnblockPersonalAccountResponse response on unblock blocked personal account

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 UpdatePersonalAccountRequest added in v1.49.13

type UpdatePersonalAccountRequest struct {
	FullName string `json:"full_name,omitempty"`
	Phone    string `json:"phone,omitempty"`
}

UpdatePersonalAccountRequest request on update personal account

type UpdatePersonalAccountResponse added in v1.49.13

type UpdatePersonalAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

UpdatePersonalAccountResponse response on update personal account

type UpdateTariffRequest added in v1.49.13

type UpdateTariffRequest struct {
	// Tariff id
	TariffId string `json:"tariff_id"`

	// Date of closing tariff
	CloseDate *time.Time `json:"close_date,omitempty"`

	// Default tariff flag that is set when registering an account
	IsDefault bool `json:"is_default,omitempty"`

	// Status of tariff
	Status TariffStatus `json:"status,omitempty"`
}

Request to update the tariff

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"`

	// Compact representation of a placeholder for an image (images only)
	Blurhash string `json:"blurhash,omitempty"`

	// File still processing (video only)
	Processing bool `json:"processing,omitempty"`

	// PDF version of file. Experimental
	PdfVersion *PdfVersion `json:"pdf_version,omitempty"`

	// ?type=file,image,audio,video
	MediaType UploadMediaType `json:"type"`
}

Uploaded media

type UploadMediaType added in v1.24.0

type UploadMediaType string
const (
	MediaTypeFile      UploadMediaType = "file"
	MediaTypeImage     UploadMediaType = "image"
	MediaTypeVideo     UploadMediaType = "video"
	MediaTypeAudio     UploadMediaType = "audio"
	MediaTypeFileImage UploadMediaType = "imagefile"
)

func (UploadMediaType) String added in v1.24.0

func (u UploadMediaType) String() string

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 information
	Upload Upload `json:"upload"`

	// Short message information
	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"`

	// Hide pushes body
	HidePushesContent bool `json:"hide_pushes_content"`

	// 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"`

	// Icon data
	Icons IconData `json:"icons"`
}

Account data

type UserAuth added in v0.0.8

type UserAuth struct {
	Created    time.Time `json:"created"`
	LastAccess time.Time `json:"last_access,omitempty"`
	DebugAge   int       `json:"_age,omitempty"`
	Uid        string    `json:"uid"`
	//type of auth
	Kind string `json:"kind"`
	// ip address
	Addr string `json:"addr,omitempty"`
	// info about useragent
	Useragent string `json:"user_agent,omitempty"`
	// name of country
	Country string `json:"country,omitempty"`
	// name of region
	Region string `json:"region,omitempty"`
	// info about device (struct)
	Device *PushDevice `json:"device,omitempty"`
}

User authentication

type UserInfo added in v1.49.14

type UserInfo struct {
	Uuid         string     `json:"uuid"`
	FullName     string     `json:"full_name,omitempty"`
	Phone        string     `json:"phone,omitempty"`
	Email        string     `json:"email,omitempty"`
	LastActivity *time.Time `json:"last_activity,omitempty"`
}

UserInfo user information

type UserWithMe added in v0.0.8

type UserWithMe struct {
	User

	// Inviter id, if any
	Inviter JID `json:"inviter,omitempty"`

	// Available teams
	Teams []Team `json:"teams"`

	// Registered push devices
	Devices []PushDevice `json:"devices"`

	// Personal account from billing
	Account *PersonalAccountBilling `json:"account,omitempty"`

	// Personal account from billing by opened team
	TeamAccount *PersonalAccountBilling `json:"team_account,omitempty"`
}

Account data with extra information

type Wallpaper added in v1.20.2

type Wallpaper struct {
	// Unique identifier
	Key string `json:"key"`

	// Localized description
	Name string `json:"name"`

	// Url to jpg or png
	Url string `json:"url"`
}

Chat wallpaper

type WebBase added in v1.34.7

type WebBase struct {
	// Brand color
	Brand RGBColor `json:"brand"`

	// BrandLight color
	BrandLight RGBColor `json:"brand_light"`

	// BrandDark color
	BrandDark RGBColor `json:"brand_dark"`

	// BackLight color
	BackLight RGBColor `json:"back_light"`

	// Error color
	Error RGBColor `json:"error"`

	// ErrorLight color
	ErrorLight RGBColor `json:"error_light"`

	// Success color
	Success RGBColor `json:"success"`

	// SuccessLight color
	SuccessLight RGBColor `json:"success_light"`

	// Attention color
	Attention RGBColor `json:"attention"`

	// AttentionLight color
	AttentionLight RGBColor `json:"attention_light"`

	// Fade color
	Fade RGBColor `json:"fade"`
}

WebBase base colors for web

type WorkplaceBilling added in v1.49.13

type WorkplaceBilling struct {
	WorkplaceId string `json:"workplace_id,omitempty"`
	UserId      string `json:"user_id,omitempty"`
	UserUuid    string `json:"user_uuid,omitempty"`
}

WorkplaceBilling struct of workplace on personal account

type WorkplaceOptions added in v1.49.13

type WorkplaceOptions struct {
	Limit  int32 `json:"limit,omitempty"`
	Offset int32 `json:"offset,omitempty"`
}

WorkplaceOptions struct for pagination

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL