Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiServerEventInterface ¶
type ApiServerEventInterface interface {
ToJson() []byte
}
type ApiServerEventType ¶
type ApiServerEventType string
const ( ApiServerNewNotificationEvent ApiServerEventType = "NewNotification" ApiServerNewMessageEvent ApiServerEventType = "NewMessage" ApiServerChatAssignmentEvent ApiServerEventType = "ChatAssignment" ApiServerChatUnAssignmentEvent ApiServerEventType = "ChatUnAssignment" ApiServerErrorEvent ApiServerEventType = "Error" ApiServerReloadRequiredEvent ApiServerEventType = "ReloadRequired" ApiServerConversationClosedEvent ApiServerEventType = "ConversationClosed" ApiServerNewConversationEvent ApiServerEventType = "NewConversation" )
type BaseApiServerEvent ¶
type BaseApiServerEvent struct {
EventType ApiServerEventType `json:"eventType"`
Conversation ConversationWithAllDetails `json:"conversation"`
}
func (*BaseApiServerEvent) ToJson ¶
func (event *BaseApiServerEvent) ToJson() []byte
type ChatAssignmentEvent ¶
type ChatAssignmentEvent struct {
BaseApiServerEvent
EventType ApiServerEventType `json:"eventType"`
ChatId string `json:"chatId"`
UserId string `json:"userId"`
}
type ChatUnAssignmentEvent ¶
type ChatUnAssignmentEvent struct {
BaseApiServerEvent
EventType ApiServerEventType `json:"eventType"`
ChatId string `json:"chatId"`
UserId string `json:"userId"`
}
type ConversationWithAllDetails ¶
type ConversationWithAllDetails struct {
model.Conversation
Contact model.Contact `json:"contact"`
AssignedTo struct {
model.OrganizationMember
User model.User `json:"user"`
} `json:"assignedTo"`
WhatsappBusinessAccount struct {
model.WhatsappBusinessAccount
Organization model.Organization `json:"organization"`
} `json:"whatsappBusinessAccount"`
}
type NewMessageEvent ¶
type NewMessageEvent struct {
BaseApiServerEvent
EventType ApiServerEventType `json:"eventType"`
Message api_types.MessageSchema `json:"message"`
}
func (*NewMessageEvent) ToJson ¶
func (event *NewMessageEvent) ToJson() []byte
type NewNotificationEvent ¶
type NewNotificationEvent struct {
BaseApiServerEvent // make it inline
EventType ApiServerEventType `json:"eventType"`
Notification string `json:"notification"`
}
Click to show internal directories.
Click to hide internal directories.