api_server_events

package
v0.1.3-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Jump to

Keyboard shortcuts

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