Documentation
¶
Index ¶
- type BaseEntity
- type BusinessHour
- type BusinessHourResponse
- type BusinessHoursResponse
- type CompaniesResponse
- type Company
- type CompanyResponse
- type Contact
- type CustomFieldSearch
- type CustomFieldsSearch
- type Customer
- type CustomerResponse
- type CustomersResponse
- type Disposition
- type Domain
- type EntityRef
- type File
- type FileParams
- type FileResponse
- type FileType
- type FilesResponse
- type HelpDocArticle
- type HelpDocArticleResponse
- type HelpDocArticlesResponse
- type HelpDocSite
- type HelpDocSiteResponse
- type HelpDocSiteStats
- type HelpDocSitesResponse
- type Inbox
- type InboxCname
- type InboxMeta
- type InboxResponse
- type InboxUser
- type InboxesResponse
- type IncludedData
- type Message
- type MessageResponse
- type MessagesResponse
- type Meta
- type PageMeta
- type Pagination
- type Phone
- type SLA
- type SLACompany
- type SLAConditionOption
- type SLACustomer
- type SLAInbox
- type SLANotification
- type SLANotificationConditionType
- type SLANotificationType
- type SLAResponse
- type SLATag
- type SLATicketPriority
- type SLAsResponse
- type SearchTicketsFilter
- type Spamlist
- type SpamlistResponse
- type SpamlistsResponse
- type State
- type Tag
- type TagResponse
- type TagsResponse
- type Task
- type Ticket
- type TicketActivity
- type TicketPrioritiesResponse
- type TicketPriority
- type TicketPriorityResponse
- type TicketResponse
- type TicketSource
- type TicketSourceResponse
- type TicketSourcesResponse
- type TicketStatus
- type TicketStatusResponse
- type TicketStatusesResponse
- type TicketType
- type TicketTypeResponse
- type TicketTypesResponse
- type TicketsResponse
- type TimeLog
- type TimeLogResponse
- type TimeLogsResponse
- type Trigger
- type User
- type UserRef
- type UserResponse
- type UsersResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseEntity ¶
type BaseEntity struct {
ID int `json:"id"`
Type any `json:"type"` // Can be string or object
CreatedAt *time.Time `json:"createdAt,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
CreatedBy *UserRef `json:"createdBy,omitempty"`
UpdatedBy *UserRef `json:"updatedBy,omitempty"`
State *State `json:"state,omitempty"`
}
Base types for common fields
type BusinessHour ¶
type BusinessHour struct {
BaseEntity
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
IsDefault *bool `json:"isDefault,omitempty"`
TimezoneID *int64 `json:"timezoneId,omitempty"`
TimezoneReference *string `json:"timezone_name,omitempty"`
}
BusinessHour represents a tag in the system
type BusinessHourResponse ¶
type BusinessHourResponse struct {
BusinessHour BusinessHour `json:"businesshour"`
Included IncludedData `json:"included"`
}
type BusinessHoursResponse ¶
type BusinessHoursResponse struct {
BusinessHours []BusinessHour `json:"businesshours"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
BusinessHoursResponse represents the response for a list of businesshours
type CompaniesResponse ¶
type CompaniesResponse struct {
Companies []Company `json:"companies"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
CompaniesResponse represents the response for a list of companies
type Company ¶
type Company struct {
BaseEntity
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
Details *string `json:"details,omitempty"`
Industry *string `json:"industry,omitempty"`
Website *string `json:"website,omitempty"`
Permission *string `json:"permission,omitempty"`
Kind *string `json:"kind,omitempty"`
Domains []EntityRef `json:"domains,omitempty"`
Note *string `json:"note,omitempty"`
}
Company represents a company in Desk.com
type CompanyResponse ¶
type CompanyResponse struct {
Company Company `json:"company"`
Included IncludedData `json:"included"`
}
CompanyResponse represents the response for a single company
type Contact ¶
type Contact struct {
BaseEntity
Value *string `json:"value,omitempty"`
IsMain *bool `json:"isMain,omitempty"`
}
Contact related types
type CustomFieldSearch ¶
type CustomFieldsSearch ¶
type CustomFieldsSearch []CustomFieldSearch
type Customer ¶
type Customer struct {
BaseEntity
FirstName *string `json:"firstName,omitempty"`
LastName *string `json:"lastName,omitempty"`
Email *string `json:"email,omitempty"`
Organization *string `json:"organization,omitempty"`
ExtraData *string `json:"extraData,omitempty"`
Notes *string `json:"notes,omitempty"`
VerifiedEmail *bool `json:"verifiedEmail,omitempty"`
LinkedinURL *string `json:"linkedinURL,omitempty"`
FacebookURL *string `json:"facebookURL,omitempty"`
TwitterHandle *string `json:"twitterHandle,omitempty"`
NumTickets *int `json:"numTickets,omitempty"`
JobTitle any `json:"jobTitle"`
Phone *string `json:"phone,omitempty"`
Mobile *string `json:"mobile,omitempty"`
Address *string `json:"address,omitempty"`
ExternalID *string `json:"externalId,omitempty"`
AvatarURL *string `json:"avatarURL,omitempty"`
Contacts []EntityRef `json:"contacts"`
Customerwelcomeemails any `json:"customerwelcomeemails"`
Trusted *bool `json:"trusted,omitempty"`
WelcomeEmailSent *bool `json:"welcomeEmailSent,omitempty"`
}
Customer related types
type CustomerResponse ¶
type CustomerResponse struct {
Customer Customer `json:"customer"`
Included IncludedData `json:"included"`
}
type CustomersResponse ¶
type CustomersResponse struct {
Customers []Customer `json:"customers"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
Response types for customers
type Disposition ¶
type Disposition string
const ( DispositionAttachment Disposition = "attachment" DispositionAttachmentInline Disposition = "attachment-inline" )
type Domain ¶
type Domain struct {
BaseEntity
Name *string `json:"name,omitempty"`
Project any `json:"project"`
Company any `json:"company"`
ProjectsCompany any `json:"projects_company"`
}
Domain represents a domain associated with a company
type File ¶
type File struct {
BaseEntity
// Standard mime type of the file
MIMEType *string `json:"mimeType,omitempty"`
// The file name
Filename *string `json:"filename,omitempty"`
// Determine where the attachment was added: attachment or attachment-inline
Disposition *Disposition `json:"disposition,omitempty"`
// Type is always 'attachment'
Type *FileType `json:"type,omitempty"`
}
File represents a file in the system
type FileParams ¶
type FileParams struct {
ContentType string `json:"Content-Type"`
Bucket string `json:"bucket"`
Key string `json:"key"`
Policy string `json:"policy"`
SuccessActionStatus string `json:"success_action_status"`
XAmzAlgorithm string `json:"x-amz-algorithm"`
XAmzCredential string `json:"x-amz-credential"`
XAmzDate string `json:"x-amz-date"`
XAmzSignature string `json:"x-amz-signature"`
}
type FileResponse ¶
type FileResponse struct {
URL *string `json:"url,omitempty"`
Params FileParams `json:"params"`
File File `json:"file"`
}
RefResponse is the data gotten back from the /files/ref endpoint to then post to s3
type FileType ¶
type FileType string
FileType represents a type of file with its constraints
const (
FileTypeAttachment FileType = "attachment"
)
type FilesResponse ¶
type FilesResponse struct {
Files []File `json:"files"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
type HelpDocArticle ¶
type HelpDocArticle struct {
BaseEntity
Helpdocsite EntityRef `json:"helpdocsite"`
Title *string `json:"title,omitempty"`
Slug *string `json:"slug,omitempty"`
Description *string `json:"description,omitempty"`
OldURL *string `json:"oldURL,omitempty"`
Popularity *int `json:"popularity,omitempty"`
DisqusEnabled *bool `json:"disqusEnabled,omitempty"`
IsPrivate *bool `json:"isPrivate,omitempty"`
EditMethod *string `json:"editMethod,omitempty"`
DisplayOrder *int `json:"displayOrder,omitempty"`
Status *string `json:"status,omitempty"`
Contents *string `json:"contents,omitempty"`
Categories []int `json:"categories"`
RelatedArticles []int `json:"relatedArticles,omitempty"`
}
type HelpDocArticleResponse ¶
type HelpDocArticleResponse struct {
HelpDocArticle HelpDocArticle `json:"helpDocArticle"`
Included IncludedData `json:"included"`
}
type HelpDocArticlesResponse ¶
type HelpDocArticlesResponse struct {
HelpDocArticles []HelpDocArticle `json:"helpdocarticles"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
type HelpDocSite ¶
type HelpDocSite struct {
BaseEntity
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
MetaSiteDescription *string `json:"metaSiteDescription,omitempty"`
Subdomain *string `json:"subdomain,omitempty"`
ContactFormEnabled *bool `json:"contactFormEnabled,omitempty"`
ShowDateLastModified *bool `json:"showDateLastModified,omitempty"`
CustomDomain *string `json:"customDomain,omitempty"`
CustomStyleSheet *string `json:"customStyleSheet,omitempty"`
HomePageLinkEnabled *bool `json:"homePageLinkEnabled,omitempty"`
HomePageLinkText *string `json:"homePageLinkText,omitempty"`
HomePageURL *string `json:"homePageURL,omitempty"`
HTMLHeadCode *string `json:"htmlHeadCode,omitempty"`
LogoImage *string `json:"logoImage,omitempty"`
Favicon *string `json:"favicon,omitempty"`
TouchIcon *string `json:"touchIcon,omitempty"`
PublicSiteEnabled *bool `json:"publicSiteEnabled,omitempty"`
SendEmailsToInboxID *int `json:"sendEmailsToInboxId,omitempty"`
ShowOnHomePage *string `json:"showOnHomePage,omitempty"`
HeaderBGColor *string `json:"headerBGColor,omitempty"`
PageBGColor *string `json:"pageBGColor,omitempty"`
LinkColor *string `json:"linkColor,omitempty"`
TextColor *string `json:"textColor,omitempty"`
LanguageCode *string `json:"languageCode,omitempty"`
Password *string `json:"password,omitempty"`
ShowSocialIcons *bool `json:"showSocialIcons,omitempty"`
DisqusShortname any `json:"disqusShortname"`
AuthenticationType *string `json:"authenticationType,omitempty"`
AuthenticationTypeID *int `json:"authenticationTypeId,omitempty"`
EditMethod *string `json:"editMethod,omitempty"`
Stats *HelpDocSiteStats `json:"stats,omitempty"`
SearchTemplate *string `json:"searchTemplate,omitempty"`
HomeTemplate *string `json:"homeTemplate,omitempty"`
HeadTemplate *string `json:"headTemplate,omitempty"`
CategoryTemplate *string `json:"categoryTemplate,omitempty"`
ArticleTemplate *string `json:"articleTemplate,omitempty"`
Contributors []EntityRef `json:"contributors"`
}
type HelpDocSiteResponse ¶
type HelpDocSiteResponse struct {
HelpDocSite HelpDocSite `json:"helpdocssite"`
Included IncludedData `json:"included"`
}
type HelpDocSiteStats ¶
type HelpDocSitesResponse ¶
type HelpDocSitesResponse struct {
HelpDocSites []HelpDocSite `json:"helpdocssites"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
type Inbox ¶
type Inbox struct {
BaseEntity
AutoReplyEnabled *bool `json:"autoReplyEnabled,omitempty"`
AutoReplyMessage *string `json:"autoReplyMessage,omitempty"`
AutoReplySubject *string `json:"autoReplySubject,omitempty"`
ClientOnly *bool `json:"clientOnly,omitempty"`
DisplayOrder *int `json:"displayOrder,omitempty"`
Email *string `json:"email,omitempty"`
EmailForwardingState *string `json:"emailForwardingState,omitempty"`
ForwardingAddress *string `json:"forwardingAddress,omitempty"`
HappinessRatingEnabled *bool `json:"happinessRatingEnabled,omitempty"`
HappinessRatingMessage *string `json:"happinessRatingMessage,omitempty"`
IconImage *string `json:"iconImage,omitempty"`
Inboxaliases []EntityRef `json:"inboxaliases"`
Inboxcnames []InboxCname `json:"inboxcnames"`
Inboxemailrefs any `json:"inboxemailrefs"`
IncludeTicketHistoryOnForward *bool `json:"includeTicketHistoryOnForward,omitempty"`
IsAdmin *bool `json:"isAdmin,omitempty"`
IsFreeDomain *bool `json:"isFreeDomain,omitempty"`
LanguageCode *string `json:"languageCode,omitempty"`
LocalPart *string `json:"localPart,omitempty"`
Name *string `json:"name,omitempty"`
NotificationsOnly *bool `json:"notificationsOnly,omitempty"`
Oauth2Token any `json:"oauth2token"`
OnClosedLock *string `json:"onClosedLock,omitempty"`
OnClosedWait *int `json:"onClosedWait,omitempty"`
Projects []EntityRef `json:"projects"`
PublicIconImage *string `json:"publicIconImage,omitempty"`
Restricteddomains any `json:"restricteddomains"`
SendEmailsFrom *string `json:"sendEmailsFrom,omitempty"`
Signature *string `json:"signature,omitempty"`
SMTPPassword *string `json:"smtpPassword,omitempty"`
SMTPPort *int `json:"smtpPort,omitempty"`
SMTPProvider *string `json:"smtpProvider,omitempty"`
SMTPSecurity *string `json:"smtpSecurity,omitempty"`
SMTPServer *string `json:"smtpServer,omitempty"`
SMTPUsername *string `json:"smtpUsername,omitempty"`
SpamThreshold *int `json:"spamThreshold,omitempty"`
Starred *bool `json:"starred,omitempty"`
SyncAccountID any `json:"syncAccountId"`
SyncDays any `json:"syncDays"`
Synced *bool `json:"synced,omitempty"`
SyncSubscriptionID any `json:"syncSubscriptionId"`
Ticketstatus *EntityRef `json:"ticketstatus,omitempty"`
Tickettypes []EntityRef `json:"tickettypes"`
TimeloggingEnabled *bool `json:"timeloggingEnabled,omitempty"`
Triggers []Trigger `json:"triggers"`
Type *string `json:"type,omitempty"`
User any `json:"user"`
Users []InboxUser `json:"users"`
UseTeamworkMailServer *bool `json:"useTeamworkMailServer,omitempty"`
UsingOfficeHours *bool `json:"usingOfficeHours,omitempty"`
Verified *bool `json:"verified,omitempty"`
}
Inbox related types
type InboxCname ¶
type InboxResponse ¶
type InboxResponse struct {
Inbox Inbox `json:"inbox"`
Included IncludedData `json:"included"`
}
type InboxesResponse ¶
type InboxesResponse struct {
Inboxes []Inbox `json:"inboxes"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
type IncludedData ¶
type IncludedData struct {
Companies []Company `json:"companies"`
Contacts []Contact `json:"contacts"`
Customers []Customer `json:"customers"`
Domains []Domain `json:"domains"`
Inboxes []Inbox `json:"inboxes"`
Messages []Message `json:"messages"`
SLACustomers []SLACustomer `json:"slacustomers"`
SLACompanies []SLACompany `json:"slacompanies"`
SLAInboxes []SLAInbox `json:"slainboxes"`
SLANotifications []SLANotification `json:"slanotifications"`
SLAPriorities []SLATicketPriority `json:"slaticketpriorities"`
SLATags []SLATag `json:"slatags"`
Tags []Tag `json:"tags"`
Ticketactivities []TicketActivity `json:"ticketactivities"`
Ticketsources []TicketSource `json:"ticketsources"`
Ticketstatuses []TicketStatus `json:"ticketstatuses"`
Tickettypes []TicketType `json:"tickettypes"`
Timelogs []TimeLog `json:"timelogs"`
Users []User `json:"users"`
}
Common included data structure
type Message ¶
type Message struct {
BaseEntity
AssigningUser *EntityRef `json:"assigningUser,omitempty"`
BCC []string `json:"bcc"`
CC []string `json:"cc"`
Contact *EntityRef `json:"contact,omitempty"`
Delayed *bool `json:"delayed,omitempty"`
EditMethod *string `json:"editMethod,omitempty"`
Message *string `json:"message,omitempty"`
IsPinned *bool `json:"isPinned,omitempty"`
Status *EntityRef `json:"status,omitempty"`
ThreadType *string `json:"threadType,omitempty"`
Ticket EntityRef `json:"ticket"`
ViewedByCustomerAt *time.Time `json:"viewedByCustomerAt"`
}
Message related types
func (*Message) UnmarshalJSON ¶
type MessageResponse ¶
type MessageResponse struct {
Message Message `json:"message"`
Included IncludedData `json:"included"`
}
type MessagesResponse ¶
type MessagesResponse struct {
Messages []Message `json:"messages"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
type PageMeta ¶
type PageMeta struct {
Count int `json:"count"`
PageSize int `json:"pageSize"`
PageOffset int `json:"pageOffset"`
Pages int `json:"pages"`
HasMore bool `json:"hasMore"`
}
Common page metadata structure
type Pagination ¶
type Pagination struct {
Records int `json:"records"`
PageSize int `json:"pageSize"`
Pages int `json:"pages"`
Page int `json:"page"`
HasMorePages bool `json:"hasMorePages"`
}
Common pagination structure used across responses
type Phone ¶
type Phone struct {
BaseEntity
Number *string `json:"number,omitempty"`
Type *string `json:"type,omitempty"`
CountryCode *string `json:"countryCode,omitempty"`
Extension *string `json:"extension,omitempty"`
}
Phone represents a phone number associated with a company
type SLA ¶
type SLA struct {
BaseEntity
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
DisplayOrder *int `json:"displayOrder,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
BusinessHour *EntityRef `json:"businesshours,omitempty"`
Customers []EntityRef `json:"slacustomers"`
Companies []EntityRef `json:"slacompanies"`
Inboxes []EntityRef `json:"slainboxes"`
TicketTypes []EntityRef `json:"slatickettypes"`
TicketPriorities []EntityRef `json:"slaticketpriorities"`
Tags []EntityRef `json:"slatags"`
Notifications []EntityRef `json:"slanotifications"`
Threads []EntityRef `json:"threads"`
}
SLA represents a SLA in the system
type SLACompany ¶
type SLACompany struct {
BaseEntity
Company *EntityRef `json:"company"`
Condition *SLAConditionOption `json:"conditionoption,omitempty" db:"conditionoption"`
}
type SLAConditionOption ¶
type SLAConditionOption string
const ( SLAConditionOptionEqual SLAConditionOption = "eq" SLAConditionOptionNotEqual SLAConditionOption = "ne" )
type SLACustomer ¶
type SLACustomer struct {
BaseEntity
Customer *EntityRef `json:"customer"`
Condition *SLAConditionOption `json:"conditionoption,omitempty" db:"conditionoption"`
}
type SLAInbox ¶
type SLAInbox struct {
BaseEntity
Inbox *EntityRef `json:"inbox"`
Condition *SLAConditionOption `json:"conditionoption,omitempty" db:"conditionoption"`
}
type SLANotification ¶
type SLANotification struct {
BaseEntity
Condition *SLANotificationConditionType `json:"condition,omitempty" db:"condition"`
Type *SLANotificationType `json:"type,omitempty"`
Duration *int `json:"duration,omitempty"`
User *EntityRef `json:"user,omitempty"`
NotifyAssignedUser *bool `json:"notifyAssignedUser,omitempty"`
}
type SLANotificationConditionType ¶
type SLANotificationConditionType string
const ( SLANotificationConditionTypeWarning SLANotificationConditionType = "warning" SLANotificationConditionTypeBreach SLANotificationConditionType = "breach" )
type SLANotificationType ¶
type SLANotificationType string
const ( SLANotificationTypeFirstResponse SLANotificationType = "firstResponse" SLANotificationTypeReplyTime SLANotificationType = "replyTime" SLANotificationTypeResolutionTime SLANotificationType = "resolutionTime" )
type SLAResponse ¶
type SLAResponse struct {
SLA SLA `json:"sla"`
Included IncludedData `json:"included"`
}
type SLATag ¶
type SLATag struct {
BaseEntity
Tag *EntityRef `json:"tag"`
Condition *SLAConditionOption `json:"conditionoption,omitempty" db:"conditionoption"`
}
type SLATicketPriority ¶
type SLATicketPriority struct {
BaseEntity
Hours *int `json:"hours,omitempty"`
Minutes *int `json:"minutes,omitempty"`
Description *string `json:"description,omitempty"`
TicketPriority *EntityRef `json:"priority"`
}
type SLAsResponse ¶
type SLAsResponse struct {
SLAs []SLA `json:"slas"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
SLAsResponse represents the response for a list of slas
type SearchTicketsFilter ¶
type SearchTicketsFilter struct {
Agents []int64 `qs:"agents"`
Companies []int64 `qs:"companies"`
Customers []int64 `qs:"customers"`
CustomFields CustomFieldsSearch `qs:"customfields"`
EndDate *time.Time `qs:"endDate,omitempty"`
Exact bool `qs:"exact"`
ExcludeInboxes []int64 `qs:"excludeInboxes"`
ExcludeTags []int64 `qs:"excludeTags"`
ExcludeWorkEmails bool `qs:"excludeWorkEmails"`
Filter string `qs:"filter"`
HelpdocSites []int64 `qs:"helpdocSites"`
Inboxes []int64 `qs:"inboxes"`
IncludeArchivedAgents bool `qs:"includeArchivedAgents"`
LastUpdated *time.Time `qs:"lastUpdated,omitempty"`
OmitMerged bool `qs:"omitMerged"`
OnlyUntagged bool `qs:"onlyUntagged"`
OnlyWithAttachment bool `qs:"onlyWithAttachment"`
Priorities []int64 `qs:"priorities"`
ProjectID *int64 `qs:"project,omitempty"`
RequireAllTags bool `qs:"tagRequireAll"`
Search string `qs:"search"`
Sources []int64 `qs:"sources"`
StartDate *time.Time `qs:"startDate,omitempty"`
Statuses []int64 `qs:"statuses"`
SubjectKeywords []string `qs:"subjectKeywords"`
Tags []int64 `qs:"tags"`
TaskID int64 `qs:"task"`
TaskStatuses []string `qs:"taskStatuses"`
Teams []int64 `qs:"teams"`
TicketID *int64 `qs:"ticket,omitempty"`
TimeRange string `qs:"timeRange"`
TWCompanyIDs []int64 `qs:"twCompanyIds"`
Types []int64 `qs:"types"`
Unassigned bool `qs:"unassigned"`
}
type Spamlist ¶
type Spamlist struct {
BaseEntity
Term *string `json:"term,omitempty"`
Type *string `json:"type,omitempty"`
}
Spamlist represents a spamlist entry. Term can be an email address, domain, or IP address. Type is whitelist or blacklist.
type SpamlistResponse ¶
type SpamlistResponse struct {
Spamlist Spamlist `json:"spamlist"`
Included IncludedData `json:"included"`
}
type SpamlistsResponse ¶
type SpamlistsResponse struct {
Spamlists []Spamlist `json:"spamlists"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
SpamlistsResponse represents the response for a list of spam lists
type Tag ¶
type Tag struct {
BaseEntity
Name *string `json:"name,omitempty"`
Color *string `json:"color,omitempty"`
}
Tag represents a tag in the system
type TagResponse ¶
type TagResponse struct {
Tag Tag `json:"tag"`
Included IncludedData `json:"included"`
}
type TagsResponse ¶
type TagsResponse struct {
Tags []Tag `json:"tags"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
TagsResponse represents the response for a list of tags
type Task ¶
type Task struct {
ID int `json:"id"`
Type string `json:"type"`
Meta struct {
Completed bool `json:"completed"`
Project struct {
ID int `json:"id"`
Type string `json:"type"`
} `json:"project"`
StateChanged bool `json:"stateChanged"`
Status string `json:"status"`
Task struct {
Completed bool `json:"completed"`
ID int `json:"id"`
StateChanged bool `json:"stateChanged"`
Status string `json:"status"`
Type string `json:"type"`
} `json:"task"`
} `json:"meta"`
}
type Ticket ¶
type Ticket struct {
BaseEntity
Activities []EntityRef `json:"activities,omitempty"`
Agent *EntityRef `json:"agent,omitempty"`
BCC []string `json:"bcc,omitempty"`
Body *string `json:"message,omitempty"`
CC []string `json:"cc,omitempty"`
Contact *EntityRef `json:"contact,omitempty"`
Customer *EntityRef `json:"customer,omitempty"`
Files []EntityRef `json:"files,omitempty"`
HappinessSurveySentAt *time.Time `json:"happinessSurveySentAt"`
ImagesHidden *bool `json:"imagesHidden,omitempty"`
Inbox *EntityRef `json:"inbox,omitempty"`
IsRead *bool `json:"isRead,omitempty"`
MessageCount *int `json:"messageCount,omitempty"`
Messages []EntityRef `json:"messages,omitempty"`
NotifyCustomer *bool `json:"notifyCustomer,omitempty"`
OriginalRecipient *string `json:"originalRecipient,omitempty"`
PreviewText *string `json:"previewText,omitempty"`
Priority *EntityRef `json:"priority,omitempty"`
Readonly *bool `json:"readonly,omitempty"`
ResolutionTimeMins *int `json:"resolutionTimeMins,omitempty"`
ResponseTimeMins *int `json:"responseTimeMins,omitempty"`
Source *EntityRef `json:"source,omitempty"`
SpamRules any `json:"spam_rules"`
SpamScore *float64 `json:"spam_score,omitempty"`
Status *EntityRef `json:"status,omitempty"`
Subject *string `json:"subject,omitempty"`
Suggestions struct{} `json:"suggestions"`
Tags []EntityRef `json:"tags,omitempty"`
Tasks []Task `json:"tasks,omitempty"`
Timelogs []EntityRef `json:"timelogs,omitempty"`
Type *EntityRef `json:"type,omitempty"`
}
Ticket related types
type TicketActivity ¶
type TicketActivity struct {
BaseEntity
EventType *string `json:"eventType,omitempty"`
Icon *string `json:"icon,omitempty"`
Color *string `json:"color,omitempty"`
TargetAgent *EntityRef `json:"targetAgent,omitempty"`
Ticket EntityRef `json:"ticket"`
Inbox any `json:"inbox"`
OldInbox any `json:"oldInbox"`
Status *EntityRef `json:"status,omitempty"`
}
TicketActivity related types
type TicketPrioritiesResponse ¶
type TicketPrioritiesResponse struct {
TicketPriorities []TicketStatus `json:"ticketpriorities"`
Meta Meta `json:"meta"`
Pagination Pagination `json:"pagination"`
Included IncludedData `json:"included"`
}
type TicketPriority ¶
type TicketPriority struct {
BaseEntity
Name *string `json:"name,omitempty"`
Color *string `json:"color,omitempty"`
DisplayOrder *int `json:"displayOrder,omitempty"`
}
TicketPriority related types
type TicketPriorityResponse ¶
type TicketPriorityResponse struct {
TicketPriority TicketPriority `json:"ticketpriority"`
Included IncludedData `json:"included"`
}
type TicketResponse ¶
type TicketResponse struct {
Ticket Ticket `json:"ticket"`
Included IncludedData `json:"included"`
}
type TicketSource ¶
type TicketSource struct {
BaseEntity
Name *string `json:"name,omitempty"`
Icon *string `json:"icon,omitempty"`
DisplayOrder *int `json:"displayOrder,omitempty"`
IsCustom *bool `json:"isCustom,omitempty"`
}
TicketSource related types
type TicketSourceResponse ¶
type TicketSourceResponse struct {
TicketSource TicketSource `json:"ticketSource"`
Included IncludedData `json:"included"`
}
type TicketSourcesResponse ¶
type TicketSourcesResponse struct {
TicketSources []TicketSource `json:"ticketSources"`
Meta Meta `json:"meta"`
Pagination Pagination `json:"pagination"`
Included IncludedData `json:"included"`
}
type TicketStatus ¶
type TicketStatus struct {
BaseEntity
Code *string `json:"code,omitempty"`
Name *string `json:"name,omitempty"`
DisplayOrder *int `json:"displayOrder,omitempty"`
IsCustom *bool `json:"isCustom,omitempty"`
Color *string `json:"color,omitempty"`
Icon *string `json:"icon,omitempty"`
}
TicketStatus related types
type TicketStatusResponse ¶
type TicketStatusResponse struct {
TicketStatus TicketStatus `json:"ticketstatus"`
Included IncludedData `json:"included"`
}
type TicketStatusesResponse ¶
type TicketStatusesResponse struct {
TicketStatuses []TicketStatus `json:"ticketstatuses"`
Meta Meta `json:"meta"`
Pagination Pagination `json:"pagination"`
Included IncludedData `json:"included"`
}
type TicketType ¶
type TicketType struct {
BaseEntity
Name *string `json:"name,omitempty"`
DisplayOrder *int `json:"displayOrder,omitempty"`
Inboxes []EntityRef `json:"inboxes"`
Default *bool `json:"default,omitempty"`
EnabledForFutureInboxes *bool `json:"enabledForFutureInboxes,omitempty"`
}
TicketType related types
type TicketTypeResponse ¶
type TicketTypeResponse struct {
TicketType TicketType `json:"tickettype"`
Included IncludedData `json:"included"`
}
type TicketTypesResponse ¶
type TicketTypesResponse struct {
TicketTypes []TicketType `json:"tickettypes"`
Meta Meta `json:"meta"`
Pagination Pagination `json:"pagination"`
Included IncludedData `json:"included"`
}
type TicketsResponse ¶
type TicketsResponse struct {
Tickets []Ticket `json:"tickets"`
Included IncludedData `json:"included"`
Pagination Pagination `json:"pagination"`
Meta Meta `json:"meta"`
}
Response types for tickets
type TimeLog ¶
type TimeLog struct {
BaseEntity
Billable *bool `json:"billable,omitempty"`
Description *string `json:"description,omitempty"`
Date *time.Time `json:"date,omitempty"`
Seconds *int `json:"seconds,omitempty"`
TimezoneOffset *int `json:"timezoneOffset,omitempty"`
TimelogsID any `json:"timelogs_id"`
AssignToCurrentUser *bool `json:"assignToCurrentUser,omitempty"`
Ticket EntityRef `json:"ticket"`
User EntityRef `json:"user"`
}
TimeLog related types
type TimeLogResponse ¶
type TimeLogResponse struct {
TimeLog TimeLog `json:"timeLog"`
Included IncludedData `json:"included"`
}
type TimeLogsResponse ¶
type TimeLogsResponse struct {
TimeLogs []TimeLog `json:"timeLogs"`
Meta Meta `json:"meta"`
Pagination Pagination `json:"pagination"`
Included IncludedData `json:"included"`
}
type User ¶
type User struct {
BaseEntity
Email *string `json:"email,omitempty"`
FirstName *string `json:"firstName,omitempty"`
LastName *string `json:"lastName,omitempty"`
AvatarURL *string `json:"avatarURL,omitempty"`
EditMethod *string `json:"editMethod,omitempty"`
IsPartTime *bool `json:"isPartTime,omitempty"`
TicketReplyRedirect *string `json:"ticketReplyRedirect,omitempty"`
Reviewer *bool `json:"reviewer,omitempty"`
TrainingWheelsEnrollment *EntityRef `json:"trainingWheelsEnrollment,omitempty"`
Role *string `json:"role,omitempty"`
SendPushNotifications *bool `json:"sendPushNotifications,omitempty"`
SendWebNotifications *bool `json:"sendWebNotifications,omitempty"`
AutoFollowOnCC *bool `json:"autoFollowOnCC,omitempty"`
TimeFormatID *int `json:"timeFormatId,omitempty"`
TimezoneID *int `json:"timezoneId,omitempty"`
ProjectsCompanyID *int `json:"projectsCompanyId,omitempty"`
IsAppOwner *bool `json:"isAppOwner,omitempty"`
LdKey *string `json:"ldKey,omitempty"`
}
User related types
type UserResponse ¶
type UserResponse struct {
User User `json:"user"`
Included IncludedData `json:"included"`
}
type UsersResponse ¶
type UsersResponse struct {
Users []User `json:"users"`
Included IncludedData `json:"included"`
Meta Meta `json:"meta"`
Pagination Pagination `json:"pagination"`
}