-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconversation_email.go
42 lines (38 loc) · 1.89 KB
/
conversation_email.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package gcloudcx
import (
"time"
"github.com/google/uuid"
)
// ConversationEmail describes an Email (like belonging to Participant)
type ConversationEmail struct {
ID uuid.UUID `json:"id"`
State string `json:"state"` // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
Direction string `json:"direction"` // inbound,outbound
Held bool `json:"held"`
ConnectedTime time.Time `json:"connectedTime"`
DisconnectedTime time.Time `json:"disconnectedTime"`
StartAlertingTime time.Time `json:"startAlertingTime"`
StartHoldTime time.Time `json:"startHoldTime"`
Segments []Segment `json:"segments"`
Provider string `json:"provider"`
ScriptID string `json:"scriptId"`
PeerID string `json:"peerId"`
RecordingID string `json:"recordingId"`
AutoGenerated bool `json:"autoGenerated"`
Subject string `json:"subject"`
MessagesSent int `json:"messagesSent"`
MessageID string `json:"messageId"`
Spam bool `json:"spam"`
DraftAttachments []*Attachment `json:"draftAttachments"`
DisconnectType string `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
ErrorInfo ErrorBody `json:"errorInfo"`
}
// Attachment describes an Email Attachment
type Attachment struct {
AttachmentID string `json:"attachmentId"`
Name string `json:"name"`
ContentURI string `json:"contentUri"`
ContentType string `json:"contentType"`
ContentLength int64 `json:"contentLength"`
InlineImage bool `json:"inlineImage"`
}