models

package
v0.0.0-...-8bc772b Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionLinks struct {
	Icon      string `json:"icon"`
	I18NLabel string `json:"i18nLabel"`
	MethodID  string `json:"method_id"`
	Params    string `json:"params"`
}

type AddUserToRole

type AddUserToRole struct {
	RoleName string `json:"roleName"`
	Username string `json:"username"`
	RoomId   string `json:"roomId,omitempty"`
}

type Agent

type Agent struct {
	ID     string `json:"_id"`
	Emails []struct {
		Address  string `json:"address"`
		Verified bool   `json:"verified"`
	} `json:"emails"`
	Name     string `json:"name"`
	Username string `json:"username"`
}

type AgentDepartment

type AgentDepartment struct {
	ID           string    `json:"_id"`
	AgentID      string    `json:"agentId"`
	DepartmentID string    `json:"departmentId"`
	UpdatedAt    time.Time `json:"_updatedAt"`
	Count        int       `json:"count"`
	Order        int       `json:"order"`
	Username     string    `json:"username"`
}

type AgentInfoRequest

type AgentInfoRequest struct {
	RID   string `json:"rid"`
	Token string `json:"token"`
}

type Appearance

type Appearance struct {
	ID              string    `json:"_id"`
	UpdatedAt       time.Time `json:"_updatedAt"`
	Autocomplete    bool      `json:"autocomplete"`
	Blocked         bool      `json:"blocked"`
	CreatedAt       time.Time `json:"createdAt"`
	Enterprise      bool      `json:"enterprise"`
	Group           string    `json:"group"`
	Hidden          bool      `json:"hidden"`
	I18NDescription string    `json:"i18nDescription"`
	I18NLabel       string    `json:"i18nLabel"`
	PackageValue    string    `json:"packageValue"`
	Public          bool      `json:"public,omitempty"`
	Secret          bool      `json:"secret"`
	Section         string    `json:"section"`
	Sorter          int       `json:"sorter"`
	Ts              time.Time `json:"ts"`
	Type            string    `json:"type"`
	Value           string    `json:"value"`
	ValueSource     string    `json:"valueSource"`
	Multiline       bool      `json:"multiline,omitempty"`
	AllowedTypes    []string  `json:"allowedTypes,omitempty"`
	Editor          string    `json:"editor,omitempty"`
	PackageEditor   string    `json:"packageEditor,omitempty"`
	EnableQuery     string    `json:"enableQuery,omitempty"`
}

type Asset

type Asset struct {
	DefaultUrl string `json:"defaultUrl"`
}

type AssetUnSetRequest

type AssetUnSetRequest struct {
	AssetName         string `json:"assetName"`
	RefreshAllClients string `json:"refreshAllClients"`
}

type Attachment

type Attachment struct {
	Color       string `json:"color,omitempty"`
	Text        string `json:"text,omitempty"`
	Timestamp   string `json:"ts,omitempty"`
	ThumbURL    string `json:"thumb_url,omitempty"`
	MessageLink string `json:"message_link,omitempty"`
	Collapsed   bool   `json:"collapsed"`

	AuthorName string `json:"author_name,omitempty"`
	AuthorLink string `json:"author_link,omitempty"`
	AuthorIcon string `json:"author_icon,omitempty"`

	Title             string `json:"title,omitempty"`
	TitleLink         string `json:"title_link,omitempty"`
	TitleLinkDownload string `json:"title_link_download,omitempty"`

	ImageURL string `json:"image_url,omitempty"`

	AudioURL string `json:"audio_url,omitempty"`
	VideoURL string `json:"video_url,omitempty"`

	Actions                []AttachmentAction               `json:"actions,omitempty"`
	ActionButtonsAlignment AttachmentActionButtonsAlignment `json:"button_alignment,omitempty"`

	Fields []AttachmentField `json:"fields,omitempty"`
}

Attachment Payload for postmessage rest API

https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage/

type AttachmentAction

type AttachmentAction struct {
	Type               AttachmentActionType  `json:"type,omitempty"`
	Text               string                `json:"text,omitempty"`
	Url                string                `json:"url,omitempty"`
	ImageURL           string                `json:"image_url,omitempty"`
	IsWebView          bool                  `json:"is_webview"`
	WebviewHeightRatio string                `json:"webview_height_ratio,omitempty"`
	Msg                string                `json:"msg,omitempty"`
	MsgInChatWindow    bool                  `json:"msg_in_chat_window"`
	MsgProcessingType  MessageProcessingType `json:"msg_processing_type,omitempty"`
}

AttachmentAction are action buttons on message attachments

type AttachmentActionButtonsAlignment

type AttachmentActionButtonsAlignment string

AttachmentActionButtonAlignment configures how the actions buttons will be aligned

const (
	ActionButtonAlignVertical   AttachmentActionButtonsAlignment = "vertical"
	ActionButtonAlignHorizontal AttachmentActionButtonsAlignment = "horizontal"
)

type AttachmentActionType

type AttachmentActionType string
const (
	AttachmentActionTypeButton AttachmentActionType = "button"
)

type AttachmentField

type AttachmentField struct {
	Short bool   `json:"short"`
	Title string `json:"title,omitempty"`
	Value string `json:"value,omitempty"`
}

AttachmentField Payload for postmessage rest API

https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage/

type AuthData

type AuthData struct {
	AuthToken string `json:"authToken"`
	UserID    string `json:"userId"`
	Me        Me     `json:"me"`
}

type CHATMessage

type CHATMessage struct {
	ID          string        `json:"_id"`
	Alias       string        `json:"alias"`
	Msg         string        `json:"msg"`
	Attachments []interface{} `json:"attachments"`
	ParseUrls   bool          `json:"parseUrls"`
	Groupable   bool          `json:"groupable"`
	Ts          time.Time     `json:"ts"`
	U           CHATU         `json:"u"`
	Rid         string        `json:"rid"`
	UpdatedAt   time.Time     `json:"_updatedAt"`
	Mentions    []interface{} `json:"mentions"`
	Channels    []interface{} `json:"channels"`
}

type CHATU

type CHATU struct {
	ID       string `json:"_id"`
	Username string `json:"username"`
	Name     string `json:"name"`
}

type Channel

type Channel struct {
	ID    string `json:"_id"`
	Name  string `json:"name"`
	Fname string `json:"fname,omitempty"`
	Type  string `json:"t"`
	Msgs  int    `json:"msgs"`

	ReadOnly  bool `json:"ro,omitempty"`
	SysMes    bool `json:"sysMes,omitempty"`
	Default   bool `json:"default"`
	Broadcast bool `json:"broadcast,omitempty"`

	Timestamp *time.Time `json:"ts,omitempty"`
	UpdatedAt *time.Time `json:"_updatedAt,omitempty"`

	User        *User    `json:"u,omitempty"`
	LastMessage *Message `json:"lastMessage,omitempty"`
}

type ChannelAddAllRequest

type ChannelAddAllRequest struct {
	RoomID          string `json:"roomId"`
	ActiveUsersOnly bool   `json:"activeUsersOnly"`
}

type ChannelAddLeaderRequest

type ChannelAddLeaderRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type ChannelAddModeratorRequest

type ChannelAddModeratorRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type ChannelAddOwnerRequest

type ChannelAddOwnerRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type ChannelAnnouncementRequest

type ChannelAnnouncementRequest struct {
	RoomID       string `json:"roomId"`
	Announcement string `json:"announcement"`
}

type ChannelArchiveRequest

type ChannelArchiveRequest struct {
	RoomID string `json:"roomId"`
}

type ChannelCloseRequest

type ChannelCloseRequest struct {
	RoomID string `json:"roomId"`
}

type ChannelCreateRequest

type ChannelCreateRequest struct {
	Name     string   `json:"name"`
	Members  []string `json:"members"`
	ReadOnly bool     `json:"readOnly"`
}

type ChannelCustomFieldsRequest

type ChannelCustomFieldsRequest struct {
	RoomID       string `json:"roomId"`
	RoomName     string `json:"roomName"`
	CustomFields struct {
		Organization string `json:"organization"`
	} `json:"customFields"`
}

type ChannelDefaultRequest

type ChannelDefaultRequest struct {
	RoomID  string `json:"roomId"`
	Default bool   `json:"default"`
}

type ChannelDeleteRequest

type ChannelDeleteRequest struct {
	RoomID   string `json:"roomId"`
	RoomName string `json:"roomName"`
}

type ChannelDescriptionRequest

type ChannelDescriptionRequest struct {
	RoomID      string `json:"roomId"`
	Description string `json:"description"`
}

type ChannelInviteRequest

type ChannelInviteRequest struct {
	UserName string `json:"username"`
	RoomName string `json:"roomName"`
	RoomID   string `json:"roomId"`
	UserID   string `json:"userId"`
}

type ChannelJoinCodeRequest

type ChannelJoinCodeRequest struct {
	RoomID   string `json:"roomId"`
	JoinCode string `json:"joinCode"`
}

type ChannelJoinRequest

type ChannelJoinRequest struct {
	RoomID   string `json:"roomId"`
	JoinCode string `json:"joinCode"`
}

type ChannelKickRequest

type ChannelKickRequest struct {
	RoomName string `json:"roomName"`
	UserName string `json:"username"`
	RoomID   string `json:"roomId"`
	UserID   string `json:"userId"`
}

type ChannelOpenRequest

type ChannelOpenRequest struct {
	RoomID string `json:"roomId"`
}

type ChannelReadOnlyRequest

type ChannelReadOnlyRequest struct {
	RoomID   string `json:"roomId"`
	ReadOnly bool   `json:"readOnly"`
}

type ChannelRemoveLeaderRequest

type ChannelRemoveLeaderRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type ChannelRemoveModeratorRequest

type ChannelRemoveModeratorRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type ChannelRemoveOwnerRequest

type ChannelRemoveOwnerRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type ChannelRenameRequest

type ChannelRenameRequest struct {
	RoomID string `json:"roomId"`
	Name   string `json:"name"`
}

type ChannelSubscription

type ChannelSubscription struct {
	ID          string   `json:"_id"`
	Alert       bool     `json:"alert"`
	Name        string   `json:"name"`
	DisplayName string   `json:"fname"`
	Open        bool     `json:"open"`
	RoomId      string   `json:"rid"`
	Type        string   `json:"c"`
	User        User     `json:"u"`
	Roles       []string `json:"roles"`
	Unread      float64  `json:"unread"`
}

type ChannelTopicRequest

type ChannelTopicRequest struct {
	RoomID string `json:"roomId"`
	Topic  string `json:"topic"`
}

type ChannelTypeRequest

type ChannelTypeRequest struct {
	RoomID string `json:"roomId"`
	Type   string `json:"type"`
}

type ChannelUnArchiveRequest

type ChannelUnArchiveRequest struct {
	RoomID string `json:"roomId"`
}

type ChatDeleteRequest

type ChatDeleteRequest struct {
	RoomID string `json:"roomId"`
	MsgID  string `json:"msgId"`
	AsUser bool   `json:"asUser"`
}

type ChatFollowRequest

type ChatFollowRequest struct {
	MessageId string `json:"mid"`
}

type ChatIgnoreRequest

type ChatIgnoreRequest struct {
	Rid    string `json:"rid"`
	UserId string `json:"userId"`
	Ignore bool   `json:"ignore"`
}

type ChatPinRequest

type ChatPinRequest struct {
	MessageId string `json:"messageId"`
}

type ChatReactRequest

type ChatReactRequest struct {
	MessageID   string `json:"messageId"`
	Emoji       string `json:"emoji"`
	ShouldReact bool   `json:"shouldReact"`
}

type ChatReportRequest

type ChatReportRequest struct {
	MessageID   string `json:"messageId"`
	Description string `json:"description"`
}

type ChatSendMessageRequest

type ChatSendMessageRequest struct {
	Message struct {
		Rid string `json:"rid"`
		Msg string `json:"msg"`
		//	Alias       string `json:"alias"`
		Emoji string `json:"emoji"`
		//	Avatar      string `json:"avatar"`
		Attachments []struct {
			Color             string    `json:"color"`
			Text              string    `json:"text"`
			Ts                time.Time `json:"ts"`
			ThumbURL          string    `json:"thumb_url"`
			MessageLink       string    `json:"message_link"`
			Collapsed         bool      `json:"collapsed"`
			AuthorName        string    `json:"author_name"`
			AuthorLink        string    `json:"author_link"`
			AuthorIcon        string    `json:"author_icon"`
			Title             string    `json:"title"`
			TitleLink         string    `json:"title_link"`
			TitleLinkDownload bool      `json:"title_link_download"`
			ImageURL          string    `json:"image_url"`
			AudioURL          string    `json:"audio_url"`
			VideoURL          string    `json:"video_url"`
			Fields            []struct {
				Short bool   `json:"short"`
				Title string `json:"title"`
				Value string `json:"value"`
			} `json:"fields"`
		} `json:"attachments"`
	} `json:"message"`
}

type ChatStarRequest

type ChatStarRequest struct {
	MessageId string `json:"messageId"`
}

type ChatUnFollowRequest

type ChatUnFollowRequest struct {
	MessageId string `json:"mid"`
}

type ChatUnPinRequest

type ChatUnPinRequest struct {
	MessageId string `json:"messageId"`
}

type ChatUnStarRequest

type ChatUnStarRequest struct {
	MessageId string `json:"messageId"`
}

type ChatUpdateRequest

type ChatUpdateRequest struct {
	RoomID string `json:"roomId"`
	MsgID  string `json:"msgId"`
	Text   string `json:"text"`
}

type CloseIMRequest

type CloseIMRequest struct {
	RoomId string `json:"roomId"`
}

type Command

type Command struct {
	Command     string `json:"command"`
	Params      string `json:"params"`
	Description string `json:"description"`
	ClientOnly  bool   `json:"clientOnly"`
}

type CountersIMMessage

type CountersIMMessage struct {
	Joined       bool      `json:"joined"`
	Members      int       `json:"members"`
	Unreads      int       `json:"unreads"`
	UnreadsFrom  time.Time `json:"unreadsFrom"`
	Msgs         int       `json:"msgs"`
	Latest       time.Time `json:"latest"`
	UserMentions int       `json:"userMentions"`
}

type CreateGroupRequest

type CreateGroupRequest struct {
	Name     string   `json:"name"`
	Members  []string `json:"members"`
	ReadOnly bool     `json:"readOnly"`
}

type CreateIMRequest

type CreateIMRequest struct {
	Username  string `json:"username"`
	Usernames string `json:"usernames"`
}

type CreateIntegration

type CreateIntegration struct {
	Type          string   `json:"type"`
	Name          string   `json:"name"`
	Event         string   `json:"event"`
	Enabled       bool     `json:"enabled"`
	Username      string   `json:"username"`
	Urls          []string `json:"urls"`
	ScriptEnabled bool     `json:"scriptEnabled"`
	Channel       string   `json:"channel"`
	TriggerWords  []string `json:"triggerWords"`
	Alias         string   `json:"alias"`
	Avater        string   `json:"avater"`
	Emoji         string   `json:"emoji"`
	Token         string   `json:"token"`
	Script        string   `json:"script"`
}

type CreateInviteRequest

type CreateInviteRequest struct {
	Rid     string `json:"rid"`
	Day     int    `json:"days"` // 0 represent unlimited
	MaxUses int    `json:"maxUses"`
}

type CreateUserRequest

type CreateUserRequest struct {
	Name                  string            `json:"name"`
	Email                 string            `json:"email"`
	Password              string            `json:"password"`
	Username              string            `json:"username"`
	Roles                 []string          `json:"roles,omitempty"`
	Active                bool              `json:"active,default:true"`
	JoinDefaultChannels   bool              `json:"joinDefaultChannels,default:true"`
	RequirePasswordChange bool              `json:"requirePasswordChange,default:false"`
	SendWelcomeEmail      bool              `json:"sendWelcomeEmail,default:false"`
	Verified              bool              `json:"verified,default:false"`
	CustomFields          map[string]string `json:"customFields,omitempty"`
}

type CreatedBy

type CreatedBy struct {
	Username string `json:"username"`
	ID       string `json:"_id"`
}

type CustomUserStatus

type CustomUserStatus struct {
	ID         string    `json:"_id"`
	Name       string    `json:"name"`
	StatusType string    `json:"statusType"`
	UpdatedAt  time.Time `json:"_updatedAt"`
}

type Department

type Department struct {
	ID                 string    `json:"id"`
	Enabled            bool      `json:"enabled"`
	ShowOnRegistration bool      `json:"showOnRegistration"`
	Email              string    `json:"email"`
	ShowOnOfflineForm  bool      `json:"showOnOfflineForm"`
	Name               string    `json:"name"`
	UpdatedAt          time.Time `json:"_updatedAt"`
	D                  string    `json:"_id,omitempty"`
	Description        string    `json:"description,omitempty"`
}

type Directory

type Directory struct {
	Result []struct {
		ID        string    `json:"_id"`
		CreatedAt time.Time `json:"createdAt"`
		Emails    []struct {
			Address  string `json:"address"`
			Verified bool   `json:"verified"`
		} `json:"emails"`
		Name     string `json:"name"`
		Username string `json:"username"`
	} `json:"result"`

	Pagination
}

type EmojiDeleteRequest

type EmojiDeleteRequest struct {
	EmojiID string `json:"emojiId"`
}

type EveryoneListIM

type EveryoneListIM struct {
	ID        string    `json:"_id"`
	Name      string    `json:"name"`
	Type      string    `json:"t"`
	Usernames []string  `json:"usernames"`
	Msgs      int       `json:"msgs"`
	User      User      `json:"u"`
	Ts        time.Time `json:"ts"`
	Ro        bool      `json:"ro"`
	SysMes    bool      `json:"sysMes"`
	UpdatedAt time.Time `json:"_updatedAt"`
}

type ExportOperation

type ExportOperation struct {
	UserID        string        `json:"userId"`
	RoomList      interface{}   `json:"roomList"`
	Status        string        `json:"status"`
	FileList      []interface{} `json:"fileList"`
	GeneratedFile interface{}   `json:"generatedFile"`
	FullExport    bool          `json:"fullExport"`
	UserData      struct {
		ID        string    `json:"_id"`
		CreatedAt time.Time `json:"createdAt"`
		Services  struct {
			Password struct {
				Bcrypt string `json:"bcrypt"`
				Reset  struct {
					Token  string    `json:"token"`
					Email  string    `json:"email"`
					When   time.Time `json:"when"`
					Reason string    `json:"reason"`
				} `json:"reset"`
			} `json:"password"`
			Email2Fa struct {
				Enabled   bool      `json:"enabled"`
				ChangedAt time.Time `json:"changedAt"`
			} `json:"email2fa"`
			Email struct {
				VerificationTokens []struct {
					Token   string    `json:"token"`
					Address string    `json:"address"`
					When    time.Time `json:"when"`
				} `json:"verificationTokens"`
			} `json:"email"`
			Resume struct {
				LoginTokens []struct {
					When          time.Time `json:"when,omitempty"`
					HashedToken   string    `json:"hashedToken"`
					Type          string    `json:"type,omitempty"`
					CreatedAt     time.Time `json:"createdAt,omitempty"`
					LastTokenPart string    `json:"lastTokenPart,omitempty"`
					Name          string    `json:"name,omitempty"`
				} `json:"loginTokens"`
			} `json:"resume"`
		} `json:"services"`
		Emails []struct {
			Address  string `json:"address"`
			Verified bool   `json:"verified"`
		} `json:"emails"`
		Type             string    `json:"type"`
		Status           string    `json:"status"`
		Active           bool      `json:"active"`
		UpdatedAt        time.Time `json:"_updatedAt"`
		Roles            []string  `json:"roles"`
		Name             string    `json:"name"`
		LastLogin        time.Time `json:"lastLogin"`
		StatusConnection string    `json:"statusConnection"`
		UtcOffset        int       `json:"utcOffset"`
		Username         string    `json:"username"`
		Settings         struct {
			Preferences struct {
				AutoImageLoad                         bool          `json:"autoImageLoad"`
				CollapseMediaByDefault                bool          `json:"collapseMediaByDefault"`
				ConvertASCIIEmoji                     bool          `json:"convertAsciiEmoji"`
				DesktopNotificationDuration           int           `json:"desktopNotificationDuration"`
				DesktopNotificationRequireInteraction bool          `json:"desktopNotificationRequireInteraction"`
				DesktopNotifications                  string        `json:"desktopNotifications"`
				DontAskAgainList                      []interface{} `json:"dontAskAgainList"`
				EmailNotificationMode                 string        `json:"emailNotificationMode"`
				EnableAutoAway                        bool          `json:"enableAutoAway"`
				HideAvatars                           bool          `json:"hideAvatars"`
				HideFlexTab                           bool          `json:"hideFlexTab"`
				HideRoles                             bool          `json:"hideRoles"`
				HideUsernames                         bool          `json:"hideUsernames"`
				Highlights                            []interface{} `json:"highlights"`
				IdleTimeLimit                         int           `json:"idleTimeLimit"`
				Language                              string        `json:"language"`
				MessageViewMode                       int           `json:"messageViewMode"`
				MobileNotifications                   string        `json:"mobileNotifications"`
				MuteFocusedConversations              bool          `json:"muteFocusedConversations"`
				NewMessageNotification                string        `json:"newMessageNotification"`
				NewRoomNotification                   string        `json:"newRoomNotification"`
				NotificationsSoundVolume              int           `json:"notificationsSoundVolume"`
				SaveMobileBandwidth                   bool          `json:"saveMobileBandwidth"`
				SendOnEnter                           string        `json:"sendOnEnter"`
				SidebarHideAvatar                     bool          `json:"sidebarHideAvatar"`
				SidebarShowDiscussion                 bool          `json:"sidebarShowDiscussion"`
				UnreadAlert                           bool          `json:"unreadAlert"`
				UseEmojis                             bool          `json:"useEmojis"`
			} `json:"preferences"`
		} `json:"settings"`
		Language      string `json:"language"`
		StatusText    string `json:"statusText"`
		StatusDefault string `json:"statusDefault"`
	} `json:"userData"`
	ID         string `json:"_id"`
	ExportPath string `json:"exportPath"`
	AssetsPath string `json:"assetsPath"`
}

type FileIM

type FileIM struct {
	ID          string    `json:"_id"`
	Name        string    `json:"name"`
	Size        int       `json:"size"`
	Type        string    `json:"type"`
	RoomId      string    `json:"rid"`
	Description string    `json:"description"`
	Store       string    `json:"store"`
	Complete    bool      `json:"complete"`
	Uploading   bool      `json:"uploading"`
	Extension   string    `json:"extension"`
	Progress    int       `json:"progress"`
	User        User      `json:"user"`
	UpdatedAt   time.Time `json:"_updatedAt"`
	InstanceID  string    `json:"instanceId"`
	Etag        string    `json:"etag"`
	Path        string    `json:"path"`
	Token       string    `json:"token"`
	UploadedAt  time.Time `json:"uploadedAt"`
	URL         string    `json:"url"`
}

type ForgotPassword

type ForgotPassword struct {
	Email string `json:"email"`
}

type GeneratePersonalAccessToken

type GeneratePersonalAccessToken struct {
	TokenName       string `json:"tokenName"`
	BypassTwoFactor bool   `json:"bypassTwoFactor,omitempty"`
}

type GroupAddAllRequest

type GroupAddAllRequest struct {
	RoomID          string `json:"roomId"`
	ActiveUsersOnly bool   `json:"activeUsersOnly"`
}

type GroupAddLeaderRequest

type GroupAddLeaderRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type GroupAddModeratorRequest

type GroupAddModeratorRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type GroupAddOwnerRequest

type GroupAddOwnerRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type GroupAnnouncementRequest

type GroupAnnouncementRequest struct {
	RoomID       string `json:"roomId"`
	Announcement string `json:"announcement"`
}

type GroupArchiveRequest

type GroupArchiveRequest struct {
	RoomID string `json:"roomId"`
}

type GroupCloseRequest

type GroupCloseRequest struct {
	RoomID string `json:"roomId"`
}

type GroupCustomFieldsRequest

type GroupCustomFieldsRequest struct {
	RoomID       string `json:"roomId"`
	RoomName     string `json:"roomName"`
	CustomFields struct {
		Organization string `json:"organization"`
	} `json:"customFields"`
}

type GroupDeleteRequest

type GroupDeleteRequest struct {
	RoomID   string `json:"roomId"`
	RoomName string `json:"roomName"`
}

type GroupDescriptionRequest

type GroupDescriptionRequest struct {
	RoomID      string `json:"roomId"`
	Description string `json:"description"`
}

type GroupInviteRequest

type GroupInviteRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type GroupKickRequest

type GroupKickRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type GroupLeaveRequest

type GroupLeaveRequest struct {
	RoomID string `json:"roomId"`
}

type GroupList

type GroupList struct {
	Groups []struct {
		ID         string `json:"_id"`
		Name       string `json:"name"`
		Fname      string `json:"fname"`
		T          string `json:"t"`
		Msgs       int    `json:"msgs"`
		UsersCount int    `json:"usersCount"`
		U          struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
		} `json:"u"`
		CustomFields struct {
		} `json:"customFields"`
		Ts        time.Time `json:"ts"`
		Ro        bool      `json:"ro"`
		Default   bool      `json:"default"`
		SysMes    bool      `json:"sysMes"`
		UpdatedAt time.Time `json:"_updatedAt"`
	} `json:"groups"`
}

type GroupOpenRequest

type GroupOpenRequest struct {
	RoomID string `json:"roomId"`
}

type GroupReadOnlyRequest

type GroupReadOnlyRequest struct {
	RoomID   string `json:"roomId"`
	ReadOnly bool   `json:"readOnly"`
}

type GroupRemoveLeaderRequest

type GroupRemoveLeaderRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type GroupRemoveModeratorRequest

type GroupRemoveModeratorRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type GroupRemoveOwnerRequest

type GroupRemoveOwnerRequest struct {
	RoomID string `json:"roomId"`
	UserID string `json:"userId"`
}

type GroupRenameRequest

type GroupRenameRequest struct {
	RoomID string `json:"roomId"`
	Name   string `json:"name"`
}

type GroupTopicRequest

type GroupTopicRequest struct {
	RoomID string `json:"roomId"`
	Topic  string `json:"topic"`
}

type GroupTypeRequest

type GroupTypeRequest struct {
	RoomID string `json:"roomId"`
	Type   string `json:"type"`
}

type GroupUnArchiveRequest

type GroupUnArchiveRequest struct {
	RoomID string `json:"roomId"`
}

type Guest

type Guest struct {
	GuestID  string `json:"_id"`
	Username string `json:"username"`
	Token    string `json:"token"`
	Name     string `json:"name"`
}

type Info

type Info struct {
	Version string `json:"version"`

	Build struct {
		NodeVersion string `json:"nodeVersion"`
		Arch        string `json:"arch"`
		Platform    string `json:"platform"`
		Cpus        int    `json:"cpus"`
	} `json:"build"`

	Commit struct {
		Hash    string `json:"hash"`
		Date    string `json:"date"`
		Author  string `json:"author"`
		Subject string `json:"subject"`
		Tag     string `json:"tag"`
		Branch  string `json:"branch"`
	} `json:"commit"`
}

type Inquiry

type Inquiry struct {
	ID      string    `json:"_id"`
	Rid     string    `json:"rid"`
	Message string    `json:"message"`
	Name    string    `json:"name"`
	Ts      time.Time `json:"ts"`
	Agents  []string  `json:"agents"`
	Status  string    `json:"status"`
	V       struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
		Token    string `json:"token"`
		Status   string `json:"status"`
	} `json:"v"`
	T         string    `json:"t"`
	UpdatedAt time.Time `json:"_updatedAt"`
}

type Integration

type Integration struct {
	ID        string    `json:"_id"`
	CreatedAt time.Time `json:"_createdAt"`
	CreatedBy CreatedBy `json:"_createdBy"`
	UpdatedAt time.Time `json:"_updatedAt"`
	CreateIntegration
	ImpersonateUser bool        `json:"impersonateUser"`
	ScriptCompiled  string      `json:"scriptCompiled"`
	ScriptError     interface{} `json:"scriptError"`
	UserId          string      `json:"userId"`
}

type IntegrationData

type IntegrationData struct {
	Token       string    `json:"token"`
	Bot         bool      `json:"bot"`
	TimeStamp   time.Time `json:"timestamp"`
	ChannelId   string    `json:"channel_id"`
	ChannelName string    `json:"channel_name"`
	UserId      string    `json:"user_id"`
	UserName    string    `json:"user_name"`
	User        User
}

type IntegrationHistory

type IntegrationHistory struct {
	PartIntegrationHistory
	Event           string    `json:"event"`
	CreateAt        time.Time `json:"_createdAt"`
	UpdateAt        time.Time `json:"_updatedAt"`
	IntegrationData `json:"data"`
	IntegrationRoom `json:"room"`
	Url             string `json:"url"`
}

type IntegrationRoom

type IntegrationRoom struct {
	ID          string        `json:"_id"`
	TimeStamp   time.Time     `json:"ts"`
	T           string        `json:"t"`
	Name        string        `json:"name"`
	Usernames   []interface{} `json:"usernames"`
	Msgs        int           `json:"msgs"`
	UsersCount  int           `json:"usersCount"`
	Default     bool          `json:"default"`
	UpdatedAt   time.Time     `json:"_updatedAt"`
	LastMessage struct {
		ID          string        `json:"_id"`
		Alias       string        `json:"alias"`
		Msg         string        `json:"msg"`
		Attachments []interface{} `json:"attachments"`
		ParseUrls   bool          `json:"parseUrls"`
		Groupable   bool          `json:"groupable"`
		Ts          time.Time     `json:"ts"`
		U           struct {
			ID       string `json:"_id"`
			Username string `json:"username"`
			Name     string `json:"name"`
		} `json:"u"`
		Rid       string        `json:"rid"`
		UpdatedAt time.Time     `json:"_updatedAt"`
		Mentions  []interface{} `json:"mentions"`
		Channels  []interface{} `json:"channels"`
	} `json:"lastMessage"`
	Lm           time.Time `json:"lm"`
	JitsiTimeout time.Time `json:"jitsiTimeout"`
}

type IntegrationSetting

type IntegrationSetting struct {
	ID                  string    `json:"_id"`
	UpdatedAt           time.Time `json:"_updatedAt"`
	Autocomplete        bool      `json:"autocomplete"`
	Blocked             bool      `json:"blocked"`
	CreatedAt           time.Time `json:"createdAt"`
	Group               string    `json:"group"`
	Hidden              bool      `json:"hidden"`
	I18NDescription     string    `json:"i18nDescription"`
	I18NLabel           string    `json:"i18nLabel"`
	PackageValue        string    `json:"packageValue"`
	Secret              bool      `json:"secret"`
	Section             string    `json:"section"`
	Sorter              int       `json:"sorter"`
	Ts                  time.Time `json:"ts"`
	Type                string    `json:"type"`
	Value               string    `json:"value"`
	ValueSource         string    `json:"valueSource"`
	MeteorSettingsValue string    `json:"meteorSettingsValue"`
}

type Invite

type Invite struct {
	ID        string    `json:"_id"`
	Days      int       `json:"days"`
	MaxUses   int       `json:"maxUses"`
	Rid       string    `json:"rid"`
	UserID    string    `json:"userId"`
	CreatedAt time.Time `json:"createdAt"`
	Expires   time.Time `json:"expires"`
	UpdatedAt time.Time `json:"_updatedAt"`
	Uses      int       `json:"uses"`
	URL       string    `json:"url"`
}

type ListIM

type ListIM struct {
	ID        string    `json:"_id"`
	UpdatedAt time.Time `json:"_updatedAt"`
	Type      string    `json:"t"`
	Msgs      int       `json:"msgs"`
	Ts        time.Time `json:"ts"`
	Lm        time.Time `json:"lm"`
	Topic     string    `json:"topic"`
}

type LiveChatConfig

type LiveChatConfig struct {
	Enabled  bool `json:"enabled"`
	Settings struct {
		RegistrationForm                 bool   `json:"registrationForm"`
		AllowSwitchingDepartments        bool   `json:"allowSwitchingDepartments"`
		NameFieldRegistrationForm        bool   `json:"nameFieldRegistrationForm"`
		EmailFieldRegistrationForm       bool   `json:"emailFieldRegistrationForm"`
		DisplayOfflineForm               bool   `json:"displayOfflineForm"`
		VideoCall                        bool   `json:"videoCall"`
		FileUpload                       bool   `json:"fileUpload"`
		Language                         string `json:"language"`
		Transcript                       bool   `json:"transcript"`
		HistoryMonitorType               string `json:"historyMonitorType"`
		ForceAcceptDataProcessingConsent bool   `json:"forceAcceptDataProcessingConsent"`
		ShowConnecting                   bool   `json:"showConnecting"`
		AgentHiddenInfo                  bool   `json:"agentHiddenInfo"`
	} `json:"settings"`
	Theme struct {
		Title        string `json:"title"`
		Color        string `json:"color"`
		OfflineTitle string `json:"offlineTitle"`
		OfflineColor string `json:"offlineColor"`
		ActionLinks  []struct {
			Icon      string `json:"icon"`
			I18NLabel string `json:"i18nLabel"`
			MethodID  string `json:"method_id"`
			Params    string `json:"params"`
		} `json:"actionLinks"`
	} `json:"theme"`
	Messages struct {
		OfflineMessage              string `json:"offlineMessage"`
		OfflineSuccessMessage       string `json:"offlineSuccessMessage"`
		OfflineUnavailableMessage   string `json:"offlineUnavailableMessage"`
		ConversationFinishedMessage string `json:"conversationFinishedMessage"`
		ConversationFinishedText    string `json:"conversationFinishedText"`
		TranscriptMessage           string `json:"transcriptMessage"`
		RegistrationFormMessage     string `json:"registrationFormMessage"`
		DataProcessingConsentText   string `json:"dataProcessingConsentText"`
	} `json:"messages"`
	Survey struct {
		Items  []string `json:"items"`
		Values []string `json:"values"`
	} `json:"survey"`
	Triggers []struct {
		ID      string `json:"_id"`
		Actions []struct {
			Name   string `json:"name"`
			Params struct {
				Sender string `json:"sender"`
				Msg    string `json:"msg"`
			} `json:"params"`
		} `json:"actions"`
		Conditions []struct {
			Name  string `json:"name"`
			Value string `json:"value"`
		} `json:"conditions"`
		RunOnce bool `json:"runOnce"`
	} `json:"triggers"`
	Departments []struct {
		ID                 string `json:"_id"`
		Name               string `json:"name"`
		ShowOnRegistration bool   `json:"showOnRegistration"`
		ShowOnOfflineForm  bool   `json:"showOnOfflineForm"`
	} `json:"departments"`
	Resources struct {
		Sound  string        `json:"sound"`
		Emojis []interface{} `json:"emojis"`
	} `json:"resources"`
	Online bool `json:"online"`
	Guest  struct {
		ID            string `json:"_id"`
		Username      string `json:"username"`
		Name          string `json:"name"`
		Token         string `json:"token"`
		VisitorEmails []struct {
			Address string `json:"address"`
		} `json:"visitorEmails"`
	} `json:"guest"`
	Room struct {
		ID       string `json:"_id"`
		Open     bool   `json:"open"`
		ServedBy struct {
			ID       string    `json:"_id"`
			Username string    `json:"username"`
			Ts       time.Time `json:"ts"`
		} `json:"servedBy"`
	} `json:"room"`
	Agent struct {
		ID       string `json:"_id"`
		Name     string `json:"name"`
		Username string `json:"username"`
		Status   string `json:"status"`
	} `json:"agent"`
	CustomFields []interface{} `json:"customFields"`
}

type LiveChatHistory

type LiveChatHistory struct {
	ID         string    `json:"_id"`
	Msgs       int       `json:"msgs"`
	UsersCount int       `json:"usersCount"`
	Lm         time.Time `json:"lm"`
	Fname      string    `json:"fname"`
	T          string    `json:"t"`
	Ts         time.Time `json:"ts"`
	V          struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
		Token    string `json:"token"`
		Status   string `json:"status"`
	} `json:"v"`
	Cl              bool      `json:"cl"`
	Open            bool      `json:"open"`
	WaitingResponse bool      `json:"waitingResponse"`
	UpdatedAt       time.Time `json:"_updatedAt"`
	ServedBy        struct {
		ID       string    `json:"_id"`
		Username string    `json:"username"`
		Ts       time.Time `json:"ts"`
	} `json:"servedBy"`
}

type LiveChatMessage

type LiveChatMessage struct {
	OfflineMessage              string `json:"offlineMessage"`
	OfflineSuccessMessage       string `json:"offlineSuccessMessage"`
	OfflineUnavailableMessage   string `json:"offlineUnavailableMessage"`
	ConversationFinishedMessage string `json:"conversationFinishedMessage"`
	TranscriptMessage           string `json:"transcriptMessage"`
}

type LiveChatOfficeHour

type LiveChatOfficeHour struct {
	ID        string    `json:"_id"`
	Day       string    `json:"day"`
	Start     string    `json:"start"`
	Finish    string    `json:"finish"`
	Code      int       `json:"code"`
	Open      bool      `json:"open"`
	UpdatedAt time.Time `json:"_updatedAt"`
}

type LiveChatPage

type LiveChatPage struct {
	ID  string    `json:"_id"`
	T   string    `json:"t"`
	Rid string    `json:"rid"`
	Ts  time.Time `json:"ts"`
	Msg string    `json:"msg"`
	U   struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
	} `json:"u"`
	Groupable  bool `json:"groupable"`
	Navigation struct {
		Page struct {
			Change   string `json:"change"`
			Title    string `json:"title"`
			Location struct {
				Href string `json:"href"`
			} `json:"location"`
		} `json:"page"`
		Token string `json:"token"`
	} `json:"navigation"`
	Hidden    bool      `json:"_hidden"`
	UpdatedAt time.Time `json:"_updatedAt"`
}

type LiveChatRoom

type LiveChatRoom struct {
	ID         string    `json:"_id"`
	Msgs       int       `json:"msgs"`
	UsersCount int       `json:"usersCount"`
	Lm         time.Time `json:"lm"`
	Fname      string    `json:"fname"`
	T          string    `json:"t"`
	Ts         time.Time `json:"ts"`
	V          struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
		Token    string `json:"token"`
		Status   string `json:"status"`
	} `json:"v"`
	Cl              bool      `json:"cl"`
	Open            bool      `json:"open"`
	WaitingResponse bool      `json:"waitingResponse"`
	UpdatedAt       time.Time `json:"_updatedAt"`
	ServedBy        struct {
		ID       string    `json:"_id"`
		Username string    `json:"username"`
		Ts       time.Time `json:"ts"`
	}
}

type LiveChatRoomTransfer

type LiveChatRoomTransfer struct {
	RoomID   string `json:"_id"`
	ServedBy struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
	} `json:"servedBy"`
	Open bool `json:"open"`
}

type LiveChatTrigger

type LiveChatTrigger struct {
	ID          string `json:"_id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Enabled     bool   `json:"enabled"`
	RunOnce     bool   `json:"runOnce"`
	Conditions  []struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `json:"conditions"`
	Actions []struct {
		Name   string `json:"name"`
		Params struct {
			Sender string `json:"sender"`
			Msg    string `json:"msg"`
		} `json:"params"`
	} `json:"actions"`
	UpdatedAt time.Time `json:"_updatedAt"`
}

type LiveChatUser

type LiveChatUser struct {
	ID       string `json:"_id"`
	Username string `json:"username"`
}

type LiveChatUsers

type LiveChatUsers struct {
	ID       string `json:"_id"`
	UserName string `json:"username"`
}

type LiveChatVisitor

type LiveChatVisitor struct {
	ID        string    `json:"_id"`
	Username  string    `json:"username"`
	UpdatedAt time.Time `json:"_updatedAt"`
	Token     string    `json:"token"`
	Phone     []struct {
		PhoneNumber string `json:"phoneNumber"`
	} `json:"phone"`
	VisitorEmails []struct {
		Address string `json:"address"`
	} `json:"visitorEmails"`
	Name         string `json:"name"`
	LivechatData struct {
		Address string `json:"address"`
	} `json:"livechatData"`
}

type Me

type Me struct {
	ID     string `json:"_id"`
	Name   string `json:"name"`
	Emails []struct {
		Address  string `json:"address"`
		Verified bool   `json:"verified"`
	} `json:"emails"`
	Status           string   `json:"status"`
	StatusConnection string   `json:"statusConnection"`
	Username         string   `json:"username"`
	UtcOffset        int      `json:"utcOffset"`
	Active           bool     `json:"active"`
	Roles            []string `json:"roles"`
	Settings         struct {
		Preferences struct {
			EnableAutoAway              bool   `json:"enableAutoAway"`
			IdleTimeoutLimit            int    `json:"idleTimeoutLimit"`
			DesktopNotificationDuration int    `json:"desktopNotificationDuration"`
			AudioNotifications          string `json:"audioNotifications"`
			DesktopNotifications        string `json:"desktopNotifications"`
			MobileNotifications         string `json:"mobileNotifications"`
			UnreadAlert                 bool   `json:"unreadAlert"`
			UseEmojis                   bool   `json:"useEmojis"`
			ConvertASCIIEmoji           bool   `json:"convertAsciiEmoji"`
			AutoImageLoad               bool   `json:"autoImageLoad"`
			SaveMobileBandwidth         bool   `json:"saveMobileBandwidth"`
			CollapseMediaByDefault      bool   `json:"collapseMediaByDefault"`
			HideUsernames               bool   `json:"hideUsernames"`
			HideRoles                   bool   `json:"hideRoles"`
			HideFlexTab                 bool   `json:"hideFlexTab"`
			HideAvatars                 bool   `json:"hideAvatars"`
			RoomsListExhibitionMode     string `json:"roomsListExhibitionMode"`
			SidebarViewMode             string `json:"sidebarViewMode"`
			SidebarHideAvatar           bool   `json:"sidebarHideAvatar"`
			SidebarShowUnread           bool   `json:"sidebarShowUnread"`
			SidebarShowFavorites        bool   `json:"sidebarShowFavorites"`
			SendOnEnter                 string `json:"sendOnEnter"`
			MessageViewMode             int    `json:"messageViewMode"`
			EmailNotificationMode       string `json:"emailNotificationMode"`
			RoomCounterSidebar          bool   `json:"roomCounterSidebar"`
			NewRoomNotification         string `json:"newRoomNotification"`
			NewMessageNotification      string `json:"newMessageNotification"`
			MuteFocusedConversations    bool   `json:"muteFocusedConversations"`
			NotificationsSoundVolume    int    `json:"notificationsSoundVolume"`
		} `json:"preferences"`
	} `json:"settings"`
	CustomFields struct {
		Twitter  string `json:"twitter"`
		Google   string `json:"google"`
		Facebook string `json:"facebook"`
	} `json:"customFields" omitempty`
	AvatarURL string `json:"avatarUrl"`
}

type MemberIM

type MemberIM struct {
	ID        string `json:"_id"`
	Status    string `json:"status"`
	Name      string `json:"name"`
	UtcOffset int    `json:"utcOffset"`
	Username  string `json:"username"`
}

type Message

type Message struct {
	ID       string `json:"_id"`
	RoomID   string `json:"rid"`
	Msg      string `json:"msg"`
	EditedBy string `json:"editedBy,omitempty"`

	Groupable bool `json:"groupable,omitempty"`

	EditedAt  *time.Time `json:"editedAt,omitempty"`
	Timestamp *time.Time `json:"ts,omitempty"`
	UpdatedAt *time.Time `json:"_updatedAt,omitempty"`

	Mentions []User `json:"mentions,omitempty"`
	User     *User  `json:"u,omitempty"`
	PostMessage
}

type MessageProcessingType

type MessageProcessingType string
const (
	ProcessingTypeSendMessage        MessageProcessingType = "sendMessage"
	ProcessingTypeRespondWithMessage MessageProcessingType = "respondWithMessage"
)

type Notifications

type Notifications struct {
	DesktopNotifications        string `json:"desktopNotifications,omitempty"`
	DisableNotifications        string `json:"disableNotifications,omitempty"`
	EmailNotifications          string `json:"emailNotifications,omitempty"`
	AudioNotificationValue      string `json:"audioNotificationValue,omitempty"`
	DesktopNotificationDuration string `json:"desktopNotificationDuration,omitempty"`
	AudioNotifications          string `json:"audioNotifications,omitempty"`
	UnreadAlert                 string `json:"unreadAlert,omitempty"`
	HideUnreadStatus            string `json:"hideUnreadStatus,omitempty"`
	MobilePushNotifications     string `json:"mobilePushNotifications,omitempty"`
}

type OauthApp

type OauthApp struct {
	ID           string    `json:"_id"`
	Name         string    `json:"name"`
	Active       bool      `json:"active"`
	ClientID     string    `json:"clientId"`
	ClientSecret string    `json:"clientSecret"`
	RedirectURI  string    `json:"redirectUri"`
	CreatedAt    time.Time `json:"_createdAt"`
	CreatedBy    struct {
		ID       string `json:"_id"`
		Username string `json:"username"`
	} `json:"_createdBy"`
	UpdatedAt time.Time `json:"_updatedAt"`
}

type OnlineChannel

type OnlineChannel struct {
	ID       string `json:"_id"`
	Username string `json:"username"`
}

type Pagination

type Pagination struct {
	Count  int `json:"count"`
	Offset int `json:"offset"`
	Total  int `json:"total"`
}

type PartIntegrationHistory

type PartIntegrationHistory struct {
	ID   string `json:"_id"`
	Type string `json:"type"`
	Step string `json:"step"`
	Integration
}

type Permission

type Permission struct {
	ID        string   `json:"_id"`
	UpdatedAt string   `json:"_updatedAt.$date"`
	Roles     []string `json:"roles"`
}

type PostMessage

type PostMessage struct {
	RoomID      string       `json:"roomId,omitempty"`
	Channel     string       `json:"channel,omitempty"`
	Text        string       `json:"text,omitempty"`
	ParseUrls   bool         `json:"parseUrls,omitempty"`
	Alias       string       `json:"alias,omitempty"`
	Emoji       string       `json:"emoji,omitempty"`
	Avatar      string       `json:"avatar,omitempty"`
	Attachments []Attachment `json:"attachments,omitempty"`
}

PostMessage Payload for postmessage rest API

https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage/

type Preferences

type Preferences struct {
	AutoImageLoad                         bool          `json:"autoImageLoad"`
	CollapseMediaByDefault                bool          `json:"collapseMediaByDefault"`
	ConvertASCIIEmoji                     bool          `json:"convertAsciiEmoji"`
	DesktopNotificationDuration           int           `json:"desktopNotificationDuration"`
	DesktopNotificationRequireInteraction bool          `json:"desktopNotificationRequireInteraction"`
	DesktopNotifications                  string        `json:"desktopNotifications"`
	DontAskAgainList                      []interface{} `json:"dontAskAgainList"`
	EmailNotificationMode                 string        `json:"emailNotificationMode"`
	EnableAutoAway                        bool          `json:"enableAutoAway"`
	HideAvatars                           bool          `json:"hideAvatars"`
	HideFlexTab                           bool          `json:"hideFlexTab"`
	HideRoles                             bool          `json:"hideRoles"`
	HideUsernames                         bool          `json:"hideUsernames"`
	Highlights                            []interface{} `json:"highlights"`
	IdleTimeLimit                         int           `json:"idleTimeLimit"`
	Language                              string        `json:"language"`
	MessageViewMode                       int           `json:"messageViewMode"`
	MobileNotifications                   string        `json:"mobileNotifications"`
	MuteFocusedConversations              bool          `json:"muteFocusedConversations"`
	NewMessageNotification                string        `json:"newMessageNotification"`
	NewRoomNotification                   string        `json:"newRoomNotification"`
	NotificationsSoundVolume              int           `json:"notificationsSoundVolume"`
	SaveMobileBandwidth                   bool          `json:"saveMobileBandwidth"`
	SendOnEnter                           string        `json:"sendOnEnter"`
	SidebarHideAvatar                     bool          `json:"sidebarHideAvatar"`
	SidebarShowDiscussion                 bool          `json:"sidebarShowDiscussion"`
	UnreadAlert                           bool          `json:"unreadAlert"`
	UseEmojis                             bool          `json:"useEmojis"`
}

type Read

type Read struct {
	Rid string `json:"rid"`
}

type RegisterUserRequest

type RegisterUserRequest struct {
	Name      string `json:"name"`
	Email     string `json:"email"`
	Password  string `json:"pass"`
	Username  string `json:"username"`
	SecretURL string `json:"secretURL"`
}

type Role

type Role struct {
	Name        string `json:"name"`
	Scope       string `json:"scopep,omitempty" gorm:"default:'Users'"`
	Description string `json:"description,omitempty"`
}

type Roles

type Roles struct {
	ID           string `json:"_id"`
	Description  string `json:"description"`
	Mandatory2Fa bool   `json:"mandatory2fa"`
	Protected    bool   `json:"protected"`
	Scope        string `json:"scope"`
}

type Room

type Room struct {
	ID         string        `json:"_id"`
	Ts         time.Time     `json:"ts"`
	T          string        `json:"t"`
	Name       string        `json:"name"`
	Usernames  []interface{} `json:"usernames"`
	Msgs       int           `json:"msgs"`
	UsersCount int           `json:"usersCount"`
	Default    bool          `json:"default"`
	Favorite   bool          `json:"favorite"`
	UpdatedAt  time.Time     `json:"_updatedAt"`
	Lm         time.Time     `json:"lm"`
}

type RoomCleanHistoryRequest

type RoomCleanHistoryRequest struct {
	RoomID        string    `json:"roomId"`
	Latest        time.Time `json:"latest"`
	Oldest        time.Time `json:"oldest"`
	Inclusive     bool      `json:"inclusive"`
	ExcludePinned bool      `json:"excludePinned"`
	FilesOnly     bool      `json:"filesOnly"`
	Users         []string  `json:"users"`
}

type SetActiveStatus

type SetActiveStatus struct {
	ActiveStatus bool   `json:"activeStatus"`
	UserID       string `json:"userId"`
}

type SetPreferrences

type SetPreferrences struct {
	UserID string `json:"userId"`
	Data   struct {
		AutoImageLoad                         bool          `json:"autoImageLoad"`
		CollapseMediaByDefault                bool          `json:"collapseMediaByDefault"`
		ConvertASCIIEmoji                     bool          `json:"convertAsciiEmoji"`
		DesktopNotificationDuration           int           `json:"desktopNotificationDuration"`
		DesktopNotificationRequireInteraction bool          `json:"desktopNotificationRequireInteraction"`
		DesktopNotifications                  string        `json:"desktopNotifications"`
		EmailNotificationMode                 string        `json:"emailNotificationMode"`
		EnableAutoAway                        bool          `json:"enableAutoAway"`
		GroupByType                           bool          `json:"groupByType"`
		HideAvatars                           bool          `json:"hideAvatars"`
		HideRoles                             bool          `json:"hideRoles"`
		HideUsernames                         bool          `json:"hideUsernames"`
		Highlights                            []interface{} `json:"highlights,omitempty"`
		Language                              string        `json:"language"`
		MobileNotifications                   string        `json:"mobileNotifications"`
		MuteFocusedConversations              bool          `json:"muteFocusedConversations"`
		NewMessageNotification                string        `json:"newMessageNotification"`
		NewRoomNotification                   string        `json:"newRoomNotification"`
		NotificationsSoundVolume              int           `json:"notificationsSoundVolume"`
		RoomsListExhibitionMode               string        `json:"roomsListExhibitionMode"`
		SaveMobileBandwidth                   bool          `json:"saveMobileBandwidth"`
		RoomCounterSidebar                    bool          `json:"roomCounterSidebar"`
		SendOnEnter                           string        `json:"sendOnEnter"`
		SidebarHideAvatar                     bool          `json:"sidebarHideAvatar"`
		SidebarShowDiscussion                 bool          `json:"sidebarShowDiscussion"`
		SidebarSortby                         string        `json:"sidebarSortby"`
		SidebarViewMode                       string        `json:"sidebarViewMode"`
		SidebarShowFavorites                  bool          `json:"sidebarShowFavorites"`
		UnreadAlert                           bool          `json:"unreadAlert"`
		ViewMode                              int           `json:"viewMode"`
		UseEmojis                             bool          `json:"useEmojis"`
	} `json:"data,omitempty"`
}

type SetStatus

type SetStatus struct {
	Message string `json:"message,omitempty"`
	Status  string `json:"status,omitempty"`
}

type Setting

type Setting struct {
	ID           string  `json:"_id"`
	Blocked      bool    `json:"blocked"`
	Group        string  `json:"group"`
	Hidden       bool    `json:"hidden"`
	Public       bool    `json:"public"`
	Type         string  `json:"type"`
	PackageValue string  `json:"packageValue"`
	Sorter       int     `json:"sorter"`
	Value        string  `json:"value"`
	ValueBool    bool    `json:"valueBool"`
	ValueInt     float64 `json:"valueInt"`
	ValueSource  string  `json:"valueSource"`
	ValueAsset   Asset   `json:"asset"`
}

type Settings

type Settings struct {
	RegistrationForm           bool   `json:"registrationForm"`
	AllowSwitchingDepartments  bool   `json:"allowSwitchingDepartments"`
	NameFieldRegistrationForm  bool   `json:"nameFieldRegistrationForm"`
	EmailFieldRegistrationForm bool   `json:"emailFieldRegistrationForm"`
	DisplayOfflineForm         bool   `json:"displayOfflineForm"`
	VideoCall                  bool   `json:"videoCall"`
	FileUpload                 bool   `json:"fileUpload"`
	Language                   string `json:"language"`
	Transcript                 bool   `json:"transcript"`
	HistoryMonitorType         string `json:"historyMonitorType"`
}

type SettingsMessage

type SettingsMessage struct {
	ID    string `json:"_id"`
	Value bool   `json:"value"`
}

type SettingsOauth

type SettingsOauth struct {
	ID                   string `json:"_id"`
	Name                 string `json:"name"`
	Service              string `json:"service"`
	ClientID             string `json:"clientId"`
	Custom               bool   `json:"custom"`
	ServerURL            string `json:"serverURL"`
	TokenPath            string `json:"tokenPath"`
	IdentityPath         string `json:"identityPath"`
	AuthorizePath        string `json:"authorizePath"`
	Scope                string `json:"scope"`
	ButtonLabelText      string `json:"buttonLabelText"`
	ButtonLabelColor     string `json:"buttonLabelColor"`
	LoginStyle           string `json:"loginStyle"`
	ButtonColor          string `json:"buttonColor"`
	TokenSentVia         string `json:"tokenSentVia"`
	IdentityTokenSentVia string `json:"identityTokenSentVia"`
	UsernameField        string `json:"usernameField"`
	MergeUsers           bool   `json:"mergeUsers"`
}

type SettingsPrivate

type SettingsPrivate struct {
	ID    string `json:"_id"`
	Value bool   `json:"value"`
}

type SettingsUpdate

type SettingsUpdate struct {
	ID      string `json:"_id"`
	Value   bool   `json:"value"`
	Color   string `json:"color"`
	Editor  bool   `json:"editor"`
	Execute bool   `json:"execute"`
}

type Sound

type Sound struct {
	ID        string    `json:"_id"`
	Name      string    `json:"name"`
	Extension string    `json:"extension"`
	UpdatedAt time.Time `json:"_updatedAt"`
}

type Spotlight

type Spotlight struct {
	Users []User    `json:"users"`
	Rooms []Channel `json:"rooms"`
}

type Statistics

type Statistics struct {
	ID       string `json:"_id"`
	UniqueID string `json:"uniqueId"`
	Version  string `json:"version"`

	ActiveUsers    int `json:"activeUsers"`
	NonActiveUsers int `json:"nonActiveUsers"`
	OnlineUsers    int `json:"onlineUsers"`
	AwayUsers      int `json:"awayUsers"`
	OfflineUsers   int `json:"offlineUsers"`
	TotalUsers     int `json:"totalUsers"`

	TotalRooms                int `json:"totalRooms"`
	TotalChannels             int `json:"totalChannels"`
	TotalPrivateGroups        int `json:"totalPrivateGroups"`
	TotalDirect               int `json:"totalDirect"`
	TotlalLivechat            int `json:"totlalLivechat"`
	TotalMessages             int `json:"totalMessages"`
	TotalChannelMessages      int `json:"totalChannelMessages"`
	TotalPrivateGroupMessages int `json:"totalPrivateGroupMessages"`
	TotalDirectMessages       int `json:"totalDirectMessages"`
	TotalLivechatMessages     int `json:"totalLivechatMessages"`

	InstalledAt          time.Time `json:"installedAt"`
	LastLogin            time.Time `json:"lastLogin"`
	LastMessageSentAt    time.Time `json:"lastMessageSentAt"`
	LastSeenSubscription time.Time `json:"lastSeenSubscription"`

	Os struct {
		Type     string    `json:"type"`
		Platform string    `json:"platform"`
		Arch     string    `json:"arch"`
		Release  string    `json:"release"`
		Uptime   int       `json:"uptime"`
		Loadavg  []float64 `json:"loadavg"`
		Totalmem int64     `json:"totalmem"`
		Freemem  int       `json:"freemem"`
		Cpus     []struct {
			Model string `json:"model"`
			Speed int    `json:"speed"`
			Times struct {
				User int `json:"user"`
				Nice int `json:"nice"`
				Sys  int `json:"sys"`
				Idle int `json:"idle"`
				Irq  int `json:"irq"`
			} `json:"times"`
		} `json:"cpus"`
	} `json:"os"`

	Process struct {
		NodeVersion string  `json:"nodeVersion"`
		Pid         int     `json:"pid"`
		Uptime      float64 `json:"uptime"`
	} `json:"process"`

	Deploy struct {
		Method   string `json:"method"`
		Platform string `json:"platform"`
	} `json:"deploy"`

	Migration struct {
		ID       string    `json:"_id"`
		Version  int       `json:"version"`
		Locked   bool      `json:"locked"`
		LockedAt time.Time `json:"lockedAt"`
		BuildAt  time.Time `json:"buildAt"`
	} `json:"migration"`

	InstanceCount int       `json:"instanceCount"`
	CreatedAt     time.Time `json:"createdAt"`
	UpdatedAt     time.Time `json:"_updatedAt"`
}

type StatisticsInfo

type StatisticsInfo struct {
	Statistics Statistics `json:"statistics"`
}

type StatisticsList

type StatisticsList struct {
	Statistics []Statistics `json:"statistics"`

	Pagination
}

type Status

type Status struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`

	Status  string `json:"status"`
	Message string `json:"message"`
}

type Survey

type Survey struct {
	Items  []string `json:"items"`
	Values []string `json:"values"`
}

type Theme

type Theme struct {
	Title        string        `json:"title"`
	Color        string        `json:"color"`
	OfflineTitle string        `json:"offlineTitle"`
	OfflineColor string        `json:"offlineColor"`
	ActionLinks  []ActionLinks `json:"actionLinks"`
}

type UnRead

type UnRead struct {
	RoomId string `json:"roomId"`
}

type Update

type Update struct {
	ID                  string        `json:"_id"`
	UpdatedAt           time.Time     `json:"_updatedAt,omitempty"`
	Group               string        `json:"group,omitempty"`
	GroupPermissionID   string        `json:"groupPermissionId,omitempty"`
	Level               string        `json:"level,omitempty"`
	Roles               []interface{} `json:"roles,omitempty"`
	Section             string        `json:"section,omitempty"`
	SectionPermissionID string        `json:"sectionPermissionId,omitempty"`
	SettingID           string        `json:"settingId,omitempty"`
	Sorter              int           `json:"sorter,omitempty"`
}

type UpdateOwnBasicInfo

type UpdateOwnBasicInfo struct {
	Data struct {
		Email           string `json:"email"`
		NewPassword     string `json:"newPassword"`
		CurrentPassword string `json:"currentPassword"`
		Username        string `json:"username"`
		Name            string `json:"name"`
	} `json:"data"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	UserID string `json:"userId"`
	Data   struct {
		Name         string            `json:"name"`
		Email        string            `json:"email"`
		Password     string            `json:"password"`
		Username     string            `json:"username"`
		CustomFields map[string]string `json:"customFields,omitempty"`
	} `json:"data"`
}

type Upload

type Upload struct {
	File        string `json:"file"`
	Msg         string `json:"msg,omitempty"`
	Description string `json:"description,omitempty"`
	Tmid        string `json:"tmid,omitempty"`
}

type User

type User struct {
	ID           string `json:"_id"`
	Name         string `json:"name"`
	UserName     string `json:"username"`
	Status       string `json:"status"`
	Token        string `json:"token"`
	TokenExpires int64  `json:"tokenExpires"`
}

type UserCredentials

type UserCredentials struct {
	ID    string `json:"id"`
	Token string `json:"token"`

	Username string `json:"username"`
	Email    string `json:"email"`
	Name     string `json:"name"`
	Password string `json:"pass"`
}

type UserDeactivateIdleRequest

type UserDeactivateIdleRequest struct {
	DaysIdle int    `json:"daysIdle"`
	Role     string `json:"role"`
}

type UserDeleteOwnRequest

type UserDeleteOwnRequest struct {
	PassWord string `json:"password"`
}

type UserDeleteRequest

type UserDeleteRequest struct {
	UserID   string `json:"userId"`
	UserName string `json:"username"`
}

type UserInfo

type UserInfo struct {
	ID        string `json:"_id"`
	Name      string `json:"name"`
	Username  string `json:"username"`
	Status    string `json:"status"`
	UtcOffset int    `json:"utcOffset"`
	Active    bool   `json:"active"`
	Type      string `json:"type"`
}

type UserResetAvatarRequest

type UserResetAvatarRequest struct {
	UserId   string `json:"userId"`
	UserName string `json:"username"`
}

type UsersList

type UsersList struct {
	ID        string `json:"_id"`
	Type      string `json:"type"`
	Status    string `json:"status"`
	Active    bool   `json:"active"`
	Name      string `json:"name"`
	Utcoffset bool   `json:"utcoffset"`
	Username  string `json:"username"`
}

type VedieUpdateTimeoutRequest

type VedieUpdateTimeoutRequest struct {
	RoomID string `json:"roomId"`
}

Jump to

Keyboard shortcuts

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