models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2017 License: MIT Imports: 1 Imported by: 21

Documentation

Index

Constants

View Source
const (
	EVENT_UNOPENED          EventName = "unopened"
	EVENT_OPENED                      = "opened"
	EVENT_CLICKED                     = "clicked"
	EVENT_DOWNLOADED                  = "downloaded"
	EVENT_RECEIVED                    = "message:received"
	EVENT_VOTE                        = "poll:vote"
	EVENT_QA_SUBMIT                   = "qa:submit"
	EVENT_MEETING_CONFIRMED           = "meetinginvited:confirmed"
)
View Source
const (
	RECIPIENT_SUCCESS      = "success"
	RECIPIENT_ERROR        = "error"
	RECIPIENT_DUPLICATED   = "duplicated"
	RECIPIENT_UNSUBSCRIBED = "unsubscribed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type            string `json:"type"`
	WebhookURL      string `json:"webhookUrl,omitempty"`
	AccountSID      string `json:"accountSid,omitempty"`
	AuthToken       string `json:"authToken,omitempty"`
	FromPhoneNumber string `json:"fromPhoneNumber,omitempty"`
	PhoneNumber     string `json:"phoneNumber,omitempty"`
}

type Answer

type Answer struct {
	RecipientEmail string `json:"recipientEmail"`
	RecipientName  string `json:"recipientName"`
	Answer         string `json:"answer"`
}
type AppointmentLinks struct {
	UserId string `json:"userId,omitempty"`
	Name   string `json:"name"`
}

type Attachment

type Attachment struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Size int    `json:"size"`
}

type Availabilities

type Availabilities struct {
	Results []*Availability `json:"results,omitempty"`
	*ResultList
}

type Availability

type Availability struct {
	ID             string     `json:"_id"`
	UserId         string     `json:"userId,omitempty"`
	Location       string     `json:"location,omitempty"`
	Description    string     `json:"description,omitempty"`
	Title          string     `json:"title,omitempty"`
	Timezone       string     `json:"timezone,omitempty"`
	CalendarID     string     `json:"calendarId,omitempty"`
	CalendarName   string     `json:"calendarName,omitempty"`
	Modify         bool       `json:"guestsCanModify,omitempty"`
	Timeslots      []Timeslot `json:"timeslots,omitempty"`
	DoubleBookings bool       `json:"allowDoubleBookings,omitempty"`
	Guests         []Guest    `json:"guests,omitempty"`
}

type CRMConnect

type CRMConnect struct {
	Name  string `json:"name"`
	LogTo bool   `json:"logTo"`
}

type CodeSnippet

type CodeSnippet struct {
	ID         string `json:"_id"`
	UserId     string `json:"userId,omitempty"`
	HTML       string `json:"html,omitempty"`
	Title      string `json:"title,omitempty"`
	Background string `json:"background,omitempty"`
	Code       string `json:"code,omitempty"`
	Theme      string `json:"theme,omitempty"`
	Language   string `json:"language,omitempty"`
}

type CodeSnippetParams

type CodeSnippetParams struct {
	HTML       string `json:"html,omitempty"`
	Title      string `json:"title,omitempty"`
	Background string `json:"background,omitempty"`
	Theme      string `json:"theme,omitempty"`
	Language   string `json:"language,omitempty"`
}

type CodeSnippetResult

type CodeSnippetResult struct {
	ID string `json:"id"`
}

type CodeSnippets

type CodeSnippets struct {
	Results []*CodeSnippet `json:"results,omitempty"`
	*ResultList
}

type Command

type Command struct {
	ID                       string    `json:"_id"`
	UserID                   string    `json:"userId"`
	CreatedAt                time.Time `json:"createdAt"`
	Name                     string    `json:"name"`
	Commands                 []string  `json:"commands"`
	ParameterPlaceholder     string    `json:"parameterPlaceholder"`
	CommandResolveURL        string    `json:"commandResolveUrl"`
	CommandParameterHingsURL string    `json:"commandParameterHintsUrl"`
	Shared                   Shared    `json:"shared"`
}

type Commands

type Commands struct {
	Results []*Command `json:"results"`
	*ResultList
}

type Contact

type Contact struct {
	ID        string            `json:"_id,omitempty"`
	Name      string            `json:"name"`
	Email     string            `json:"email"`
	UserID    string            `json:"userId,omitempty"`
	ContactID string            `json:"contactID,omitempty"`
	Analytics *ContactAnalytics `json:"analytics,omitempty"`
}

type ContactAnalytics

type ContactAnalytics struct {
	Sent                      int                 `json:"sent"`
	Opened                    int                 `json:"opened"`
	Clicked                   int                 `json:"clicked"`
	Downloaded                int                 `json:"downloaded"`
	Replied                   int                 `json:"replied"`
	Delivered                 int                 `json:"delivered"`
	DeliveredWithTrackedOpens int                 `json:"deliveredWithTrackedOpens"`
	DeliveredWithTrackedLinks int                 `json:"deliveredWithTrackedLinks"`
	DeliveredWithTrackedFiles int                 `json:"deliveredWithTrackedFiles"`
	Percentages               *ContactPercentages `json:"percentages"`
}

type ContactGroup

type ContactGroup struct {
	ID      string `json:"_id"`
	UserID  string `json:"userId"`
	GroupID string `json:"groupId"`
	Name    string `json:"name"`
	Count   int    `json:"count"`
	Shared  Shared `json:"shared"`
}

type ContactGroups

type ContactGroups struct {
	Results []*ContactGroup `json:"results"`
	*ResultList
}

type ContactParams

type ContactParams struct {
	Email        string      `json:"email"`
	Name         string      `json:"name"`
	Groups       []string    `json:"groups"`
	Meta         interface{} `json:"meta"`
	ContactID    string      `json:"contactId"`
	SalseforceID string      `json:"salesforceId"`
	MarkAsUsed   bool        `json:"markAsUsed"`
	Enrich       bool        `json:"enrich"`
}

type ContactPercentages

type ContactPercentages struct {
	Opened     float64 `json:"opened"`
	Clicked    float64 `json:"clicked"`
	Downloaded float64 `json:"downloaded"`
	Replied    float64 `json:"replied"`
}

type Contacts

type Contacts struct {
	Results []*Contact `json:"results"`
	*ResultList
}

type Device

type Device struct {
	OS      string `json:"os"`
	Program string `json:"program"`
	Mobile  bool   `json:"isMobile"`
}

type Enhancement

type Enhancement struct {
	ID           string    `json:"_id"`
	UserID       string    `json:"userId"`
	CreatedAt    time.Time `json:"createdAt"`
	Name         string    `json:"name"`
	Icon         string    `json:"icon"`
	IconTooltip  string    `json:"iconTooltip"`
	EditorURL    string    `json:"editorUrl"`
	Commands     []string  `json:"commands"`
	ResolveURL   string    `json:"resolveUrl"`
	ActivateURL  string    `json:"activateUrl"`
	EditorHeight int       `json:"editorHeight"`
	EditorWidth  int       `json:"editorWidth"`
	Category     string    `json:"category"`
	Editable     bool      `json:"isEditable"`
	Shared       Shared    `json:"shared"`
}

type Enhancements

type Enhancements struct {
	Results []*Enhancement `json:"results"`
	*ResultList
}

type Event

type Event struct {
	ID             string     `json:"_id"`
	ThreadID       string     `json:"threadId"`
	Subject        string     `json:"subject"`
	Timestamp      time.Time  `json:"timestamp"`
	RecipientEmail string     `json:"recipientEmail"`
	RecipientName  string     `json:"recipientName"`
	UserID         string     `json:"userId"`
	Device         *Device    `json:"device"`
	Location       *Location  `json:"location"`
	Object         *Object    `json:"object"`
	Action         string     `json:"action"`
	Recipients     []*Contact `json:"recipients"`
}

type EventName

type EventName string

type Events

type Events struct {
	Results []*Event `json:"results"`
	*ResultList
}

type ExpandQuery

type ExpandQuery struct {
	Expand string
}

type FileRequest

type FileRequest struct {
	ID        string    `json:"_id"`
	UserID    string    `json:"userId"`
	Timestamp time.Time `json:"timestamp"`
	Uploads   []*Upload `json:"uploads"`
}

type FileRequests

type FileRequests struct {
	Results []*FileRequest `json:"results"`
	*ResultList
}

type Folder

type Folder struct {
	ID    string `json:"_id"`
	Name  string `json:"name"`
	Count int    `json:"count"`
}

type FollowUp

type FollowUp struct {
	UnparsedDate string `json:"unparsedDate"`
	Trigger      string `json:"trigger"`
	Description  string `json:"description"`
}

type Guest

type Guest struct {
	Name  string `json:"name,omitempty"`
	Email string `json:"email,omitempty"`
}

type LinkResolver

type LinkResolver struct {
	ID          string    `json:"_id"`
	UserID      string    `json:"userId"`
	CreatedAt   time.Time `json:"createdAt"`
	Description string    `json:"description"`
	ResolveURL  string    `json:"resolveUrl"`
	Regex       string    `json:"regex"`
	Order       int       `json:"order"`
}

type LinkResolvers

type LinkResolvers struct {
	Results []*LinkResolver `json:"results"`
	*ResultList
}

type Location

type Location struct {
	City    string `json:"city"`
	Region  string `json:"region"`
	Country string `json:"country"`
}

type Member

type Member struct {
	UserID     string    `json:"userId"`
	Accepted   bool      `json:"accepted,omitempty"`
	Email      string    `json:"email"`
	MemberID   string    `json:"memberId"`
	Role       Role      `json:"role"`
	CreatedAt  time.Time `json:"createdAt"`
	InvitedAt  time.Time `json:"invitedAt"`
	AcceptedAt time.Time `json:"acceptedAt"`
}

type MemberParams

type MemberParams struct {
	Email string `json:"email"`
	Role  Role   `json:"role"`
}

type Members

type Members struct {
	Results []*Member `json:"members"`
	*ResultList
}

type Message

type Message struct {
	ID            string           `json:"_id"`
	UserID        string           `json:"userId"`
	Created       time.Time        `json:"created"`
	Updated       time.Time        `json:"updated"`
	From          *Contact         `json:"from"`
	To            *Contact         `json:"to"`
	CC            []*Contact       `json:"cc"`
	BCC           []*Contact       `json:"bcc"`
	Subject       string           `json:"subject"`
	Tracking      bool             `json:"trackingEnabled"`
	LinkTracking  bool             `json:"linkTrackingEnabled"`
	Notifications bool             `json:"notificationsEnabled"`
	TeamIDs       []string         `json:"teamIds"`
	FollowUp      *FollowUp        `json:"followUp"`
	Attachments   []*Attachment    `json:"attachments"`
	SnippetIDs    []string         `json:"snippetIds"`
	Sequence      *MessageSequence `json:"sequence"`
	Body          string           `json:"body"`
	Scheduled     time.Time        `json:"scheduled"`
	Sent          time.Time        `json:"sent"`
	SendingError  string           `json:"sendingError"`
	ErrorResponse string           `json:"errorResponse"`
}

type MessageSequence

type MessageSequence struct {
	ID          string `json:"id"`
	StageID     string `json:"stageId"`
	RecipientID string `json:"recipientId"`
}

type Messages

type Messages struct {
	Results []*Message `json:"results"`
	*ResultList
}

type Note

type Note struct {
	ID         string    `json:"_id"`
	CreatedAt  time.Time `json:"createdAt"`
	ModifiedAt time.Time `json:"modifiedAt"`
	UserID     string    `json:"userId"`
	ContactID  string    `json:"contactId"`
	Text       string    `json:"text"`
}

type Notes

type Notes struct {
	Results []*Note `json:"results"`
	*ResultList
}

type Object

type Object struct {
	Type  string `json:"type"`
	Title string `json:"title"`
}

type Option

type Option struct {
	Text        string        `json:"text"`
	Respondents []*Respondent `json:"respondents"`
}

type Poll

type Poll struct {
	ID      string    `json:"_id"`
	UserID  string    `json:"userId"`
	Created time.Time `json:"created"`
	Live    bool      `json:"livePoll"`
	Options []*Option `json:"options"`
}

type Polls

type Polls struct {
	Results []*Poll `json:"results"`
	*ResultList
}

type QA

type QA struct {
	ID           string      `json:"_id"`
	CreatorID    string      `json:"creatorId"`
	CreationDate time.Time   `json:"creationDate"`
	Title        string      `json:"title"`
	Questions    []*Question `json:"questions"`
}

type QAs

type QAs struct {
	Results []*QA `json:"results"`
	*ResultList
}

type Question

type Question struct {
	Type    string    `json:"type"`
	Content string    `json:"content"`
	Answers []*Answer `json:"answers"`
}

type Recipient

type Recipient struct {
	Name    string `json:"name"`
	Address string `json:"address,omitempty"`
	Email   string `json:"email,omitempty"`
}

type RecipientStatus

type RecipientStatus string

type Reminder

type Reminder struct {
	ID               string    `json:"_id,omitempty"`
	UserID           string    `json:"userId,omitempty"`
	Date             time.Time `json:"date"`
	CreatedAt        time.Time `json:"createdAt,omitempty"`
	Dismissed        bool      `json:"dismissed,omitempty"`
	Trigger          string    `json:"trigger"`
	ThreadSubject    string    `json:"threadSubject,omitempty"`
	Description      string    `json:"description,omitempty"`
	Service          string    `json:"service"`
	ServiceMessageID string    `json:"serviceMessageId,omitempty"`
	ServiceThreadID  string    `json:"serviceThreadId,omitempty"`
	MixmaxMessageID  string    `json:"mixmaxMessageId,omitempty"`
}

type ReminderFilterParams

type ReminderFilterParams struct {
	Service          string
	ServiceMessageID string
	ServiceThreadID  string
	MixmaxMessageID  string
	Dismissed        bool
	Limit            int
}

type ReminderParams

type ReminderParams struct {
	Date             time.Time  `json:"date,omitempty"`
	Trigger          string     `json:"trigger,omitempty"`
	ThreadSubject    string     `json:"threadSubject,omitempty"`
	Description      string     `json:"description,omitempty"`
	Service          string     `json:"service,omitempty"`
	ServiceMessageID string     `json:"serviceMessageId,omitempty"`
	ServiceThreadID  string     `json:"serviceThreadId,omitempty"`
	MixmaxMessageID  string     `json:"mixmaxMessageId,omitempty"`
	Recipients       []*Contact `json:"recipients,omitempty"`
	Dismissed        bool       `json:"dismissed,omitempty"`
	ArchiveThread    bool
}

type Reminders

type Reminders struct {
	Results []*Reminder `json:"results"`
	*ResultList
}

type Respondent

type Respondent struct {
	*Contact
	RespondedAt time.Time `json:"respondedAt"`
}

type Response

type Response struct {
	Text        string   `json:"text"`
	Respondents []string `json:"respondents"`
}

type ResultList

type ResultList struct {
	Next       bool   `json:"hasNext,omitempty"`
	Previous   bool   `json:"hasPrevious,omitempty"`
	NextID     string `json:"next,omitempty"`
	PreviousID string `json:"previous,omitempty"`
}

type Role

type Role string
const (
	ROLE_ADMIN  Role = "admin"
	ROLE_MEMBER      = "member"
)

type Rule

type Rule struct {
	ID         string    `json:"_id"`
	UserID     string    `json:"userId"`
	CreatedAt  time.Time `json:"createdAt"`
	ModifiedAt time.Time `json:"modifiedAt"`
	Name       string    `json:"name"`
	EventName  EventName `json:"eventName"`
	Filter     string    `json:"filter,omitempty"`
	Action     *Action   `json:"action"`
	Paused     bool      `json:"isPaused"`
}

type RuleParams

type RuleParams struct {
	Name      string    `json:"name,omitempty"`
	EventName EventName `json:"eventName,omitempty"`
	Filter    string    `json:"filter,omitempty"`
	Action    *Action   `json:"action,omitempty"`
	Paused    bool      `json:"isPaused,omitempty"`
}

type Rules

type Rules struct {
	Results []*Rules `json:"results"`
	*ResultList
}

type Send

type Send struct {
	To      []*Recipient `json:"to,omitempty"`
	CC      []*Recipient `json:"cc,omitempty"`
	BCC     []*Recipient `json:"bcc,omitempty"`
	Subject string       `json:"subject,omitempty"`
	HTML    string       `json:"html,omitempty"`
	From    string       `json:"from,omitempty"`
}

type Sent

type Sent struct {
	Sent int `json:"sent"`
}

type Sequence

type Sequence struct {
	ID                  string               `json:"_id"`
	UserID              string               `json:"userId"`
	CreatedAt           time.Time            `json:"createdAt"`
	UpdatedAt           time.Time            `json:"updatedAt"`
	Name                string               `json:"name"`
	SendStagesAsReplies bool                 `json:"sendStagesAsReplies"`
	Stages              []string             `json:"stages"`
	CC                  []*SequenceRecipient `json:"cc"`
	BCC                 []*SequenceRecipient `json:"bcc"`
	LinkTracking        bool                 `json:"linkTrackingEnabled"`
	Notifications       bool                 `json:"notificationsEnabled"`
	TeamIDs             []string             `json:"teamIds"`
	Variables           []string             `json:"variables"`
	CRMsConnnected      []CRMConnect         `json:"crmConnected"`
	Timezone            string               `json:"timezone"`
	Shared              Shared               `json:"shared"`
}

type SequenceCancel

type SequenceCancel struct {
	Recipients []string `json:"recipients"`
}

type SequenceFilterParams

type SequenceFilterParams struct {
	Name   string
	Folder string
	*ExpandQuery
}

type SequenceRecipient

type SequenceRecipient struct {
	Name   string          `json:"name"`
	Email  string          `json:"email"`
	Status RecipientStatus `json:"status"`
	Errors []string        `json:"errors"`
}

type SequenceRecipientDetails

type SequenceRecipientDetails struct {
	ID         string            `json:"_id"`
	UserID     string            `json:"userId"`
	CreatedAt  time.Time         `json:"createdAt"`
	UpdatedAt  time.Time         `json:"updatedAt"`
	SequenceID string            `json:"sequenceId"`
	Variables  map[string]string `json:"variables"`
	State      SequenceState     `json:"state"`
	*SequenceRecipient
}

type SequenceRecipientParams

type SequenceRecipientParams struct {
	Email     string            `json:"email"`
	Variables map[string]string `json:"variables"`
}

type SequenceRecipients

type SequenceRecipients struct {
	Results []*SequenceRecipientDetails `json:"results"`
	*ResultList
}

type SequenceState

type SequenceState string
const (
	SEQUENCE_ACTIVE    SequenceState = "active"
	SEQUENCE_FAILED    SequenceState = "failed"
	SEQUENCE_COMPLETED SequenceState = "completed"
)

type Sequences

type Sequences struct {
	Results []*Sequence `json:"results"`
	*ResultList
}

type Shared

type Shared struct {
	Users []*SharedUser `json:"users"`
	Teams []*SharedTeam `json:"teams"`
}

type SharedRole

type SharedRole string
const (
	SHARED_READ  SharedRole = "read-only"
	SHARED_WRITE            = "read-write"
)

type SharedTeam

type SharedTeam struct {
	ID   string     `json:"_id"`
	Role SharedRole `json:"role"`
}

type SharedUser

type SharedUser struct {
	UserID   string     `json:"userId"`
	Email    string     `json:"email"`
	Role     SharedRole `json:"role"`
	Accepted bool       `json:"accepted"`
}
type Sidebar struct {
	ID        string    `json:"_id"`
	UserID    string    `json:"userId"`
	CreatedAt time.Time `json:"createdAt"`
	Name      string    `json:"name"`
	URL       string    `json:"url"`
	IconHTML  string    `json:"iconHTML"`
}
type Sidebars struct {
	Results []*Sidebar `json:"results"`
	*ResultList
}

type Snippet

type Snippet struct {
	ID        string    `json:"_id"`
	UserID    string    `json:"userId"`
	CreatedAt time.Time `json:"createdAt"`
	SavedAt   time.Time `json:"savedAt"`
	DeletedAt time.Time `json:"deletedAt"`
	SavedBy   string    `json:"savedBy"`
	Name      string    `json:"name"`
	Title     string    `json:"title"`
	Source    string    `json:"source"`
	Shared    Shared    `json:"shared"`
}

type SnippetFilterParams

type SnippetFilterParams struct {
	IncludeDeleted bool
	Fields         []string
	*ExpandQuery
}

type SnippetParams

type SnippetParams struct {
	Title  string `json:"title,omitempty"`
	Name   string `json:"name,omitempty"`
	Source string `json:"source,omitempty"`
}

type SnippetSendParams

type SnippetSendParams struct {
	To        []*Recipient      `json:"to"`
	CC        []*Recipient      `json:"cc"`
	BCC       []*Recipient      `json:"bcc"`
	Subject   string            `json:"subject"`
	Tracking  bool              `json:"trackingEnabled"`
	Variables map[string]string `json:"variables"`
}

type SnippetTag

type SnippetTag struct {
	ID        string    `json:"_id"`
	UserID    string    `json:"userId"`
	CreatedAt time.Time `json:"createdAt"`
	SavedAt   time.Time `json:"savedAt"`
	Name      string    `json:"name"`
	Count     int       `json:"count,omitempty"`
	Shared    Shared    `json:"shared"`
}

type SnippetTagFilterParams

type SnippetTagFilterParams struct {
	Search string
	*ExpandQuery
	*SortQuery
}

type SnippetTags

type SnippetTags struct {
	Results []*SnippetTag `json:"results"`
	*ResultList
}

type Snippets

type Snippets struct {
	Results []*Snippet `json:"results"`
	*ResultList
}

type SortQuery

type SortQuery struct {
	Sort      string
	Ascending bool
}

type Team

type Team struct {
	ID         string    `json:"_id"`
	CreatedAt  time.Time `json:"createdAt"`
	ModifiedAt time.Time `json:"modifiedAt"`
	Name       string    `json:"name"`
	Members    []*Member `json:"members"`
}

type TeamParams

type TeamParams struct {
	Name    string          `json:"name"`
	Members []*MemberParams `json:"members"`
}

type Teams

type Teams struct {
	Results []*Team `json:"results"`
	*ResultList
}

type TimedEvent

type TimedEvent struct {
	Guest Guest  `json:"guest,omitempty"`
	ID    string `json:"id,omitempty"`
}

type Timeslot

type Timeslot struct {
	Start  time.Time    `json:"start,omitempty"`
	End    time.Time    `json:"end,omitempty"`
	Events []TimedEvent `json:"events,omitempty"`
}

type Unsubscribe

type Unsubscribe struct {
	TeamID    string `json:"teamId,omitempty"`
	MessageID string `json:"messageId,omitempty"`
	*Contact
}

type Unsubscribes

type Unsubscribes struct {
	Results []*Unsubscribe `json:"results"`
	*ResultList
}

type Upload

type Upload struct {
	Timestamp   time.Time `json:"timestamp"`
	Email       string    `json:"email"`
	Name        string    `json:"name"`
	IPAddress   string    `json:"ipAddress"`
	DownloadURL string    `json:"downloadUrl"`
}

type User

type User struct {
	ID string `json:"_id"`
}

type YesNo

type YesNo struct {
	ID      string      `json:"_id"`
	UserID  string      `json:"userId"`
	Created time.Time   `json:"created"`
	Text    string      `json:"text"`
	Answers []*Response `json:"answers"`
}

type YesNos

type YesNos struct {
	Results []*YesNo `json:"results"`
	*ResultList
}

Jump to

Keyboard shortcuts

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