Documentation
¶
Index ¶
Constants ¶
View Source
const ( MESSAGE_TYPE_TICKET = "ticket" MESSAGE_TYPE_CHAT = "chat" MESSAGE_ORIGIN_TICKET = "ticket" EVENT_NEW_MESSAGE = "message.created" )
View Source
const (
TOKEN_VALIDITY_MINUTES = 60 * 3
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct {
Unsubscribed bool `json:"unsubscribed,omitempty"`
ID string `json:"id,omitempty"`
IsMe bool `json:"isMe,omitempty"`
IsGroup bool `json:"isGroup,omitempty"`
IsBroadcast bool `json:"isBroadcast,omitempty"`
Unread int `json:"unread,omitempty"`
IsSilenced bool `json:"isSilenced,omitempty"`
IsMyContact bool `json:"isMyContact,omitempty"`
HadChat bool `json:"hadChat,omitempty"`
Visible bool `json:"visible,omitempty"`
Note string `json:"note,omitempty"`
LastMessageAt time.Time `json:"lastMessageAt,omitempty"`
LastMessageID string `json:"lastMessageId,omitempty"`
AccountID string `json:"accountId,omitempty"`
ServiceID string `json:"serviceId,omitempty"`
PersonID string `json:"personId,omitempty"`
DefaultDepartmentID string `json:"defaultDepartmentId,omitempty"`
DefaultUserID time.Time `json:"defaultUserId,omitempty"`
CreatedAt time.Time `json:"createdAt,omitempty"`
UpdatedAt time.Time `json:"updatedAt,omitempty"`
DeletedAt time.Time `json:"deletedAt,omitempty"`
Status string `json:"status,omitempty"`
LastContactMessageAt time.Time `json:"lastContactMessageAt,omitempty"`
Name string `json:"name,omitempty"`
InternalName string `json:"internalName,omitempty"`
AlternativeName string `json:"alternativeName,omitempty"`
Data ContactData `json:"data,omitempty"`
LastMessage time.Time `json:"lastMessage,omitempty"`
}
func (*Contact) Phonenumber ¶ added in v0.7.1
type ContactData ¶
type ContactData struct {
Valid bool `json:"valid,omitempty"`
Number string `json:"number,omitempty"`
Unread bool `json:"unread,omitempty"`
Webchat Webchat `json:"webchat,omitempty"`
IsOriginal bool `json:"isOriginal,omitempty"`
BotIsRunning bool `json:"botIsRunning,omitempty"`
LastChargedMessage time.Time `json:"lastChargedMessage,omitempty"`
}
type Digisac ¶
type Digisac struct {
// contains filtered or unexported fields
}
func NewDigisac ¶
func (*Digisac) Autenticate ¶
type InternalData ¶
type WebHookMessage ¶
type WebHookMessage struct {
Event string `json:"event,omitempty"`
Data WebhookData `json:"data,omitempty"`
WebhookID string `json:"webhookId,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty"`
}
func (*WebHookMessage) ContactID ¶ added in v0.7.1
func (w *WebHookMessage) ContactID() string
func (*WebHookMessage) IsFromContact ¶ added in v0.7.1
func (w *WebHookMessage) IsFromContact() bool
func (*WebHookMessage) IsNewMessage ¶ added in v0.7.1
func (w *WebHookMessage) IsNewMessage() bool
func (*WebHookMessage) Text ¶ added in v0.7.2
func (w *WebHookMessage) Text() string
type WebHookMessages ¶ added in v0.10.51
type WebHookMessages struct {
Event string `json:"event,omitempty"`
Data []WebhookData `json:"data,omitempty"`
WebhookID string `json:"webhookId,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty"`
}
type WebhookData ¶
type WebhookData struct {
ID string `json:"id,omitempty"`
IsFromMe bool `json:"isFromMe,omitempty"`
Sent bool `json:"sent,omitempty"`
Type string `json:"type,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty"`
Data InternalData `json:"data,omitempty"`
Visible bool `json:"visible,omitempty"`
AccountID string `json:"accountId,omitempty"`
ContactID string `json:"contactId,omitempty"`
FromID string `json:"fromId,omitempty"`
ServiceID string `json:"serviceId,omitempty"`
ToID string `json:"toId,omitempty"`
UserID string `json:"userId,omitempty"`
TicketID string `json:"ticketId,omitempty"`
TicketUserID string `json:"ticketUserId,omitempty"`
TicketDepartmentID string `json:"ticketDepartmentId,omitempty"`
QuotedMessageID string `json:"quotedMessageId,omitempty"`
Origin string `json:"origin,omitempty"`
HsmID string `json:"hsmId,omitempty"`
Text string `json:"text,omitempty"`
Obfuscated bool `json:"obfuscated,omitempty"`
Files map[string]interface{} `json:"files,omitempty"`
QuotedMessage string `json:"quotedMessage,omitempty"`
IsFromBot bool `json:"isFromBot,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.