-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13e0094
commit 4e7d63d
Showing
8 changed files
with
188 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
package tdproto | ||
|
||
// Push device info | ||
type PushDevice struct { | ||
Type string `json:"type"` | ||
DeviceId string `json:"device_id"` | ||
NotificationToken string `json:"notification_token"` | ||
// 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"` | ||
AllowedNotifications bool `json:"allowed_notifications"` // deprecated | ||
Name string `json:"name"` | ||
DataPushes bool `json:"data_pushes"` | ||
DataBadges bool `json:"data_badges"` | ||
|
||
// 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"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
package tdapi | ||
|
||
import "github.com/tada-team/tdproto" | ||
|
||
// Contact invite/edit form | ||
type Contact struct { | ||
// User uid (for invitation from other team) | ||
UserUid string `json:"user_uid,omitempty"` | ||
|
||
// Phone number (for invitation by phone) | ||
Phone string `json:"phone"` | ||
|
||
// Contact phone number (part of contact information in team, visible by all) | ||
ContactPhone string `json:"contact_phone"` | ||
|
||
// Contact email (part of contact information in team, visible by all) | ||
ContactEmail string `json:"contact_email"` | ||
|
||
// Family name | ||
FamilyName string `json:"family_name"` | ||
|
||
// Given name | ||
GivenName string `json:"given_name"` | ||
|
||
// Patronymic | ||
Patronymic string `json:"patronymic"` | ||
|
||
// Role in team | ||
Role string `json:"role"` | ||
|
||
// Mood in team | ||
Mood string `json:"mood"` | ||
|
||
// Enable debug messages in UI | ||
DebugShowActivity bool `json:"debug_show_activity"` | ||
|
||
// Status in team | ||
Status tdproto.TeamStatus `json:"status"` | ||
|
||
// ContactSection uids, if any | ||
Sections []string `json:"sections"` | ||
|
||
// Use Ctrl/Cmd + Enter instead Enter | ||
AltSend bool `json:"alt_send"` | ||
|
||
// Use * as @ for mentions | ||
AsteriskMention bool `json:"asterisk_mention"` | ||
|
||
// Send push notifications even contact is online | ||
AlwaysSendPushes bool `json:"always_send_pushes"` | ||
|
||
// Show unread chats first (web/desktop) | ||
UnreadFirst bool `json:"unread_first"` | ||
|
||
// Show unread chats first (mobile app) | ||
MunreadFirst bool `json:"munread_first"` | ||
|
||
// Default language code | ||
DefaultLang string `json:"default_lang"` | ||
|
||
// Timezone, if any | ||
Timezone string `json:"timezone"` | ||
|
||
// Start silently time (no pushes, no sounds) | ||
QuietTimeStart string `json:"quiet_time_start"` | ||
|
||
// Quiet time finish | ||
QuietTimeFinish string `json:"quiet_time_finish"` | ||
|
||
// Push notifications for group chats | ||
GroupNotificationsEnabled bool `json:"group_notifications_enabled"` | ||
|
||
// Push notifications for task chats | ||
TaskNotificationsEnabled bool `json:"task_notifications_enabled"` | ||
|
||
// Short view in contact list | ||
ContactShortView bool `json:"contact_short_view"` | ||
|
||
// Short view in group list | ||
GroupShortView bool `json:"group_short_view"` | ||
|
||
// Short view in task list | ||
TaskShortView bool `json:"task_short_view"` | ||
|
||
// Short view in contact list in mobile app | ||
ContactMshortView bool `json:"contact_mshort_view"` | ||
|
||
// Show archived contacts in contact list | ||
ContactShowArchived bool `json:"contact_show_archived"` | ||
|
||
// Short view in group list in mobile app | ||
GroupMshortView bool `json:"group_mshort_view"` | ||
|
||
// Short view in task list in mobile app | ||
TaskMshortView bool `json:"task_mshort_view"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package tdapi | ||
|
||
import "github.com/tada-team/tdproto" | ||
|
||
type Integration struct { | ||
// Enabled | ||
Enabled bool `json:"enabled"` | ||
|
||
// Optional commend | ||
Comment string `json:"comment"` | ||
|
||
// Plugin name | ||
Kind string `json:"kind"` | ||
|
||
// Group chat jid | ||
GroupJid tdproto.JID `json:"group"` | ||
|
||
// WebhookUrl, if any | ||
WebhookUrl string `json:"webhook_url"` | ||
|
||
// Integration form | ||
IntegrationForm *tdproto.IntegrationForm `json:"form"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package tdapi | ||
|
||
type Team struct { | ||
// Team name | ||
Name string `json:"name"` | ||
|
||
// Default task deadline | ||
DefaultTaskDeadline string `json:"default_task_deadline"` | ||
|
||
// Max message update/deletion age, in seconds | ||
MaxMessageUpdateAge interface{} `json:"max_message_update_age"` | ||
|
||
// Patronymic in usernames for this team | ||
UsePatronymic bool `json:"use_patronymic"` | ||
|
||
// Use importance field in task | ||
UseTaskImportance bool `json:"use_task_importance"` | ||
|
||
// Use urgency field in task | ||
UseTaskUrgency bool `json:"use_task_urgency"` | ||
|
||
// Use complexity field in task | ||
UseTaskComplexity bool `json:"use_task_complexity"` | ||
|
||
// Use spent time field in task | ||
UseTaskSpentTime bool `json:"use_task_spent_time"` | ||
|
||
// Is singlegroup (for creation only) | ||
SingleGroup bool `json:"single_group"` | ||
|
||
// Contacts (for creation only) | ||
Contacts []Contact `json:"contacts"` | ||
|
||
// Team pinned | ||
Pinned bool `json:"pinned,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters