externalcontact

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExternalcontactGetGroupChatAddr 获取配置过客户群管理的客户群列表。
	ExternalcontactGetGroupChatAddr = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/list?access_token=%s"
	// ExternalcontactGetGroupChatDetailAddr 通过客户群ID,获取详情。包括群名、群成员列表、群成员入群时间、入群方式。(客户群是由具有客户群使用权限的成员创建的外部群)
	ExternalcontactGetGroupChatDetailAddr = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/get?access_token=%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddApplicableRange

type AddApplicableRange struct {
	UserList       []string `json:"user_list,omitempty"`
	DepartmentList []int    `json:"department_list,omitempty"`
}

type AddContactWayOptions

type AddContactWayOptions struct {
	Type          int         `json:"type"`
	Scene         int         `json:"scene"`
	Style         int         `json:"style,omitempty"`
	Remark        string      `json:"remark"`
	SkipVerify    bool        `json:"skip_verify"`
	State         string      `json:"state,omitempty"`
	User          []string    `json:"user,omitempty"`
	Party         []int       `json:"party,omitempty"`
	IsTemp        bool        `json:"is_temp,omitempty"`
	ExpiresIn     int         `json:"expires_in,omitempty"`
	ChatExpiresIn int         `json:"chat_expires_in,omitempty"`
	Unionid       string      `json:"unionid,omitempty"`
	Conclusions   Conclusions `json:"conclusions,omitempty"`
}

type AddContactWaySchema

type AddContactWaySchema struct {
	util.CommonError
	ConfigId string `json:"config_id"`
	QrCode   string `json:"qr_code"`
}

type AddExternalContactCallbackMessage

type AddExternalContactCallbackMessage struct {
	CallbackMessage
	UserID         string `json:"user_id"`
	ExternalUserID string `json:"external_user_id"`
	State          string `json:"state"`
	WelcomeCode    string `json:"welcome_code"`
}

AddExternalContactCallbackMessage 添加企业客户事件

type AddHalfExternalContactCallbackMessage

type AddHalfExternalContactCallbackMessage struct {
	CallbackMessage
	UserID         string `json:"user_id"`
	ExternalUserID string `json:"external_user_id"`
	State          string `json:"state"`
	WelcomeCode    string `json:"welcome_code"`
}

AddHalfExternalContactCallbackMessage 外部联系人免验证添加成员事件

type AddInterceptRuleOptions

type AddInterceptRuleOptions struct {
	RuleName        string          `json:"rule_name"`
	WordList        []string        `json:"word_list"`
	SemanticsList   []int           `json:"semantics_list"`
	InterceptType   int             `json:"intercept_type"`
	ApplicableRange ApplicableRange `json:"applicable_range"`
}

type AddMomentTask

type AddMomentTask struct {
	Text         Text                       `json:"text"`
	Attachments  []AddMomentTaskAttachments `json:"attachments"`
	VisibleRange AddMomentTaskVisibleRange  `json:"visible_range"`
}

type AddMomentTaskAttachments

type AddMomentTaskAttachments struct {
	Msgtype string             `json:"msgtype"`
	Image   AddMomentTaskImage `json:"image,omitempty"`
	Video   AddMomentTaskVideo `json:"video,omitempty"`
	Link    AddMomentTaskLink  `json:"link,omitempty"`
}

type AddMomentTaskExternalContactList

type AddMomentTaskExternalContactList struct {
	TagList []string `json:"tag_list"`
}

type AddMomentTaskImage

type AddMomentTaskImage struct {
	MediaID string `json:"media_id"`
}
type AddMomentTaskLink struct {
	Title   string `json:"title"`
	URL     string `json:"url"`
	MediaID string `json:"media_id"`
}

type AddMomentTaskResult

type AddMomentTaskResult struct {
	util.CommonError
	Status int    `json:"status"`
	Type   string `json:"type"`
	Result Result `json:"result"`
}

type AddMomentTaskReturn

type AddMomentTaskReturn struct {
	util.CommonError
	Jobid string `json:"jobid"`
}

type AddMomentTaskSenderList

type AddMomentTaskSenderList struct {
	UserList       []string `json:"user_list"`
	DepartmentList []int    `json:"department_list"`
}

type AddMomentTaskText

type AddMomentTaskText struct {
	Content string `json:"content"`
}

type AddMomentTaskVideo

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

type AddMomentTaskVisibleRange

type AddMomentTaskVisibleRange struct {
	SenderList          AddMomentTaskSenderList          `json:"sender_list"`
	ExternalContactList AddMomentTaskExternalContactList `json:"external_contact_list"`
}

type AddMsgTemplateOptions

type AddMsgTemplateOptions struct {
	ChatType       string        `json:"chat_type"`
	ExternalUserid []string      `json:"external_userid"`
	Sender         string        `json:"sender,omitempty"`
	Text           *BsText       `json:"text,omitempty"`
	Attachments    []Attachments `json:"attachments,omitempty"`
}

type AddMsgTemplateSchema

type AddMsgTemplateSchema struct {
	util.CommonError
	FailList []string `json:"fail_list"`
	Msgid    string   `json:"msgid"`
}

type AddTag

type AddTag struct {
	ID         string `json:"id"`          // 标签id
	Name       string `json:"name"`        // 标签名称
	CreateTime int    `json:"create_time"` // 标签创建时间
	Order      int    `json:"order"`       // 标签排序的次序值,order值大的排序靠前。有效的值范围是[0, 2^32)
}

type AdminList

type AdminList struct {
	Userid string `json:"userid"`
}

type ApplicableRange

type ApplicableRange struct {
	UserList       []string `json:"user_list"`
	DepartmentList []int    `json:"department_list"`
}

type AttachmentMedia

type AttachmentMedia struct {
	util.CommonError
	Type      AttachmentMediaType `json:"type"`
	MediaID   string              `json:"media_id"`
	CreatedAt string              `json:"created_at"`
}

AttachmentMedia 临时素材上传返回信息

type AttachmentMediaType

type AttachmentMediaType string

AttachmentMediaType 媒体文件类型

const (
	// AttachmentImage 媒体文件:图片
	AttachmentImage AttachmentMediaType = "image"
	// AttachmentVideo 媒体文件:视频
	AttachmentVideo AttachmentMediaType = "video"
	// AttachmentFile 媒体文件:文件
	AttachmentFile AttachmentMediaType = "file"
)

type Attachments

type Attachments struct {
	Msgtype     string         `json:"msgtype"`
	Image       *BsImage       `json:"image,omitempty"`
	Link        *BsLink        `json:"link,omitempty"`
	Miniprogram *BsMiniprogram `json:"miniprogram,omitempty"`
	Video       *BsVideo       `json:"video,omitempty"`
	File        *BsFile        `json:"file,omitempty"`
}

type AuditApprovedCallbackMessage

type AuditApprovedCallbackMessage struct {
	CallbackMessage
	UserID         string `json:"user_id"`
	ExternalUserID string `json:"external_user_id"`
	WelcomeCode    string `json:"welcome_code"`
}

客户同意进行聊天内容存档事件回调

type BehaviorData

type BehaviorData struct {
	StatTime            int     `json:"stat_time"`
	ChatCnt             int     `json:"chat_cnt"`
	MessageCnt          int     `json:"message_cnt"`
	ReplyPercentage     float64 `json:"reply_percentage"`
	AvgReplyTime        int     `json:"avg_reply_time"`
	NegativeFeedbackCnt int     `json:"negative_feedback_cnt"`
	NewApplyCnt         int     `json:"new_apply_cnt"`
	NewContactCnt       int     `json:"new_contact_cnt"`
}

BehaviorData 行为数据详情

type BsFile

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

type BsImage

type BsImage struct {
	MediaID string `json:"media_id,omitempty"`
	PicURL  string `json:"pic_url"`
}
type BsLink struct {
	Title  string `json:"title"`
	Picurl string `json:"picurl"`
	Desc   string `json:"desc"`
	URL    string `json:"url"`
}

type BsMiniprogram

type BsMiniprogram struct {
	Title      string `json:"title"`
	PicMediaID string `json:"pic_media_id"`
	Appid      string `json:"appid"`
	Page       string `json:"page"`
}

type BsText

type BsText struct {
	Content string `json:"content"`
}

type BsVideo

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

type CallbackMessage

type CallbackMessage struct {
	ToUserName   string `json:"to_user_name"`   // 企业微信CorpID
	FromUserName string `json:"from_user_name"` // 此事件该值固定为sys,表示该消息由系统生成
	CreateTime   int    `json:"create_time"`    // 消息创建时间 (整型)
	MsgType      string `json:"msgtype"`        // 消息的类型,此时固定为event
	Event        string `json:"event"`          // 事件的类型,此时固定为change_contact
	ChangeType   string `json:"change_type"`    // 此时固定为delete_user
}

CallbackMessage 基础回调消息

type Client

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

Client 外部联系人实例

func NewClient

func NewClient(cfg *config.Config) (client *Client, err error)

NewClient 初始化联系人实例

func (*Client) AddContactWay

func (r *Client) AddContactWay(options AddContactWayOptions) (info AddContactWaySchema, err error)

func (*Client) AddInterceptRule

func (r *Client) AddInterceptRule(options AddInterceptRuleOptions) (info InterceptRuleSchema, err error)

func (*Client) AddMomentTask

func (r *Client) AddMomentTask(options AddMomentTask) (info AddMomentTaskReturn, err error)

AddMomentTask 添加朋友圈发布任务

func (*Client) AddMsgTemplate

func (r *Client) AddMsgTemplate(options AddMsgTemplateOptions) (info AddMsgTemplateSchema, err error)

func (*Client) AddTagList

AddTagList 添加企业客户标签

func (*Client) AddTagListAndGroup

AddTagListAndGroup 添加企业客户标签和标签组

func (*Client) DelContactWay

func (r *Client) DelContactWay(options ContactWay) (info ContactWaySchema, err error)

删除 【联系我】 方式

func (*Client) DelInterceptRule

func (r *Client) DelInterceptRule(options DelInterceptRuleOptions) (info util.CommonError, err error)

func (*Client) DeleteTagListOrGroup

func (r *Client) DeleteTagListOrGroup(options ExternalcontactDelTagAndGroupListOptions) (info util.CommonError, err error)

func (*Client) EditTagListOrGroup

func (r *Client) EditTagListOrGroup(options ExternalcontactEditTagAndGroupListOptions) (info util.CommonError, err error)

EditTagListOrGroup 修改企业客户标签

func (*Client) ExternalcontactBatchGetByUser

func (r *Client) ExternalcontactBatchGetByUser(options ExternalcontactBatchGetByUserOptions) (info ExternalcontactBatchGetByUserSchema, err error)

ExternalcontactBatchGetByUser 批量获取客户详情

func (*Client) ExternalcontactCustomerStrategyCreate

func (r *Client) ExternalcontactCustomerStrategyCreate(options ExternalcontactCustomerStrategyCreateOptions) (info ExternalcontactCustomerStrategyCreateSchema, err error)

ExternalcontactCustomerStrategyCreate 创建新的规则组

func (*Client) ExternalcontactCustomerStrategyDel

func (r *Client) ExternalcontactCustomerStrategyDel(options ExternalcontactCustomerStrategyDelOptions) (info util.CommonError, err error)

ExternalcontactCustomerStrategyDel 删除规则组

func (*Client) ExternalcontactCustomerStrategyEdit

func (r *Client) ExternalcontactCustomerStrategyEdit(options ExternalcontactCustomerStrategyEditOptions) (info util.CommonError, err error)

ExternalcontactCustomerStrategyEdit 编辑规则组及其管理范围

func (*Client) ExternalcontactCustomerStrategyGet

func (r *Client) ExternalcontactCustomerStrategyGet(options ExternalcontactCustomerStrategyGetOptions) (info ExternalcontactCustomerStrategyGetSchema, err error)

ExternalcontactCustomerStrategyGet 获取规则组详情

func (*Client) ExternalcontactCustomerStrategyGetRange

func (r *Client) ExternalcontactCustomerStrategyGetRange(options ExternalcontactCustomerStrategyGetRangeOptions) (info ExternalcontactCustomerStrategyGetRangeSchema, err error)

ExternalcontactCustomerStrategyGetRange 获取规则组管理范围

func (*Client) ExternalcontactCustomerStrategyList

func (r *Client) ExternalcontactCustomerStrategyList(options ExternalcontactCustomerStrategyListOptions) (info ExternalcontactCustomerStrategyListSchema, err error)

ExternalcontactCustomerStrategyList 获取规则组列表

func (*Client) ExternalcontactGet

func (r *Client) ExternalcontactGet(options ExternalcontactGetOptions) (info ExternalcontactGetSchema, err error)

ExternalcontactGet 获取客户详情

func (*Client) ExternalcontactGetFollowUserList

func (r *Client) ExternalcontactGetFollowUserList() (info ExternalcontactGetFollowUserListSchema, err error)

externalcontactGetFollowUserListAddr 获取配置了客户联系功能的成员列表

func (*Client) ExternalcontactGetUserBehaviorData

func (r *Client) ExternalcontactGetUserBehaviorData(options ExternalcontactGetUserBehaviorDataOptions) (info ExternalcontactGetUserBehaviorDataSchema, err error)

ExternalcontactGetUserBehaviorData 获取「联系客户统计」数据

func (*Client) ExternalcontactGroupchatStatistic

func (r *Client) ExternalcontactGroupchatStatistic(options ExternalcontactGroupchatStatisticOptions) (info ExternalcontactGroupchatStatisticSchema, err error)

ExternalcontactGroupchatStatistic 获取「群聊数据统计」数据 - 按群主聚合的方式

func (*Client) ExternalcontactGroupchatStatisticGroupByDay

func (r *Client) ExternalcontactGroupchatStatisticGroupByDay(options ExternalcontactGroupchatStatisticGroupByDayOptions) (info ExternalcontactGroupchatStatisticGroupByDaySchema, err error)

ExternalcontactGroupchatStatisticGroupByDay 获取「群聊数据统计」数据 - 按自然日聚合的方式

func (*Client) ExternalcontactList

func (r *Client) ExternalcontactList(options ExternalcontactListOptions) (info ExternalcontactListSchema, err error)

ExternalcontactList 获取客户列表

func (*Client) ExternalcontactMomentStrategyCreate

func (r *Client) ExternalcontactMomentStrategyCreate(options ExternalcontactMomentStrategyCreateOptions) (info ExternalcontactMomentStrategyCreateSchema, err error)

ExternalcontactCustomerStrategyCreate 创建新的规则组

func (*Client) ExternalcontactMomentStrategyDel

func (r *Client) ExternalcontactMomentStrategyDel(options ExternalcontactMomentStrategyDelOptions) (info util.CommonError, err error)

ExternalcontactCustomerStrategyDel 删除规则组

func (*Client) ExternalcontactMomentStrategyEdit

func (r *Client) ExternalcontactMomentStrategyEdit(options ExternalcontactMomentStrategyEditOptions) (info util.CommonError, err error)

ExternalcontactCustomerStrategyEdit 编辑规则组及其管理范围

func (*Client) ExternalcontactMomentStrategyGet

func (r *Client) ExternalcontactMomentStrategyGet(options ExternalcontactMomentStrategyGetOptions) (info ExternalcontactMomentStrategyGetSchema, err error)

ExternalcontactCustomerStrategyGet 获取规则组详情

func (*Client) ExternalcontactMomentStrategyGetRange

func (r *Client) ExternalcontactMomentStrategyGetRange(options ExternalcontactMomentStrategyGetRangeOptions) (info ExternalcontactMomentStrategyGetRangeSchema, err error)

ExternalcontactMomentStrategyGetRange 获取规则组管理范围

func (*Client) ExternalcontactMomentStrategyList

func (r *Client) ExternalcontactMomentStrategyList(options ExternalcontactMomentStrategyListOptions) (info ExternalcontactMomentStrategyListSchema, err error)

ExternalcontactMomentStrategyList 获取规则组列表

func (*Client) ExternalcontactRemark

func (r *Client) ExternalcontactRemark(options ExternalcontactRemarkOptions) (info util.CommonError, err error)

ExternalcontactRemark 修改客户备注信息

func (*Client) GetCallbackMessage

func (r *Client) GetCallbackMessage(signatureOptions SignatureOptions, encryptedMsg []byte) (rawData []byte, msg CallbackMessage, err error)

GetCallbackMessage 获取回调事件中的消息内容

func (*Client) GetContactInfo

func (r *Client) GetContactInfo(options ContactWay) (info GetContactInfoSchema, err error)

获取企业已配置的「联系我」方式

func (*Client) GetExternalContactGroupChatInfo

func (r *Client) GetExternalContactGroupChatInfo(options ExternalcontactGroupChatInfoOptions) (info GetExternalcontactGroupChatInfoSchema, err error)

获取群详情

func (*Client) GetExternalcontactGroupChatList

func (r *Client) GetExternalcontactGroupChatList() (list GetExternalcontactGroupChatListSchema, err error)

获取群列表

func (*Client) GetGroupChatDetail

GetGroupChatDetail 获取群列表

func (*Client) GetGroupChatList

func (r *Client) GetGroupChatList(options ExternalcontactGetGroupChatOptions) (info ExternalcontactGetGroupChatSchema, err error)

GetGroupChatList 获取群列表

func (*Client) GetMomentComments

func (r *Client) GetMomentComments(options MomentCommentsOption) (info MomentConmmentsRes, err error)

GetMomentComments 获取朋友圈互动列表

func (*Client) GetMomentTask

func (r *Client) GetMomentTask(options GetMomentTaskOption) (info GetMomentTaskRet, err error)

GetMomentTask 获取企业发表的朋友圈成员执行情况

func (*Client) GetMomentTaskResult

func (r *Client) GetMomentTaskResult(jobId string) (info AddMomentTaskResult, err error)

GetMomentTaskResult 获取添加朋友圈发布任务结果

func (*Client) GetTagList

GetTagList 获取企业标签库列表

func (*Client) GetUnassignedList

GetUnassignedList 获取待分配的离职成员列表

func (*Client) GetUnassignedListNoPage

GetUnassignedListNoPage 获取待分配的离职成员列表

func (*Client) GroupChatOnJobTransfer

func (r *Client) GroupChatOnJobTransfer(options ExternalContactGroupChatTransferOptions) (info ExternalContactGroupChatTransferSchema, err error)

GroupChatOnJobTransfer 分配在职成员的客户群

func (*Client) GroupChatTransfer

GroupChatTransfer 分配离职成员的客户群

func (*Client) ListContactWayGet

func (r *Client) ListContactWayGet(options ListContactWayGetOptions) (info ListContactWayGetSchema, err error)

ListContactWayGet 批量获取「联系我」列表

func (*Client) MarkTagListExternalContact

func (r *Client) MarkTagListExternalContact(options ExternalcontactMarkTagListOptions) (info util.CommonError, err error)

func (*Client) MsgSendResult

func (r *Client) MsgSendResult(options MsgSendResultOptions) (info MsgSendResultSchema, err error)

func (*Client) ResignedTransferCustomer

ResignedTransferCustomer 分配离职成员的客户

func (*Client) ResignedTransferResult

ResignedTransferResult 查询客户接替状态

func (*Client) TransferCustomer

TransferCustomer 分配在职成员的客户

func (*Client) TransferResult

TransferResult 查询客户接替状态 ---在职状态

func (*Client) UpdateContactWay

func (r *Client) UpdateContactWay(options UpdateContactWayOptions) (info ContactWaySchema, err error)

func (*Client) UpdateInterceptRule

func (r *Client) UpdateInterceptRule(options UpdateInterceptRuleOptions) (info util.CommonError, err error)

func (*Client) UploadAttachment

func (r *Client) UploadAttachment(mediaType AttachmentMediaType, filename string) (media AttachmentMedia, err error)

UploadAttachment 朋友圈素材上传

func (*Client) VerifyURL

func (r *Client) VerifyURL(options SignatureOptions) (string, error)

VerifyURL 验证请求参数是否合法并返回解密后的消息内容

type CommentList

type CommentList struct {
	ExternalUserid string `json:"external_userid,omitempty"`
	CreateTime     int    `json:"create_time"`
	Userid         string `json:"userid,omitempty"`
}

type Conclusions

type Conclusions struct {
	Text        Text        `json:"text"`
	Image       Image       `json:"image"`
	Link        Link        `json:"link"`
	Miniprogram Miniprogram `json:"miniprogram"`
}

type ContactWay

type ContactWay struct {
	ConfigId string `json:"config_id"`
}

ContactWay 信息

type ContactWayInfo

type ContactWayInfo struct {
	ConfigId      string      `json:"config_id"`
	Type          int         `json:"type"`
	Scene         int         `json:"scene"`
	IsTemp        bool        `json:"is_temp"`
	Remark        string      `json:"remark"`
	SkipVerify    bool        `json:"skip_verify"`
	State         string      `json:"state"`
	Style         int         `json:"style"`
	QrCode        string      `json:"qr_code"`
	User          []string    `json:"user"`
	Party         []int       `json:"party"`
	ExpiresIn     int         `json:"expires_in"`
	ChatExpiresIn int         `json:"chat_expires_in"`
	Unionid       string      `json:"unionid"`
	Conclusions   Conclusions `json:"conclusions"`
}

type ContactWaySchema

type ContactWaySchema struct {
	util.CommonError
}

type CreateCallbackMessage

type CreateCallbackMessage struct {
	CallbackMessage
	ChatId string `json:"ChatId"`
}

CreateCallbackMessage 客户群创建事件

type Data

type Data struct {
	NewChatCnt            int `json:"new_chat_cnt"`
	ChatTotal             int `json:"chat_total"`
	ChatHasMsg            int `json:"chat_has_msg"`
	NewMemberCnt          int `json:"new_member_cnt"`
	MemberTotal           int `json:"member_total"`
	MemberHasMsg          int `json:"member_has_msg"`
	MsgTotal              int `json:"msg_total"`
	MigrateTraineeChatCnt int `json:"migrate_trainee_chat_cnt"`
}

Data 记录数据详情

type DateData

type DateData struct {
	NewChatCnt            int `json:"new_chat_cnt"`
	ChatTotal             int `json:"chat_total"`
	ChatHasMsg            int `json:"chat_has_msg"`
	NewMemberCnt          int `json:"new_member_cnt"`
	MemberTotal           int `json:"member_total"`
	MemberHasMsg          int `json:"member_has_msg"`
	MsgTotal              int `json:"msg_total"`
	MigrateTraineeChatCnt int `json:"migrate_trainee_chat_cnt"`
}

日期统计记录详情

type DateItems

type DateItems struct {
	StatTime int      `json:"stat_time"`
	Data     DateData `json:"data"`
}

DateItems 记录列表。表示某个自然日客户群的统计数据

type DelExternalContactCallbackMessage

type DelExternalContactCallbackMessage struct {
	CallbackMessage
	UserID         string `json:"user_id"`
	ExternalUserID string `json:"external_user_id"`
	Source         string `json:"source"`
}

DelExternalContactCallbackMessage 删除企业客户事件

type DelFollowUserCallbackMessage

type DelFollowUserCallbackMessage struct {
	CallbackMessage
	UserID         string `json:"user_id"`
	ExternalUserID string `json:"external_user_id"`
}

DelFollowUserCallbackMessage 删除跟进成员事件

type DelInterceptRuleOptions

type DelInterceptRuleOptions struct {
	RuleID string `json:"rule_id"`
}

type DismissCallbackMessage

type DismissCallbackMessage struct {
	CallbackMessage
	ChatId string `json:"chat_id"`
}

DismissCallbackMessage 客户群解散事件

type EditExternalContactCallbackMessage

type EditExternalContactCallbackMessage struct {
	CallbackMessage
	UserID         string `json:"user_id"`
	ExternalUserID string `json:"external_user_id"`
}

EditExternalContactCallbackMessage 编辑企业客户事件

type Error

type Error string

Error 错误

const (
	// SDKInitFailed 错误码:50001
	SDKInitFailed Error = "SDK初始化失败"
	// SDKCacheUnavailable 错误码:50002
	SDKCacheUnavailable Error = "缓存无效"
	// SDKUnknownError 错误码:50003
	SDKUnknownError Error = "未知错误"
	// SDKInvalidCredential 错误码:40001
	SDKInvalidCredential Error = "不合法的secret参数"
	// SDKInvalidCorpID 错误码:40013
	SDKInvalidCorpID Error = "无效的 CorpID"
	// SDKAccessTokenInvalid 错误码:40014
	SDKAccessTokenInvalid Error = "AccessToken 无效"
	// SDKValidateSignatureFailed 错误码:40015
	SDKValidateSignatureFailed Error = "校验签名错误"
	// SDKDecryptMSGFailed 错误码:40016
	SDKDecryptMSGFailed Error = "消息解密失败"
	// SDKAccessTokenMissing 错误码:41001
	SDKAccessTokenMissing Error = "缺少AccessToken参数"
	// SDKAccessTokenExpired 错误码:42001
	SDKAccessTokenExpired Error = "AccessToken 已过期"
	// SDKApiFreqOutOfLimit 错误码:45009
	SDKApiFreqOutOfLimit Error = "接口请求次数超频"
	// SDKApiForbidden 错误码:48002
	SDKApiForbidden Error = "API 禁止调用"
	// SDKInvalidOpenKFID 错误码:95000
	SDKInvalidOpenKFID Error = "无效的 open_kfid"
	// SDKOpenKFIDNotExist 错误码:95004
	SDKOpenKFIDNotExist Error = "open_kfid 不存在"
	// SDKWeWorkAlready 错误码:95011
	SDKWeWorkAlready Error = "已在企业微信使用微信客服"
	// SDKNotUseInWeCom 错误码:95012
	SDKNotUseInWeCom Error = "未在企业微信使用微信客服"
	// SDKApiNotOpen 错误码:95017
	SDKApiNotOpen Error = "API 功能没有被开启"
	//SDKNotExternalContactAuth 84074
	SDKNotExternalContactAuth Error = "使用成员未分配外部联系人权限"
	//SDKUserLimit 41041
	SDKUserLimit Error = "使用人员超过限制"
	//SDKACCOUNTNotUseful 41054
	SDKACCOUNTNotUseful Error = "存在尚未激活人员"
	//SDKUseridNotFound 60111
	SDKUseridNotFound Error = "该员工已退出企业不可操作"
	//SDKUserNotCheck 40098
	SDKUserNotCheck Error = "员工未实名认证"
	//SDKApiContactMoreThanLimit 错误码:41045
	SDKApiContactMoreThanLimit Error = "API添加「联系我」达到数量上限"
	//SDKInvalidPartyId   60123
	SDKInvalidPartyId Error = "所选部门不在通讯录中"
)

func NewSDKErr

func NewSDKErr(code int64, msgList ...string) Error

NewSDKErr 初始化SDK实例错误信息

func (Error) Error

func (r Error) Error() string

Error 输出错误信息

type ExternalContact

type ExternalContact struct {
	ExternalUserid  string                 `json:"external_userid"`
	Name            string                 `json:"name"`
	Position        string                 `json:"position"`
	Avatar          string                 `json:"avatar"`
	CorpName        string                 `json:"corp_name"`
	CorpFullName    string                 `json:"corp_full_name"`
	Type            int                    `json:"type"`
	Gender          int                    `json:"gender"`
	Unionid         string                 `json:"unionid"`
	ExternalProfile map[string]interface{} `json:"external_profile"`
}

ExternalContact 外部联系人信息

type ExternalContactFailedChatList

type ExternalContactFailedChatList struct {
	util.CommonError
	ChatId string `json:"chat_id"` //新群主ID
}

type ExternalContactGetUnassignedInfo

type ExternalContactGetUnassignedInfo struct {
	HandoverUserid string `json:"handover_userid"` //离职成员的userid
	ExternalUserid string `json:"external_userid"` // 	外部联系人userid
	DimissionTime  int    `json:"dimission_time"`  //成员离职时间
}

type ExternalContactGetUnassignedListOptions

type ExternalContactGetUnassignedListOptions struct {
	PageId   int    `json:"page_id" omitempty` // 	分页查询,要查询页号,从0开始
	PageSize int    `json:"page_size"`         //	每次返回的最大记录数,默认为1000,最大值为1000
	Cursor   string `json:"cursor"`            //分页查询游标,字符串类型,适用于数据量较大的情况,如果使用该参数则无需填写page_id,该参数由上一次调用返回
}

ExternalContactGetUnassignedListOptions

type ExternalContactGetUnassignedListOptionsNoPage

type ExternalContactGetUnassignedListOptionsNoPage struct {
	PageSize int    `json:"page_size"` //	每次返回的最大记录数,默认为1000,最大值为1000
	Cursor   string `json:"cursor"`    //分页查询游标,字符串类型,适用于数据量较大的情况,如果使用该参数则无需填写page_id,该参数由上一次调用返回
}

type ExternalContactGetUnassignedListSchema

type ExternalContactGetUnassignedListSchema struct {
	util.CommonError
	IsLast                           bool                               `json:"is_last"` // 	是否是最后一条记录
	ExternalContactGetUnassignedInfo []ExternalContactGetUnassignedInfo `json:"info"`
	NextCursor                       string                             `json:"next_cursor"` //分页查询游标,已经查完则返回空(""),使用page_id作为查询参数时不返回
}

type ExternalContactGroupChatTransferOptions

type ExternalContactGroupChatTransferOptions struct {
	ChatIdList []string `json:"chat_id_list"` //需要转群主的客户群ID列表。取值范围: 1 ~ 100
	NewOwner   string   `json:"new_owner"`    //新群主ID
}

type ExternalContactGroupChatTransferSchema

type ExternalContactGroupChatTransferSchema struct {
	util.CommonError
	ExternalContactFailedChatList []ExternalContactFailedChatList `json:"failed_chat_list"`
}

type ExternalContactList

type ExternalContactList struct {
	ExternalContact ExternalContact `json:"external_contact,omitempty"`
	FollowInfo      FollowInfo      `json:"follow_info,omitempty"`
}

ExternalContactList 外部联系人列表信息

type ExternalContactResignedTransferCustomerOptions

type ExternalContactResignedTransferCustomerOptions struct {
	HandoverUserid string   `json:"handover_userid"` //	原跟进成员的userid
	TakeoverUserid string   `json:"takeover_userid"` //	接替成员的userid
	ExternalUserid []string `json:"external_userid"` //	客户的external_userid列表,最多一次转移100个客户
}

type ExternalContactResignedTransferResultInfo

type ExternalContactResignedTransferResultInfo struct {
	ExternalUserid string `json:"external_userid"` // 	外部联系人userid
	Status         int    `json:"status"`          //接替状态, 1-接替完毕 2-等待接替 3-客户拒绝 4-接替成员客户达到上限
	TakeoverTime   int    `json:"takeover_time"`   //	接替客户的时间,如果是等待接替状态,则为未来的自动接替时间
}

type ExternalContactResignedTransferResultOptions

type ExternalContactResignedTransferResultOptions struct {
	HandoverUserid string `json:"handover_userid"` //	原跟进成员的userid
	TakeoverUserid string `json:"takeover_userid"` //	接替成员的userid
	Cursor         string `json:"cursor"`          //分页查询游标,字符串类型,适用于数据量较大的情况,如果使用该参数则无需填写page_id,该参数由上一次调用返回
}

type ExternalContactResignedTransferResultSchema

type ExternalContactResignedTransferResultSchema struct {
	util.CommonError
	ExternalContactResignedTransferResultInfo []ExternalContactResignedTransferResultInfo `json:"customer"`
	NextCursor                                string                                      `json:"next_cursor"` //分页查询游标,已经查完则返回空(""),使用page_id作为查询参数时不返回
}

type ExternalContactTransferCustomerInfo

type ExternalContactTransferCustomerInfo struct {
	ExternalUserid string `json:"external_userid"` // 	外部联系人userid
	ErrCode        int    `json:"errcode"`         //对此客户进行分配的结果, 具体可参考全局错误码, 0表示开始分配流程,待24小时后自动接替,并不代表最终分配成功
}

type ExternalContactTransferCustomerOptions

type ExternalContactTransferCustomerOptions struct {
	HandoverUserid     string   `json:"handover_userid"`      //	原跟进成员的userid
	TakeoverUserid     string   `json:"takeover_userid"`      //	接替成员的userid
	ExternalUserid     []string `json:"external_userid"`      //	客户的external_userid列表,最多一次转移100个客户 external_userid必须是handover_userid的客户(即配置了客户联系功能的成员所添加的联系人)。
	TransferSuccessMsg string   `json:"transfer_success_msg"` //移成功后发给客户的消息,最多200个字符,不填则使用默认文案
}

type ExternalContactTransferCustomerSchema

type ExternalContactTransferCustomerSchema struct {
	util.CommonError
	ExternalContactTransferCustomerInfo []ExternalContactTransferCustomerInfo `json:"customer"`
}

type ExternalcontactAddTagAndGroupListOptions

type ExternalcontactAddTagAndGroupListOptions struct {
	GroupName string                             `json:"group_name"` // 标签组名称
	Order     int                                `json:"order"`      // 标签组排序的次序值,order值大的排序靠前。有效的值范围是[0, 2^32)
	Tag       []ExternalcontactAddTagListOptions `json:"tag"`
}

ExternalcontactAddTagListOptions 添加企业标签

type ExternalcontactAddTagAndGroupListSchema

type ExternalcontactAddTagAndGroupListSchema struct {
	util.CommonError
	TagGroup TagGroup `json:"tag_group"` // 标签组列表
}

type ExternalcontactAddTagListOptions

type ExternalcontactAddTagListOptions struct {
	TagName string `json:"name"`  //添加的标签名称,最长为30个字符
	Order   int    `json:"order"` // 标签组排序的次序值,order值大的排序靠前。有效的值范围是[0, 2^32)
}

type ExternalcontactAddTagWithGroupListOptions

type ExternalcontactAddTagWithGroupListOptions struct {
	GroupID   string                             `json:"group_id"`   // 要查询的标签组id,返回该标签组以及其下的所有标签信息
	GroupName string                             `json:"group_name"` // 标签组名称
	Order     int                                `json:"order"`      // 标签组排序的次序值,order值大的排序靠前。有效的值范围是[0, 2^32)
	Tag       []ExternalcontactAddTagListOptions `json:"tag"`
}

ExternalcontactAddTagWithGroupListOptions 添加企业标签

type ExternalcontactBatchGetByUserOptions

type ExternalcontactBatchGetByUserOptions struct {
	UseridList []string `json:"userid_list"`
	Cursor     string   `json:"cursor"`
	Limit      int      `json:"limit"`
}

批量获取客户详情请求参数

type ExternalcontactBatchGetByUserSchema

type ExternalcontactBatchGetByUserSchema struct {
	util.CommonError
	ExternalContactList []ExternalContactList `json:"external_contact_list"`
	NextCursor          string                `json:"next_cursor"`
}

ExternalcontactBatchGetByUserSchema 批量获取客户详情响应内容

type ExternalcontactCustomerStrategyCreateOptions

type ExternalcontactCustomerStrategyCreateOptions struct {
	ParentID     int       `json:"parent_id"`
	StrategyName string    `json:"strategy_name"`
	AdminList    []string  `json:"admin_list"`
	Privilege    Privilege `json:"privilege"`
	Range        []Range   `json:"range"`
}

ExternalcontactCustomerStrategyCreateOptions 创建新的规则组请求参数

type ExternalcontactCustomerStrategyCreateSchema

type ExternalcontactCustomerStrategyCreateSchema struct {
	util.CommonError
	StrategyID int `json:"strategy_id"`
}

ExternalcontactCustomerStrategyCreateSchema 创建新的规则组响应内容

type ExternalcontactCustomerStrategyDelOptions

type ExternalcontactCustomerStrategyDelOptions struct {
	StrategyID int `json:"strategy_id"`
}

ExternalcontactCustomerStrategyDelOptions 删除规则组请求参数

type ExternalcontactCustomerStrategyEditOptions

type ExternalcontactCustomerStrategyEditOptions struct {
	StrategyID   int       `json:"strategy_id"`
	StrategyName string    `json:"strategy_name"`
	AdminList    []string  `json:"admin_list"`
	Privilege    Privilege `json:"privilege"`
	RangeAdd     []Range   `json:"range_add"`
	RangeDel     []Range   `json:"range_del"`
}

ExternalcontactCustomerStrategyEditOptions 编辑规则组及其管理范围请求参数

type ExternalcontactCustomerStrategyGetOptions

type ExternalcontactCustomerStrategyGetOptions struct {
	StrategyID int `json:"strategy_id"`
}

ExternalcontactCustomerStrategyGetOptions 获取规则组详情请求参数

type ExternalcontactCustomerStrategyGetRangeOptions

type ExternalcontactCustomerStrategyGetRangeOptions struct {
	StrategyID int    `json:"strategy_id"`
	Cursor     string `json:"cursor"`
	Limit      int    `json:"limit"`
}

ExternalcontactCustomerStrategyGetRangeOptions 获取规则组管理范围请求参数

type ExternalcontactCustomerStrategyGetRangeSchema

type ExternalcontactCustomerStrategyGetRangeSchema struct {
	util.CommonError
	Errcode    int     `json:"errcode"`
	Errmsg     string  `json:"errmsg"`
	Range      []Range `json:"range"`
	NextCursor string  `json:"next_cursor"`
}

ExternalcontactCustomerStrategyGetRangeSchema 获取规则组管理范围响应内容

type ExternalcontactCustomerStrategyGetSchema

type ExternalcontactCustomerStrategyGetSchema struct {
	util.CommonError
	Strategy Strategy `json:"strategy"`
}

ExternalcontactCustomerStrategyGetSchema 获取规则组详情响应内容

type ExternalcontactCustomerStrategyListOptions

type ExternalcontactCustomerStrategyListOptions struct {
	Cursor string `json:"cursor"`
	Limit  int    `json:"limit"`
}

ExternalcontactCustomerStrategyListOptions 获取规则组列表请求参数

type ExternalcontactCustomerStrategyListSchema

type ExternalcontactCustomerStrategyListSchema struct {
	util.CommonError
	Errcode    int            `json:"errcode"`
	Errmsg     string         `json:"errmsg"`
	Strategy   []StrategyInfo `json:"strategy"`
	NextCursor string         `json:"next_cursor"`
}

ExternalcontactCustomerStrategyListSchema 获取规则组列表响应内容

type ExternalcontactDelTagAndGroupListOptions

type ExternalcontactDelTagAndGroupListOptions struct {
	TagID   []string `json:"tag_id"`   // 要查询的标签id
	GroupID []string `json:"group_id"` // 要查询的标签组id,返回该标签组以及其下的所有标签信息
}

type ExternalcontactEditTagAndGroupListOptions

type ExternalcontactEditTagAndGroupListOptions struct {
	ID    string `json:"id"`    // 标签/标签组id
	Name  string `json:"name"`  // 标签/标签组名称
	Order int    `json:"order"` // 标签/标签组排序的次序值,order值大的排序靠前。有效的值范围是[0, 2^32)
}

type ExternalcontactGetFollowUserListSchema

type ExternalcontactGetFollowUserListSchema struct {
	util.CommonError
	Errcode    int      `json:"errcode"`
	Errmsg     string   `json:"errmsg"`
	FollowUser []string `json:"follow_user"`
}

type ExternalcontactGetGroupChatDetailOptions

type ExternalcontactGetGroupChatDetailOptions struct {
	ChatID   string `json:"chat_id"`
	NeedName int    `json:"need_name"`
}

ExternalcontactGetGroupChatDetailOptions 获取配置过客户群管理的客户群列表。

type ExternalcontactGetGroupChatDetailSchema

type ExternalcontactGetGroupChatDetailSchema struct {
	util.CommonError
	GroupChat GroupChat `json:"group_chat"`
}

ExternalcontactGetGroupChatDetailSchema 获取配置过客户群管理的客户群列表返回

type ExternalcontactGetGroupChatOptions

type ExternalcontactGetGroupChatOptions struct {
	StatusFilter int         `json:"status_filter"`
	OwnerFilter  OwnerFilter `json:"owner_filter"`
	Cursor       string      `json:"cursor"`
	Limit        int         `json:"limit"`
}

ExternalcontactGetGroupChatOptions 群列表请求体

type ExternalcontactGetGroupChatSchema

type ExternalcontactGetGroupChatSchema struct {
	util.CommonError
	GroupChatList []GroupChatList `json:"group_chat_list"`
	NextCursor    string          `json:"next_cursor"`
}

ExternalcontactGetGroupChatSchema 群列表返回体

type ExternalcontactGetOptions

type ExternalcontactGetOptions struct {
	ExternalUserid string `json:"external_userid"` // 外部联系人的userid,注意不是企业成员的帐号
	Cursor         string `json:"cursor"`          // 上次请求返回的next_cursor
}

ExternalcontactGetOptions 请求参数

type ExternalcontactGetSchema

type ExternalcontactGetSchema struct {
	util.CommonError
	ExternalContact ExternalContact `json:"external_contact"`
	FollowUser      []FollowUser    `json:"follow_user"`
	NextCursor      string          `json:"next_cursor"`
}

ExternalcontactGetSchema 获取客户详情响应内容

type ExternalcontactGetTagListOptions

type ExternalcontactGetTagListOptions struct {
	TagID   []string `json:"tag_id"`   // 要查询的标签id
	GroupID []string `json:"group_id"` // 要查询的标签组id,返回该标签组以及其下的所有标签信息
}

ExternalcontactGetTagListOptions 获取企业标签库请求参数

type ExternalcontactGetTagListSchema

type ExternalcontactGetTagListSchema struct {
	util.CommonError
	TagGroup []TagGroupChild `json:"tag_group"` // 标签组列表
}

ExternalcontactGetTagListSchema 获取企业标签库响应内容

type ExternalcontactGetUserBehaviorDataOptions

type ExternalcontactGetUserBehaviorDataOptions struct {
	Userid    []string `json:"userid"`
	Partyid   []int    `json:"partyid"`
	StartTime int      `json:"start_time"`
	EndTime   int      `json:"end_time"`
}

ExternalcontactGetUserBehaviorDataOptions 获取「联系客户统计」数据请求参数

type ExternalcontactGetUserBehaviorDataSchema

type ExternalcontactGetUserBehaviorDataSchema struct {
	util.CommonError
	BehaviorData []BehaviorData `json:"behavior_data"`
}

ExternalcontactGetUserBehaviorDataSchema 获取「联系客户统计」数据响应内容

type ExternalcontactGroupChatAdmin

type ExternalcontactGroupChatAdmin struct {
	Userid string `json:"userid"` //群管理员userid

}

群管理员列表

type ExternalcontactGroupChatInfo

type ExternalcontactGroupChatInfo struct {
	ChatId     string                           `json:"chat_id"`     //客户群ID
	Name       string                           `json:"name"`        //群名
	Owner      string                           `json:"owner"`       //群主ID
	CreateTime int                              `json:"create_time"` //群的创建时间
	Notice     string                           `json:"notice"`      //群公告
	MemberList []ExternalcontactGroupChatMember `json:"member_list"` //群成员列表
	AdminList  []ExternalcontactGroupChatAdmin  `json:"admin_list"`  //群管理员列表
}

客户群详情

type ExternalcontactGroupChatInfoOptions

type ExternalcontactGroupChatInfoOptions struct {
	ChatId   string `json:"chat_id"`   // 	 	客户群ID
	NeedName int    `json:"need_name"` // 	是否需要返回群成员的名字group_chat.member_list.name。0-不返回;1-返回。默认不返回
}

获取客户群详情参数

type ExternalcontactGroupChatInvitor

type ExternalcontactGroupChatInvitor struct {
	Userid string `json:"userid"` //邀请者的userid

}

邀请人

type ExternalcontactGroupChatList

type ExternalcontactGroupChatList struct {
	StatusFilter int                     `json:"status_filter"` //客户群跟进状态过滤。0 - 所有列表(即不过滤) 1 - 离职待继承 2 - 离职继承中 3 - 离职继承完成 默认为0
	OwnerFilter  []GroupChatOwnerFilters `json:"owner_filter"`  //群主过滤。 如果不填,表示获取应用可见范围内全部群主的数据(但是不建议这么用,如果可见范围人数超过1000人,为了防止数据包过大,会报错 81017)
	Cursor       string                  `json:"cursor"`        //用于分页查询的游标,字符串类型,由上一次调用返回,首次调用不填
	Limit        int                     `json:"limit"`         //分页,预期请求的数据量,取值范围 1 ~ 1000
}

群列表返回参数

type ExternalcontactGroupChatMember

type ExternalcontactGroupChatMember struct {
	Userid        string                          `json:"userid"`         // 群成员id
	Type          int                             `json:"type"`           //成员类型1 - 企业成员 2 - 外部联系人
	Unionid       string                          `json:"unionid"`        //外部联系人在微信开放平台的唯一身份标识(微信unionid),通过此字段企业可将外部联系人与公众号/小程序用户关联起来。仅当群成员类型是微信用户(包括企业成员未添加好友),且企业或第三方服务商绑定了微信开发者ID有此字段。查看绑定方法
	JoinTime      int                             `json:"join_time"`      //入群时间
	JoinScene     int                             `json:"join_scene"`     //入群方式。1 - 由群成员邀请入群(直接邀请入群)2 - 由群成员邀请入群(通过邀请链接入群)3 - 通过扫描群二维码入群
	Invitor       ExternalcontactGroupChatInvitor `json:"invitor"`        //邀请者
	GroupNickname string                          `json:"group_nickname"` //在群里的昵称
	Name          string                          `json:"name"`           //名字。仅当 need_name = 1 时返回如果是微信用户,则返回其在微信中设置的名字如果是企业微信联系人,则返回其设置对外展示的别名或实名

}

群成员列表

type ExternalcontactGroupchatStatisticGroupByDayOptions

type ExternalcontactGroupchatStatisticGroupByDayOptions struct {
	DayBeginTime int         `json:"day_begin_time"`
	DayEndTime   int         `json:"day_end_time"`
	OwnerFilter  OwnerFilter `json:"owner_filter"`
}

ExternalcontactGroupchatStatisticGroupByDayOptions 获取「群聊数据统计」数据 - 按自然日聚合的方式

type ExternalcontactGroupchatStatisticGroupByDaySchema

type ExternalcontactGroupchatStatisticGroupByDaySchema struct {
	util.CommonError
	Errcode int         `json:"errcode"`
	Errmsg  string      `json:"errmsg"`
	Items   []DateItems `json:"items"`
}

ExternalcontactGroupchatStatisticGroupByDaySchema 获取「群聊数据统计」数据 - 按自然日聚合的方式

type ExternalcontactGroupchatStatisticOptions

type ExternalcontactGroupchatStatisticOptions struct {
	DayBeginTime int              `json:"day_begin_time"`
	DayEndTime   int              `json:"day_end_time"`
	OwnerFilter  OwnerFilterChild `json:"owner_filter"`
	OrderBy      int              `json:"order_by"`
	OrderAsc     int              `json:"order_asc"`
	Offset       int              `json:"offset"`
	Limit        int              `json:"limit"`
}

ExternalcontactGroupchatStatisticOptions 获取「群聊数据统计」数据 - 按群主聚合的方式

type ExternalcontactGroupchatStatisticSchema

type ExternalcontactGroupchatStatisticSchema struct {
	util.CommonError
	Total      int     `json:"total"`
	NextOffset int     `json:"next_offset"`
	Items      []Items `json:"items"`
}

ExternalcontactGroupchatStatisticSchema 获取「群聊数据统计」数据 - 按群主聚合的方式

type ExternalcontactListOptions

type ExternalcontactListOptions struct {
	Userid string `json:"userid"` // 企业成员的userid
}

ExternalcontactListOptions 获取客户列表请求参数

type ExternalcontactListSchema

type ExternalcontactListSchema struct {
	util.CommonError
	ExternalUserid []string `json:"external_userid"` // 外部联系人的userid列表
}

ExternalcontactListSchema 获取客户列表响应内容

type ExternalcontactMarkTagListOptions

type ExternalcontactMarkTagListOptions struct {
	UserId         string   `json:"userid"`          // 添加外部联系人的userid
	ExternalUserid string   `json:"external_userid"` // 外部联系人userid
	AddTag         []string `json:"add_tag"`         // 要标记的标签列表
	RemoveTag      []string `json:"remove_tag"`      //要移除的标签列表
}

ExternalcontactMarkTagListOptions 请确保external_userid是userid的外部联系人。 add_tag和remove_tag不可同时为空。 同一个标签组下现已支持多个标签

type ExternalcontactMomentStrategyCreateOptions

type ExternalcontactMomentStrategyCreateOptions struct {
	ParentID     int             `json:"parent_id"`
	StrategyName string          `json:"strategy_name"`
	AdminList    []string        `json:"admin_list"`
	Privilege    MomentPrivilege `json:"privilege"`
	Range        []Range         `json:"range"`
}

ExternalcontactMomentStrategyCreateOptions 创建新的规则组请求参数

type ExternalcontactMomentStrategyCreateSchema

type ExternalcontactMomentStrategyCreateSchema struct {
	util.CommonError
	StrategyID int `json:"strategy_id"`
}

ExternalcontactCustomerStrategyCreateSchema 创建新的规则组响应内容

type ExternalcontactMomentStrategyDelOptions

type ExternalcontactMomentStrategyDelOptions struct {
	StrategyID int `json:"strategy_id"`
}

ExternalcontactCustomerStrategyDelOptions 删除规则组请求参数

type ExternalcontactMomentStrategyEditOptions

type ExternalcontactMomentStrategyEditOptions struct {
	StrategyID   int             `json:"strategy_id"`
	StrategyName string          `json:"strategy_name"`
	AdminList    []string        `json:"admin_list"`
	Privilege    MomentPrivilege `json:"privilege"`
	RangeAdd     []Range         `json:"range_add"`
	RangeDel     []Range         `json:"range_del"`
}

ExternalcontactCustomerStrategyEditOptions 编辑规则组及其管理范围请求参数

type ExternalcontactMomentStrategyGetOptions

type ExternalcontactMomentStrategyGetOptions struct {
	StrategyID int `json:"strategy_id"`
}

ExternalcontactMomentStrategyGetOptions 获取规则组详情请求参数

type ExternalcontactMomentStrategyGetRangeOptions

type ExternalcontactMomentStrategyGetRangeOptions struct {
	StrategyID int    `json:"strategy_id"`
	Cursor     string `json:"cursor"`
	Limit      int    `json:"limit"`
}

ExternalcontactMomentStrategyGetRangeOptions 获取规则组管理范围请求参数

type ExternalcontactMomentStrategyGetRangeSchema

type ExternalcontactMomentStrategyGetRangeSchema struct {
	util.CommonError
	Errcode    int     `json:"errcode"`
	Errmsg     string  `json:"errmsg"`
	Range      []Range `json:"range"`
	NextCursor string  `json:"next_cursor"`
}

ExternalcontactMomentStrategyGetRangeSchema 获取规则组管理范围响应内容

type ExternalcontactMomentStrategyGetSchema

type ExternalcontactMomentStrategyGetSchema struct {
	util.CommonError
	MomentStrategy MomentStrategy `json:"strategy"`
}

ExternalcontactMomentStrategyGetSchema 获取规则组详情响应内容

type ExternalcontactMomentStrategyListOptions

type ExternalcontactMomentStrategyListOptions struct {
	Cursor string `json:"cursor"`
	Limit  int    `json:"limit"`
}

ExternalcontactMomentStrategyListOptions 获取规则组列表请求参数

type ExternalcontactMomentStrategyListSchema

type ExternalcontactMomentStrategyListSchema struct {
	util.CommonError
	Errcode    int            `json:"errcode"`
	Errmsg     string         `json:"errmsg"`
	Strategy   []StrategyInfo `json:"strategy"`
	NextCursor string         `json:"next_cursor"`
}

ExternalcontactCustomerStrategyListSchema 获取规则组列表响应内容

type ExternalcontactRemarkOptions

type ExternalcontactRemarkOptions struct {
	Userid           string   `json:"userid"`
	ExternalUserid   string   `json:"external_userid"`
	Remark           string   `json:"remark"`
	Description      string   `json:"description"`
	RemarkCompany    string   `json:"remark_company"`
	RemarkMobiles    []string `json:"remark_mobiles"`
	RemarkPicMediaid string   `json:"remark_pic_mediaid"`
}

ExternalcontactRemarkOptions 修改客户备注信息请求参数

type ExtraRule

type ExtraRule struct {
	SemanticsList []int `json:"semantics_list"`
}

type FollowInfo

type FollowInfo struct {
	Userid        string   `json:"userid"`
	Remark        string   `json:"remark"`
	Description   string   `json:"description"`
	Createtime    int      `json:"createtime"`
	TagID         []string `json:"tag_id"`
	State         string   `json:"state"`
	RemarkMobiles []string `json:"remark_mobiles"`
	OperUserid    string   `json:"oper_userid"`
	AddWay        int      `json:"add_way"`
}

FollowInfo 添加了此外部联系人的企业成员信息

type FollowUser

type FollowUser struct {
	Userid         string   `json:"userid"`
	Remark         string   `json:"remark"`
	Description    string   `json:"description"`
	Createtime     int      `json:"createtime"`
	Tags           []Tags   `json:"tags,omitempty"`
	RemarkCorpName string   `json:"remark_corp_name,omitempty"`
	RemarkMobiles  []string `json:"remark_mobiles,omitempty"`
	OperUserid     string   `json:"oper_userid"`
	AddWay         int      `json:"add_way"`
	State          string   `json:"state,omitempty"`
}

FollowUser 添加了此外部联系人的企业成员信息

type GetContactInfoSchema

type GetContactInfoSchema struct {
	util.CommonError
	ContactWay ContactWayInfo `json:"contact_way"`
}

获取企业已配置的「联系我」列表 响应内容

type GetExternalcontactGroupChatInfoSchema

type GetExternalcontactGroupChatInfoSchema struct {
	util.CommonError
	ExternalcontactGroupChatInfo ExternalcontactGroupChatInfo `json:"group_chat"`
}

获取群详情返回结果

type GetExternalcontactGroupChatListSchema

type GetExternalcontactGroupChatListSchema struct {
	util.CommonError
	ExternalcontactGroupChatList ExternalcontactGroupChatList `json:"externalcontact_group_chat_list"`
}

获取群列表返回结果

type GetMomentTaskOption

type GetMomentTaskOption struct {
	MomentId string `json:"moment_id"`
	Cursor   string `json:"cursor"`
	Limit    int    `json:"limit"`
}

type GetMomentTaskRet

type GetMomentTaskRet struct {
	util.CommonError
	NextCursor string     `json:"next_cursor"`
	TaskList   []TaskList `json:"task_list"`
}

type GroupChat

type GroupChat struct {
	ChatID     string       `json:"chat_id"`
	Name       string       `json:"name"`
	Owner      string       `json:"owner"`
	CreateTime int          `json:"create_time"`
	Notice     string       `json:"notice"`
	MemberList []MemberList `json:"member_list"`
	AdminList  []AdminList  `json:"admin_list"`
}

type GroupChatList

type GroupChatList struct {
	ChatID string `json:"chat_id"`
	Status int    `json:"status"`
}

type GroupChatOwnerFilters

type GroupChatOwnerFilters struct {
	UseridList string `json:"userid_list"` //用户ID列表。最多100个

}

群主过滤

type Image

type Image struct {
	MediaId string `json:"media_id"`
	PicUrl  string `json:"pic_url"`
}

type InterceptRuleSchema

type InterceptRuleSchema struct {
	util.CommonError
	RuleId string `json:"rule_id"`
}

type InvalidExternalContactList

type InvalidExternalContactList struct {
	TagList []string `json:"tag_list"`
}

type InvalidSenderList

type InvalidSenderList struct {
	UserList       []string `json:"user_list"`
	DepartmentList []int    `json:"department_list"`
}

type Invitor

type Invitor struct {
	Userid string `json:"userid"`
}

type Items

type Items struct {
	Owner string `json:"owner"`
	Data  Data   `json:"data"`
}

Items 记录列表。表示某个群主所拥有的客户群的统计数据

type LikeList

type LikeList struct {
	ExternalUserid string `json:"external_userid,omitempty"`
	CreateTime     int    `json:"create_time"`
	Userid         string `json:"userid,omitempty"`
}
type Link struct {
	Title  string `json:"title"`
	Picurl string `json:"picurl"`
	Desc   string `json:"desc"`
	URL    string `json:"url"`
}

type ListContactWayGetOptions

type ListContactWayGetOptions struct {
	StartTime int64  `json:"start_time"`
	EndTime   int64  `json:"end_time"`
	Cursor    string `json:"cursor"`
	Limit     int    `json:"limit"`
}

获取企业已配置的「联系我」列表 参数

type ListContactWayGetSchema

type ListContactWayGetSchema struct {
	util.CommonError
	ContactWay []ContactWay `json:"contact_way"`
	NextCursor string       `json:"next_cursor"`
}

获取企业已配置的「联系我」列表 响应内容

type MemberList

type MemberList struct {
	Userid        string  `json:"userid"`
	Type          int     `json:"type"`
	JoinTime      int     `json:"join_time"`
	JoinScene     int     `json:"join_scene"`
	Invitor       Invitor `json:"invitor,omitempty"`
	GroupNickname string  `json:"group_nickname"`
	Name          string  `json:"name"`
	Unionid       string  `json:"unionid,omitempty"`
}

type Miniprogram

type Miniprogram struct {
	Title      string `json:"title"`
	PicMediaId string `json:"pic_media_id"`
	Appid      string `json:"appid"`
	Page       string `json:"page"`
}

type MomentCommentsOption

type MomentCommentsOption struct {
	MomentId string `json:"moment_id,omitempty"`
	Userid   string `json:"userid,omitempty"`
}

type MomentConmmentsRes

type MomentConmmentsRes struct {
	util.CommonError
	CommentList []CommentList `json:"comment_list"`
	LikeList    []LikeList    `json:"like_list"`
}

type MomentPrivilege

type MomentPrivilege struct {
	ViewMomentList           bool `json:"view_moment_list"`
	SendMoment               bool `json:"send_moment"`
	ManageMomentCoverAndSign bool `json:"manage_moment_cover_and_sign"`
}

type MomentStrategy

type MomentStrategy struct {
	StrategyID      int             `json:"strategy_id"`
	ParentID        int             `json:"parent_id"`
	StrategyName    string          `json:"strategy_name"`
	CreateTime      int             `json:"create_time"`
	AdminList       []string        `json:"admin_list"`
	MomentPrivilege MomentPrivilege `json:"privilege"`
}

MomentStrategy 规则组详情

type MsgSendResultOptions

type MsgSendResultOptions struct {
	Msgid  string `json:"msgid"`
	Userid string `json:"userid"`
	Limit  int    `json:"limit"`
	Cursor string `json:"cursor"`
}

type MsgSendResultSchema

type MsgSendResultSchema struct {
	util.CommonError
	NextCursor string     `json:"next_cursor"`
	SendList   []SendList `json:"send_list"`
}

type OwnerFilter

type OwnerFilter struct {
	UseridList []string `json:"userid_list"`
}

type OwnerFilterChild

type OwnerFilterChild struct {
	UseridList []string `json:"userid_list"`
}

OwnerFilterChild 群主过滤信息

type Privilege

type Privilege struct {
	ViewCustomerList        bool `json:"view_customer_list"`
	ViewCustomerData        bool `json:"view_customer_data"`
	ViewRoomList            bool `json:"view_room_list"`
	ContactMe               bool `json:"contact_me"`
	JoinRoom                bool `json:"join_room"`
	ShareCustomer           bool `json:"share_customer"`
	OperResignCustomer      bool `json:"oper_resign_customer"`
	OperResignGroup         bool `json:"oper_resign_group"`
	SendCustomerMsg         bool `json:"send_customer_msg"`
	EditWelcomeMsg          bool `json:"edit_welcome_msg"`
	ViewBehaviorData        bool `json:"view_behavior_data"`
	ViewRoomData            bool `json:"view_room_data"`
	SendGroupMsg            bool `json:"send_group_msg"`
	RoomDeduplication       bool `json:"room_deduplication"`
	RapidReply              bool `json:"rapid_reply"`
	OnjobCustomerTransfer   bool `json:"onjob_customer_transfer"`
	EditAntiSpamRule        bool `json:"edit_anti_spam_rule"`
	ExportCustomerList      bool `json:"export_customer_list"`
	ExportCustomerData      bool `json:"export_customer_data"`
	ExportCustomerGroupList bool `json:"export_customer_group_list"`
	ManageCustomerTag       bool `json:"manage_customer_tag"`
}

Privilege 权限信息

type Range

type Range struct {
	Type    int    `json:"type"`
	Userid  string `json:"userid,omitempty"`
	Partyid int    `json:"partyid,omitempty"`
}

Range 范围信息

type RemoveApplicableRange

type RemoveApplicableRange struct {
	UserList       []string `json:"user_list,omitempty"`
	DepartmentList []int    `json:"department_list,omitempty"`
}

type Result

type Result struct {
	Errcode                    int                        `json:"errcode"`
	Errmsg                     string                     `json:"errmsg"`
	MomentID                   string                     `json:"moment_id"`
	InvalidSenderList          InvalidSenderList          `json:"invalid_sender_list"`
	InvalidExternalContactList InvalidExternalContactList `json:"invalid_external_contact_list"`
}

type SendList

type SendList struct {
	ExternalUserid string `json:"external_userid"`
	ChatID         string `json:"chat_id"`
	Userid         string `json:"userid"`
	Status         int    `json:"status"`
	SendTime       int    `json:"send_time"`
}

type SignatureOptions

type SignatureOptions struct {
	Signature string `form:"msg_signature"`
	TimeStamp string `form:"timestamp"`
	Nonce     string `form:"nonce"`
	EchoStr   string `form:"echostr"`
	Encrypt   string `form:"encrypt"`
}

SignatureOptions 微信服务器验证参数

type Strategy

type Strategy struct {
	StrategyID   int       `json:"strategy_id"`
	ParentID     int       `json:"parent_id"`
	StrategyName string    `json:"strategy_name"`
	CreateTime   int       `json:"create_time"`
	AdminList    []string  `json:"admin_list"`
	Privilege    Privilege `json:"privilege"`
}

Strategy 规则组详情

type StrategyInfo

type StrategyInfo struct {
	StrategyID int `json:"strategy_id"`
}

StrategyInfo 规则组信息

type Tag

type Tag struct {
	ID         string `json:"id"`          // 标签id
	Name       string `json:"name"`        // 标签名称
	CreateTime int    `json:"create_time"` // 标签创建时间
	Order      int    `json:"order"`       // 标签排序的次序值,order值大的排序靠前。有效的值范围是[0, 2^32)
	Deleted    bool   `json:"deleted"`     // 标签是否已经被删除,只在指定tag_id/group_id进行查询时返回
}

type TagCreateCallbackMessage

type TagCreateCallbackMessage struct {
	CallbackMessage
	Id      string `json:"id"`
	TagType string `json:"tag_type"`
}

TagCreateCallbackMessage 企业客户标签创建事件

type TagDeleteCallbackMessage

type TagDeleteCallbackMessage struct {
	CallbackMessage
	Id      string `json:"id"`
	TagType string `json:"tag_type"`
}

TagDeleteCallbackMessage 企业客户标签删除事件

type TagGroup

type TagGroup struct {
	GroupID    string   `json:"group_id"`    // 标签组id
	GroupName  string   `json:"group_name"`  // 标签组名称
	CreateTime int      `json:"create_time"` // 标签组创建时间
	Tag        []AddTag `json:"tag"`         // 标签组内的标签列表
}

type TagGroupChild

type TagGroupChild struct {
	GroupID    string `json:"group_id"`    // 标签组id
	GroupName  string `json:"group_name"`  // 标签组名称
	CreateTime int    `json:"create_time"` // 标签组创建时间
	Order      int    `json:"order"`       // 标签组排序的次序值,order值大的排序靠前。有效的值范围是[0, 2^32)
	Deleted    bool   `json:"deleted"`     // 标签组是否已经被删除,只在指定tag_id进行查询时返回
	Tag        []Tag  `json:"tag"`         // 标签组内的标签列表
}

type TagShuffleCallbackMessage

type TagShuffleCallbackMessage struct {
	CallbackMessage
	Id         string `json:"id"`
	StrategyID string `json:"strategy_id"`
}

TagShuffleCallbackMessage 企业客户标签重排事件

type TagUpdateCallbackMessage

type TagUpdateCallbackMessage struct {
	CallbackMessage
	Id      string `json:"id"`
	TagType string `json:"tag_type"`
}

TagUpdateCallbackMessage 企业客户标签变更事件

type Tags

type Tags struct {
	GroupName string `json:"group_name"`
	TagName   string `json:"tag_name"`
	TagID     string `json:"tag_id,omitempty"`
	Type      int    `json:"type"`
}

Tags 外部联系人标签信息

type TaskList

type TaskList struct {
	Userid        string `json:"userid"`
	PublishStatus int    `json:"publish_status"`
}

type Text

type Text struct {
	Content string `json:"content"`
}

type TransferFailCallbackMessage

type TransferFailCallbackMessage struct {
	CallbackMessage
	FailReason     string `json:"fail_reason"`
	UserID         string `json:"user_id"`
	ExternalUserID string `json:"external_user_id"`
}

TransferFailCallbackMessage 客户接替失败事件

type UpdateCallbackMessage

type UpdateCallbackMessage struct {
	CallbackMessage
	ChatId       string `json:"chat_id"`
	UpdateDetail string `json:"update_detail"`
	JoinScene    int    `json:"join_scene"`
	QuitScene    int    `json:"quit_scene"`
	MemChangeCnt int    `json:"mem_change_cnt"`
}

UpdateCallbackMessage 客户群变更事件

type UpdateContactWayOptions

type UpdateContactWayOptions struct {
	ConfigId      string      `json:"config_id"`
	Remark        string      `json:"remark"`
	SkipVerify    bool        `json:"skip_verify"`
	Style         int         `json:"style,omitempty"`
	State         string      `json:"state,omitempty"`
	User          []string    `json:"user,omitempty"`
	Party         []int       `json:"party,omitempty"`
	ExpiresIn     int         `json:"expires_in,omitempty"`
	ChatExpiresIn int         `json:"chat_expires_in,omitempty"`
	Unionid       string      `json:"unionid,omitempty"`
	Conclusions   Conclusions `json:"conclusions,omitempty"`
}

type UpdateInterceptRuleOptions

type UpdateInterceptRuleOptions struct {
	RuleID                string                `json:"rule_id"`
	RuleName              string                `json:"rule_name"`
	WordList              []string              `json:"word_list"`
	ExtraRule             ExtraRule             `json:"extra_rule"`
	InterceptType         int                   `json:"intercept_type"`
	AddApplicableRange    AddApplicableRange    `json:"add_applicable_range,omitempty"`
	RemoveApplicableRange RemoveApplicableRange `json:"remove_applicable_range,omitempty"`
}

Jump to

Keyboard shortcuts

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