wecom

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Examples

Constants

View Source
const (
	AgentAuthTypeUsage = 0
	AgentAuthTypeAdmin = 1
)
View Source
const (
	MessageTypeText         = "text"
	MessageTypeMarkdown     = "markdown"
	MessageTypeImage        = "image"
	MessageTypeNews         = "news"
	MessageTypeFile         = "file"
	MessageTypeTemplateCard = "template_card"

	MentionAll = "@all"
)
View Source
const ClientContextKey = contextKey("Client")
View Source
const DefaultAPI = "https://qyapi.weixin.qq.com"

DefaultAPI default client base url

View Source
const EventMessageType = "event"

EventMessageType when xml message is an event, the MsgType is event

View Source
const RootDepartmentID = 1

RootDepartmentID is 1

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, v *Client) context.Context

func RandAES256Key

func RandAES256Key() string

RandAES256Key generate a random base64 aes key without padding

func RegisterEventModel

func RegisterEventModel(e ...EventModel)

func UnmarshalEvent

func UnmarshalEvent(data []byte) (EventModel, *CommonPushEvent, error)

func WebhookSend

func WebhookSend(r *WebhookSendRequest) (err error)

WebhookSend request webhook to send robot messages

Example
wecom.WebhookSend(&wecom.WebhookSendRequest{
	Key:     "KEY",
	Content: wecom.SendTextContent{Content: "Hello"},
	// debug for test only
	Request: req.Request{
		Options: []interface{}{req.DebugHook(&req.DebugOptions{
			Body: true,
		})},
	},
})
Output:

func WithProviderAccessToken

func WithProviderAccessToken(o *middlewareOptions)

WithProviderAccessToken when request add query provider_access_token

func WithSuiteAccessToken

func WithSuiteAccessToken(o *middlewareOptions)

WithSuiteAccessToken when request add query suite_access_token

func WithoutAccessToken

func WithoutAccessToken(o *middlewareOptions)

WithoutAccessToken when request do not add query access_token

Types

type AddCalendar

type AddCalendar struct {
	// Organizer 指定的组织者userid。注意该字段指定后不可更新
	Organizer string `json:"organizer"  validate:"required"`
	// Readonly 日历组织者对日历是否只读权限(即不可编辑日历,不可在日历上添加日程,仅可作为组织者删除日历)。0-否;1-是。默认为1,即只读
	Readonly int `json:"readonly"  `
	// SetAsDefault 是否将该日历设置为组织者的默认日历。0-否;1-是。默认为0,即不设为默认日历第三方应用不支持使用该参数
	SetAsDefault int `json:"set_as_default"  `
	// Summary 日历标题。1 ~ 128 字符
	Summary string `json:"summary"  validate:"required"`
	// Color 日历在终端上显示的颜色,RGB颜色编码16进制表示,例如:”#0000FF” 表示纯蓝色
	Color string `json:"color"  validate:"required"`
	// Description 日历描述。0 ~ 512 字符
	Description string `json:"description"  `
	// Shares 日历共享成员列表。最多2000人
	Shares []AddCalendarRequestShares `json:"shares"  `
}

type AddCalendarRequest

type AddCalendarRequest struct {
	// Calendar 日历信息
	Calendar AddCalendar `json:"calendar"  validate:"required"`
	// AgentID 授权方安装的应用agentid。仅旧的第三方多应用套件需要填此参数
	AgentID int `json:"agentid"  `
}

AddCalendarRequest is request of Client.AddCalendar

type AddCalendarRequestShares

type AddCalendarRequestShares struct {
	// UserID 日历共享成员的id
	UserID string `json:"userid"  validate:"required"`
	// Readonly 共享成员对日历是否只读权限(即不可编辑日历,不可在日历上添加日程,仅可以退出日历)。0-否;1-是。默认为1,即只读
	Readonly int `json:"readonly"  `
}

AddCalendarRequestShares is model of AddCalendarRequest.Shares

type AddCalendarResponse

type AddCalendarResponse struct {
	// CalenderID 日历ID
	CalenderID string `json:"cal_id"  `
}

AddCalendarResponse is response of Client.AddCalendar

type AddContactWayRequest

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

AddContactWayRequest is request of Client.AddContactWay

type AddContactWayResponse

type AddContactWayResponse struct {
	// ConfigID 新增联系方式的配置id
	ConfigID string `json:"config_id"  `
	// QrCode 联系我二维码链接,仅在scene为2时返回
	QrCode string `json:"qr_code"  `
}

AddContactWayResponse is response of Client.AddContactWay

type AddCorpTagRequest

type AddCorpTagRequest struct {
	// GroupID 标签组id
	GroupID string `json:"group_id"  `
	// GroupName 标签组名称,最长为30个字符
	GroupName string `json:"group_name"  `
	// Order 标签组次序值。order值大的排序靠前。有效的值范围是[0, 2^32)
	Order int `json:"order"  `
	// AgentID 授权方安装的应用agentid。仅旧的第三方多应用套件需要填此参数
	AgentID int `json:"agentid"  `

	Tag []AddCorpTagRequestTag `json:"tag"  `
}

AddCorpTagRequest is request of Client.AddCorpTag

type AddCorpTagRequestTag

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

AddCorpTagRequestTag is model of AddCorpTagRequest.Tag

type AddCorpTagResponse

type AddCorpTagResponse struct {
	TagGroup AddCorpTagResponseTagGroup `json:"tag_group"  `
}

AddCorpTagResponse is response of Client.AddCorpTag

type AddCorpTagResponseTagGroup

type AddCorpTagResponseTagGroup struct {
	// GroupID 标签组id
	GroupID string `json:"group_id"  `
	// GroupName 标签组名称
	GroupName string `json:"group_name"  `
	// CreateTime 标签组创建时间
	CreateTime int `json:"create_time"  `
	// Order 标签组次序值。order值大的排序靠前。有效的值范围是[0, 2^32)
	Order int `json:"order"  `
	// Tag 标签组内的标签列表
	Tag []AddCorpTagResponseTagGroupTag `json:"tag"  `
}

AddCorpTagResponseTagGroup is model of AddCorpTagResponse.TagGroup

type AddCorpTagResponseTagGroupTag

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

AddCorpTagResponseTagGroupTag is model of AddCorpTagResponseTagGroup.Tag

type AddGroupWelcomeTemplateRequest

type AddGroupWelcomeTemplateRequest struct {
	// AgentID 授权方安装的应用agentid。仅旧的第三方多应用套件需要填此参数
	AgentID int `json:"agentid"  `
	// Notify 是否通知成员将这条入群欢迎语应用到客户群中,0-不通知,1-通知, 不填则通知
	Notify int `json:"notify"  `

	Text AddGroupWelcomeTemplateRequestText `json:"text"  `

	Image AddGroupWelcomeTemplateRequestImage `json:"image"  `

	Link AddGroupWelcomeTemplateRequestLink `json:"link"  `

	MiniProgram AddGroupWelcomeTemplateRequestMiniProgram `json:"miniprogram"  `

	File AddGroupWelcomeTemplateRequestFile `json:"file"  `

	Video AddGroupWelcomeTemplateRequestVideo `json:"video"  `
}

AddGroupWelcomeTemplateRequest is request of Client.AddGroupWelcomeTemplate

type AddGroupWelcomeTemplateRequestFile

type AddGroupWelcomeTemplateRequestFile struct {
	// MediaID 文件id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  validate:"required"`
}

AddGroupWelcomeTemplateRequestFile is model of AddGroupWelcomeTemplateRequest.File

type AddGroupWelcomeTemplateRequestImage

type AddGroupWelcomeTemplateRequestImage struct {
	// MediaID 图片的media_id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  `
	// PicURL 图片的链接,仅可使用上传图片接口得到的链接
	PicURL string `json:"pic_url"  `
}

AddGroupWelcomeTemplateRequestImage is model of AddGroupWelcomeTemplateRequest.Image

type AddGroupWelcomeTemplateRequestLink struct {
	// Title 图文消息标题,最长为128字节
	Title string `json:"title"  validate:"required"`
	// PicURL 图文消息封面的url
	PicURL string `json:"picurl"  `
	// Desc 图文消息的描述,最长为512字节
	Desc string `json:"desc"  `
	// URL 图文消息的链接
	URL string `json:"url"  validate:"required"`
}

AddGroupWelcomeTemplateRequestLink is model of AddGroupWelcomeTemplateRequest.Link

type AddGroupWelcomeTemplateRequestMiniProgram

type AddGroupWelcomeTemplateRequestMiniProgram struct {
	// Title 小程序消息标题,最长为64字节
	Title string `json:"title"  validate:"required"`
	// PicMediaID 小程序消息封面的mediaid,封面图建议尺寸为520*416
	PicMediaID string `json:"pic_media_id"  validate:"required"`
	// AppID 小程序appid,必须是关联到企业的小程序应用
	AppID string `json:"appid"  validate:"required"`
	// Page 小程序page路径
	Page string `json:"page"  validate:"required"`
}

AddGroupWelcomeTemplateRequestMiniProgram is model of AddGroupWelcomeTemplateRequest.MiniProgram

type AddGroupWelcomeTemplateRequestText

type AddGroupWelcomeTemplateRequestText struct {
	// Content 消息文本内容,最长为3000字节
	Content string `json:"content"  `
}

AddGroupWelcomeTemplateRequestText is model of AddGroupWelcomeTemplateRequest.Text

type AddGroupWelcomeTemplateRequestVideo

type AddGroupWelcomeTemplateRequestVideo struct {
	// MediaID 视频媒体文件id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  validate:"required"`
}

AddGroupWelcomeTemplateRequestVideo is model of AddGroupWelcomeTemplateRequest.Video

type AddGroupWelcomeTemplateResponse

type AddGroupWelcomeTemplateResponse struct {
	// TemplateID 欢迎语素材id
	TemplateID string `json:"template_id"  `
}

AddGroupWelcomeTemplateResponse is response of Client.AddGroupWelcomeTemplate

type AddMessageTemplateRequest

type AddMessageTemplateRequest struct {
	// ChatType 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
	ChatType string `json:"chat_type"  `
	// ExternalUserID 客户的外部联系人id列表,仅在chat_type为single时有效,不可与sender同时为空,最多可传入1万个客户
	ExternalUserID []string `json:"external_userid"  `
	// Sender 发送企业群发消息的成员userid,当类型为发送给客户群时必填
	Sender string `json:"sender"  `
	// Attachments 附件,最多支持添加9个附件
	Attachments []AddMessageTemplateRequestAttachments `json:"attachments"  `

	Text AddMessageTemplateRequestText `json:"text"  `

	Image AddMessageTemplateRequestImage `json:"image"  `

	Link AddMessageTemplateRequestLink `json:"link"  `

	MiniProgram AddMessageTemplateRequestMiniProgram `json:"miniprogram"  `

	Video AddMessageTemplateRequestVideo `json:"video"  `

	File AddMessageTemplateRequestFile `json:"file"  `
}

AddMessageTemplateRequest is request of Client.AddMessageTemplate

type AddMessageTemplateRequestAttachments

type AddMessageTemplateRequestAttachments struct {
	// MessageType 附件类型,可选image、link、miniprogram或者video
	MessageType string `json:"msgtype"  validate:"required"`
}

AddMessageTemplateRequestAttachments is model of AddMessageTemplateRequest.Attachments

type AddMessageTemplateRequestFile

type AddMessageTemplateRequestFile struct {
	// MediaID 文件的media_id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  validate:"required"`
}

AddMessageTemplateRequestFile is model of AddMessageTemplateRequest.File

type AddMessageTemplateRequestImage

type AddMessageTemplateRequestImage struct {
	// MediaID 图片的media_id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  `
	// PicURL 图片的链接,仅可使用上传图片接口得到的链接
	PicURL string `json:"pic_url"  `
}

AddMessageTemplateRequestImage is model of AddMessageTemplateRequest.Image

type AddMessageTemplateRequestLink struct {
	// Title 图文消息标题,最长128个字节
	Title string `json:"title"  validate:"required"`
	// PicURL 图文消息封面的url,最长2048个字节
	PicURL string `json:"picurl"  `
	// Desc 图文消息的描述,最多512个字节
	Desc string `json:"desc"  `
	// URL 图文消息的链接,最长2048个字节
	URL string `json:"url"  validate:"required"`
}

AddMessageTemplateRequestLink is model of AddMessageTemplateRequest.Link

type AddMessageTemplateRequestMiniProgram

type AddMessageTemplateRequestMiniProgram struct {
	// Title 小程序消息标题,最多64个字节
	Title string `json:"title"  validate:"required"`
	// PicMediaID 小程序消息封面的mediaid,封面图建议尺寸为520*416
	PicMediaID string `json:"pic_media_id"  validate:"required"`
	// AppID 小程序appid(可以在微信公众平台上查询),必须是关联到企业的小程序应用
	AppID string `json:"appid"  validate:"required"`
	// Page 小程序page路径
	Page string `json:"page"  validate:"required"`
}

AddMessageTemplateRequestMiniProgram is model of AddMessageTemplateRequest.MiniProgram

type AddMessageTemplateRequestText

type AddMessageTemplateRequestText struct {
	// Content 消息文本内容,最多4000个字节
	Content string `json:"content"  `
}

AddMessageTemplateRequestText is model of AddMessageTemplateRequest.Text

type AddMessageTemplateRequestVideo

type AddMessageTemplateRequestVideo struct {
	// MediaID 视频的media_id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  validate:"required"`
}

AddMessageTemplateRequestVideo is model of AddMessageTemplateRequest.Video

type AddMessageTemplateResponse

type AddMessageTemplateResponse struct {
	// FailList 无效或无法发送的external_userid列表
	FailList []string `json:"fail_list"  `
	// MessageID 企业群发消息的id,可用于获取群发消息发送结果
	MessageID string `json:"msgid"  `
}

AddMessageTemplateResponse is response of Client.AddMessageTemplate

type AddSchedulePushEvent

type AddSchedulePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// CalID 日历ID
	CalID string `xml:"CalId" json:"CalId"`
	// CreateTime 消息创建时间,unix时间戳
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型,此时固定为:add_schedule
	Event string `xml:"Event" json:"Event"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ScheduleID 日程ID
	ScheduleID string `xml:"ScheduleId" json:"ScheduleId"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

AddSchedulePushEvent 添加日程事件 当用户在API创建的日历上添加了日程后,触发该事件。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93651

func (AddSchedulePushEvent) EventType

func (AddSchedulePushEvent) EventType() string

EventType impl EventModel

func (AddSchedulePushEvent) MessageType

func (AddSchedulePushEvent) MessageType() string

MessageType impl MessageModel

type AddScheduleRequest

type AddScheduleRequest struct {
	// Schedule obj
	Schedule AddScheduleRequestSchedule `json:"schedule"  validate:"required"`
	// AgentID uint32
	AgentID int `json:"agentid"  `
}

AddScheduleRequest is request of Client.AddSchedule

type AddScheduleRequestSchedule

type AddScheduleRequestSchedule struct {
	// Attendees obj[]
	Attendees []AddScheduleRequestScheduleAttendees `json:"attendees"  `
	// Summary string
	Summary string `json:"summary"  `
	// Description string
	Description string `json:"description"  `
	// Reminders obj
	Reminders AddScheduleRequestScheduleReminders `json:"reminders"  `
	// Location string
	Location string `json:"location"  `
	// Organizer string
	Organizer string `json:"organizer"  validate:"required"`
	// StartTime uint32
	StartTime int `json:"start_time"  `
	// EndTime uint32
	EndTime int `json:"end_time"  `
	// CalenderID string
	CalenderID string `json:"cal_id"  `
}

AddScheduleRequestSchedule is model of AddScheduleRequest.Schedule

type AddScheduleRequestScheduleAttendees

type AddScheduleRequestScheduleAttendees struct {
	// UserID string
	UserID string `json:"userid"  validate:"required"`
}

AddScheduleRequestScheduleAttendees is model of AddScheduleRequestSchedule.Attendees

type AddScheduleRequestScheduleReminders

type AddScheduleRequestScheduleReminders struct {
	// IsRemind int32
	IsRemind int `json:"is_remind"  `
	// IsRepeat int32
	IsRepeat int `json:"is_repeat"  `
	// RemindBeforeEventSecs uint32
	RemindBeforeEventSecs int `json:"remind_before_event_secs"  `
	// RepeatType uint32
	RepeatType int `json:"repeat_type"  `
	// RepeatUntil uint32
	RepeatUntil int `json:"repeat_until"  `
	// IsCustomRepeat uint32
	IsCustomRepeat int `json:"is_custom_repeat"  `
	// RepeatInterval uint32
	RepeatInterval int `json:"repeat_interval"  `
	// RepeatDayOfWeek uint32[]
	RepeatDayOfWeek []int `json:"repeat_day_of_week"  `
	// RepeatDayOfMonth uint32[]
	RepeatDayOfMonth []int `json:"repeat_day_of_month"  `
	// Timezone uint32
	Timezone int `json:"timezone"  `
}

AddScheduleRequestScheduleReminders is model of AddScheduleRequestSchedule.Reminders

type AddScheduleResponse

type AddScheduleResponse struct {
	// ScheduleID string
	ScheduleID string `json:"schedule_id"  `
}

AddScheduleResponse is response of Client.AddSchedule

type AddTagUsersRequest

type AddTagUsersRequest struct {
	// TagID 标签ID
	TagID int `json:"tagid"  validate:"required"`
	// UserList 企业成员ID列表,注意:userlist、partylist不能同时为空,单次请求个数不超过1000
	UserList []string `json:"userlist"  `
	// PartyList 企业部门ID列表,注意:userlist、partylist不能同时为空,单次请求个数不超过100
	PartyList []int `json:"partylist"  `
}

AddTagUsersRequest is request of Client.AddTagUsers

type AddTagUsersResponse

type AddTagUsersResponse struct {
	// InvalidList 非法的成员帐号列表
	InvalidList string `json:"invalidlist"  `
	// InvalidParty 非法的部门id列表
	InvalidParty string `json:"invalidparty"  `
}

AddTagUsersResponse is response of Client.AddTagUsers

type AgentAuthType

type AgentAuthType int

AgentAuthType type of agent auth used by ProviderGetLoginInfoResponse.Agent

func (AgentAuthType) String

func (v AgentAuthType) String() string

type AuthSuccessRequest

type AuthSuccessRequest struct {
	// UserID 成员UserID。对应管理端的帐号
	UserID string `json:"userid"  validate:"required"`
}

AuthSuccessRequest is request of Client.AuthSuccess

type BatchDeleteUserRequest

type BatchDeleteUserRequest struct {
	// UserIDList 成员UserID列表。对应管理端的帐号。最多支持200个。若存在无效UserID,直接返回错误
	UserIDList []string `json:"useridlist"  validate:"required"`
}

BatchDeleteUserRequest is request of Client.BatchDeleteUser

type BatchGetByUserRequest

type BatchGetByUserRequest struct {
	// UserIDList 企业成员的userid列表,字符串类型,最多支持100个
	UserIDList []string `json:"userid_list"  validate:"required"`
	// Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
	Cursor string `json:"cursor"  `
	// Limit 返回的最大记录数,整型,最大值100,默认值50,超过最大值时取最大值
	Limit int `json:"limit"  `
}

BatchGetByUserRequest is request of Client.BatchGetByUser

type BatchGetByUserResponse

type BatchGetByUserResponse struct {
	// NextCursor 分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空
	NextCursor string `json:"next_cursor"  `

	ExternalContactList []BatchGetByUserResponseExternalContactList `json:"external_contact_list"  `
}

BatchGetByUserResponse is response of Client.BatchGetByUser

type BatchGetByUserResponseExternalContactList

type BatchGetByUserResponseExternalContactList struct {
	// ExternalContact 客户的基本信息,可以参考获取客户详情
	ExternalContact ExternalContactResponse `json:"external_contact"  `
	// FollowInfo 企业成员客户跟进信息,可以参考获取客户详情,但标签信息只会返回企业标签和规则组标签的tag_id,个人标签将不再返回
	FollowInfo GetExternalContactResponseFollowUser `json:"follow_info"  `
}

BatchGetByUserResponseExternalContactList is model of BatchGetByUserResponse.ExternalContactList

type BatchGetResult

type BatchGetResult struct {
	UserID       string `json:"userid"`
	ErrorCode    int    `json:"errcode"`
	ErrorMessage string `json:"errmsg"`
}

type BatchGetResultRequest

type BatchGetResultRequest struct {
	// JobID 异步任务id,最大长度为64字节
	JobID string `json:"jobid"  validate:"required"`
}

BatchGetResultRequest is request of Client.BatchGetResult

type BatchGetResultResponse

type BatchGetResultResponse struct {
	// Status 任务状态,整型,1表示任务开始,2表示任务进行中,3表示任务已完成
	Status int `json:"status"  `
	// Type 操作类型,字节串,目前分别有:1. sync_user(增量更新成员)  2. replace_user(全量覆盖成员)3. replace_party(全量覆盖部门)
	Type string `json:"type"  `
	// Total 任务运行总条数
	Total int `json:"total"  `
	// Percentage 目前运行百分比,当任务完成时为100
	Percentage int `json:"percentage"  `
	// Result 详细的处理结果,具体格式参考下面说明。当任务完成后此字段有效
	Result []BatchGetResult `json:"result"  `
}

BatchGetResultResponse is response of Client.BatchGetResult

type BatchInviteRequest

type BatchInviteRequest struct {
	// User 成员ID列表, 最多支持1000个。
	User string `json:"user"  `
	// Party 部门ID列表,最多支持100个。
	Party string `json:"party"  `
	// Tag 标签ID列表,最多支持100个。
	Tag string `json:"tag"  `
}

BatchInviteRequest is request of Client.BatchInvite

type BatchInviteResponse

type BatchInviteResponse struct {
	// InvalidUser 非法成员列表
	InvalidUser string `json:"invaliduser"  `
	// InvalidParty 非法部门列表
	InvalidParty string `json:"invalidparty"  `
	// InvalidTag 非法标签列表
	InvalidTag string `json:"invalidtag"  `
}

BatchInviteResponse is response of Client.BatchInvite

type BatchJobResultPushEvent

type BatchJobResultPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// ErrCode 返回码
	ErrCode string `xml:"ErrCode" json:"ErrCode"`
	// ErrMsg 对返回码的文本描述内容
	ErrMsg string `xml:"ErrMsg" json:"ErrMsg"`
	// Event 事件类型:batch_job_result
	Event string `xml:"Event" json:"Event"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// JobID 异步任务id,最大长度为64字符
	JobID string `xml:"JobId" json:"JobId"`
	// JobType 操作类型,字符串,目前分别有:sync_user(增量更新成员)、 replace_user(全量覆盖成员)、invite_user(邀请成员关注)、replace_party(全量覆盖部门)
	JobType string `xml:"JobType" json:"JobType"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

BatchJobResultPushEvent 异步任务完成事件推送 本事件是成员在使用异步任务接口时,用于接收任务执行完毕的结果通知。

see https://work.weixin.qq.com/api/doc/90000/90135/90240

func (BatchJobResultPushEvent) EventType

func (BatchJobResultPushEvent) EventType() string

EventType impl EventModel

func (BatchJobResultPushEvent) MessageType

func (BatchJobResultPushEvent) MessageType() string

MessageType impl MessageModel

type BatchReplacePartyRequest

type BatchReplacePartyRequest struct {
	// MediaID 上传的csv文件的media_id
	MediaID string `json:"media_id"  validate:"required"`
	// Callback 回调信息。如填写该项则任务完成后,通过callback推送事件给企业。具体请参考应用回调模式中的相应选项
	Callback BatchSyncCallback `json:"callback"  `
}

BatchReplacePartyRequest is request of Client.BatchReplaceParty

type BatchReplacePartyResponse

type BatchReplacePartyResponse struct {
	// JobID 异步任务id,最大长度为64字节
	JobID string `json:"jobid"  `
}

BatchReplacePartyResponse is response of Client.BatchReplaceParty

type BatchReplaceUserRequest

type BatchReplaceUserRequest struct {
	// MediaID 上传的csv文件的media_id
	MediaID string `json:"media_id"  validate:"required"`
	// ToInvite 是否邀请新建的成员使用企业微信(将通过微信服务通知或短信或邮件下发邀请,每天自动下发一次,最多持续3个工作日),默认值为true。
	ToInvite bool `json:"to_invite"  `
	// Callback 回调信息。如填写该项则任务完成后,通过callback推送事件给企业。具体请参考应用回调模式中的相应选项
	Callback BatchSyncCallback `json:"callback"  `
}

BatchReplaceUserRequest is request of Client.BatchReplaceUser

type BatchReplaceUserResponse

type BatchReplaceUserResponse struct {
	// JobID 异步任务id,最大长度为64字节
	JobID string `json:"jobid"  `
}

BatchReplaceUserResponse is response of Client.BatchReplaceUser

type BatchSyncCallback

type BatchSyncCallback struct {
	// URL 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议
	URL string `json:"url"`
	// Token 用于生成签名
	Token string `json:"token"`
	// EncodingAesKey 用于消息体的加密,是AES密钥的Base64编码
	EncodingAesKey string `json:"encodingaeskey"`
}

type BatchSyncUserRequest

type BatchSyncUserRequest struct {
	// MediaID 上传的csv文件的media_id
	MediaID string `json:"media_id"  validate:"required"`
	// ToInvite 是否邀请新建的成员使用企业微信(将通过微信服务通知或短信或邮件下发邀请,每天自动下发一次,最多持续3个工作日),默认值为true。
	ToInvite bool `json:"to_invite"  `
	// Callback 回调信息。如填写该项则任务完成后,通过callback推送事件给企业。具体请参考应用回调模式中的相应选项
	Callback BatchSyncCallback `json:"callback"  `
}

BatchSyncUserRequest is request of Client.BatchSyncUser

type BatchSyncUserResponse

type BatchSyncUserResponse struct {
	// JobID 异步任务id,最大长度为64字节
	JobID string `json:"jobid"  `
}

BatchSyncUserResponse is response of Client.BatchSyncUser

type CancelAuthPushEvent

type CancelAuthPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权方企业的corpid
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// InfoType cancel_auth
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用的SuiteId
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

CancelAuthPushEvent 当授权方(即授权企业)在企业微信管理端的授权管理中,取消了对应用的授权托管后,企业微信后台会推送取消授权通知。

func (CancelAuthPushEvent) EventType

func (CancelAuthPushEvent) EventType() string

EventType impl EventModel

type ChangeAuthPushEvent

type ChangeAuthPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权方的corpid
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// InfoType change_auth
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用的SuiteId
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

ChangeAuthPushEvent 当授权方(即授权企业)在企业微信管理端的授权管理中,修改了对应用的授权后,企业微信服务器推送变更授权通知。服务商接收到变更通知之后,需自行调用获取企业授权信息进行授权内容变更比对。

func (ChangeAuthPushEvent) EventType

func (ChangeAuthPushEvent) EventType() string

EventType impl EventModel

type ChangeContactCreatePartyPushEvent

type ChangeContactCreatePartyPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// ChangeType 此时固定为create_party
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// CreateTime 消息创建时间 (整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件的类型,此时固定为change_contact
	Event string `xml:"Event" json:"Event"`
	// FromUsername 此事件该值固定为sys,表示该消息由系统生成
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// ID 部门Id
	ID string `xml:"Id" json:"Id"`
	// MsgType 消息的类型,此时固定为event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// Name 部门名称
	Name string `xml:"Name" json:"Name"`
	// Order 部门排序
	Order string `xml:"Order" json:"Order"`
	// ParentID 父部门id
	ParentID string `xml:"ParentId" json:"ParentId"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

ChangeContactCreatePartyPushEvent 通讯录变更事件 当企业通过通讯录助手开通通讯录权限后,成员的变更会通知给企业。变更的事件,将推送到企业微信管理端通讯录助手中的‘接收事件服务器’。由通讯录同步助手调用接口触发的变更事件不回调通讯录同步助手本身。管理员在管理端更改组织架构或者成员信息以及企业微信的成员在客户端变更自己的个人信息将推送给通讯录同步助手。第三方通讯录变更事件参见第三方回调协议

see https://work.weixin.qq.com/api/doc/90000/90135/90240

func (ChangeContactCreatePartyPushEvent) EventChangeType

func (ChangeContactCreatePartyPushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeContactCreatePartyPushEvent) EventType

EventType impl EventModel

func (ChangeContactCreatePartyPushEvent) MessageType

MessageType impl MessageModel

type ChangeContactCreateUserPushEvent

type ChangeContactCreateUserPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// Avatar 头像url。注:如果要获取小图将url最后的”/0”改成”/100”即可,仅通讯录管理应用可获取
	Avatar string `xml:"Avatar" json:"Avatar"`
	// ChangeType 固定为create_user
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// Department 更新后成员所在部门列表
	Department string `xml:"Department" json:"Department"`
	// Email 邮箱,仅通讯录管理应用可获取
	Email string `xml:"Email" json:"Email"`
	// EnglishName 英文名
	EnglishName string `xml:"EnglishName" json:"EnglishName"`
	// ExtAttr 扩展属性,仅通讯录管理应用可获取
	ExtAttr string `xml:"ExtAttr" json:"ExtAttr"`
	// Gender 性别。1表示男性,2表示女性
	Gender string `xml:"Gender" json:"Gender"`
	// InfoType 固定为change_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// IsLeader 上级字段,标识是否为上级。0表示普通成员,1表示上级。仅通讯录管理应用可获取
	IsLeader string `xml:"IsLeader" json:"IsLeader"`
	// Mobile 手机号码,仅通讯录管理应用可获取
	Mobile string `xml:"Mobile" json:"Mobile"`
	// Name 成员名称
	Name string `xml:"Name" json:"Name"`
	// Position 职位信息。长度为0~64个字节,仅通讯录管理应用可获取
	Position string `xml:"Position" json:"Position"`
	// Status 激活状态:1=激活或关注, 2=禁用, 4=未激活 已激活代表已激活企业微信或已关注微工作台(原企业号)。未激活代表既未激活企业微信又未关注微工作台(原企业号)
	Status string `xml:"Status" json:"Status"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Telephone 座机,仅通讯录管理应用可获取
	Telephone string `xml:"Telephone" json:"Telephone"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UserID 成员UserID
	UserID string `xml:"UserID" json:"UserID"`
}

func (ChangeContactCreateUserPushEvent) EventChangeType

func (ChangeContactCreateUserPushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeContactCreateUserPushEvent) EventType

EventType impl EventModel

type ChangeContactDeletePartyPushEvent

type ChangeContactDeletePartyPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 固定为delete_party
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ID 部门Id
	ID string `xml:"Id" json:"Id"`
	// InfoType 固定为change_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

func (ChangeContactDeletePartyPushEvent) EventChangeType

func (ChangeContactDeletePartyPushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeContactDeletePartyPushEvent) EventType

EventType impl EventModel

type ChangeContactDeleteUserPushEvent

type ChangeContactDeleteUserPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 固定为delete_user
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// InfoType 固定为change_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UserID 变更信息的成员UserID
	UserID string `xml:"UserID" json:"UserID"`
}

func (ChangeContactDeleteUserPushEvent) EventChangeType

func (ChangeContactDeleteUserPushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeContactDeleteUserPushEvent) EventType

EventType impl EventModel

type ChangeContactExtAttr

type ChangeContactExtAttr struct {
	Item []ChangeContactExtAttrItem `xml:"Item"`
}

type ChangeContactExtAttrItem

type ChangeContactExtAttrItem struct {
	Name  string `xml:"Name"`
	Value string `xml:"Value"`
}

type ChangeContactUpdatePartyPushEvent

type ChangeContactUpdatePartyPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 固定为update_party
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ID 部门Id
	ID string `xml:"Id" json:"Id"`
	// InfoType 固定为change_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// Name 部门名称,仅当该字段发生变更时传递
	Name string `xml:"Name" json:"Name"`
	// ParentID 父部门id,仅当该字段发生变更时传递
	ParentID string `xml:"ParentId" json:"ParentId"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

func (ChangeContactUpdatePartyPushEvent) EventChangeType

func (ChangeContactUpdatePartyPushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeContactUpdatePartyPushEvent) EventType

EventType impl EventModel

type ChangeContactUpdateTagPushEvent

type ChangeContactUpdateTagPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AddPartyItems 标签中新增的部门id列表,用逗号分隔
	AddPartyItems string `xml:"AddPartyItems" json:"AddPartyItems"`
	// AddUserItems 标签中新增的成员userid列表,用逗号分隔
	AddUserItems string `xml:"AddUserItems" json:"AddUserItems"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 固定为update_tag
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// DelPartyItems 标签中删除的部门id列表,用逗号分隔
	DelPartyItems string `xml:"DelPartyItems" json:"DelPartyItems"`
	// DelUserItems 标签中删除的成员userid列表,用逗号分隔
	DelUserItems string `xml:"DelUserItems" json:"DelUserItems"`
	// InfoType 固定为change_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// TagID 标签Id
	TagID string `xml:"TagId" json:"TagId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

func (ChangeContactUpdateTagPushEvent) EventChangeType

func (ChangeContactUpdateTagPushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeContactUpdateTagPushEvent) EventType

EventType impl EventModel

type ChangeContactUpdateUserPushEvent

type ChangeContactUpdateUserPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// Avatar 头像url。注:如果要获取小图将url最后的”/0”改成”/100”即可。变更时推送,仅通讯录管理应用可获取
	Avatar string `xml:"Avatar" json:"Avatar"`
	// ChangeType 固定为update_user
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// Department 更新后成员所在部门列表
	Department string `xml:"Department" json:"Department"`
	// Email 邮箱,变更时推送 ,仅通讯录应用可获取
	Email string `xml:"Email" json:"Email"`
	// EnglishName 英文名
	EnglishName string `xml:"EnglishName" json:"EnglishName"`
	// ExtAttr 扩展属性,变更时推送,仅通讯录应用可获取
	ExtAttr string `xml:"ExtAttr" json:"ExtAttr"`
	// Gender 性别,变更时推送。1表示男性,2表示女性
	Gender string `xml:"Gender" json:"Gender"`
	// InfoType 固定为change_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// IsLeader 上级字段,标识是否为上级。0表示普通成员,1表示上级。仅通讯录管理应用可获取
	IsLeader string `xml:"IsLeader" json:"IsLeader"`
	// Mobile 手机号码,变更时推送,仅通讯录应用可获取
	Mobile string `xml:"Mobile" json:"Mobile"`
	// Name 成员名称,变更时推送
	Name string `xml:"Name" json:"Name"`
	// NewUserID 新的UserID,变更时推送(userid由系统生成时可更改一次)
	NewUserID string `xml:"NewUserID" json:"NewUserID"`
	// Position 职位信息。长度为0~64个字节,仅通讯录管理应用可获取
	Position string `xml:"Position" json:"Position"`
	// Status 激活状态:1=激活或关注, 2=禁用, 4=未激活(重新启用未激活用户或者退出企业并且取消关注时触发)
	Status string `xml:"Status" json:"Status"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Telephone 座机,仅通讯录应用可获取
	Telephone string `xml:"Telephone" json:"Telephone"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UserID 变更信息的成员UserID
	UserID string `xml:"UserID" json:"UserID"`
}

func (ChangeContactUpdateUserPushEvent) EventChangeType

func (ChangeContactUpdateUserPushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeContactUpdateUserPushEvent) EventType

EventType impl EventModel

type ChangeExternalChatCreatePushEvent

type ChangeExternalChatCreatePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为create
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ChatID 群ID
	ChatID string `xml:"ChatId" json:"ChatId"`
	// InfoType 固定为change_external_chat
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

ChangeExternalChatCreatePushEvent 客户群创建事件 有新增客户群时,回调该事件。收到该事件后,企业可以调用获取客户群详情接口获取客户群详情。

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalChatCreatePushEvent) EventChangeType

func (ChangeExternalChatCreatePushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeExternalChatCreatePushEvent) EventType

EventType impl EventModel

type ChangeExternalChatDismissPushEvent

type ChangeExternalChatDismissPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为dismiss
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ChatID 群ID
	ChatID string `xml:"ChatId" json:"ChatId"`
	// InfoType 固定为change_external_chat
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

ChangeExternalChatDismissPushEvent 客户群解散事件 当客户群被群主解散后,回调该事件。

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalChatDismissPushEvent) EventChangeType

func (ChangeExternalChatDismissPushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeExternalChatDismissPushEvent) EventType

EventType impl EventModel

type ChangeExternalChatUpdatePushEvent

type ChangeExternalChatUpdatePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为update
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ChatID 群ID
	ChatID string `xml:"ChatId" json:"ChatId"`
	// InfoType 固定为change_external_chat
	InfoType string `xml:"InfoType" json:"InfoType"`
	// JoinScene 当是成员入群时有值。表示成员的入群方式0 - 由成员邀请入群(包括直接邀请入群和通过邀请链接入群)3 - 通过扫描群二维码入群
	JoinScene string `xml:"JoinScene" json:"JoinScene"`
	// MemChangeCnt 当是成员入群或退群时有值。表示成员变更数量
	MemChangeCnt string `xml:"MemChangeCnt" json:"MemChangeCnt"`
	// QuitScene 当是成员退群时有值。表示成员的退群方式0 - 自己退群1 - 群主/群管理员移出
	QuitScene string `xml:"QuitScene" json:"QuitScene"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UpdateDetail 变更详情。目前有以下几种:add_member : 成员入群del_member : 成员退群 change_owner : 群主变更change_name : 群名变更change_notice : 群公告变更
	UpdateDetail string `xml:"UpdateDetail" json:"UpdateDetail"`
}

ChangeExternalChatUpdatePushEvent 客户群变更事件 客户群被修改后(群名变更,群成员增加或移除,群公告变更),回调该事件。收到该事件后,企业需要再调用获取客户群详情接口,以获取最新的群详情。

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalChatUpdatePushEvent) EventChangeType

func (ChangeExternalChatUpdatePushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeExternalChatUpdatePushEvent) EventType

EventType impl EventModel

type ChangeExternalContactAddExternalContactPushEvent

type ChangeExternalContactAddExternalContactPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为add_external_contact
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ExternalUserID 外部联系人的userid,注意不是企业成员的帐号
	ExternalUserID string `xml:"ExternalUserID" json:"ExternalUserID"`
	// InfoType 固定为change_external_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// State 添加此用户的「联系我」方式配置的state参数,可用于识别添加此用户的渠道
	State string `xml:"State" json:"State"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UserID 企业服务人员的UserID
	UserID string `xml:"UserID" json:"UserID"`
	// WelcomeCode 欢迎语code,可用于发送欢迎语
	WelcomeCode string `xml:"WelcomeCode" json:"WelcomeCode"`
}

ChangeExternalContactAddExternalContactPushEvent 添加企业客户事件 授权企业中配置了客户联系功能的成员添加外部联系人时,企业微信服务器会向应用的“指令回调URL”推送该事件

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalContactAddExternalContactPushEvent) EventChangeType

EventChangeType impl EventChangeModel

func (ChangeExternalContactAddExternalContactPushEvent) EventType

EventType impl EventModel

type ChangeExternalContactAddHalfExternalContactPushEvent

type ChangeExternalContactAddHalfExternalContactPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为add_half_external_contact
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ExternalUserID 外部联系人的userid,注意不是企业成员的帐号
	ExternalUserID string `xml:"ExternalUserID" json:"ExternalUserID"`
	// InfoType 固定为change_external_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// State 添加此用户的「联系我」方式配置的state参数,可用于识别添加此用户的渠道
	State string `xml:"State" json:"State"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UserID 企业服务人员的UserID
	UserID string `xml:"UserID" json:"UserID"`
	// WelcomeCode 欢迎语code,可用于发送欢迎语
	WelcomeCode string `xml:"WelcomeCode" json:"WelcomeCode"`
}

ChangeExternalContactAddHalfExternalContactPushEvent 外部联系人免验证添加成员事件 外部联系人添加了配置了客户联系功能且开启了免验证的成员时(此时成员尚未确认添加对方为好友),企业微信服务器会向应用的“指令回调URL”推送该事件

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalContactAddHalfExternalContactPushEvent) EventChangeType

EventChangeType impl EventChangeModel

func (ChangeExternalContactAddHalfExternalContactPushEvent) EventType

EventType impl EventModel

type ChangeExternalContactDelExternalContactPushEvent

type ChangeExternalContactDelExternalContactPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为del_external_contact
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ExternalUserID 外部联系人的userid,注意不是企业成员的帐号
	ExternalUserID string `xml:"ExternalUserID" json:"ExternalUserID"`
	// InfoType 固定为change_external_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UserID 企业服务人员的UserID
	UserID string `xml:"UserID" json:"UserID"`
}

ChangeExternalContactDelExternalContactPushEvent 删除企业客户事件 授权企业中配置了客户联系功能的成员删除外部联系人时,企业微信服务器会向应用的“指令回调URL”推送该事件

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalContactDelExternalContactPushEvent) EventChangeType

EventChangeType impl EventChangeModel

func (ChangeExternalContactDelExternalContactPushEvent) EventType

EventType impl EventModel

type ChangeExternalContactDelFollowUserPushEvent

type ChangeExternalContactDelFollowUserPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为del_follow_user
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ExternalUserID 外部联系人的userid,注意不是企业成员的帐号
	ExternalUserID string `xml:"ExternalUserID" json:"ExternalUserID"`
	// InfoType 固定为change_external_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UserID 企业服务人员的UserID
	UserID string `xml:"UserID" json:"UserID"`
}

ChangeExternalContactDelFollowUserPushEvent 删除跟进成员事件 授权企业中配置了客户联系功能的成员被外部联系人删除时,企业微信服务器会向应用的“指令回调URL”推送该事件

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalContactDelFollowUserPushEvent) EventChangeType

EventChangeType impl EventChangeModel

func (ChangeExternalContactDelFollowUserPushEvent) EventType

EventType impl EventModel

type ChangeExternalContactEditExternalContactPushEvent

type ChangeExternalContactEditExternalContactPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为edit_external_contact
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ExternalUserID 外部联系人的userid,注意不是企业成员的帐号
	ExternalUserID string `xml:"ExternalUserID" json:"ExternalUserID"`
	// InfoType 固定为change_external_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UserID 企业服务人员的UserID
	UserID string `xml:"UserID" json:"UserID"`
}

ChangeExternalContactEditExternalContactPushEvent 编辑企业客户事件 授权企业中配置了客户联系功能的成员编辑外部联系人的备注信息(不包括备注手机号码)或企业标签时,企业微信服务器会向应用的“指令回调URL”推送该事件,但仅修改外部联系人备注手机号时不会触发回调。

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalContactEditExternalContactPushEvent) EventChangeType

EventChangeType impl EventChangeModel

func (ChangeExternalContactEditExternalContactPushEvent) EventType

EventType impl EventModel

type ChangeExternalContactMessageAuditApproved

type ChangeExternalContactMessageAuditApproved struct {
	XMLName        xml.Name `xml:"xml"`
	ToUserName     string   `xml:"ToUserName"`
	FromUserName   string   `xml:"FromUserName"`
	CreateTime     int64    `xml:"CreateTime"`
	MsgType        string   `xml:"MsgType"` // 固定为event
	Event          string   `xml:"Event"`
	ChangeType     string   `xml:"ChangeType"`
	UserID         string   `xml:"UserID"`         // 企业服务人员的UserID
	ExternalUserID string   `xml:"ExternalUserID"` // 外部联系人的userid,注意不是企业成员的帐号
	WelcomeCode    string   `xml:"WelcomeCode"`    // 欢迎语code,可用于发送欢迎语
}

func (ChangeExternalContactMessageAuditApproved) EventChangeType

func (ChangeExternalContactMessageAuditApproved) EventType

type ChangeExternalContactTransferFailPushEvent

type ChangeExternalContactTransferFailPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为transfer_fail
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ExternalUserID 外部联系人的userid,注意不是企业成员的帐号
	ExternalUserID string `xml:"ExternalUserID" json:"ExternalUserID"`
	// FailReason 接替失败的原因, customer_refused-客户拒绝, customer_limit_exceed-接替成员的客户数达到上限
	FailReason string `xml:"FailReason" json:"FailReason"`
	// InfoType 固定为change_external_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
	// UserID 企业服务人员的UserID
	UserID string `xml:"UserID" json:"UserID"`
}

ChangeExternalContactTransferFailPushEvent 客户接替失败事件 企业将客户分配给新的成员接替后,当客户添加失败时,企业微信服务器会向应用的“指令回调URL”推送该事件

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalContactTransferFailPushEvent) EventChangeType

EventChangeType impl EventChangeModel

func (ChangeExternalContactTransferFailPushEvent) EventType

EventType impl EventModel

type ChangeExternalTagCreatePushEvent

type ChangeExternalTagCreatePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为create
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ID 标签或标签组的ID
	ID string `xml:"Id" json:"Id"`
	// InfoType 固定为change_external_tag
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// TagType 创建标签时,此项为tag,创建标签组时,此项为tag_group
	TagType string `xml:"TagType" json:"TagType"`
	// Timestamp unix时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

ChangeExternalTagCreatePushEvent 企业客户标签创建事件 企业/管理员创建客户标签/标签组时,企业微信服务器将向具有企业客户权限的第三方应用指令回调URL回调此事件。收到该事件后,第三方服务商需要调用获取企业标签库来获取标签/标签组的详细信息。

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalTagCreatePushEvent) EventChangeType

func (ChangeExternalTagCreatePushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeExternalTagCreatePushEvent) EventType

EventType impl EventModel

type ChangeExternalTagDeletePushEvent

type ChangeExternalTagDeletePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为delete
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ID 标签或标签组的ID
	ID string `xml:"Id" json:"Id"`
	// InfoType 固定为change_external_tag
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// TagType 删除标签时,此项为tag,删除标签组时,此项为tag_group
	TagType string `xml:"TagType" json:"TagType"`
	// Timestamp unix时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

ChangeExternalTagDeletePushEvent 企业客户标签删除事件 当企业客户标签/标签组被删除改时,企业微信服务器将向具有企业客户权限的第三方应用指令回调URL回调此事件。删除标签组时,该标签组下的所有标签将被同时删除,但不会进行回调。

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalTagDeletePushEvent) EventChangeType

func (ChangeExternalTagDeletePushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeExternalTagDeletePushEvent) EventType

EventType impl EventModel

type ChangeExternalTagUpdatePushEvent

type ChangeExternalTagUpdatePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 此时固定为update
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ID 标签或标签组的ID
	ID string `xml:"Id" json:"Id"`
	// InfoType 固定为change_external_tag
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// TagType 变更标签时,此项为tag,变更标签组时,此项为tag_group
	TagType string `xml:"TagType" json:"TagType"`
	// Timestamp unix时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

ChangeExternalTagUpdatePushEvent 企业客户标签变更事件 当企业客户标签/标签组被修改时,企业微信服务器将向具有企业客户权限的第三方应用指令回调URL回调此事件。收到该事件后,第三方服务商需要调用获取企业标签库来获取标签/标签组的详细信息。

see https://work.weixin.qq.com/api/doc/90001/90143/92277

func (ChangeExternalTagUpdatePushEvent) EventChangeType

func (ChangeExternalTagUpdatePushEvent) EventChangeType() string

EventChangeType impl EventChangeModel

func (ChangeExternalTagUpdatePushEvent) EventType

EventType impl EventModel

type ClickPushEvent

type ClickPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型:click
	Event string `xml:"Event" json:"Event"`
	// EventKey 事件KEY值,与自定义菜单接口中KEY值对应
	EventKey string `xml:"EventKey" json:"EventKey"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

ClickPushEvent 菜单事件 成员点击自定义菜单后,企业微信会把点击事件推送给应用。点击菜单弹出子菜单,不会产生上报。企业微信iPhone1.2.2/Android1.2.2版本开始支持菜单事件,旧版本企业微信成员点击后将没有回应,应用不能正常接收到事件推送。自定义菜单可以在管理后台的应用设置界面配置。

see https://work.weixin.qq.com/api/doc/90000/90135/90240

func (ClickPushEvent) EventType

func (ClickPushEvent) EventType() string

EventType impl EventModel

func (ClickPushEvent) MessageType

func (ClickPushEvent) MessageType() string

MessageType impl MessageModel

type Client

type Client struct {
	Conf          Conf
	Request       req.Request
	TokenProvider TokenProvider
}

Client of Wecom/WechatWork/企业微信

func FromContext

func FromContext(ctx context.Context) *Client

func NewClient

func NewClient(conf Conf) *Client

NewClient create a new Client

Example
// token store - 默认内存 Map - 可以使用数据库实现
store := &wecom.SyncMapStore{}
// 加载缓存 - 复用之前的 Token
if bytes, err := os.ReadFile("wecom-cache.json"); err == nil {
	_ = store.Restore(bytes)
}
// 当 Token 变化时生成缓存文件
store.OnChange = func(s *wecom.SyncMapStore) {
	_ = os.WriteFile("wecom-cache.json", s.Dump(), 0o600)
}

client := wecom.NewClient(wecom.Conf{
	CorpID:     "",
	AgentID:    0,
	CorpSecret: "",
	// 不配置默认使用 内存缓存
	TokenProvider: &wecom.TokenCache{
		Store: store,
	},
})

// 访问接口会自动获取或使用当前缓存
token, err := client.AccessToken()
if err != nil {
	panic(err)
}
fmt.Println("Token", token)
ticket, err := client.JsAPITicket()
if err != nil {
	panic(err)
}
fmt.Println("Ticket", ticket)

// 访问没有实现的接口
dto := wecom.IPListResponse{}
err = client.Request.With(req.Request{
	URL:     "/cgi-bin/get_api_domain_ip",
	Options: []interface{}{
		// 如果不需要 access_token
		// wecom.WithoutAccessToken,
	},
}).Fetch(&dto)
if err != nil {
	panic(err)
}
fmt.Println("response", dto)
Output:

func (*Client) AccessToken

func (c *Client) AccessToken() (string, error)

AccessToken request or return cached AccessToken

func (*Client) AddCalendar

func (c *Client) AddCalendar(r *AddCalendarRequest, opts ...interface{}) (out AddCalendarResponse, err error)

AddCalendar 创建日历 该接口用于通过应用在企业内创建一个日历。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93647

func (*Client) AddContactWay

func (c *Client) AddContactWay(r *AddContactWayRequest, opts ...interface{}) (out AddContactWayResponse, err error)

AddContactWay 配置客户联系「联系我」方式 企业可以在管理后台-客户联系-加客户中配置成员的「联系我」的二维码或者小程序按钮,客户通过扫描二维码或点击小程序上的按钮,即可获取成员联系方式,主动联系到成员。企业可通过此接口为具有客户联系功能的成员生成专属的「联系我」二维码或者「联系我」按钮。如果配置的是「联系我」按钮,需要开发者的小程序接入小程序插件。

see https://work.weixin.qq.com/api/doc/90001/90143/92577

func (*Client) AddCorpTag

func (c *Client) AddCorpTag(r *AddCorpTagRequest, opts ...interface{}) (out AddCorpTagResponse, err error)

AddCorpTag 添加企业客户标签 企业可通过此接口向客户标签库中添加新的标签组和标签,每个企业最多可配置3000个企业标签。

see https://work.weixin.qq.com/api/doc/90001/90143/92696

func (*Client) AddGroupWelcomeTemplate

func (c *Client) AddGroupWelcomeTemplate(r *AddGroupWelcomeTemplateRequest, opts ...interface{}) (out AddGroupWelcomeTemplateResponse, err error)

AddGroupWelcomeTemplate 添加入群欢迎语素材 企业可通过此API向企业的入群欢迎语素材库中添加素材。每个企业的入群欢迎语素材库中,最多容纳100个素材。

see https://work.weixin.qq.com/api/doc/90001/90143/93438

func (*Client) AddMessageTemplate

func (c *Client) AddMessageTemplate(r *AddMessageTemplateRequest, opts ...interface{}) (out AddMessageTemplateResponse, err error)

AddMessageTemplate 创建企业群发 企业跟第三方应用可通过此接口添加企业群发消息的任务并通知成员发送给相关客户或客户群。(注:企业微信终端需升级到2.7.5版本及以上)注意:调用该接口并不会直接发送消息给客户/客户群,需要成员确认后才会执行发送(客服人员的企业微信需要升级到2.7.5及以上版本)旧接口创建企业群发已经废弃,接口升级后支持发送视频文件,并且支持最多同时发送9个附件。同一个企业每个自然月内仅可针对一个客户/客户群发送4条消息,超过接收上限的客户将无法再收到群发消息。

see https://work.weixin.qq.com/api/doc/90001/90143/92698

func (*Client) AddSchedule

func (c *Client) AddSchedule(r *AddScheduleRequest, opts ...interface{}) (out AddScheduleResponse, err error)

AddSchedule 创建日程 该接口用于在日历中创建一个日程。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93648

func (*Client) AddTagUsers

func (c *Client) AddTagUsers(r *AddTagUsersRequest, opts ...interface{}) (out AddTagUsersResponse, err error)

AddTagUsers 增加标签成员

see https://work.weixin.qq.com/api/doc/90000/90135/90214

func (*Client) AgentTicket

func (c *Client) AgentTicket() (string, error)

AgentTicket request or return cached AgentTicket

func (*Client) AuthCorpAccessToken

func (c *Client) AuthCorpAccessToken() (string, error)

AuthCorpAccessToken request or return cached AuthCorpAccessToken

func (*Client) AuthSuccess

func (c *Client) AuthSuccess(r *AuthSuccessRequest, opts ...interface{}) (out GenericResponse, err error)

AuthSuccess 二次验证 此接口可以满足安全性要求高的企业进行成员验证。开启二次验证后,当且仅当成员登录时,需跳转至企业自定义的页面进行验证。验证频率可在设置页面选择。开启二次验证方法如下图:企业在开启二次验证时,必须在管理端填写企业二次验证页面的url。当成员登录企业微信或关注微工作台(原企业号)进入企业时,会自动跳转到企业的验证页面。在跳转到企业的验证页面时,会带上如下参数:code=CODE。企业收到code后,使用“通讯录同步助手”调用接口“根据code获取成员信息”获取成员的userid。如果成员是首次加入企业,企业获取到userid,并验证了成员信息后,调用如下接口即可让成员成功加入企业。

see https://work.weixin.qq.com/api/doc/90000/90135/90203

func (*Client) BatchDeleteUser

func (c *Client) BatchDeleteUser(r *BatchDeleteUserRequest, opts ...interface{}) (out GenericResponse, err error)

BatchDeleteUser 批量删除成员

see https://work.weixin.qq.com/api/doc/90000/90135/90199

func (*Client) BatchGetByUser

func (c *Client) BatchGetByUser(r *BatchGetByUserRequest, opts ...interface{}) (out BatchGetByUserResponse, err error)

BatchGetByUser 批量获取客户详情 企业/第三方可通过此接口获取指定成员添加的客户信息列表。

see https://work.weixin.qq.com/api/doc/90001/90143/93010

func (*Client) BatchGetResult

func (c *Client) BatchGetResult(r *BatchGetResultRequest, opts ...interface{}) (out BatchGetResultResponse, err error)

BatchGetResult 获取异步任务结果

see https://work.weixin.qq.com/api/doc/90000/90135/90983

func (*Client) BatchInvite

func (c *Client) BatchInvite(r *BatchInviteRequest, opts ...interface{}) (out BatchInviteResponse, err error)

BatchInvite 邀请成员 企业可通过接口批量邀请成员使用企业微信,邀请后将通过短信或邮件下发通知。

see https://work.weixin.qq.com/api/doc/90000/90135/90975

func (*Client) BatchReplaceParty

func (c *Client) BatchReplaceParty(r *BatchReplacePartyRequest, opts ...interface{}) (out BatchReplacePartyResponse, err error)

BatchReplaceParty 全量覆盖部门 本接口以partyid为键,全量覆盖企业的通讯录组织架构,任务完成后企业的通讯录组织架构与提交的文件完全保持一致。请先下载CSV文件(下载全量覆盖部门模版),根据需求填写文件内容。

see https://work.weixin.qq.com/api/doc/90000/90135/90982

func (*Client) BatchReplaceUser

func (c *Client) BatchReplaceUser(r *BatchReplaceUserRequest, opts ...interface{}) (out BatchReplaceUserResponse, err error)

BatchReplaceUser 全量覆盖成员 本接口以userid为主键,全量覆盖企业的通讯录成员,任务完成后企业的通讯录成员与提交的文件完全保持一致。请先下载CSV文件(下载全量覆盖成员模版),根据需求填写文件内容。

see https://work.weixin.qq.com/api/doc/90000/90135/90981

func (*Client) BatchSyncUser

func (c *Client) BatchSyncUser(r *BatchSyncUserRequest, opts ...interface{}) (out BatchSyncUserResponse, err error)

BatchSyncUser 增量更新成员 本接口以userid(帐号)为主键,增量更新企业微信通讯录成员。请先下载CSV模板(下载增量更新成员模版),根据需求填写文件内容。

see https://work.weixin.qq.com/api/doc/90000/90135/90980

func (*Client) CloseTempChat

func (c *Client) CloseTempChat(r *CloseTempChatRequest, opts ...interface{}) (out GenericResponse, err error)

CloseTempChat 结束临时会话 将指定的企业成员和客户之前的临时会话断开,断开前会自动下发已配置的结束语。

see https://work.weixin.qq.com/api/doc/90001/90143/92577

func (*Client) ConvertToOpenID

func (c *Client) ConvertToOpenID(r *ConvertToOpenIDRequest, opts ...interface{}) (out ConvertToOpenIDResponse, err error)

ConvertToOpenID userid与openid互换 userid转openid

see https://work.weixin.qq.com/api/doc/90000/90135/90202

func (*Client) CreateDepartment

func (c *Client) CreateDepartment(r *CreateDepartmentRequest, opts ...interface{}) (out CreateDepartmentResponse, err error)

CreateDepartment 创建部门

see https://work.weixin.qq.com/api/doc/90000/90135/90205

func (*Client) CreateTag

func (c *Client) CreateTag(r *CreateTagRequest, opts ...interface{}) (out CreateTagResponse, err error)

CreateTag 创建标签

see https://work.weixin.qq.com/api/doc/90000/90135/90210

func (*Client) CreateUser

func (c *Client) CreateUser(r *CreateUserRequest, opts ...interface{}) (out GenericResponse, err error)

CreateUser 创建成员

see https://work.weixin.qq.com/api/doc/90000/90135/90195

func (*Client) DeleteCalendar

func (c *Client) DeleteCalendar(r *DeleteCalendarRequest, opts ...interface{}) (out GenericResponse, err error)

DeleteCalendar 删除日历 该接口用于删除指定日历。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93647

func (*Client) DeleteContactWay

func (c *Client) DeleteContactWay(r *DeleteContactWayRequest, opts ...interface{}) (out GenericResponse, err error)

DeleteContactWay 删除企业已配置的「联系我」方式 删除一个已配置的「联系我」二维码或者「联系我」小程序按钮。

see https://work.weixin.qq.com/api/doc/90001/90143/92577

func (*Client) DeleteCorpTag

func (c *Client) DeleteCorpTag(r *DeleteCorpTagRequest, opts ...interface{}) (out GenericResponse, err error)

DeleteCorpTag 删除企业客户标签 企业可通过此接口删除客户标签库中的标签,或删除整个标签组。

see https://work.weixin.qq.com/api/doc/90001/90143/92696

func (*Client) DeleteDepartment

func (c *Client) DeleteDepartment(r *DeleteDepartmentRequest, opts ...interface{}) (out GenericResponse, err error)

DeleteDepartment 删除部门

see https://work.weixin.qq.com/api/doc/90000/90135/90207

func (*Client) DeleteGroupWelcomeTemplate

func (c *Client) DeleteGroupWelcomeTemplate(r *DeleteGroupWelcomeTemplateRequest, opts ...interface{}) (out GenericResponse, err error)

DeleteGroupWelcomeTemplate 删除入群欢迎语素材 企业可通过此API删除入群欢迎语素材,且仅能删除调用方自己创建的入群欢迎语素材。

see https://work.weixin.qq.com/api/doc/90001/90143/93438

func (*Client) DeleteSchedule

func (c *Client) DeleteSchedule(r *DeleteScheduleRequest, opts ...interface{}) (out GenericResponse, err error)

DeleteSchedule 取消日程 该接口用于取消指定的日程。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93648

func (*Client) DeleteTag

func (c *Client) DeleteTag(r *DeleteTagRequest, opts ...interface{}) (out GenericResponse, err error)

DeleteTag 删除标签

see https://work.weixin.qq.com/api/doc/90000/90135/90212

func (*Client) DeleteTagUsers

func (c *Client) DeleteTagUsers(r *DeleteTagUsersRequest, opts ...interface{}) (out DeleteTagUsersResponse, err error)

DeleteTagUsers 删除标签成员

see https://work.weixin.qq.com/api/doc/90000/90135/90215

func (*Client) DeleteUser

func (c *Client) DeleteUser(r *DeleteUserRequest, opts ...interface{}) (out GenericResponse, err error)

DeleteUser 删除成员

see https://work.weixin.qq.com/api/doc/90000/90135/90198

func (*Client) EditCorpTag

func (c *Client) EditCorpTag(r *EditCorpTagRequest, opts ...interface{}) (out GenericResponse, err error)

EditCorpTag 编辑企业客户标签 企业可通过此接口编辑客户标签/标签组的名称或次序值。

see https://work.weixin.qq.com/api/doc/90001/90143/92696

func (*Client) EditGroupWelcomeTemplate

func (c *Client) EditGroupWelcomeTemplate(r *EditGroupWelcomeTemplateRequest, opts ...interface{}) (out GenericResponse, err error)

EditGroupWelcomeTemplate 编辑入群欢迎语素材 企业可通过此API编辑入群欢迎语素材库中的素材,且仅能够编辑调用方自己创建的入群欢迎语素材。

see https://work.weixin.qq.com/api/doc/90001/90143/93438

func (*Client) ExportDepartment

func (c *Client) ExportDepartment(r *ExportDepartmentRequest, opts ...interface{}) (out ExportDepartmentResponse, err error)

ExportDepartment 导出部门

see https://work.weixin.qq.com/api/doc/90000/90135/94852

func (*Client) ExportGetResult

func (c *Client) ExportGetResult(r *ExportGetResultRequest, opts ...interface{}) (out ExportGetResultResponse, err error)

ExportGetResult 接口定义

see https://work.weixin.qq.com/api/doc/90000/90135/94854

func (*Client) ExportSimpleUser

func (c *Client) ExportSimpleUser(r *ExportSimpleUserRequest, opts ...interface{}) (out ExportSimpleUserResponse, err error)

ExportSimpleUser 导出成员

see https://work.weixin.qq.com/api/doc/90000/90135/94849

func (*Client) ExportTagUser

func (c *Client) ExportTagUser(r *ExportTagUserRequest, opts ...interface{}) (out ExportTagUserResponse, err error)

ExportTagUser 导出标签成员

see https://work.weixin.qq.com/api/doc/90000/90135/94853

func (*Client) ExportUser

func (c *Client) ExportUser(r *ExportUserRequest, opts ...interface{}) (out ExportUserResponse, err error)

ExportUser 导出成员详情

see https://work.weixin.qq.com/api/doc/90000/90135/94851

func (*Client) GetAPIDomainIP

func (c *Client) GetAPIDomainIP() (out IPListResponse, err error)

func (*Client) GetActiveStat

func (c *Client) GetActiveStat(r *GetActiveStatRequest, opts ...interface{}) (out GetActiveStatResponse, err error)

GetActiveStat 获取企业活跃成员数

see https://work.weixin.qq.com/api/doc/90000/90135/92714

func (*Client) GetAgent

func (c *Client) GetAgent(r *GetAgentRequest, opts ...interface{}) (out GetAgentResponse, err error)

GetAgent 获取指定的应用详情 对于互联企业的应用,如果需要获取应用可见范围内其他互联企业的部门与成员,请调用互联企业-获取应用可见范围接口

see https://work.weixin.qq.com/api/doc/90001/90143/90363

func (*Client) GetAgentTicket

func (c *Client) GetAgentTicket() (out TicketResponse, err error)

GetAgentTicket request a AgentTicket

func (*Client) GetCalendar

func (c *Client) GetCalendar(r *GetCalendarRequest, opts ...interface{}) (out GetCalendarResponse, err error)

GetCalendar 获取日历详情 该接口用于获取应用在企业内创建的日历信息。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93647

func (*Client) GetCallbackIP

func (c *Client) GetCallbackIP() (out IPListResponse, err error)

GetCallbackIP 获取企业微信服务器的ip段

func (*Client) GetContactWay

func (c *Client) GetContactWay(r *GetContactWayRequest, opts ...interface{}) (out GetContactWayResponse, err error)

GetContactWay 获取企业已配置的「联系我」方式 获取企业配置的「联系我」二维码和「联系我」小程序按钮。

see https://work.weixin.qq.com/api/doc/90001/90143/92577

func (*Client) GetCorpTagList

func (c *Client) GetCorpTagList(r *GetCorpTagListRequest, opts ...interface{}) (out GetCorpTagListResponse, err error)

GetCorpTagList 获取企业标签库 企业可通过此接口获取企业客户标签详情。

see https://work.weixin.qq.com/api/doc/90001/90143/92696

func (*Client) GetExternalContact

func (c *Client) GetExternalContact(r *GetExternalContactRequest, opts ...interface{}) (out GetExternalContactResponse, err error)

GetExternalContact 获取客户详情 企业可通过此接口,根据外部联系人的userid(如何获取?),拉取客户详情。

see https://work.weixin.qq.com/api/doc/90001/90143/92265

func (*Client) GetFollowUserList

func (c *Client) GetFollowUserList(opts ...interface{}) (out GetFollowUserListResponse, err error)

GetFollowUserList 获取配置了客户联系功能的成员列表 企业和第三方服务商可通过此接口获取配置了客户联系功能的成员列表。

see https://work.weixin.qq.com/api/doc/90001/90143/92576

func (*Client) GetGroupChat

func (c *Client) GetGroupChat(r *GetGroupChatRequest, opts ...interface{}) (out GetGroupChatResponse, err error)

GetGroupChat 获取客户群详情 通过客户群ID,获取详情。包括群名、群成员列表、群成员入群时间、入群方式。(客户群是由具有客户群使用权限的成员创建的外部群)

see https://work.weixin.qq.com/api/doc/90001/90143/92707

func (*Client) GetGroupMessageListV2

func (c *Client) GetGroupMessageListV2(r *GetGroupMessageListV2Request, opts ...interface{}) (out GetGroupMessageListV2Response, err error)

GetGroupMessageListV2 获取群发记录列表 企业和第三方应用可通过此接口获取企业与成员的群发记录。

see https://work.weixin.qq.com/api/doc/90001/90143/93439

func (*Client) GetGroupMessageSendResult

func (c *Client) GetGroupMessageSendResult(r *GetGroupMessageSendResultRequest, opts ...interface{}) (out GetGroupMessageSendResultResponse, err error)

GetGroupMessageSendResult 获取企业群发成员执行结果

see https://work.weixin.qq.com/api/doc/90001/90143/93439

func (*Client) GetGroupMessageTask

func (c *Client) GetGroupMessageTask(r *GetGroupMessageTaskRequest, opts ...interface{}) (out GetGroupMessageTaskResponse, err error)

GetGroupMessageTask 获取群发成员发送任务列表

see https://work.weixin.qq.com/api/doc/90001/90143/93439

func (*Client) GetGroupWelcomeTemplate

func (c *Client) GetGroupWelcomeTemplate(r *GetGroupWelcomeTemplateRequest, opts ...interface{}) (out GetGroupWelcomeTemplateResponse, err error)

GetGroupWelcomeTemplate 获取入群欢迎语素材 企业可通过此API获取入群欢迎语素材。

see https://work.weixin.qq.com/api/doc/90001/90143/93438

func (*Client) GetJoinQrcode

func (c *Client) GetJoinQrcode(r *GetJoinQrcodeRequest, opts ...interface{}) (out GetJoinQrcodeResponse, err error)

GetJoinQrcode 获取加入企业二维码 支持企业用户获取实时成员加入二维码。

see https://work.weixin.qq.com/api/doc/90000/90135/91714

func (*Client) GetJsAPITicket

func (c *Client) GetJsAPITicket() (out TicketResponse, err error)

GetJsAPITicket request a JsAPITicket

func (*Client) GetMomentComments

func (c *Client) GetMomentComments(r *GetMomentCommentsRequest, opts ...interface{}) (out GetMomentCommentsResponse, err error)

GetMomentComments 获取客户朋友圈的互动数据 企业和第三方应用可通过此接口获取客户朋友圈的互动数据。

see https://work.weixin.qq.com/api/doc/90001/90143/93443

func (*Client) GetMomentCustomerList

func (c *Client) GetMomentCustomerList(r *GetMomentCustomerListRequest, opts ...interface{}) (out GetMomentCustomerListResponse, err error)

GetMomentCustomerList 获取客户朋友圈发表时选择的可见范围 企业和第三方应用可通过该接口获取客户朋友圈创建时,选择的客户可见范围

see https://work.weixin.qq.com/api/doc/90001/90143/93443

func (*Client) GetMomentList

func (c *Client) GetMomentList(r *GetMomentListRequest, opts ...interface{}) (out GetMomentListResponse, err error)

GetMomentList 获取企业全部的发表列表 企业和第三方应用可通过该接口获取企业全部的发表内容。

see https://work.weixin.qq.com/api/doc/90001/90143/93443

func (*Client) GetMomentSendResult

func (c *Client) GetMomentSendResult(r *GetMomentSendResultRequest, opts ...interface{}) (out GetMomentSendResultResponse, err error)

GetMomentSendResult 获取客户朋友圈发表后的可见客户列表 企业和第三方应用可通过该接口获取客户朋友圈发表后,可在微信朋友圈中查看的客户列表

see https://work.weixin.qq.com/api/doc/90001/90143/93443

func (*Client) GetMomentTask

func (c *Client) GetMomentTask(r *GetMomentTaskRequest, opts ...interface{}) (out GetMomentTaskResponse, err error)

GetMomentTask 获取客户朋友圈企业发表的列表 企业和第三方应用可通过该接口获取企业发表的朋友圈成员执行情况

see https://work.weixin.qq.com/api/doc/90001/90143/93443

func (*Client) GetProviderToken

func (c *Client) GetProviderToken() (out ProviderTokenResponse, err error)

func (*Client) GetSchedule

func (c *Client) GetSchedule(r *GetScheduleRequest, opts ...interface{}) (out GetScheduleResponse, err error)

GetSchedule 获取日程详情 该接口用于获取指定的日程详情。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93648

func (*Client) GetTag

func (c *Client) GetTag(r *GetTagRequest, opts ...interface{}) (out GetTagResponse, err error)

GetTag 获取标签成员

see https://work.weixin.qq.com/api/doc/90000/90135/90213

func (*Client) GetToken

func (c *Client) GetToken() (out TokenResponse, err error)

GetToken request an access_token

func (*Client) GetUnassignedList

func (c *Client) GetUnassignedList(r *GetUnassignedListRequest, opts ...interface{}) (out GetUnassignedListResponse, err error)

GetUnassignedList 获取待分配的离职成员列表 企业和第三方可通过此接口,获取所有离职成员的客户列表,并可进一步调用分配离职成员的客户接口将这些客户重新分配给其他企业成员。

see https://work.weixin.qq.com/api/doc/90001/90143/92273

func (*Client) GetUser

func (c *Client) GetUser(r *GetUserRequest, opts ...interface{}) (out GetUserResponse, err error)

GetUser 读取成员 在通讯录同步助手中此接口可以读取企业通讯录的所有成员的信息,而自建应用可以读取该应用设置的可见范围内的成员信息。

see https://work.weixin.qq.com/api/doc/90000/90135/90196

func (*Client) GetUserBehaviorData

func (c *Client) GetUserBehaviorData(r *GetUserBehaviorDataRequest, opts ...interface{}) (out GetUserBehaviorDataResponse, err error)

GetUserBehaviorData 获取「联系客户统计」数据 企业可通过此接口获取成员联系客户的数据,包括发起申请数、新增客户数、聊天数、发送消息数和删除/拉黑成员的客户数等指标。

see https://work.weixin.qq.com/api/doc/90001/90143/92275

func (*Client) GetUserInfo

func (c *Client) GetUserInfo(r *GetUserInfoRequest) (out GetUserInfoResponse, err error)

GetUserInfo

see https://work.weixin.qq.com/api/doc/90000/90135/91023

func (*Client) GetWorkbenchTemplate

func (c *Client) GetWorkbenchTemplate(r *GetWorkbenchTemplateRequest, opts ...interface{}) (out GetWorkbenchTemplateResponse, err error)

GetWorkbenchTemplate 获取应用在工作台展示的模版

see https://work.weixin.qq.com/api/doc/90001/90143/94620

func (*Client) GroupChatStatistic

func (c *Client) GroupChatStatistic(r *GroupChatStatisticRequest, opts ...interface{}) (out GroupChatStatisticResponse, err error)

GroupChatStatistic 按群主聚合的方式

see https://work.weixin.qq.com/api/doc/90001/90143/93476

func (*Client) JsAPITicket

func (c *Client) JsAPITicket() (string, error)

JsAPITicket request or return cached JsAPITicket

func (*Client) LinkGetPermList

func (c *Client) LinkGetPermList(opts ...interface{}) (out LinkGetPermListResponse, err error)

LinkGetPermList 获取应用的可见范围 本接口只返回互联企业中非本企业内的成员和部门的信息,如果要获取本企业的可见范围,请调用“获取应用”接口

see https://work.weixin.qq.com/api/doc/90000/90135/93172

func (*Client) LinkGetUser

func (c *Client) LinkGetUser(r *LinkGetUserRequest, opts ...interface{}) (out LinkGetUserResponse, err error)

LinkGetUser 获取互联企业成员详细信息

see https://work.weixin.qq.com/api/doc/90000/90135/93171

func (*Client) LinkListDepartment

func (c *Client) LinkListDepartment(r *LinkListDepartmentRequest, opts ...interface{}) (out LinkListDepartmentResponse, err error)

LinkListDepartment 获取互联企业部门列表

see https://work.weixin.qq.com/api/doc/90000/90135/93170

func (*Client) LinkListUser

func (c *Client) LinkListUser(r *LinkListUserRequest, opts ...interface{}) (out LinkListUserResponse, err error)

LinkListUser 获取互联企业部门成员详情

see https://work.weixin.qq.com/api/doc/90000/90135/93169

func (*Client) LinkSimpleListUser

func (c *Client) LinkSimpleListUser(r *LinkSimpleListUserRequest, opts ...interface{}) (out LinkSimpleListUserResponse, err error)

LinkSimpleListUser 获取互联企业部门成员

see https://work.weixin.qq.com/api/doc/90000/90135/93168

func (*Client) ListAgent

func (c *Client) ListAgent(opts ...interface{}) (out ListAgentResponse, err error)

ListAgent 获取access_token对应的应用列表

see https://work.weixin.qq.com/api/doc/90001/90143/90363

func (*Client) ListDepartment

func (c *Client) ListDepartment(r *ListDepartmentRequest, opts ...interface{}) (out ListDepartmentResponse, err error)

ListDepartment 获取部门列表

see https://work.weixin.qq.com/api/doc/90000/90135/90208

func (*Client) ListExternalContact

func (c *Client) ListExternalContact(r *ListExternalContactRequest, opts ...interface{}) (out ListExternalContactResponse, err error)

ListExternalContact 获取客户列表 企业可通过此接口获取指定成员添加的客户列表。客户是指配置了客户联系功能的成员所添加的外部联系人。没有配置客户联系功能的成员,所添加的外部联系人将不会作为客户返回。

see https://work.weixin.qq.com/api/doc/90001/90143/92264

func (*Client) ListGroupChat

func (c *Client) ListGroupChat(r *ListGroupChatRequest, opts ...interface{}) (out ListGroupChatResponse, err error)

ListGroupChat 获取客户群列表 该接口用于获取配置过客户群管理的客户群列表。

see https://work.weixin.qq.com/api/doc/90001/90143/93414

func (*Client) ListTag

func (c *Client) ListTag(opts ...interface{}) (out ListTagResponse, err error)

ListTag 获取标签列表

see https://work.weixin.qq.com/api/doc/90000/90135/90216

func (*Client) ListUser

func (c *Client) ListUser(r *ListUserRequest, opts ...interface{}) (out ListUserResponse, err error)

ListUser 获取部门成员详情

see https://work.weixin.qq.com/api/doc/90000/90135/90201

func (*Client) MarkTagExternalContact

func (c *Client) MarkTagExternalContact(r *MarkTagExternalContactRequest, opts ...interface{}) (out GenericResponse, err error)

MarkTagExternalContact 编辑客户企业标签 企业可通过此接口为指定成员的客户添加上由企业统一配置的标签。

see https://work.weixin.qq.com/api/doc/90001/90143/92697

func (*Client) MessageAuditCheckRoomAgree

func (c *Client) MessageAuditCheckRoomAgree(r *MessageAuditCheckRoomAgreeRequest, opts ...interface{}) (out MessageAuditCheckRoomAgreeResponse, err error)

MessageAuditCheckRoomAgree 获取会话同意情况 企业可通过下述接口,获取会话中外部成员的同意情况

see https://work.weixin.qq.com/api/doc/90000/90135/91782

func (*Client) MessageAuditCheckSingleAgree

func (c *Client) MessageAuditCheckSingleAgree(r *MessageAuditCheckSingleAgreeRequest, opts ...interface{}) (out MessageAuditCheckSingleAgreeResponse, err error)

MessageAuditCheckSingleAgree 获取会话同意情况 企业可通过下述接口,获取会话中外部成员的同意情况

see https://work.weixin.qq.com/api/doc/90000/90135/91782

func (*Client) MessageAuditGetGroupChat

func (c *Client) MessageAuditGetGroupChat(r *MessageAuditGetGroupChatRequest, opts ...interface{}) (out MessageAuditGetGroupChatResponse, err error)

MessageAuditGetGroupChat 获取会话内容存档内部群信息 企业可通过此接口,获取会话内容存档本企业的内部群信息,包括群名称、群主id、公告、群创建时间以及所有群成员的id与加入时间。

see https://work.weixin.qq.com/api/doc/90000/90135/92951

func (*Client) MessageAuditGetPermitUserList

func (c *Client) MessageAuditGetPermitUserList(r *MessageAuditGetPermitUserListRequest, opts ...interface{}) (out MessageAuditGetPermitUserListResponse, err error)

MessageAuditGetPermitUserList 获取会话内容存档开启成员列表 企业可通过此接口,获取企业开启会话内容存档的成员列表

see https://work.weixin.qq.com/api/doc/90000/90135/91614

func (*Client) ProviderAccessToken

func (c *Client) ProviderAccessToken() (string, error)

ProviderAccessToken request or return cached ProviderAccessToken

func (*Client) ProviderBatchGetResult

func (c *Client) ProviderBatchGetResult(r *ProviderBatchGetResultRequest, opts ...interface{}) (out ProviderBatchGetResultResponse, err error)

ProviderBatchGetResult 获取异步任务结果

see https://work.weixin.qq.com/api/doc/90001/90143/91882

func (*Client) ProviderGetAdminList

func (c *Client) ProviderGetAdminList(r *ProviderGetAdminListRequest, opts ...interface{}) (out ProviderGetAdminListResponse, err error)

ProviderGetAdminList 获取应用的管理员列表 第三方服务商可以用此接口获取授权企业中某个第三方应用的管理员列表(不包括外部管理员),以便服务商在用户进入应用主页之后根据是否管理员身份做权限的区分。

see https://work.weixin.qq.com/api/doc/90001/90143/90606

func (*Client) ProviderGetAuthInfo

func (c *Client) ProviderGetAuthInfo(r *ProviderGetAuthInfoRequest, opts ...interface{}) (out ProviderGetAuthInfoResponse, err error)

ProviderGetAuthInfo 获取企业授权信息 该API用于通过永久授权码换取企业微信的授权信息。 永久code的获取,是通过临时授权码使用get_permanent_code 接口获取到的permanent_code。

see https://work.weixin.qq.com/api/doc/90001/90143/90604

func (*Client) ProviderGetCorpToken

func (c *Client) ProviderGetCorpToken(r *ProviderGetCorpTokenRequest, opts ...interface{}) (out ProviderGetCorpTokenResponse, err error)

ProviderGetCorpToken 获取企业凭证 第三方服务商在取得企业的永久授权码后,通过此接口可以获取到企业的access_token。获取后可通过通讯录、应用、消息等企业接口来运营这些应用。

see https://work.weixin.qq.com/api/doc/90001/90143/90605

func (*Client) ProviderGetLoginInfo

func (c *Client) ProviderGetLoginInfo(r *ProviderGetLoginInfoRequest) (out ProviderGetLoginInfoResponse, err error)

ProviderGetLoginInfo 获取登录用户信息

see https://work.weixin.qq.com/api/doc/90001/90143/91125

func (*Client) ProviderGetPermanentCode

func (c *Client) ProviderGetPermanentCode(r *ProviderGetPermanentCodeRequest, opts ...interface{}) (out ProviderGetPermanentCodeResponse, err error)

ProviderGetPermanentCode 获取企业永久授权码 该API用于使用临时授权码换取授权方的永久授权码,并换取授权信息、企业access_token,临时授权码一次有效。建议第三方以userid为主键,来建立自己的管理员账号。

see https://work.weixin.qq.com/api/doc/90001/90143/90603

func (*Client) ProviderGetPreAuthCode

func (c *Client) ProviderGetPreAuthCode(r *ProviderGetPreAuthCodeRequest, opts ...interface{}) (out PreAuthCodeResponse, err error)

ProviderGetPreAuthCode 获取预授权码 该API用于获取预授权码。预授权码用于企业授权时的第三方服务商安全验证。

see https://work.weixin.qq.com/api/doc/90001/90143/90601

func (*Client) ProviderGetSuiteToken

func (c *Client) ProviderGetSuiteToken(r *ProviderGetSuiteTokenRequest, opts ...interface{}) (out SuiteTokenResponse, err error)

ProviderGetSuiteToken 获取第三方应用凭证 该API用于获取第三方应用凭证(suite_access_token)。

see https://work.weixin.qq.com/api/doc/90001/90143/90600

func (*Client) ProviderIDTranslateContact

func (c *Client) ProviderIDTranslateContact(r *ProviderIDTranslateContactRequest, opts ...interface{}) (out ProviderIDTranslateContactResponse, err error)

ProviderIDTranslateContact 异步通讯录id转译 通讯录id替换

see https://work.weixin.qq.com/api/doc/90001/90143/91846

func (*Client) ProviderSetSessionInfo

func (c *Client) ProviderSetSessionInfo(r *ProviderSetSessionInfoRequest, opts ...interface{}) (out GenericResponse, err error)

ProviderSetSessionInfo 设置授权配置 该接口可对某次授权进行配置。可支持测试模式(应用未发布时)。

see https://work.weixin.qq.com/api/doc/90001/90143/90602

func (*Client) ProviderSortContact

func (c *Client) ProviderSortContact(r *ProviderSortContactRequest, opts ...interface{}) (out ProviderSortContactResponse, err error)

ProviderSortContact 通讯录userid排序

see https://work.weixin.qq.com/api/doc/90001/90143/92093

func (*Client) ProviderUploadMedia

func (c *Client) ProviderUploadMedia(r *ProviderUploadMediaRequest, opts ...interface{}) (out ProviderUploadMediaResponse, err error)

ProviderUploadMedia 上传需要转译的文件 素材上传得到media_id,该media_id仅三天内有效media_id在同一企业内应用之间可以共享

see https://work.weixin.qq.com/api/doc/90001/90143/91883

func (*Client) RemarkExternalContact

func (c *Client) RemarkExternalContact(r *RemarkExternalContactRequest, opts ...interface{}) (out GenericResponse, err error)

RemarkExternalContact 修改客户备注信息 企业可通过此接口修改指定用户添加的客户的备注信息。

see https://work.weixin.qq.com/api/doc/90001/90143/92694

func (*Client) ScheduleGetByCalendar

func (c *Client) ScheduleGetByCalendar(r *ScheduleGetByCalendarRequest, opts ...interface{}) (out ScheduleGetByCalendarResponse, err error)

ScheduleGetByCalendar 获取日历下的日程列表 该接口用于获取指定的日历下的日程列表。仅可获取应用自己创建的日历下的日程。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93648

func (*Client) SendWelcomeMessage

func (c *Client) SendWelcomeMessage(r *SendWelcomeMessageRequest, opts ...interface{}) (out GenericResponse, err error)

SendWelcomeMessage 发送新客户欢迎语 企业微信在向企业推送添加外部联系人事件时,会额外返回一个welcome_code,企业以此为凭据调用接口,即可通过成员向新添加的客户发送个性化的欢迎语。为了保证用户体验以及避免滥用,企业仅可在收到相关事件后20秒内调用,且只可调用一次。如果企业已经在管理端为相关成员配置了可用的欢迎语,则推送添加外部联系人事件时不会返回welcome_code。每次添加新客户时可能有多个企业自建应用/第三方应用收到带有welcome_code的回调事件,但仅有最先调用的可以发送成功。后续调用将返回41051(externaluser has started chatting)错误,请用户根据实际使用需求,合理设置应用可见范围,避免冲突。旧接口发送新客户欢迎语已经废弃,接口升级后支持发送视频文件,并且最多支持同时发送9个附件

see https://work.weixin.qq.com/api/doc/90001/90143/92599

func (*Client) SetWorkbenchData

func (c *Client) SetWorkbenchData(r *SetWorkbenchDataRequest, opts ...interface{}) (out SetWorkbenchDataResponse, err error)

SetWorkbenchData 设置应用在用户工作台展示的数据

see https://work.weixin.qq.com/api/doc/90001/90143/94620

func (*Client) SetWorkbenchTemplate

func (c *Client) SetWorkbenchTemplate(r *SetWorkbenchTemplateRequest, opts ...interface{}) (out SetWorkbenchTemplateResponse, err error)

SetWorkbenchTemplate 设置应用在工作台展示的模版 请求说明:该接口指定应用自定义模版类型。同时也支持设置企业默认模版数据。若type指定为 “normal” 则为取消自定义模式,改为普通展示模式

see https://work.weixin.qq.com/api/doc/90001/90143/94620

func (*Client) SignAgentConfig

func (c *Client) SignAgentConfig(url string) (*JsSdkAgentConfig, error)

func (*Client) SignConfig

func (c *Client) SignConfig(url string) (*JsSdkConfig, error)

func (*Client) SimpleListUser

func (c *Client) SimpleListUser(r *SimpleListUserRequest, opts ...interface{}) (out SimpleListUserResponse, err error)

SimpleListUser 获取部门成员

see https://work.weixin.qq.com/api/doc/90000/90135/90200

func (*Client) StatisticGroupByDay

func (c *Client) StatisticGroupByDay(r *StatisticGroupByDayRequest, opts ...interface{}) (out StatisticGroupByDayResponse, err error)

StatisticGroupByDay 按自然日聚合的方式

see https://work.weixin.qq.com/api/doc/90001/90143/93476

func (*Client) SuiteAccessToken

func (c *Client) SuiteAccessToken() (string, error)

SuiteAccessToken request or return cached SuiteAccessToken

func (*Client) SuiteGetUserDetail

func (c *Client) SuiteGetUserDetail(r *SuiteGetUserDetailRequest) (out SuiteGetUserDetailResponse, err error)

func (*Client) SuiteGetUserInfo

func (c *Client) SuiteGetUserInfo(r *SuiteGetUserInfoRequest) (out SuiteGetUserInfoResponse, err error)

func (*Client) TransferCustomerExternalContact

func (c *Client) TransferCustomerExternalContact(r *TransferCustomerExternalContactRequest, opts ...interface{}) (out TransferCustomerExternalContactResponse, err error)

TransferCustomerExternalContact 分配在职成员的客户 企业可通过此接口,转接在职成员的客户给其他成员。

see https://work.weixin.qq.com/api/doc/90001/90143/94096

func (*Client) TransferCustomerResigned

func (c *Client) TransferCustomerResigned(r *TransferCustomerResignedRequest, opts ...interface{}) (out TransferCustomerResignedResponse, err error)

TransferCustomerResigned 分配离职成员的客户 企业可通过此接口,分配离职成员的客户给其他成员。

see https://work.weixin.qq.com/api/doc/90001/90143/94100

func (*Client) TransferGroupChat

func (c *Client) TransferGroupChat(r *TransferGroupChatRequest, opts ...interface{}) (out TransferGroupChatResponse, err error)

TransferGroupChat 分配离职成员的客户群 企业可通过此接口,将已离职成员为群主的群,分配给另一个客服成员。

see https://work.weixin.qq.com/api/doc/90001/90143/93242

func (*Client) TransferResultExternalContact

func (c *Client) TransferResultExternalContact(r *TransferResultExternalContactRequest, opts ...interface{}) (out TransferResultExternalContactResponse, err error)

TransferResultExternalContact 查询客户接替状态 企业和第三方可通过此接口查询在职成员的客户转接情况。

see https://work.weixin.qq.com/api/doc/90001/90143/94097

func (*Client) TransferResultResigned

func (c *Client) TransferResultResigned(r *TransferResultResignedRequest, opts ...interface{}) (out TransferResultResignedResponse, err error)

TransferResultResigned 查询客户接替状态 企业和第三方可通过此接口查询离职成员的客户分配情况。

see https://work.weixin.qq.com/api/doc/90001/90143/94101

func (*Client) UnionIDToExternalUserID

func (c *Client) UnionIDToExternalUserID(r *UnionIDToExternalUserIDRequest, opts ...interface{}) (out UnionIDToExternalUserIDResponse, err error)

UnionIDToExternalUserID 外部联系人unionid转换 服务商为企业代开发微信小程序的场景,服务商可通过此接口,将微信客户的unionid转为external_userid(如何获取?)。

see https://work.weixin.qq.com/api/doc/90001/90143/93274

func (*Client) UpdateCalendar

func (c *Client) UpdateCalendar(r *UpdateCalendarRequest, opts ...interface{}) (out GenericResponse, err error)

UpdateCalendar 更新日历 该接口用于修改指定日历的信息。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93647

func (*Client) UpdateContactWay

func (c *Client) UpdateContactWay(r *UpdateContactWayRequest, opts ...interface{}) (out GenericResponse, err error)

UpdateContactWay 更新企业已配置的「联系我」方式 更新企业配置的「联系我」二维码和「联系我」小程序按钮中的信息,如使用人员和备注等。

see https://work.weixin.qq.com/api/doc/90001/90143/92577

func (*Client) UpdateDepartment

func (c *Client) UpdateDepartment(r *UpdateDepartmentRequest, opts ...interface{}) (out GenericResponse, err error)

UpdateDepartment 更新部门

see https://work.weixin.qq.com/api/doc/90000/90135/90206

func (*Client) UpdateSchedule

func (c *Client) UpdateSchedule(r *UpdateScheduleRequest, opts ...interface{}) (out GenericResponse, err error)

UpdateSchedule 更新日程 该接口用于在日历中更新指定的日程。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93648

func (*Client) UpdateTag

func (c *Client) UpdateTag(r *UpdateTagRequest, opts ...interface{}) (out GenericResponse, err error)

UpdateTag 更新标签名字

see https://work.weixin.qq.com/api/doc/90000/90135/90211

func (*Client) UpdateUser

func (c *Client) UpdateUser(r *UpdateUserRequest, opts ...interface{}) (out GenericResponse, err error)

UpdateUser 更新成员

see https://work.weixin.qq.com/api/doc/90000/90135/90197

func (*Client) With

func (c *Client) With(conf Conf) (neo *Client)

With create new Client with this conf

type CloseTempChatRequest

type CloseTempChatRequest struct {
	// UserID 企业成员的userid
	UserID string `json:"userid"  validate:"required"`
	// ExternalUserID 客户的外部联系人userid
	ExternalUserID string `json:"external_userid"  validate:"required"`
}

CloseTempChatRequest is request of Client.CloseTempChat

type CommonPushEvent

type CommonPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`

	ToUsername   string `xml:"ToUserName,omitempty"`   // 企业微信CorpID
	FromUsername string `xml:"FromUserName,omitempty"` // sys 系统生成
	CreateTime   int64  `xml:"CreateTime,omitempty"`   // same as Timestamp
	MsgType      string `xml:"MsgType,omitempty"`      // event,text,image
	MsgID        int64  `xml:"MsgId,omitempty"`
	AgentID      int    `xml:"AgentID,omitempty"`
	Event        string `xml:"Event,omitempty"` // same as InfoType

	SuiteID       string `xml:"SuiteId,omitempty"`       // 第三方应用ID
	AuthCorpID    string `xml:"AuthCorpId,omitempty"`    // 授权企业的 CorpID
	ServiceCorpID string `xml:"ServiceCorpId,omitempty"` // 服务商 CorpID
	InfoType      string `xml:"InfoType,omitempty"`
	Timestamp     int64  `xml:"TimeStamp,omitempty"`

	ChangeType string `xml:"ChangeType,omitempty"`
}

func UnmarshalCommonEvent

func UnmarshalCommonEvent(data []byte) (*CommonPushEvent, error)

func (CommonPushEvent) GetEventType

func (e CommonPushEvent) GetEventType() string

func (CommonPushEvent) GetMessageType

func (e CommonPushEvent) GetMessageType() string

func (CommonPushEvent) GetTimestamp

func (e CommonPushEvent) GetTimestamp() int64

func (CommonPushEvent) IsEvent

func (e CommonPushEvent) IsEvent() bool

func (CommonPushEvent) IsMessage

func (e CommonPushEvent) IsMessage() bool

func (CommonPushEvent) IsProviderEvent

func (e CommonPushEvent) IsProviderEvent() bool

type Conclusions

type Conclusions struct {
	Text struct {
		Content string `json:"content"`
	} `json:"text"`
	Image struct {
		MediaID string `json:"media_id"`
		PicURL  string `json:"pic_url"`
	} `json:"image"`
	Link struct {
		Title  string `json:"title"`
		PicURL string `json:"picurl"`
		Desc   string `json:"desc"`
		URL    string `json:"url"`
	} `json:"link"`
	MiniProgram struct {
		Title      string `json:"title"`
		PicMediaID string `json:"pic_media_id"`
		AppID      string `json:"appid"`
		Page       string `json:"page"`
	} `json:"miniprogram"`
}

Conclusions 结束语 https://work.weixin.qq.com/api/doc/90001/90143/92577#%E7%BB%93%E6%9D%9F%E8%AF%AD%E5%AE%9A%E4%B9%89

type Conf

type Conf struct {
	CorpID                string // 企业 ID
	AgentID               int    // 应用 ID
	CorpSecret            string // 企业自建应用 secret
	ProviderSecret        string // 第三方 secret
	SuiteID               string // 第三方应用 ID
	SuiteSecret           string // 第三方应用 secret
	SuiteTicket           string // 第三方应用 ticket - 无法主动获取 - 会尝试从 Provider 获取
	AuthCorpID            string // 企业 ID
	AuthCorpPermanentCode string // 第三方企业永久授权码 - 会尝试从 Provider 获取

	TokenProvider TokenProvider `json:"-"`
}

type ConvertToOpenIDRequest

type ConvertToOpenIDRequest struct {
	// UserID 企业内的成员id
	UserID string `json:"userid"  validate:"required"`
}

ConvertToOpenIDRequest is request of Client.ConvertToOpenID

type ConvertToOpenIDResponse

type ConvertToOpenIDResponse struct {
	// OpenID 企业微信成员userid对应的openid
	OpenID string `json:"openid"  `
}

ConvertToOpenIDResponse is response of Client.ConvertToOpenID

type CreateAuthPushEvent

type CreateAuthPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCode 授权的auth_code,最长为512字节。用于获取企业的永久授权码。5分钟内有效
	AuthCode string `xml:"AuthCode" json:"AuthCode"`
	// InfoType create_auth
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用的SuiteId
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

CreateAuthPushEvent 从企业微信应用市场发起授权时,企业微信后台会推送授权成功通知。

func (CreateAuthPushEvent) EventType

func (CreateAuthPushEvent) EventType() string

EventType impl EventModel

type CreateDepartmentRequest

type CreateDepartmentRequest struct {
	// Name 部门名称。同一个层级的部门名称不能重复。长度限制为1~32个字符,字符不能包括\:*?”<>|
	Name string `json:"name"  validate:"required"`
	// NameEn 英文名称。同一个层级的部门名称不能重复。需要在管理后台开启多语言支持才能生效。长度限制为1~32个字符,字符不能包括\:*?”<>|
	NameEn string `json:"name_en"  `
	// ParentID 父部门id,32位整型
	ParentID int `json:"parentid"  validate:"required"`
	// Order 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^32)
	Order int `json:"order"  `
	// ID 部门id,32位整型,指定时必须大于1。若不填该参数,将自动生成id
	ID int `json:"id"  `
}

CreateDepartmentRequest is request of Client.CreateDepartment

type CreateDepartmentResponse

type CreateDepartmentResponse struct {
	// ID 创建的部门id
	ID int `json:"id"  `
}

CreateDepartmentResponse is response of Client.CreateDepartment

type CreateTagRequest

type CreateTagRequest struct {
	// TagName 标签名称,长度限制为32个字以内(汉字或英文字母),标签名不可与其他标签重名。
	TagName string `json:"tagname"  validate:"required"`
	// TagID 标签id,非负整型,指定此参数时新增的标签会生成对应的标签id,不指定时则以目前最大的id自增。
	TagID int `json:"tagid"  `
}

CreateTagRequest is request of Client.CreateTag

type CreateTagResponse

type CreateTagResponse struct {
	// TagID 标签id
	TagID string `json:"tagid"  `
}

CreateTagResponse is response of Client.CreateTag

type CreateUserRequest

type CreateUserRequest struct {
	// UserID 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节。只能由数字、字母和“_-@.”四种字符组成,且第一个字符必须是数字或字母。
	UserID string `json:"userid"  validate:"required"`
	// Name 成员名称。长度为1~64个utf8字符
	Name string `json:"name"  validate:"required"`
	// Alias 成员别名。长度1~32个utf8字符
	Alias string `json:"alias"  `
	// Mobile 手机号码。企业内必须唯一,mobile/email二者不能同时为空
	Mobile string `json:"mobile"  `
	// Department 成员所属部门id列表,不超过100个
	Department []int `json:"department"  validate:"required"`
	// Order 部门内的排序值,默认为0,成员次序以创建时间从小到大排列。个数必须和参数department的个数一致,数值越大排序越前面。有效的值范围是[0, 2^32)
	Order []int `json:"order"  `
	// Position 职务信息。长度为0~128个字符
	Position string `json:"position"  `
	// Gender 性别。1表示男性,2表示女性
	Gender string `json:"gender"  `
	// Email 邮箱。长度6~64个字节,且为有效的email格式。企业内必须唯一,mobile/email二者不能同时为空
	Email string `json:"email"  `
	// Telephone 座机。32字节以内,由纯数字、“-”、“+”或“,”组成。
	Telephone string `json:"telephone"  `
	// IsLeaderInDept 个数必须和参数department的个数一致,表示在所在的部门内是否为上级。1表示为上级,0表示非上级。在审批等应用里可以用来标识上级审批人
	IsLeaderInDept []int `json:"is_leader_in_dept"  `
	// AvatarMediaID 成员头像的mediaid,通过素材管理接口上传图片获得的mediaid
	AvatarMediaID string `json:"avatar_mediaid"  `
	// Enable 启用/禁用成员。1表示启用成员,0表示禁用成员
	Enable int `json:"enable"  `
	// ExtAttr 自定义字段。自定义字段需要先在WEB管理端添加,见扩展属性添加方法,否则忽略未知属性的赋值。与对外属性一致,不过只支持type=0的文本和type=1的网页类型,详细描述查看对外属性
	ExtAttr ExtAttrs `json:"extattr"  `
	// ToInvite 是否邀请该成员使用企业微信(将通过微信服务通知或短信或邮件下发邀请,每天自动下发一次,最多持续3个工作日),默认值为true。
	ToInvite bool `json:"to_invite"  `
	// ExternalProfile 成员对外属性,字段详情见对外属性
	ExternalProfile ExternalProfile `json:"external_profile"  `
	// ExternalPosition 对外职务,如果设置了该值,则以此作为对外展示的职务,否则以position来展示。长度12个汉字内
	ExternalPosition string `json:"external_position"  `
	// Nickname 视频号名字(设置后,成员将对外展示该视频号)。须从企业绑定到企业微信的视频号中选择,可在“我的企业”页中查看绑定的视频号
	Nickname string `json:"nickname"  `
	// Address 地址。长度最大128个字符
	Address string `json:"address"  `
	// MainDepartment 主部门
	MainDepartment int `json:"main_department"  `
}

CreateUserRequest is request of Client.CreateUser

type DeleteCalendarPushEvent

type DeleteCalendarPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// CalID 日历ID
	CalID string `xml:"CalId" json:"CalId"`
	// CreateTime 消息创建时间,unix时间戳
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型,此时固定为:delete_calendar
	Event string `xml:"Event" json:"Event"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

DeleteCalendarPushEvent 删除日历事件 当组织者删除了API创建的日历时,触发该事件。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93651

func (DeleteCalendarPushEvent) EventType

func (DeleteCalendarPushEvent) EventType() string

EventType impl EventModel

func (DeleteCalendarPushEvent) MessageType

func (DeleteCalendarPushEvent) MessageType() string

MessageType impl MessageModel

type DeleteCalendarRequest

type DeleteCalendarRequest struct {
	// CalenderID 日历ID
	CalenderID string `json:"cal_id"  validate:"required"`
}

DeleteCalendarRequest is request of Client.DeleteCalendar

type DeleteContactWayRequest

type DeleteContactWayRequest struct {
	// ConfigID 企业联系方式的配置id
	ConfigID string `json:"config_id"  validate:"required"`
}

DeleteContactWayRequest is request of Client.DeleteContactWay

type DeleteCorpTagRequest

type DeleteCorpTagRequest struct {
	// TagID 标签的id列表
	TagID []string `json:"tag_id"  `
	// GroupID 标签组的id列表
	GroupID []string `json:"group_id"  `
	// AgentID 授权方安装的应用agentid。仅旧的第三方多应用套件需要填此参数
	AgentID int `json:"agentid"  `
}

DeleteCorpTagRequest is request of Client.DeleteCorpTag

type DeleteDepartmentRequest

type DeleteDepartmentRequest struct {
	// ID 部门id。(注:不能删除根部门;不能删除含有子部门、成员的部门)
	ID string `json:"id"  validate:"required"`
}

DeleteDepartmentRequest is request of Client.DeleteDepartment

type DeleteGroupWelcomeTemplateRequest

type DeleteGroupWelcomeTemplateRequest struct {
	// TemplateID 群欢迎语的素材id
	TemplateID string `json:"template_id"  validate:"required"`
	// AgentID 授权方安装的应用agentid。仅旧的第三方多应用套件需要填此参数
	AgentID int `json:"agentid"  `
}

DeleteGroupWelcomeTemplateRequest is request of Client.DeleteGroupWelcomeTemplate

type DeleteSchedulePushEvent

type DeleteSchedulePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// CalID 日历ID
	CalID string `xml:"CalId" json:"CalId"`
	// CreateTime 消息创建时间,unix时间戳
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型,此时固定为:delete_schedule
	Event string `xml:"Event" json:"Event"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ScheduleID 日程ID
	ScheduleID string `xml:"ScheduleId" json:"ScheduleId"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

DeleteSchedulePushEvent 删除日程事件 当用户在API创建的日历上删除了日程后,触发该事件。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93651

func (DeleteSchedulePushEvent) EventType

func (DeleteSchedulePushEvent) EventType() string

EventType impl EventModel

func (DeleteSchedulePushEvent) MessageType

func (DeleteSchedulePushEvent) MessageType() string

MessageType impl MessageModel

type DeleteScheduleRequest

type DeleteScheduleRequest struct {
	// ScheduleID 日程ID
	ScheduleID string `json:"schedule_id"  validate:"required"`
}

DeleteScheduleRequest is request of Client.DeleteSchedule

type DeleteTagRequest

type DeleteTagRequest struct {
	// TagID 标签ID
	TagID string `json:"tagid"  validate:"required"`
}

DeleteTagRequest is request of Client.DeleteTag

type DeleteTagUsersRequest

type DeleteTagUsersRequest struct {
	// TagID 标签ID
	TagID int `json:"tagid"  validate:"required"`
	// UserList 企业成员ID列表,注意:userlist、partylist不能同时为空,单次请求长度不超过1000
	UserList []string `json:"userlist"  `
	// PartyList 企业部门ID列表,注意:userlist、partylist不能同时为空,单次请求长度不超过100
	PartyList []int `json:"partylist"  `
}

DeleteTagUsersRequest is request of Client.DeleteTagUsers

type DeleteTagUsersResponse

type DeleteTagUsersResponse struct {
	// InvalidList 非法的成员帐号列表
	InvalidList string `json:"invalidlist"  `
	// InvalidParty 非法的部门id列表
	InvalidParty string `json:"invalidparty"  `
}

DeleteTagUsersResponse is response of Client.DeleteTagUsers

type DeleteUserRequest

type DeleteUserRequest struct {
	// UserID 成员UserID。对应管理端的帐号
	UserID string `json:"userid"  validate:"required"`
}

DeleteUserRequest is request of Client.DeleteUser

type EditCorpTagRequest

type EditCorpTagRequest struct {
	// ID 标签或标签组的id
	ID string `json:"id"  validate:"required"`
	// Name 新的标签或标签组名称,最长为30个字符
	Name string `json:"name"  `
	// Order 标签/标签组的次序值。order值大的排序靠前。有效的值范围是[0, 2^32)
	Order int `json:"order"  `
	// AgentID 授权方安装的应用agentid。仅旧的第三方多应用套件需要填此参数
	AgentID int `json:"agentid"  `
}

EditCorpTagRequest is request of Client.EditCorpTag

type EditGroupWelcomeTemplateRequest

type EditGroupWelcomeTemplateRequest struct {
	// TemplateID 欢迎语素材id
	TemplateID string `json:"template_id"  validate:"required"`
	// AgentID 授权方安装的应用agentid。仅旧的第三方多应用套件需要填此参数
	AgentID int `json:"agentid"  `

	Text EditGroupWelcomeTemplateRequestText `json:"text"  `

	Image EditGroupWelcomeTemplateRequestImage `json:"image"  `

	Link EditGroupWelcomeTemplateRequestLink `json:"link"  `

	MiniProgram EditGroupWelcomeTemplateRequestMiniProgram `json:"miniprogram"  `

	File EditGroupWelcomeTemplateRequestFile `json:"file"  `

	Video EditGroupWelcomeTemplateRequestVideo `json:"video"  `
}

EditGroupWelcomeTemplateRequest is request of Client.EditGroupWelcomeTemplate

type EditGroupWelcomeTemplateRequestFile

type EditGroupWelcomeTemplateRequestFile struct {
	// MediaID 文件id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  validate:"required"`
}

EditGroupWelcomeTemplateRequestFile is model of EditGroupWelcomeTemplateRequest.File

type EditGroupWelcomeTemplateRequestImage

type EditGroupWelcomeTemplateRequestImage struct {
	// MediaID 图片的media_id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  `
	// PicURL 图片的链接,仅可使用上传图片接口得到的链接
	PicURL string `json:"pic_url"  `
}

EditGroupWelcomeTemplateRequestImage is model of EditGroupWelcomeTemplateRequest.Image

type EditGroupWelcomeTemplateRequestLink struct {
	// Title 图文消息标题,最长为128字节
	Title string `json:"title"  validate:"required"`
	// PicURL 图文消息封面的url
	PicURL string `json:"picurl"  `
	// Desc 图文消息的描述,最长为512字节
	Desc string `json:"desc"  `
	// URL 图文消息的链接
	URL string `json:"url"  validate:"required"`
}

EditGroupWelcomeTemplateRequestLink is model of EditGroupWelcomeTemplateRequest.Link

type EditGroupWelcomeTemplateRequestMiniProgram

type EditGroupWelcomeTemplateRequestMiniProgram struct {
	// Title 小程序消息标题,最长为64字节
	Title string `json:"title"  validate:"required"`
	// PicMediaID 小程序消息封面的mediaid,封面图建议尺寸为520*416
	PicMediaID string `json:"pic_media_id"  validate:"required"`
	// AppID 小程序appid,必须是关联到企业的小程序应用
	AppID string `json:"appid"  validate:"required"`
	// Page 小程序page路径
	Page string `json:"page"  validate:"required"`
}

EditGroupWelcomeTemplateRequestMiniProgram is model of EditGroupWelcomeTemplateRequest.MiniProgram

type EditGroupWelcomeTemplateRequestText

type EditGroupWelcomeTemplateRequestText struct {
	// Content 消息文本内容,最长为4000字节
	Content string `json:"content"  `
}

EditGroupWelcomeTemplateRequestText is model of EditGroupWelcomeTemplateRequest.Text

type EditGroupWelcomeTemplateRequestVideo

type EditGroupWelcomeTemplateRequestVideo struct {
	// MediaID 视频媒体文件id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  validate:"required"`
}

EditGroupWelcomeTemplateRequestVideo is model of EditGroupWelcomeTemplateRequest.Video

type EncryptPushEvent

type EncryptPushEvent struct {
	XMLName    xml.Name `xml:"xml"`
	ToUserName string   `xml:"ToUserName,omitempty"`
	Encrypt    string   `xml:"Encrypt,omitempty"`
	AgentID    string   `xml:"AgentID,omitempty"`
}

type EnterAgentPushEvent

type EnterAgentPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型:enter_agent
	Event string `xml:"Event" json:"Event"`
	// EventKey 事件KEY值,此事件该值为空
	EventKey string `xml:"EventKey" json:"EventKey"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

EnterAgentPushEvent 进入应用 本事件在成员进入企业微信的应用时触发

see https://work.weixin.qq.com/api/doc/90000/90135/90240

func (EnterAgentPushEvent) EventType

func (EnterAgentPushEvent) EventType() string

EventType impl EventModel

func (EnterAgentPushEvent) MessageType

func (EnterAgentPushEvent) MessageType() string

MessageType impl MessageModel

type EventChangeModel

type EventChangeModel interface {
	EventModel
	EventChangeType() string
}

type EventModel

type EventModel interface {
	EventType() string
}

func NewEventModel

func NewEventModel(infoType string, changeType string) EventModel

NewEventModel return a ptr to model struct return ptr to prevent xml.Unmarshal(nil, &e) pass a ptr to interface

type ExportDepartmentRequest

type ExportDepartmentRequest struct {
	// EncodingAesKey base64encode的加密密钥,长度固定为43,加密方式采用aes-256-cbc方式
	EncodingAesKey string `json:"encoding_aeskey"  validate:"required"`
	// BlockSize 每块数据的部门数,支持范围[10^4,10^6],默认值为10^6
	BlockSize int `json:"block_size"  `
}

ExportDepartmentRequest is request of Client.ExportDepartment

type ExportDepartmentResponse

type ExportDepartmentResponse struct {
	// JobID 任务ID,可通过获取导出结果接口查询任务结果
	JobID string `json:"jobid"  `
}

ExportDepartmentResponse is response of Client.ExportDepartment

type ExportGetResultRequest

type ExportGetResultRequest struct {
	// JobID 导出任务接口成功后返回
	JobID string `json:"jobid"  validate:"required"`
}

ExportGetResultRequest is request of Client.ExportGetResult

type ExportGetResultResponse

type ExportGetResultResponse struct {
	// Status 任务状态:0-未处理,1-处理中,2-完成,3-异常失败
	Status string `json:"status"  `
	// DataList 数据文件列表
	DataList ExportGetResultResponseDataList `json:"data_list"  `
}

ExportGetResultResponse is response of Client.ExportGetResult

type ExportGetResultResponseDataList

type ExportGetResultResponseDataList struct {
	// URL 数据下载链接,支持指定Range头部分段下载。有效期2个小时
	URL string `json:"url"  `
	// Size 密文数据大小
	Size int `json:"size"  `
	// Md5 密文数据md5
	Md5 string `json:"md5"  `
}

ExportGetResultResponseDataList is model of ExportGetResultResponse.DataList

type ExportSimpleUserRequest

type ExportSimpleUserRequest struct {
	// EncodingAesKey base64encode的加密密钥,长度固定为43,加密方式采用aes-256-cbc方式
	EncodingAesKey string `json:"encoding_aeskey"  validate:"required"`
	// BlockSize 每块数据的人员数,支持范围[10^4,10^6],默认值为10^6
	BlockSize int `json:"block_size"  `
}

ExportSimpleUserRequest is request of Client.ExportSimpleUser

type ExportSimpleUserResponse

type ExportSimpleUserResponse struct {
	// JobID 任务ID,可通过获取导出结果接口查询任务结果
	JobID string `json:"jobid"  `
}

ExportSimpleUserResponse is response of Client.ExportSimpleUser

type ExportTagUserRequest

type ExportTagUserRequest struct {
	// TagID 需要导出的标签
	TagID int `json:"tagid"  validate:"required"`
	// EncodingAesKey base64encode的加密密钥,长度固定为43,加密方式采用aes-256-cbc方式
	EncodingAesKey string `json:"encoding_aeskey"  validate:"required"`
	// BlockSize 每块数据的人员数和部门数之和,支持范围[10^4,10^6],默认值为10^6
	BlockSize int `json:"block_size"  `
}

ExportTagUserRequest is request of Client.ExportTagUser

type ExportTagUserResponse

type ExportTagUserResponse struct {
	// JobID 任务ID,可通过获取导出结果接口查询任务结果
	JobID string `json:"jobid"  `
}

ExportTagUserResponse is response of Client.ExportTagUser

type ExportUserRequest

type ExportUserRequest struct {
	// EncodingAesKey base64encode的加密密钥,长度固定为43,加密方式采用aes-256-cbc方式
	EncodingAesKey string `json:"encoding_aeskey"  validate:"required"`
	// BlockSize 每块数据的人员数,支持范围[10^4,10^6],默认值为10^6
	BlockSize int `json:"block_size"  `
}

ExportUserRequest is request of Client.ExportUser

type ExportUserResponse

type ExportUserResponse struct {
	// JobID 任务ID,可通过获取导出结果接口查询任务结果
	JobID string `json:"jobid"  `
}

ExportUserResponse is response of Client.ExportUser

type ExtAttr

type ExtAttr struct {
	// Type 0 文本, 1 网页, 2 小程序
	Type int    `json:"type,omitempty"`
	Name string `json:"name,omitempty"`
	Text struct {
		Value string `json:"value,omitempty"`
	} `json:"text,omitempty"`
	Web struct {
		URL   string `json:"url,omitempty"`
		Title string `json:"title,omitempty"`
	} `json:"web,omitempty"`
	MiniProgram struct {
		AppID    string `json:"appid,omitempty"`
		PagePath string `json:"pagepath,omitempty"`
		Title    string `json:"title,omitempty"`
	} `json:"miniprogram,omitempty"`
}

ExtAttr extra attribute model

type ExtAttrs

type ExtAttrs struct {
	Attrs []ExtAttr `json:"attrs"`
}

ExtAttrs extra attributes model

type ExternalContactAddWay

type ExternalContactAddWay int

ExternalContactAddWay 添加客户的来源 used by GetExternalContactResponseFollowUser.AddWay

see https://open.work.weixin.qq.com/api/doc/90000/90135/92114

const (
	ExternalContactAddWayUnknown             ExternalContactAddWay = 0   // 未知来源
	ExternalContactAddWayScanQR              ExternalContactAddWay = 1   //	扫描二维码
	ExternalContactAddWaySearchPhone         ExternalContactAddWay = 2   // 搜索手机号
	ExternalContactAddWayShareContactCard    ExternalContactAddWay = 3   // 名片分享
	ExternalContactAddWayGroup               ExternalContactAddWay = 4   // 群聊
	ExternalContactAddWayPhoneContact        ExternalContactAddWay = 5   //	手机通讯录
	ExternalContactAddWayWeChatContact       ExternalContactAddWay = 6   // 微信联系人
	ExternalContactAddWayWeChatFriendRequest ExternalContactAddWay = 7   // 来自微信的添加好友申请
	ExternalContactAddWayCustomService       ExternalContactAddWay = 8   // 安装第三方应用时自动添加的客服人员
	ExternalContactAddWaySearchEMail         ExternalContactAddWay = 9   // 搜索邮箱
	ExternalContactAddWayChannel             ExternalContactAddWay = 10  // 视频号主页添加
	ExternalContactAddWayInternalShare       ExternalContactAddWay = 201 // 内部成员共享
	ExternalContactAddWayAssign              ExternalContactAddWay = 202 // 管理员/负责人分配
)

type ExternalContactGroupChatStatusType

type ExternalContactGroupChatStatusType int

ExternalContactGroupChatStatusType status type of external group chat used by ListGroupChatResponseGroupChatList.Status

const (
	ExternalContactGroupChatStatusTypeNormal       ExternalContactGroupChatStatusType = 0 // 跟进人正常
	ExternalContactGroupChatStatusTypeResign       ExternalContactGroupChatStatusType = 1 // 跟进人离职
	ExternalContactGroupChatStatusTypeTransferring ExternalContactGroupChatStatusType = 2 // 离职继承中
	ExternalContactGroupChatStatusTypeTransferred  ExternalContactGroupChatStatusType = 3 // 离职继承完成
)

type ExternalContactProfileResponse

type ExternalContactProfileResponse struct {
	ExternalAttr []ExtAttr `json:"external_attr"`
}

type ExternalContactResponse

type ExternalContactResponse struct {
	// ExternalUserID 外部联系人的userid
	ExternalUserID string `json:"external_userid"`
	// Name 外部联系人的名称[注1]
	Name string `json:"name"`
	// Avatar 外部联系人头像,代开发自建应用需要管理员授权才可以获取,第三方不可获取
	Avatar string `json:"avatar"`
	// Type 外部联系人的类型,1表示该外部联系人是微信用户,2表示该外部联系人是企业微信用户
	Type int `json:"type"`
	// Gender 外部联系人性别 0-未知 1-男性 2-女性
	Gender int `json:"gender"`
	// UnionID 外部联系人在微信开放平台的唯一身份标识(微信unionid),通过此字段企业可将外部联系人与公众号/小程序用户关联起来。仅当联系人类型是微信用户,且企业或第三方服务商绑定了微信开发者ID有此字段。查看绑定方法
	UnionID string `json:"unionid"`
	// Position 外部联系人的职位,如果外部企业或用户选择隐藏职位,则不返回,仅当联系人类型是企业微信用户时有此字段
	Position string `json:"position"`
	// CorpName 外部联系人所在企业的简称,仅当联系人类型是企业微信用户时有此字段
	CorpName string `json:"corp_name"`
	// CorpFullName 外部联系人所在企业的主体名称,仅当联系人类型是企业微信用户时有此字段
	CorpFullName string `json:"corp_full_name"`
	// ExternalProfile 外部联系人的自定义展示信息,可以有多个字段和多种类型,包括文本,网页和小程序,仅当联系人类型是企业微信用户时有此字段,字段详情见对外属性;
	ExternalProfile ExternalProfile `json:"external_profile"`
}

ExternalContactResponse 外部联系人 see https://work.weixin.qq.com/api/doc/90001/90143/92265

type ExternalContactSourceType

type ExternalContactSourceType int

ExternalContactSourceType source type of external contact used by GetExternalContactResponseFollowUser.AddWay

see https://work.weixin.qq.com/api/doc/90001/90143/92265#%E6%9D%A5%E6%BA%90%E5%AE%9A%E4%B9%89

const (
	ExternalContactSourceTypeUnknown                 ExternalContactSourceType = 0   // 未知来源
	ExternalContactSourceTypeScanQR                  ExternalContactSourceType = 1   // 扫描二维码
	ExternalContactSourceTypeSearchMobile            ExternalContactSourceType = 2   // 搜索手机号
	ExternalContactSourceTypeShareContact            ExternalContactSourceType = 3   // 名片分享
	ExternalContactSourceTypeGroupChat               ExternalContactSourceType = 4   // 群聊
	ExternalContactSourceTypeMobileContact           ExternalContactSourceType = 5   // 手机通讯录
	ExternalContactSourceTypeWechatContact           ExternalContactSourceType = 6   // 微信联系人
	ExternalContactSourceTypeWechatFriendRequest     ExternalContactSourceType = 7   // 来自微信的添加好友申请
	ExternalContactSourceTypeProviderCustomerService ExternalContactSourceType = 8   // 安装第三方应用时自动添加的客服人员
	ExternalContactSourceTypeSearchEmail             ExternalContactSourceType = 9   // 搜索邮箱
	ExternalContactSourceTypeInternalShare           ExternalContactSourceType = 201 // 内部成员共享
	ExternalContactSourceTypeManagerAssignment       ExternalContactSourceType = 202 // 管理员/负责人分配
)

type ExternalContactType

type ExternalContactType int

ExternalContactType type of external contact used by ExternalContactResponse.Type

const (
	ExternalContactTypeWechat ExternalContactType = 1 // 外部联系人是微信用户
	ExternalContactTypeWecom  ExternalContactType = 2 // 外部联系人是企业微信用户
)

type ExternalProfile

type ExternalProfile struct {
	// ExternalCorpName 企业对外简称,需从已认证的企业简称中选填。可在“我的企业”页中查看企业简称认证状态。
	ExternalCorpName string `json:"external_corp_name,omitempty"`
	// WechatChannels 视频号属性
	WechatChannels struct {
		// Nickname 视频号名字(设置后,成员将对外展示该视频号)
		Nickname string `json:"nickname,omitempty"`
		// Status 对外展示视频号状态。0表示企业视频号已被确认,可正常使用,1表示企业视频号待确认
		Status int `json:"status,omitempty"`
	} `json:"wechat_channels,omitempty"`
	ExternalAttr []ExtAttr `json:"external_attr,omitempty"`
}

type GenericResponse

type GenericResponse struct {
	ErrorCode    int    `json:"errcode"`
	ErrorMessage string `json:"errmsg"`
}

func (GenericResponse) AsError

func (r GenericResponse) AsError() error

func (GenericResponse) Error

func (r GenericResponse) Error() string

type GenericToken

type GenericToken struct {
	Type      string `json:",omitempty"` //
	OwnerID   string `json:",omitempty"` // if owner change, this token become invalid
	Depends   string `json:",omitempty"` // extra depends
	Secret    string `json:",omitempty"` // secret content
	ExpiresIn int    `json:",omitempty"` // valid in seconds - 0 means no expire
	ExpiresAt int64  `json:",omitempty"` // expires unix timestamp
}

func (GenericToken) GetAccessToken

func (t GenericToken) GetAccessToken() string

func (GenericToken) GetExpiresAt

func (t GenericToken) GetExpiresAt() int64

func (GenericToken) GetExpiresIn

func (t GenericToken) GetExpiresIn() int

func (*GenericToken) IsValid

func (t *GenericToken) IsValid() bool

func (*GenericToken) Refresh

func (t *GenericToken) Refresh(exp *GenericToken, f func() (OpaqueToken, error)) (bool, error)

Refresh token, return changed and error

func (*GenericToken) SetFromToken

func (t *GenericToken) SetFromToken(token OpaqueToken)

func (*GenericToken) ShouldRefresh

func (t *GenericToken) ShouldRefresh(exp *GenericToken) bool

type GetActiveStatRequest

type GetActiveStatRequest struct {
	// Date 具体某天的活跃人数,最长支持获取30天前数据
	Date string `json:"date"  validate:"required"`
}

GetActiveStatRequest is request of Client.GetActiveStat

type GetActiveStatResponse

type GetActiveStatResponse struct {
	// ActiveCount 活跃成员数
	ActiveCount int `json:"active_cnt"  `
}

GetActiveStatResponse is response of Client.GetActiveStat

type GetAdminListItem

type GetAdminListItem struct {
	// UserID 管理员的userid
	UserID string `json:"userid"`
	// OpenUserID 管理员的open_userid
	OpenUserID string `json:"open_userid"`
	// AuthType 该管理员对应用的权限:0=发消息权限,1=管理权限
	AuthType int `json:"auth_type"`
}

type GetAgentAllowParties

type GetAgentAllowParties struct {
	PartyIDs []int `json:"partyid"`
}

GetAgentAllowParties is model of GetAgentResponse.AllowParties

type GetAgentAllowTags

type GetAgentAllowTags struct {
	TagIDs []int `json:"tagid"`
}

GetAgentAllowTags is model of GetAgentResponse.AllowTags

type GetAgentAllowUserInfos

type GetAgentAllowUserInfos struct {
	Users []struct {
		UserID string `json:"userid"`
	} `json:"user"`
}

GetAgentAllowUserInfos is model of GetAgentResponse.AllowUserInfos

type GetAgentRequest

type GetAgentRequest struct {
	// AgentID 应用id
	AgentID int `json:"agentid"  validate:"required"`
}

GetAgentRequest is request of Client.GetAgent

type GetAgentResponse

type GetAgentResponse struct {
	// AgentID 企业应用id
	AgentID int `json:"agentid"  `
	// Name 企业应用名称
	Name string `json:"name"  `
	// SquareLogoURL 企业应用方形头像
	SquareLogoURL string `json:"square_logo_url"  `
	// Description 企业应用详情
	Description string `json:"description"  `
	// AllowUserInfos 企业应用可见范围(人员),其中包括userid
	AllowUserInfos GetAgentAllowUserInfos `json:"allow_userinfos"  `
	// AllowParties 企业应用可见范围(部门)
	AllowParties GetAgentAllowParties `json:"allow_partys"  `
	// AllowTags 企业应用可见范围(标签)
	AllowTags GetAgentAllowTags `json:"allow_tags"  `
	// Close 企业应用是否被停用
	Close int `json:"close"  `
	// RedirectDomain 企业应用可信域名
	RedirectDomain string `json:"redirect_domain"  `
	// ReportLocationFlag 企业应用是否打开地理位置上报 0:不上报;1:进入会话上报;
	ReportLocationFlag int `json:"report_location_flag"  `
	// IsReportEnter 是否上报用户进入应用事件。0:不接收;1:接收
	IsReportEnter int `json:"isreportenter"  `
	// HomeURL 应用主页url
	HomeURL string `json:"home_url"  `
}

GetAgentResponse is response of Client.GetAgent

type GetCalendarRequest

type GetCalendarRequest struct {
	// CalenderIDList 日历ID列表,调用创建日历接口后获得。一次最多可获取1000条
	CalenderIDList []string `json:"cal_id_list"  validate:"required"`
}

GetCalendarRequest is request of Client.GetCalendar

type GetCalendarResponse

type GetCalendarResponse struct {
	// CalendarList 日历列表
	CalendarList []GetCalendarResponseItem `json:"calendar_list"  `
}

GetCalendarResponse is response of Client.GetCalendar

type GetCalendarResponseItem

type GetCalendarResponseItem struct {
	// CalID 日历ID
	CalID string `json:"cal_id"  `
	// Organizer 指定的组织者userid
	Organizer string `json:"organizer"  `
	// Readonly 日历组织者对日历是否只读权限。0-否;1-是;
	Readonly int `json:"readonly"  `
	// Summary 日历标题。1 ~ 128 字符
	Summary string `json:"summary"  `
	// Color 日历颜色,RGB颜色编码16进制表示,例如:”#0000FF” 表示纯蓝色
	Color string `json:"color"  `
	// Description 日历描述。0 ~ 512 字符
	Description string `json:"description"  `
	// Shares 日历共享成员列表。最多2000人
	Shares []GetCalendarResponseShares `json:"shares"  `
}

GetCalendarResponseItem is item model of GetCalendarResponse.CalendarList

type GetCalendarResponseShares

type GetCalendarResponseShares struct {
	// UserID 日历共享成员的id
	UserID string `json:"userid"  `
	// Readonly 共享成员对日历是否只读权限。0-否;1-是;
	Readonly int `json:"readonly"  `
}

GetCalendarResponseShares is model of GetCalendarResponse.Shares

type GetContactWayRequest

type GetContactWayRequest struct {
	// ConfigID 联系方式的配置id
	ConfigID string `json:"config_id"  validate:"required"`
}

GetContactWayRequest is request of Client.GetContactWay

type GetContactWayResponse

type GetContactWayResponse struct {
	// ConfigID 新增联系方式的配置id
	ConfigID string `json:"config_id"  `
	// Type 联系方式类型,1-单人,2-多人
	Type string `json:"type"  `
	// Scene 场景,1-在小程序中联系,2-通过二维码联系
	Scene string `json:"scene"  `
	// IsTemp 是否临时会话模式,默认为false,true表示使用临时会话模式
	IsTemp string `json:"is_temp"  `
	// Remark 联系方式的备注信息,用于助记
	Remark string `json:"remark"  `
	// SkipVerify 外部客户添加时是否无需验证
	SkipVerify string `json:"skip_verify"  `
	// State 企业自定义的state参数,用于区分不同的添加渠道,在调用“获取外部联系人详情”时会返回该参数值
	State string `json:"state"  `
	// Style 小程序中联系按钮的样式,仅在scene为1时返回,详见附录
	Style string `json:"style"  `
	// QrCode 联系二维码的URL,仅在scene为2时返回
	QrCode string `json:"qr_code"  `
	// User 使用该联系方式的用户userID列表
	User string `json:"user"  `
	// Party 使用该联系方式的部门id列表
	Party string `json:"party"  `
	// ExpiresIn 临时会话二维码有效期,以秒为单位
	ExpiresIn string `json:"expires_in"  `
	// ChatExpiresIn 临时会话有效期,以秒为单位
	ChatExpiresIn string `json:"chat_expires_in"  `
	// UnionID 可进行临时会话的客户unionid
	UnionID string `json:"unionid"  `
	// Conclusions 结束语,可参考“结束语定义”
	Conclusions string `json:"conclusions"  `
}

GetContactWayResponse is response of Client.GetContactWay

type GetCorpTagListRequest

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

GetCorpTagListRequest is request of Client.GetCorpTagList

type GetCorpTagListResponse

type GetCorpTagListResponse struct {
	// TagGroup 标签组列表
	TagGroup []GetCorpTagListResponseTagGroup `json:"tag_group"  `
}

GetCorpTagListResponse is response of Client.GetCorpTagList

type GetCorpTagListResponseTagGroup

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

GetCorpTagListResponseTagGroup is model of GetCorpTagListResponse.TagGroup

type GetCorpTagListResponseTagGroupTag

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

GetCorpTagListResponseTagGroupTag is model of GetCorpTagListResponseTagGroup.Tag

type GetExternalContactRequest

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

GetExternalContactRequest is request of Client.GetExternalContact

type GetExternalContactResponse

type GetExternalContactResponse struct {
	// NextCursor 分页的cursor,当跟进人多于500人时返回
	NextCursor string `json:"next_cursor"  `

	FollowUser []GetExternalContactResponseFollowUser `json:"follow_user"  `

	ExternalContact ExternalContactResponse `json:"external_contact"  `
}

GetExternalContactResponse is response of Client.GetExternalContact

type GetExternalContactResponseFollowUser

type GetExternalContactResponseFollowUser struct {
	// UserID 添加了此外部联系人的企业成员userid
	UserID string `json:"userid"  `
	// Remark 该成员对此外部联系人的备注
	Remark string `json:"remark"  `
	// Description 该成员对此外部联系人的描述
	Description string `json:"description"  `
	// CreateTime 该成员添加此外部联系人的时间
	CreateTime int `json:"createtime"  `
	// RemarkCorpName 该成员对此客户备注的企业名称
	RemarkCorpName string `json:"remark_corp_name"  `
	// RemarkMobiles 该成员对此客户备注的手机号码,代开发自建应用需要管理员授权才可以获取,第三方不可获取
	RemarkMobiles []string `json:"remark_mobiles"  `
	// AddWay 该成员添加此客户的来源,具体含义详见来源定义
	AddWay int `json:"add_way"  `
	// OperUserID 发起添加的userid,如果成员主动添加,为成员的userid;如果是客户主动添加,则为客户的外部联系人userid;如果是内部成员共享/管理员分配,则为对应的成员/管理员userid
	OperUserID string `json:"oper_userid"  `
	// State 企业自定义的state参数,用于区分客户具体是通过哪个「联系我」添加,由企业通过创建「联系我」方式指定
	State string `json:"state"  `

	Tags []GetExternalContactResponseFollowUserTags `json:"tags"  `
}

GetExternalContactResponseFollowUser is model of GetExternalContactResponse.FollowUser

type GetExternalContactResponseFollowUserTags

type GetExternalContactResponseFollowUserTags struct {
	// GroupName 该成员添加此外部联系人所打标签的分组名称(标签功能需要企业微信升级到2.7.5及以上版本)
	GroupName string `json:"group_name"  `
	// TagName 该成员添加此外部联系人所打标签名称
	TagName string `json:"tag_name"  `
	// Type 该成员添加此外部联系人所打标签类型, 1-企业设置,2-用户自定义,3-规则组标签(仅系统应用返回)
	Type int `json:"type"  `
	// TagID 该成员添加此外部联系人所打企业标签的id,用户自定义类型标签(type=2)不返回
	TagID string `json:"tag_id"  `
}

GetExternalContactResponseFollowUserTags is model of GetExternalContactResponseFollowUser.Tags

type GetFollowUserListResponse

type GetFollowUserListResponse struct {
	// FollowUser 配置了客户联系功能的成员userid列表
	FollowUser []string `json:"follow_user"  `
}

GetFollowUserListResponse is response of Client.GetFollowUserList

type GetGroupChatRequest

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

GetGroupChatRequest is request of Client.GetGroupChat

type GetGroupChatResponse

type GetGroupChatResponse struct {
	// GroupChat 客户群详情
	GroupChat GetGroupChatResponseGroupChat `json:"group_chat"  `
}

GetGroupChatResponse is response of Client.GetGroupChat

type GetGroupChatResponseGroupChat

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

GetGroupChatResponseGroupChat is model of GetGroupChatResponse.GroupChat

type GetGroupChatResponseGroupChatAdminList

type GetGroupChatResponseGroupChatAdminList struct {
	// UserID 群管理员userid
	UserID string `json:"userid"  `
}

GetGroupChatResponseGroupChatAdminList is model of GetGroupChatResponseGroupChat.AdminList

type GetGroupChatResponseGroupChatMemberList

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

GetGroupChatResponseGroupChatMemberList is model of GetGroupChatResponseGroupChat.MemberList

type GetGroupChatResponseGroupChatMemberListInvitor

type GetGroupChatResponseGroupChatMemberListInvitor struct {
	// UserID 邀请者的userid
	UserID string `json:"userid"  `
}

GetGroupChatResponseGroupChatMemberListInvitor is model of GetGroupChatResponseGroupChatMemberList.Invitor

type GetGroupMessageListV2Request

type GetGroupMessageListV2Request struct {
	// ChatType 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群
	ChatType string `json:"chat_type"  validate:"required"`
	// StartTime 群发任务记录开始时间
	StartTime int `json:"start_time"  validate:"required"`
	// EndTime 群发任务记录结束时间
	EndTime int `json:"end_time"  validate:"required"`
	// Creator 群发任务创建人企业账号id
	Creator string `json:"creator"  `
	// FilterType 创建人类型。0:企业发表 1:个人发表 2:所有,包括个人创建以及企业创建,默认情况下为所有类型
	FilterType int `json:"filter_type"  `
	// Limit 返回的最大记录数,整型,最大值100,默认值50,超过最大值时取默认值
	Limit int `json:"limit"  `
	// Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
	Cursor string `json:"cursor"  `
}

GetGroupMessageListV2Request is request of Client.GetGroupMessageListV2

type GetGroupMessageListV2Response

type GetGroupMessageListV2Response struct {
	// NextCursor 分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空
	NextCursor string `json:"next_cursor"  `
	// GroupMessageList 群发记录列表
	GroupMessageList []GetGroupMessageListV2ResponseGroupMessageList `json:"group_msg_list"  `
}

GetGroupMessageListV2Response is response of Client.GetGroupMessageListV2

type GetGroupMessageListV2ResponseGroupMessageList

type GetGroupMessageListV2ResponseGroupMessageList struct {
	// MessageID 企业群发消息的id,可用于获取企业群发成员执行结果
	MessageID string `json:"msgid"  `
	// Creator 群发消息创建者userid,API接口创建的群发消息不返回该字段
	Creator string `json:"creator"  `
	// CreateTime 创建时间
	CreateTime string `json:"create_time"  `
	// CreateType 群发消息创建来源。0:企业 1:个人
	CreateType int `json:"create_type"  `

	Text GetGroupMessageListV2ResponseGroupMessageListText `json:"text"  `

	Attachments []GetGroupMessageListV2ResponseGroupMessageListAttachments `json:"attachments"  `
}

GetGroupMessageListV2ResponseGroupMessageList is model of GetGroupMessageListV2Response.GroupMessageList

type GetGroupMessageListV2ResponseGroupMessageListAttachments

type GetGroupMessageListV2ResponseGroupMessageListAttachments struct {
	// MessageType 值必须是image
	MessageType string `json:"msgtype"  `

	Image GetGroupMessageListV2ResponseGroupMessageListAttachmentsImage `json:"image"  `

	Link GetGroupMessageListV2ResponseGroupMessageListAttachmentsLink `json:"link"  `

	MiniProgram GetGroupMessageListV2ResponseGroupMessageListAttachmentsMiniProgram `json:"miniprogram"  `

	Video GetGroupMessageListV2ResponseGroupMessageListAttachmentsVideo `json:"video"  `

	File GetGroupMessageListV2ResponseGroupMessageListAttachmentsFile `json:"file"  `
}

GetGroupMessageListV2ResponseGroupMessageListAttachments is model of GetGroupMessageListV2ResponseGroupMessageList.Attachments

type GetGroupMessageListV2ResponseGroupMessageListAttachmentsFile

type GetGroupMessageListV2ResponseGroupMessageListAttachmentsFile struct {
	// MediaID 文件的media_id,可以通过获取临时素材下载资源
	MediaID string `json:"media_id"  `
}

GetGroupMessageListV2ResponseGroupMessageListAttachmentsFile is model of GetGroupMessageListV2ResponseGroupMessageListAttachments.File

type GetGroupMessageListV2ResponseGroupMessageListAttachmentsImage

type GetGroupMessageListV2ResponseGroupMessageListAttachmentsImage struct {
	// MediaID 图片的media_id,可以通过获取临时素材下载资源
	MediaID string `json:"media_id"  `
	// PicURL 图片的url,与图片的media_id不能共存优先吐出media_id
	PicURL string `json:"pic_url"  `
}

GetGroupMessageListV2ResponseGroupMessageListAttachmentsImage is model of GetGroupMessageListV2ResponseGroupMessageListAttachments.Image

type GetGroupMessageListV2ResponseGroupMessageListAttachmentsLink struct {
	// Title 图文消息标题
	Title string `json:"title"  `
	// PicURL 图文消息封面的url
	PicURL string `json:"picurl"  `
	// Desc 图文消息的描述,最多512个字节
	Desc string `json:"desc"  `
	// URL 图文消息的链接
	URL string `json:"url"  `
}

GetGroupMessageListV2ResponseGroupMessageListAttachmentsLink is model of GetGroupMessageListV2ResponseGroupMessageListAttachments.Link

type GetGroupMessageListV2ResponseGroupMessageListAttachmentsMiniProgram

type GetGroupMessageListV2ResponseGroupMessageListAttachmentsMiniProgram struct {
	// Title 小程序消息标题,最多64个字节
	Title string `json:"title"  `
	// AppID 小程序appid,必须是关联到企业的小程序应用
	AppID string `json:"appid"  `
	// Page 小程序page路径
	Page string `json:"page"  `
}

GetGroupMessageListV2ResponseGroupMessageListAttachmentsMiniProgram is model of GetGroupMessageListV2ResponseGroupMessageListAttachments.MiniProgram

type GetGroupMessageListV2ResponseGroupMessageListAttachmentsVideo

type GetGroupMessageListV2ResponseGroupMessageListAttachmentsVideo struct {
	// MediaID 视频的media_id,可以通过获取临时素材下载资源
	MediaID string `json:"media_id"  `
}

GetGroupMessageListV2ResponseGroupMessageListAttachmentsVideo is model of GetGroupMessageListV2ResponseGroupMessageListAttachments.Video

type GetGroupMessageListV2ResponseGroupMessageListText

type GetGroupMessageListV2ResponseGroupMessageListText struct {
	// Content 消息文本内容,最多4000个字节
	Content string `json:"content"  `
}

GetGroupMessageListV2ResponseGroupMessageListText is model of GetGroupMessageListV2ResponseGroupMessageList.Text

type GetGroupMessageSendResultRequest

type GetGroupMessageSendResultRequest struct {
	// MessageID 群发消息的id,通过获取群发记录列表接口返回
	MessageID string `json:"msgid"  validate:"required"`
	// UserID 发送成员userid,通过获取群发成员发送任务列表接口返回
	UserID string `json:"userid"  validate:"required"`
	// Limit 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值
	Limit int `json:"limit"  `
	// Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
	Cursor string `json:"cursor"  `
}

GetGroupMessageSendResultRequest is request of Client.GetGroupMessageSendResult

type GetGroupMessageSendResultResponse

type GetGroupMessageSendResultResponse struct {
	// NextCursor 分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空
	NextCursor string `json:"next_cursor"  `
	// SendList 群成员发送结果列表
	SendList []GetGroupMessageSendResultResponseSendList `json:"send_list"  `
}

GetGroupMessageSendResultResponse is response of Client.GetGroupMessageSendResult

type GetGroupMessageSendResultResponseSendList

type GetGroupMessageSendResultResponseSendList struct {
	// ExternalUserID 外部联系人userid,群发消息到企业的客户群不返回该字段
	ExternalUserID string `json:"external_userid"  `
	// ChatID 外部客户群id,群发消息到客户不返回该字段
	ChatID string `json:"chat_id"  `
	// UserID 企业服务人员的userid
	UserID string `json:"userid"  `
	// Status 发送状态:0-未发送 1-已发送 2-因客户不是好友导致发送失败 3-因客户已经收到其他群发消息导致发送失败
	Status int `json:"status"  `
	// SendTime 发送时间,发送状态为1时返回
	SendTime int `json:"send_time"  `
}

GetGroupMessageSendResultResponseSendList is model of GetGroupMessageSendResultResponse.SendList

type GetGroupMessageTaskRequest

type GetGroupMessageTaskRequest struct {
	// MessageID 群发消息的id,通过获取群发记录列表接口返回
	MessageID string `json:"msgid"  validate:"required"`
	// Limit 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值
	Limit int `json:"limit"  `
	// Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
	Cursor string `json:"cursor"  `
}

GetGroupMessageTaskRequest is request of Client.GetGroupMessageTask

type GetGroupMessageTaskResponse

type GetGroupMessageTaskResponse struct {
	// NextCursor 分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空
	NextCursor string `json:"next_cursor"  `
	// TaskList 群发成员发送任务列表
	TaskList []GetGroupMessageTaskResponseTaskList `json:"task_list"  `
}

GetGroupMessageTaskResponse is response of Client.GetGroupMessageTask

type GetGroupMessageTaskResponseTaskList

type GetGroupMessageTaskResponseTaskList struct {
	// UserID 企业服务人员的userid
	UserID string `json:"userid"  `
	// Status 发送状态:0-未发送 2-已发送
	Status int `json:"status"  `
	// SendTime 发送时间,未发送时不返回
	SendTime int `json:"send_time"  `
}

GetGroupMessageTaskResponseTaskList is model of GetGroupMessageTaskResponse.TaskList

type GetGroupWelcomeTemplateRequest

type GetGroupWelcomeTemplateRequest struct {
	// TemplateID 群欢迎语的素材id
	TemplateID string `json:"template_id"  validate:"required"`
}

GetGroupWelcomeTemplateRequest is request of Client.GetGroupWelcomeTemplate

type GetGroupWelcomeTemplateResponse

type GetGroupWelcomeTemplateResponse struct {
	Text GetGroupWelcomeTemplateResponseText `json:"text"  `

	Image GetGroupWelcomeTemplateResponseImage `json:"image"  `

	Link GetGroupWelcomeTemplateResponseLink `json:"link"  `

	MiniProgram GetGroupWelcomeTemplateResponseMiniProgram `json:"miniprogram"  `

	File GetGroupWelcomeTemplateResponseFile `json:"file"  `

	Video GetGroupWelcomeTemplateResponseVideo `json:"video"  `
}

GetGroupWelcomeTemplateResponse is response of Client.GetGroupWelcomeTemplate

type GetGroupWelcomeTemplateResponseFile

type GetGroupWelcomeTemplateResponseFile struct {
	// MediaID 文件id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  `
}

GetGroupWelcomeTemplateResponseFile is model of GetGroupWelcomeTemplateResponse.File

type GetGroupWelcomeTemplateResponseImage

type GetGroupWelcomeTemplateResponseImage struct {
	// PicURL 图片的url
	PicURL string `json:"pic_url"  `
}

GetGroupWelcomeTemplateResponseImage is model of GetGroupWelcomeTemplateResponse.Image

type GetGroupWelcomeTemplateResponseLink struct {
	// Title 图文消息标题
	Title string `json:"title"  `
	// PicURL 图文消息封面的url
	PicURL string `json:"picurl"  `
	// Desc 图文消息的描述
	Desc string `json:"desc"  `
	// URL 图文消息的链接
	URL string `json:"url"  `
}

GetGroupWelcomeTemplateResponseLink is model of GetGroupWelcomeTemplateResponse.Link

type GetGroupWelcomeTemplateResponseMiniProgram

type GetGroupWelcomeTemplateResponseMiniProgram struct {
	// Title 小程序消息标题
	Title string `json:"title"  `
	// PicMediaID 小程序消息封面的mediaid
	PicMediaID string `json:"pic_media_id"  `
	// AppID 小程序appid
	AppID string `json:"appid"  `
	// Page 小程序page路径
	Page string `json:"page"  `
}

GetGroupWelcomeTemplateResponseMiniProgram is model of GetGroupWelcomeTemplateResponse.MiniProgram

type GetGroupWelcomeTemplateResponseText

type GetGroupWelcomeTemplateResponseText struct {
	// Content 消息文本内容
	Content string `json:"content"  `
}

GetGroupWelcomeTemplateResponseText is model of GetGroupWelcomeTemplateResponse.Text

type GetGroupWelcomeTemplateResponseVideo

type GetGroupWelcomeTemplateResponseVideo struct {
	// MediaID 视频媒体文件id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  `
}

GetGroupWelcomeTemplateResponseVideo is model of GetGroupWelcomeTemplateResponse.Video

type GetJoinQrcodeRequest

type GetJoinQrcodeRequest struct {
	// SizeType qrcode尺寸类型,1: 171 x 171; 2: 399 x 399; 3: 741 x 741; 4: 2052 x 2052
	SizeType string `json:"size_type"  `
}

GetJoinQrcodeRequest is request of Client.GetJoinQrcode

type GetJoinQrcodeResponse

type GetJoinQrcodeResponse struct {
	// JoinQrcode 二维码链接,有效期7天
	JoinQrcode string `json:"join_qrcode"  `
}

GetJoinQrcodeResponse is response of Client.GetJoinQrcode

type GetMomentCommentsRequest

type GetMomentCommentsRequest struct {
	// MomentID 朋友圈id
	MomentID string `json:"moment_id"  validate:"required"`
	// UserID 企业发表成员userid,如果是企业创建的朋友圈,可以通过获取客户朋友圈企业发表的列表获取已发表成员userid,如果是个人创建的朋友圈,创建人userid就是企业发表成员userid
	UserID string `json:"userid"  validate:"required"`
}

GetMomentCommentsRequest is request of Client.GetMomentComments

type GetMomentCommentsResponse

type GetMomentCommentsResponse struct {
	// CommentList 评论列表
	CommentList []GetMomentCommentsResponseCommentList `json:"comment_list"  `
	// LikeList 点赞列表
	LikeList []GetMomentCommentsResponseLikeList `json:"like_list"  `
}

GetMomentCommentsResponse is response of Client.GetMomentComments

type GetMomentCommentsResponseCommentList

type GetMomentCommentsResponseCommentList struct {
	// ExternalUserID 评论的外部联系人userid
	ExternalUserID string `json:"external_userid"  `
	// UserID 评论的企业成员userid,userid与external_userid不会同时出现
	UserID string `json:"userid"  `
	// CreateTime 评论时间
	CreateTime int `json:"create_time"  `
}

GetMomentCommentsResponseCommentList is model of GetMomentCommentsResponse.CommentList

type GetMomentCommentsResponseLikeList

type GetMomentCommentsResponseLikeList struct {
	// ExternalUserID 点赞的外部联系人userid
	ExternalUserID string `json:"external_userid"  `
	// UserID 点赞的企业成员userid,userid与external_userid不会同时出现
	UserID string `json:"userid"  `
	// CreateTime 点赞时间
	CreateTime int `json:"create_time"  `
}

GetMomentCommentsResponseLikeList is model of GetMomentCommentsResponse.LikeList

type GetMomentCustomerListRequest

type GetMomentCustomerListRequest struct {
	// MomentID 朋友圈id
	MomentID string `json:"moment_id"  validate:"required"`
	// UserID 企业发表成员userid,如果是企业创建的朋友圈,可以通过获取客户朋友圈企业发表的列表获取已发表成员userid,如果是个人创建的朋友圈,创建人userid就是企业发表成员userid
	UserID string `json:"userid"  validate:"required"`
	// Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
	Cursor string `json:"cursor"  `
	// Limit 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值
	Limit int `json:"limit"  `
}

GetMomentCustomerListRequest is request of Client.GetMomentCustomerList

type GetMomentCustomerListResponse

type GetMomentCustomerListResponse struct {
	// NextCursor 分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空
	NextCursor string `json:"next_cursor"  `
	// CustomerList 成员可见客户列表
	CustomerList []GetMomentCustomerListResponseCustomerList `json:"customer_list"  `
}

GetMomentCustomerListResponse is response of Client.GetMomentCustomerList

type GetMomentCustomerListResponseCustomerList

type GetMomentCustomerListResponseCustomerList struct {
	// UserID 发表成员用户userid
	UserID string `json:"userid"  `
	// ExternalUserID 发送成功的外部联系人userid
	ExternalUserID string `json:"external_userid"  `
}

GetMomentCustomerListResponseCustomerList is model of GetMomentCustomerListResponse.CustomerList

type GetMomentListRequest

type GetMomentListRequest struct {
	// StartTime 朋友圈记录开始时间。Unix时间戳
	StartTime int `json:"start_time"  validate:"required"`
	// EndTime 朋友圈记录结束时间。Unix时间戳
	EndTime int `json:"end_time"  validate:"required"`
	// Creator 朋友圈创建人的userid
	Creator string `json:"creator"  `
	// FilterType 朋友圈类型。0:企业发表 1:个人发表 2:所有,包括个人创建以及企业创建,默认情况下为所有类型
	FilterType int `json:"filter_type"  `
	// Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
	Cursor string `json:"cursor"  `
	// Limit 返回的最大记录数,整型,最大值100,默认值100,超过最大值时取默认值
	Limit int `json:"limit"  `
}

GetMomentListRequest is request of Client.GetMomentList

type GetMomentListResponse

type GetMomentListResponse struct {
	// NextCursor 分页游标,下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空
	NextCursor string `json:"next_cursor"  `
	// MomentList 朋友圈列表
	MomentList []GetMomentListResponseMomentList `json:"moment_list"  `
}

GetMomentListResponse is response of Client.GetMomentList

type GetMomentListResponseMomentList

type GetMomentListResponseMomentList struct {
	// MomentID 朋友圈id
	MomentID string `json:"moment_id"  `
	// Creator 朋友圈创建者userid
	Creator string `json:"creator"  `
	// CreateTime 创建时间
	CreateTime string `json:"create_time"  `
	// CreateType 朋友圈创建来源。0:企业 1:个人
	CreateType int `json:"create_type"  `
	// VisibleType 可见范围类型。0:部分可见 1:公开
	VisibleType int `json:"visible_type"  `

	Text GetMomentListResponseMomentListText `json:"text"  `

	Image []GetMomentListResponseMomentListImage `json:"image"  `

	Video GetMomentListResponseMomentListVideo `json:"video"  `

	Link GetMomentListResponseMomentListLink `json:"link"  `

	Location GetMomentListResponseMomentListLocation `json:"location"  `
}

GetMomentListResponseMomentList is model of GetMomentListResponse.MomentList

type GetMomentListResponseMomentListImage

type GetMomentListResponseMomentListImage struct {
	// MediaID 图片的media_id列表,可以通过获取临时素材下载资源
	MediaID string `json:"media_id"  `
}

GetMomentListResponseMomentListImage is model of GetMomentListResponseMomentList.Image

type GetMomentListResponseMomentListLink struct {
	// Title 网页链接标题
	Title string `json:"title"  `
	// URL 网页链接url
	URL string `json:"url"  `
}

GetMomentListResponseMomentListLink is model of GetMomentListResponseMomentList.Link

type GetMomentListResponseMomentListLocation

type GetMomentListResponseMomentListLocation struct {
	// Latitude 地理位置纬度
	Latitude string `json:"latitude"  `
	// Longitude 地理位置经度
	Longitude string `json:"longitude"  `
	// Name 地理位置名称
	Name string `json:"name"  `
}

GetMomentListResponseMomentListLocation is model of GetMomentListResponseMomentList.Location

type GetMomentListResponseMomentListText

type GetMomentListResponseMomentListText struct {
	// Content 文本消息结构
	Content string `json:"content"  `
}

GetMomentListResponseMomentListText is model of GetMomentListResponseMomentList.Text

type GetMomentListResponseMomentListVideo

type GetMomentListResponseMomentListVideo struct {
	// MediaID 视频media_id,可以通过获取临时素材下载资源
	MediaID string `json:"media_id"  `
	// ThumbMediaID 视频封面media_id,可以通过获取临时素材下载资源
	ThumbMediaID string `json:"thumb_media_id"  `
}

GetMomentListResponseMomentListVideo is model of GetMomentListResponseMomentList.Video

type GetMomentSendResultRequest

type GetMomentSendResultRequest struct {
	// MomentID 朋友圈id
	MomentID string `json:"moment_id"  validate:"required"`
	// UserID 企业发表成员userid,如果是企业创建的朋友圈,可以通过获取客户朋友圈企业发表的列表获取已发表成员userid,如果是个人创建的朋友圈,创建人userid就是企业发表成员userid
	UserID string `json:"userid"  validate:"required"`
	// Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
	Cursor string `json:"cursor"  `
	// Limit 返回的最大记录数,整型,最大值5000,默认值3000,超过最大值时取默认值
	Limit int `json:"limit"  `
}

GetMomentSendResultRequest is request of Client.GetMomentSendResult

type GetMomentSendResultResponse

type GetMomentSendResultResponse struct {
	// NextCursor 分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空
	NextCursor string `json:"next_cursor"  `
	// CustomerList 成员发送成功客户列表
	CustomerList []GetMomentSendResultResponseCustomerList `json:"customer_list"  `
}

GetMomentSendResultResponse is response of Client.GetMomentSendResult

type GetMomentSendResultResponseCustomerList

type GetMomentSendResultResponseCustomerList struct {
	// ExternalUserID 成员发送成功的外部联系人userid
	ExternalUserID string `json:"external_userid"  `
}

GetMomentSendResultResponseCustomerList is model of GetMomentSendResultResponse.CustomerList

type GetMomentTaskRequest

type GetMomentTaskRequest struct {
	// MomentID 朋友圈id,仅支持企业发表的朋友圈id
	MomentID string `json:"moment_id"  validate:"required"`
	// Cursor 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
	Cursor string `json:"cursor"  `
	// Limit 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值
	Limit int `json:"limit"  `
}

GetMomentTaskRequest is request of Client.GetMomentTask

type GetMomentTaskResponse

type GetMomentTaskResponse struct {
	// NextCursor 分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空
	NextCursor string `json:"next_cursor"  `
	// TaskList 发表任务列表
	TaskList []GetMomentTaskResponseTaskList `json:"task_list"  `
}

GetMomentTaskResponse is response of Client.GetMomentTask

type GetMomentTaskResponseTaskList

type GetMomentTaskResponseTaskList struct {
	// UserID 发表成员用户userid
	UserID string `json:"userid"  `
	// PublishStatus 成员发表状态。0:未发表 1:已发表
	PublishStatus int `json:"publish_status"  `
}

GetMomentTaskResponseTaskList is model of GetMomentTaskResponse.TaskList

type GetProviderTokenRequest

type GetProviderTokenRequest struct {
	CorpID         string `json:"corpid"`
	ProviderSecret string `json:"provider_secret"`
}

type GetScheduleRequest

type GetScheduleRequest struct {
	// ScheduleIDList 日程ID列表。一次最多拉取1000条
	ScheduleIDList []string `json:"schedule_id_list"  validate:"required"`
}

GetScheduleRequest is request of Client.GetSchedule

type GetScheduleResponse

type GetScheduleResponse struct {
	// ScheduleList obj[]
	ScheduleList []GetScheduleResponseScheduleList `json:"schedule_list"  `
}

GetScheduleResponse is response of Client.GetSchedule

type GetScheduleResponseScheduleList

type GetScheduleResponseScheduleList struct {
	// ScheduleID string
	ScheduleID string `json:"schedule_id"  `
	// Attendees obj[]
	Attendees []GetScheduleResponseScheduleListAttendees `json:"attendees"  `
	// Summary string
	Summary string `json:"summary"  `
	// Description string
	Description string `json:"description"  `
	// Reminders obj
	Reminders GetScheduleResponseScheduleListReminders `json:"reminders"  `
	// Location string
	Location string `json:"location"  `
	// Organizer string
	Organizer string `json:"organizer"  `
	// Status uint32
	Status int `json:"status"  `
	// StartTime uint32
	StartTime int `json:"start_time"  `
	// EndTime uint32
	EndTime int `json:"end_time"  `
	// CalenderID string
	CalenderID string `json:"cal_id"  `
}

GetScheduleResponseScheduleList is model of GetScheduleResponse.ScheduleList

type GetScheduleResponseScheduleListAttendees

type GetScheduleResponseScheduleListAttendees struct {
	// UserID string
	UserID string `json:"userid"  `
	// ResponseStatus uint32
	ResponseStatus int `json:"response_status"  `
}

GetScheduleResponseScheduleListAttendees is model of GetScheduleResponseScheduleList.Attendees

type GetScheduleResponseScheduleListReminders

type GetScheduleResponseScheduleListReminders struct {
	// IsRemind int32
	IsRemind int `json:"is_remind"  `
	// IsRepeat int32
	IsRepeat int `json:"is_repeat"  `
	// RemindBeforeEventSecs uint32
	RemindBeforeEventSecs int `json:"remind_before_event_secs"  `
	// RemindTimeDiffs int32[]
	RemindTimeDiffs []int `json:"remind_time_diffs"  `
	// RepeatType uint32
	RepeatType int `json:"repeat_type"  `
	// RepeatUntil uint32
	RepeatUntil int `json:"repeat_until"  `
	// IsCustomRepeat uint32
	IsCustomRepeat int `json:"is_custom_repeat"  `
	// RepeatInterval uint32
	RepeatInterval int `json:"repeat_interval"  `
	// RepeatDayOfWeek uint32[]
	RepeatDayOfWeek []int `json:"repeat_day_of_week"  `
	// RepeatDayOfMonth uint32[]
	RepeatDayOfMonth []int `json:"repeat_day_of_month"  `
	// Timezone uint32
	Timezone int `json:"timezone"  `
	// ExcludeTimeList obj[]
	ExcludeTimeList []GetScheduleResponseScheduleListRemindersExcludeTimeList `json:"exclude_time_list"  `
}

GetScheduleResponseScheduleListReminders is model of GetScheduleResponseScheduleList.Reminders

type GetScheduleResponseScheduleListRemindersExcludeTimeList

type GetScheduleResponseScheduleListRemindersExcludeTimeList struct {
	// StartTime uint32
	StartTime int `json:"start_time"  `
}

GetScheduleResponseScheduleListRemindersExcludeTimeList is model of GetScheduleResponseScheduleListReminders.ExcludeTimeList

type GetTagRequest

type GetTagRequest struct {
	// TagID 标签ID
	TagID string `json:"tagid"  validate:"required"`
}

GetTagRequest is request of Client.GetTag

type GetTagResponse

type GetTagResponse struct {
	// TagName 标签名
	TagName string `json:"tagname"  `
	// UserList 标签中包含的成员列表
	UserList []GetTagResponseUserItem `json:"userlist"  `
	// PartyList 标签中包含的部门id列表
	PartyList []int `json:"partylist"  `
}

GetTagResponse is response of Client.GetTag

type GetTagResponseUserItem

type GetTagResponseUserItem struct {
	// UserID 成员帐号
	UserID string `json:"userid"`
	// Name 成员名称,代开发自建应用需要管理员授权才返回该字段;此字段从2019年12月30日起,对新创建第三方应用不再返回,2020年6月30日起,对所有历史第三方应用不再返回,后续第三方仅通讯录应用可获取,未返回名称的情况需要通过通讯录展示组件来展示名字
	Name string `json:"name"`
}

type GetUnassignedListRequest

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

GetUnassignedListRequest is request of Client.GetUnassignedList

type GetUnassignedListResponse

type GetUnassignedListResponse struct {
	// IsLast 是否是最后一条记录
	IsLast bool `json:"is_last"  `
	// NextCursor 分页查询游标,已经查完则返回空(“”)
	NextCursor string `json:"next_cursor"  `

	Info []GetUnassignedListResponseInfo `json:"info"  `
}

GetUnassignedListResponse is response of Client.GetUnassignedList

type GetUnassignedListResponseInfo

type GetUnassignedListResponseInfo struct {
	// HandoverUserID 离职成员的userid
	HandoverUserID string `json:"handover_userid"  `
	// ExternalUserID 外部联系人userid
	ExternalUserID string `json:"external_userid"  `
	// DismissionTime 成员离职时间
	DismissionTime int `json:"dimission_time"  `
}

GetUnassignedListResponseInfo is model of GetUnassignedListResponse.Info

type GetUserBehaviorDataRequest

type GetUserBehaviorDataRequest struct {
	// UserID 成员ID列表,最多100个
	UserID []string `json:"userid"  `
	// PartyID 部门ID列表,最多100个
	PartyID []int `json:"partyid"  `
	// StartTime 数据起始时间
	StartTime int `json:"start_time"  validate:"required"`
	// EndTime 数据结束时间
	EndTime int `json:"end_time"  validate:"required"`
}

GetUserBehaviorDataRequest is request of Client.GetUserBehaviorData

type GetUserBehaviorDataResponse

type GetUserBehaviorDataResponse struct {
	BehaviorData []GetUserBehaviorDataResponseBehaviorData `json:"behavior_data"  `
}

GetUserBehaviorDataResponse is response of Client.GetUserBehaviorData

type GetUserBehaviorDataResponseBehaviorData

type GetUserBehaviorDataResponseBehaviorData struct {
	// StatTime 数据日期,为当日0点的时间戳
	StatTime int `json:"stat_time"  `
	// NewApplyCount 发起申请数,成员通过「搜索手机号」、「扫一扫」、「从微信好友中添加」、「从群聊中添加」、「添加共享、分配给我的客户」、「添加单向、双向删除好友关系的好友」、「从新的联系人推荐中添加」等渠道主动向客户发起的好友申请数量。
	NewApplyCount int `json:"new_apply_cnt"  `
	// NewContactCount 新增客户数,成员新添加的客户数量。
	NewContactCount int `json:"new_contact_cnt"  `
	// ChatCount 聊天总数, 成员有主动发送过消息的单聊总数。
	ChatCount int `json:"chat_cnt"  `
	// MessageCount 发送消息数,成员在单聊中发送的消息总数。
	MessageCount int `json:"message_cnt"  `
	// ReplyPercentage 已回复聊天占比,浮点型,客户主动发起聊天后,成员在一个自然日内有回复过消息的聊天数/客户主动发起的聊天数比例,不包括群聊,仅在确有聊天时返回。
	ReplyPercentage float64 `json:"reply_percentage"  `
	// AvgReplyTime 平均首次回复时长,单位为分钟,即客户主动发起聊天后,成员在一个自然日内首次回复的时长间隔为首次回复时长,所有聊天的首次回复总时长/已回复的聊天总数即为平均首次回复时长,不包括群聊,仅在确有聊天时返回。
	AvgReplyTime int `json:"avg_reply_time"  `
	// NegativeFeedbackCount 删除/拉黑成员的客户数,即将成员删除或加入黑名单的客户数。
	NegativeFeedbackCount int `json:"negative_feedback_cnt"  `
}

GetUserBehaviorDataResponseBehaviorData is model of GetUserBehaviorDataResponse.BehaviorData

type GetUserInfoRequest

type GetUserInfoRequest struct {
	AccessToken string `json:"access_token,omitempty"`
	Code        string `json:"code,omitempty"`
}

type GetUserInfoResponse

type GetUserInfoResponse struct {
	UserID         string `json:"UserId,omitempty"`          // 成员UserID
	OpenID         string `json:"OpenId,omitempty"`          // 非企业成员的标识,对当前企业唯一。不超过64字节
	DeviceID       string `json:"DeviceId,omitempty"`        // 手机设备号(由企业微信在安装时随机生成,删除重装会改变,升级不受影响)
	ExternalUserID string `json:"external_userid,omitempty"` // 外部联系人id,当且仅当用户是企业的客户,且跟进人在应用的可见范围内时返回。如果是第三方应用调用,针对同一个客户,同一个服务商不同应用获取到的id相同
}

type GetUserRequest

type GetUserRequest struct {
	// UserID 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节
	UserID string `json:"userid"  validate:"required"`
}

GetUserRequest is request of Client.GetUser

type GetUserResponse

type GetUserResponse struct {
	// UserID 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节
	UserID string `json:"userid"  `
	// Name 成员名称;第三方不可获取,调用时返回userid以代替name;代开发自建应用需要管理员授权才返回;对于非第三方创建的成员,第三方通讯录应用也不可获取;未返回name的情况需要通过通讯录展示组件来展示名字
	Name string `json:"name"  `
	// Mobile 手机号码,代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Mobile string `json:"mobile"  `
	// Department 成员所属部门id列表,仅返回该应用有查看权限的部门id;成员授权模式下,固定返回根部门id,即固定为1
	Department []int `json:"department"  `
	// Order 部门内的排序值,默认为0。数量必须和department一致,数值越大排序越前面。值范围是[0, 2^32)。成员授权模式下不返回该字段
	Order []int `json:"order"  `
	// Position 职务信息;代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Position string `json:"position"  `
	// Gender 性别。0表示未定义,1表示男性,2表示女性
	Gender json.Number `json:"gender"  `
	// Email 邮箱,代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Email string `json:"email"  `
	// IsLeaderInDept 表示在所在的部门内是否为上级。;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	IsLeaderInDept []int `json:"is_leader_in_dept"  `
	// Avatar 头像url。 第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Avatar string `json:"avatar"  `
	// ThumbAvatar 头像缩略图url。第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	ThumbAvatar string `json:"thumb_avatar"  `
	// Telephone 座机。代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Telephone string `json:"telephone"  `
	// Alias 别名;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Alias string `json:"alias"  `
	// ExtAttr 扩展属性,代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	ExtAttr ExtAttrs `json:"extattr"  `
	// Status 激活状态: 1=已激活,2=已禁用,4=未激活,5=退出企业。已激活代表已激活企业微信或已关注微工作台(原企业号)。未激活代表既未激活企业微信又未关注微工作台(原企业号)。
	Status int `json:"status"  `
	// QrCode 员工个人二维码,扫描可添加为外部联系人(注意返回的是一个url,可在浏览器上打开该url以展示二维码);第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	QrCode string `json:"qr_code"  `
	// ExternalProfile 成员对外属性,字段详情见对外属性;代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	ExternalProfile ExternalProfile `json:"external_profile"  `
	// ExternalPosition 对外职务,如果设置了该值,则以此作为对外展示的职务,否则以position来展示。代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	ExternalPosition string `json:"external_position"  `
	// Nickname 对外展示视频号名称(即微信视频号名称)。第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Nickname string `json:"nickname"  `
	// Address 地址。代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Address string `json:"address"  `
	// OpenUserID 全局唯一。对于同一个服务商,不同应用获取到企业内同一个成员的open_userid是相同的,最多64个字节。仅第三方应用可获取
	OpenUserID string `json:"open_userid"  `
	// MainDepartment 主部门
	MainDepartment int `json:"main_department"  `
}

GetUserResponse is response of Client.GetUser

type GetWorkbenchTemplateRequest

type GetWorkbenchTemplateRequest struct {
	// AgentID 应用id
	AgentID int `json:"agentid"  validate:"required"`
}

GetWorkbenchTemplateRequest is request of Client.GetWorkbenchTemplate

type GetWorkbenchTemplateResponse

type GetWorkbenchTemplateResponse struct {
	// AccessToken 是
	AccessToken string `json:"access_token"  `
	// AgentID 是
	AgentID string `json:"agentid"  `
	// UserID 是
	UserID string `json:"userid"  `
	// Type 是
	Type string `json:"type"  `
	// KeyData 否
	KeyData WorkbenchTemplateItemKeyData `json:"keydata"  `
	// Image 否
	Image WorkbenchTemplateItemImage `json:"image"  `
	// List 否
	List []WorkbenchTemplateItemList `json:"list"  `
	// Webview 否
	Webview []WorkbenchTemplateItemWebView `json:"webview"  `
}

GetWorkbenchTemplateResponse is response of Client.GetWorkbenchTemplate

type GroupChatStatisticRequest

type GroupChatStatisticRequest struct {
	// DayBeginTime 起始日期的时间戳,填当天的0时0分0秒(否则系统自动处理为当天的0分0秒)。取值范围:昨天至前180天。
	DayBeginTime int `json:"day_begin_time"  validate:"required"`
	// DayEndTime 结束日期的时间戳,填当天的0时0分0秒(否则系统自动处理为当天的0分0秒)。取值范围:昨天至前180天。如果不填,默认同 day_begin_time(即默认取一天的数据)
	DayEndTime int `json:"day_end_time"  `
	// OwnerFilter 群主过滤。如果不填,表示获取应用可见范围内全部群主的数据(但是不建议这么用,如果可见范围人数超过1000人,为了防止数据包过大,会报错 81017)
	OwnerFilter GroupChatStatisticRequestOwnerFilter `json:"owner_filter"  validate:"required"`
	// OrderBy 排序方式。1 - 新增群的数量2 - 群总数3 - 新增群人数4 - 群总人数默认为1
	OrderBy int `json:"order_by"  `
	// OrderAsc 是否升序。0-否;1-是。默认降序
	OrderAsc int `json:"order_asc"  `
	// Offset 分页,偏移量, 默认为0
	Offset int `json:"offset"  `
	// Limit 分页,预期请求的数据量,默认为500,取值范围 1 ~ 1000
	Limit int `json:"limit"  `
}

GroupChatStatisticRequest is request of Client.GroupChatStatistic

type GroupChatStatisticRequestOwnerFilter

type GroupChatStatisticRequestOwnerFilter struct {
	// UserIDList 群主ID列表。最多100个
	UserIDList []string `json:"userid_list"  validate:"required"`
}

GroupChatStatisticRequestOwnerFilter is model of GroupChatStatisticRequest.OwnerFilter

type GroupChatStatisticResponse

type GroupChatStatisticResponse struct {
	// Total 命中过滤条件的记录总个数
	Total int `json:"total"  `
	// NextOffset 当前分页的下一个offset。当next_offset和total相等时,说明已经取完所有
	NextOffset int `json:"next_offset"  `
	// Items 记录列表。表示某个群主所拥有的客户群的统计数据
	Items []GroupChatStatisticResponseItems `json:"items"  `
}

GroupChatStatisticResponse is response of Client.GroupChatStatistic

type GroupChatStatisticResponseItems

type GroupChatStatisticResponseItems struct {
	// Owner 群主ID
	Owner string `json:"owner"  `
	// Data 详情
	Data GroupChatStatisticResponseItemsData `json:"data"  `
}

GroupChatStatisticResponseItems is model of GroupChatStatisticResponse.Items

type GroupChatStatisticResponseItemsData

type GroupChatStatisticResponseItemsData struct {
	// NewChatCount 新增客户群数量
	NewChatCount int `json:"new_chat_cnt"  `
	// ChatTotal 截至当天客户群总数量
	ChatTotal int `json:"chat_total"  `
	// ChatHasMessage 截至当天有发过消息的客户群数量
	ChatHasMessage int `json:"chat_has_msg"  `
	// NewMemberCount 客户群新增群人数。
	NewMemberCount int `json:"new_member_cnt"  `
	// MemberTotal 截至当天客户群总人数
	MemberTotal int `json:"member_total"  `
	// MemberHasMessage 截至当天有发过消息的群成员数
	MemberHasMessage int `json:"member_has_msg"  `
	// MessageTotal 截至当天客户群消息总数
	MessageTotal int `json:"msg_total"  `
	// MigrateTraineeChatCount 截至当天新增迁移群数(仅教培行业返回)
	MigrateTraineeChatCount int `json:"migrate_trainee_chat_cnt"  `
}

GroupChatStatisticResponseItemsData is model of GroupChatStatisticResponseItems.Data

type IPListResponse

type IPListResponse struct {
	IPList []string `json:"ip_list"`
}

type JsSdkAgentConfig

type JsSdkAgentConfig struct {
	CorpID    string `json:"corpid"`
	AgentID   int    `json:"agentid"`
	Timestamp int64  `json:"timestamp"`
	Nonce     string `json:"nonceStr"`
	Signature string `json:"signature"`
}

func (*JsSdkAgentConfig) Sign

func (o *JsSdkAgentConfig) Sign(ticket string, url string)

type JsSdkConfig

type JsSdkConfig struct {
	AppID     string `json:"appId"`
	Timestamp int64  `json:"timestamp"`
	Nonce     string `json:"nonceStr"`
	Signature string `json:"signature"`
}

func (*JsSdkConfig) Sign

func (o *JsSdkConfig) Sign(ticket string, url string)

type LinkGetPermListResponse

type LinkGetPermListResponse struct {
	// UserIds 可见的userids,是用 CorpId + ’/‘ + USERID 拼成的字符串
	UserIds []string `json:"userids"  `
	// DepartmentIds 可见的department_ids,是用 linkedid + ’/‘ + department_id 拼成的字符串
	DepartmentIds []string `json:"department_ids"  `
}

LinkGetPermListResponse is response of Client.LinkGetPermList

type LinkGetUserRequest

type LinkGetUserRequest struct {
	// UserID 该字段用的是互联应用可见范围接口返回的userids参数,用的是 CorpId + ’/‘ + USERID 拼成的字符串
	UserID string `json:"userid"  validate:"required"`
}

LinkGetUserRequest is request of Client.LinkGetUser

type LinkGetUserResponse

type LinkGetUserResponse struct {
	// UserInfo 成员的详细信息,user包含的属性可在管理端配置
	UserInfo LinkGetUserResponseUserInfo `json:"user_info"  `
}

LinkGetUserResponse is response of Client.LinkGetUser

type LinkGetUserResponseUserInfo

type LinkGetUserResponseUserInfo struct {
	// UserID 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节
	UserID string `json:"userid"`
	// Name 成员真实名称
	Name string `json:"name"`
	// Mobile 手机号码
	Mobile string `json:"mobile"`
	// Department 成员所属部门id列表,这个字段会返回在应用可见范围内,该用户所在的所有互联企业的部门
	Department []string `json:"department"`
	// Position 职务信息
	Position string `json:"position"`
	// Email 邮箱
	Email string `json:"email"`
	// Telephone 座机
	Telephone string `json:"telephone"`
	// CorpID 所属企业的corpid
	CorpID string `json:"corpid"`
	// ExtAttr 扩展属性
	ExtAttr ExtAttrs `json:"extattr"`
}

LinkGetUserResponseUserInfo is model of LinkGetUserResponse.UserInfo

type LinkListDepartmentRequest

type LinkListDepartmentRequest struct {
	// DepartmentID 该字段用的是互联应用可见范围接口返回的department_ids参数,用的是 linkedid + ’/‘ + department_id 拼成的字符串
	DepartmentID string `json:"department_id"  validate:"required"`
}

LinkListDepartmentRequest is request of Client.LinkListDepartment

type LinkListDepartmentResponse

type LinkListDepartmentResponse struct {
	// DepartmentList 部门列表
	DepartmentList []LinkListDepartmentResponseItem `json:"department_list"  `
}

LinkListDepartmentResponse is response of Client.LinkListDepartment

type LinkListDepartmentResponseItem

type LinkListDepartmentResponseItem struct {
	// DepartmentID 部门id
	DepartmentID string `json:"department_id"`
	// DepartmentName 部门名称
	DepartmentName string `json:"department_name"`
	// ParentID 上级部门的id
	ParentID string `json:"parentid"`
	// Order 排序值
	Order int `json:"order"`
}

LinkListDepartmentResponseItem is item model of LinkListDepartmentResponse.DepartmentList

type LinkListUserRequest

type LinkListUserRequest struct {
	// DepartmentID 该字段用的是互联应用可见范围接口返回的department_ids参数,用的是 linkedid + ’/‘ + department_id 拼成的字符串
	DepartmentID string `json:"department_id"  validate:"required"`
	// FetchChild 是否递归获取子部门下面的成员:1-递归获取,0-只获取本部门,不传默认只获取本部门成员
	FetchChild bool `json:"fetch_child"  `
}

LinkListUserRequest is request of Client.LinkListUser

type LinkListUserResponse

type LinkListUserResponse struct {
	// UserList 成员列表,user包含的属性可在管理端配置
	UserList []LinkListUserResponseItem `json:"userlist"  `
}

LinkListUserResponse is response of Client.LinkListUser

type LinkListUserResponseItem

type LinkListUserResponseItem struct {
	// UserID 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节
	UserID string `json:"userid"`
	// Name 成员真实名称
	Name string `json:"name"`
	// Mobile 手机号码
	Mobile string `json:"mobile"`
	// Department 成员所属部门id列表,这个字段只会返回传入的department_id所属的互联企业里的部门id
	Department []string `json:"department"`
	// Position 职务信息
	Position string `json:"position"`
	// Email 邮箱
	Email string `json:"email"`
	// Telephone 座机
	Telephone string `json:"telephone"`
	// CorpID 所属企业的corpid
	CorpID string `json:"corpid"`
	// ExtAttr 扩展属性
	ExtAttr ExtAttrs `json:"extattr"`
}

LinkListUserResponseItem is item model of LinkListUserResponse.UserList

type LinkSimpleListUserRequest

type LinkSimpleListUserRequest struct {
	// DepartmentID 该字段用的是互联应用可见范围接口返回的department_ids参数,用的是 linkedid + ’/‘ + department_id 拼成的字符串
	DepartmentID string `json:"department_id"  validate:"required"`
	// FetchChild 是否递归获取子部门下面的成员:1-递归获取,0-只获取本部门,不传默认只获取本部门成员
	FetchChild bool `json:"fetch_child"  `
}

LinkSimpleListUserRequest is request of Client.LinkSimpleListUser

type LinkSimpleListUserResponse

type LinkSimpleListUserResponse struct {
	// UserList 成员列表
	UserList []LinkSimpleListUserResponseItem `json:"userlist"  `
}

LinkSimpleListUserResponse is response of Client.LinkSimpleListUser

type LinkSimpleListUserResponseItem

type LinkSimpleListUserResponseItem struct {
	// UserID 成员UserID。对应管理端的帐号
	UserID string `json:"userid"`
	// Name 成员真实名称
	Name string `json:"name"`
	// Department 成员所属部门id列表,这个字段只会返回传入的department_id所属的互联企业里的部门id
	Department []string `json:"department"`
	// CorpID 所属企业的corpid
	CorpID string `json:"corpid"`
}

LinkSimpleListUserResponseItem is item model of LinkSimpleListUserResponse.UserList

type ListAgentResponse

type ListAgentResponse struct {
	// AgentList AgentItemArray
	AgentList []ListAgentResponseItem `json:"agentlist"  `
}

ListAgentResponse is response of Client.ListAgent

type ListAgentResponseItem

type ListAgentResponseItem struct {
	AgentID       int    `json:"agentid"`
	Name          string `json:"name"`
	SquareLogoURL string `json:"square_logo_url"`
}

ListAgentResponseItem is model of ListAgentResponse.AgentList

type ListDepartmentRequest

type ListDepartmentRequest struct {
	// ID 部门id。获取指定部门及其下的子部门(以及及子部门的子部门等等,递归)。 如果不填,默认获取全量组织架构
	ID int `json:"id"  `
}

ListDepartmentRequest is request of Client.ListDepartment

type ListDepartmentResponse

type ListDepartmentResponse struct {
	// Department 部门列表数据。
	Department []ListDepartmentResponseItem `json:"department"  `
}

ListDepartmentResponse is response of Client.ListDepartment

type ListDepartmentResponseItem

type ListDepartmentResponseItem struct {
	// ID 创建的部门id
	ID int `json:"id"`
	// Name 部门名称,代开发自建应用需要管理员授权才返回;此字段从2019年12月30日起,对新创建第三方应用不再返回,2020年6月30日起,对所有历史第三方应用不再返回name,返回的name字段使用id代替,后续第三方仅通讯录应用可获取,未返回名称的情况需要通过通讯录展示组件来展示部门名称
	Name string `json:"name"`
	// NameEn 英文名称,此字段从2019年12月30日起,对新创建第三方应用不再返回,2020年6月30日起,对所有历史第三方应用不再返回该字段
	NameEn string `json:"name_en"`
	// ParentID 父部门id。根部门为1
	ParentID int `json:"parentid"`
	// Order 在父部门中的次序值。order值大的排序靠前。值范围是[0, 2^32)
	Order int `json:"order"`
}

ListDepartmentResponseItem is item model of ListDepartmentResponse.Department

type ListExternalContactRequest

type ListExternalContactRequest struct {
	// UserID 企业成员的userid
	UserID string `json:"userid"  validate:"required"`
}

ListExternalContactRequest is request of Client.ListExternalContact

type ListExternalContactResponse

type ListExternalContactResponse struct {
	// ExternalUserID 外部联系人的userid列表
	ExternalUserID []string `json:"external_userid"  `
}

ListExternalContactResponse is response of Client.ListExternalContact

type ListGroupChatRequest

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

ListGroupChatRequest is request of Client.ListGroupChat

type ListGroupChatRequestOwnerFilter

type ListGroupChatRequestOwnerFilter struct {
	// UserIDList 用户ID列表。最多100个
	UserIDList []string `json:"userid_list"  `
}

ListGroupChatRequestOwnerFilter is model of ListGroupChatRequest.OwnerFilter

type ListGroupChatResponse

type ListGroupChatResponse struct {
	// GroupChatList 客户群列表
	GroupChatList []ListGroupChatResponseGroupChatList `json:"group_chat_list"  `
	// NextCursor 分页游标,下次请求时填写以获取之后分页的记录。如果该字段返回空则表示已没有更多数据
	NextCursor string `json:"next_cursor"  `
}

ListGroupChatResponse is response of Client.ListGroupChat

type ListGroupChatResponseGroupChatList

type ListGroupChatResponseGroupChatList struct {
	// ChatID 客户群ID
	ChatID string `json:"chat_id"  `
	// Status 客户群跟进状态。0 - 跟进人正常1 - 跟进人离职2 - 离职继承中3 - 离职继承完成
	Status int `json:"status"  `
}

ListGroupChatResponseGroupChatList is model of ListGroupChatResponse.GroupChatList

type ListTagResponse

type ListTagResponse struct {
	// TagList 标签列表
	TagList []ListTagResponseItem `json:"taglist"  `
}

ListTagResponse is response of Client.ListTag

type ListTagResponseItem

type ListTagResponseItem struct {
	// TagID 标签id
	TagID int `json:"tagid"`
	// TagName 标签名
	TagName string `json:"tagname"`
}

ListTagResponseItem is model of ListTagResponse.TagList

type ListUserRequest

type ListUserRequest struct {
	// DepartmentID 获取的部门id
	DepartmentID string `json:"department_id"  validate:"required"`
	// FetchChild 1/0:是否递归获取子部门下面的成员
	FetchChild string `json:"fetch_child"  `
}

ListUserRequest is request of Client.ListUser

type ListUserResponse

type ListUserResponse struct {
	// UserList 成员列表
	UserList []ListUserResponseItem `json:"userlist"  `
}

ListUserResponse is response of Client.ListUser

type ListUserResponseItem

type ListUserResponseItem struct {
	// UserID 成员UserID。对应管理端的帐号
	UserID string `json:"userid"`
	// Name 成员名称;第三方不可获取,调用时返回userid以代替name;代开发自建应用需要管理员授权才返回;对于非第三方创建的成员,第三方通讯录应用也不可获取;未返回名称的情况需要通过通讯录展示组件来展示名字
	Name string `json:"name"`
	// Mobile 手机号码,代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Mobile string `json:"mobile"`
	// Department 成员所属部门id列表,仅返回该应用有查看权限的部门id
	Department []int `json:"department"`
	// Order 部门内的排序值,默认为0。数量必须和department一致,数值越大排序越前面。值范围是[0, 2^32)
	Order []int `json:"order"`
	// Position 职务信息;代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Position string `json:"position"`
	// Gender 性别。0表示未定义,1表示男性,2表示女性
	Gender string `json:"gender"`
	// Email 邮箱,代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Email string `json:"email"`
	// BizMail 企业邮箱,代开发自建应用不返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取;上游企业不可获取下游企业成员该字段
	BizMail string `json:"biz_mail"`
	// IsLeaderInDept 表示在所在的部门内是否为上级。0-否;1-是。是一个列表,数量必须与department一致。第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	IsLeaderInDept []int `json:"is_leader_in_dept"`
	// Avatar 头像url。 第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Avatar string `json:"avatar"`
	// ThumbAvatar 头像缩略图url。第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	ThumbAvatar string `json:"thumb_avatar"`
	// Telephone 座机。代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Telephone string `json:"telephone"`
	// Alias 别名;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Alias string `json:"alias"`
	// ExtAttr 扩展属性,代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	ExtAttr ExtAttrs `json:"extattr"`
	// Status 激活状态: 1=已激活,2=已禁用,4=未激活,5=退出企业。已激活代表已激活企业微信或已关注微工作台(原企业号)。未激活代表既未激活企业微信又未关注微工作台(原企业号)。
	Status int `json:"status"`
	// QrCode 员工个人二维码,扫描可添加为外部联系人(注意返回的是一个url,可在浏览器上打开该url以展示二维码);第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	QrCode string `json:"qr_code"`
	// ExternalProfile 成员对外属性,字段详情见对外属性;代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	ExternalProfile ExternalProfile `json:"external_profile"`
	// ExternalPosition 对外职务,如果设置了该值,则以此作为对外展示的职务,否则以position来展示。代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	ExternalPosition string `json:"external_position"`
	// Address 地址。代开发自建应用需要管理员授权才返回;第三方仅通讯录应用可获取;对于非第三方创建的成员,第三方通讯录应用也不可获取
	Address string `json:"address"`
	// OpenUserID 全局唯一。对于同一个服务商,不同应用获取到企业内同一个成员的open_userid是相同的,最多64个字节。仅第三方应用可获取
	OpenUserID string `json:"open_userid"`
	// MainDepartment 主部门
	MainDepartment int    `json:"main_department"`
	EnglishName    string `json:"english_name"`
	HideMobile     int    `json:"hide_mobile"`
}

ListUserResponseItem is item model of ListUserResponse.UserList

type LocationPushEvent

type LocationPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// AppType app类型,在企业微信固定返回wxwork,在微信不返回该字段
	AppType string `xml:"AppType" json:"AppType"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型:LOCATION
	Event string `xml:"Event" json:"Event"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// Latitude 地理位置纬度
	Latitude string `xml:"Latitude" json:"Latitude"`
	// Longitude 地理位置经度
	Longitude string `xml:"Longitude" json:"Longitude"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// Precision 地理位置精度
	Precision string `xml:"Precision" json:"Precision"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

LocationPushEvent 上报地理位置 成员同意上报地理位置后,每次在进入应用会话时都会上报一次地理位置。企业可以在管理端修改应用是否需要获取地理位置权限。

see https://work.weixin.qq.com/api/doc/90000/90135/90240

func (LocationPushEvent) EventType

func (LocationPushEvent) EventType() string

EventType impl EventModel

func (LocationPushEvent) MessageType

func (LocationPushEvent) MessageType() string

MessageType impl MessageModel

type MarkTagExternalContactRequest

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

MarkTagExternalContactRequest is request of Client.MarkTagExternalContact

type MessageAuditCheckRoomAgreeRequest

type MessageAuditCheckRoomAgreeRequest struct {
	// RoomID 待查询的roomid
	RoomID string `json:"roomid"  validate:"required"`
}

type MessageAuditCheckRoomAgreeResponse

type MessageAuditCheckRoomAgreeResponse struct {
	// AgreeInfo 同意情况
	AgreeInfo []struct {
		// ExternalOpenID 外部成员的exteranalopenid
		ExternalOpenID string `json:"exteranalopenid"  validate:"required"`
		// AgreeStatus 同意:”Agree”,不同意:”Disagree”
		AgreeStatus string `json:"agree_status"  `
		// StatusChangeTime 同意状态改变的具体时间,utc时间
		StatusChangeTime int64 `json:"status_change_time"  `
	} `json:"agreeinfo"  `
}

type MessageAuditCheckSingleAgreeRequest

type MessageAuditCheckSingleAgreeRequest struct {
	// Info 待查询的会话信息,数组
	Info []struct {
		// UserID 内部成员的userid
		UserID string `json:"userid"  validate:"required"`
		// ExternalOpenID 外部成员的exteranalopenid
		ExternalOpenID string `json:"exteranalopenid"  validate:"required"`
	} `json:"info"  validate:"required"`
}

type MessageAuditCheckSingleAgreeResponse

type MessageAuditCheckSingleAgreeResponse struct {
	// AgreeInfo 同意情况
	AgreeInfo []struct {
		// UserID 内部成员的userid
		UserID string `json:"userid"  validate:"required"`
		// ExternalOpenID 外部成员的exteranalopenid
		ExternalOpenID string `json:"exteranalopenid"  validate:"required"`
		// AgreeStatus 同意:”Agree”,不同意:”Disagree”
		AgreeStatus string `json:"agree_status"  `
		// StatusChangeTime 同意状态改变的具体时间,utc时间
		StatusChangeTime int64 `json:"status_change_time"  `
	} `json:"agreeinfo"  `
}

type MessageAuditGetGroupChatMember

type MessageAuditGetGroupChatMember struct {
	// MemberID roomid群成员的id,userid
	MemberID string `json:"memberid"  `
	// JoinTime roomid群成员的入群时间
	JoinTime int64 `json:"jointime"  `
}

type MessageAuditGetGroupChatRequest

type MessageAuditGetGroupChatRequest struct {
	// RoomID 待查询的群id
	RoomID string `json:"roomid"  validate:"required"`
}

MessageAuditGetGroupChatRequest is request of Client.MessageAuditGetGroupChat

type MessageAuditGetGroupChatResponse

type MessageAuditGetGroupChatResponse struct {
	// RoomName roomid对应的群名称
	RoomName string `json:"roomname"  `
	// Creator roomid对应的群创建者,userid
	Creator string `json:"creator"  `
	// RoomCreateTime roomid对应的群创建时间
	RoomCreateTime int `json:"room_create_time"  `
	// Notice roomid对应的群公告
	Notice string `json:"notice"  `
	// Members roomid对应的群成员列表
	Members []MessageAuditGetGroupChatMember `json:"members"  `
}

MessageAuditGetGroupChatResponse is response of Client.MessageAuditGetGroupChat

type MessageAuditGetPermitUserListRequest

type MessageAuditGetPermitUserListRequest struct {
	// Type 拉取对应版本的开启成员列表。1表示办公版;2表示服务版;3表示企业版。非必填,不填写的时候返回全量成员列表。
	Type int `json:"type"  `
}

MessageAuditGetPermitUserListRequest is request of Client.MessageAuditGetPermitUserList

type MessageAuditGetPermitUserListResponse

type MessageAuditGetPermitUserListResponse struct {
	// Ids 设置在开启范围内的成员的userid列表
	Ids []string `json:"ids"  `
}

MessageAuditGetPermitUserListResponse is response of Client.MessageAuditGetPermitUserList

type MessageAuditNotifyPushEvent

type MessageAuditNotifyPushEvent struct {
	XMLName      xml.Name `xml:"xml"`
	ToUserName   string   `xml:"ToUserName"`
	FromUserName string   `xml:"FromUserName"`
	CreateTime   string   `xml:"CreateTime"`
	MsgType      string   `xml:"MsgType"`
	AgentID      int      `xml:"AgentID"` // 企业应用的id
	Event        string   `xml:"Event"`
}

MessageAuditNotifyPushEvent 企业收到或发送新消息时,企业微信可以以事件的形式推送到企业指定的url。回调间隔为15秒,在15秒内若有消息则触发回调,若无消息则不会触发回调。

func (MessageAuditNotifyPushEvent) EventType

func (MessageAuditNotifyPushEvent) EventType() string

type MessageContent

type MessageContent interface {
	MessageType() string
}

type MessageImagePushEvent

type MessageImagePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MediaID 图片媒体文件id,可以调用获取媒体文件接口拉取,仅三天内有效
	MediaID string `xml:"MediaId" json:"MediaId"`
	// MsgID 消息id,64位整型
	MsgID string `xml:"MsgId" json:"MsgId"`
	// MsgType 消息类型,此时固定为:image
	MsgType string `xml:"MsgType" json:"MsgType"`
	// PicURL 图片链接
	PicURL string `xml:"PicUrl" json:"PicUrl"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

MessageImagePushEvent 图片消息

see https://work.weixin.qq.com/api/doc/90000/90135/90239

func (MessageImagePushEvent) EventType

func (e MessageImagePushEvent) EventType() string

EventType impl EventModel

func (MessageImagePushEvent) MessageType

func (MessageImagePushEvent) MessageType() string

MessageType impl MessageModel

type MessageLinkPushEvent

type MessageLinkPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Description 描述
	Description string `xml:"Description" json:"Description"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgID 消息id,64位整型
	MsgID string `xml:"MsgId" json:"MsgId"`
	// MsgType 消息类型,此时固定为:link
	MsgType string `xml:"MsgType" json:"MsgType"`
	// PicURL 封面缩略图的url
	PicURL string `xml:"PicUrl" json:"PicUrl"`
	// Title 标题
	Title string `xml:"Title" json:"Title"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
	// URL 链接跳转的url
	URL string `xml:"Url" json:"Url"`
}

MessageLinkPushEvent 链接消息

see https://work.weixin.qq.com/api/doc/90000/90135/90239

func (MessageLinkPushEvent) EventType

func (e MessageLinkPushEvent) EventType() string

EventType impl EventModel

func (MessageLinkPushEvent) MessageType

func (MessageLinkPushEvent) MessageType() string

MessageType impl MessageModel

type MessageLocationPushEvent

type MessageLocationPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// AppType app类型,在企业微信固定返回wxwork,在微信不返回该字段
	AppType string `xml:"AppType" json:"AppType"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// Label 地理位置信息
	Label string `xml:"Label" json:"Label"`
	// LocationX 地理位置纬度
	LocationX string `xml:"Location_X" json:"Location_X"`
	// LocationY 地理位置经度
	LocationY string `xml:"Location_Y" json:"Location_Y"`
	// MsgID 消息id,64位整型
	MsgID string `xml:"MsgId" json:"MsgId"`
	// MsgType 消息类型,此时固定为: location
	MsgType string `xml:"MsgType" json:"MsgType"`
	// Scale 地图缩放大小
	Scale string `xml:"Scale" json:"Scale"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

MessageLocationPushEvent 位置消息

see https://work.weixin.qq.com/api/doc/90000/90135/90239

func (MessageLocationPushEvent) EventType

func (e MessageLocationPushEvent) EventType() string

EventType impl EventModel

func (MessageLocationPushEvent) MessageType

func (MessageLocationPushEvent) MessageType() string

MessageType impl MessageModel

type MessageModel

type MessageModel interface {
	EventModel
	MessageType() string
}

type MessageTextPushEvent

type MessageTextPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// Content 文本消息内容
	Content string `xml:"Content" json:"Content"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgID 消息id,64位整型
	MsgID string `xml:"MsgId" json:"MsgId"`
	// MsgType 消息类型,此时固定为:text
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

MessageTextPushEvent 文本消息

see https://work.weixin.qq.com/api/doc/90000/90135/90239

func (MessageTextPushEvent) EventType

func (e MessageTextPushEvent) EventType() string

EventType impl EventModel

func (MessageTextPushEvent) MessageType

func (MessageTextPushEvent) MessageType() string

MessageType impl MessageModel

type MessageVideoPushEvent

type MessageVideoPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MediaID 视频媒体文件id,可以调用获取媒体文件接口拉取数据,仅三天内有效
	MediaID string `xml:"MediaId" json:"MediaId"`
	// MsgID 消息id,64位整型
	MsgID string `xml:"MsgId" json:"MsgId"`
	// MsgType 消息类型,此时固定为:video
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ThumbMediaID 视频消息缩略图的媒体id,可以调用获取媒体文件接口拉取数据,仅三天内有效
	ThumbMediaID string `xml:"ThumbMediaId" json:"ThumbMediaId"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

MessageVideoPushEvent 视频消息

see https://work.weixin.qq.com/api/doc/90000/90135/90239

func (MessageVideoPushEvent) EventType

func (e MessageVideoPushEvent) EventType() string

EventType impl EventModel

func (MessageVideoPushEvent) MessageType

func (MessageVideoPushEvent) MessageType() string

MessageType impl MessageModel

type MessageVoicePushEvent

type MessageVoicePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Format 语音格式,如amr,speex等
	Format string `xml:"Format" json:"Format"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MediaID 语音媒体文件id,可以调用获取媒体文件接口拉取数据,仅三天内有效
	MediaID string `xml:"MediaId" json:"MediaId"`
	// MsgID 消息id,64位整型
	MsgID string `xml:"MsgId" json:"MsgId"`
	// MsgType 消息类型,此时固定为:voice
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

MessageVoicePushEvent 语音消息

see https://work.weixin.qq.com/api/doc/90000/90135/90239

func (MessageVoicePushEvent) EventType

func (e MessageVoicePushEvent) EventType() string

EventType impl EventModel

func (MessageVoicePushEvent) MessageType

func (MessageVoicePushEvent) MessageType() string

MessageType impl MessageModel

type ModifyCalendarPushEvent

type ModifyCalendarPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// CalID 日历ID
	CalID string `xml:"CalId" json:"CalId"`
	// CreateTime 消息创建时间,unix时间戳
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型,此时固定为:modify_calendar
	Event string `xml:"Event" json:"Event"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

ModifyCalendarPushEvent 修改日历事件 当用户修改了API创建的日历时,触发该事件。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93651

func (ModifyCalendarPushEvent) EventType

func (ModifyCalendarPushEvent) EventType() string

EventType impl EventModel

func (ModifyCalendarPushEvent) MessageType

func (ModifyCalendarPushEvent) MessageType() string

MessageType impl MessageModel

type ModifySchedulePushEvent

type ModifySchedulePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// CalID 日历ID
	CalID string `xml:"CalId" json:"CalId"`
	// CreateTime 消息创建时间,unix时间戳
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型,此时固定为:modify_schedule
	Event string `xml:"Event" json:"Event"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ScheduleID 日程ID
	ScheduleID string `xml:"ScheduleId" json:"ScheduleId"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

ModifySchedulePushEvent 修改日程事件 当用户在API创建的日历上修改了日程后,触发该事件。

see https://open.work.weixin.qq.com/api/doc/90000/90135/93651

func (ModifySchedulePushEvent) EventType

func (ModifySchedulePushEvent) EventType() string

EventType impl EventModel

func (ModifySchedulePushEvent) MessageType

func (ModifySchedulePushEvent) MessageType() string

MessageType impl MessageModel

type OpaqueToken

type OpaqueToken interface {
	GetAccessToken() string
	GetExpiresIn() int
}

type OpenApprovalChangePushEvent

type OpenApprovalChangePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// ApplyTime 提交申请时间
	ApplyTime string `xml:"ApplyTime" json:"ApplyTime"`
	// ApplyUserID 提交者userid
	ApplyUserID string `xml:"ApplyUserId" json:"ApplyUserId"`
	// ApplyUserImage 提交者头像
	ApplyUserImage string `xml:"ApplyUserImage" json:"ApplyUserImage"`
	// ApplyUserName 提交者姓名
	ApplyUserName string `xml:"ApplyUserName" json:"ApplyUserName"`
	// ApplyUserParty 提交者所在部门
	ApplyUserParty string `xml:"ApplyUserParty" json:"ApplyUserParty"`
	// ApprovalInfo 审批信息
	ApprovalInfo string `xml:"ApprovalInfo" json:"ApprovalInfo"`
	// ApprovalNode 审批流程信息,可以有多个审批节点
	ApprovalNode string `xml:"ApprovalNode" json:"ApprovalNode"`
	// ApprovalNodes 审批流程信息
	ApprovalNodes string `xml:"ApprovalNodes" json:"ApprovalNodes"`
	// Approverstep 当前审批节点:0-第一个审批节点;1-第二个审批节点…以此类推
	Approverstep string `xml:"approverstep" json:"approverstep"`
	// CreateTime 消息发送时间
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件名称:open_approval_change
	Event string `xml:"Event" json:"Event"`
	// FromUsername 发送方:企业微信
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// Item 审批节点分支,当节点为标签或上级时,一个节点可能有多个分支
	Item string `xml:"Item" json:"Item"`
	// ItemImage 抄送人头像
	ItemImage string `xml:"ItemImage" json:"ItemImage"`
	// ItemName 抄送人姓名
	ItemName string `xml:"ItemName" json:"ItemName"`
	// ItemOpTime 分支审批人操作时间
	ItemOpTime string `xml:"ItemOpTime" json:"ItemOpTime"`
	// Items 审批节点信息,当节点为标签或上级时,一个节点可能有多个分支
	Items string `xml:"Items" json:"Items"`
	// ItemSpeech 分支审批人审批意见
	ItemSpeech string `xml:"ItemSpeech" json:"ItemSpeech"`
	// ItemStatus 分支审批审批操作状态:1-审批中;2-已同意;3-已驳回;4-已转审
	ItemStatus string `xml:"ItemStatus" json:"ItemStatus"`
	// ItemUserID 抄送人userid
	ItemUserID string `xml:"ItemUserId" json:"ItemUserId"`
	// MsgType 消息类型
	MsgType string `xml:"MsgType" json:"MsgType"`
	// NodeAttr 审批节点属性:1-或签;2-会签
	NodeAttr string `xml:"NodeAttr" json:"NodeAttr"`
	// NodeStatus 节点审批操作状态:1-审批中;2-已同意;3-已驳回;4-已转审
	NodeStatus string `xml:"NodeStatus" json:"NodeStatus"`
	// NodeType 审批节点类型:1-固定成员;2-标签;3-上级
	NodeType string `xml:"NodeType" json:"NodeType"`
	// NotifyNode 抄送人信息
	NotifyNode string `xml:"NotifyNode" json:"NotifyNode"`
	// NotifyNodes 抄送信息,可能有多个抄送人
	NotifyNodes string `xml:"NotifyNodes" json:"NotifyNodes"`
	// OpenSpName 审批模板名称
	OpenSpName string `xml:"OpenSpName" json:"OpenSpName"`
	// OpenSpStatus 申请单当前审批状态:1-审批中;2-已通过;3-已驳回;4-已取消
	OpenSpStatus string `xml:"OpenSpStatus" json:"OpenSpStatus"`
	// OpenTemplateID 审批模板id
	OpenTemplateID string `xml:"OpenTemplateId" json:"OpenTemplateId"`
	// ThirdNo 审批单编号,由开发者在发起申请时自定义
	ThirdNo string `xml:"ThirdNo" json:"ThirdNo"`
	// ToUsername 接收方企业Corpid
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

OpenApprovalChangePushEvent 审批状态通知事件 本事件触发时机为:1.自建/第三方应用调用审批流程引擎发起申请之后,审批状态发生变化时2.自建/第三方应用调用审批流程引擎发起申请之后,在“审批中”状态,有任意审批人进行审批操作时

see https://work.weixin.qq.com/api/doc/90000/90135/90240

func (OpenApprovalChangePushEvent) EventType

func (OpenApprovalChangePushEvent) EventType() string

EventType impl EventModel

func (OpenApprovalChangePushEvent) MessageType

func (OpenApprovalChangePushEvent) MessageType() string

MessageType impl MessageModel

type PreAuthCodeResponse

type PreAuthCodeResponse struct {
	// PreAuthCode 预授权码,最长为512字节
	PreAuthCode string `json:"pre_auth_code"  `
	// ExpiresIn 有效期(秒)
	ExpiresIn int `json:"expires_in"  `
	// ExpireAt 有效期至 - 客户端维护字段
	ExpireAt int64 `json:"expire_at"  `
}

ProviderGetPreAuthCodeResponse is response of Client.ProviderGetPreAuthCode

func (PreAuthCodeResponse) GetAccessToken

func (r PreAuthCodeResponse) GetAccessToken() string

func (PreAuthCodeResponse) GetExpiresIn

func (r PreAuthCodeResponse) GetExpiresIn() int

type ProviderBatchGetResult

type ProviderBatchGetResult struct {
	ContactIDTranslate struct {
		// URL 通讯录转换成功后的url,需要用户通过oauth2授权登录或者单点登录在用户侧打开
		URL string `json:"url"`
	} `json:"contact_id_translate"`
}

type ProviderBatchGetResultRequest

type ProviderBatchGetResultRequest struct {
	// ProviderAccessToken 服务商provider_access_token,获取方法参见服务商的凭证
	ProviderAccessToken string `json:"provider_access_token"  `
	// JobID 异步任务id,最大长度为64字节
	JobID string `json:"jobid"  validate:"required"`
}

ProviderBatchGetResultRequest is request of Client.ProviderBatchGetResult

type ProviderBatchGetResultResponse

type ProviderBatchGetResultResponse struct {
	// Status 任务状态,整型,1表示任务开始,2表示任务进行中,3表示任务已完成
	Status int `json:"status"  `
	// Type 操作类型,字节串,目前有:id_translate
	Type string `json:"type"  `
	// Result 详细的处理结果。当任务完成后此字段有效
	Result ProviderBatchGetResult `json:"result"  `
}

ProviderBatchGetResultResponse is response of Client.ProviderBatchGetResult

type ProviderBatchJobResultPushEvent

type ProviderBatchJobResultPushEvent struct {
	XMLName       xml.Name `xml:"xml" json:"-"`
	ServiceCorpID string   `xml:"ServiceCorpId"`
	InfoType      string   `xml:"InfoType"`
	TimeStamp     string   `xml:"TimeStamp"`
	AuthCorpID    string   `xml:"AuthCorpId"`
	BatchJob      struct {
		// JobId 任务id,最大长度为64字符
		JobID string `xml:"JobId"`
		// JobType 任务类型,目前有contact_id_translate
		JobType string `xml:"JobType"`
		ErrCode int    `xml:"ErrCode"`
		ErrMsg  string `xml:"ErrMsg"`
	} `xml:"BatchJob"`
}

ProviderBatchJobResultPushEvent see https://work.weixin.qq.com/api/doc/90001/90143/91875

func (ProviderBatchJobResultPushEvent) EventType

type ProviderChangeContactCreatePartyPushEvent

type ProviderChangeContactCreatePartyPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AuthCorpID 授权企业的CorpID
	AuthCorpID string `xml:"AuthCorpId" json:"AuthCorpId"`
	// ChangeType 固定为create_party
	ChangeType string `xml:"ChangeType" json:"ChangeType"`
	// ID 部门Id
	ID string `xml:"Id" json:"Id"`
	// InfoType 固定为change_contact
	InfoType string `xml:"InfoType" json:"InfoType"`
	// Name 部门名称
	Name string `xml:"Name" json:"Name"`
	// Order 部门排序
	Order string `xml:"Order" json:"Order"`
	// ParentID 父部门id
	ParentID string `xml:"ParentId" json:"ParentId"`
	// SuiteID 第三方应用ID
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

func (ProviderChangeContactCreatePartyPushEvent) EventChangeType

EventChangeType impl EventChangeModel

func (ProviderChangeContactCreatePartyPushEvent) EventType

EventType impl EventModel

type ProviderGetAdminListRequest

type ProviderGetAdminListRequest struct {
	// AuthCorpID 授权方corpid
	AuthCorpID string `json:"auth_corpid"  validate:"required"`
	// AgentID 授权方安装的应用agentid
	AgentID int `json:"agentid"  validate:"required"`
}

ProviderGetAdminListRequest is request of Client.ProviderGetAdminList

type ProviderGetAdminListResponse

type ProviderGetAdminListResponse struct {
	// Admin 应用的管理员列表(不包括外部管理员),成员授权模式下,不返回系统管理员
	Admin []GetAdminListItem `json:"admin"  `
}

ProviderGetAdminListResponse is response of Client.ProviderGetAdminList

type ProviderGetAuthInfoRequest

type ProviderGetAuthInfoRequest struct {
	// AuthCorpID 授权方corpid
	AuthCorpID string `json:"auth_corpid"  validate:"required"`
	// PermanentCode 永久授权码,通过get_permanent_code获取
	PermanentCode string `json:"permanent_code"  validate:"required"`
}

ProviderGetAuthInfoRequest is request of Client.ProviderGetAuthInfo

type ProviderGetAuthInfoResponse

type ProviderGetAuthInfoResponse struct {
	// AuthCorpInfo 授权方企业信息
	AuthCorpInfo ProviderGetAuthInfoResponseAuthCorpInfo `json:"auth_corp_info"  `
	// AuthInfo 授权信息。如果是通讯录应用,且没开启实体应用,是没有该项的。通讯录应用拥有企业通讯录的全部信息读写权限
	AuthInfo ProviderGetAuthInfoResponseAuthInfo `json:"auth_info"  `
	// DealerCorpInfo 代理服务商企业信息
	DealerCorpInfo ProviderGetAuthInfoResponseDealerCorpInfo `json:"dealer_corp_info"  `
}

ProviderGetAuthInfoResponse is response of Client.ProviderGetAuthInfo

type ProviderGetAuthInfoResponseAuthCorpInfo

type ProviderGetAuthInfoResponseAuthCorpInfo struct {
	// CorpID 授权方企业微信id
	CorpID string `json:"corpid"  `
	// CorpName 授权方企业名称
	CorpName string `json:"corp_name"  `
	// CorpType 授权方企业类型,认证号:verified, 注册号:unverified
	CorpType string `json:"corp_type"  `
	// CorpSquareLogoURL 授权方企业方形头像
	CorpSquareLogoURL string `json:"corp_square_logo_url"  `
	// CorpUserMax 授权方企业用户规模
	CorpUserMax int `json:"corp_user_max"  `
	// CorpFullName 授权方企业的主体名称(仅认证或验证过的企业有),即企业全称。
	CorpFullName string `json:"corp_full_name"  `
	// SubjectType 企业类型,1. 企业; 2. 政府以及事业单位; 3. 其他组织, 4.团队号
	SubjectType int `json:"subject_type"  `
	// VerifiedEndTime 认证到期时间
	VerifiedEndTime int `json:"verified_end_time"  `
	// CorpWxQrCode 授权企业在微工作台(原企业号)的二维码,可用于关注微工作台,二维码有效期为7天
	CorpWxQrCode string `json:"corp_wxqrcode"  `
	// CorpScale 企业规模。当企业未设置该属性时,值为空
	CorpScale string `json:"corp_scale"  `
	// CorpIndustry 企业所属行业。当企业未设置该属性时,值为空
	CorpIndustry string `json:"corp_industry"  `
	// CorpSubIndustry 企业所属子行业。当企业未设置该属性时,值为空
	CorpSubIndustry string `json:"corp_sub_industry"  `
}

ProviderGetAuthInfoResponseAuthCorpInfo is model of ProviderGetAuthInfoResponse.AuthCorpInfo

type ProviderGetAuthInfoResponseAuthInfo

type ProviderGetAuthInfoResponseAuthInfo struct {
	// Agent 授权的应用信息,注意是一个数组,但仅旧的多应用套件授权时会返回多个agent,对新的单应用授权,永远只返回一个agent
	Agent []ProviderGetAuthInfoResponseAuthInfoAgent `json:"agent"  `
}

ProviderGetAuthInfoResponseAuthInfo is model of ProviderGetAuthInfoResponse.AuthInfo

type ProviderGetAuthInfoResponseAuthInfoAgent

type ProviderGetAuthInfoResponseAuthInfoAgent struct {
	// AgentID 授权方应用id
	AgentID int `json:"agentid"  `
	// Name 授权方应用名字
	Name string `json:"name"  `
	// SquareLogoURL 授权方应用方形头像
	SquareLogoURL string `json:"square_logo_url"  `
	// RoundLogoURL 授权方应用圆形头像
	RoundLogoURL string `json:"round_logo_url"  `
	// AppID 旧的多应用套件中的对应应用id,新开发者请忽略
	AppID int `json:"appid"  `
	// AuthMode 授权模式,0为管理员授权;1为成员授权
	AuthMode int `json:"auth_mode"  `
	// IsCustomizedApp 是否为代开发自建应用
	IsCustomizedApp bool `json:"is_customized_app"  `
	// Privilege 应用对应的权限
	Privilege ProviderGetAuthInfoResponseAuthInfoAgentPrivilege `json:"privilege"  `
	// SharedFrom 共享了应用的互联企业信息,仅当由互联的企业共享应用触发的安装时才返回
	SharedFrom ProviderGetAuthInfoResponseAuthInfoAgentSharedFrom `json:"shared_from"  `
}

ProviderGetAuthInfoResponseAuthInfoAgent is model of ProviderGetAuthInfoResponseAuthInfo.Agent

type ProviderGetAuthInfoResponseAuthInfoAgentPrivilege

type ProviderGetAuthInfoResponseAuthInfoAgentPrivilege struct {
	// AllowParty 应用可见范围(部门)
	AllowParty []int `json:"allow_party"  `
	// AllowTag 应用可见范围(标签)
	AllowTag []int `json:"allow_tag"  `
	// AllowUser 应用可见范围(成员)
	AllowUser []string `json:"allow_user"  `
	// ExtraParty 额外通讯录(部门)
	ExtraParty []int `json:"extra_party"  `
	// ExtraUser 额外通讯录(成员)
	ExtraUser []string `json:"extra_user"  `
	// ExtraTag 额外通讯录(标签)
	ExtraTag []int `json:"extra_tag"  `
	// Level 权限等级。1:通讯录基本信息只读2:通讯录全部信息只读(已废弃)3:通讯录全部信息读写4:单个基本信息只读5:通讯录全部信息只写(已废弃)
	Level int `json:"level"  `
}

ProviderGetAuthInfoResponseAuthInfoAgentPrivilege is model of ProviderGetAuthInfoResponseAuthInfoAgent.Privilege

type ProviderGetAuthInfoResponseAuthInfoAgentSharedFrom

type ProviderGetAuthInfoResponseAuthInfoAgentSharedFrom struct {
	// CorpID 共享了应用的互联企业信息,仅当由互联的企业共享应用触发的安装时才返回
	CorpID string `json:"corpid"  `
}

ProviderGetAuthInfoResponseAuthInfoAgentSharedFrom is model of ProviderGetAuthInfoResponseAuthInfoAgent.SharedFrom

type ProviderGetAuthInfoResponseDealerCorpInfo

type ProviderGetAuthInfoResponseDealerCorpInfo struct {
	// CorpID 代理服务商企业微信id
	CorpID string `json:"corpid"  `
	// CorpName 代理服务商企业微信名称
	CorpName string `json:"corp_name"  `
}

ProviderGetAuthInfoResponseDealerCorpInfo is model of ProviderGetAuthInfoResponse.DealerCorpInfo

type ProviderGetCorpTokenRequest

type ProviderGetCorpTokenRequest struct {
	// AuthCorpID 授权方corpid
	AuthCorpID string `json:"auth_corpid"  validate:"required"`
	// PermanentCode 永久授权码,通过get_permanent_code获取
	PermanentCode string `json:"permanent_code"  validate:"required"`
}

ProviderGetCorpTokenRequest is request of Client.ProviderGetCorpToken

type ProviderGetCorpTokenResponse

type ProviderGetCorpTokenResponse struct {
	// AccessToken 授权方(企业)access_token,最长为512字节
	AccessToken string `json:"access_token"  `
	// ExpiresIn 授权方(企业)access_token超时时间
	ExpiresIn int `json:"expires_in"  `
}

ProviderGetCorpTokenResponse is response of Client.ProviderGetCorpToken

func (ProviderGetCorpTokenResponse) GetAccessToken

func (r ProviderGetCorpTokenResponse) GetAccessToken() string

func (ProviderGetCorpTokenResponse) GetExpiresIn

func (r ProviderGetCorpTokenResponse) GetExpiresIn() int

type ProviderGetLoginInfoRequest

type ProviderGetLoginInfoRequest struct {
	AuthCode string `json:"auth_code"`
}

type ProviderGetLoginInfoResponse

type ProviderGetLoginInfoResponse struct {
	// 登录用户的类型:1.创建者 2.内部系统管理员 3.外部系统管理员 4.分级管理员 5.成员
	UserType int `json:"usertype"`
	UserInfo struct {
		// 登录用户的userid,登录用户在通讯录中时返回
		UserID string `json:"userid"`
		// 全局唯一。对于同一个服务商,不同应用获取到企业内同一个成员的open_userid是相同的,最多64个字节。 登录用户在通讯录中返回
		OpenUserID string `json:"open_userid"`
		// Name 登录用户的名字,登录用户在通讯录中时返回,此字段从2019年12月30日起,对新创建服务商不再返回,2020年6月30日起,对所有历史服务商不再返回真实name,使用userid代替name返回,第三方页面需要通过通讯录展示组件来展示名字
		Name   string `json:"name"`
		Avatar string `json:"avatar"`
	} `json:"user_info"`
	CorpInfo struct {
		CorpID string `json:"corpid"`
	} `json:"corp_info"`
	Agent []struct {
		AgentID  int `json:"agentid"`
		AuthType int `json:"auth_type"` // 该管理员对应用的权限:1.管理权限,0.使用权限
	} `json:"agent"` // 该管理员在该提供商中能使用的应用列表,当登录用户为管理员时返回
	AuthInfo struct {
		Department []struct {
			ID       int  `json:"id"`
			Writable bool `json:"writable"`
		} `json:"department"`
	} `json:"auth_info"` // 该管理员拥有的通讯录权限,当登录用户为管理员时返回
}

type ProviderGetPermanentCodeRequest

type ProviderGetPermanentCodeRequest struct {
	// AuthCode 临时授权码,会在授权成功时附加在redirect_uri中跳转回第三方服务商网站,或通过授权成功通知回调推送给服务商。长度为64至512个字节
	AuthCode string `json:"auth_code"  validate:"required"`
}

ProviderGetPermanentCodeRequest is request of Client.ProviderGetPermanentCode

type ProviderGetPermanentCodeResponse

type ProviderGetPermanentCodeResponse struct {
	// AccessToken 授权方(企业)access_token,最长为512字节
	AccessToken string `json:"access_token"  `
	// ExpiresIn 授权方(企业)access_token超时时间(秒)
	ExpiresIn int `json:"expires_in"  `
	// PermanentCode 企业微信永久授权码,最长为512字节
	PermanentCode string `json:"permanent_code"  `
	// AuthCorpInfo 授权方企业信息
	AuthCorpInfo ProviderGetPermanentCodeResponseAuthCorpInfo `json:"auth_corp_info"  `
	// AuthInfo 授权信息。如果是通讯录应用,且没开启实体应用,是没有该项的。通讯录应用拥有企业通讯录的全部信息读写权限
	AuthInfo ProviderGetPermanentCodeResponseAuthInfo `json:"auth_info"  `
	// AuthUserInfo 授权管理员的信息,可能不返回(企业互联由上级企业共享第三方应用给下级时,不返回授权的管理员信息)
	AuthUserInfo ProviderGetPermanentCodeResponseAuthUserInfo `json:"auth_user_info"  `
	// DealerCorpInfo 代理服务商企业信息。应用被代理后才有该信息
	DealerCorpInfo ProviderGetPermanentCodeResponseDealerCorpInfo `json:"dealer_corp_info"  `
	// RegisterCodeInfo 推广二维码安装相关信息,扫推广二维码安装时返回。(注:无论企业是否新注册,只要通过扫推广二维码安装,都会返回该字段)
	RegisterCodeInfo ProviderGetPermanentCodeResponseRegisterCodeInfo `json:"register_code_info"  `
}

ProviderGetPermanentCodeResponse is response of Client.ProviderGetPermanentCode

type ProviderGetPermanentCodeResponseAuthCorpInfo

type ProviderGetPermanentCodeResponseAuthCorpInfo struct {
	// CorpID 授权方企业微信id
	CorpID string `json:"corpid"  `
	// CorpName 授权方企业名称,即企业简称
	CorpName string `json:"corp_name"  `
	// CorpType 授权方企业类型,认证号:verified, 注册号:unverified
	CorpType string `json:"corp_type"  `
	// CorpSquareLogoURL 授权方企业方形头像
	CorpSquareLogoURL string `json:"corp_square_logo_url"  `
	// CorpUserMax 授权方企业用户规模
	CorpUserMax int `json:"corp_user_max"  `
	// CorpAgentMax 授权方企业应用数上限
	CorpAgentMax int `json:"corp_agent_max"  `
	// CorpFullName 授权方企业的主体名称(仅认证或验证过的企业有),即企业全称。
	CorpFullName string `json:"corp_full_name"  `
	// SubjectType 企业类型,1. 企业; 2. 政府以及事业单位; 3. 其他组织, 4.团队号
	SubjectType int `json:"subject_type"  `
	// VerifiedEndTime 认证到期时间
	VerifiedEndTime int `json:"verified_end_time"  `
	// CorpWxQrCode 授权企业在微工作台(原企业号)的二维码,可用于关注微工作台
	CorpWxQrCode string `json:"corp_wxqrcode"  `
	// CorpScale 企业规模。当企业未设置该属性时,值为空
	CorpScale string `json:"corp_scale"  `
	// CorpIndustry 企业所属行业。当企业未设置该属性时,值为空
	CorpIndustry string `json:"corp_industry"  `
	// CorpSubIndustry 企业所属子行业。当企业未设置该属性时,值为空
	CorpSubIndustry string `json:"corp_sub_industry"  `
}

ProviderGetPermanentCodeResponseAuthCorpInfo is model of ProviderGetPermanentCodeResponse.AuthCorpInfo

type ProviderGetPermanentCodeResponseAuthInfo

type ProviderGetPermanentCodeResponseAuthInfo struct {
	// Agent 授权的应用信息,注意是一个数组,但仅旧的多应用套件授权时会返回多个agent,对新的单应用授权,永远只返回一个agent
	Agent []ProviderGetPermanentCodeResponseAuthInfoAgent `json:"agent"  `
}

ProviderGetPermanentCodeResponseAuthInfo is model of ProviderGetPermanentCodeResponse.AuthInfo

type ProviderGetPermanentCodeResponseAuthInfoAgent

type ProviderGetPermanentCodeResponseAuthInfoAgent struct {
	// AgentID 授权方应用id
	AgentID int `json:"agentid"  `
	// Name 授权方应用名字
	Name string `json:"name"  `
	// SquareLogoURL 授权方应用方形头像
	SquareLogoURL string `json:"square_logo_url"  `
	// RoundLogoURL 授权方应用圆形头像
	RoundLogoURL string `json:"round_logo_url"  `
	// AppID 旧的多应用套件中的对应应用id,新开发者请忽略
	AppID int `json:"appid"  `
	// AuthMode 授权模式,0为管理员授权;1为成员授权
	AuthMode int `json:"auth_mode"  `
	// IsCustomizedApp 是否为代开发自建应用
	IsCustomizedApp bool `json:"is_customized_app"  `
	// Privilege 应用对应的权限
	Privilege ProviderGetPermanentCodeResponseAuthInfoAgentPrivilege `json:"privilege"  `
	// SharedFrom 共享了应用的互联企业信息,仅当由互联的企业共享应用触发的安装时才返回
	SharedFrom ProviderGetPermanentCodeResponseAuthInfoAgentSharedFrom `json:"shared_from"  `
}

ProviderGetPermanentCodeResponseAuthInfoAgent is model of ProviderGetPermanentCodeResponseAuthInfo.Agent

type ProviderGetPermanentCodeResponseAuthInfoAgentPrivilege

type ProviderGetPermanentCodeResponseAuthInfoAgentPrivilege struct {
	// AllowParty 应用可见范围(部门)
	AllowParty []int `json:"allow_party"  `
	// AllowTag 应用可见范围(标签)
	AllowTag []int `json:"allow_tag"  `
	// AllowUser 应用可见范围(成员)
	AllowUser []string `json:"allow_user"  `
	// ExtraParty 额外通讯录(部门)
	ExtraParty []int `json:"extra_party"  `
	// ExtraUser 额外通讯录(成员)
	ExtraUser []string `json:"extra_user"  `
	// ExtraTag 额外通讯录(标签)
	ExtraTag []int `json:"extra_tag"  `
	// Level 权限等级。1:通讯录基本信息只读2:通讯录全部信息只读3:通讯录全部信息读写4:单个基本信息只读5:通讯录全部信息只写
	Level int `json:"level"  `
}

ProviderGetPermanentCodeResponseAuthInfoAgentPrivilege is model of ProviderGetPermanentCodeResponseAuthInfoAgent.Privilege

type ProviderGetPermanentCodeResponseAuthInfoAgentSharedFrom

type ProviderGetPermanentCodeResponseAuthInfoAgentSharedFrom struct {
	// CorpID 共享了应用的互联企业信息,仅当由互联的企业共享应用触发的安装时才返回
	CorpID string `json:"corpid"  `
}

ProviderGetPermanentCodeResponseAuthInfoAgentSharedFrom is model of ProviderGetPermanentCodeResponseAuthInfoAgent.SharedFrom

type ProviderGetPermanentCodeResponseAuthUserInfo

type ProviderGetPermanentCodeResponseAuthUserInfo struct {
	// UserID 授权管理员的userid,可能为空(企业互联由上级企业共享第三方应用给下级时,不返回授权的管理员信息)
	UserID string `json:"userid"  `
	// OpenUserID 授权管理员的open_userid,可能为空(企业互联由上级企业共享第三方应用给下级时,不返回授权的管理员信息)
	OpenUserID string `json:"open_userid"  `
	// Name 授权管理员的name,可能为空(企业互联由上级企业共享第三方应用给下级时,不返回授权的管理员信息)
	Name string `json:"name"  `
	// Avatar 授权管理员的头像url,可能为空(企业互联由上级企业共享第三方应用给下级时,不返回授权的管理员信息)
	Avatar string `json:"avatar"  `
}

ProviderGetPermanentCodeResponseAuthUserInfo is model of ProviderGetPermanentCodeResponse.AuthUserInfo

type ProviderGetPermanentCodeResponseDealerCorpInfo

type ProviderGetPermanentCodeResponseDealerCorpInfo struct {
	// CorpID 代理服务商企业微信id
	CorpID string `json:"corpid"  `
	// CorpName 代理服务商企业微信名称
	CorpName string `json:"corp_name"  `
}

ProviderGetPermanentCodeResponseDealerCorpInfo is model of ProviderGetPermanentCodeResponse.DealerCorpInfo

type ProviderGetPermanentCodeResponseRegisterCodeInfo

type ProviderGetPermanentCodeResponseRegisterCodeInfo struct {
	// RegisterCode 注册码
	RegisterCode string `json:"register_code"  `
	// TemplateID 推广包ID
	TemplateID string `json:"template_id"  `
	// State 仅当获取注册码指定该字段时才返回
	State string `json:"state"  `
}

ProviderGetPermanentCodeResponseRegisterCodeInfo is model of ProviderGetPermanentCodeResponse.RegisterCodeInfo

type ProviderGetPreAuthCodeRequest

type ProviderGetPreAuthCodeRequest struct {
	// SuiteAccessToken 第三方应用access_token,最长为512字节
	SuiteAccessToken string `json:"suite_access_token"  `
}

ProviderGetPreAuthCodeRequest is request of Client.ProviderGetPreAuthCode

type ProviderGetSuiteTokenRequest

type ProviderGetSuiteTokenRequest struct {
	// SuiteID 以ww或wx开头应用id(对应于旧的以tj开头的套件id)
	SuiteID string `json:"suite_id"  validate:"required"`
	// SuiteSecret 应用secret
	SuiteSecret string `json:"suite_secret"  validate:"required"`
	// SuiteTicket 企业微信后台推送的ticket
	SuiteTicket string `json:"suite_ticket"  validate:"required"`
}

ProviderGetSuiteTokenRequest is request of Client.ProviderGetSuiteToken

type ProviderIDTranslateContactRequest

type ProviderIDTranslateContactRequest struct {
	// ProviderAccessToken 服务商provider_access_token,获取方法参见服务商的凭证
	ProviderAccessToken string `json:"provider_access_token"  `
	// AuthCorpID 授权企业corpid
	AuthCorpID string `json:"auth_corpid"  validate:"required"`
	// MediaIDList 需要转译的文件的media_id列表,只支持xls/xlsx,doc/docx,csv,txt文件。不超过20个文件,获取方式参考 上传需要转译的文件
	MediaIDList []string `json:"media_id_list"  validate:"required"`
	// OutputFileName 转译完打包的文件名,不需带后缀。企业微信后台会打包成zip压缩文件,并自动拼接上.zip后缀。若media_id_list中文件个数大于1,则该字段必填。若media_id_list中文件个数等于1,且未填该字段,则转译完不打包成压缩文件。支持id转译,参见模版语法
	OutputFileName string `json:"output_file_name"  `
	// OutputFileFormat 当前仅支持输出文件为pdf格式。若media_ id_ list中文件存在相同前缀名的文件,则输出文件命名规则为:文件前缀名_ 文件格式后缀.pdf,例如:20200901_ xlsx.pdf
	OutputFileFormat string `json:"output_file_format"  `
}

ProviderIDTranslateContactRequest is request of Client.ProviderIDTranslateContact

type ProviderIDTranslateContactResponse

type ProviderIDTranslateContactResponse struct {
	// JobID 异步任务id,最大长度为64字节。jobid用于接口 获取异步任务结果 传递
	JobID string `json:"jobid"  `
}

ProviderIDTranslateContactResponse is response of Client.ProviderIDTranslateContact

type ProviderSetSessionInfoRequest

type ProviderSetSessionInfoRequest struct {
	// SuiteAccessToken 第三方应用access_token
	SuiteAccessToken string `json:"suite_access_token"  `
	// PreAuthCode 预授权码
	PreAuthCode string `json:"pre_auth_code"  validate:"required"`
	// SessionInfo 本次授权过程中需要用到的会话信息
	SessionInfo SetSessionInfo `json:"session_info"  validate:"required"`
}

ProviderSetSessionInfoRequest is request of Client.ProviderSetSessionInfo

type ProviderSortContactRequest

type ProviderSortContactRequest struct {
	// ProviderAccessToken 应用提供商的provider_access_token,获取方法参见服务商的凭证
	ProviderAccessToken string `json:"provider_access_token"  `
	// AuthCorpID 查询的企业corpid
	AuthCorpID string `json:"auth_corpid"  validate:"required"`
	// SortType 排序方式 0:根据姓名拼音升序排列,返回用户userid列表 1:根据姓名拼音降序排列,返回用户userid列表
	SortType string `json:"sort_type"  `
	// UserIDList 要排序的userid列表,最多支持1000个
	UserIDList string `json:"useridlist"  validate:"required"`
}

ProviderSortContactRequest is request of Client.ProviderSortContact

type ProviderSortContactResponse

type ProviderSortContactResponse struct {
	// UserIDList 排序后的userid列表
	UserIDList string `json:"useridlist"  `
}

ProviderSortContactResponse is response of Client.ProviderSortContact

type ProviderTokenResponse

type ProviderTokenResponse struct {
	ProviderAccessToken string `json:"provider_access_token"`
	ExpiresIn           int    `json:"expires_in"`
	ExpiresAt           int64  `json:"expires_at"` //  extra
}

func (ProviderTokenResponse) GetAccessToken

func (r ProviderTokenResponse) GetAccessToken() string

func (ProviderTokenResponse) GetExpiresIn

func (r ProviderTokenResponse) GetExpiresIn() int

type ProviderUploadMediaRequest

type ProviderUploadMediaRequest struct {
	Type string `json:"type"  `

	MediaID string `json:"media_id"  `

	CreatedAt string `json:"created_at"  `
}

ProviderUploadMediaRequest is request of Client.ProviderUploadMedia

type ProviderUploadMediaResponse

type ProviderUploadMediaResponse struct {
	// Type 媒体文件类型,分别有图片(image)、语音(voice)、视频(video),普通文件(file)
	Type string `json:"type"  `
	// MediaID 媒体文件上传后获取的唯一标识,3天内有效
	MediaID string `json:"media_id"  `
	// CreatedAt 媒体文件上传时间戳
	CreatedAt string `json:"created_at"  `
}

ProviderUploadMediaResponse is response of Client.ProviderUploadMedia

type PushRequestParams

type PushRequestParams struct {
	MessageSignature string `json:"msg_signature"`
	Timestamp        string `json:"timestamp"`
	Nonce            string `json:"nonce"`
	EchoString       string `json:"echostr,omitempty"` //  验证 URL 时包含
}

PushRequestParams 服务商回调请求 query 参数

type RemarkExternalContactRequest

type RemarkExternalContactRequest struct {
	// UserID 企业成员的userid
	UserID string `json:"userid"  validate:"required"`
	// ExternalUserID 外部联系人userid
	ExternalUserID string `json:"external_userid"  validate:"required"`
	// Remark 此用户对外部联系人的备注,最多20个字符
	Remark string `json:"remark"  `
	// Description 此用户对外部联系人的描述,最多150个字符
	Description string `json:"description"  `
	// RemarkCompany 此用户对外部联系人备注的所属公司名称,最多20个字符
	RemarkCompany string `json:"remark_company"  `
	// RemarkMobiles 此用户对外部联系人备注的手机号
	RemarkMobiles []string `json:"remark_mobiles"  `
	// RemarkPicMediaID 备注图片的mediaid,
	RemarkPicMediaID string `json:"remark_pic_mediaid"  `
}

RemarkExternalContactRequest is request of Client.RemarkExternalContact

type ScheduleGetByCalendarRequest

type ScheduleGetByCalendarRequest struct {
	// CalenderID 日历ID
	CalenderID string `json:"cal_id"  validate:"required"`
	// Offset 分页,偏移量, 默认为0
	Offset int `json:"offset"  `
	// Limit 分页,预期请求的数据量,默认为500,取值范围 1 ~ 1000
	Limit int `json:"limit"  `
}

ScheduleGetByCalendarRequest is request of Client.ScheduleGetByCalendar

type ScheduleGetByCalendarResponse

type ScheduleGetByCalendarResponse struct {
	// ScheduleList obj[]
	ScheduleList []ScheduleGetByCalendarResponseScheduleList `json:"schedule_list"  `
}

ScheduleGetByCalendarResponse is response of Client.ScheduleGetByCalendar

type ScheduleGetByCalendarResponseScheduleList

type ScheduleGetByCalendarResponseScheduleList struct {
	// ScheduleID string
	ScheduleID string `json:"schedule_id"  `
	// Attendees obj[]
	Attendees []ScheduleGetByCalendarResponseScheduleListAttendees `json:"attendees"  `
	// Summary string
	Summary string `json:"summary"  `
	// Description string
	Description string `json:"description"  `
	// Reminders obj
	Reminders ScheduleGetByCalendarResponseScheduleListReminders `json:"reminders"  `
	// Location string
	Location string `json:"location"  `
	// Organizer string
	Organizer string `json:"organizer"  `
	// Status uint32
	Status int `json:"status"  `
	// StartTime uint32
	StartTime int `json:"start_time"  `
	// EndTime uint32
	EndTime int `json:"end_time"  `
	// Sequence uint64
	Sequence int `json:"sequence"  `
	// CalenderID string
	CalenderID string `json:"cal_id"  `
}

ScheduleGetByCalendarResponseScheduleList is model of ScheduleGetByCalendarResponse.ScheduleList

type ScheduleGetByCalendarResponseScheduleListAttendees

type ScheduleGetByCalendarResponseScheduleListAttendees struct {
	// UserID string
	UserID string `json:"userid"  `
	// ResponseStatus uint32
	ResponseStatus int `json:"response_status"  `
}

ScheduleGetByCalendarResponseScheduleListAttendees is model of ScheduleGetByCalendarResponseScheduleList.Attendees

type ScheduleGetByCalendarResponseScheduleListReminders

type ScheduleGetByCalendarResponseScheduleListReminders struct {
	// IsRemind int32
	IsRemind int `json:"is_remind"  `
	// IsRepeat int32
	IsRepeat int `json:"is_repeat"  `
	// RemindBeforeEventSecs uint32
	RemindBeforeEventSecs int `json:"remind_before_event_secs"  `
	// RepeatType uint32
	RepeatType int `json:"repeat_type"  `
	// RepeatUntil uint32
	RepeatUntil int `json:"repeat_until"  `
	// IsCustomRepeat uint32
	IsCustomRepeat int `json:"is_custom_repeat"  `
	// RepeatInterval uint32
	RepeatInterval int `json:"repeat_interval"  `
	// RepeatDayOfWeek uint32[]
	RepeatDayOfWeek []int `json:"repeat_day_of_week"  `
	// RepeatDayOfMonth uint32[]
	RepeatDayOfMonth []int `json:"repeat_day_of_month"  `
	// Timezone uint32
	Timezone int `json:"timezone"  `
}

ScheduleGetByCalendarResponseScheduleListReminders is model of ScheduleGetByCalendarResponseScheduleList.Reminders

type SendFileContent

type SendFileContent struct {
	MediaID string `json:"media_id,omitempty"`
}

func (SendFileContent) MessageType

func (SendFileContent) MessageType() string

type SendImageContent

type SendImageContent struct {
	Base64 string `json:"base64,omitempty"`
	MD5    string `json:"md5,omitempty"`
}

func (SendImageContent) MessageType

func (SendImageContent) MessageType() string

type SendMarkdownContent

type SendMarkdownContent struct {
	Content string `json:"content,omitempty"`
}

func (SendMarkdownContent) MessageType

func (SendMarkdownContent) MessageType() string

type SendNewsArticle

type SendNewsArticle struct {
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	URL         string `json:"url,omitempty"`
	PictureURL  string `json:"picurl,omitempty"`
}

type SendNewsContent

type SendNewsContent struct {
	Articles []SendNewsArticle `json:"articles,omitempty"`
}

func (SendNewsContent) MessageType

func (SendNewsContent) MessageType() string

type SendPayload

type SendPayload struct {
	MessageType  string                   `json:"msgtype"`
	Text         *SendTextContent         `json:"text,omitempty"`
	Markdown     *SendMarkdownContent     `json:"markdown,omitempty"`
	Image        *SendImageContent        `json:"image,omitempty"`
	News         *SendNewsContent         `json:"news,omitempty"`
	File         *SendFileContent         `json:"file,omitempty"`
	TemplateCard *SendTemplateCardContent `json:"template_card,omitempty"`
}

func (*SendPayload) SetContent

func (p *SendPayload) SetContent(c MessageContent) (err error)

type SendTemplateCardContent

type SendTemplateCardContent struct {
	CardType string `json:"card_type"`
	Source   struct {
		IconURL     string `json:"icon_url"`
		Description string `json:"desc"`
	} `json:"source"`
	MainTitle struct {
		Title       string `json:"title"`
		Description string `json:"desc"`
	} `json:"main_title"`
	EmphasisContent struct {
		Title       string `json:"title"`
		Description string `json:"desc"`
	} `json:"emphasis_content"`
	SubTitleText          string `json:"sub_title_text"`
	HorizontalContentList []struct {
		KeyName string `json:"keyname"`
		Value   string `json:"value"`
		Type    int    `json:"type,omitempty"`
		URL     string `json:"url,omitempty"`
		MediaID string `json:"media_id,omitempty"`
	} `json:"horizontal_content_list"`
	JumpList []struct {
		Type     int    `json:"type"`
		URL      string `json:"url,omitempty"`
		Title    string `json:"title"`
		AppID    string `json:"appid,omitempty"`
		PagePath string `json:"pagepath,omitempty"`
	} `json:"jump_list"`
	CardAction struct {
		Type     int    `json:"type"`
		URL      string `json:"url"`
		AppID    string `json:"appid"`
		PagePath string `json:"pagepath"`
	} `json:"card_action"`
}

func (SendTemplateCardContent) MessageType

func (SendTemplateCardContent) MessageType() string

type SendTextContent

type SendTextContent struct {
	Content             string   `json:"content,omitempty"`               // <= 2048byte
	MentionedList       []string `json:"mentioned_list,omitempty"`        // userid or MentionAll
	MentionedMobileList []string `json:"mentioned_mobile_list,omitempty"` // mobile or MentionAll
}

func (SendTextContent) MessageType

func (SendTextContent) MessageType() string

type SendWelcomeMessageRequest

type SendWelcomeMessageRequest struct {
	// WelcomeCode 通过添加外部联系人事件推送给企业的发送欢迎语的凭证,有效期为20秒
	WelcomeCode string `json:"welcome_code"  validate:"required"`
	// Attachments 附件,最多可添加9个附件
	Attachments []SendWelcomeMessageRequestAttachments `json:"attachments"  `

	Text SendWelcomeMessageRequestText `json:"text"  `

	Image SendWelcomeMessageRequestImage `json:"image"  `

	Link SendWelcomeMessageRequestLink `json:"link"  `

	MiniProgram SendWelcomeMessageRequestMiniProgram `json:"miniprogram"  `

	Video SendWelcomeMessageRequestVideo `json:"video"  `

	File SendWelcomeMessageRequestFile `json:"file"  `
}

SendWelcomeMessageRequest is request of Client.SendWelcomeMessage

type SendWelcomeMessageRequestAttachments

type SendWelcomeMessageRequestAttachments struct {
	// MessageType 附件类型,可选image、link、miniprogram或者video
	MessageType string `json:"msgtype"  validate:"required"`
}

SendWelcomeMessageRequestAttachments is model of SendWelcomeMessageRequest.Attachments

type SendWelcomeMessageRequestFile

type SendWelcomeMessageRequestFile struct {
	// MediaID 文件的media_id,  可以通过素材管理接口获得
	MediaID string `json:"media_id"  validate:"required"`
}

SendWelcomeMessageRequestFile is model of SendWelcomeMessageRequest.File

type SendWelcomeMessageRequestImage

type SendWelcomeMessageRequestImage struct {
	// MediaID 图片的media_id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  `
	// PicURL 图片的链接,仅可使用上传图片接口得到的链接
	PicURL string `json:"pic_url"  `
}

SendWelcomeMessageRequestImage is model of SendWelcomeMessageRequest.Image

type SendWelcomeMessageRequestLink struct {
	// Title 图文消息标题,最长为128字节
	Title string `json:"title"  validate:"required"`
	// PicURL 图文消息封面的url
	PicURL string `json:"picurl"  `
	// Desc 图文消息的描述,最长为512字节
	Desc string `json:"desc"  `
	// URL 图文消息的链接
	URL string `json:"url"  validate:"required"`
}

SendWelcomeMessageRequestLink is model of SendWelcomeMessageRequest.Link

type SendWelcomeMessageRequestMiniProgram

type SendWelcomeMessageRequestMiniProgram struct {
	// Title 小程序消息标题,最长为64字节
	Title string `json:"title"  validate:"required"`
	// PicMediaID 小程序消息封面的mediaid,封面图建议尺寸为520*416
	PicMediaID string `json:"pic_media_id"  validate:"required"`
	// AppID 小程序appid,必须是关联到企业的小程序应用
	AppID string `json:"appid"  validate:"required"`
	// Page 小程序page路径
	Page string `json:"page"  validate:"required"`
}

SendWelcomeMessageRequestMiniProgram is model of SendWelcomeMessageRequest.MiniProgram

type SendWelcomeMessageRequestText

type SendWelcomeMessageRequestText struct {
	// Content 消息文本内容,最长为4000字节
	Content string `json:"content"  `
}

SendWelcomeMessageRequestText is model of SendWelcomeMessageRequest.Text

type SendWelcomeMessageRequestVideo

type SendWelcomeMessageRequestVideo struct {
	// MediaID 视频的media_id,可以通过素材管理接口获得
	MediaID string `json:"media_id"  validate:"required"`
}

SendWelcomeMessageRequestVideo is model of SendWelcomeMessageRequest.Video

type SetSessionInfo

type SetSessionInfo struct {
	AppID    []int `json:"appid"`
	AuthType int   `json:"auth_type"` // 0 正式授权, 1 测试授权。 默认值为0
}

type SetWorkbenchDataRequest

type SetWorkbenchDataRequest struct {
	// AgentID 应用id
	AgentID int `json:"agentid"  validate:"required"`
	// UserID 需要设置的用户的userid
	UserID string `json:"userid"  validate:"required"`
	// Type 目前支持  “keydata”、 “image”、 “list” 、”webview”
	Type string `json:"type"  validate:"required"`
	// KeyData 若type指定为 “keydata”,则需要设置关键数据型模版数据,数据结构参考“关键数据型”
	KeyData WorkbenchTemplateItemKeyData `json:"keydata"  `
	// Image 若type指定为 “image”,则需要设置图片型模版数据,数据结构参考“图片型”
	Image WorkbenchTemplateItemImage `json:"image"  `
	// List 若type指定为 “list”,则需要设置列表型模版数据,数据结构参考“列表型”
	List []WorkbenchTemplateItemList `json:"list"  `
	// Webview 若type指定为 “webview”,则需要设置webview型模版数据,数据结构参考“webview数据型”
	Webview []WorkbenchTemplateItemWebView `json:"webview"  `
}

SetWorkbenchDataRequest is request of Client.SetWorkbenchData

type SetWorkbenchDataResponse

type SetWorkbenchDataResponse struct {
	// AccessToken 是
	AccessToken string `json:"access_token"  `
	// AgentID 是
	AgentID string `json:"agentid"  `
	// UserID 是
	UserID string `json:"userid"  `
	// Type 是
	Type string `json:"type"  `
	// KeyData 否
	KeyData string `json:"keydata"  `
	// Image 否
	Image string `json:"image"  `
	// List 否
	List string `json:"list"  `
	// Webview 否
	Webview string `json:"webview"  `
}

SetWorkbenchDataResponse is response of Client.SetWorkbenchData

type SetWorkbenchTemplateRequest

type SetWorkbenchTemplateRequest struct {
	// Type 模版类型,目前支持的自定义类型包括 “keydata”、 “image”、 “list”、 “webview” 。若设置的type为 “normal”,则相当于从自定义模式切换为普通宫格或者列表展示模式
	Type string `json:"type"  validate:"required"`
	// AgentID 应用id
	AgentID int `json:"agentid"  validate:"required"`
	// KeyData 若type指定为 “keydata”,且需要设置企业级别默认数据,则需要设置关键数据型模版数据,数据结构参考“关键数据型”
	KeyData WorkbenchTemplateItemKeyData `json:"keydata"  `
	// Image 若type指定为 “image”,且需要设置企业级别默认数据,则需要设置图片型模版数据,数据结构参考“图片型”
	Image WorkbenchTemplateItemImage `json:"image"  `
	// List 若type指定为 “list”,且需要设置企业级别默认数据,则需要设置列表型模版数据,数据结构参考“列表型”
	List []WorkbenchTemplateItemList `json:"list"  `
	// Webview 若type指定为 “webview”,且需要设置企业级别默认数据,则需要设置webview型模版数据,数据结构参考“webview型”
	Webview []WorkbenchTemplateItemWebView `json:"webview"  `
	// ReplaceUserData 是否覆盖用户工作台的数据。设置为true的时候,会覆盖企业所有用户当前设置的数据。若设置为false,则不会覆盖用户当前设置的所有数据。默认为false
	ReplaceUserData bool `json:"replace_user_data"  `
}

SetWorkbenchTemplateRequest is request of Client.SetWorkbenchTemplate

type SetWorkbenchTemplateResponse

type SetWorkbenchTemplateResponse struct {
	// AccessToken 是
	AccessToken string `json:"access_token"  `
	// AgentID 是
	AgentID string `json:"agentid"  `
}

SetWorkbenchTemplateResponse is response of Client.SetWorkbenchTemplate

type ShareAgentChangePushEvent

type ShareAgentChangePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 上级企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// CreateTime 消息发送时间
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件名称:share_agent_change
	Event string `xml:"Event" json:"Event"`
	// FromUsername 发送方,此处固定为sys
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ToUsername 上级企业CorpId
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

ShareAgentChangePushEvent 共享应用事件回调 本事件触发时机为:

上级企业把自建应用共享给下级企业使用上级企业把下级企业从共享应用中移除

see https://work.weixin.qq.com/api/doc/90000/90135/90240

func (ShareAgentChangePushEvent) EventType

func (ShareAgentChangePushEvent) EventType() string

EventType impl EventModel

func (ShareAgentChangePushEvent) MessageType

func (ShareAgentChangePushEvent) MessageType() string

MessageType impl MessageModel

type SimpleListUserRequest

type SimpleListUserRequest struct {
	// DepartmentID 获取的部门id
	DepartmentID string `json:"department_id"  validate:"required"`
	// FetchChild 是否递归获取子部门下面的成员:1-递归获取,0-只获取本部门
	FetchChild string `json:"fetch_child"  `
}

SimpleListUserRequest is request of Client.SimpleListUser

type SimpleListUserResponse

type SimpleListUserResponse struct {
	// UserList 成员列表
	UserList []SimpleListUserResponseItem `json:"userlist"  `
}

SimpleListUserResponse is response of Client.SimpleListUser

type SimpleListUserResponseItem

type SimpleListUserResponseItem struct {
	// UserID 成员UserID。对应管理端的帐号
	UserID string `json:"userid"`
	// Name 成员名称,代开发自建应用需要管理员授权才返回;此字段从2019年12月30日起,对新创建第三方应用不再返回真实name,使用userid代替name,2020年6月30日起,对所有历史第三方应用不再返回真实name,使用userid代替name,后续第三方仅通讯录应用可获取,未返回名称的情况需要通过通讯录展示组件来展示名字
	Name string `json:"name"`
	// Department 成员所属部门列表。列表项为部门ID,32位整型
	Department []int `json:"department"`
	// OpenUserID 全局唯一。对于同一个服务商,不同应用获取到企业内同一个成员的open_userid是相同的,最多64个字节。仅第三方应用可获取
	OpenUserID string `json:"open_userid"`
}

SimpleListUserResponseItem is item model of SimpleListUserResponse.UserList

type StatisticGroupByDayRequest

type StatisticGroupByDayRequest struct {
	// DayBeginTime 起始日期的时间戳,填当天的0时0分0秒(否则系统自动处理为当天的0分0秒)。取值范围:昨天至前180天。
	DayBeginTime int `json:"day_begin_time"  validate:"required"`
	// DayEndTime 结束日期的时间戳,填当天的0时0分0秒(否则系统自动处理为当天的0分0秒)。取值范围:昨天至前180天。如果不填,默认同 day_begin_time(即默认取一天的数据)
	DayEndTime int `json:"day_end_time"  `
	// OwnerFilter 群主过滤。如果不填,表示获取应用可见范围内全部群主的数据(但是不建议这么用,如果可见范围人数超过1000人,为了防止数据包过大,会报错 81017)
	OwnerFilter StatisticGroupByDayRequestOwnerFilter `json:"owner_filter"  validate:"required"`
}

StatisticGroupByDayRequest is request of Client.StatisticGroupByDay

type StatisticGroupByDayRequestOwnerFilter

type StatisticGroupByDayRequestOwnerFilter struct {
	// UserIDList 群主ID列表。最多100个
	UserIDList []string `json:"userid_list"  validate:"required"`
}

StatisticGroupByDayRequestOwnerFilter is model of StatisticGroupByDayRequest.OwnerFilter

type StatisticGroupByDayResponse

type StatisticGroupByDayResponse struct {
	// Items 记录列表。表示某个自然日客户群的统计数据
	Items []StatisticGroupByDayResponseItems `json:"items"  `
}

StatisticGroupByDayResponse is response of Client.StatisticGroupByDay

type StatisticGroupByDayResponseItems

type StatisticGroupByDayResponseItems struct {
	// StatTime 数据日期,为当日0点的时间戳
	StatTime int `json:"stat_time"  `
	// Data 详情
	Data StatisticGroupByDayResponseItemsData `json:"data"  `
}

StatisticGroupByDayResponseItems is model of StatisticGroupByDayResponse.Items

type StatisticGroupByDayResponseItemsData

type StatisticGroupByDayResponseItemsData struct {
	// NewChatCount 新增客户群数量
	NewChatCount int `json:"new_chat_cnt"  `
	// ChatTotal 截至当天客户群总数量
	ChatTotal int `json:"chat_total"  `
	// ChatHasMessage 截至当天有发过消息的客户群数量
	ChatHasMessage int `json:"chat_has_msg"  `
	// NewMemberCount 客户群新增群人数。
	NewMemberCount int `json:"new_member_cnt"  `
	// MemberTotal 截至当天客户群总人数
	MemberTotal int `json:"member_total"  `
	// MemberHasMessage 截至当天有发过消息的群成员数
	MemberHasMessage int `json:"member_has_msg"  `
	// MessageTotal 截至当天客户群消息总数
	MessageTotal int `json:"msg_total"  `
	// MigrateTraineeChatCount 截至当天新增迁移群数(仅教培行业返回)
	MigrateTraineeChatCount int `json:"migrate_trainee_chat_cnt"  `
}

StatisticGroupByDayResponseItemsData is model of StatisticGroupByDayResponseItems.Data

type SubscribePushEvent

type SubscribePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型,subscribe(关注)、unsubscribe(取消关注)
	Event string `xml:"Event" json:"Event"`
	// EventKey 事件KEY值,此事件该值为空
	EventKey string `xml:"EventKey" json:"EventKey"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

SubscribePushEvent 成员关注及取消关注事件 小程序在管理端开启接收消息配置后,也可收到关注/取消关注事件本事件触发时机为:

成员已经加入企业,管理员添加成员到应用可见范围(或移除可见范围)时成员已经在应用可见范围,成员加入(或退出)企业时

see https://work.weixin.qq.com/api/doc/90000/90135/90240

func (SubscribePushEvent) EventType

func (SubscribePushEvent) EventType() string

EventType impl EventModel

func (SubscribePushEvent) MessageType

func (SubscribePushEvent) MessageType() string

MessageType impl MessageModel

type SuiteBatchJobResultPushEvent

type SuiteBatchJobResultPushEvent struct {
	XMLName    xml.Name `xml:"xml" json:"-"`
	SuiteID    string   `xml:"SuiteId"`
	InfoType   string   `xml:"InfoType"`
	CreateTime int64    `xml:"CreateTime"`
	TimeStamp  int64    `xml:"TimeStamp"`
	BatchJob   struct {
		// JobId 任务id,最大长度为64字符
		JobID string `xml:"JobId"`
		// JobType 任务类型,目前有 在异步导出的场景下分别有:export_user(导出成员详情)、 export_simple_user(导出成员)、export_department(导出部门)、export_taguser(导出标签成员)
		JobType string `xml:"JobType"`
		ErrCode int    `xml:"ErrCode"`
		ErrMsg  string `xml:"ErrMsg"`
	} `xml:"BatchJob"`
}

SuiteBatchJobResultPushEvent see https://work.weixin.qq.com/api/doc/90001/90143/94956

func (SuiteBatchJobResultPushEvent) EventType

type SuiteGetUserDetailRequest

type SuiteGetUserDetailRequest struct {
	SuiteAccessToken string `json:"suite_access_token,omitempty"`
	UserTicket       string `json:"user_ticket,omitempty"`
}

type SuiteGetUserDetailResponse

type SuiteGetUserDetailResponse struct {
	CorpID string `json:"corpid,omitempty"`
	UserID string `json:"userid,omitempty"`
	Name   string `json:"name,omitempty"`
	Gender string `json:"gender,omitempty"`
	Avatar string `json:"avatar,omitempty"`  // snsapi_privateinfo
	QrCode string `json:"qr_code,omitempty"` // snsapi_privateinfo
}

type SuiteGetUserInfoRequest

type SuiteGetUserInfoRequest struct {
	SuiteAccessToken string `json:"suite_access_token,omitempty"`
	Code             string `json:"code,omitempty"`
}

type SuiteGetUserInfoResponse

type SuiteGetUserInfoResponse struct {
	CorpID     string `json:"CorpId,omitempty"`
	UserID     string `json:"UserId,omitempty"`
	OpenID     string `json:"OpenId,omitempty"`      // 不属于任何企业
	DeviceID   string `json:"DeviceId,omitempty"`    // 手机设备号(由企业微信在安装时随机生成,删除重装会改变,升级不受影响)
	UserTicket string `json:"user_ticket,omitempty"` // scope 为 snsapi_userinfo 或 snsapi_privateinfo
	ExpiresIn  int    `json:"expires_in,omitempty"`
	ExpiresAt  int64  `json:"expires_at,omitempty"`
	OpenUserID string `json:"open_userid,omitempty"` //
}

type SuiteInstalledRequestParams

type SuiteInstalledRequestParams struct {
	AuthCode  string `json:"auth_code"`
	ExpiresIn int    `json:"expires_in"` // 1200
	State     string `json:"state"`
}

SuiteInstalledRequestParams suite installed callback params

func (SuiteInstalledRequestParams) IsValid

func (r SuiteInstalledRequestParams) IsValid() bool

type SuiteTicketPushEvent

type SuiteTicketPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// InfoType suite_ticket
	InfoType string `xml:"InfoType" json:"InfoType"`
	// SuiteID 第三方应用的SuiteId
	SuiteID string `xml:"SuiteId" json:"SuiteId"`
	// SuiteTicket Ticket内容,最长为512字节
	SuiteTicket string `xml:"SuiteTicket" json:"SuiteTicket"`
	// Timestamp 时间戳
	Timestamp int64 `xml:"TimeStamp" json:"TimeStamp"`
}

SuiteTicketPushEvent 企业微信服务器会定时(每十分钟)推送ticket。ticket会实时变更,并用于后续接口的调用。

func (SuiteTicketPushEvent) EventType

func (SuiteTicketPushEvent) EventType() string

EventType impl EventModel

type SuiteTokenResponse

type SuiteTokenResponse struct {
	// SuiteAccessToken 第三方应用access_token,最长为512字节
	SuiteAccessToken string `json:"suite_access_token"  `
	// ExpiresIn 有效期(秒)
	ExpiresIn int `json:"expires_in"  `
	// ExpireAt 有效期至 - 客户端维护字段
	ExpireAt int64 `json:"expire_at"  `
}

ProviderGetSuiteTokenResponse is response of Client.ProviderGetSuiteToken

func (SuiteTokenResponse) GetAccessToken

func (r SuiteTokenResponse) GetAccessToken() string

func (SuiteTokenResponse) GetExpiresIn

func (r SuiteTokenResponse) GetExpiresIn() int

type SwitchWorkbenchModePushEvent

type SwitchWorkbenchModePushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID int `xml:"AgentID"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime"`
	// Event 事件类型:template_card_event,点击任务卡片按钮
	Event string `xml:"Event"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName"`
	// Mode 1表示开启工作台自定义模式,0表示关闭工作台自定义模式
	Mode int `xml:"Mode"`
}

SwitchWorkbenchModePushEvent 修改设置工作台自定义开关事件推送

see https://work.weixin.qq.com/api/doc/90001/90143/94620

func (SwitchWorkbenchModePushEvent) EventType

type SyncMapStore

type SyncMapStore struct {
	OnChange func(s *SyncMapStore)
	// contains filtered or unexported fields
}

func (*SyncMapStore) Dump

func (s *SyncMapStore) Dump() []byte

func (*SyncMapStore) Get

func (s *SyncMapStore) Get(out *GenericToken) (found bool, err error)

func (*SyncMapStore) Load

func (s *SyncMapStore) Load(out *GenericToken, loadFunc func(last *GenericToken) (out *GenericToken, changed bool, err error)) (changed bool, err error)

func (*SyncMapStore) Restore

func (s *SyncMapStore) Restore(data []byte) error

func (*SyncMapStore) Set

func (s *SyncMapStore) Set(in *GenericToken) (err error)

type TemplateCardEventPushEvent

type TemplateCardEventPushEvent struct {
	XMLName xml.Name `xml:"xml" json:"-"`
	// AgentID 企业应用的id,整型。可在应用的设置页面查看
	AgentID string `xml:"AgentID" json:"AgentID"`
	// CardType 通用模板卡片的类型,类型有”text_notice”, “news_notice”, “button_interaction”, “vote_interaction”, “multiple_interaction”五种
	CardType string `xml:"CardType" json:"CardType"`
	// CreateTime 消息创建时间(整型)
	CreateTime int64 `xml:"CreateTime" json:"CreateTime"`
	// Event 事件类型:template_card_event,点击任务卡片按钮
	Event string `xml:"Event" json:"Event"`
	// EventKey 与发送任务卡片消息时指定的按钮btn:key值相同
	EventKey string `xml:"EventKey" json:"EventKey"`
	// FromUsername 成员UserID
	FromUsername string `xml:"FromUserName" json:"FromUserName"`
	// MsgType 消息类型,此时固定为:event
	MsgType string `xml:"MsgType" json:"MsgType"`
	// OptionIds 对应问题的选项列表
	OptionIds string `xml:"OptionIds" json:"OptionIds"`
	// QuestionKey 问题的key值
	QuestionKey string `xml:"QuestionKey" json:"QuestionKey"`
	// ResponseCode 用于调用更新卡片接口的ResponseCode,24小时内有效,且只能使用一次
	ResponseCode string `xml:"ResponseCode" json:"ResponseCode"`
	// TaskID 与发送任务卡片消息时指定的task_id相同
	TaskID string `xml:"TaskId" json:"TaskId"`
	// ToUsername 企业微信CorpID
	ToUsername string `xml:"ToUserName" json:"ToUserName"`
}

TemplateCardEventPushEvent 模板卡片事件推送 应用下发的模板卡片消息,用户点击按钮之后触发此事件应用收到该事件之后,可以响应回复模板卡片更新消息

see https://work.weixin.qq.com/api/doc/90000/90135/90240

func (TemplateCardEventPushEvent) EventType

func (TemplateCardEventPushEvent) EventType() string

EventType impl EventModel

func (TemplateCardEventPushEvent) MessageType

func (TemplateCardEventPushEvent) MessageType() string

MessageType impl MessageModel

type TicketResponse

type TicketResponse struct {
	Ticket    string `json:"ticket"`
	ExpiresIn int    `json:"expires_in"`
	ExpiresAt int64  `json:"expires_at"` //  extra
}

func (TicketResponse) GetAccessToken

func (r TicketResponse) GetAccessToken() string

func (TicketResponse) GetExpiresIn

func (r TicketResponse) GetExpiresIn() int

type Token

type Token struct {
	// TokenKey is used to distinguish different subject of token
	TokenKey string `json:"token_key,omitempty"`

	// TokenType is the type of token.
	// The Type method returns either this or "Bearer", the default.
	TokenType string `json:"token_type,omitempty"`

	// AccessToken is the token that authorizes and authenticates
	// the requests.
	AccessToken string `json:"access_token"`

	// RefreshToken is a token that's used by the application
	// (as opposed to the user) to refresh the access token
	// if it expires.
	RefreshToken string `json:"refresh_token,omitempty"`

	// Expiry is the optional expiration time of the access token.
	//
	// If zero, TokenSource implementations will reuse the same
	// token forever and RefreshToken or equivalent
	// mechanisms for that TokenSource will not be used.
	Expiry time.Time `json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

Token represents the credentials used to authorize the requests to access protected resources on the OAuth 2.0 provider's backend.

Most users of this package should not access fields of Token directly. They're exported mostly for use by related packages implementing derivative OAuth2 flows.

func (*Token) Extra

func (t *Token) Extra(key string) interface{}

Extra returns an extra field. Extra fields are key-value pairs returned by the server as a part of the token retrieval response.

func (*Token) SetAuthHeader

func (t *Token) SetAuthHeader(r *http.Request)

SetAuthHeader sets the Authorization header to r using the access token in t.

This method is unnecessary when using Transport or an HTTP Client returned by this package.

func (*Token) Type

func (t *Token) Type() string

Type returns t.TokenType if non-empty, else "Bearer".

func (*Token) Valid

func (t *Token) Valid() bool

Valid reports whether t is non-nil, has an AccessToken, and is not expired.

func (*Token) WithExtra

func (t *Token) WithExtra(extra interface{}) *Token

WithExtra returns a new Token that's a clone of t, but using the provided raw extra map. This is only intended for use by packages implementing derivative OAuth2 flows.

type TokenCache

type TokenCache struct {
	Store TokenLoadStore
}

func (*TokenCache) Refresh

func (tc *TokenCache) Refresh(exp *GenericToken, f func() (OpaqueToken, error)) (string, error)

type TokenLoadStore

type TokenLoadStore interface {
	Load(out *GenericToken, load func(last *GenericToken) (out *GenericToken, changed bool, err error)) (changed bool, err error)
}

type TokenProvider

type TokenProvider interface {
	Refresh(exp *GenericToken, f func() (OpaqueToken, error)) (string, error)
}

type TokenResponse

type TokenResponse struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	ExpiresAt   int64  `json:"expires_at"` //  extra
}

func (TokenResponse) GetAccessToken

func (r TokenResponse) GetAccessToken() string

func (TokenResponse) GetExpiresIn

func (r TokenResponse) GetExpiresIn() int

type TokenSource

type TokenSource interface {
	// Token returns a token or an error.
	// Token must be safe for concurrent use by multiple goroutines.
	// The returned Token must not be modified.
	Token(ctx context.Context) (*Token, error)
}

A TokenSource is anything that can return a token.

func ReuseTokenSource

func ReuseTokenSource(t *Token, src TokenSource) TokenSource

ReuseTokenSource returns a TokenSource which repeatedly returns the same token as long as it's valid, starting with t. When its cached token is invalid, a new token is obtained from src.

ReuseTokenSource is typically used to reuse tokens from a cache (such as a file on disk) between runs of a program, rather than obtaining new tokens unnecessarily.

The initial token t may be nil, in which case the TokenSource is wrapped in a caching version if it isn't one already. This also means it's always safe to wrap ReuseTokenSource around any other TokenSource without adverse effects.

type TokenSourceFunc

type TokenSourceFunc func(context.Context) (*Token, error)

func (TokenSourceFunc) Token

func (f TokenSourceFunc) Token(ctx context.Context) (token *Token, err error)

Token implements TokenSource

type TokenType

type TokenType = string
const (
	TokenTypeJsAPITicket           TokenType = "JsAPITicket"
	TokenTypeAgentTicket           TokenType = "AgentTicket"
	TokenTypeSuiteTicket           TokenType = "SuiteTicket"
	TokenTypeAccessToken           TokenType = "AccessToken"
	TokenTypeAuthCorpAccessToken   TokenType = "AuthCorpAccessToken"
	TokenTypeAuthCorpPermanentCode TokenType = "AuthCorpPermanentCode"
	TokenTypeProviderAccessToken   TokenType = "ProviderAccessToken"
	TokenTypeSuiteAccessToken      TokenType = "SuiteAccessToken"
	TokenTypeSuitePreAuthCode      TokenType = "SuitePreAuthCode"
)

nolint:gosec

type TransferCustomerExternalContactRequest

type TransferCustomerExternalContactRequest struct {
	// HandoverUserID 原跟进成员的userid
	HandoverUserID string `json:"handover_userid"  validate:"required"`
	// TakeoverUserID 接替成员的userid
	TakeoverUserID string `json:"takeover_userid"  validate:"required"`
	// ExternalUserID 客户的external_userid列表,每次最多分配100个客户
	ExternalUserID []string `json:"external_userid"  validate:"required"`
	// TransferSuccessMessage 转移成功后发给客户的消息,最多200个字符,不填则使用默认文案
	TransferSuccessMessage string `json:"transfer_success_msg"  `
}

TransferCustomerExternalContactRequest is request of Client.TransferCustomerExternalContact

type TransferCustomerExternalContactResponse

type TransferCustomerExternalContactResponse struct {
	Customer []TransferCustomerExternalContactResponseCustomer `json:"customer"  `
}

TransferCustomerExternalContactResponse is response of Client.TransferCustomerExternalContact

type TransferCustomerExternalContactResponseCustomer

type TransferCustomerExternalContactResponseCustomer struct {
	// ExternalUserID 客户的external_userid
	ExternalUserID string `json:"external_userid"  `
	// ErrorCode 对此客户进行分配的结果, 具体可参考全局错误码, 0表示成功发起接替,待24小时后自动接替,并不代表最终接替成功
	ErrorCode int `json:"errcode"  `
}

TransferCustomerExternalContactResponseCustomer is model of TransferCustomerExternalContactResponse.Customer

type TransferCustomerResignedRequest

type TransferCustomerResignedRequest struct {
	// HandoverUserID 原跟进成员的userid
	HandoverUserID string `json:"handover_userid"  validate:"required"`
	// TakeoverUserID 接替成员的userid
	TakeoverUserID string `json:"takeover_userid"  validate:"required"`
	// ExternalUserID 客户的external_userid列表,最多一次转移100个客户
	ExternalUserID []string `json:"external_userid"  validate:"required"`
}

TransferCustomerResignedRequest is request of Client.TransferCustomerResigned

type TransferCustomerResignedResponse

type TransferCustomerResignedResponse struct {
	Customer []TransferCustomerResignedResponseCustomer `json:"customer"  `
}

TransferCustomerResignedResponse is response of Client.TransferCustomerResigned

type TransferCustomerResignedResponseCustomer

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

TransferCustomerResignedResponseCustomer is model of TransferCustomerResignedResponse.Customer

type TransferGroupChatRequest

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

TransferGroupChatRequest is request of Client.TransferGroupChat

type TransferGroupChatResponse

type TransferGroupChatResponse struct {
	// FailedChatList 没能成功继承的群
	FailedChatList []TransferGroupChatResponseFailedChatList `json:"failed_chat_list"  `
}

TransferGroupChatResponse is response of Client.TransferGroupChat

type TransferGroupChatResponseFailedChatList

type TransferGroupChatResponseFailedChatList struct {
	// ChatID 没能成功继承的群ID
	ChatID string `json:"chat_id"  `
	// ErrorCode 没能成功继承的群,错误码
	ErrorCode int `json:"errcode"  `
	// ErrorMessage 没能成功继承的群,错误描述
	ErrorMessage string `json:"errmsg"  `
}

TransferGroupChatResponseFailedChatList is model of TransferGroupChatResponse.FailedChatList

type TransferResultExternalContactRequest

type TransferResultExternalContactRequest struct {
	// HandoverUserID 原添加成员的userid
	HandoverUserID string `json:"handover_userid"  validate:"required"`
	// TakeoverUserID 接替成员的userid
	TakeoverUserID string `json:"takeover_userid"  validate:"required"`
	// Cursor 分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页;
	Cursor string `json:"cursor"  `
}

TransferResultExternalContactRequest is request of Client.TransferResultExternalContact

type TransferResultExternalContactResponse

type TransferResultExternalContactResponse struct {
	// NextCursor 下个分页的起始cursor
	NextCursor string `json:"next_cursor"  `

	Customer []TransferResultExternalContactResponseCustomer `json:"customer"  `
}

TransferResultExternalContactResponse is response of Client.TransferResultExternalContact

type TransferResultExternalContactResponseCustomer

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

TransferResultExternalContactResponseCustomer is model of TransferResultExternalContactResponse.Customer

type TransferResultResignedRequest

type TransferResultResignedRequest struct {
	// HandoverUserID 原添加成员的userid
	HandoverUserID string `json:"handover_userid"  validate:"required"`
	// TakeoverUserID 接替成员的userid
	TakeoverUserID string `json:"takeover_userid"  validate:"required"`
	// Cursor 分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页
	Cursor string `json:"cursor"  `
}

TransferResultResignedRequest is request of Client.TransferResultResigned

type TransferResultResignedResponse

type TransferResultResignedResponse struct {
	// NextCursor 下个分页的起始cursor
	NextCursor string `json:"next_cursor"  `

	Customer []TransferResultResignedResponseCustomer `json:"customer"  `
}

TransferResultResignedResponse is response of Client.TransferResultResigned

type TransferResultResignedResponseCustomer

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

TransferResultResignedResponseCustomer is model of TransferResultResignedResponse.Customer

type UnionIDToExternalUserIDRequest

type UnionIDToExternalUserIDRequest struct {
	// UnionID 微信客户的unionid
	UnionID string `json:"unionid"  validate:"required"`
}

UnionIDToExternalUserIDRequest is request of Client.UnionIDToExternalUserID

type UnionIDToExternalUserIDResponse

type UnionIDToExternalUserIDResponse struct {
	// ExternalUserID 该企业的外部联系人ID
	ExternalUserID string `json:"external_userid"  `
}

UnionIDToExternalUserIDResponse is response of Client.UnionIDToExternalUserID

type UnsubscribePushEvent

type UnsubscribePushEvent SubscribePushEvent

UnsubscribePushEvent when user change auth or uninstall

func (UnsubscribePushEvent) EventType

func (UnsubscribePushEvent) EventType() string

EventType impl EventModel

type UpdateCalendar

type UpdateCalendar struct {
	// CalID 日历ID
	CalID string `json:"cal_id"  validate:"required"`
	// Readonly 日历组织者对日历是否只读权限(即不可编辑日历,不可在日历上添加日程,仅可作为组织者删除日历)。0-否;1-是。默认为1,即只读
	Readonly int `json:"readonly"  `
	// Summary 日历标题。1 ~ 128 字符
	Summary string `json:"summary"  validate:"required"`
	// Color 日历颜色,RGB颜色编码16进制表示,例如:”#0000FF” 表示纯蓝色
	Color string `json:"color"  validate:"required"`
	// Description 日历描述。0 ~ 512 字符
	Description string `json:"description"  `
	// Shares 日历共享成员列表。最多2000人
	Shares []UpdateCalendarRequestShares `json:"shares"  `
}

type UpdateCalendarRequest

type UpdateCalendarRequest struct {
	// Calendar 日历信息
	Calendar UpdateCalendar `json:"calendar"  validate:"required"`
}

UpdateCalendarRequest is request of Client.UpdateCalendar

type UpdateCalendarRequestShares

type UpdateCalendarRequestShares struct {
	// UserID 日历共享成员的id
	UserID string `json:"userid"  validate:"required"`
	// Readonly 共享成员对日历是否只读权限(即不可编辑日历,不可在日历上添加日程,仅可以退出日历)。0-否;1-是。默认为1,即只读
	Readonly int `json:"readonly"  `
}

UpdateCalendarRequestShares is model of UpdateCalendarRequest.Shares

type UpdateContactWayRequest

type UpdateContactWayRequest struct {
	// ConfigID 企业联系方式的配置id
	ConfigID string `json:"config_id"  validate:"required"`
	// Remark 联系方式的备注信息,不超过30个字符,将覆盖之前的备注
	Remark string `json:"remark"  `
	// SkipVerify 外部客户添加时是否无需验证
	SkipVerify bool `json:"skip_verify"  `
	// Style 样式,只针对“在小程序中联系”的配置生效
	Style int `json:"style"  `
	// State 企业自定义的state参数,用于区分不同的添加渠道,在调用“获取外部联系人详情”时会返回该参数值
	State string `json:"state"  `
	// User 使用该联系方式的用户列表,将覆盖原有用户列表
	User []string `json:"user"  `
	// Party 使用该联系方式的部门列表,将覆盖原有部门列表,只在配置的type为2时有效
	Party []int `json:"party"  `
	// ExpiresIn 临时会话二维码有效期,以秒为单位,该参数仅在临时会话模式下有效
	ExpiresIn int `json:"expires_in"  `
	// ChatExpiresIn 临时会话有效期,以秒为单位,该参数仅在临时会话模式下有效
	ChatExpiresIn int `json:"chat_expires_in"  `
	// UnionID 可进行临时会话的客户unionid,该参数仅在临时会话模式有效,如不指定则不进行限制
	UnionID string `json:"unionid"  `
	// Conclusions 结束语,会话结束时自动发送给客户,可参考“结束语定义”,仅临时会话模式(is_temp为true)可设置
	Conclusions *Conclusions `json:"conclusions"  `
}

UpdateContactWayRequest is request of Client.UpdateContactWay

type UpdateDepartmentRequest

type UpdateDepartmentRequest struct {
	// ID 部门id
	ID int `json:"id"  validate:"required"`
	// Name 部门名称。长度限制为1~32个字符,字符不能包括\:*?”&lt;&gt;|
	Name string `json:"name"  `
	// NameEn 英文名称,需要在管理后台开启多语言支持才能生效。长度限制为1~32个字符,字符不能包括\:*?”&lt;&gt;|
	NameEn string `json:"name_en"  `
	// ParentID 父部门id
	ParentID int `json:"parentid"  `
	// Order 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^32)
	Order int `json:"order"  `
}

UpdateDepartmentRequest is request of Client.UpdateDepartment

type UpdateScheduleRequest

type UpdateScheduleRequest struct {
	// Schedule obj
	Schedule UpdateScheduleRequestSchedule `json:"schedule"  validate:"required"`
}

UpdateScheduleRequest is request of Client.UpdateSchedule

type UpdateScheduleRequestSchedule

type UpdateScheduleRequestSchedule struct {
	// ScheduleID string
	ScheduleID string `json:"schedule_id"  validate:"required"`
	// Attendees obj[]
	Attendees []UpdateScheduleRequestScheduleAttendees `json:"attendees"  `
	// Summary string
	Summary string `json:"summary"  `
	// Description string
	Description string `json:"description"  `
	// Reminders obj
	Reminders UpdateScheduleRequestScheduleReminders `json:"reminders"  `
	// Location string
	Location string `json:"location"  `
	// Organizer string
	Organizer string `json:"organizer"  `
	// StartTime uint32
	StartTime int `json:"start_time"  `
	// EndTime uint32
	EndTime int `json:"end_time"  `
}

UpdateScheduleRequestSchedule is model of UpdateScheduleRequest.Schedule

type UpdateScheduleRequestScheduleAttendees

type UpdateScheduleRequestScheduleAttendees struct {
	// UserID string
	UserID string `json:"userid"  validate:"required"`
}

UpdateScheduleRequestScheduleAttendees is model of UpdateScheduleRequestSchedule.Attendees

type UpdateScheduleRequestScheduleReminders

type UpdateScheduleRequestScheduleReminders struct {
	// IsRemind int32
	IsRemind int `json:"is_remind"  `
	// IsRepeat int32
	IsRepeat int `json:"is_repeat"  `
	// RemindBeforeEventSecs uint32
	RemindBeforeEventSecs int `json:"remind_before_event_secs"  `
	// RepeatType uint32
	RepeatType int `json:"repeat_type"  `
	// RepeatUntil uint32
	RepeatUntil int `json:"repeat_until"  `
	// IsCustomRepeat uint32
	IsCustomRepeat int `json:"is_custom_repeat"  `
	// RepeatInterval uint32
	RepeatInterval int `json:"repeat_interval"  `
	// RepeatDayOfWeek uint32[]
	RepeatDayOfWeek []int `json:"repeat_day_of_week"  `
	// RepeatDayOfMonth uint32[]
	RepeatDayOfMonth []int `json:"repeat_day_of_month"  `
	// Timezone uint32
	Timezone int `json:"timezone"  `
}

UpdateScheduleRequestScheduleReminders is model of UpdateScheduleRequestSchedule.Reminders

type UpdateTagRequest

type UpdateTagRequest struct {
	// TagID 标签ID
	TagID int `json:"tagid"  validate:"required"`
	// TagName 标签名称,长度限制为32个字(汉字或英文字母),标签不可与其他标签重名。
	TagName string `json:"tagname"  validate:"required"`
}

UpdateTagRequest is request of Client.UpdateTag

type UpdateUserRequest

type UpdateUserRequest struct {
	// UserID 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节
	UserID string `json:"userid"  validate:"required"`
	// Name 成员名称。长度为1~64个utf8字符
	Name string `json:"name"  `
	// Alias 别名。长度为1-32个utf8字符
	Alias string `json:"alias"  `
	// Mobile 手机号码。企业内必须唯一。若成员已激活企业微信,则需成员自行修改(此情况下该参数被忽略,但不会报错)
	Mobile string `json:"mobile"  `
	// Department 成员所属部门id列表,不超过100个
	Department []int `json:"department"  `
	// Order 部门内的排序值,默认为0。当有传入department时有效。数量必须和department一致,数值越大排序越前面。有效的值范围是[0, 2^32)
	Order []int `json:"order"  `
	// Position 职务信息。长度为0~128个字符
	Position string `json:"position"  `
	// Gender 性别。1表示男性,2表示女性
	Gender string `json:"gender"  `
	// Email 邮箱。长度不超过64个字节,且为有效的email格式。企业内必须唯一。若是绑定了腾讯企业邮箱的企业微信,则需要在腾讯企业邮箱中修改邮箱(此情况下该参数被忽略,但不会报错)
	Email string `json:"email"  `
	// Telephone 座机。由1-32位的纯数字、“-”、“+”或“,”组成
	Telephone string `json:"telephone"  `
	// IsLeaderInDept 上级字段,个数必须和department一致,表示在所在的部门内是否为上级。
	IsLeaderInDept []int `json:"is_leader_in_dept"  `
	// AvatarMediaID 成员头像的mediaid,通过素材管理接口上传图片获得的mediaid
	AvatarMediaID string `json:"avatar_mediaid"  `
	// Enable 启用/禁用成员。1表示启用成员,0表示禁用成员
	Enable int `json:"enable"  `
	// ExtAttr 自定义字段。自定义字段需要先在WEB管理端添加,见扩展属性添加方法,否则忽略未知属性的赋值。与对外属性一致,不过只支持type&#x3D;0的文本和type&#x3D;1的网页类型,详细描述查看对外属性
	ExtAttr ExtAttrs `json:"extattr"  `
	// ExternalProfile 成员对外属性,字段详情见对外属性
	ExternalProfile ExternalProfile `json:"external_profile"  `
	// ExternalPosition 对外职务,如果设置了该值,则以此作为对外展示的职务,否则以position来展示。不超过12个汉字
	ExternalPosition string `json:"external_position"  `
	// Nickname 视频号名字(设置后,成员将对外展示该视频号)。须从企业绑定到企业微信的视频号中选择,可在“我的企业”页中查看绑定的视频号
	Nickname string `json:"nickname"  `
	// Address 地址。长度最大128个字符
	Address string `json:"address"  `
	// MainDepartment 主部门
	MainDepartment int `json:"main_department"  `
}

UpdateUserRequest is request of Client.UpdateUser

type UserGenderType

type UserGenderType int

UserGenderType gender in wecom used by ListUserResponseItem.Gender used by ExternalContactResponse.Gender

const (
	UserGenderTypeUnknown UserGenderType = 0
	UserGenderTypeMale    UserGenderType = 1
	UserGenderTypeFemale  UserGenderType = 2
)

func (*UserGenderType) UnmarshalJSON

func (v *UserGenderType) UnmarshalJSON(data []byte) error

type UserStatusType

type UserStatusType int

UserStatusType status of user used by ListUserResponseItem.Status

const (
	UserStatusTypeEnabled  UserStatusType = 1 // 已激活企业微信或已关注微工作台
	UserStatusTypeForbid   UserStatusType = 2 // 已禁用
	UserStatusTypeDisabled UserStatusType = 4 // 未激活企业微信又未关注微工作台
	UserStatusTypeExit     UserStatusType = 5 // 退出企业
)

type WebhookSendRequest

type WebhookSendRequest struct {
	Key     string
	Content MessageContent
	Context context.Context
	Request req.Request
}

type WebhookSendResponse

type WebhookSendResponse struct{}

type WebhookUploadMediaRequest

type WebhookUploadMediaRequest struct {
	Key     string
	File    fs.File
	Context context.Context
	Request req.Request
}

type WebhookUploadMediaResponse

type WebhookUploadMediaResponse struct {
	Type      string      `json:"type,omitempty"` // file
	MediaID   string      `json:"media_id,omitempty"`
	CreatedAt json.Number `json:"created_at,omitempty"`
}

func WebhookUploadMedia

func WebhookUploadMedia(r *WebhookUploadMediaRequest) (out WebhookUploadMediaResponse, err error)

WebhookUploadMedia upload media to get MediaID

func (WebhookUploadMediaResponse) CreatedAtTime

func (v WebhookUploadMediaResponse) CreatedAtTime() time.Time

type WorkbenchTemplateItemImage

type WorkbenchTemplateItemImage struct {
	URL      string `json:"url"`
	JumpURL  string `json:"jump_url"`
	PagePath string `json:"pagepath"`
}

WorkbenchTemplateItemImage is model of SetWorkbenchTemplateRequest.Image

type WorkbenchTemplateItemKeyData

type WorkbenchTemplateItemKeyData struct {
	Items []WorkbenchTemplateItemKeyDataItem `json:"items"`
}

WorkbenchTemplateItemKeyData is model of SetWorkbenchTemplateRequest.KeyData

type WorkbenchTemplateItemKeyDataItem

type WorkbenchTemplateItemKeyDataItem struct {
	Key      string `json:"key"`
	Data     string `json:"data"`
	JumpURL  string `json:"jump_url"`
	PagePath string `json:"pagepath"`
}

WorkbenchTemplateItemKeyDataItem is item model of WorkbenchTemplateItemKeyData

type WorkbenchTemplateItemList

type WorkbenchTemplateItemList struct {
	Title    string `json:"title"`
	JumpURL  string `json:"jump_url"`
	PagePath string `json:"pagepath"`
}

WorkbenchTemplateItemList is item model of SetWorkbenchTemplateRequest.List

type WorkbenchTemplateItemWebView

type WorkbenchTemplateItemWebView struct {
	URL      string `json:"url"`
	JumpURL  string `json:"jump_url"`
	PagePath string `json:"pagepath"`
}

WorkbenchTemplateItemWebView is model of SetWorkbenchTemplateRequest.Webview

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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