structs

package
v1.8.35 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Zlib Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEBatchJobResult = "batch_job_result"
)
View Source
const (
	Kway = 0
)

add_way表示添加客户的来源,有固定的值,而state表示此客户的渠道,可以由企业进行自定义的配置,请注意二者的不同。

值 含义 0 未知来源 1 扫描二维码 2 搜索手机号 3 名片分享 4 群聊 5 手机通讯录 6 微信联系人 8 安装第三方应用时自动添加的客服人员 9 搜索邮箱 10 视频号添加 11 通过日程参与人添加 12 通过会议参与人添加 13 添加微信好友对应的企业微信 14 通过智慧硬件专属客服添加 15 通过上门服务客服添加 201 内部成员共享 202 管理员/负责人分配

Variables

This section is empty.

Functions

This section is empty.

Types

type AddContactWay added in v1.8.31

type AddContactWay struct {
	Type          int      `json:"type"`            //联系方式类型,1-单人, 2-多人
	Scene         int      `json:"scene"`           //场景,1-在小程序中联系,2-通过二维码联系
	Style         int      `json:"style"`           //联系方式的备注信息,用于助记,不超过30个字符
	Remark        string   `json:"remark"`          //联系方式的备注信息,用于助记,不超过30个字符
	SkipVerify    bool     `json:"skip_verify"`     //外部客户添加时是否无需验证,默认为true
	State         string   `json:"state"`           //企业自定义的state参数,用于区分不同的添加渠道,在调用“获取外部联系人详情”时会返回该参数值,不超过30个字符
	User          []string `json:"user"`            //使用该联系方式的用户userID列表,在type为1时为必填,且只能有一个
	Party         []int    `json:"party"`           //使用该联系方式的部门id列表,只在type为2时有效
	IsTemp        bool     `json:"is_temp"`         //是否临时会话模式,true表示使用临时会话模式,默认为false
	ExpiresIn     int      `json:"expires_in"`      //临时会话二维码有效期,以秒为单位。该参数仅在is_temp为true时有效,默认7天,最多为14天
	ChatExpiresIn int      `json:"chat_expires_in"` //临时会话有效期,以秒为单位。该参数仅在is_temp为true时有效,默认为添加好友后24小时,最多为14天
	UnionId       string   `json:"unionid"`         //可进行临时会话的客户unionid,该参数仅在is_temp为true时有效,如不指定则不进行限制
	IsExclusive   bool     `json:"is_exclusive"`    //是否开启同一外部企业客户只能添加同一个员工,默认为否,开启后,同一个企业的客户会优先添加到同一个跟进人
	Conclusions   struct {
		Text        *ExText    `json:"text,omitempty"`
		Image       *ExImage   `json:"image,omitempty"`
		Link        *ExLink    `json:"link,omitempty"`
		MiniProgram *ExProgram `json:"miniprogram,omitempty"`
	} `json:"conclusions"` //结束语,会话结束时自动发送给客户,可参考“结束语定义”,仅在is_temp为true时有效
}

type AddContactWayResult added in v1.8.31

type AddContactWayResult struct {
	ConfigId string `json:"config_id"`
	QrCode   string `json:"qr_code"`
}

type AddMomentTask added in v1.8.4

type AddMomentTask struct {
	Text         ExText       `json:"text"` //不能与Attachment同时为空
	Attachments  []Attachment `json:"attachments"`
	VisibleRange VisibleRange `json:"visible_range"`
}

type AddStrategyTagReq added in v1.0.49

type AddStrategyTagReq struct {
	AddTagReq
	StrategyId int `json:"strategy_id"`
}

type AddTagReq added in v1.0.34

type AddTagReq struct {
	GroupId   string    `json:"group_id"`
	GroupName string    `json:"group_name"`
	Order     int       `json:"order"`
	AgentId   int64     `json:"agentid,omitempty"` //授权方安装的应用agentid。仅旧的第三方多应用套件需要填此参数
	Tag       []TagInfo `json:"tag"`
}

type AgreeInfo added in v1.0.54

type AgreeInfo struct {
	StatusChangeTime int64  `json:"status_change_time"`
	Userid           string `json:"userid"`
	ExternalOpenId   string `json:"externalopenid"`
	AgreeStatus      string `json:"agree_status"`
}

type AgreeNotify added in v1.0.54

type AgreeNotify struct {
	ToUserName     string `json:"ToUserName" xml:"ToUserName"`
	FromUserName   string `json:"FromUserName" xml:"FromUserName"`
	UserID         string `json:"UserID" xml:"UserID"`
	ExternalUserID string `json:"ExternalUserID" xml:"ExternalUserID"`
	WelcomeCode    string `json:"WelcomeCode" xml:"WelcomeCode"`
}

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

type Articles

type Articles struct {
	Title  string `json:"title"`
	Desc   string `json:"description"`
	Url    string `json:"url"`
	Picurl string `json:"picurl"`
}

type Attachment added in v1.0.34

type Attachment struct {
	MsgType string     `json:"msgtype"`
	Image   *ExImage   `json:"image,omitempty"`
	Link    *ExLink    `json:"link,omitempty"`
	Program *ExProgram `json:"miniprogram,omitempty"`
	Video   *ExVideo   `json:"video,omitempty"`
	File    *ExFile    `json:"file,omitempty"`
}

type Attribute

type Attribute struct {
	Type        int                   `json:"type"`
	Name        string                `json:"name"`
	Text        *AttributeText        `json:"text,omitempty"`
	Web         *AttributeWeb         `json:"web,omitempty"`
	MiniProgram *AttributeMiniProgram `json:"miniprogram,omitempty"`
}

type AttributeMiniProgram

type AttributeMiniProgram struct {
	Appid    string `json:"appid"`
	PagePath string `json:"pagepath"`
	Title    string `json:"title"`
}

type AttributeText

type AttributeText struct {
	Value string `json:"value"`
}

type AttributeWeb

type AttributeWeb struct {
	Url   string `json:"url"`
	Title string `json:"title"`
}

type BatchUserId

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

type BatchUserIdRes

type BatchUserIdRes struct {
	ExternalContactList []ExternalContactDetail `json:"external_contact_list"`
	NextCursor          string                  `json:"next_cursor"`
}

type BehaviorDataResult added in v1.8.23

type BehaviorDataResult 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"`
}

type ContactWay added in v1.8.31

type ContactWay struct {
	ConfigId      string   `json:"config_id"`
	Type          int      `json:"type"`
	Scene         int      `json:"scene"`
	Style         int      `json:"style"`
	Remark        string   `json:"remark"`
	SkipVerify    bool     `json:"skip_verify"`
	State         string   `json:"state"`
	QrCode        string   `json:"qr_code"`
	User          []string `json:"user"`
	Party         []int    `json:"party"`
	IsTemp        bool     `json:"is_temp"`
	ExpiresIn     int      `json:"expires_in"`
	ChatExpiresIn int      `json:"chat_expires_in"`
	UnionId       string   `json:"unionid"`
	Conclusions   struct {
		Text        *ExText    `json:"text,omitempty"`
		Image       *ExImage   `json:"image,omitempty"`
		Link        *ExLink    `json:"link,omitempty"`
		MiniProgram *ExProgram `json:"miniprogram,omitempty"`
	} `json:"conclusions"`
}

type CursorSearchReq added in v1.8.31

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

type CustomerAcquisition added in v1.8.24

type CustomerAcquisition struct {
	LinkName   string                   `json:"link_name"`
	Range      CustomerAcquisitionRange `json:"range"`
	SkipVerify bool                     `json:"skip_verify"`
}

type CustomerAcquisitionCustomer added in v1.8.24

type CustomerAcquisitionCustomer struct {
	ExternalUserid string `json:"external_userid"`
	Userid         string `json:"userid"`
	ChatStatus     int    `json:"chat_status"`
	State          string `json:"state"`
}

type CustomerAcquisitionCustomerList added in v1.8.24

type CustomerAcquisitionCustomerList struct {
	NextCursor   string                        `json:"next_cursor"`
	CustomerList []CustomerAcquisitionCustomer `json:"customer_list"`
}

type CustomerAcquisitionInfo added in v1.8.24

type CustomerAcquisitionInfo struct {
	Link       CustomerAcquisitionLink  `json:"link"`
	Range      CustomerAcquisitionRange `json:"range"`
	SkipVerify bool                     `json:"skip_verify"`
}
type CustomerAcquisitionLink struct {
	LinkId     string `json:"link_id"`
	LinkName   string `json:"link_name"`
	Url        string `json:"url"`
	CreateTime int64  `json:"create_time"`
}

type CustomerAcquisitionQuota added in v1.8.24

type CustomerAcquisitionQuota struct {
	ExpireDate int64 `json:"expire_date"`
	Balance    int64 `json:"balance"`
}

type CustomerAcquisitionQuotaList added in v1.8.24

type CustomerAcquisitionQuotaList struct {
	Total     int64                      `json:"total"`
	Balance   int64                      `json:"balance"`
	QuotaList []CustomerAcquisitionQuota `json:"quota_list"`
}

type CustomerAcquisitionRange added in v1.8.24

type CustomerAcquisitionRange struct {
	UserList       []string `json:"user_list"`
	DepartmentList []int64  `json:"department_list"`
}

type CustomerAcquisitionResult added in v1.8.24

type CustomerAcquisitionResult struct {
	LinkIdList []string `json:"link_id_list"`
	NextCursor string   `json:"next_cursor"`
}

type CustomerAcquisitionSearch added in v1.8.24

type CustomerAcquisitionSearch struct {
	LinkId string `json:"link_id,omitempty"`
	Limit  int    `json:"limit"`
	Cursor string `json:"cursor"`
}

type CustomerAcquisitionStatisticResult added in v1.8.24

type CustomerAcquisitionStatisticResult struct {
	ClickLinkCustomerCnt int `json:"click_link_customer_cnt"`
	NewCustomerCnt       int `json:"new_customer_cnt"`
}

type CustomerAcquisitionStatisticSearch added in v1.8.24

type CustomerAcquisitionStatisticSearch struct {
	LinkId    string `json:"link_id"`
	StartTime int    `json:"start_time"`
	EndTime   int    `json:"end_time"`
}

type DepCUMember added in v1.8.29

type DepCUMember struct {
	Userid           string           `json:"userid"`
	Name             string           `json:"name"`
	Alias            string           `json:"alias"`
	Mobile           string           `json:"mobile"`
	Department       []string         `json:"department"`
	Order            []string         `json:"order"`
	Position         string           `json:"position"`
	Gender           string           `json:"gender"`
	Email            string           `json:"email"`
	BizMail          string           `json:"biz_mail"`
	IsLeaderInDept   []string         `json:"is_leader_in_dept,omitempty"`
	DirectLeader     []string         `json:"direct_leader,omitempty"`
	Enable           int              `json:"enable"`
	AvatarMediaId    string           `json:"avatar_mediaid,omitempty"`
	Telephone        string           `json:"telephone"`
	Address          string           `json:"address"`
	MainDepartment   string           `json:"main_department"`
	ExtAttr          *Attribute       `json:"extattr,omitempty"`
	ExternalProfile  *ExternalProfile `json:"external_profile,omitempty"`
	ToInvite         string           `json:"to_invite"`
	ExternalPosition string           `json:"external_position"`
}

DepCUMember 成员创建与更新

type DepMember added in v1.0.38

type DepMember struct {
	Userid           string           `json:"userid"`
	Name             string           `json:"name,omitempty"`
	Alias            string           `json:"alias,omitempty"`
	Mobile           string           `json:"mobile,omitempty"`
	Position         string           `json:"position,omitempty"`
	Gender           string           `json:"gender,omitempty"`
	Email            string           `json:"email,omitempty"`
	BizMail          string           `json:"biz_mail,omitempty"`
	AvatarMediaId    string           `json:"avatar_mediaid,omitempty"`
	OpenUserid       string           `json:"open_userid,omitempty"`
	Avatar           string           `json:"avatar,omitempty"`
	ThumbAvatar      string           `json:"thumb_avatar,omitempty"`
	Telephone        string           `json:"telephone,omitempty"`
	Address          string           `json:"address,omitempty"`
	QrCode           string           `json:"qr_code,omitempty"`
	ExternalPosition string           `json:"external_position"`
	ToInvite         bool             `json:"to_invite,omitempty"`
	Enable           int              `json:"enable"`
	Status           int              `json:"status,omitempty"`
	MainDepartment   int64            `json:"main_department"`
	Department       []int64          `json:"department,omitempty"`
	IsLeaderInDept   []int64          `json:"is_leader_in_dept,omitempty"`
	Order            []int            `json:"order,omitempty"`
	DirectLeader     []string         `json:"direct_leader,omitempty"`
	ExtAttr          *Attribute       `json:"extattr,omitempty"`
	ExternalProfile  *ExternalProfile `json:"external_profile,omitempty"`
}

type DepUser

type DepUser struct {
	OpenUserId string `json:"open_userid"`
	Department int64  `json:"department"`
}

type Department

type Department struct {
	Id       int64    `json:"id"`
	ParentId int64    `json:"parentid,omitempty"`
	Order    int      `json:"order,omitempty"`
	Name     string   `json:"name,omitempty"`
	NameEn   string   `json:"name_en,omitempty"`
	Leader   []string `json:"department_leader,omitempty"`
}

type DepartmentId

type DepartmentId struct {
	Id       int64 `json:"id"`
	ParentId int64 `json:"parentid"`
	Order    int   `json:"order"`
}

type EditTagReq added in v1.0.34

type EditTagReq struct {
	Id      string `json:"id"`
	Name    string `json:"name"`
	Order   int    `json:"order"`
	AgentId int64  `json:"agentid,omitempty"` //授权方安装的应用agentid。仅旧的第三方多应用套件需要填此参数
}

type ExFile added in v1.0.34

type ExFile struct {
	MediaId string `json:"media_id"`
}

type ExGroupMsg added in v1.8.24

type ExGroupMsg struct {
	ExUseIds []string   `json:"external_userid"`
	Sender   string     `json:"sender"`
	Text     *ExText    `json:"text,omitempty"`
	Image    *ExImage   `json:"image,omitempty"`
	Link     *ExLink    `json:"link,omitempty"`
	Program  *ExProgram `json:"miniprogram,omitempty"`
}

type ExGroupMsgResult added in v1.8.24

type ExGroupMsgResult struct {
	FailList []string `json:"fail_list"`
	MsgId    string   `json:"msgid"`
}

type ExImage added in v1.0.34

type ExImage struct {
	MediaId string `json:"media_id"`
	PicUrl  string `json:"pic_url,omitempty"`
}
type ExLink struct {
	Title   string `json:"title"`
	Desc    string `json:"desc"`
	PicUrl  string `json:"picurl,omitempty"`
	Url     string `json:"url,omitempty"`
	MediaId string `json:"media_id,omitempty"`
}

type ExProgram

type ExProgram struct {
	Title   string `json:"title"`        //"title": "消息标题",
	MediaId string `json:"pic_media_id"` //"pic_media_id": "MEDIA_ID",
	AppId   string `json:"appid"`        //"appid": "wx8bd80126147df384",
	Page    string `json:"page"`         //"page": "/path/index"
}

type ExText added in v1.0.34

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

type ExVideo added in v1.0.34

type ExVideo struct {
	MediaId string `json:"media_id"`
	Title   string `json:"title"`
	Desc    string `json:"description"`
}

type ExVoice added in v1.0.34

type ExVoice struct {
	MediaId string `json:"media_id"`
}

type ExWelcomeMsg

type ExWelcomeMsg struct {
	Text        *ExText    `json:"text,omitempty"`
	Image       *ExImage   `json:"image,omitempty"`
	Link        *ExLink    `json:"link,omitempty"`
	MiniProgram *ExProgram `json:"miniprogram,omitempty"`
	Code        int64      `json:"welcome_code"`
}

func (*ExWelcomeMsg) IsAgent

func (h *ExWelcomeMsg) IsAgent() bool

func (*ExWelcomeMsg) IsGroup

func (h *ExWelcomeMsg) IsGroup() bool

func (*ExWelcomeMsg) IsWelcome

func (h *ExWelcomeMsg) IsWelcome() bool

type Export added in v1.8.4

type Export struct {
	EncodingAesKey string `json:"encoding_aeskey"`
	BlockSize      int    `json:"block_size"`
}

type ExportItem added in v1.8.4

type ExportItem struct {
	Url  string      `json:"url"`
	Size interface{} `json:"size"`
	Md5  string      `json:"md5"`
}

type ExportNotify added in v1.8.4

type ExportNotify struct {
	JobId   string `json:"SuiteId" xml:"JobId"`
	JobType string `json:"AuthCorpId" xml:"JobType"` //操作类型,字符串,在异步导出的场景下分别有:export_user(导出成员详情)、 export_simple_user(导出成员)、export_department(导出部门)、export_tag(导出标签成员)
	ErrCode int    `json:"ErrCode" xml:"ErrCode"`
	ErrMsg  string `json:"ErrMsg" xml:"ErrMsg"`
}

ExportNotify 导出任务完成通知

type ExportResult added in v1.8.4

type ExportResult struct {
	Status   int          `json:"status"`
	DataList []ExportItem `json:"data_list"`
}

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"`
	UnionId         string           `json:"unionid"`
	Type            int              `json:"type"`
	Gender          int              `json:"gender"`
	ExternalProfile *ExternalProfile `json:"external_profile,omitempty"`
}

type ExternalContactDetail

type ExternalContactDetail struct {
	ExternalContact ExternalContact `json:"external_contact"`
	FollowInfo      *FollowUser     `json:"follow_info,omitempty"` //for batch
	FollowUser      []FollowUser    `json:"follow_user,omitempty"` // for detail
}

type ExternalGroupListReq added in v1.0.34

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

type ExternalProfile

type ExternalProfile struct {
	ExternalAttr     []Attribute    `json:"external_attr,omitempty"`
	WechatChannels   WechatChannels `json:"wechat_channels,omitempty"`
	ExternalCorpName string         `json:"external_corp_name,omitempty"`
}

type ExternalRemark

type ExternalRemark struct {
	Userid           string      `json:"userid"`
	ExternalUserid   string      `json:"external_userid"`
	Remark           string      `json:"remark"`
	Description      string      `json:"description"`
	RemarkCompany    string      `json:"remark_company"`
	RemarkPicMediaId string      `json:"remark_pic_mediaid"`
	RemarkMobiles    interface{} `json:"remark_mobiles"` //正常是一个 []string, 如果要清除所有备注手机号,请在remark_mobiles填写一个空字符串("")
}

ExternalRemark remark_company只在此外部联系人为微信用户时有效。 remark,description,remark_company,remark_mobiles和remark_pic_mediaid不可同时为空。 如果填写了remark_mobiles,将会覆盖旧的备注手机号。 如果要清除所有备注手机号,请在remark_mobiles填写一个空字符串("")。 remark_pic_mediaid可以通过素材管理接口获得。

type ExternalUserIdInfo added in v1.8.4

type ExternalUserIdInfo struct {
	CorpId         string `json:"corpid"`
	ExternalUserid string `json:"external_userid"`
}

type ExternalUserIdItem

type ExternalUserIdItem struct {
	ExternalUserid    string `json:"external_userid"`
	NewExternalUserid string `json:"new_external_userid"`
}

type ExternalUserIds

type ExternalUserIds struct {
	Items []ExternalUserIdItem `json:"items"`
}

type FollowUser added in v1.0.34

type FollowUser struct {
	Userid         string          `json:"userid"` //添加了此外部联系人的企业成员userid
	Remark         string          `json:"remark"` //该成员对此外部联系人的备注
	Description    string          `json:"description"`
	Tags           []FollowUserTag `json:"tags,omitempty"`
	TagIds         []string        `json:"tag_id,omitempty"`
	RemarkMobiles  []string        `json:"remark_mobiles,omitempty"`   //该成员对此客户备注的手机号码,代开发自建应用需要管理员授权才可以获取,第三方不可获取,上游企业不可获取下游企业客户该字段
	RemarkCorpName string          `json:"remark_corp_name,omitempty"` //该成员对此微信客户备注的企业名称(仅微信客户有该字段)
	OperUserid     string          `json:"oper_userid"`
	State          string          `json:"state,omitempty"`
	CreateTime     int64           `json:"createtime"`
	AddWay         int             `json:"add_way"` //该成员添加此客户的来源
	WechatChannels *WechatChannels `json:"wechat_channels,omitempty"`
}

type FollowUserTag added in v1.8.22

type FollowUserTag struct {
	GroupName string `json:"group_name"`
	TagName   string `json:"tag_name"`
	TagId     string `json:"tag_id"`
	Type      int    `json:"type"`
}

type Group

type Group struct {
	Id    string   `json:"chatid"`
	Name  string   `json:"name"`
	Owner string   `json:"owner"`
	Users []string `json:"userlist"`
}

Group 群组

type GroupAdmin added in v1.0.34

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

type GroupChat added in v1.0.34

type GroupChat struct {
	ChatId string `json:"chat_id"`
	Status int    `json:"status"`
}

type GroupChatDetail added in v1.0.34

type GroupChatDetail struct {
	ChatId     string        `json:"chat_id"`
	Name       string        `json:"name"`
	Owner      string        `json:"owner"`
	Notice     string        `json:"notice"`
	CreateTime int64         `json:"create_time"`
	MemberList []GroupMember `json:"member_list"`
	AdminList  []GroupAdmin  `json:"admin_list"`
}

type GroupChatStatisticData added in v1.8.23

type GroupChatStatisticData 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 GroupChatStatisticItem added in v1.8.23

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

type GroupChatStatisticReq added in v1.8.23

type GroupChatStatisticReq struct {
	DayBeginTime int `json:"day_begin_time"`
	DayEndTime   int `json:"day_end_time"`
	OwnerFilter  struct {
		UseridList []string `json:"userid_list"`
	} `json:"owner_filter"`
	OrderBy  int `json:"order_by"`
	OrderAsc int `json:"order_asc"`
	Offset   int `json:"offset"`
	Limit    int `json:"limit"`
}

type GroupChatStatisticResult added in v1.8.23

type GroupChatStatisticResult struct {
	Total      int                      `json:"total"`
	NextOffset int                      `json:"next_offset"`
	Items      []GroupChatStatisticItem `json:"items"`
}

type GroupMember added in v1.0.34

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

type GroupMsg added in v1.0.34

type GroupMsg struct {
	MsgId       string       `json:"msgid"`
	Creator     string       `json:"creator"`
	CreateTime  string       `json:"create_time"`
	CreateType  int          `json:"create_type"`
	Text        *ExText      `json:"text,omitempty"`
	Attachments []Attachment `json:"attachments"`
}

type GroupMsgReq added in v1.0.34

type GroupMsgReq struct {
	ChatType   string `json:"chat_type"` //群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
	Creator    string `json:"creator"`
	Cursor     string `json:"cursor"`
	StartTime  int64  `json:"start_time"`
	EndTime    int64  `json:"end_time"`
	FilterType int    `json:"filter_type"`
	Limit      int    `json:"limit"`
}

type GroupMsgSearch added in v1.8.24

type GroupMsgSearch struct {
	MsgId  string `json:"msgid"`
	Userid string `json:"userid,omitempty"`
	Limit  int    `json:"limit"`
	Cursor string `json:"cursor"`
}

type GroupMsgSendResult added in v1.8.24

type GroupMsgSendResult 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 GroupMsgTask added in v1.8.24

type GroupMsgTask struct {
	Userid   string `json:"userid"`
	Status   int    `json:"status"`
	SendTime int    `json:"send_time"`
}

type GroupTransfer added in v1.8.24

type GroupTransfer struct {
	ChatIdList []string `json:"chat_id_list"`
	NewOwner   string   `json:"new_owner"`
}

type GroupTransferResult added in v1.8.24

type GroupTransferResult struct {
	ChatId  string `json:"chat_id"`
	Errcode int    `json:"errcode"`
	Errmsg  string `json:"errmsg"`
}
type Head struct {
	ChatId  string `json:"chatid,omitempty"`
	AgentId int64  `json:"agentid,omitempty"` //应用id
	ToUser  string `json:"touser,omitempty"`  //企业号中的用户帐号
	ToTag   string `json:"totag,omitempty"`   //企业号中的标签id,群发使用(推荐)
	ToParty string `json:"toparty,omitempty"` //企业号中的部门id,群发时使用。
	Type    string `json:"msgtype"`
	Safe    int    `json:"safe"`
}

{ "chatid": "", "touser": "UserID1|UserID2|UserID3", "toparty": " PartyID1 | PartyID2 ", "totag": " TagID1 | TagID2 ", "agentid": 1, "msgtype": "text", "text": { "content": "Holiday Service For Pony(http://xxxxx)" }, "safe":0 }

func (*Head) IsAgent

func (h *Head) IsAgent() bool

func (*Head) IsGroup

func (h *Head) IsGroup() bool

func (*Head) IsWelcome

func (h *Head) IsWelcome() bool

type ImageMsg

type ImageMsg struct {
	Head
	Image ExImage `json:"image"`
}

ImageMsg 图片消息

type ImportReq added in v1.8.4

type ImportReq struct {
	MediaId  string `json:"media_id"`
	ToInvite bool   `json:"to_invite"`
	Callback struct {
		Url            string `json:"url"`
		Token          string `json:"token"`
		EncodingAesKey string `json:"encodingaeskey"`
	} `json:"callback"`
}

type ImportResult added in v1.8.4

type ImportResult struct {
	Status     int           `json:"status"`
	Type       string        `json:"type"`
	Total      int           `json:"total"`
	Percentage int           `json:"percentage"`
	Result     []interface{} `json:"result"`
}

type Invitor added in v1.0.34

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

type MarkTagReq added in v1.0.34

type MarkTagReq struct {
	Userid         string   `json:"userid"`
	ExternalUserid string   `json:"external_userid"`
	AddTag         []string `json:"add_tag,omitempty"`
	RemoveTag      []string `json:"remove_tag,omitempty"`
}

type MarkdownMsg

type MarkdownMsg struct {
	Head
	Markdown ExText `json:"markdown"`
}

type MemberAuthResult added in v1.8.4

type MemberAuthResult struct {
	NextCursor     string `json:"next_cursor"`
	MemberAuthList []struct {
		OpenUserid string `json:"open_userid"`
	} `json:"member_auth_list"`
}

type Message

type Message interface {
	IsGroup() bool
	IsAgent() bool
	IsWelcome() bool
}

type MomentInfo added in v1.8.4

type MomentInfo struct {
	MomentId    string `json:"moment_id"`
	Creator     string `json:"creator"`
	CreateTime  int    `json:"create_time"`
	CreateType  int    `json:"create_type"`
	VisibleType int    `json:"visible_type"`
	Text        struct {
		Content string `json:"content"`
	} `json:"text"`
	Image []struct {
		MediaId string `json:"media_id"`
	} `json:"image"`
	Video struct {
		MediaId      string `json:"media_id"`
		ThumbMediaId string `json:"thumb_media_id"`
	} `json:"video"`
	Link struct {
		Title string `json:"title"`
		Url   string `json:"url"`
	} `json:"link"`
	Location struct {
		Latitude  string `json:"latitude"`
		Longitude string `json:"longitude"`
		Name      string `json:"name"`
	} `json:"location"`
}

type MomentListReq added in v1.8.4

type MomentListReq struct {
	StartTime  int    `json:"start_time"`
	EndTime    int    `json:"end_time"`
	Creator    string `json:"creator"`
	FilterType int    `json:"filter_type"`
	Cursor     string `json:"cursor"`
	Limit      int    `json:"limit"`
}

type MomentListResp added in v1.8.4

type MomentListResp struct {
	NextCursor string       `json:"next_cursor"`
	MomentList []MomentInfo `json:"moment_list"`
}

type MomentTaskResult added in v1.8.4

type MomentTaskResult struct {
	Status int    `json:"status"`
	Type   string `json:"type"`
	Result struct {
		ErrCode           int    `json:"errcode"`
		ErrMsg            string `json:"errmsg"`
		MomentId          string `json:"moment_id"`
		InvalidSenderList struct {
			UserList       []string `json:"user_list"`
			DepartmentList []int64  `json:"department_list"`
		} `json:"invalid_sender_list"`
		InvalidExternalContactList struct {
			TagList []string `json:"tag_list"`
		} `json:"invalid_external_contact_list"`
	} `json:"result"`
}

type NewExternalUserid added in v1.0.49

type NewExternalUserid struct {
	ExternalUserid    string `json:"external_userid"`
	NewExternalUserid string `json:"new_external_userid"`
}

type News

type News struct {
	Articles []Articles `json:"articles"`
}

News "news" : { "articles" : [ { "title" : "中秋节礼品领取", "description" : "今年中秋节公司有豪礼相送", "url" : "URL", "picurl" : "http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png" }

type NewsMsg

type NewsMsg struct {
	Head
	News News `json:"news"`
}

NewsMsg 图文消息

type OpenUserId

type OpenUserId struct {
	OpenUseridList    []OpenUserIdInfo `json:"open_userid_list"`
	InvalidUseridList []string         `json:"invalid_userid_list"`
}

type OpenUserIdInfo

type OpenUserIdInfo struct {
	Userid     string `json:"userid"`
	OpenUserid string `json:"open_userid"`
}

type OwnerFilter added in v1.0.34

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

type RoomInfo added in v1.0.54

type RoomInfo struct {
	RoomName       string       `json:"roomname"`
	Creator        string       `json:"creator"`
	Notice         string       `json:"notice"`
	RoomCreateTime int64        `json:"room_create_time"`
	Members        []RoomMember `json:"members"`
}

type RoomMember added in v1.0.54

type RoomMember struct {
	MemberId string `json:"memberid"`
	JoinTime int64  `json:"jointime"`
}

type SelectedTicketResult added in v1.8.4

type SelectedTicketResult struct {
	OperatorOpenUserid   string   `json:"operator_open_userid"`
	OpenUseridList       []string `json:"open_userid_list"`
	UnAuthOpenUseridList []string `json:"unauth_open_userid_list"`
	Total                int      `json:"total"`
}

type SimpleUser added in v1.0.38

type SimpleUser struct {
	Userid     string  `json:"userid"`
	Name       string  `json:"name"`
	OpenUserid string  `json:"open_userid"`
	Department []int64 `json:"department"`
}

type SingleAgree added in v1.0.54

type SingleAgree struct {
	Userid         string `json:"userid"`
	ExternalOpenId string `json:"externalopenid"`
}

type TagGroup added in v1.0.34

type TagGroup struct {
	GroupId    string         `json:"group_id"`
	GroupName  string         `json:"group_name"`
	CreateTime int64          `json:"create_time"`
	Order      int            `json:"order"`
	StrategyId int            `json:"strategy_id,omitempty"`
	Deleted    bool           `json:"deleted"`
	Tag        []TagGroupItem `json:"tag"`
}

type TagGroupItem added in v1.0.34

type TagGroupItem struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	CreateTime int64  `json:"create_time"`
	Order      int    `json:"order"`
	Deleted    bool   `json:"deleted"`
}

type TagId added in v1.0.49

type TagId struct {
	TagId   []string `json:"tag_id,omitempty"`
	GroupId []string `json:"group_id,omitempty"`
}

type TagInfo added in v1.0.34

type TagInfo struct {
	Name  string `json:"name"`
	Order int    `json:"order"`
}

type TextCard

type TextCard struct {
	Title  string `json:"title"`
	Desc   string `json:"description"`
	Url    string `json:"url"`
	BtnTxt string `json:"btntxt"`
}

TextCard "textcard" : { "title" : "领奖通知", "description" : "<div class=\"gray\">2016年9月26日</div> <div class=\"normal\">恭喜你抽中iPhone 7一台,领奖码:xxxx</div><div class=\"highlight\">请于2016年10月10日前联系行政同事领取</div>", "url" : "URL", "btntxt":"更多" }

type TextCardMsg

type TextCardMsg struct {
	Head
	TextCard TextCard `json:"textcard"`
}

TextCardMsg 文本卡片消息

type TextMsg

type TextMsg struct {
	Head
	Text ExText `json:"text"`
}

TextMsg 文本消息

type ToAgent

type ToAgent struct {
	AgentId int64  `json:"agentid,omitempty"` //应用id
	ToUser  string `json:"touser,omitempty"`  //企业号中的用户帐号
	ToTag   string `json:"totag,omitempty"`   //企业号中的标签id,群发使用(推荐)
	ToParty string `json:"toparty,omitempty"` //企业号中的部门id,群发时使用。
}

func (*ToAgent) IsAgent

func (to *ToAgent) IsAgent() (bool, *ToAgent)

func (*ToAgent) IsGroup

func (to *ToAgent) IsGroup() (bool, *ToGroup)

func (*ToAgent) IsRoot

func (to *ToAgent) IsRoot() (bool, *ToRoot)

type ToGroup

type ToGroup struct {
	ChatId string `json:"chatid,omitempty"`
}

func (*ToGroup) IsAgent

func (to *ToGroup) IsAgent() (bool, *ToAgent)

func (*ToGroup) IsGroup

func (to *ToGroup) IsGroup() (bool, *ToGroup)

type ToRoot

type ToRoot struct {
}

func (*ToRoot) IsAgent

func (to *ToRoot) IsAgent() (bool, *ToAgent)

func (*ToRoot) IsGroup

func (to *ToRoot) IsGroup() (bool, *ToGroup)

func (*ToRoot) IsRoot

func (to *ToRoot) IsRoot() (bool, *ToRoot)

type ToWho

type ToWho interface {
	IsGroup() (bool, *ToGroup)
	IsAgent() (bool, *ToAgent)
}

type TransferCustomer added in v1.8.24

type TransferCustomer struct {
	HandoverUserid     string   `json:"handover_userid"`
	TakeoverUserid     string   `json:"takeover_userid"`
	ExternalUserid     []string `json:"external_userid"`
	TransferSuccessMsg string   `json:"transfer_success_msg"`
}

type TransferCustomerResult added in v1.8.24

type TransferCustomerResult struct {
	ExternalUserid string `json:"external_userid"`
	Errcode        int    `json:"errcode"`
}

type UpdateContactWay added in v1.8.31

type UpdateContactWay struct {
	ConfigId      string   `json:"config_id"`
	Remark        string   `json:"remark"`
	SkipVerify    bool     `json:"skip_verify"`
	Style         int      `json:"style"`
	State         string   `json:"state"`
	User          []string `json:"user"`
	Party         []int    `json:"party"`
	ExpiresIn     int      `json:"expires_in"`
	ChatExpiresIn int      `json:"chat_expires_in"`
	UnionId       string   `json:"unionid"`
	Conclusions   struct {
		Text        *ExText    `json:"text,omitempty"`
		Image       *ExImage   `json:"image,omitempty"`
		Link        *ExLink    `json:"link,omitempty"`
		MiniProgram *ExProgram `json:"miniprogram,omitempty"`
	} `json:"conclusions"`
}

type UserBehaviorDataReq added in v1.8.23

type UserBehaviorDataReq struct {
	UserId    []string `json:"userid"`
	PartyId   []int    `json:"partyid"`
	StartTime int      `json:"start_time"`
	EndTime   int      `json:"end_time"`
}

type UserIdReq

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

type UserInfo

type UserInfo struct {
	Userid  string `json:"userid"`
	Name    string `json:"name"`
	Gender  string `json:"gender"`
	Avatar  string `json:"avatar"`
	QrCode  string `json:"qr_code"`
	Mobile  string `json:"mobile"`
	Email   string `json:"email"`
	BizMail string `json:"biz_mail"`
	Address string `json:"address"`
}

type UserInfoWithCode

type UserInfoWithCode struct {
	Userid string `json:"userid"`
	OpenId string `json:"openid"`
}

type VideoMsg

type VideoMsg struct {
	Head
	Video ExVideo `json:"video"`
}

VideoMsg 视频消息

type VisibleRange added in v1.8.4

type VisibleRange struct {
	SenderList struct {
		UserList       []string `json:"user_list"`
		DepartmentList []int    `json:"department_list"`
	} `json:"sender_list"`
	ExternalContactList struct {
		TagList []string `json:"tag_list"`
	} `json:"external_contact_list"`
}

type VoiceMsg

type VoiceMsg struct {
	Head
	Voice ExVoice `json:"voice"`
}

VoiceMsg 语音消息

type WayItem added in v1.8.35

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

type WechatChannels

type WechatChannels struct {
	Nickname string `json:"nickname"`
	Source   int    `json:"source,omitempty"`
}

Jump to

Keyboard shortcuts

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