kf

package
v0.0.0-...-4a54426 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAccount

func AddAccount(name, mediaID string, result *ResultAccountAdd) wx.Action

AddAccount 添加客服帐号

func AddContactWay

func AddContactWay(openKFID, scene string, result *ResultContactWayAdd) wx.Action

AddContactWay 获取客服帐号链接

func AddServicer

func AddServicer(openKFID string, userIDs []string, result *ResultServicerAdd) wx.Action

AddServicer 添加接待人员

func BatchGetCustomer

func BatchGetCustomer(externalUserIDs []string, result *ResultCustomerBatchGet) wx.Action

BatchGetCustomer 获取客户基础信息

func CancelUpgradeService

func CancelUpgradeService(openKFID, externalUserID string) wx.Action

CancelUpgradeService 为客户取消推荐

func DeleteAccount

func DeleteAccount(openKFID string) wx.Action

DeleteAccount 删除客服帐号

func DeleteServicer

func DeleteServicer(openKFID string, userIDs []string, result *ResultServicerDelete) wx.Action

DeleteServicer 删除接待人员

func GetServiceState

func GetServiceState(openKFID, externalUserID string, result *ResultServiceState) wx.Action

func GetUpgradeServiceConfig

func GetUpgradeServiceConfig(result *ResultServiceUpgradeConfig) wx.Action

GetUpgradeServiceConfig 获取配置的专员与客户群

func ListAccount

func ListAccount(result *ResultAccountList) wx.Action

ListAccount 获取客服帐号列表

func ListServicer

func ListServicer(openKFID string, result *ResultServicerList) wx.Action

ListServicer 获取接待人员列表

func SendFileMsg

func SendFileMsg(toUser, openKFID, mediaID string, result *ResultMsgSend) wx.Action

SendFileMsg 发送文件消息

func SendImageMsg

func SendImageMsg(toUser, openKFID, mediaID string, result *ResultMsgSend) wx.Action

SendImageMsg 发送图片消息

func SendLinkMsg

func SendLinkMsg(toUser, openKFID string, link *Link, result *ResultMsgSend) wx.Action

SendLinkMsg 发送图文链接消息

func SendLocationMsg

func SendLocationMsg(toUser, openKFID string, location *Location, result *ResultMsgSend) wx.Action

SendLocationMsg 发送地理位置消息

func SendMenuMsg

func SendMenuMsg(toUser, openKFID string, menu *Menu, result *ResultMsgSend) wx.Action

SendMenuMsg 发送菜单消息

func SendMenuMsgOnEvent

func SendMenuMsgOnEvent(code string, menu *Menu, result *ResultMsgSend) wx.Action

SendMenuMsgOnEvent 发送欢迎语等事件响应消息(菜单消息)

func SendMinipMsg

func SendMinipMsg(toUser, openKFID string, minip *Minip, result *ResultMsgSend) wx.Action

SendMinipMsg 发送小程序消息

func SendTextMsg

func SendTextMsg(toUser, openKFID, content string, result *ResultMsgSend) wx.Action

SendTextMsg 发送文本消息

func SendTextMsgOnEvent

func SendTextMsgOnEvent(code, content string, result *ResultMsgSend) wx.Action

SendTextMsgOnEvent 发送欢迎语等事件响应消息(文本消息)

func SendVideoMsg

func SendVideoMsg(toUser, openKFID, mediaID string, result *ResultMsgSend) wx.Action

SendVideoMsg 发送视频消息

func SendVoiceMsg

func SendVoiceMsg(toUser, openKFID, mediaID string, result *ResultMsgSend) wx.Action

SendVoiceMsg 发送语音消息

func SyncMsg

func SyncMsg(params *ParamsMsgSync, result *ResultMsgSync) wx.Action

SyncMsg 读取消息

func TransferServiceState

func TransferServiceState(params *ParamsServiceStateTransfer, result *ResultServiceStateTransfer) wx.Action

func UpdateAccount

func UpdateAccount(openKFID, name, mediaID string) wx.Action

UpdateAccount 修改客服帐号

func UpgradeGroupChatService

func UpgradeGroupChatService(openKFID, externalUserID string, groupChat *GroupChat) wx.Action

UpgradeGroupChatService 为客户升级为客户群服务

func UpgradeMemberService

func UpgradeMemberService(openKFID, externalUserID string, member *Member) wx.Action

UpgradeMemberService 为客户升级为专员服务

Types

type AccountListData

type AccountListData struct {
	OpenKFID string `json:"open_kfid"`
	Name     string `json:"name"`
	Avatar   string `json:"avatar"`
}

type BusinessCard

type BusinessCard struct {
	UserID string `json:"userid"`
}

type ClickMenu

type ClickMenu struct {
	ID      string `json:"id"`
	Content string `json:"content"`
}

type Customer

type Customer struct {
	ExternalUserID string `json:"external_userid"`
	Nickname       string `json:"nickname"`
	Avatar         string `json:"avatar"`
	Gender         int    `json:"gender"`
	UnionID        string `json:"unionid"`
}

type ErrServicer

type ErrServicer struct {
	UserID  string `json:"userid"`
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

type Event

type Event struct {
	EventType         event.EventType `json:"event_type"`
	OpenKFID          string          `json:"open_kfid,omitempty"`
	ExternalUserID    string          `json:"external_userid,omitempty"`
	Scene             string          `json:"scene,omitempty"`
	SceneParam        string          `json:"scene_param,omitempty"`
	WelcomeCode       string          `json:"welcome_code,omitempty"`
	FailMsgID         string          `json:"fail_msgid,omitempty"`
	FailType          int             `json:"fail_type,omitempty"`
	ServicerUserID    string          `json:"servicer_userid,omitempty"`
	Status            int             `json:"status,omitempty"`
	ChangeType        int             `json:"change_type,omitempty"`
	OldServicerUserID string          `json:"old_servicer_userid,omitempty"`
	NewServicerUserID string          `json:"new_servicer_userid,omitempty"`
	MsgCode           string          `json:"msg_code,omitempty"`
}

type GroupChat

type GroupChat struct {
	ChatID  string `json:"chat_id"`
	Wording string `json:"wording"`
}

type GroupChatRange

type GroupChatRange struct {
	ChatIDList []string `json:"chat_id_list"`
}
type Link struct {
	Title        string `json:"title"`
	Desc         string `json:"desc"`
	URL          string `json:"url"`
	PicURL       string `json:"pic_url,omitempty"`
	ThumbMediaID string `json:"thumb_media_id,omitempty"`
}

type Location

type Location struct {
	Name      string  `json:"name"`
	Address   string  `json:"address"`
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type Media

type Media struct {
	MediaID string `json:"media_id"`
}

type Member

type Member struct {
	UserID  string `json:"userid"`
	Wording string `json:"wording"`
}

type MemberRange

type MemberRange struct {
	UserIDList       []string `json:"userid_list"`
	DepartmentIDList []int64  `json:"department_id_list"`
}
type Menu struct {
	HeadContent string      `json:"head_content"`
	TailContent string      `json:"tail_content"`
	List        []*MenuItem `json:"list"`
}
type MenuItem struct {
	Type  MenuType   `json:"type"`
	Click *ClickMenu `json:"click,omitempty"`
	View  *ViewMenu  `json:"view,omitempty"`
	Minip *MinipMenu `json:"miniprogram,omitempty"`
}
type MenuType string
const (
	MenuClick MenuType = "click"
	MenuView  MenuType = "view"
	MenuMinip MenuType = "miniprogram"
)

type Minip

type Minip struct {
	Title        string `json:"title"`
	AppID        string `json:"appid"`
	PagePath     string `json:"pagepath"`
	ThumbMediaID string `json:"thumb_media_id"`
}

type MinipMenu

type MinipMenu struct {
	AppID    string `json:"appid"`
	PagePath string `json:"pagepath"`
	Content  string `json:"content"`
}

type MsgListData

type MsgListData struct {
	MsgID          string        `json:"msgid"`
	OpenKFID       string        `json:"open_kfid"`
	ExternalUserID string        `json:"external_userid"`
	SendTime       int64         `json:"send_time"`
	Origin         int           `json:"origin"`
	ServicerUserID string        `json:"servicer_userid"`
	MsgType        event.MsgType `json:"msgtype"`
	Text           *Text         `json:"text"`
	Image          *Media        `json:"image"`
	Voice          *Media        `json:"voice"`
	Video          *Media        `json:"video"`
	File           *Media        `json:"file"`
	Location       *Location     `json:"location"`
	Link           *Link         `json:"link"`
	BusinessCard   *BusinessCard `json:"business_card"`
	Minip          *Minip        `json:"miniprogram"`
	Menu           *Menu         `json:"msgmenu"`
	Event          *Event        `json:"event"`
}

type ParamsAccountAdd

type ParamsAccountAdd struct {
	Name    string `json:"name"`
	MediaID string `json:"media_id"`
}

type ParamsAccountDelete

type ParamsAccountDelete struct {
	OpenKFID string `json:"open_kfid"`
}

type ParamsAccountUpdate

type ParamsAccountUpdate struct {
	OpenKFID string `json:"open_kfid"`
	Name     string `json:"name"`
	MediaID  string `json:"media_id"`
}

type ParamsContactWayAdd

type ParamsContactWayAdd struct {
	OpenKFID string `json:"open_kfid"`
	Scene    string `json:"scene"`
}

type ParamsCustomerBatchGet

type ParamsCustomerBatchGet struct {
	ExternalUseridList []string `json:"external_userid_list"`
}

type ParamsMsgOnEvent

type ParamsMsgOnEvent struct {
	Code    string        `json:"code"`
	MsgType event.MsgType `json:"msgtype"`
	Text    *Text         `json:"text,omitempty"`
	Menu    *Menu         `json:"msgmenu,omitempty"`
}

type ParamsMsgSend

type ParamsMsgSend struct {
	ToUser   string        `json:"touser"`
	OpenKFID string        `json:"open_kfid"`
	MsgType  event.MsgType `json:"msgtype"`
	Text     *Text         `json:"text,omitempty"`
	Image    *Media        `json:"image,omitempty"`
	Voice    *Media        `json:"voice,omitempty"`
	Video    *Media        `json:"video,omitempty"`
	File     *Media        `json:"file,omitempty"`
	Link     *Link         `json:"link,omitempty"`
	Minip    *Minip        `json:"miniprogram,omitempty"`
	Menu     *Menu         `json:"msgmenu,omitempty"`
	Location *Location     `json:"location,omitempty"`
}

type ParamsMsgSync

type ParamsMsgSync struct {
	Cursor      string `json:"cursor,omitempty"`
	Token       string `json:"token,omitempty"`
	Limit       int    `json:"limit,omitempty"`
	VoiceFormat int    `json:"voice_format,omitempty"`
}

type ParamsServiceState

type ParamsServiceState struct {
	OpenKFID       string `json:"open_kfid"`
	ExternalUserID string `json:"external_userid"`
}

type ParamsServiceStateTransfer

type ParamsServiceStateTransfer struct {
	OpenKFID       string `json:"open_kfid"`
	ExternalUserID string `json:"external_userid"`
	ServiceState   int    `json:"service_state"`
	ServicerUserID string `json:"servicer_userid"`
}

type ParamsServiceUpgrade

type ParamsServiceUpgrade struct {
	OpenKFID       string     `json:"open_kfid"`
	ExternalUserID string     `json:"external_userid"`
	Type           int        `json:"type"` // 升级到专员服务还是客户群服务:1 - 专员服务;2 - 客户群服务
	Member         *Member    `json:"member,omitempty"`
	GroupChat      *GroupChat `json:"groupchat,omitempty"`
}

type ParamsServiceUpgradeCancel

type ParamsServiceUpgradeCancel struct {
	OpenKFID       string `json:"open_kfid"`
	ExternalUserID string `json:"external_userid"`
}

type ParamsServicerAdd

type ParamsServicerAdd struct {
	OpenKFID   string   `json:"open_kfid"`
	UserIDList []string `json:"userid_list"`
}

type ParamsServicerDelete

type ParamsServicerDelete struct {
	OpenKFID   string   `json:"open_kfid"`
	UserIDList []string `json:"userid_list"`
}

type ResultAccountAdd

type ResultAccountAdd struct {
	OpenKFID string `json:"open_kfid"`
}

type ResultAccountList

type ResultAccountList struct {
	AccountList []*AccountListData `json:"account_list"`
}

type ResultContactWayAdd

type ResultContactWayAdd struct {
	URL string `json:"url"`
}

type ResultCustomerBatchGet

type ResultCustomerBatchGet struct {
	CustomerList          []*Customer `json:"customer_list"`
	InvalidExternalUserID []string    `json:"invalid_external_userid"`
}

type ResultMsgSend

type ResultMsgSend struct {
	MsgID string `json:"msgid"`
}

type ResultMsgSync

type ResultMsgSync struct {
	NextCursor string         `json:"next_cursor"`
	HasMore    int            `json:"has_more"`
	MsgList    []*MsgListData `json:"msg_list"`
}

type ResultServiceState

type ResultServiceState struct {
	ServiceState   int    `json:"service_state"`
	ServicerUserID string `json:"servicer_userid"`
}

type ResultServiceStateTransfer

type ResultServiceStateTransfer struct {
	MsgCode string `json:"msg_code"`
}

type ResultServiceUpgradeConfig

type ResultServiceUpgradeConfig struct {
	MemberRange    *MemberRange    `json:"member_range"`
	GroupChatRange *GroupChatRange `json:"groupchat_range"`
}

type ResultServicerAdd

type ResultServicerAdd struct {
	ResultList []*ErrServicer `json:"result_list"`
}

type ResultServicerDelete

type ResultServicerDelete struct {
	ResultList []*ErrServicer `json:"result_list"`
}

type ResultServicerList

type ResultServicerList struct {
	ServicerList []*ServicerListData `json:"servicer_list"`
}

type ServicerListData

type ServicerListData struct {
	UserID string `json:"userid"`
	Status int    `json:"status"`
}

type Text

type Text struct {
	Content string `json:"content"`
	MenuID  string `json:"menu_id,omitempty"`
}

type ViewMenu

type ViewMenu struct {
	URL     string `json:"url"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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