zendesk

package
v0.0.55 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Zendesk API client library for Go (golang).

Index

Constants

View Source
const (
	PriorityUrgent = "urgent"
	PriorityHigh   = "high"
	PriorityNormal = "normal"
	PriorityLow    = "low"
)
View Source
const (
	StatusNew     = "new"
	StatusOpen    = "open"
	StatusPending = "pending"
	StatusHold    = "hold"
	StatusSolved  = "solved"
	StatusClosed  = "closed"
	StatusDeleted = "deleted"
)
View Source
const (
	WebhookHeaderSignature          string = "X-Zendesk-Webhook-Signature"
	WebhookHeaderSignatureTimestamp string = "X-Zendesk-Webhook-Signature-Timestamp"
)
View Source
const (
	WebhookEventTypePrefixAgentState        string = "zen:event-type:agent"
	WebhookEventTypePrefixUser              string = "zen:event-type:user"
	WebhookEventTypePrefixOrganization      string = "zen:event-type:organization"
	WebhookEventTypePrefixCommunityPost     string = "zen:event-type:community_post"
	WebhookEventTypePrefixOmnichannelConfig string = "zen:event-type:omnichannel_config"
	WebhookEventTypePrefixArticle           string = "zen:event-type:article"
)
View Source
const (
	RequestHeaderRetryAttempts string = "X-Attempt-Count"
)

Variables

This section is empty.

Functions

func SetTimeout added in v0.0.29

func SetTimeout(timeout time.Duration) configOption

func WithFilterForAction added in v0.0.21

func WithFilterForAction(action AuditLogAction) listAccountConfigurationAuditLogModifier

func WithFilterForActorID added in v0.0.21

func WithFilterForActorID(actorID ActorID) listAccountConfigurationAuditLogModifier

func WithFilterForCreatedAt added in v0.0.21

func WithFilterForCreatedAt(startTime time.Time, endTime time.Time) listAccountConfigurationAuditLogModifier

func WithFilterForEndTime added in v0.0.44

func WithFilterForEndTime(endTime time.Time) listTicketSatisfactionRatingModifier

func WithFilterForIPAddress added in v0.0.26

func WithFilterForIPAddress(ipAddress string) listAccountConfigurationAuditLogModifier

func WithFilterForScore added in v0.0.44

func WithFilterForScore(score SatisfactionRatingScore) listTicketSatisfactionRatingModifier

func WithFilterForSourceID added in v0.0.21

func WithFilterForSourceID(sourceType string, sourceID uint64) listAccountConfigurationAuditLogModifier

Filter audit logs by the source id. Requires filter[source_type] to also be set.

func WithFilterForSourceType added in v0.0.21

func WithFilterForSourceType(sourceType string) listAccountConfigurationAuditLogModifier

func WithFilterForStartTime added in v0.0.44

func WithFilterForStartTime(startTime time.Time) listTicketSatisfactionRatingModifier

func WithLogger

func WithLogger(logger *log.Logger) configOption

func WithPageSize added in v0.0.24

func WithPageSize(pageSize uint8) listAccountConfigurationAuditLogModifier

func WithRequestPreProcessor

func WithRequestPreProcessor(requestPreProcessor RequestPreProcessor) configOption

func WithRoundTripper

func WithRoundTripper(roundTripper http.RoundTripper) configOption

func WithSlogger added in v0.0.38

func WithSlogger(logger *slog.Logger) configOption

func WithSort added in v0.0.24

func WithSort(field string, direction CursorPaginationSortDirection) listAccountConfigurationAuditLogModifier

func WithUserAgent added in v0.0.17

func WithUserAgent(userAgent string) configOption

Types

type AccountID added in v0.0.45

type AccountID uint64

type ActorID added in v0.0.21

type ActorID int64

type AgentEvent added in v0.0.4

type AgentEvent struct {
	StartTime     time.Time       `json:"timestamp"`
	AccountID     ChatAccountID   `json:"account_id"`
	AgentID       UserID          `json:"agent_id"`
	FieldName     string          `json:"field_name"`
	ID            string          `json:"id"`
	PreviousValue AgentEventValue `json:"previous_value"`
	Value         AgentEventValue `json:"value"`
}

type AgentEventExportResponse added in v0.0.4

type AgentEventExportResponse struct {
	AgentEvents []AgentEvent `json:"agent_events"`
	EndTimeUnix float64      `json:"end_time"`
	NextPage    string       `json:"next_page"`
	Count       int64        `json:"count"`
}

func (AgentEventExportResponse) EndTime added in v0.0.4

func (response AgentEventExportResponse) EndTime() time.Time

type AgentEventService added in v0.0.4

type AgentEventService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/live-chat/chat-api/incremental_agent_events_api/

func (*AgentEventService) GetAgentStates added in v0.0.4

func (s *AgentEventService) GetAgentStates(
	ctx context.Context,
) AgentStates

func (*AgentEventService) UpdateAgentStates added in v0.0.4

func (s *AgentEventService) UpdateAgentStates(
	ctx context.Context,
	defaultStateTime time.Time,
) error

type AgentEventValue added in v0.0.4

type AgentEventValue string

func (*AgentEventValue) UnmarshalJSON added in v0.0.4

func (a *AgentEventValue) UnmarshalJSON(data []byte) error

type AgentScopePermission added in v0.0.35

type AgentScopePermission string
const (
	ScopeRead   AgentScopePermission = "read"
	ScopeUpdate AgentScopePermission = "update"
	ScopeDelete AgentScopePermission = "delete"
	ScopeCreate AgentScopePermission = "create"
)

type AgentState added in v0.0.4

type AgentState struct {
	AgentID         UserID
	EngagementCount uint64
	Status          string
	StatusSince     time.Time
	Timestamp       time.Time
}

type AgentStates added in v0.0.4

type AgentStates map[UserID]AgentState

type Article

type Article struct {
	AuthorID          UserID            `json:"author_id"`
	Body              string            `json:"body"`
	CommentsDisabled  bool              `json:"comments_disabled"`
	ContentTagIds     []any             `json:"content_tag_ids"`
	CreatedAt         time.Time         `json:"created_at"`
	Draft             bool              `json:"draft"`
	EditedAt          time.Time         `json:"edited_at"`
	HTMLURL           string            `json:"html_url"`
	ID                ArticleID         `json:"id"`
	LabelNames        []any             `json:"label_names"`
	Locale            string            `json:"locale"`
	Name              string            `json:"name"`
	Outdated          bool              `json:"outdated"`
	PermissionGroupID PermissionGroupID `json:"permission_group_id"`
	Position          int64             `json:"position"`
	Promoted          bool              `json:"promoted"`
	SectionID         SectionID         `json:"section_id"`
	SourceLocale      string            `json:"source_locale"`
	Title             string            `json:"title"`
	UpdatedAt         time.Time         `json:"updated_at"`
	URL               string            `json:"url"`
	UserSegmentID     UserSegmentID     `json:"user_segment_id"`
	VoteCount         uint64            `json:"vote_count"`
	VoteSum           int64             `json:"vote_sum"`
}

type ArticleID

type ArticleID uint64

type ArticleResponse

type ArticleResponse struct {
	Article Article `json:"article"`
}

type ArticleService added in v0.0.12

type ArticleService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/

type ArticlesResponse

type ArticlesResponse struct {
	Articles []Article `json:"articles"`
	CursorPaginationResponse
}

type AttachmentID added in v0.0.35

type AttachmentID uint64

type AuditID added in v0.0.35

type AuditID uint64

type AuditLog added in v0.0.21

type AuditLog struct {
	Action            AuditLogAction `json:"action"`
	ActionLabel       string         `json:"action_label"`
	ActorID           ActorID        `json:"actor_id"`
	ActorName         string         `json:"actor_name"`
	ChangeDescription string         `json:"change_description"`
	CreatedAt         time.Time      `json:"created_at"`
	ID                AuditLogID     `json:"id"`
	IPAddress         *string        `json:"ip_address"`
	SourceID          SourceID       `json:"source_id"`
	SourceLabel       string         `json:"source_label"`
	SourceType        string         `json:"source_type"`
	URL               string         `json:"url"`
}

https://developer.zendesk.com/api-reference/ticketing/account-configuration/audit_logs/#json-format

type AuditLogAction added in v0.0.21

type AuditLogAction string
const (
	Create   AuditLogAction = "create"
	Destroy  AuditLogAction = "destroy"
	Exported AuditLogAction = "exported"
	Login    AuditLogAction = "login"
	Update   AuditLogAction = "update"
)

type AuditLogID added in v0.0.21

type AuditLogID uint64

type AuditLogService added in v0.0.21

type AuditLogService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/account-configuration/audit_logs/

type AuditLogsResponse added in v0.0.21

type AuditLogsResponse struct {
	AuditLogs []AuditLog `json:"audit_logs"`
	CursorPaginationResponse
}

type AuthenticationPassword

type AuthenticationPassword struct {
	Email    string
	Password string
}

func (AuthenticationPassword) AddZendeskAuthentication

func (auth AuthenticationPassword) AddZendeskAuthentication(r *http.Request)

type AuthenticationToken

type AuthenticationToken struct {
	Email string
	Token string
}

func (AuthenticationToken) AddZendeskAuthentication

func (auth AuthenticationToken) AddZendeskAuthentication(r *http.Request)

type Automation added in v0.0.51

type Automation struct {
	ID         AutomationID           `json:"id"`
	URL        string                 `json:"url"`
	Title      string                 `json:"title"`
	Active     bool                   `json:"active"`
	UpdatedAt  time.Time              `json:"updated_at"`
	CreatedAt  time.Time              `json:"created_at"`
	Default    bool                   `json:"default"`
	Actions    []BusinessRuleAction   `json:"actions"`
	Conditions BusinessRuleConditions `json:"conditions"`
	Position   int                    `json:"position"`
	RawTitle   string                 `json:"raw_title"`
}

type AutomationID added in v0.0.51

type AutomationID uint64

type AutomationService added in v0.0.51

type AutomationService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/business-rules/automations/

type AutomationsResponse added in v0.0.51

type AutomationsResponse struct {
	Automations []Automation `json:"automations"`
	CursorPaginationResponse
}

type Brand added in v0.0.39

type Brand struct {
	Active            bool                `json:"active"`
	BrandURL          string              `json:"brand_url"`
	CreatedAt         time.Time           `json:"created_at"`
	Default           bool                `json:"default"`
	HasHelpCenter     bool                `json:"has_help_center"`
	HelpCenterState   string              `json:"help_center_state"`
	HostMapping       string              `json:"host_mapping"`
	ID                BrandID             `json:"id"`
	IsDeleted         bool                `json:"is_deleted"`
	Name              string              `json:"name"`
	SignatureTemplate string              `json:"signature_template"`
	Subdomain         string              `json:"subdomain"`
	TicketFormIDs     []TicketFormID      `json:"ticket_form_ids"`
	UpdatedAt         *time.Time          `json:"updated_at"`
	URL               string              `json:"url"`
}

https://developer.zendesk.com/api-reference/ticketing/account-configuration/brands/#json-format

type BrandID added in v0.0.39

type BrandID uint64

type BrandLogoAttachment added in v0.0.39

type BrandLogoAttachment struct {
	ContentType      string       `json:"content_type"`
	ContentURL       string       `json:"content_url"`
	Deleted          bool         `json:"deleted"`
	FileName         string       `json:"file_name"`
	Height           uint64       `json:"height"`
	ID               AttachmentID `json:"id"`
	Inline           bool         `json:"inline"`
	MappedContentURL string       `json:"mapped_content_url"`
	Size             uint64       `json:"size"`
	URL              string       `json:"url"`
	Width            uint64       `json:"width"`
}

type BrandResponse added in v0.0.39

type BrandResponse struct {
	Brand Brand `json:"brand"`
}

type BrandService added in v0.0.39

type BrandService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/account-configuration/brands/

type BrandsResponse added in v0.0.39

type BrandsResponse struct {
	Brands []Brand `json:"brands"`
	CursorPaginationResponse
}

type BusinessRuleAction added in v0.0.51

type BusinessRuleAction struct {
	Field string `json:"field"`
	Value any    `json:"value"`
}

type BusinessRuleCondition added in v0.0.51

type BusinessRuleCondition struct {
	Field    string `json:"field"`
	Operator string `json:"operator"`
	Value    any    `json:"value"`
}

type BusinessRuleConditions added in v0.0.51

type BusinessRuleConditions struct {
	All []BusinessRuleCondition `json:"all"`
	Any []BusinessRuleCondition `json:"any"`
}

type CategoriesResponse

type CategoriesResponse struct {
	Categories []Category `json:"categories"`
	CursorPaginationResponse
}

type Category

type Category struct {
	CreatedAt    time.Time  `json:"created_at"`
	Description  string     `json:"description"`
	HTMLURL      string     `json:"html_url"`
	ID           CategoryID `json:"id"`
	Locale       string     `json:"locale"`
	Name         string     `json:"name"`
	Outdated     bool       `json:"outdated"`
	Position     int64      `json:"position"`
	SourceLocale string     `json:"source_locale"`
	UpdatedAt    time.Time  `json:"updated_at"`
	URL          string     `json:"url"`
}

type CategoryID

type CategoryID uint64

type CategoryResponse

type CategoryResponse struct {
	Category Category `json:"category"`
}

type CategoryService added in v0.0.12

type CategoryService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/help_center/help-center-api/categories/

func (CategoryService) List added in v0.0.26

func (s CategoryService) List(
	ctx context.Context,
	pageHandler func(response CategoriesResponse) error,
) error

type Chat

type Chat struct {
	ID              ChatID           `json:"id"`
	Visitor         ChatVisitor      `json:"visitor"`
	StartedBy       string           `json:"started_by"`
	Session         ChatSession      `json:"session"`
	WebPath         []ChatWebPath    `json:"webpath"`
	Timestamp       time.Time        `json:"timestamp"`
	Count           ChatCount        `json:"count"`
	Duration        uint64           `json:"duration"`
	ResponseTime    ChatResponseTime `json:"response_time"`
	AgentIds        []UserID         `json:"agent_ids"`
	Triggered       bool             `json:"triggered"`
	Unread          bool             `json:"unread"`
	Missed          bool             `json:"missed"`
	Tags            []Tag            `json:"tags"`
	Type            string           `json:"type"`
	History         []ChatHistory    `json:"history"`
	DepartmentID    *GroupID         `json:"department_id"`
	EndTimestamp    time.Time        `json:"end_timestamp"`
	ZendeskTicketID TicketID         `json:"zendesk_ticket_id"`
}

type ChatAccountID added in v0.0.12

type ChatAccountID uint64

type ChatConversationsService added in v0.0.47

type ChatConversationsService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/live-chat/introduction/

type ChatCount

type ChatCount struct {
	Visitor uint64 `json:"visitor"`
	Agent   uint64 `json:"agent"`
	Total   uint64 `json:"total"`
}

type ChatCredentials

type ChatCredentials struct {
	ClientID     string
	ClientSecret string
}

type ChatEngagement added in v0.0.2

type ChatEngagement struct {
	ID           ChatEngagementID `json:"id"`
	AgentID      UserID           `json:"agent_id"`
	DepartmentID *GroupID         `json:"department_id"`
	Assigned     bool             `json:"assigned"`
	Accepted     bool             `json:"accepted"`
	StartedBy    string           `json:"started_by"`
	Timestamp    time.Time        `json:"timestamp"`
	Duration     float64          `json:"duration"`
	Count        ChatCount        `json:"count"`
	ResponseTime ChatResponseTime `json:"response_time"`
}

type ChatEngagementID added in v0.0.2

type ChatEngagementID string

type ChatHistory

type ChatHistory struct {
	DepartmentID   GroupID   `json:"department_id"`
	DepartmentName string    `json:"department_name"`
	Name           string    `json:"name"`
	Channel        string    `json:"channel"`
	Index          int       `json:"index"`
	Timestamp      time.Time `json:"timestamp"`
	Type           string    `json:"type"`
	Msg            string    `json:"msg"`
	Options        string    `json:"options"`
	MsgID          string    `json:"msg_id"`
	SenderType     string    `json:"sender_type"`
	Source         string    `json:"source"`
	AgentID        UserID    `json:"agent_id,string"`
	Reason         string    `json:"reason"`
}

type ChatID

type ChatID string

type ChatMetricWindow added in v0.0.47

type ChatMetricWindow struct {
	SixtyMinuteWindow  int64 `json:"60"`
	ThirtyMinuteWindow int64 `json:"30"`
}

type ChatMetrics added in v0.0.46

type ChatMetrics struct {
	MissedChats      *ChatMetricWindow `json:"missed_chats"`
	ChatDurationMax  *int64            `json:"chat_duration_max"`
	SatisfactionBad  *ChatMetricWindow `json:"satisfaction_bad"`
	ActiveChats      int64             `json:"active_chats"`
	SatisfactionGood *ChatMetricWindow `json:"satisfaction_good"`
	IncomingChats    int64             `json:"incoming_chats"`
	AssignedChats    int64             `json:"assigned_chats"`
	ChatDurationAvg  *int64            `json:"chat_duration_avg"`
	WaitingTimeAvg   *int64            `json:"waiting_time_avg"`
	ResponseTimeAvg  *int64            `json:"response_time_avg"`
	WaitingTimeMax   *int64            `json:"waiting_time_max"`
	ResponseTimeMax  *int64            `json:"response_time_max"`
}

https://developer.zendesk.com/api-reference/live-chat/real-time-chat-api/rest/#example-response

type ChatResponseTime

type ChatResponseTime struct {
	First uint64  `json:"first"`
	Avg   float64 `json:"avg"`
	Max   uint64  `json:"max"`
}

type ChatSession

type ChatSession struct {
	EndDate     time.Time `json:"end_date"`
	CountryCode string    `json:"country_code"`
	City        string    `json:"city"`
	Browser     string    `json:"browser"`
	IP          string    `json:"ip"`
	CountryName string    `json:"country_name"`
	ID          string    `json:"id"`
	Region      string    `json:"region"`
	Platform    string    `json:"platform"`
	UserAgent   string    `json:"user_agent"`
	StartDate   time.Time `json:"start_date"`
}

type ChatVisitor

type ChatVisitor struct {
	Name  string `json:"name"`
	Notes string `json:"notes"`
	ID    string `json:"id"`
	Phone string `json:"phone"`
	Email string `json:"email"`
}

type ChatWebPath

type ChatWebPath struct {
	Timestamp time.Time `json:"timestamp"`
	To        string    `json:"to"`
	From      string    `json:"from"`
	Title     string    `json:"title"`
}

type ChatsIncrementalExportResponse

type ChatsIncrementalExportResponse struct {
	Chats       []IncrementalExportChat `json:"chats"`
	Count       uint64                  `json:"count"`
	EndID       ChatID                  `json:"end_id"`
	EndTimeUnix int64                   `json:"end_time"`
	NextPage    string                  `json:"next_page"`
}

func (ChatsIncrementalExportResponse) EndTime

func (response ChatsIncrementalExportResponse) EndTime() time.Time

type ChatsResponse

type ChatsResponse struct {
	Chats   []Chat  `json:"chats"`
	NextURL *string `json:"next_url"`
}

type ChatsSearchResponse added in v0.0.3

type ChatsSearchResponse struct {
	Results []ChatsSearchResult `json:"results"`
	NextURL *string             `json:"next_url"`
}

type ChatsSearchResult added in v0.0.47

type ChatsSearchResult struct {
	ID        ChatID    `json:"id"`
	Timestamp time.Time `json:"timestamp"`
	Preview   string    `json:"preview"`
	Type      string    `json:"type"`
}

type ChatsService

type ChatsService struct {
	// contains filtered or unexported fields
}

func (*ChatsService) Search added in v0.0.3

func (s *ChatsService) Search(
	ctx context.Context,
	query string,
	pageHandler func(page ChatsSearchResponse) error,
) error

https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/#search-chats

type ChatsStreamResponse added in v0.0.46

type ChatsStreamResponse struct {
	Content    ChatsStreamResponseContent `json:"content"`
	Message    string                     `json:"message"` // https://developer.zendesk.com/api-reference/live-chat/real-time-chat-api/rest/#data-initialization
	StatusCode int                        `json:"status_code"`
}

type ChatsStreamResponseContent added in v0.0.46

type ChatsStreamResponseContent struct {
	Topic        string      `json:"topic"`
	Data         ChatMetrics `json:"data"`
	Type         string      `json:"type"`
	DepartmentID *GroupID    `json:"department_id"`
}
type CursorPaginationLinks struct {
	First string `json:"first"`
	Last  string `json:"last"`
	Next  string `json:"next"`
}

type CursorPaginationMeta

type CursorPaginationMeta struct {
	HasMore      bool   `json:"has_more"`
	AfterCursor  string `json:"after_cursor"`
	BeforeCursor string `json:"before_cursor"`
}

type CursorPaginationSortDirection added in v0.0.24

type CursorPaginationSortDirection string

type CustomFieldOption added in v0.0.12

type CustomFieldOption struct {
	ID       CustomFieldOptionID `json:"id"`
	Name     string              `json:"name"`
	Position uint64              `json:"position"`
	RawName  string              `json:"raw_name"`
	URL      string              `json:"url"`
	Value    string              `json:"value"`
}

type CustomFieldOptionID added in v0.0.12

type CustomFieldOptionID uint64

type CustomRole added in v0.0.35

type CustomRole struct {
	Configuration   CustomRoleConfiguration `json:"configuration"`
	CreatedAt       time.Time               `json:"created_at"`
	Description     string                  `json:"description"`
	ID              CustomRoleID            `json:"id"`
	Name            string                  `json:"name"`
	RoleType        uint64                  `json:"role_type"`
	TeamMemberCount uint64                  `json:"team_member_count"`
	UpdatedAt       time.Time               `json:"updated_at"`
}

https://developer.zendesk.com/api-reference/ticketing/account-configuration/custom_roles/#json-format

type CustomRoleConfiguration added in v0.0.35

type CustomRoleConfiguration struct {
	AssignTicketsToAnyGroup      bool                              `json:"assign_tickets_to_any_group"`
	ChatAccess                   bool                              `json:"chat_access"`
	CustomObjects                map[string]CustomRoleCustomObject `json:"custom_objects"`
	EndUserListAccess            string                            `json:"end_user_list_access"`
	EndUserProfileAccess         string                            `json:"end_user_profile_access"`
	ExploreAccess                string                            `json:"explore_access"`
	ForumAccess                  string                            `json:"forum_access"`
	ForumAccessRestrictedContent bool                              `json:"forum_access_restricted_content"`
	GroupAccess                  bool                              `json:"group_access"`
	LightAgent                   bool                              `json:"light_agent"`
	MacroAccess                  string                            `json:"macro_access"`
	ManageAutomations            bool                              `json:"manage_automations"`
	ManageBusinessRules          bool                              `json:"manage_business_rules"`
	ManageContextualWorkspaces   bool                              `json:"manage_contextual_workspaces"`
	ManageDynamicContent         bool                              `json:"manage_dynamic_content"`
	ManageExtensionsAndChannels  bool                              `json:"manage_extensions_and_channels"`
	ManageFacebook               bool                              `json:"manage_facebook"`
	ManageGroupMemberships       bool                              `json:"manage_group_memberships"`
	ManageGroups                 bool                              `json:"manage_groups"`
	ManageOrganizationFields     bool                              `json:"manage_organization_fields"`
	ManageOrganizations          bool                              `json:"manage_organizations"`
	ManageRoles                  string                            `json:"manage_roles"`
	ManageSkills                 bool                              `json:"manage_skills"`
	ManageSLAs                   bool                              `json:"manage_slas"`
	ManageSuspendedTickets       bool                              `json:"manage_suspended_tickets"`
	ManageTeamMembers            string                            `json:"manage_team_members"`
	ManageTicketFields           bool                              `json:"manage_ticket_fields"`
	ManageTicketForms            bool                              `json:"manage_ticket_forms"`
	ManageTriggers               bool                              `json:"manage_triggers"`
	ManageUserFields             bool                              `json:"manage_user_fields"`
	ModerateForums               bool                              `json:"moderate_forums"`
	OrganizationEditing          bool                              `json:"organization_editing"`
	OrganizationNotesEditing     bool                              `json:"organization_notes_editing"`
	ReportAccess                 string                            `json:"report_access"`
	SideConversationCreate       bool                              `json:"side_conversation_create"`
	TicketAccess                 string                            `json:"ticket_access"`
	TicketCommentAccess          string                            `json:"ticket_comment_access"`
	TicketDeletion               bool                              `json:"ticket_deletion"`
	TicketEditing                bool                              `json:"ticket_editing"`
	TicketMerge                  bool                              `json:"ticket_merge"`
	TicketRedaction              bool                              `json:"ticket_redaction"`
	TicketTagEditing             bool                              `json:"ticket_tag_editing"`
	TwitterSearchAccess          bool                              `json:"twitter_search_access"`
	UserViewAccess               string                            `json:"user_view_access"`
	ViewAccess                   string                            `json:"view_access"`
	ViewDeletedTickets           bool                              `json:"view_deleted_tickets"`
	VoiceAccess                  bool                              `json:"voice_access"`
	VoiceDashboardAccess         bool                              `json:"voice_dashboard_access"`
}

https://developer.zendesk.com/api-reference/ticketing/account-configuration/custom_roles/#configuration

type CustomRoleCustomObject added in v0.0.35

type CustomRoleCustomObject struct {
	Scopes []AgentScopePermission `json:"scopes"`
}

A list of custom object keys mapped to JSON objects that define the agent's permissions (scopes) for each object. Allowed values: "read", "update", "delete", "create". The "read" permission is required if any other scopes are specified. Example: { "shipment": { "scopes": ["read", "update"] } }.

type CustomRoleID added in v0.0.12

type CustomRoleID uint64

type CustomRoleResponse added in v0.0.35

type CustomRoleResponse struct {
	CustomRole CustomRole `json:"custom_role"`
}

type CustomRoleService added in v0.0.35

type CustomRoleService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/account-configuration/custom_roles

func (CustomRoleService) List added in v0.0.35

func (s CustomRoleService) List(
	ctx context.Context,
	pageHandler func(response CustomRolesResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/account-configuration/custom_roles/#list-custom-roles

Does not support cursor pagination.

type CustomRolesResponse added in v0.0.35

type CustomRolesResponse struct {
	CustomRoles []CustomRole `json:"custom_roles"`
	OffsetPaginationResponse
}

type CustomStatus added in v0.0.35

type CustomStatus struct {
	Active         bool                 `json:"active"`
	ID             CustomStatusID       `json:"id"`
	AgentLabel     string               `json:"agent_label"`
	StatusCategory CustomStatusCategory `json:"status_category"`
}

https://developer.zendesk.com/api-reference/ticketing/tickets/custom_ticket_statuses/#json-format

type CustomStatusCategory added in v0.0.35

type CustomStatusCategory string
const (
	StatusCategoryNew     CustomStatusCategory = "new"
	StatusCategoryOpen    CustomStatusCategory = "open"
	StatusCategoryPending CustomStatusCategory = "pending"
	StatusCategoryHold    CustomStatusCategory = "hold"
	// Tickets with a "Closed" status belong to the "StatusCategorySolved" status category.
	StatusCategorySolved CustomStatusCategory = "solved"
)

type CustomStatusID added in v0.0.35

type CustomStatusID uint64

type CustomStatusPayload added in v0.0.35

type CustomStatusPayload struct {
	CustomStatus any `json:"custom_status"`
}

type CustomStatusResponse added in v0.0.35

type CustomStatusResponse struct {
	CustomStatus CustomStatus `json:"custom_status"`
}

type CustomStatusesResponse added in v0.0.35

type CustomStatusesResponse struct {
	CustomStatuses []CustomStatus `json:"custom_statuses"`
	OffsetPaginationResponse
}

type Department added in v0.0.46

type Department struct {
	Description string             `json:"description"`
	Members     []UserID           `json:"members"`
	Enabled     bool               `json:"enabled"`
	ID          GroupID            `json:"id"`
	Settings    DepartmentSettings `json:"settings"`
	Name        string             `json:"name"`
}

type DepartmentSettings added in v0.0.47

type DepartmentSettings struct {
	ChatEnabled    bool    `json:"chat_enabled"`
	SupportGroupID GroupID `json:"support_group_id"`
}

type Error

type Error struct {
	Response    *http.Response `json:"response"`
	Message     string         `json:"message"`
	Description string         `json:"description"`
}

func (*Error) Error

func (err *Error) Error() string

func (*Error) ImmutableRecord added in v0.0.12

func (err *Error) ImmutableRecord() bool

func (*Error) UnmarshalJSON

func (err *Error) UnmarshalJSON(b []byte) error

type ErrorDetail added in v0.0.38

type ErrorDetail struct {
	Description string `json:"description"`
	Error       string `json:"error"`
}

type EventTypeArticleAuthorChangedEvent added in v0.0.45

type EventTypeArticleAuthorChangedEvent struct{}

type Group added in v0.0.12

type Group struct {
	ID        GroupID   `json:"id"`
	Default   bool      `json:"default"`
	IsPublic  bool      `json:"is_public"`
	Name      string    `json:"name"`
	Deleted   bool      `json:"deleted"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type GroupID

type GroupID uint64

type GroupMembership added in v0.0.12

type GroupMembership struct {
	ID        GroupMembershipID `json:"id"`
	CreatedAt time.Time         `json:"created_at"`
	Default   bool              `json:"default"`
	GroupID   GroupID           `json:"group_id"`
	UpdatedAt time.Time         `json:"updated_at"`
	URL       string            `json:"url"`
	UserID    UserID            `json:"user_id"`
}

type GroupMembershipID added in v0.0.12

type GroupMembershipID uint64

type GroupMembershipPayload added in v0.0.12

type GroupMembershipPayload struct {
	GroupMembership any `json:"group_membership"`
}

type GroupMembershipResponse added in v0.0.12

type GroupMembershipResponse struct {
	GroupMembership GroupMembership `json:"group_membership"`
}

type GroupMembershipService added in v0.0.12

type GroupMembershipService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/

func (GroupMembershipService) ListByGroup added in v0.0.12

func (s GroupMembershipService) ListByGroup(
	ctx context.Context,
	groupID GroupID,
	pageHandler func(response GroupMembershipsResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/#list-memberships

type GroupMembershipsResponse added in v0.0.12

type GroupMembershipsResponse struct {
	GroupMemberships []GroupMembership `json:"group_memberships"`
	CursorPaginationResponse
}

type GroupPayload added in v0.0.35

type GroupPayload struct {
	Group any `json:"group"`
}

type GroupResponse added in v0.0.35

type GroupResponse struct {
	Group Group `json:"group"`
}

type GroupsResponse added in v0.0.12

type GroupsResponse struct {
	Groups []Group `json:"groups"`
	CursorPaginationResponse
}

type GroupsService added in v0.0.12

type GroupsService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/groups/groups/

func (GroupsService) List added in v0.0.12

func (s GroupsService) List(
	ctx context.Context,
	pageHandler func(response GroupsResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/groups/groups/#list-groups

type IdentityID added in v0.0.38

type IdentityID uint64

type IncrementalExportChat added in v0.0.2

type IncrementalExportChat struct {
	Chat
	ChatEngagements []ChatEngagement `json:"engagements"`
}

type IncrementalExportResponse

type IncrementalExportResponse struct {
	EndTimeUnix int64 `json:"end_time"`
	EndOfStream bool  `json:"end_of_stream"`
}

func (IncrementalExportResponse) EndTime

func (response IncrementalExportResponse) EndTime() time.Time

type JobStatus added in v0.0.22

type JobStatus struct {
	ID       string `json:"id"`
	URL      string `json:"url"`
	Total    uint64 `json:"total"`
	Progress uint64 `json:"progress"`
	Status   string `json:"status"`
	Message  string `json:"message"`
	Results  any    `json:"results"`
}

type JobStatusResponse added in v0.0.22

type JobStatusResponse struct {
	JobStatus JobStatus `json:"job_status"`
}

type ListAccountConfigurationAuditLogModifier added in v0.0.21

type ListAccountConfigurationAuditLogModifier interface {
	ModifyListAccountConfigurationAuditLogRequest(queryParameters *url.Values)
}

https://developer.zendesk.com/api-reference/ticketing/account-configuration/audit_logs/#parameters

type ListProblemTicketIncidentsResponse added in v0.0.35

type ListProblemTicketIncidentsResponse struct {
	Tickets []Ticket `json:"tickets"`
	CursorPaginationResponse
}

type ListTicketSatisfactionRatingModifier added in v0.0.44

type ListTicketSatisfactionRatingModifier interface {
	ModifyListTicketSatisfactionRatingRequest(queryParameters *url.Values)
}

type LiveChatMetricKeyAgent added in v0.0.47

type LiveChatMetricKeyAgent string
const (
	LiveChatMetricKeyAgentsOnline    LiveChatMetricKeyAgent = "agents_online"
	LiveChatMetricKeyAgentsAway      LiveChatMetricKeyAgent = "agents_away"
	LiveChatMetricKeyAgentsInvisible LiveChatMetricKeyAgent = "agents_invisible"
)

https://developer.zendesk.com/api-reference/live-chat/real-time-chat-api/metrics/#agent-metrics

type LiveChatMetricKeyChat added in v0.0.47

type LiveChatMetricKeyChat string
const (
	LiveChatMetricKeyIncomingChats    LiveChatMetricKeyChat = "incoming_chats"
	LiveChatMetricKeyAssignedChats    LiveChatMetricKeyChat = "assigned_chats"
	LiveChatMetricKeyMissedChats      LiveChatMetricKeyChat = "missed_chats"
	LiveChatMetricKeyActiveChats      LiveChatMetricKeyChat = "active_chats"
	LiveChatMetricKeyWaitingTimeAvg   LiveChatMetricKeyChat = "waiting_time_avg"
	LiveChatMetricKeyWaitingTimeMax   LiveChatMetricKeyChat = "waiting_time_max"
	LiveChatMetricKeyChatDurationAvg  LiveChatMetricKeyChat = "chat_duration_avg"
	LiveChatMetricKeyChatDurationMax  LiveChatMetricKeyChat = "chat_duration_max"
	LiveChatMetricKeyResponseTimeAvg  LiveChatMetricKeyChat = "response_time_avg"
	LiveChatMetricKeyResponseTimeMax  LiveChatMetricKeyChat = "response_time_max"
	LiveChatMetricKeySatisfactionGood LiveChatMetricKeyChat = "satisfaction_good"
	LiveChatMetricKeySatisfactionBad  LiveChatMetricKeyChat = "satisfaction_bad"
)

https://developer.zendesk.com/api-reference/live-chat/real-time-chat-api/metrics/#chat-metrics

type LiveChatOAuthClientID added in v0.0.47

type LiveChatOAuthClientID uint64

type LiveChatTimeWindow added in v0.0.47

type LiveChatTimeWindow uint64
const (
	LiveChatTimeWindow30Minutes LiveChatTimeWindow = 30
	LiveChatTimeWindow60Minutes LiveChatTimeWindow = 60
)

type Macro added in v0.0.51

type Macro struct {
	URL         string               `json:"url"`
	ID          int64                `json:"id"`
	Title       string               `json:"title"`
	Active      bool                 `json:"active"`
	UpdatedAt   time.Time            `json:"updated_at"`
	CreatedAt   time.Time            `json:"created_at"`
	Default     bool                 `json:"default"`
	Position    int                  `json:"position"`
	Description any                  `json:"description"`
	Actions     []BusinessRuleAction `json:"actions"`
	Restriction any                  `json:"restriction"`
	RawTitle    string               `json:"raw_title"`
}

type MacroID added in v0.0.51

type MacroID uint64

type MacroService added in v0.0.51

type MacroService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/business-rules/macros/

func (*MacroService) List added in v0.0.51

func (s *MacroService) List(
	ctx context.Context,
	pageHandler func(response MacrosResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/business-rules/macros/#list-macros

type MacrosResponse added in v0.0.51

type MacrosResponse struct {
	Macros []Macro `json:"macros"`
	CursorPaginationResponse
}

type MalwareScanResult added in v0.0.37

type MalwareScanResult string
const (
	MalwareFound        MalwareScanResult = "malware_found"
	MalwareNotFound     MalwareScanResult = "malware_not_found"
	MalwareFailedToScan MalwareScanResult = "failed_to_scan"
	MalwareNotScanned   MalwareScanResult = "not_scanned"
)

type MergeRequestPayload added in v0.0.22

type MergeRequestPayload struct {
	IDs                   []TicketID `json:"ids"`
	SourceComment         string     `json:"source_comment"`
	SourceCommentIsPublic bool       `json:"source_comment_is_public"`
	TargetComment         string     `json:"target_comment"`
	TargetCommentIsPublic bool       `json:"target_comment_is_public"`
}

type OAuthClientConfiguration added in v0.0.47

type OAuthClientConfiguration struct {
	AgentID          UserID                `json:"agent_id"`
	ClientIdentifier string                `json:"client_identifier"`
	ClientSecret     string                `json:"client_secret"`
	ClientType       string                `json:"client_type"`
	Company          string                `json:"company"`
	CreateDate       string                `json:"create_date"`
	ID               LiveChatOAuthClientID `json:"id"`
	Name             string                `json:"name"`
	RedirectURIs     string                `json:"redirect_uris"`
	Scopes           string                `json:"scopes"`
	UpdateDate       *string               `json:"update_date"`
}

https://developer.zendesk.com/api-reference/live-chat/chat-api/oauth_clients/#json-format

type OAuthClientService added in v0.0.47

type OAuthClientService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/live-chat/chat-api/oauth_clients/

type OffsetPaginationResponse added in v0.0.35

type OffsetPaginationResponse struct {
	NextPage     *string `json:"next_page"`
	PreviousPage *string `json:"previous_page"`
	Count        uint64  `json:"count"`
}

https://developer.zendesk.com/api-reference/introduction/pagination/#using-offset-pagination

type Organization

type Organization struct {
	ID                 OrganizationID     `json:"id"`
	CreatedAt          time.Time          `json:"created_at"`
	DeletedAt          *time.Time         `json:"deleted_at"`
	Details            string             `json:"details"`
	DomainNames        []string           `json:"domain_names"`
	ExternalID         *string            `json:"external_id"`
	GroupID            *GroupID           `json:"group_id"`
	Name               string             `json:"name"`
	Notes              string             `json:"notes"`
	SharedComments     bool               `json:"shared_comments"`
	SharedTickets      bool               `json:"shared_tickets"`
	Tags               []Tag              `json:"tags"`
	UpdatedAt          time.Time          `json:"updated_at"`
	OrganizationFields OrganizationFields `json:"organization_fields"`
}

type OrganizationAutocompleteResponse added in v0.0.38

type OrganizationAutocompleteResponse struct {
	Organizations []Organization `json:"organizations"`
	OffsetPaginationResponse
}

type OrganizationFieldConfiguration added in v0.0.37

type OrganizationFieldConfiguration struct {
	Active              bool                  `json:"active"`
	CreatedAt           time.Time             `json:"created_at"`
	CustomFieldOptions  []CustomFieldOption   `json:"custom_field_options"`
	Description         string                `json:"description"`
	ID                  OrganizationFieldID   `json:"id"`
	Key                 string                `json:"key"`
	Position            uint64                `json:"position"`
	RawDescription      string                `json:"raw_description"`
	RawTitle            string                `json:"raw_title"`
	RegexpForValidation *string               `json:"regexp_for_validation"`
	System              bool                  `json:"system"`
	Tag                 Tag                   `json:"tag"`
	Title               string                `json:"title"`
	Type                OrganizationFieldType `json:"type"`
	UpdatedAt           time.Time             `json:"updated_at"`
	URL                 string                `json:"url"`
}

https://developer.zendesk.com/api-reference/ticketing/organizations/organization_fields/#json-format

type OrganizationFieldConfigurationResponse added in v0.0.37

type OrganizationFieldConfigurationResponse struct {
	OrganizationField OrganizationFieldConfiguration `json:"organization_field"`
}

type OrganizationFieldID added in v0.0.35

type OrganizationFieldID uint64

type OrganizationFieldPayload added in v0.0.35

type OrganizationFieldPayload struct {
	OrganizationField any `json:"organization_field"`
}

type OrganizationFieldService added in v0.0.35

type OrganizationFieldService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/organizations/organization_fields/

type OrganizationFieldType added in v0.0.37

type OrganizationFieldType string
const (
	OrganizationFieldTypeText     OrganizationFieldType = "text"     // Default custom field type when type is not specified
	OrganizationFieldTypeTextArea OrganizationFieldType = "textarea" // For multi-line text
	OrganizationFieldTypeCheckbox OrganizationFieldType = "checkbox" // To capture a boolean value. Allowed values are true or false
	OrganizationFieldTypeDate     OrganizationFieldType = "date"     // Example: 2021-04-16
	OrganizationFieldTypeDropdown OrganizationFieldType = "dropdown" //
	OrganizationFieldTypeInteger  OrganizationFieldType = "integer"  // String composed of numbers. May contain an optional decimal point
	OrganizationFieldTypeDecimal  OrganizationFieldType = "decimal"  // For numbers containing decimals
	OrganizationFieldTypeRegexp   OrganizationFieldType = "regexp"   // Matches the Regex pattern found in the custom field settings
	OrganizationFieldTypeLookup   OrganizationFieldType = "lookup"   // A field to create a relationship  to another object such as a user, ticket, or organization
)

type OrganizationFields added in v0.0.12

type OrganizationFields map[string]any

NOTE: Organization Fields are returned as a map[string (name of field)]any (value of field), instead of the way in which Ticket Fields are returned.

func (OrganizationFields) GetBool added in v0.0.12

func (fields OrganizationFields) GetBool(key string) bool

func (OrganizationFields) GetString added in v0.0.12

func (fields OrganizationFields) GetString(key string) *string

type OrganizationFieldsConfigurationResponse added in v0.0.37

type OrganizationFieldsConfigurationResponse struct {
	OrganizationFields []OrganizationFieldConfiguration `json:"organization_fields"`
	CursorPaginationResponse
}

type OrganizationID

type OrganizationID uint64

type OrganizationMembership added in v0.0.38

type OrganizationMembership struct {
	CreatedAt        time.Time                `json:"created_at"`
	Default          bool                     `json:"default"`
	ID               OrganizationMembershipID `json:"id"`
	OrganizationID   OrganizationID           `json:"organization_id"`
	OrganizationName string                   `json:"organization_name"`
	UpdatedAt        *time.Time               `json:"updated_at"`
	URL              string                   `json:"url"`
	UserID           UserID                   `json:"user_id"`
	ViewTickets      bool                     `json:"view_tickets"`
}

https://developer.zendesk.com/api-reference/ticketing/organizations/organization_memberships/#json-format

type OrganizationMembershipID added in v0.0.38

type OrganizationMembershipID uint64

type OrganizationMembershipPayload added in v0.0.38

type OrganizationMembershipPayload struct {
	OrganizationMembership OrganizationMembershipPayloadData `json:"organization_membership"`
}

type OrganizationMembershipPayloadData added in v0.0.38

type OrganizationMembershipPayloadData struct {
	UserID         UserID         `json:"user_id"`
	OrganizationID OrganizationID `json:"organization_id"`
}

type OrganizationMembershipResponse added in v0.0.38

type OrganizationMembershipResponse struct {
	OrganizationMembership OrganizationMembership `json:"organization_membership"`
}

type OrganizationMembershipsResponse added in v0.0.38

type OrganizationMembershipsResponse struct {
	OrganizationMemberships []OrganizationMembership `json:"organization_memberships"`
	CursorPaginationResponse
}

type OrganizationPayload added in v0.0.12

type OrganizationPayload struct {
	Organization any `json:"organization"`
}

type OrganizationResponse

type OrganizationResponse struct {
	Organization Organization `json:"organization"`
}

type OrganizationSatisfactionRating

type OrganizationSatisfactionRating struct {
	Score string `json:"score"`
}

type OrganizationService

type OrganizationService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/

func (OrganizationService) Autocomplete added in v0.0.38

func (s OrganizationService) Autocomplete(
	ctx context.Context,
	term string,
	pageHandler func(response OrganizationAutocompleteResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/#autocomplete-organizations

Does not support cursor pagination.

type OrganizationVia

type OrganizationVia struct {
	Channel string `json:"channel"`
}

type OrganizationsIncrementalExportResponse

type OrganizationsIncrementalExportResponse struct {
	OrganizationsResponse
	IncrementalExportResponse
}

type OrganizationsResponse

type OrganizationsResponse struct {
	Organizations []Organization `json:"organizations"`
}

type PermissionGroupID added in v0.0.12

type PermissionGroupID uint64

type PostID added in v0.0.45

type PostID string

type RealTimeChatRestService added in v0.0.47

type RealTimeChatRestService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/live-chat/real-time-chat-api/rest/

func (*RealTimeChatRestService) GetAllChatMetrics added in v0.0.47

func (s *RealTimeChatRestService) GetAllChatMetrics(ctx context.Context) (ChatsStreamResponse, error)

func (*RealTimeChatRestService) GetAllChatMetricsForDepartment added in v0.0.47

func (s *RealTimeChatRestService) GetAllChatMetricsForDepartment(ctx context.Context, departmentID GroupID) (ChatsStreamResponse, error)

func (*RealTimeChatRestService) GetAllChatMetricsForSpecificTimeWindow added in v0.0.47

func (s *RealTimeChatRestService) GetAllChatMetricsForSpecificTimeWindow(ctx context.Context, timeWindow LiveChatTimeWindow) (ChatsStreamResponse, error)

func (*RealTimeChatRestService) GetSingleChatMetric added in v0.0.47

func (s *RealTimeChatRestService) GetSingleChatMetric(ctx context.Context, chatMetric LiveChatMetricKeyChat) (ChatsStreamResponse, error)

func (*RealTimeChatRestService) GetSingleChatMetricForDepartment added in v0.0.47

func (s *RealTimeChatRestService) GetSingleChatMetricForDepartment(ctx context.Context, chatMetric LiveChatMetricKeyChat, departmentID GroupID) (ChatsStreamResponse, error)

func (*RealTimeChatRestService) GetSingleChatMetricForSpecificTimeWindow added in v0.0.47

func (s *RealTimeChatRestService) GetSingleChatMetricForSpecificTimeWindow(ctx context.Context, chatMetric LiveChatMetricKeyChat, timeWindow LiveChatTimeWindow) (ChatsStreamResponse, error)

type RealTimeChatService added in v0.0.47

type RealTimeChatService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/live-chat/introduction/

type RealTimeChatStreamingService added in v0.0.47

type RealTimeChatStreamingService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/live-chat/real-time-chat-api/streaming/

type ReasonCode added in v0.0.43

type ReasonCode uint64

type ReasonID added in v0.0.43

type ReasonID uint64

type RequestPreProcessor

type RequestPreProcessor interface {
	ProcessRequest(r *http.Request) error
}

type RequestPreProcessorFunc

type RequestPreProcessorFunc func(*http.Request) error

func (RequestPreProcessorFunc) ProcessRequest

func (p RequestPreProcessorFunc) ProcessRequest(r *http.Request) error

type SatisfactionRating added in v0.0.43

type SatisfactionRating struct {
	ID          SatisfactionRatingID `json:"id"`
	AssigneeID  *UserID              `json:"assignee_id"`
	Comment     *string              `json:"comment"`
	CreatedAt   time.Time            `json:"created_at"`
	GroupID     *GroupID             `json:"group_id"`
	Reason      *string              `json:"reason"`
	ReasonCode  *ReasonCode          `json:"reason_code"`
	ReasonID    *ReasonID            `json:"reason_id"`
	RequesterID UserID               `json:"requester_id"`
	Score       string               `json:"score"`
	TicketID    TicketID             `json:"ticket_id"`
	UpdatedAt   *time.Time           `json:"updated_at"`
	URL         string               `json:"url"`
}

https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_ratings/#json-format

type SatisfactionRatingID added in v0.0.43

type SatisfactionRatingID uint64

type SatisfactionRatingResponse added in v0.0.43

type SatisfactionRatingResponse struct {
	SatisfactionRating SatisfactionRating `json:"satisfaction_rating"`
}

type SatisfactionRatingScore added in v0.0.43

type SatisfactionRatingScore string
const (
	SatisfactionRatingScoreOffered                SatisfactionRatingScore = "offered"
	SatisfactionRatingScoreUnOffered              SatisfactionRatingScore = "unoffered"
	SatisfactionRatingScoreReceived               SatisfactionRatingScore = "received"
	SatisfactionRatingScoreReceivedWithComment    SatisfactionRatingScore = "received_with_comment"
	SatisfactionRatingScoreReceivedWithoutComment SatisfactionRatingScore = "received_without_comment"
	SatisfactionRatingScoreGood                   SatisfactionRatingScore = "good"
	SatisfactionRatingScoreGoodWithComment        SatisfactionRatingScore = "good_with_comment"
	SatisfactionRatingScoreGoodWithoutComment     SatisfactionRatingScore = "good_without_comment"
	SatisfactionRatingScoreBad                    SatisfactionRatingScore = "bad"
	SatisfactionRatingScoreBadWithComment         SatisfactionRatingScore = "bad_with_comment"
	SatisfactionRatingScoreBadWithoutComment      SatisfactionRatingScore = "bad_without_comment"
)

type SatisfactionRatingsResponse added in v0.0.43

type SatisfactionRatingsResponse struct {
	SatisfactionRatings []SatisfactionRating `json:"satisfaction_ratings"`
	CursorPaginationResponse
}

type Schedule added in v0.0.12

type Schedule struct {
	ID        ScheduleID         `json:"id"`
	Name      string             `json:"name"`
	TimeZone  string             `json:"time_zone"`
	CreatedAt time.Time          `json:"created_at"`
	UpdatedAt time.Time          `json:"updated_at"`
	Intervals []ScheduleInterval `json:"intervals"`
}

func (Schedule) Active added in v0.0.12

func (schedule Schedule) Active(now time.Time) (bool, error)

func (Schedule) Location added in v0.0.12

func (schedule Schedule) Location() (*time.Location, error)

type ScheduleID added in v0.0.12

type ScheduleID uint64

type ScheduleInterval added in v0.0.12

type ScheduleInterval struct {
	StartTime int `json:"start_time"`
	EndTime   int `json:"end_time"`
}

type ScheduleService added in v0.0.12

type ScheduleService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/ticket-management/schedules/

type SchedulesResponse added in v0.0.12

type SchedulesResponse struct {
	Schedules []Schedule `json:"schedules"`
}

type Section

type Section struct {
	CategoryID      CategoryID `json:"category_id"`
	CreatedAt       time.Time  `json:"created_at"`
	Description     string     `json:"description"`
	HTMLURL         string     `json:"html_url"`
	ID              SectionID  `json:"id"`
	Locale          string     `json:"locale"`
	Name            string     `json:"name"`
	Outdated        bool       `json:"outdated"`
	ParentSectionID any        `json:"parent_section_id"`
	Position        uint       `json:"position"`
	Sorting         string     `json:"sorting"`
	SourceLocale    string     `json:"source_locale"`
	ThemeTemplate   string     `json:"theme_template"`
	UpdatedAt       time.Time  `json:"updated_at"`
	URL             string     `json:"url"`
}

type SectionID

type SectionID uint64

type SectionService added in v0.0.12

type SectionService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/help_center/help-center-api/sections/

func (SectionService) List added in v0.0.26

func (s SectionService) List(
	ctx context.Context,
	pageHandler func(response SectionsResponse) error,
) error

type SectionsResponse

type SectionsResponse struct {
	Sections     []Section `json:"sections"`
	Page         int       `json:"page"`
	PreviousPage any       `json:"previous_page"`
	NextPage     string    `json:"next_page"`
	PerPage      int       `json:"per_page"`
	PageCount    int       `json:"page_count"`
	Count        int       `json:"count"`
	SortBy       string    `json:"sort_by"`
	SortOrder    string    `json:"sort_order"`
	CursorPaginationResponse
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(
	subDomain string,
	zendeskAuth authentication,
	chatCredentials ChatCredentials,
	opts ...configOption,
) *Service

func (*Service) SubDomain added in v0.0.12

func (s *Service) SubDomain() string

type SideConversationCreatePayload added in v0.0.30

type SideConversationCreatePayload struct {
	Message SideConversationMessage `json:"message"`
}

type SideConversationMessage added in v0.0.30

type SideConversationMessage struct {
	Subject string                   `json:"subject"`
	Body    string                   `json:"body"`
	To      []SideConversationTarget `json:"to"`
}

type SideConversationTarget added in v0.0.30

type SideConversationTarget interface {
	SideConversationTarget()
}

type SideConversationTargetChildTicket added in v0.0.30

type SideConversationTargetChildTicket struct {
	SupportGroupID GroupID `json:"support_group_id"`
	SupportAgentID UserID  `json:"support_agent_id,omitempty"`
}

func (SideConversationTargetChildTicket) SideConversationTarget added in v0.0.30

func (s SideConversationTargetChildTicket) SideConversationTarget()

type SourceID added in v0.0.23

type SourceID int64

type SupportService

type SupportService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/introduction/

type SuspendedTicket added in v0.0.12

type SuspendedTicket struct {
	ID        SuspendedTicketID     `json:"id"`
	Subject   string                `json:"subject"`
	Cause     string                `json:"cause"`
	Author    SuspendedTicketAuthor `json:"author"`
	CauseID   int                   `json:"cause_id"`
	TicketID  *TicketID             `json:"ticket_id"`
	CreatedAt time.Time             `json:"created_at"`
	UpdatedAt time.Time             `json:"updated_at"`
	Recipient string                `json:"recipient"`
}

type SuspendedTicketAuthor added in v0.0.52

type SuspendedTicketAuthor struct {
	ID    *UserID `json:"id"`
	Name  string  `json:"name"`
	Email string  `json:"email"`
}

type SuspendedTicketID added in v0.0.12

type SuspendedTicketID uint64

type SuspendedTicketsResponse added in v0.0.12

type SuspendedTicketsResponse struct {
	SuspendedTickets []SuspendedTicket `json:"suspended_tickets"`
	CursorPaginationResponse
}

type Tag added in v0.0.19

type Tag string

func (Tag) Validate added in v0.0.19

func (tag Tag) Validate() error

type TagMeta added in v0.0.37

type TagMeta struct {
	Name  Tag    `json:"name"`
	Count uint64 `json:"count"`
}

type TagSearchResponse added in v0.0.37

type TagSearchResponse struct {
	Tags []Tag `json:"tags"`
	OffsetPaginationResponse
}

type Tags

type Tags []Tag

func (Tags) HasTag added in v0.0.12

func (tags Tags) HasTag(targetTag Tag) bool

type TagsPayload

type TagsPayload struct {
	Tags Tags `json:"tags"`
}

type TagsResponse added in v0.0.37

type TagsResponse struct {
	Tags []TagMeta `json:"tags"`
	CursorPaginationResponse
}

type Ticket

type Ticket struct {
	AssigneeID         *UserID                  `json:"assignee_id"`
	CreatedAt          time.Time                `json:"created_at"`
	CollaboratorIDs    []UserID                 `json:"collaborator_ids"`
	CustomFields       []TicketField            `json:"custom_fields"`
	Description        string                   `json:"description"`
	DueAt              *time.Time               `json:"due_at"`
	ExternalID         *string                  `json:"external_id"`
	Fields             []TicketField            `json:"fields"`
	FollowerIDs        []UserID                 `json:"follower_ids"`
	GroupID            *GroupID                 `json:"group_id"`
	HasIncidents       bool                     `json:"has_incidents"`
	ID                 TicketID                 `json:"id"`
	IsPublic           bool                     `json:"is_public"`
	OrganizationID     *OrganizationID          `json:"organization_id"`
	Priority           string                   `json:"priority"`
	ProblemID          *TicketID                `json:"problem_id"`
	RequesterID        UserID                   `json:"requester_id"`
	SatisfactionRating TicketSatisfactionRating `json:"satisfaction_rating"`
	Status             string                   `json:"status"`
	Subject            string                   `json:"subject"`
	SubmitterID        UserID                   `json:"submitter_id"`
	Tags               Tags                     `json:"tags"`
	TicketFormID       TicketFormID             `json:"ticket_form_id"`
	Type               *string                  `json:"type"`
	UpdatedAt          time.Time                `json:"updated_at"`
	URL                string                   `json:"url"`
	Via                TicketVia                `json:"via"`

	Dates TicketDates `json:"dates"`
}

type TicketAttachment added in v0.0.35

type TicketAttachment struct {
	ContentType           string            `json:"content_type"`
	ContentURL            string            `json:"content_url"`
	Deleted               bool              `json:"deleted"`
	FileName              string            `json:"file_name"`
	Height                uint64            `json:"height"`
	ID                    AttachmentID      `json:"id"`
	Inline                bool              `json:"inline"`
	MalwareAccessOverride bool              `json:"malware_access_override"`
	MalwareScanResult     MalwareScanResult `json:"malware_scan_result"`
	MappedContentURL      string            `json:"mapped_content_url"`
	Size                  uint64            `json:"size"`
	URL                   string            `json:"url"`
	Width                 uint64            `json:"width"`
}

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/#json-format

type TicketAttachmentResponse added in v0.0.35

type TicketAttachmentResponse struct {
	Attachment TicketAttachment `json:"attachment"`
}

type TicketAttachmentService added in v0.0.35

type TicketAttachmentService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/

func (TicketAttachmentService) Download added in v0.0.37

func (s TicketAttachmentService) Download(
	ctx context.Context,
	contentURL string,
	writer io.Writer,
) error

When working with attachments, we must ensure that the domain that the content is hosted on is *.zendesk.com before sending authentication credentials.

- https://developer.zendesk.com/documentation/ticketing/managing-tickets/working-with-url-properties/

- https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/#json-format

func (*TicketAttachmentService) DownloadToFile added in v0.0.37

func (s *TicketAttachmentService) DownloadToFile(
	ctx context.Context,
	contentURL string,
	filePath string,
) error

func (TicketAttachmentService) UploadWithFilename added in v0.0.39

func (s TicketAttachmentService) UploadWithFilename(
	ctx context.Context,
	localFilePath string,
	filename string,
	uploadToken UploadToken,
) (TicketAttachmentUploadResponse, error)

type TicketAttachmentUploadResponse added in v0.0.35

type TicketAttachmentUploadResponse struct {
	Upload struct {
		Attachment  TicketAttachment   `json:"attachment"`
		Attachments []TicketAttachment `json:"attachments"`
		Token       UploadToken        `json:"token"`
	} `json:"upload"`
}

type TicketAudit added in v0.0.12

type TicketAudit struct {
	ID        TicketAuditID      `json:"id"`
	TicketID  int                `json:"ticket_id"`
	CreatedAt time.Time          `json:"created_at"`
	AuthorID  int                `json:"author_id"`
	Events    []TicketAuditEvent `json:"events"`
}

type TicketAuditEvent added in v0.0.12

type TicketAuditEvent struct {
	ID            TicketAuditEventID `json:"id"`
	Type          string             `json:"type"`
	FieldName     string             `json:"field_name"`
	PreviousValue any                `json:"previous_value"`
	Value         any                `json:"value"`
}

type TicketAuditEventID added in v0.0.12

type TicketAuditEventID uint64

type TicketAuditID added in v0.0.12

type TicketAuditID uint64

type TicketAuditResponse added in v0.0.12

type TicketAuditResponse struct {
	Audit TicketAudit `json:"audit"`
}

type TicketAuditService added in v0.0.12

type TicketAuditService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_audits/

type TicketAuditsResponse added in v0.0.12

type TicketAuditsResponse struct {
	Audits []TicketAudit `json:"audits"`
	CursorPaginationResponse
}

type TicketComment added in v0.0.35

type TicketComment struct {
	ID          TicketCommentID       `json:"id"`
	Attachments []TicketAttachment    `json:"attachments"`
	AuditID     AuditID               `json:"audit_id"`
	AuthorID    UserID                `json:"author_id"`
	Body        string                `json:"body"`
	CreatedAt   time.Time             `json:"created_at"`
	HTMLBody    string                `json:"html_body"`
	Metadata    TicketCommentMetadata `json:"metadata"`
	PlainBody   string                `json:"plain_body"`
	Public      bool                  `json:"public"`
	Type        string                `json:"type"`
	Uploads     []UploadToken         `json:"uploads"`
}

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#json-format

type TicketCommentID added in v0.0.35

type TicketCommentID uint64

type TicketCommentMetadata added in v0.0.37

type TicketCommentMetadata struct {
	System TicketCommentMetadataSystem `json:"system"`
	Via    TicketVia                   `json:"via"`
	Flags  []uint                      `json:"flags"` // https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#comment-flags
}

type TicketCommentMetadataSystem added in v0.0.37

type TicketCommentMetadataSystem struct {
	Client    string  `json:"client"`
	IPAddress string  `json:"ip_address"`
	Latitude  float64 `json:"latitude"`
	Location  string  `json:"location"`
	Longitude float64 `json:"longitude"`
}

type TicketCommentResponse added in v0.0.35

type TicketCommentResponse struct {
	Comments []TicketComment `json:"comments"`
	Users    []User          `json:"users"`
	CursorPaginationResponse
}

type TicketCommentService added in v0.0.35

type TicketCommentService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/

func (TicketCommentService) ListByTicketID added in v0.0.35

func (s TicketCommentService) ListByTicketID(
	ctx context.Context,
	ticketID TicketID,
	pageHandler func(response TicketCommentResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#list-comments

func (TicketCommentService) ListByTicketIDWithSideload added in v0.0.38

func (s TicketCommentService) ListByTicketIDWithSideload(
	ctx context.Context,
	ticketID TicketID,
	sideloads []TicketCommentSideload,
	pageHandler func(response TicketCommentResponse) error,
) error

type TicketCommentSideload added in v0.0.38

type TicketCommentSideload string
const (
	TicketCommentSideloadUsers TicketCommentSideload = "users"
)

type TicketDates added in v0.0.39

type TicketDates struct {
	AssigneeUpdatedAt    *time.Time `json:"assignee_updated_at"`
	RequesterUpdatedAt   *time.Time `json:"requester_updated_at"`
	StatusUpdatedAt      *time.Time `json:"status_updated_at"`
	InitiallyAssignedAt  *time.Time `json:"initially_updated_at"`
	AssignedAt           *time.Time `json:"assigned_updated_at"`
	SolvedAt             *time.Time `json:"solved_updated_at"`
	LatestCommentAddedAt *time.Time `json:"latest_comment_added_at"`
}

type TicketField added in v0.0.35

type TicketField struct {
	ID    TicketFieldID `json:"id"`
	Value any           `json:"value"`
}

type TicketFieldConfiguration added in v0.0.37

type TicketFieldConfiguration struct {
	Active              bool                `json:"active"`
	AgentDescription    string              `json:"agent_description"`
	CollapsedForAgents  bool                `json:"collapsed_for_agents"`
	CreatedAt           time.Time           `json:"created_at"`
	CustomFieldOptions  []CustomFieldOption `json:"custom_field_options"`
	CustomStatuses      []CustomStatus      `json:"custom_statuses"`
	Description         string              `json:"description"`
	EditableInPortal    bool                `json:"editable_in_portal"`
	ID                  TicketFieldID       `json:"id"`
	Position            uint64              `json:"position"`
	RawDescription      string              `json:"raw_description"`
	RawTitle            string              `json:"raw_title"`
	RawTitleInPortal    string              `json:"raw_title_in_portal"`
	RegexpForValidation *string             `json:"regexp_for_validation"`
	Removable           bool                `json:"removable"`
	Required            bool                `json:"required"`
	RequiredInPortal    bool                `json:"required_in_portal"`
	Tag                 Tag                 `json:"tag"`
	Title               string              `json:"title"`
	TitleInPortal       string              `json:"title_in_portal"`
	Type                TicketFieldType     `json:"type"`
	UpdatedAt           time.Time           `json:"updated_at"`
	URL                 string              `json:"url"`
	VisibleInPortal     bool                `json:"visible_in_portal"`
}

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_fields/#json-format

type TicketFieldConfigurationResponse added in v0.0.37

type TicketFieldConfigurationResponse struct {
	TicketField TicketFieldConfiguration `json:"ticket_field"`
}

type TicketFieldID added in v0.0.12

type TicketFieldID uint64

type TicketFieldPayload added in v0.0.55

type TicketFieldPayload struct {
	TicketField any `json:"ticket_field"`
}

type TicketFieldType added in v0.0.37

type TicketFieldType string
const (
	TicketFieldTypeText              TicketFieldType = "text"              // Default custom field type when type is not specified
	TicketFieldTypeTextArea          TicketFieldType = "textarea"          // For multi-line text
	TicketFieldTypeCheckbox          TicketFieldType = "checkbox"          // To capture a boolean value. Allowed values are true or false
	TicketFieldTypeDate              TicketFieldType = "date"              // Example: 2021-04-16
	TicketFieldTypeInteger           TicketFieldType = "integer"           // String composed of numbers. May contain an optional decimal point
	TicketFieldTypeDecimal           TicketFieldType = "decimal"           // For numbers containing decimals
	TicketFieldTypeRegexp            TicketFieldType = "regexp"            // Matches the Regex pattern found in the custom field settings
	TicketFieldTypePartialCreditCard TicketFieldType = "partialcreditcard" // A credit card number. Only the last 4 digits are retained
	TicketFieldTypeMultiSelect       TicketFieldType = "multiselect"       // Enables users to choose multiple options from a dropdown menu
	TicketFieldTypeTagger            TicketFieldType = "tagger"            // Single-select dropdown menu. It contains one or more tag values belonging to the field's options. Example: ( {"id": 21938362, "value": ["hd_3000", "hd_5555"]})
	TicketFieldTypeLookup            TicketFieldType = "lookup"            // A field to create a relationship  to another object such as a user, ticket, or organization
)

type TicketFields added in v0.0.37

type TicketFields []TicketField

func (TicketFields) CreateMap added in v0.0.37

func (fields TicketFields) CreateMap() map[TicketFieldID]any

type TicketFieldsConfigurationResponse added in v0.0.37

type TicketFieldsConfigurationResponse struct {
	TicketFields []TicketFieldConfiguration `json:"ticket_fields"`
	CursorPaginationResponse
}

type TicketForm added in v0.0.31

type TicketForm struct {
	URL            string          `json:"url"`
	Name           string          `json:"name"`
	DisplayName    string          `json:"display_name"`
	ID             TicketFormID    `json:"id"`
	RawName        string          `json:"raw_name"`
	RawDisplayName string          `json:"raw_display_name"`
	EndUserVisible bool            `json:"end_user_visible"`
	Position       int             `json:"position"`
	TicketFieldIds []TicketFieldID `json:"ticket_field_ids"`
	Active         bool            `json:"active"`
	Default        bool            `json:"default"`
	CreatedAt      time.Time       `json:"created_at"`
	UpdatedAt      time.Time       `json:"updated_at"`
	InAllBrands    bool            `json:"in_all_brands"`
}

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_forms/#json-format

type TicketFormID

type TicketFormID uint64

type TicketFormResponse added in v0.0.35

type TicketFormResponse struct {
	TicketForm TicketForm `json:"ticket_form"`
}

type TicketFormService added in v0.0.31

type TicketFormService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_forms/

func (TicketFormService) List added in v0.0.31

func (s TicketFormService) List(
	ctx context.Context,
) ([]TicketForm, error)

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_forms/#list-ticket-forms

Does not support pagination.

type TicketFormsResponse added in v0.0.31

type TicketFormsResponse struct {
	TicketForms []TicketForm `json:"ticket_forms"`
}

type TicketID

type TicketID uint64

type TicketPayload added in v0.0.12

type TicketPayload struct {
	Ticket any `json:"ticket"`
}

type TicketResponse

type TicketResponse struct {
	Ticket Ticket `json:"ticket"`
}

type TicketSatisfactionRating

type TicketSatisfactionRating struct {
	Score string `json:"score"`
}

type TicketService

type TicketService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/

func (TicketService) ListProblemTicketIncidents added in v0.0.35

func (s TicketService) ListProblemTicketIncidents(
	ctx context.Context,
	problemTicket TicketID,
	pageHandler func(response ListProblemTicketIncidentsResponse) error,
) error

type TicketSideload added in v0.0.39

type TicketSideload string
const (
	TicketSideloadDates TicketSideload = "dates"
)

type TicketTagService added in v0.0.37

type TicketTagService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags

func (TicketTagService) List added in v0.0.37

func (s TicketTagService) List(
	ctx context.Context,
	pageHandler func(response TagsResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#list-tags

func (TicketTagService) Search added in v0.0.37

func (s TicketTagService) Search(
	ctx context.Context,
	searchTerm string,
	pageHandler func(response TagSearchResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/#search-tags

Does not support cursor pagination.

type TicketVia

type TicketVia struct {
	Channel string `json:"channel"`
}

type TicketsIncrementalExportResponse

type TicketsIncrementalExportResponse struct {
	TicketsResponse
	IncrementalExportResponse
}

type TicketsResponse

type TicketsResponse struct {
	Tickets []Ticket `json:"tickets"`
}

type TopicID added in v0.0.45

type TopicID string

type Trigger added in v0.0.51

type Trigger struct {
	ID          TriggerID              `json:"id"`
	URL         string                 `json:"url"`
	Title       string                 `json:"title"`
	Active      bool                   `json:"active"`
	UpdatedAt   time.Time              `json:"updated_at"`
	CreatedAt   time.Time              `json:"created_at"`
	Default     bool                   `json:"default"`
	Actions     []BusinessRuleAction   `json:"actions"`
	Conditions  BusinessRuleConditions `json:"conditions"`
	Description *string                `json:"description"`
	Position    int                    `json:"position"`
	RawTitle    string                 `json:"raw_title"`
	CategoryID  string                 `json:"category_id"`
}

type TriggerID added in v0.0.51

type TriggerID uint64

type TriggerService added in v0.0.51

type TriggerService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/business-rules/triggers/

type TriggersResponse added in v0.0.51

type TriggersResponse struct {
	Triggers []Trigger `json:"triggers"`
	CursorPaginationResponse
}

type UploadToken added in v0.0.35

type UploadToken string

type User

type User struct {
	ID                   UserID                 `json:"id"`
	Active               bool                   `json:"active"`
	Alias                *string                `json:"alias"`
	OnlyPrivateComments  bool                   `json:"only_private_comments"`
	CreatedAt            time.Time              `json:"created_at"`
	CustomRoleID         *CustomRoleID          `json:"custom_role_id"`
	DefaultGroupID       *GroupID               `json:"default_group_id"`
	Details              *string                `json:"details"`
	Email                string                 `json:"email"`
	ExternalID           *string                `json:"external_id"`
	IanaTimeZone         string                 `json:"iana_time_zone"`
	TimeZone             string                 `json:"time_zone"`
	LastLoginAt          *time.Time             `json:"last_login_at"`
	Locale               string                 `json:"locale"`
	Name                 string                 `json:"name"`
	Notes                *string                `json:"notes"`
	OrganizationID       *OrganizationID        `json:"organization_id"`
	Phone                *string                `json:"phone"`
	RemotePhotoURL       *string                `json:"remote_photo_url"`
	RestrictedAgent      bool                   `json:"restricted_agent"`
	Role                 UserRole               `json:"role"`
	RoleType             *int                   `json:"role_type"`
	Signature            string                 `json:"signature"`
	Shared               bool                   `json:"shared"`
	SharedAgent          bool                   `json:"shared_agent"`
	Suspended            bool                   `json:"suspended"`
	Tags                 []Tag                  `json:"tags"`
	TicketRestriction    *UserTicketRestriction `json:"ticket_restriction"`
	TwoFactorAuthEnabled bool                   `json:"two_factor_auth_enabled"`
	UpdatedAt            time.Time              `json:"updated_at"`
	Verified             bool                   `json:"verified"`
	UserFields           UserFields             `json:"user_fields"`
	Photo                *UserPhoto             `json:"photo"`
}

https://developer.zendesk.com/api-reference/ticketing/users/users/#json-format

type UserFieldConfiguration added in v0.0.37

type UserFieldConfiguration struct {
	Active              bool                `json:"active"`
	CreatedAt           time.Time           `json:"created_at"`
	CustomFieldOptions  []CustomFieldOption `json:"custom_field_options"`
	Description         *string             `json:"description"`
	ID                  UserFieldID         `json:"id"`
	Key                 string              `json:"key"`
	Position            uint64              `json:"position"`
	RawDescription      *string             `json:"raw_description"`
	RawTitle            *string             `json:"raw_title"`
	RegexpForValidation *string             `json:"regexp_for_validation"`
	System              bool                `json:"system"`
	Tag                 Tag                 `json:"tag"`
	Title               *string             `json:"title"`
	Type                UserFieldType       `json:"type"`
	UpdatedAt           *time.Time          `json:"updated_at"`
	URL                 string              `json:"url"`
}

https://developer.zendesk.com/api-reference/ticketing/users/user_fields/#json-format

type UserFieldConfigurationResponse added in v0.0.37

type UserFieldConfigurationResponse struct {
	UserField UserFieldConfiguration `json:"user_field"`
}

type UserFieldID added in v0.0.12

type UserFieldID uint64

type UserFieldService added in v0.0.12

type UserFieldService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/users/user_fields/

func (UserFieldService) Show added in v0.0.35

type UserFieldType added in v0.0.37

type UserFieldType string
const (
	UserFieldTypeText     UserFieldType = "text"     // Default custom field type when type is not specified
	UserFieldTypeTextArea UserFieldType = "textarea" // For multi-line text
	UserFieldTypeCheckbox UserFieldType = "checkbox" // To capture a boolean value. Allowed values are true or false
	UserFieldTypeDate     UserFieldType = "date"     // Example: 2021-04-16
	UserFieldTypeDropdown UserFieldType = "dropdown" //
	UserFieldTypeInteger  UserFieldType = "integer"  // String composed of numbers. May contain an optional decimal point
	UserFieldTypeDecimal  UserFieldType = "decimal"  // For numbers containing decimals
	UserFieldTypeRegexp   UserFieldType = "regexp"   // Matches the Regex pattern found in the custom field settings
	UserFieldTypeLookup   UserFieldType = "lookup"   // A field to create a relationship  to another object such as a user, ticket, or organization
)

type UserFields added in v0.0.12

type UserFields map[string]any

NOTE: User Fields are returned as a map[string (name of field)]any (value of field), instead of the way in which Ticket Fields are returned.

type UserFieldsConfigurationResponse added in v0.0.37

type UserFieldsConfigurationResponse struct {
	UserFields []UserFieldConfiguration `json:"user_fields"`
	CursorPaginationResponse
}

type UserID

type UserID int64

func (*UserID) UnmarshalJSON

func (userID *UserID) UnmarshalJSON(b []byte) error

type UserIdentitiesResponse added in v0.0.13

type UserIdentitiesResponse struct {
	Identities []UserIdentity `json:"identities"`
	CursorPaginationResponse
}

type UserIdentity added in v0.0.13

type UserIdentity struct {
	URL                string     `json:"url"`
	UserID             UserID     `json:"user_id"`
	ID                 IdentityID `json:"id"`
	Type               string     `json:"type"`
	Verified           bool       `json:"verified"`
	Primary            bool       `json:"primary"`
	UndeliverableCount uint64     `json:"undeliverable_count"`
	DeliverableState   string     `json:"deliverable_state"`
	Value              string     `json:"value"`
}

type UserIdentityPayload added in v0.0.38

type UserIdentityPayload struct {
	Identity any `json:"identity"`
}

type UserIdentityResponse added in v0.0.38

type UserIdentityResponse struct {
	Identity UserIdentity `json:"identity"`
}

type UserIdentityService added in v0.0.13

type UserIdentityService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/users/user_identities/

func (*UserIdentityService) List added in v0.0.13

func (s *UserIdentityService) List(
	ctx context.Context,
	userID UserID,
	pageHandler func(response UserIdentitiesResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/users/user_identities/#list-identities

type UserPayload added in v0.0.12

type UserPayload struct {
	User any `json:"user"`
}

type UserPhoto added in v0.0.12

type UserPhoto struct {
	ContentURL string `json:"content_url"`
}

type UserResponse

type UserResponse struct {
	User          User           `json:"user"`
	Identities    []UserIdentity `json:"identities"`
	Organizations []Organization `json:"organizations"`
}

type UserRole added in v0.0.35

type UserRole string
const (
	UserRoleAdmin   UserRole = "admin"
	UserRoleAgent   UserRole = "agent"
	UserRoleEndUser UserRole = "end-user"
)

type UserSearchResponse added in v0.0.38

type UserSearchResponse struct {
	Users           []User            `json:"users"`
	Identities      []UserIdentity    `json:"identities"`
	Organizations   []Organization    `json:"organizations"`
	Groups          []Group           `json:"groups"`
	OpenTicketCount map[string]uint64 `json:"open_ticket_count"`
	OffsetPaginationResponse
}

type UserSegmentID added in v0.0.12

type UserSegmentID uint64

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/users/users/

func (UserService) SearchWithSideloads added in v0.0.38

func (s UserService) SearchWithSideloads(
	ctx context.Context,
	query string,
	sideloads []UserSideload,
	pageHandler func(response UserSearchResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/users/users/#search-users

Does not support cursor pagination.

type UserSideload added in v0.0.38

type UserSideload string
const (
	UserSideloadIdentities      UserSideload = "identities"
	UserSideloadOrganizations   UserSideload = "organizations"
	UserSideloadRoles           UserSideload = "roles"
	UserSideloadAbilities       UserSideload = "abilities"
	UserSideloadGroups          UserSideload = "groups"
	UserSideloadOpenTicketCount UserSideload = "open_ticket_count"
)

type UserTicketRestriction added in v0.0.38

type UserTicketRestriction string
const (
	UserTicketRestrictionOrganization UserTicketRestriction = "organization"
	UserTicketRestrictionGroups       UserTicketRestriction = "groups"
	UserTicketRestrictionAssigned     UserTicketRestriction = "assigned"
	UserTicketRestrictionRequested    UserTicketRestriction = "requested"
)

type UsersIncrementalExportResponse

type UsersIncrementalExportResponse struct {
	UsersResponse
	IncrementalExportResponse
}

type UsersResponse

type UsersResponse struct {
	Users []User `json:"users"`
}

type View added in v0.0.51

type View struct {
	ID          ViewID                `json:"id"`
	URL         string                `json:"url"`
	Title       string                `json:"title"`
	Active      bool                  `json:"active"`
	UpdatedAt   time.Time             `json:"updated_at"`
	CreatedAt   time.Time             `json:"created_at"`
	Default     bool                  `json:"default"`
	Position    int                   `json:"position"`
	Description *string               `json:"description"`
	Execution   ViewExecution         `json:"execution"`
	Conditions  BusinessRuleCondition `json:"conditions"`
	Restriction ViewRestriction       `json:"restriction"`
	RawTitle    string                `json:"raw_title"`
}

type ViewColumns added in v0.0.51

type ViewColumns struct {
	ID         any    `json:"id"`
	Title      string `json:"title"`
	Filterable bool   `json:"filterable"`
	Sortable   bool   `json:"sortable"`
}

type ViewExecution added in v0.0.51

type ViewExecution struct {
	GroupBy    string        `json:"group_by"`
	GroupOrder string        `json:"group_order"`
	SortBy     string        `json:"sort_by"`
	SortOrder  string        `json:"sort_order"`
	Group      ViewGroup     `json:"group"`
	Sort       ViewSort      `json:"sort"`
	Columns    []ViewColumns `json:"columns"`
	Fields     []ViewFields  `json:"fields"`
}

type ViewFields added in v0.0.51

type ViewFields struct {
	ID         string `json:"id"`
	Title      string `json:"title"`
	Filterable bool   `json:"filterable"`
	Sortable   bool   `json:"sortable"`
}

type ViewGroup added in v0.0.51

type ViewGroup struct {
	ID         any    `json:"id"`
	Title      string `json:"title"`
	Filterable bool   `json:"filterable"`
	Sortable   bool   `json:"sortable"`
	Order      string `json:"order"`
}

type ViewID added in v0.0.51

type ViewID uint64

type ViewRestriction added in v0.0.53

type ViewRestriction struct {
	ID   uint      `json:"id"`
	IDs  []GroupID `json:"ids"`
	Type string    `json:"type"`
}

type ViewService added in v0.0.51

type ViewService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/ticketing/business-rules/views/

func (*ViewService) List added in v0.0.51

func (s *ViewService) List(
	ctx context.Context,
	pageHandler func(response ViewsResponse) error,
) error

https://developer.zendesk.com/api-reference/ticketing/business-rules/views/#list-views

type ViewSort added in v0.0.51

type ViewSort struct {
	ID         any    `json:"id"`
	Title      string `json:"title"`
	Filterable bool   `json:"filterable"`
	Sortable   bool   `json:"sortable"`
	Order      string `json:"order"`
}

type ViewsResponse added in v0.0.51

type ViewsResponse struct {
	Views []View `json:"Views"`
	CursorPaginationResponse
}

type WebhookAgentStateEventData added in v0.0.45

type WebhookAgentStateEventData interface {
	any
}

type WebhookArticleEventData added in v0.0.45

type WebhookArticleEventData interface {
	EventTypeArticleAuthorChangedEvent | any
}

type WebhookCommunityPostEventData added in v0.0.45

type WebhookCommunityPostEventData interface {
	any
}

type WebhookEvent added in v0.0.45

type WebhookEvent struct {
	Type                WebhookEventType `json:"type"`
	AccountID           AccountID        `json:"account_id"`
	ID                  WebhookEventID   `json:"id"`
	Time                time.Time        `json:"time"`
	ZendeskEventVersion string           `json:"zendesk_event_version"`
	Subject             string           `json:"subject"`
	Event               any              `json:"event"`
	Detail              any              `json:"detail"`
}

Base webhookevent for Event Based webhooks.

type WebhookEventAgentChannelCreatedPayload added in v0.0.45

type WebhookEventAgentChannelCreatedPayload WebhookEventAgentState[any]

type WebhookEventAgentChannelDeletedPayload added in v0.0.45

type WebhookEventAgentChannelDeletedPayload WebhookEventAgentState[any]

type WebhookEventAgentMaxCapacityChangedPayload added in v0.0.45

type WebhookEventAgentMaxCapacityChangedPayload WebhookEventAgentState[any]

type WebhookEventAgentState added in v0.0.45

type WebhookEventAgentState[EventData WebhookAgentStateEventData] struct {
	Type                WebhookEventType             `json:"type"`
	AccountID           AccountID                    `json:"account_id"`
	ID                  WebhookEventID               `json:"id"`
	Time                time.Time                    `json:"time"`
	ZendeskEventVersion string                       `json:"zendesk_event_version"`
	Subject             string                       `json:"subject"`
	Event               EventData                    `json:"event"`
	Detail              WebhookEventAgentStateDetail `json:"detail"`
}

type WebhookEventAgentStateChangedPayload added in v0.0.45

type WebhookEventAgentStateChangedPayload WebhookEventAgentState[any]

type WebhookEventAgentStateDetail added in v0.0.45

type WebhookEventAgentStateDetail struct {
	AccountID string `json:"account_id"`
	AgentID   string `json:"agent_id"`
	Version   string `json:"version"`
}

type WebhookEventAgentUnifiedStateChangedPayload added in v0.0.45

type WebhookEventAgentUnifiedStateChangedPayload WebhookEventAgentState[any]

type WebhookEventAgentWorkItemAddedPayload added in v0.0.45

type WebhookEventAgentWorkItemAddedPayload WebhookEventAgentState[any]

type WebhookEventAgentWorkItemRemovedPayload added in v0.0.45

type WebhookEventAgentWorkItemRemovedPayload WebhookEventAgentState[any]

type WebhookEventArticle added in v0.0.45

type WebhookEventArticle[EventData WebhookArticleEventData] struct {
	Type                WebhookEventType          `json:"type"`
	AccountID           AccountID                 `json:"account_id"`
	ID                  WebhookEventID            `json:"id"`
	Time                time.Time                 `json:"time"`
	ZendeskEventVersion string                    `json:"zendesk_event_version"`
	Subject             string                    `json:"subject"`
	Event               EventData                 `json:"event"`
	Detail              WebhookEventArticleDetail `json:"detail"`
}

https://developer.zendesk.com/api-reference/webhooks/event-types/webhook-event-types/

type WebhookEventArticleAuthorChangedPayload added in v0.0.45

type WebhookEventArticleAuthorChangedPayload WebhookEventArticle[any]

type WebhookEventArticleCommentChangedPayload added in v0.0.45

type WebhookEventArticleCommentChangedPayload WebhookEventArticle[any]

type WebhookEventArticleCommentCreatedPayload added in v0.0.45

type WebhookEventArticleCommentCreatedPayload WebhookEventArticle[any]

type WebhookEventArticleCommentPublishedPayload added in v0.0.45

type WebhookEventArticleCommentPublishedPayload WebhookEventArticle[any]

type WebhookEventArticleCommentUnpublishedPayload added in v0.0.45

type WebhookEventArticleCommentUnpublishedPayload WebhookEventArticle[any]

type WebhookEventArticleDetail added in v0.0.45

type WebhookEventArticleDetail struct {
	BrandID BrandID   `json:"brand_id"`
	ID      ArticleID `json:"id"`
}

https://developer.zendesk.com/api-reference/webhooks/event-types/article-events/

type WebhookEventArticlePublishedPayload added in v0.0.45

type WebhookEventArticlePublishedPayload WebhookEventArticle[any]

type WebhookEventArticleSubscriptionCreatedPayload added in v0.0.45

type WebhookEventArticleSubscriptionCreatedPayload WebhookEventArticle[any]

type WebhookEventArticleUnpublishedPayload added in v0.0.45

type WebhookEventArticleUnpublishedPayload WebhookEventArticle[any]

type WebhookEventArticleVoteChangedPayload added in v0.0.45

type WebhookEventArticleVoteChangedPayload WebhookEventArticle[any]

type WebhookEventArticleVoteCreatedPayload added in v0.0.45

type WebhookEventArticleVoteCreatedPayload WebhookEventArticle[any]

type WebhookEventArticleVoteRemovedPayload added in v0.0.45

type WebhookEventArticleVoteRemovedPayload WebhookEventArticle[any]

type WebhookEventCommunityPost added in v0.0.45

type WebhookEventCommunityPost[EventData WebhookCommunityPostEventData] struct {
	Type                WebhookEventType                `json:"type"`
	AccountID           AccountID                       `json:"account_id"`
	ID                  WebhookEventID                  `json:"id"`
	Time                time.Time                       `json:"time"`
	ZendeskEventVersion string                          `json:"zendesk_event_version"`
	Subject             string                          `json:"subject"`
	Event               EventData                       `json:"event"`
	Detail              WebhookEventCommunityPostDetail `json:"detail"`
}

type WebhookEventCommunityPostChangedPayload added in v0.0.45

type WebhookEventCommunityPostChangedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostCommentChangedPayload added in v0.0.45

type WebhookEventCommunityPostCommentChangedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostCommentCreatedPayload added in v0.0.45

type WebhookEventCommunityPostCommentCreatedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostCommentPublishedPayload added in v0.0.45

type WebhookEventCommunityPostCommentPublishedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostCommentUnpublishedPayload added in v0.0.45

type WebhookEventCommunityPostCommentUnpublishedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostCommentVoteChangedPayload added in v0.0.45

type WebhookEventCommunityPostCommentVoteChangedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostCommentVoteCreatedPayload added in v0.0.45

type WebhookEventCommunityPostCommentVoteCreatedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostCreatedPayload added in v0.0.45

type WebhookEventCommunityPostCreatedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostDetail added in v0.0.45

type WebhookEventCommunityPostDetail struct {
	BrandID string `json:"brand_id"`
	ID      string `json:"id"`
	PostID  string `json:"post_id"`
}

type WebhookEventCommunityPostPublishedPayload added in v0.0.45

type WebhookEventCommunityPostPublishedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostSubscriptionCreatedPayload added in v0.0.45

type WebhookEventCommunityPostSubscriptionCreatedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostUnpublishedPayload added in v0.0.45

type WebhookEventCommunityPostUnpublishedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostVoteChangedPayload added in v0.0.45

type WebhookEventCommunityPostVoteChangedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostVoteCreatedPayload added in v0.0.45

type WebhookEventCommunityPostVoteCreatedPayload WebhookEventCommunityPost[any]

type WebhookEventCommunityPostVoteRemovedPayload added in v0.0.45

type WebhookEventCommunityPostVoteRemovedPayload WebhookEventCommunityPost[any]

type WebhookEventDataCustomFieldUpdate added in v0.0.45

type WebhookEventDataCustomFieldUpdate struct {
	Current  any `json:"current"`
	Previous any `json:"previous"`
	Field    struct {
		ID    string `json:"id"`
		Title string `json:"title"`
		Type  string `json:"type"`
	} `json:"field"`
}

type WebhookEventDataEmpty added in v0.0.45

type WebhookEventDataEmpty struct{}

type WebhookEventDataIDField added in v0.0.45

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

type WebhookEventDataSimpleBoolUpdate added in v0.0.45

type WebhookEventDataSimpleBoolUpdate struct {
	Current  bool `json:"current"`
	Previous bool `json:"previous"`
}

type WebhookEventDataSimpleBoolUpdateValue added in v0.0.45

type WebhookEventDataSimpleBoolUpdateValue struct {
	CurrentValue  bool `json:"current_value"`
	PreviousValue bool `json:"previous_value"`
}

type WebhookEventDataSimpleStringUpdate added in v0.0.45

type WebhookEventDataSimpleStringUpdate struct {
	Current  string `json:"current"`
	Previous string `json:"previous"`
}

type WebhookEventDataTagsChanged added in v0.0.45

type WebhookEventDataTagsChanged struct {
	Added struct {
		Tags []string `json:"tags"`
	} `json:"added"`
	Removed struct {
		Tags []string `json:"tags"`
	} `json:"removed"`
}

type WebhookEventDataUserGroupMembershipChanged added in v0.0.45

type WebhookEventDataUserGroupMembershipChanged struct {
	Group WebhookEventDataIDField `json:"group"`
}

type WebhookEventDataUserIdentity added in v0.0.45

type WebhookEventDataUserIdentity struct {
	Identity WebhookEventDataUserIdentitySchema `json:"current"`
}

type WebhookEventDataUserIdentityChanged added in v0.0.45

type WebhookEventDataUserIdentityChanged struct {
	Current  WebhookEventDataUserIdentitySchema `json:"current"`
	Previous WebhookEventDataUserIdentitySchema `json:"previous"`
}

type WebhookEventDataUserIdentitySchema added in v0.0.45

type WebhookEventDataUserIdentitySchema struct {
	ID      string `json:"id"`
	Primary bool   `json:"primary"`
	Type    string `json:"type"`
	Value   string `json:"value"`
}

type WebhookEventDataUserMerged added in v0.0.45

type WebhookEventDataUserMerged struct {
	User struct {
		ID string `json:"id"`
	} `json:"user"`
}

type WebhookEventDataUserOrganizationMembershipChanged added in v0.0.45

type WebhookEventDataUserOrganizationMembershipChanged struct {
	Organization struct {
		ID string `json:"id"`
	} `json:"organization"`
}

type WebhookEventDetailCommunityPost added in v0.0.45

type WebhookEventDetailCommunityPost struct {
	BrandID BrandID `json:"brand_id"`
	PostID  PostID  `json:"post_id"`
	TopicID TopicID `json:"topic_id"`
}

https://developer.zendesk.com/api-reference/webhooks/event-types/community-events/#detail-object-properties

type WebhookEventDetailOrganization added in v0.0.45

type WebhookEventDetailOrganization struct {
	CreatedAt      time.Time `json:"created_at"`
	ExternalID     *string   `json:"external_id"`
	GroupID        *string   `json:"group_id"`
	ID             string    `json:"id"`
	Name           string    `json:"name"`
	SharedComments bool      `json:"shared_comments"`
	SharedTickets  bool      `json:"shared_tickets"`
	UpdatedAt      time.Time `json:"updated_at"`
}

https://developer.zendesk.com/api-reference/webhooks/event-types/organization-events/#detail-object-properties

type WebhookEventHandlers added in v0.0.45

type WebhookEventHandlers struct {
	WebhookEventArticlePublished           func(ctx context.Context, eventData WebhookEventArticlePublishedPayload) error
	WebhookEventArticleSubscriptionCreated func(ctx context.Context, eventData WebhookEventArticleSubscriptionCreatedPayload) error
	WebhookEventArticleUnpublished         func(ctx context.Context, eventData WebhookEventArticleUnpublishedPayload) error
	WebhookEventArticleVoteCreated         func(ctx context.Context, eventData WebhookEventArticleVoteCreatedPayload) error
	WebhookEventArticleVoteChanged         func(ctx context.Context, eventData WebhookEventArticleVoteChangedPayload) error
	WebhookEventArticleVoteRemoved         func(ctx context.Context, eventData WebhookEventArticleVoteRemovedPayload) error
	WebhookEventArticleCommentCreated      func(ctx context.Context, eventData WebhookEventArticleCommentCreatedPayload) error
	WebhookEventArticleCommentChanged      func(ctx context.Context, eventData WebhookEventArticleCommentChangedPayload) error
	WebhookEventArticleCommentPublished    func(ctx context.Context, eventData WebhookEventArticleCommentPublishedPayload) error
	WebhookEventArticleCommentUnpublished  func(ctx context.Context, eventData WebhookEventArticleCommentUnpublishedPayload) error
	WebhookEventArticleDefault             func(ctx context.Context, webhookBody []byte) error

	WebhookEventOrganizationCreated            func(ctx context.Context, eventData WebhookEventOrganizationCreatedPayload) error
	WebhookEventOrganizationCustomFieldChanged func(ctx context.Context, eventData WebhookEventOrganizationCustomFieldChangedPayload) error
	WebhookEventOrganizationDeleted            func(ctx context.Context, eventData WebhookEventOrganizationDeletedPayload) error
	WebhookEventOrganizationExternalIDChanged  func(ctx context.Context, eventData WebhookEventOrganizationExternalIDChangedPayload) error
	WebhookEventOrganizationNameChanged        func(ctx context.Context, eventData WebhookEventOrganizationNameChangedPayload) error
	WebhookEventOrganizationTagsChanged        func(ctx context.Context, eventData WebhookEventOrganizationTagsChangedPayload) error
	WebhookEventOrganizationDefault            func(ctx context.Context, webhookBody []byte) error

	WebhookEventUserAliasChanged                  func(ctx context.Context, eventData WebhookEventUserAliasChangedPayload) error
	WebhookEventUserCreated                       func(ctx context.Context, eventData WebhookEventUserCreatedPayload) error
	WebhookEventUserCustomFieldChanged            func(ctx context.Context, eventData WebhookEventUserCustomFieldChangedPayload) error
	WebhookEventUserCustomRoleChanged             func(ctx context.Context, eventData WebhookEventUserCustomRoleChangedPayload) error
	WebhookEventUserDefaultGroupChanged           func(ctx context.Context, eventData WebhookEventUserDefaultGroupChangedPayload) error
	WebhookEventUserDetailsChanged                func(ctx context.Context, eventData WebhookEventUserDetailsChangedPayload) error
	WebhookEventUserExternalIDChanged             func(ctx context.Context, eventData WebhookEventUserExternalIDChangedPayload) error
	WebhookEventUserGroupMembershipCreated        func(ctx context.Context, eventData WebhookEventUserGroupMembershipCreatedPayload) error
	WebhookEventUserGroupMembershipDeleted        func(ctx context.Context, eventData WebhookEventUserGroupMembershipDeletedPayload) error
	WebhookEventUserIdentityChanged               func(ctx context.Context, eventData WebhookEventUserIdentityChangedPayload) error
	WebhookEventUserIdentityCreated               func(ctx context.Context, eventData WebhookEventUserIdentityCreatedPayload) error
	WebhookEventUserIdentityDeleted               func(ctx context.Context, eventData WebhookEventUserIdentityDeletedPayload) error
	WebhookEventUserActiveChanged                 func(ctx context.Context, eventData WebhookEventUserActiveChangedPayload) error
	WebhookEventUserLastLoginChanged              func(ctx context.Context, eventData WebhookEventUserLastLoginChangedPayload) error
	WebhookEventUserMerged                        func(ctx context.Context, eventData WebhookEventUserMergedPayload) error
	WebhookEventUserNameChanged                   func(ctx context.Context, eventData WebhookEventUserNameChangedPayload) error
	WebhookEventUserNotesChanged                  func(ctx context.Context, eventData WebhookEventUserNotesChangedPayload) error
	WebhookEventUserOnlyPrivateCommentsChanged    func(ctx context.Context, eventData WebhookEventUserOnlyPrivateCommentsChangedPayload) error
	WebhookEventUserOrganizationMembershipCreated func(ctx context.Context, eventData WebhookEventUserOrganizationMembershipCreatedPayload) error
	WebhookEventUserOrganizationMembershipDeleted func(ctx context.Context, eventData WebhookEventUserOrganizationMembershipDeletedPayload) error
	WebhookEventUserPasswordChanged               func(ctx context.Context, eventData WebhookEventUserPasswordChangedPayload) error
	WebhookEventUserPhotoChanged                  func(ctx context.Context, eventData WebhookEventUserPhotoChangedPayload) error
	WebhookEventUserRoleChanged                   func(ctx context.Context, eventData WebhookEventUserRoleChangedPayload) error
	WebhookEventUserDeleted                       func(ctx context.Context, eventData WebhookEventUserDeletedPayload) error
	WebhookEventUserSuspendedChanged              func(ctx context.Context, eventData WebhookEventUserSuspendedChangedPayload) error
	WebhookEventUserTagsChanged                   func(ctx context.Context, eventData WebhookEventUserTagsChangedPayload) error
	WebhookEventUserTimeZoneChanged               func(ctx context.Context, eventData WebhookEventUserTimeZoneChangedPayload) error
	WebhookEventUserDefault                       func(ctx context.Context, webhookBody []byte) error

	WebhookEventCommunityPostCreated             func(ctx context.Context, eventData WebhookEventCommunityPostCreatedPayload) error
	WebhookEventCommunityPostChanged             func(ctx context.Context, eventData WebhookEventCommunityPostChangedPayload) error
	WebhookEventCommunityPostPublished           func(ctx context.Context, eventData WebhookEventCommunityPostPublishedPayload) error
	WebhookEventCommunityPostUnpublished         func(ctx context.Context, eventData WebhookEventCommunityPostUnpublishedPayload) error
	WebhookEventCommunityPostSubscriptionCreated func(ctx context.Context, eventData WebhookEventCommunityPostSubscriptionCreatedPayload) error
	WebhookEventCommunityPostVoteCreated         func(ctx context.Context, eventData WebhookEventCommunityPostVoteCreatedPayload) error
	WebhookEventCommunityPostVoteChanged         func(ctx context.Context, eventData WebhookEventCommunityPostVoteChangedPayload) error
	WebhookEventCommunityPostVoteRemoved         func(ctx context.Context, eventData WebhookEventCommunityPostVoteRemovedPayload) error
	WebhookEventCommunityPostCommentCreated      func(ctx context.Context, eventData WebhookEventCommunityPostCommentCreatedPayload) error
	WebhookEventCommunityPostCommentChanged      func(ctx context.Context, eventData WebhookEventCommunityPostCommentChangedPayload) error
	WebhookEventCommunityPostCommentPublished    func(ctx context.Context, eventData WebhookEventCommunityPostCommentPublishedPayload) error
	WebhookEventCommunityPostCommentUnpublished  func(ctx context.Context, eventData WebhookEventCommunityPostCommentUnpublishedPayload) error
	WebhookEventCommunityPostCommentVoteCreated  func(ctx context.Context, eventData WebhookEventCommunityPostCommentVoteCreatedPayload) error
	WebhookEventCommunityPostCommentVoteChanged  func(ctx context.Context, eventData WebhookEventCommunityPostCommentVoteChangedPayload) error
	WebhookEventCommunityPostDefault             func(ctx context.Context, webhookBody []byte) error

	WebhookEventAgentStateChanged        func(ctx context.Context, eventData WebhookEventAgentStateChangedPayload) error
	WebhookEventAgentWorkItemAdded       func(ctx context.Context, eventData WebhookEventAgentWorkItemAddedPayload) error
	WebhookEventAgentWorkItemRemoved     func(ctx context.Context, eventData WebhookEventAgentWorkItemRemovedPayload) error
	WebhookEventAgentMaxCapacityChanged  func(ctx context.Context, eventData WebhookEventAgentMaxCapacityChangedPayload) error
	WebhookEventAgentUnifiedStateChanged func(ctx context.Context, eventData WebhookEventAgentUnifiedStateChangedPayload) error
	WebhookEventAgentChannelCreated      func(ctx context.Context, eventData WebhookEventAgentChannelCreatedPayload) error
	WebhookEventAgentChannelDeleted      func(ctx context.Context, eventData WebhookEventAgentChannelDeletedPayload) error
	WebhookEventAgentDefault             func(ctx context.Context, webhookBody []byte) error

	WebhookEventOmnichannelRoutingConfigFeatureChanged func(ctx context.Context, eventData WebhookEventOmnichannelRoutingConfigFeatureChangedPayload) error
}

type WebhookEventID added in v0.0.45

type WebhookEventID string

type WebhookEventOmnichannelRoutingConfig added in v0.0.45

type WebhookEventOmnichannelRoutingConfig[EventData WebhookOmnichannelRoutingConfigData] struct {
	Type                WebhookEventType                           `json:"type"`
	AccountID           AccountID                                  `json:"account_id"`
	ID                  WebhookEventID                             `json:"id"`
	Time                time.Time                                  `json:"time"`
	ZendeskEventVersion string                                     `json:"zendesk_event_version"`
	Subject             string                                     `json:"subject"`
	Event               EventData                                  `json:"event"`
	Detail              WebhookEventOmnichannelRoutingConfigDetail `json:"detail"`
}

type WebhookEventOmnichannelRoutingConfigDetail added in v0.0.45

type WebhookEventOmnichannelRoutingConfigDetail struct {
	AccountID string `json:"account_id"`
}

type WebhookEventOmnichannelRoutingConfigFeatureChangedPayload added in v0.0.45

type WebhookEventOmnichannelRoutingConfigFeatureChangedPayload WebhookEventOmnichannelRoutingConfig[WebhookEventDataSimpleBoolUpdateValue]

type WebhookEventOrganization added in v0.0.45

type WebhookEventOrganization[EventData WebhookOrganizationEventData] struct {
	Type                WebhookEventType               `json:"type"`
	AccountID           AccountID                      `json:"account_id"`
	ID                  WebhookEventID                 `json:"id"`
	Time                time.Time                      `json:"time"`
	ZendeskEventVersion string                         `json:"zendesk_event_version"`
	Subject             string                         `json:"subject"`
	Event               EventData                      `json:"event"`
	Detail              WebhookEventOrganizationDetail `json:"detail"`
}

type WebhookEventOrganizationCreatedPayload added in v0.0.45

type WebhookEventOrganizationCreatedPayload WebhookEventOrganization[WebhookEventDataEmpty]

type WebhookEventOrganizationCustomFieldChangedPayload added in v0.0.45

type WebhookEventOrganizationCustomFieldChangedPayload WebhookEventOrganization[WebhookEventDataCustomFieldUpdate]

type WebhookEventOrganizationDeletedPayload added in v0.0.45

type WebhookEventOrganizationDeletedPayload WebhookEventOrganization[WebhookEventDataEmpty]

type WebhookEventOrganizationDetail added in v0.0.45

type WebhookEventOrganizationDetail struct {
	CreatedAt      time.Time `json:"created_at"`
	ExternalID     string    `json:"external_id"`
	GroupID        string    `json:"group_id"`
	Email          string    `json:"email"`
	ID             string    `json:"id"`
	Name           string    `json:"name"`
	SharedComments bool      `json:"shared_comments"`
	SharedTickets  bool      `json:"shared_tickets"`
	UpdatedAt      time.Time `json:"updated_at"`
}

type WebhookEventOrganizationExternalIDChangedPayload added in v0.0.45

type WebhookEventOrganizationExternalIDChangedPayload WebhookEventOrganization[WebhookEventDataSimpleStringUpdate]

type WebhookEventOrganizationNameChangedPayload added in v0.0.45

type WebhookEventOrganizationNameChangedPayload WebhookEventOrganization[WebhookEventDataSimpleStringUpdate]

type WebhookEventOrganizationTagsChangedPayload added in v0.0.45

type WebhookEventOrganizationTagsChangedPayload WebhookEventOrganization[WebhookEventDataTagsChanged]

type WebhookEventType added in v0.0.45

type WebhookEventType string
const (
	WebhookEventArticleAuthorChanged       WebhookEventType = "zen:event-type:article.author_changed"
	WebhookEventArticlePublished           WebhookEventType = "zen:event-type:article.published"
	WebhookEventArticleSubscriptionCreated WebhookEventType = "zen:event-type:article.subscription_created"
	WebhookEventArticleUnpublished         WebhookEventType = "zen:event-type:article.unpublished"
	WebhookEventArticleVoteCreated         WebhookEventType = "zen:event-type:article.vote_created"
	WebhookEventArticleVoteChanged         WebhookEventType = "zen:event-type:article.vote_changed"
	WebhookEventArticleVoteRemoved         WebhookEventType = "zen:event-type:article.vote_removed"
	WebhookEventArticleCommentCreated      WebhookEventType = "zen:event-type:article.comment_created"
	WebhookEventArticleCommentChanged      WebhookEventType = "zen:event-type:article.comment_changed"
	WebhookEventArticleCommentPublished    WebhookEventType = "zen:event-type:article.comment_published"
	WebhookEventArticleCommentUnpublished  WebhookEventType = "zen:event-type:article.comment_unpublished"
)

https://developer.zendesk.com/api-reference/webhooks/event-types/article-events/

const (
	WebhookEventCommunityPostCreated             WebhookEventType = "zen:event-type:community_post.created"
	WebhookEventCommunityPostChanged             WebhookEventType = "zen:event-type:community_post.changed"
	WebhookEventCommunityPostPublished           WebhookEventType = "zen:event-type:community_post.published"
	WebhookEventCommunityPostUnpublished         WebhookEventType = "zen:event-type:community_post.unpublished"
	WebhookEventCommunityPostSubscriptionCreated WebhookEventType = "zen:event-type:community_post.subscription_created"
	WebhookEventCommunityPostVoteCreated         WebhookEventType = "zen:event-type:community_post.vote_created"
	WebhookEventCommunityPostVoteChanged         WebhookEventType = "zen:event-type:community_post.vote_changed"
	WebhookEventCommunityPostVoteRemoved         WebhookEventType = "zen:event-type:community_post.vote_removed"
	WebhookEventCommunityPostCommentCreated      WebhookEventType = "zen:event-type:community_post.comment_created"
	WebhookEventCommunityPostCommentChanged      WebhookEventType = "zen:event-type:community_post.comment_changed"
	WebhookEventCommunityPostCommentPublished    WebhookEventType = "zen:event-type:community_post.comment_published"
	WebhookEventCommunityPostCommentUnpublished  WebhookEventType = "zen:event-type:community_post.comment_unpublished"
	WebhookEventCommunityPostCommentVoteCreated  WebhookEventType = "zen:event-type:community_post.comment_vote_created"
	WebhookEventCommunityPostCommentVoteChanged  WebhookEventType = "zen:event-type:community_post.comment_vote_changed"
)

https://developer.zendesk.com/api-reference/webhooks/event-types/community-events/

const (
	WebhookEventOrganizationCreated            WebhookEventType = "zen:event-type:organization.created"
	WebhookEventOrganizationCustomFieldChanged WebhookEventType = "zen:event-type:organization.custom_field_changed"
	WebhookEventOrganizationDeleted            WebhookEventType = "zen:event-type:organization.deleted"
	WebhookEventOrganizationExternalIDChanged  WebhookEventType = "zen:event-type:organization.external_id_changed"
	WebhookEventOrganizationNameChanged        WebhookEventType = "zen:event-type:organization.name_changed"
	WebhookEventOrganizationTagsChanged        WebhookEventType = "zen:event-type:organization.tags_changed"
)

https://developer.zendesk.com/api-reference/webhooks/event-types/organization-events/

const (
	WebhookEventUserAliasChanged                  WebhookEventType = "zen:event-type:user.alias_changed"
	WebhookEventUserCreated                       WebhookEventType = "zen:event-type:user.created"
	WebhookEventUserCustomFieldChanged            WebhookEventType = "zen:event-type:user.custom_field_changed"
	WebhookEventUserCustomRoleChanged             WebhookEventType = "zen:event-type:user.custom_role_changed"
	WebhookEventUserDefaultGroupChanged           WebhookEventType = "zen:event-type:user.default_group_changed"
	WebhookEventUserDetailsChanged                WebhookEventType = "zen:event-type:user.details_changed"
	WebhookEventUserExternalIDChanged             WebhookEventType = "zen:event-type:user.external_id_changed"
	WebhookEventUserGroupMembershipCreated        WebhookEventType = "zen:event-type:user.group_membership_created"
	WebhookEventUserGroupMembershipDeleted        WebhookEventType = "zen:event-type:user.group_membership_deleted"
	WebhookEventUserIdentityChanged               WebhookEventType = "zen:event-type:user.identity_changed"
	WebhookEventUserIdentityCreated               WebhookEventType = "zen:event-type:user.identity_created"
	WebhookEventUserIdentityDeleted               WebhookEventType = "zen:event-type:user.identity_deleted"
	WebhookEventUserActiveChanged                 WebhookEventType = "zen:event-type:user.active_changed"
	WebhookEventUserLastLoginChanged              WebhookEventType = "zen:event-type:user.last_login_changed"
	WebhookEventUserMerged                        WebhookEventType = "zen:event-type:user.merged"
	WebhookEventUserNameChanged                   WebhookEventType = "zen:event-type:user.name_changed"
	WebhookEventUserNotesChanged                  WebhookEventType = "zen:event-type:user.notes_changed"
	WebhookEventUserOnlyPrivateCommentsChanged    WebhookEventType = "zen:event-type:user.only_private_comments_changed"
	WebhookEventUserOrganizationMembershipCreated WebhookEventType = "zen:event-type:user.organization_membership_created"
	WebhookEventUserOrganizationMembershipDeleted WebhookEventType = "zen:event-type:user.organization_membership_deleted"
	WebhookEventUserPasswordChanged               WebhookEventType = "zen:event-type:user.password_changed" // #nosec G101 -- This is a false positive
	WebhookEventUserPhotoChanged                  WebhookEventType = "zen:event-type:user.photo_changed"
	WebhookEventUserRoleChanged                   WebhookEventType = "zen:event-type:user.role_changed"
	WebhookEventUserDeleted                       WebhookEventType = "zen:event-type:user.deleted"
	WebhookEventUserSuspendedChanged              WebhookEventType = "zen:event-type:user.suspended_changed"
	WebhookEventUserTagsChanged                   WebhookEventType = "zen:event-type:user.tags_changed"
	WebhookEventUserTimeZoneChanged               WebhookEventType = "zen:event-type:user.time_zone_changed"
)

https://developer.zendesk.com/api-reference/webhooks/event-types/user-events

const (
	WebhookEventAgentStateChanged        WebhookEventType = "zen:event-type:agent.state_changed"
	WebhookEventAgentWorkItemAdded       WebhookEventType = "zen:event-type:agent.work_item_added"
	WebhookEventAgentWorkItemRemoved     WebhookEventType = "zen:event-type:agent.work_item_removed"
	WebhookEventAgentMaxCapacityChanged  WebhookEventType = "zen:event-type:agent.max_capacity_changed"
	WebhookEventAgentUnifiedStateChanged WebhookEventType = "zen:event-type:agent.unified_state_changed"
	WebhookEventAgentChannelCreated      WebhookEventType = "zen:event-type:agent.channel_created"
	WebhookEventAgentChannelDeleted      WebhookEventType = "zen:event-type:agent.channel_deleted"
)

https://developer.zendesk.com/api-reference/webhooks/event-types/agent-availability-events/

const (
	WebhookEventOmnichannelRoutingConfigFeatureChanged WebhookEventType = "zen:event-type:omnichannel_config.omnichannel_routing_feature_changed"
)

https://developer.zendesk.com/api-reference/webhooks/event-types/omnichannel-routing-configuration-events/

type WebhookEventUser added in v0.0.45

type WebhookEventUser[EventData WebhookUserEventData] struct {
	Type                WebhookEventType       `json:"type"`
	AccountID           AccountID              `json:"account_id"`
	ID                  WebhookEventID         `json:"id"`
	Time                time.Time              `json:"time"`
	ZendeskEventVersion string                 `json:"zendesk_event_version"`
	Subject             string                 `json:"subject"`
	Event               EventData              `json:"event"`
	Detail              WebhookEventUserDetail `json:"detail"`
}

type WebhookEventUserActiveChangedPayload added in v0.0.45

type WebhookEventUserActiveChangedPayload WebhookEventUser[WebhookEventDataSimpleBoolUpdate]

type WebhookEventUserActiveStatusChangedPayload added in v0.0.45

type WebhookEventUserActiveStatusChangedPayload struct {
	Current  bool `json:"current"`
	Previous bool `json:"previous"`
}

type WebhookEventUserAliasChangedPayload added in v0.0.45

type WebhookEventUserAliasChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserCreatedPayload added in v0.0.45

type WebhookEventUserCreatedPayload WebhookEventUser[WebhookEventDataEmpty]

type WebhookEventUserCustomFieldChangedPayload added in v0.0.45

type WebhookEventUserCustomFieldChangedPayload WebhookEventUser[WebhookEventDataCustomFieldUpdate]

type WebhookEventUserCustomRoleChangedPayload added in v0.0.45

type WebhookEventUserCustomRoleChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserDefaultGroupChangedPayload added in v0.0.45

type WebhookEventUserDefaultGroupChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserDeletedPayload added in v0.0.45

type WebhookEventUserDeletedPayload WebhookEventUser[WebhookEventDataEmpty]

type WebhookEventUserDetail added in v0.0.45

type WebhookEventUserDetail struct {
	CreatedAt      time.Time `json:"created_at"`
	Email          string    `json:"email"`
	ExternalID     string    `json:"external_id"`
	DefaultGroupID string    `json:"default_group_id"`
	ID             string    `json:"id"`
	OrganizationID string    `json:"organization_id"`
	Role           string    `json:"role"`
	UpdatedAt      time.Time `json:"updated_at"`
}

type WebhookEventUserDetailsChangedPayload added in v0.0.45

type WebhookEventUserDetailsChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserExternalIDChangedPayload added in v0.0.45

type WebhookEventUserExternalIDChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserGroupMembershipCreatedPayload added in v0.0.45

type WebhookEventUserGroupMembershipCreatedPayload WebhookEventUser[WebhookEventDataUserGroupMembershipChanged]

type WebhookEventUserGroupMembershipDeletedPayload added in v0.0.45

type WebhookEventUserGroupMembershipDeletedPayload WebhookEventUser[WebhookEventDataUserGroupMembershipChanged]

type WebhookEventUserIdentityChangedPayload added in v0.0.45

type WebhookEventUserIdentityChangedPayload WebhookEventUser[WebhookEventDataUserIdentityChanged]

type WebhookEventUserIdentityCreatedPayload added in v0.0.45

type WebhookEventUserIdentityCreatedPayload WebhookEventUser[WebhookEventDataUserIdentity]

type WebhookEventUserIdentityDeletedPayload added in v0.0.45

type WebhookEventUserIdentityDeletedPayload WebhookEventUser[WebhookEventDataUserIdentity]

type WebhookEventUserLastLoginChangedPayload added in v0.0.45

type WebhookEventUserLastLoginChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserMergedPayload added in v0.0.45

type WebhookEventUserMergedPayload WebhookEventUser[WebhookEventDataUserMerged]

type WebhookEventUserNameChangedPayload added in v0.0.45

type WebhookEventUserNameChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserNotesChangedPayload added in v0.0.45

type WebhookEventUserNotesChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserOnlyPrivateCommentsChangedPayload added in v0.0.45

type WebhookEventUserOnlyPrivateCommentsChangedPayload WebhookEventUser[WebhookEventDataSimpleBoolUpdate]

type WebhookEventUserOrganizationMembershipCreatedPayload added in v0.0.45

type WebhookEventUserOrganizationMembershipCreatedPayload WebhookEventUser[WebhookEventDataUserOrganizationMembershipChanged]

type WebhookEventUserOrganizationMembershipDeletedPayload added in v0.0.45

type WebhookEventUserOrganizationMembershipDeletedPayload WebhookEventUser[WebhookEventDataUserOrganizationMembershipChanged]

type WebhookEventUserPasswordChangedPayload added in v0.0.45

type WebhookEventUserPasswordChangedPayload WebhookEventUser[WebhookEventDataEmpty]

type WebhookEventUserPhotoChangedPayload added in v0.0.45

type WebhookEventUserPhotoChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserRoleChangedPayload added in v0.0.45

type WebhookEventUserRoleChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookEventUserSuspendedChangedPayload added in v0.0.45

type WebhookEventUserSuspendedChangedPayload WebhookEventUser[WebhookEventDataSimpleBoolUpdate]

type WebhookEventUserTagsChangedPayload added in v0.0.45

type WebhookEventUserTagsChangedPayload WebhookEventUser[WebhookEventDataTagsChanged]

type WebhookEventUserTimeZoneChangedPayload added in v0.0.45

type WebhookEventUserTimeZoneChangedPayload WebhookEventUser[WebhookEventDataSimpleStringUpdate]

type WebhookOmnichannelRoutingConfigData added in v0.0.45

type WebhookOmnichannelRoutingConfigData interface {
	WebhookEventDataSimpleBoolUpdateValue
}

type WebhookService added in v0.0.45

type WebhookService struct {
	// contains filtered or unexported fields
}

https://developer.zendesk.com/api-reference/webhooks/webhooks-api/webhooks/

func (*WebhookService) HandleWebhookEvent added in v0.0.45

func (s *WebhookService) HandleWebhookEvent(
	eventHandlers WebhookEventHandlers,
	webhookSigningSecret string,
) http.Handler

func (*WebhookService) HandleWebhookTrigger added in v0.0.45

func (s *WebhookService) HandleWebhookTrigger(
	handler func(ctx context.Context, webhookBody []byte) error,
	webhookSigningSecret string,
) http.Handler

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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