Documentation ¶
Index ¶
- Constants
- func ActionFieldText(fieldType int) string
- func ConditionFieldText(fieldType int) string
- func LocaleTypeText(loc int) string
- func UserRoleText(role int) string
- func ViaTypeText(viaID int) string
- type API
- type APITokenCredential
- type BasicAuthCredential
- type Client
- func (z *Client) CreateDynamicContentItem(item DynamicContentItem) (DynamicContentItem, error)
- func (z *Client) CreateGroup(group Group) (Group, error)
- func (z Client) CreateTicketField(ticketField TicketField) (TicketField, error)
- func (z Client) CreateTicketForm(ticketForm TicketForm) (TicketForm, error)
- func (z Client) CreateTrigger(trigger Trigger) (Trigger, error)
- func (z Client) CreateUser(user User) (User, error)
- func (z Client) Delete(path string) error
- func (z Client) Get(path string) ([]byte, error)
- func (z *Client) GetDynamicContentItems() ([]DynamicContentItem, Page, error)
- func (z *Client) GetGroups() ([]Group, Page, error)
- func (z *Client) GetLocales() ([]Locale, error)
- func (z Client) GetTicketField(ticketID int64) (TicketField, error)
- func (z Client) GetTicketFields() ([]TicketField, Page, error)
- func (z Client) GetTicketForms() ([]TicketForm, Page, error)
- func (z *Client) GetTriggers() ([]Trigger, Page, error)
- func (z *Client) GetUserFields() ([]UserField, Page, error)
- func (z *Client) GetUsers() ([]User, Page, error)
- func (z Client) Post(path string, data interface{}) ([]byte, error)
- func (z Client) Put(path string, data interface{}) ([]byte, error)
- func (z *Client) SetCredential(cred Credential)
- func (z *Client) SetEndpointURL(newURL string) error
- func (z *Client) SetHeader(key string, value string)
- func (z *Client) SetSubdomain(subdomain string) error
- type Credential
- type CustomFieldOption
- type DynamicContentItem
- type DynamicContentVariant
- type Error
- type Group
- type GroupAPI
- type Locale
- type LocaleAPI
- type Page
- type TicketField
- type TicketFieldAPI
- type TicketFieldSystemFieldOption
- type TicketForm
- type TicketFormAPI
- type Trigger
- type TriggerAPI
- type TriggerAction
- type TriggerCondition
- type User
- type UserAPI
- type UserField
Constants ¶
const ( // ActionFieldStatus status ActionFieldStatus = iota // ActionFieldType type ActionFieldType // ActionFieldPriority priority ActionFieldPriority // ActionFieldGroupID group_id ActionFieldGroupID // ActionFieldAssigneeID assignee_id ActionFieldAssigneeID // ActionFieldSetTags set_tags ActionFieldSetTags // ActionFieldCurrentTags current_tags ActionFieldCurrentTags // ActionFieldRemoveTags remove_tags ActionFieldRemoveTags // ActionFieldSatisfactionScore satisfaction_score ActionFieldSatisfactionScore // ActionFieldNotificationUser notification_user ActionFieldNotificationUser // ActionFieldNotificationGroup notification_group ActionFieldNotificationGroup // ActionFieldNotificationTarget notification_target ActionFieldNotificationTarget // ActionFieldTweetRequester tweet_requester ActionFieldTweetRequester // ActionFieldCC cc ActionFieldCC // ActionFieldLocaleID locale_id ActionFieldLocaleID // ActionFieldSubject subject ActionFieldSubject // ActionFieldCommentValue comment_value ActionFieldCommentValue // ActionFieldCommentValueHTML comment_value_html ActionFieldCommentValueHTML // ActionFieldCommentModeIsPublic comment_mode_is_public ActionFieldCommentModeIsPublic // ActionFieldTicketFormID ticket_form_id ActionFieldTicketFormID )
action field types which defined by system https://developer.zendesk.com/rest_api/docs/core/triggers#actions-reference
const ( // ConditionFieldGroupID group_id ConditionFieldGroupID = iota // ConditionFieldAssigneeID assignee_id ConditionFieldAssigneeID // ConditionFieldRequesterID requester_id ConditionFieldRequesterID // ConditionFieldOrganizationID organization_id ConditionFieldOrganizationID // ConditionFieldCurrentTags current_tags ConditionFieldCurrentTags // ConditionFieldViaID via_id ConditionFieldViaID // ConditionFieldRecipient recipient ConditionFieldRecipient // ConditionFieldType type ConditionFieldType // ConditionFieldStatus status ConditionFieldStatus // ConditionFieldPriority priority ConditionFieldPriority // ConditionFieldDescriptionIncludesWord description_includes_word ConditionFieldDescriptionIncludesWord // ConditionFieldLocaleID locale_id ConditionFieldLocaleID // ConditionFieldSatisfactionScore satisfaction_score ConditionFieldSatisfactionScore // ConditionFieldSubjectIncludesWord subject_includes_word ConditionFieldSubjectIncludesWord // ConditionFieldCommentIncludesWord comment_includes_word ConditionFieldCommentIncludesWord // ConditionFieldCurrentViaID current_via_id ConditionFieldCurrentViaID // ConditionFieldUpdateType update_type ConditionFieldUpdateType // ConditionFieldCommentIsPublic comment_is_public ConditionFieldCommentIsPublic // ConditionFieldTicketIsPublic ticket_is_public ConditionFieldTicketIsPublic // ConditionFieldReopens reopens ConditionFieldReopens // ConditionFieldReplies ConditionFieldReplies // ConditionFieldAgentStations agent_stations ConditionFieldAgentStations // ConditionFieldGroupStations group_stations ConditionFieldGroupStations // ConditionFieldInBusinessHours in_business_hours ConditionFieldInBusinessHours // ConditionFieldRequesterTwitterFollowersCount requester_twitter_followers_count ConditionFieldRequesterTwitterFollowersCount // ConditionFieldRequesterTwitterStatusesCount requester_twitter_statuses_count ConditionFieldRequesterTwitterStatusesCount // ConditionFieldRequesterTwitterVerified requester_twitter_verified ConditionFieldRequesterTwitterVerified // ConditionFieldTicketTypeID ticket_type_id ConditionFieldTicketTypeID // ConditionFieldExactCreatedAt exact_created_at ConditionFieldExactCreatedAt // ConditionFieldNew NEW ConditionFieldNew // ConditionFieldOpen OPEN ConditionFieldOpen // ConditionFieldPending PENDING ConditionFieldPending // ConditionFieldSolved SOLVED ConditionFieldSolved // ConditionFieldClosed CLOSED ConditionFieldClosed // ConditionFieldAssignedAt assigned_at ConditionFieldAssignedAt // ConditionFieldUpdatedAt updated_at ConditionFieldUpdatedAt // ConditionFieldRequesterUpdatedAt requester_updated_at ConditionFieldRequesterUpdatedAt // ConditionFieldAssigneeUpdatedAt ConditionFieldAssigneeUpdatedAt // ConditionFieldDueDate due_date ConditionFieldDueDate // ConditionFieldUntilDueDate until_due_date ConditionFieldUntilDueDate )
condition field types which are defined by system https://developer.zendesk.com/rest_api/docs/core/triggers#conditions-reference
const ( // LocaleENUS English LocaleENUS = 1 // LocaleES Spanish - español LocaleES = 2 // LocaleDE German - Deutsch LocaleDE = 8 // LocaleZHTW Traditional Chinese - 繁體中文 LocaleZHTW = 9 // LocaleZHCN Simplified Chinese - 简体中文 LocaleZHCN = 10 // LocalePL Polish - polski LocalePL = 13 // LocaleFR French - français LocaleFR = 16 // LocalePTBR Brazilian Portuguese - português (Brasil) LocalePTBR = 19 // LocaleIT Italian - italiano LocaleIT = 22 // LocaleRO Romanian - română LocaleRO = 23 // LocaleIS Icelandic - íslenska LocaleIS = 24 // LocaleVI Vietnamese - Tiếng Việt LocaleVI = 26 // LocaleRU Russian - русский LocaleRU = 27 // LocaleHE Hebrew - עברית LocaleHE = 30 // LocaleNO Norwegian - norsk LocaleNO = 34 // LocaleFIL Filipino LocaleFIL = 47 // LocaleAR Arabic - العربية LocaleAR = 66 // LocaleJA Japanese - 日本語 LocaleJA = 67 // LocaleKO Korean - 한국어 LocaleKO = 69 // LocaleSL Slovenian - slovenščina LocaleSL = 72 // LocaleHR Croatian - hrvatski LocaleHR = 74 // LocaleID Indonesian - Indonesia LocaleID = 77 // LocaleCS Czech - čeština LocaleCS = 78 // LocaleTH Thai - ไทย LocaleTH = 81 // LocaleFI Finnish - suomi LocaleFI = 84 // LocaleTR Turkish - Türkçe LocaleTR = 88 // LocaleSV Swedish - svenska LocaleSV = 92 // LocaleEL Greek - Ελληνικά LocaleEL = 93 // LocaleBG Bulgarian - български LocaleBG = 94 // LocaleET Estonian - eesti LocaleET = 101 // LocaleDA Danish - dansk LocaleDA = 1000 // LocaleSK Slovak - slovenčina LocaleSK = 1003 // LocaleNL Dutch - Nederlands LocaleNL = 1005 // LocaleHU Hungarian - magyar LocaleHU = 1009 // LocalePT Portuguese - português LocalePT = 1011 // LocaleFA Persian - فارسی LocaleFA = 1016 // LocaleCA Catalan - català LocaleCA = 1075 // LocaleLT Lithuanian - lietuvių LocaleLT = 1092 // LocaleLV Latvian - latviešu LocaleLV = 1101 // LocaleSR Serbian - српски LocaleSR = 1150 // LocaleUK Ukrainian - українська LocaleUK = 1173 // LocaleENGB British English LocaleENGB = 1176 // LocaleENCA Canadian English LocaleENCA = 1181 // LocaleESES European Spanish - español de España LocaleESES = 1186 // LocaleFRCA Canadian French - français canadien LocaleFRCA = 1187 // LocaleES419 Latin American Spanish - español latinoamericano LocaleES419 = 1194 // LocaleENAU Australian English LocaleENAU = 1277 // LocaleENIN English (India) LocaleENIN = 1278 // LocaleENIE English (Ireland) LocaleENIE = 1279 // LocaleENSG English (Singapore) LocaleENSG = 1281 // LocaleENNZ English (New Zealand) LocaleENNZ = 1288 // LocaleENZA English (South Africa) LocaleENZA = 1289 // LocaleFRBE French (Belgium) - français (Belgique) LocaleFRBE = 1291 // LocaleFRCH Swiss French - français suisse LocaleFRCH = 1292 // LocaleNLBE Flemish - Nederlands (België) LocaleNLBE = 1293 // LocaleDEAT Austrian German - Österreichisches Deutsch LocaleDEAT = 1294 // LocaleDECH Swiss High German - Schweizer Hochdeutsch LocaleDECH = 1295 // LocaleSRME Serbian (Montenegro) - srpski (Crna Gora) LocaleSRME = 1298 // LocaleHI Hindi - हिन्दी LocaleHI = 1303 // LocaleMS Malay - Bahasa Melayu LocaleMS = 1307 // LocaleENBE English (Belgium) LocaleENBE = 1350 // LocaleESMX Mexican Spanish - español de México LocaleESMX = 1364 // LocaleFRFR French (France) - français (France) LocaleFRFR = 1365 // LocaleENPH English (Philippines) LocaleENPH = 1392 )
const ( // UserRoleEndUser end-user UserRoleEndUser = iota // UserRoleAgent agent UserRoleAgent // UserRoleAdmin admin UserRoleAdmin )
const ( // ViaWebForm : Web form ViaWebForm = 0 // ViaMail : Email ViaMail = 4 // ViaChat : Chat ViaChat = 29 // ViaTwitter : Twitter ViaTwitter = 30 // ViaTwitterDM : Twitter DM ViaTwitterDM = 26 // TwitterFavorite : Twitter like ViaTwitterFavorite = 23 // ViaVoicemail : Voicemail ViaVoicemail = 33 // ViaPhoneCallInbound : Phone call (incoming) ViaPhoneCallInbound = 34 // ViaPhoneCallOutbound : Phone call (outbound) ViaPhoneCallOutbound = 35 // ViaAPIVoicemail : CTI voicemail ViaAPIVoicemail = 44 // ViaAPIPhoneCallInbound : CTI phone call (inbound) ViaAPIPhoneCallInbound = 45 // ViaAPIPhoneCallOutbound : CTI phone call (outbound) ViaAPIPhoneCallOutbound = 46 // ViaSMS : SMS ViaSMS = 57 // ViaGetSatisfaction : Get Satisfaction ViaGetSatisfaction = 16 // ViaWebWidget : Web Widget ViaWebWidget = 48 // ViaMobileSDK : Mobile SDK ViaMobileSDK = 49 // ViaMobile : Mobile ViaMobile = 56 // ViaHelpCenter : Help Center post ViaHelpCenter = 50 // ViaWebService : Web service (API) ViaWebService = 5 // ViaRule : Trigger, automation ViaRule = 8 // ViaClosedTicket : Closed ticket ViaClosedTicket = 27 // ViaTicketSharing : Ticket Sharing ViaTicketSharing = 31 // ViaFacebookPost : Facebook post ViaFacebookPost = 38 // ViaFacebookMessage : Facebook private message ViaFacebookMessage = 41 // ViaSatisfactionPrediction : Satisfaction prediction ViaSatisfactionPrediction = 54 // ViaAnyChannel : Channel framework ViaAnyChannel = 55 )
https://developer.zendesk.com/rest_api/docs/support/triggers#via-types
Variables ¶
This section is empty.
Functions ¶
func ActionFieldText ¶
ActionFieldText takes field type and returns field name string
func ConditionFieldText ¶
ConditionFieldText takes field type and returns field name string
func LocaleTypeText ¶ added in v0.1.0
LocaleTypeText returns locale type text
func UserRoleText ¶ added in v0.1.0
UserRoleText takes role type and returns role name string
Types ¶
type API ¶ added in v0.1.2
type API interface { GroupAPI LocaleAPI TicketFieldAPI TicketFormAPI TriggerAPI UserAPI }
API an interface containing all of the zendesk client methods
type APITokenCredential ¶
type APITokenCredential struct {
// contains filtered or unexported fields
}
APITokenCredential is type of credential for API token authentication
func NewAPITokenCredential ¶
func NewAPITokenCredential(email string, apiToken string) *APITokenCredential
NewAPITokenCredential creates APITokenCredential and returns its pointer
func (APITokenCredential) Email ¶
func (c APITokenCredential) Email() string
Email is accessor which returns email address
func (APITokenCredential) Secret ¶
func (c APITokenCredential) Secret() string
Secret is accessor which returns API token
type BasicAuthCredential ¶
type BasicAuthCredential struct {
// contains filtered or unexported fields
}
BasicAuthCredential is type of credential for Basic authentication
func NewBasicAuthCredential ¶
func NewBasicAuthCredential(email string, password string) *BasicAuthCredential
NewBasicAuthCredential creates BasicAuthCredential and returns its pointer
func (BasicAuthCredential) Email ¶
func (c BasicAuthCredential) Email() string
Email is accessor which returns email address
func (BasicAuthCredential) Secret ¶
func (c BasicAuthCredential) Secret() string
Secret is accessor which returns password
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client of Zendesk API
func (*Client) CreateDynamicContentItem ¶ added in v0.1.0
func (z *Client) CreateDynamicContentItem(item DynamicContentItem) (DynamicContentItem, error)
CreateDynamicContentItem creates new dynamic content item https://developer.zendesk.com/rest_api/docs/support/dynamic_content#create-item
func (*Client) CreateGroup ¶ added in v0.1.0
CreateGroup creates new group https://developer.zendesk.com/rest_api/docs/support/groups#create-group
func (Client) CreateTicketField ¶
func (z Client) CreateTicketField(ticketField TicketField) (TicketField, error)
CreateTicketField creates new ticket field ref: https://developer.zendesk.com/rest_api/docs/core/ticket_fields#create-ticket-field
func (Client) CreateTicketForm ¶
func (z Client) CreateTicketForm(ticketForm TicketForm) (TicketForm, error)
CreateTicketForm creates new ticket form ref: https://developer.zendesk.com/rest_api/docs/core/ticket_forms#create-ticket-forms
func (Client) CreateTrigger ¶
CreateTrigger creates new trigger ref: https://developer.zendesk.com/rest_api/docs/core/triggers#create-trigger
func (Client) CreateUser ¶ added in v0.1.0
CreateUser creates new user ref: https://developer.zendesk.com/rest_api/docs/core/triggers#create-trigger
func (Client) Delete ¶ added in v0.1.3
Delete sends data to API and returns an error if unsuccessful
func (*Client) GetDynamicContentItems ¶ added in v0.1.0
func (z *Client) GetDynamicContentItems() ([]DynamicContentItem, Page, error)
GetDynamicContentItems fetches dynamic content item list https://developer.zendesk.com/rest_api/docs/support/dynamic_content#list-items
func (*Client) GetGroups ¶ added in v0.1.0
GetGroups fetches group list https://developer.zendesk.com/rest_api/docs/support/groups#list-groups
func (*Client) GetLocales ¶ added in v0.1.0
GetLocales lists the translation locales available for the account. https://developer.zendesk.com/rest_api/docs/support/locales#list-locales
func (Client) GetTicketField ¶ added in v0.1.0
func (z Client) GetTicketField(ticketID int64) (TicketField, error)
GetTicketField gets a specified ticket field ref: https://developer.zendesk.com/rest_api/docs/support/ticket_fields#show-ticket-field
func (Client) GetTicketFields ¶
func (z Client) GetTicketFields() ([]TicketField, Page, error)
GetTicketFields fetches ticket field list ref: https://developer.zendesk.com/rest_api/docs/core/ticket_fields#list-ticket-fields
func (Client) GetTicketForms ¶
func (z Client) GetTicketForms() ([]TicketForm, Page, error)
GetTicketForms fetches ticket forms
func (*Client) GetTriggers ¶
GetTriggers fetch trigger list
func (*Client) GetUserFields ¶ added in v0.1.0
GetUserFields fetch trigger list
func (*Client) SetCredential ¶
func (z *Client) SetCredential(cred Credential)
SetCredential saves credential in client. It will be set to request header when call API
func (*Client) SetEndpointURL ¶
SetEndpointURL replace full URL of endpoint without subdomain validation. This is mainly used for testing to point to mock API server.
func (*Client) SetHeader ¶
SetHeader saves HTTP header in client. It will be included all API request
func (*Client) SetSubdomain ¶
SetSubdomain saves subdomain in client. It will be used when call API
type Credential ¶
Credential is interface of API credential
type CustomFieldOption ¶ added in v0.1.0
type CustomFieldOption struct { ID int64 `json:"id,omitempty"` Name string `json:"name"` Position int64 `json:"position,omitempty"` RawName string `json:"raw_name,omitempty"` URL string `json:"url,omitempty"` Value string `json:"value"` }
CustomFieldOption is struct for value of `custom_field_options`
type DynamicContentItem ¶ added in v0.1.0
type DynamicContentItem struct { ID int64 `json:"id,omitempty"` URL string `json:"url,omitempty"` Name string `json:"name"` Placeholder string `json:"placeholder,omitempty"` DefaultLocaleID int64 `json:"default_locale_id"` Outdated bool `json:"outdated,omitempty"` Variants []DynamicContentVariant `json:"variants"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
DynamicContentItem is zendesk dynamic content item JSON payload format https://developer.zendesk.com/rest_api/docs/support/users
type DynamicContentVariant ¶ added in v0.1.0
type DynamicContentVariant struct { ID int64 `json:"id,omitempty"` URL string `json:"url,omitempty"` Content string `json:"content"` LocaleID int64 `json:"locale_id"` Outdated bool `json:"outdated,omitempty"` Active bool `json:"active,omitempty"` Default bool `json:"default,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
DynamicContentVariant is zendesk dynamic content variant JSON payload format https://developer.zendesk.com/rest_api/docs/support/dynamic_content#json-format-for-variants
type Error ¶ added in v0.1.2
type Error struct {
// contains filtered or unexported fields
}
Error an error type containing the http response from zendesk
func (Error) Body ¶ added in v0.1.3
func (e Error) Body() io.ReadCloser
Body is the Body of the HTTP response
type Group ¶ added in v0.1.0
type Group struct { ID int64 `json:"id,omitempty"` URL string `json:"url,omitempty"` Name string `json:"name"` Deleted bool `json:"deleted,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
Group is struct for group payload https://developer.zendesk.com/rest_api/docs/support/groups
type GroupAPI ¶ added in v0.1.2
type GroupAPI interface { GetGroups() ([]Group, Page, error) CreateGroup(group Group) (Group, error) }
GroupAPI an interface containing all methods associated with zendesk groups
type Locale ¶ added in v0.1.0
type Locale struct { ID int64 `json:"id"` URL string `json:"url"` Locale string `json:"locale"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Locale is zendesk locale JSON payload format https://developer.zendesk.com/rest_api/docs/support/locales
type LocaleAPI ¶ added in v0.1.2
LocaleAPI an interface containing all of the local related zendesk methods
type Page ¶
type Page struct { PreviousPage *string `json:"previous_page"` NextPage *string `json:"next_page"` Count int64 `json:"count"` }
Page is base struct for resource pagination
type TicketField ¶
type TicketField struct { ID int64 `json:"id,omitempty"` URL string `json:"url,omitempty"` Type string `json:"type"` Title string `json:"title"` RawTitle string `json:"raw_title,omitempty"` Description string `json:"description,omitempty"` RawDescription string `json:"raw_description,omitempty"` Position int64 `json:"position,omitempty"` Active bool `json:"active,omitempty"` Required bool `json:"required,omitempty"` CollapsedForAgents bool `json:"collapsed_for_agents,omitempty"` RegexpForValidation string `json:"regexp_for_validation,omitempty"` TitleInPortal string `json:"title_in_portal,omitempty"` RawTitleInPortal string `json:"raw_title_in_portal,omitempty"` VisibleInPortal bool `json:"visible_in_portal,omitempty"` EditableInPortal bool `json:"editable_in_portal,omitempty"` RequiredInPortal bool `json:"required_in_portal,omitempty"` Tag string `json:"tag,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` SystemFieldOptions []TicketFieldSystemFieldOption `json:"system_field_options,omitempty"` CustomFieldOptions []CustomFieldOption `json:"custom_field_options,omitempty"` SubTypeID int64 `json:"sub_type_id,omitempty"` Removable bool `json:"removable,omitempty"` AgentDescription string `json:"agent_description,omitempty"` }
TicketField is struct for ticket_field payload
type TicketFieldAPI ¶ added in v0.1.2
type TicketFieldAPI interface { GetTicketFields() ([]TicketField, Page, error) CreateTicketField(ticketField TicketField) (TicketField, error) GetTicketField(ticketID int64) (TicketField, error) }
TicketFieldAPI an interface containing all of the ticket field related zendesk methods
type TicketFieldSystemFieldOption ¶
type TicketFieldSystemFieldOption struct { ID int64 `json:"id"` Name string `json:"name"` Position int64 `json:"position"` RawName string `json:"raw_name"` URL string `json:"url"` Value string `json:"value"` }
TicketFieldSystemFieldOption is struct for value of `system_field_options`
type TicketForm ¶
type TicketForm struct { ID int64 `json:"id,omitempty"` Name string `json:"name"` RawName string `json:"raw_name,omitempty"` DisplayName string `json:"display_name,omitempty"` RawDisplayName string `json:"raw_display_name,omitempty"` Position int64 `json:"position"` Active bool `json:"active,omitempty"` EndUserVisible bool `json:"end_user_visible,omitempty"` Default bool `json:"default,omitempty"` TicketFieldIDs []int64 `json:"ticket_field_ids,omitempty"` InAllBrands bool `json:"in_all_brands,omitempty"` RestrictedBrandIDs []int64 `json:"restricted_brand_ids,omitempty"` }
TicketForm is JSON payload struct
type TicketFormAPI ¶ added in v0.1.2
type TicketFormAPI interface { GetTicketForms() ([]TicketForm, Page, error) CreateTicketForm(ticketForm TicketForm) (TicketForm, error) }
TicketFormAPI an interface containing all ticket form related methods
type Trigger ¶
type Trigger struct { ID int64 `json:"id,omitempty"` Title string `json:"title"` Active bool `json:"active,omitempty"` Position int64 `json:"position,omitempty"` Conditions struct { All []TriggerCondition `json:"all"` Any []TriggerCondition `json:"any"` } `json:"conditions"` Actions []TriggerAction `json:"actions"` Description string `json:"description,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
Trigger is zendesk trigger JSON payload format ref: https://developer.zendesk.com/rest_api/docs/core/triggers#json-format
type TriggerAPI ¶ added in v0.1.2
type TriggerAPI interface { GetTriggers() ([]Trigger, Page, error) CreateTrigger(trigger Trigger) (Trigger, error) }
TriggerAPI an interface containing all trigger related methods
type TriggerAction ¶
type TriggerAction struct { Field string `json:"field"` Value interface{} `json:"value"` }
TriggerAction is zendesk trigger action ref: https://developer.zendesk.com/rest_api/docs/core/triggers#actions
type TriggerCondition ¶
type TriggerCondition struct { Field string `json:"field"` Operator string `json:"operator"` Value string `json:"value"` }
TriggerCondition zendesk trigger condition ref: https://developer.zendesk.com/rest_api/docs/core/triggers#conditions-reference
type User ¶ added in v0.1.0
type User struct { ID int64 `json:"id,omitempty"` URL string `json:"url,omitempty"` Email string `json:"email,omitempty"` Name string `json:"name"` Active bool `json:"active,omitempty"` Alias string `json:"alias,omitempty"` ChatOnly bool `json:"chat_only,omitempty"` CustomRoleID int64 `json:"custom_role_id,omitempty"` RoleType int64 `json:"role_type,omitempty"` Details string `json:"details,omitempty"` ExternalID string `json:"external_id,omitempty"` Locale string `json:"locale,omitempty"` LocaleID int64 `json:"locale_id,omitempty"` Moderator bool `json:"moderator,omitempty"` Notes string `json:"notes,omitempty"` OnlyPrivateComments bool `json:"only_private_comments,omitempty"` OrganizationID int64 `json:"organization_id,omitempty"` DefaultGroupID int64 `json:"default_group_id,omitempty"` Phone string `json:"phone,omitempty"` //TODO: Photo Attachment RestrictedAgent bool `json:"restricted_agent,omitempty"` Role string `json:"role,omitempty"` Signature string `json:"signature,omitempty"` Suspended bool `json:"suspended,omitempty"` Tags []string `json:"tags,omitempty"` TicketRestriction string `json:"ticket_restriction,omitempty"` Timezone string `json:"time_zone,omitempty"` TwoFactorAuthEnabled bool `json:"two_factor_auth_enabled,omitempty"` //TODO: UserFields UserFields Verified bool `json:"verified,omitempty"` ReportCSV bool `json:"report_csv,omitempty"` LastLoginAt time.Time `json:"last_login_at,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
User is zendesk user JSON payload format https://developer.zendesk.com/rest_api/docs/support/users
type UserField ¶ added in v0.1.0
type UserField struct { ID int64 `json:"id,omitempty"` URL string `json:"url,omitempty"` Key string `json:"key,omitempty"` Type string `json:"type"` Title string `json:"title"` RawTitle string `json:"raw_title,omitempty"` Description string `json:"description,omitempty"` RawDescription string `json:"raw_description,omitempty"` Position int64 `json:"position,omitempty"` Active bool `json:"active,omitempty"` System bool `json:"system,omitempty"` RegexpForValidation string `json:"regexp_for_validation,omitempty"` Tag string `json:"tag,omitempty"` CustomFieldOptions []CustomFieldOption `json:"custom_field_options"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
UserField is struct for user_field payload