new websocket events

This commit is contained in:
Akolzin Dmitry 2019-03-01 15:11:41 +03:00
parent 7eb096c538
commit 9b5d493820

View File

@ -24,19 +24,23 @@ const (
MessageScopePublic string = "public" MessageScopePublic string = "public"
MessageScopePrivate string = "private" MessageScopePrivate string = "private"
WsEventMessageNew string = "message_new" WsEventMessageNew string = "message_new"
WsEventMessageUpdated string = "message_updated" WsEventMessageUpdated string = "message_updated"
WsEventMessageDeleted string = "message_deleted" WsEventMessageDeleted string = "message_deleted"
WsEventDialogOpened string = "dialog_opened" WsEventDialogOpened string = "dialog_opened"
WsEventDialogClosed string = "dialog_closed" WsEventDialogClosed string = "dialog_closed"
WsEventDialogAssign string = "dialog_assign" WsEventDialogAssign string = "dialog_assign"
WsEventChatCreated string = "chat_created" WsEventChatCreated string = "chat_created"
WsEventChatUpdated string = "chat_updated" WsEventChatUpdated string = "chat_updated"
WsEventUserJoined string = "user_joined_chat" WsEventChatUnreadUpdated string = "chat_unread_updated"
WsEventUserLeave string = "user_left_chat" WsEventUserOnlineUpdated string = "user_online_updated"
WsEventUserUpdated string = "user_updated" WsEventUserJoined string = "user_joined_chat"
WsCustomerUpdated string = "customer_updated" WsEventUserLeave string = "user_left_chat"
WsBotUpdated string = "bot_updated" WsEventUserUpdated string = "user_updated"
WsCustomerUpdated string = "customer_updated"
WsBotUpdated string = "bot_updated"
WsEventChannelUpdated string = "channel_updated"
WsEventSettingsUpdated string = "settings_updated"
ChannelFeatureNone string = "none" ChannelFeatureNone string = "none"
ChannelFeatureReceive string = "receive" ChannelFeatureReceive string = "receive"
@ -146,7 +150,7 @@ type (
} }
MessagesRequest struct { MessagesRequest struct {
ID []int `url:"id,omitempty"` ID []int `url:"id,omitempty"`
ChatID uint64 `url:"chat_id,omitempty" json:"chat_id"` ChatID uint64 `url:"chat_id,omitempty" json:"chat_id"`
DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_id"` DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_id"`
UserID uint64 `url:"user_id,omitempty" json:"user_id"` UserID uint64 `url:"user_id,omitempty" json:"user_id"`
@ -468,6 +472,8 @@ type (
LastName string `json:"last_name,omitempty"` LastName string `json:"last_name,omitempty"`
Phone string `json:"phone,omitempty"` Phone string `json:"phone,omitempty"`
Email string `json:"email,omitempty"` Email string `json:"email,omitempty"`
IsAdmin bool `json:"is_admin"`
Available bool `json:"available"`
} }
Channel struct { Channel struct {
@ -619,4 +625,9 @@ type (
Chat *Chat `json:"chat"` Chat *Chat `json:"chat"`
User *UserRef `json:"user"` User *UserRef `json:"user"`
} }
WsEventUserOnlineUpdatedData struct {
User *UserRef
Online bool
}
) )