Documentation ¶
Index ¶
- Constants
- func Init(bc base.Component) *component
- type FreshdeskClient
- func (c *FreshdeskClient) CreateCompany(req *TaskCreateCompanyReq) (*TaskCreateCompanyResponse, error)
- func (c *FreshdeskClient) CreateContact(req *TaskCreateContactReq) (*TaskCreateContactResponse, error)
- func (c *FreshdeskClient) CreateTicket(req *TaskCreateTicketReq) (*TaskCreateTicketResponse, error)
- func (c *FreshdeskClient) CreateTicketNote(ticketID int64, req *TaskCreateTicketNoteReq) (*TaskCreateTicketNoteResponse, error)
- func (c *FreshdeskClient) GetAgent(agentID int64) (*TaskGetAgentResponse, error)
- func (c *FreshdeskClient) GetAll(objectType string, pagination bool, paginationPath string) ([]TaskGetAllResponse, string, error)
- func (c *FreshdeskClient) GetAllConversations(ticketID int64, pagination bool, paginationPath string) ([]TaskGetAllConversationsResponse, string, error)
- func (c *FreshdeskClient) GetCompany(companyID int64) (*TaskGetCompanyResponse, error)
- func (c *FreshdeskClient) GetContact(contactID int64) (*TaskGetContactResponse, error)
- func (c *FreshdeskClient) GetGroup(groupID int64) (*TaskGetGroupResponse, error)
- func (c *FreshdeskClient) GetProduct(productID int64) (*TaskGetProductResponse, error)
- func (c *FreshdeskClient) GetRole(roleID int64) (*TaskGetRoleResponse, error)
- func (c *FreshdeskClient) GetSkill(skillID int64) (*TaskGetSkillResponse, error)
- func (c *FreshdeskClient) GetTicket(ticketID int64) (*TaskGetTicketResponse, error)
- func (c *FreshdeskClient) ReplyToTicket(ticketID int64, req *TaskReplyToTicketReq) (*TaskReplyToTicketResponse, error)
- type FreshdeskInterface
- type TaskCreateCompanyInput
- type TaskCreateCompanyOutput
- type TaskCreateCompanyReq
- type TaskCreateCompanyResponse
- type TaskCreateContactInput
- type TaskCreateContactOutput
- type TaskCreateContactReq
- type TaskCreateContactResponse
- type TaskCreateTicketInput
- type TaskCreateTicketNoteInput
- type TaskCreateTicketNoteOutput
- type TaskCreateTicketNoteReq
- type TaskCreateTicketNoteResponse
- type TaskCreateTicketOutput
- type TaskCreateTicketReq
- type TaskCreateTicketResponse
- type TaskGetAgentInput
- type TaskGetAgentOutput
- type TaskGetAgentResponse
- type TaskGetAllConversationsInput
- type TaskGetAllConversationsOutput
- type TaskGetAllConversationsResponse
- type TaskGetAllInput
- type TaskGetAllOutput
- type TaskGetAllResponse
- type TaskGetCompanyInput
- type TaskGetCompanyOutput
- type TaskGetCompanyResponse
- type TaskGetContactInput
- type TaskGetContactOutput
- type TaskGetContactResponse
- type TaskGetGroupInput
- type TaskGetGroupOutput
- type TaskGetGroupResponse
- type TaskGetProductInput
- type TaskGetProductOutput
- type TaskGetProductResponse
- type TaskGetRoleInput
- type TaskGetRoleOutput
- type TaskGetRoleResponse
- type TaskGetSkillInput
- type TaskGetSkillOutput
- type TaskGetSkillResponse
- type TaskGetTicketInput
- type TaskGetTicketOutput
- type TaskGetTicketResponse
- type TaskReplyToTicketInput
- type TaskReplyToTicketOutput
- type TaskReplyToTicketReq
- type TaskReplyToTicketResponse
Constants ¶
View Source
const ( AgentPath = "agents" RolePath = "roles" GroupPath = "groups" SkillPath = "admin/skills" )
View Source
const (
CompanyPath = "companies"
)
View Source
const (
ContactPath = "contacts"
)
View Source
const (
ProductPath = "products"
)
View Source
const (
TicketPath = "tickets"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FreshdeskClient ¶
type FreshdeskClient struct {
// contains filtered or unexported fields
}
func (*FreshdeskClient) CreateCompany ¶
func (c *FreshdeskClient) CreateCompany(req *TaskCreateCompanyReq) (*TaskCreateCompanyResponse, error)
func (*FreshdeskClient) CreateContact ¶
func (c *FreshdeskClient) CreateContact(req *TaskCreateContactReq) (*TaskCreateContactResponse, error)
func (*FreshdeskClient) CreateTicket ¶
func (c *FreshdeskClient) CreateTicket(req *TaskCreateTicketReq) (*TaskCreateTicketResponse, error)
func (*FreshdeskClient) CreateTicketNote ¶
func (c *FreshdeskClient) CreateTicketNote(ticketID int64, req *TaskCreateTicketNoteReq) (*TaskCreateTicketNoteResponse, error)
func (*FreshdeskClient) GetAgent ¶
func (c *FreshdeskClient) GetAgent(agentID int64) (*TaskGetAgentResponse, error)
func (*FreshdeskClient) GetAll ¶
func (c *FreshdeskClient) GetAll(objectType string, pagination bool, paginationPath string) ([]TaskGetAllResponse, string, error)
func (*FreshdeskClient) GetAllConversations ¶
func (c *FreshdeskClient) GetAllConversations(ticketID int64, pagination bool, paginationPath string) ([]TaskGetAllConversationsResponse, string, error)
func (*FreshdeskClient) GetCompany ¶
func (c *FreshdeskClient) GetCompany(companyID int64) (*TaskGetCompanyResponse, error)
func (*FreshdeskClient) GetContact ¶
func (c *FreshdeskClient) GetContact(contactID int64) (*TaskGetContactResponse, error)
func (*FreshdeskClient) GetGroup ¶
func (c *FreshdeskClient) GetGroup(groupID int64) (*TaskGetGroupResponse, error)
func (*FreshdeskClient) GetProduct ¶
func (c *FreshdeskClient) GetProduct(productID int64) (*TaskGetProductResponse, error)
func (*FreshdeskClient) GetRole ¶
func (c *FreshdeskClient) GetRole(roleID int64) (*TaskGetRoleResponse, error)
func (*FreshdeskClient) GetSkill ¶
func (c *FreshdeskClient) GetSkill(skillID int64) (*TaskGetSkillResponse, error)
func (*FreshdeskClient) GetTicket ¶
func (c *FreshdeskClient) GetTicket(ticketID int64) (*TaskGetTicketResponse, error)
func (*FreshdeskClient) ReplyToTicket ¶
func (c *FreshdeskClient) ReplyToTicket(ticketID int64, req *TaskReplyToTicketReq) (*TaskReplyToTicketResponse, error)
type FreshdeskInterface ¶
type FreshdeskInterface interface { GetTicket(ticketID int64) (*TaskGetTicketResponse, error) CreateTicket(req *TaskCreateTicketReq) (*TaskCreateTicketResponse, error) ReplyToTicket(ticketID int64, req *TaskReplyToTicketReq) (*TaskReplyToTicketResponse, error) CreateTicketNote(ticketID int64, req *TaskCreateTicketNoteReq) (*TaskCreateTicketNoteResponse, error) GetContact(contactID int64) (*TaskGetContactResponse, error) CreateContact(req *TaskCreateContactReq) (*TaskCreateContactResponse, error) GetCompany(companyID int64) (*TaskGetCompanyResponse, error) CreateCompany(req *TaskCreateCompanyReq) (*TaskCreateCompanyResponse, error) GetAll(objectType string, pagination bool, paginationPath string) ([]TaskGetAllResponse, string, error) GetAllConversations(ticketID int64, pagination bool, paginationPath string) ([]TaskGetAllConversationsResponse, string, error) GetProduct(productID int64) (*TaskGetProductResponse, error) GetAgent(agentID int64) (*TaskGetAgentResponse, error) GetRole(roleID int64) (*TaskGetRoleResponse, error) GetGroup(groupID int64) (*TaskGetGroupResponse, error) GetSkill(skillID int64) (*TaskGetSkillResponse, error) }
type TaskCreateCompanyInput ¶
type TaskCreateCompanyInput struct { Name string `json:"name"` Description string `json:"description"` Note string `json:"note"` Domains []string `json:"domains"` HealthScore string `json:"health-score"` AccountTier string `json:"account-tier"` RenewalDate string `json:"renewal-date"` Industry string `json:"industry"` }
type TaskCreateCompanyOutput ¶
type TaskCreateCompanyReq ¶
type TaskCreateCompanyReq struct { Name string `json:"name"` Description string `json:"description,omitempty"` Note string `json:"note,omitempty"` Domains []string `json:"domains,omitempty"` HealthScore string `json:"health_score,omitempty"` AccountTier string `json:"account_tier,omitempty"` RenewalDate string `json:"renewal_date,omitempty"` Industry string `json:"industry,omitempty"` }
type TaskCreateContactInput ¶
type TaskCreateContactInput struct { Name string `json:"name"` Email string `json:"email"` Phone string `json:"phone"` Mobile string `json:"mobile"` Description string `json:"description"` Address string `json:"address"` JobTitle string `json:"job-title"` Tags []string `json:"tags"` Language string `json:"language"` TimeZone string `json:"time-zone"` CompanyID int64 `json:"company-id"` UniqueExternalID string `json:"unique-external-id"` TwitterID string `json:"twitter-id"` ViewAllTickets bool `json:"view-all-tickets"` OtherEmails []string `json:"other-emails"` OtherCompanies []string `json:"other-companies"` OtherPhoneNumbers []string `json:"other-phone-numbers"` }
type TaskCreateContactOutput ¶
type TaskCreateContactReq ¶
type TaskCreateContactReq struct { Name string `json:"name"` Email string `json:"email,omitempty"` Phone string `json:"phone,omitempty"` Mobile string `json:"mobile,omitempty"` Description string `json:"description,omitempty"` Address string `json:"address,omitempty"` JobTitle string `json:"job_title,omitempty"` Tags []string `json:"tags,omitempty"` Language string `json:"language,omitempty"` TimeZone string `json:"time_zone,omitempty"` CompanyID int64 `json:"company_id,omitempty"` UniqueExternalID string `json:"unique_external_id,omitempty"` TwitterID string `json:"twitter_id,omitempty"` ViewAllTickets bool `json:"view_all_tickets,omitempty"` OtherEmails []string `json:"other_emails,omitempty"` OtherCompanies []taskCreateContactReqOtherCompany `json:"other_companies,omitempty"` OtherPhoneNumbers []taskCreateContactReqOtherPhoneNumber `json:"other_phone_numbers,omitempty"` }
type TaskCreateTicketInput ¶
type TaskCreateTicketInput struct { // Only one is needed: requester-id or email RequesterID int64 `json:"requester-id"` Email string `json:"email"` Subject string `json:"subject"` Description string `json:"description"` Source string `json:"source"` Status string `json:"status"` Priority string `json:"priority"` Type string `json:"ticket-type"` CompanyID int64 `json:"company-id"` ProductID int64 `json:"product-id"` GroupID int64 `json:"group-id"` ResponderID int64 `json:"responder-id"` Tags []string `json:"tags"` CCEmails []string `json:"cc-emails"` ParentID int64 `json:"parent-id"` RelatedTicketIDs []int64 `json:"related-ticket-ids"` }
Create Ticket
type TaskCreateTicketNoteReq ¶
type TaskCreateTicketOutput ¶
type TaskCreateTicketReq ¶
type TaskCreateTicketReq struct { RequesterID int64 `json:"requester_id,omitempty"` Email string `json:"email,omitempty"` Subject string `json:"subject"` Description string `json:"description"` Source int `json:"source"` Status int `json:"status"` Priority int `json:"priority"` Type string `json:"type,omitempty"` CompanyID int64 `json:"company_id,omitempty"` ProductID int64 `json:"product_id,omitempty"` GroupID int64 `json:"group_id,omitempty"` ResponderID int64 `json:"responder_id,omitempty"` Tags []string `json:"tags,omitempty"` CCEmails []string `json:"cc_emails,omitempty"` ParentID int64 `json:"parent_id,omitempty"` RelatedTicketIDs []int64 `json:"related_ticket_ids,omitempty"` }
type TaskGetAgentInput ¶
type TaskGetAgentInput struct {
AgentID int64 `json:"agent-id"`
}
type TaskGetAgentOutput ¶
type TaskGetAgentOutput struct { Name string `json:"name,omitempty"` Active bool `json:"active"` Email string `json:"email"` JobTitle string `json:"job-title,omitempty"` Language string `json:"language,omitempty"` LastLoginAt string `json:"last-login-at"` Mobile string `json:"mobile,omitempty"` Phone string `json:"phone,omitempty"` TimeZone string `json:"time-zone,omitempty"` Type string `json:"type"` TicketScope string `json:"ticket-scope"` Available bool `json:"available"` GroupIDs []int64 `json:"group-ids"` RoleIDs []int64 `json:"role-ids"` SkillIDs []int64 `json:"skill-ids"` Occasional bool `json:"occasional"` Signature string `json:"signature,omitempty"` FocusMode bool `json:"focus-mode"` Deactivated bool `json:"deactivated"` CreatedAt string `json:"created-at"` UpdatedAt string `json:"updated-at"` }
type TaskGetAgentResponse ¶
type TaskGetAgentResponse struct { Contact taskGetAgentResponseContact `json:"contact"` Type string `json:"type"` TicketScope int `json:"ticket_scope"` Available bool `json:"available"` GroupIDs []int64 `json:"group_ids"` RoleIDs []int64 `json:"role_ids"` SkillIDs []int64 `json:"skill_ids"` Occasional bool `json:"occasional"` Signature string `json:"signature"` FocusMode bool `json:"focus_mode"` Deactivated bool `json:"deactivated"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
type TaskGetAllConversationsInput ¶
type TaskGetAllConversationsInput struct {
TicketID int64 `json:"ticket-id"`
}
type TaskGetAllConversationsOutput ¶
type TaskGetAllConversationsOutput struct { Conversations []taskGetAllConversationsOutputConversation `json:"conversations"` ConversationsLength int `json:"conversations-length"` }
type TaskGetAllConversationsResponse ¶
type TaskGetAllConversationsResponse struct { BodyText string `json:"body_text"` ConversationID int64 `json:"id"` SupportEmail string `json:"support_email"` ToEmails []string `json:"to_emails"` FromEmail string `json:"from_email"` CCEmails []string `json:"cc_emails"` BCCEmails []string `json:"bcc_emails"` Incoming bool `json:"incoming"` Private bool `json:"private"` UserID int64 `json:"user_id"` CreatedAt string `json:"created_at"` }
type TaskGetAllInput ¶
Task 1: Get All
type TaskGetAllOutput ¶
type TaskGetAllResponse ¶
type TaskGetAllResponse struct {
ID int64 `json:"id"`
}
type TaskGetCompanyInput ¶
type TaskGetCompanyInput struct {
CompanyID int64 `json:"company-id"`
}
type TaskGetCompanyOutput ¶
type TaskGetCompanyOutput struct { Name string `json:"name"` Description string `json:"description,omitempty"` Note string `json:"note,omitempty"` Domains []string `json:"domains"` HealthScore string `json:"health-score,omitempty"` AccountTier string `json:"account-tier,omitempty"` RenewalDate string `json:"renewal-date,omitempty"` Industry string `json:"industry,omitempty"` CreatedAt string `json:"created-at,omitempty"` UpdatedAt string `json:"updated-at,omitempty"` CustomFields map[string]interface{} `json:"custom-fields,omitempty"` }
type TaskGetCompanyResponse ¶
type TaskGetCompanyResponse struct { Name string `json:"name"` Description string `json:"description"` Note string `json:"note"` Domains []string `json:"domains"` HealthScore string `json:"health_score"` AccountTier string `json:"account_tier"` RenewalDate string `json:"renewal_date"` Industry string `json:"industry"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` CustomFields map[string]interface{} `json:"custom_fields"` }
type TaskGetContactInput ¶
type TaskGetContactInput struct {
ContactID int64 `json:"contact-id"`
}
type TaskGetContactOutput ¶
type TaskGetContactOutput struct { Name string `json:"name"` Email string `json:"email,omitempty"` Phone string `json:"phone,omitempty"` Mobile string `json:"mobile,omitempty"` Description string `json:"description,omitempty"` Address string `json:"address,omitempty"` JobTitle string `json:"job-title,omitempty"` Tags []string `json:"tags"` Language string `json:"language,omitempty"` TimeZone string `json:"time-zone,omitempty"` CompanyID int64 `json:"company-id,omitempty"` UniqueExternalID string `json:"unique-external-id,omitempty"` TwitterID string `json:"twitter-id,omitempty"` ViewAllTickets bool `json:"view-all-tickets"` Deleted bool `json:"deleted"` Active bool `json:"active"` OtherEmails []string `json:"other-emails"` OtherCompaniesIDs []taskGetContactOutputOtherCompany `json:"other-companies-ids,omitempty"` OtherPhoneNumbers []string `json:"other-phone-numbers"` CreatedAt string `json:"created-at"` UpdatedAt string `json:"updated-at"` CustomFields map[string]interface{} `json:"custom-fields,omitempty"` }
type TaskGetContactResponse ¶
type TaskGetContactResponse struct { Name string `json:"name"` Email string `json:"email"` Phone string `json:"phone"` Mobile string `json:"mobile"` Description string `json:"description"` Address string `json:"address"` JobTitle string `json:"job_title"` Tags []string `json:"tags"` Language string `json:"language"` TimeZone string `json:"time_zone"` CompanyID int64 `json:"company_id"` UniqueExternalID string `json:"unique_external_id"` TwitterID string `json:"twitter_id"` ViewAllTickets bool `json:"view_all_tickets"` Deleted bool `json:"deleted"` Active bool `json:"active"` OtherEmails []string `json:"other_emails"` OtherCompanies []taskGetContactResponseOtherCompany `json:"other_companies"` OtherPhoneNumbers []taskGetContactResponseOtherPhoneNumber `json:"other_phone_numbers"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` CustomFields map[string]interface{} `json:"custom_fields"` }
type TaskGetGroupInput ¶
type TaskGetGroupInput struct {
GroupID int64 `json:"group-id"`
}
Task 3: Get Group
type TaskGetGroupOutput ¶
type TaskGetGroupOutput struct { Name string `json:"name"` Description string `json:"description"` AgentIDs []int64 `json:"agent-ids"` AutoTicketAssign string `json:"auto-ticket-assign"` EscalateTo int64 `json:"escalate-to,omitempty"` UnassignedDuration string `json:"unassigned-duration,omitempty"` GroupType string `json:"group-type,omitempty"` AgentAvailabilityStatus bool `json:"agent-availability-status"` CreatedAt string `json:"created-at"` UpdatedAt string `json:"updated-at"` }
type TaskGetGroupResponse ¶
type TaskGetGroupResponse struct { Name string `json:"name"` Description string `json:"description"` AgentIDs []int64 `json:"agent_ids"` AutoTicketAssign int `json:"auto_ticket_assign"` EscalateTo int64 `json:"escalate_to"` UnassignedDuration string `json:"unassigned_for"` GroupType string `json:"group_type"` AgentAvailabilityStatus bool `json:"agent_availability_status"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
type TaskGetProductInput ¶
type TaskGetProductInput struct {
ProductID int64 `json:"product-id"`
}
type TaskGetProductOutput ¶
type TaskGetProductResponse ¶
type TaskGetRoleInput ¶
type TaskGetRoleInput struct {
RoleID int64 `json:"role-id"`
}
Task 2: Get Role
type TaskGetRoleOutput ¶
type TaskGetRoleResponse ¶
type TaskGetSkillInput ¶
type TaskGetSkillInput struct {
SkillID int64 `json:"skill-id"`
}
type TaskGetSkillOutput ¶
type TaskGetSkillResponse ¶
type TaskGetTicketInput ¶
type TaskGetTicketInput struct {
TicketID int64 `json:"ticket-id"`
}
type TaskGetTicketOutput ¶
type TaskGetTicketOutput struct { Subject string `json:"subject"` DescriptionText string `json:"description-text"` Source string `json:"source"` Status string `json:"status"` Priority string `json:"priority"` TicketType string `json:"ticket-type,omitempty"` AssociationType string `json:"association-type"` AssociatedTicketList []int `json:"associated-ticket-list,omitempty"` Tags []string `json:"tags"` CCEmails []string `json:"cc-emails"` ForwardEmails []string `json:"forward-emails"` ReplyCCEmails []string `json:"reply-cc-emails"` RequesterID int64 `json:"requester-id"` ResponderID int64 `json:"responder-id,omitempty"` CompanyID int64 `json:"company-id,omitempty"` GroupID int64 `json:"group-id,omitempty"` ProductID int64 `json:"product-id,omitempty"` SupportEmail string `json:"support-email,omitempty"` ToEmails []string `json:"to-emails"` Spam bool `json:"spam"` DueBy string `json:"due-by,omitempty"` IsEscalated bool `json:"is-escalated"` FirstResponseDueBy string `json:"first-response-due-by,omitempty"` FirstResponseEscalated bool `json:"first-response-escalated"` NextResponseDueBy string `json:"next-response-due-by,omitempty"` NextResponseEscalated bool `json:"next-response-escalated"` CreatedAt string `json:"created-at"` UpdatedAt string `json:"updated-at"` Attachments []taskGetTicketOutputAttachment `json:"attachments,omitempty"` SentimentScore int `json:"sentiment-score"` InitialSentimentScore int `json:"initial-sentiment-score"` CustomFields map[string]interface{} `json:"custom-fields,omitempty"` }
type TaskGetTicketResponse ¶
type TaskGetTicketResponse struct { Subject string `json:"subject"` DescriptionText string `json:"description_text"` Source int `json:"source"` Status int `json:"status"` Priority int `json:"priority"` TicketType string `json:"type"` AssociationType int `json:"association_type"` AssociatedTicketList []int `json:"associated_tickets_list"` Tags []string `json:"tags"` CCEmails []string `json:"cc_emails"` ForwardEmails []string `json:"fwd_emails"` ReplyCCEmails []string `json:"reply_cc_emails"` RequesterID int64 `json:"requester_id"` ResponderID int64 `json:"responder_id"` CompanyID int64 `json:"company_id"` GroupID int64 `json:"group_id"` ProductID int64 `json:"product_id"` SupportEmail string `json:"support_email"` ToEmails []string `json:"to_emails"` Spam bool `json:"spam"` IsEscalated bool `json:"is_escalated"` DueBy string `json:"due_by"` FirstResponseDueBy string `json:"fr_due_by"` FirstResponseEscalated bool `json:"fr_escalated"` NextResponseDueBy string `json:"nr_due_by"` NextResponseEscalated bool `json:"nr_escalated"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Attachments []taskGetTicketOutputAttachment `json:"attachments"` SentimentScore int `json:"sentiment_score"` InitialSentimentScore int `json:"initial_sentiment_score"` CustomFields map[string]interface{} `json:"custom_fields"` }
type TaskReplyToTicketInput ¶
type TaskReplyToTicketOutput ¶
type TaskReplyToTicketReq ¶
Click to show internal directories.
Click to hide internal directories.