Documentation
¶
Index ¶
- type BatchInviteOptions
- type BatchInviteSchema
- type BatchJob
- type BatchJobResultCallbackMessage
- type CallbackMessage
- type CallbackMessageLog
- type Client
- func (r *Client) BatchInvite(options BatchInviteOptions) (info BatchInviteSchema, err error)
- func (r *Client) CorpGetJoinQrcode(options CorpGetJoinQrcodeOptions) (info CorpGetJoinQrcodeSchema, err error)
- func (r *Client) CreateTag(options CreateTagOption) (info TagCommonError, err error)
- func (r *Client) DepartmentCreate(options DepartmentCreateOptions) (info DepartmentCreateSchema, err error)
- func (r *Client) DepartmentDelete(options DepartmentDeleteOptions) (info util.CommonError, err error)
- func (r *Client) DepartmentList(options DepartmentListOptions) (info DepartmentListSchema, err error)
- func (r *Client) DepartmentUpdate(options DepartmentUpdateOptions) (info util.CommonError, err error)
- func (r *Client) EnableUser(optionJson string) (info util.CommonError, err error)
- func (r *Client) GetCallbackMessage(signatureOptions SignatureOptions, encryptedMsg []byte) (rawData []byte, msg CallbackMessage, err error)
- func (r *Client) GetUserSyncJob(options UserSyncJobOptions) (info UserSyncJobSchema, err error)
- func (r *Client) UserAuthsucc(options UserAuthsuccOptions) (info util.CommonError, err error)
- func (r *Client) UserBatchdelete(options UserBatchdeleteOptions) (info util.CommonError, err error)
- func (r *Client) UserConvertToOpenid(options UserConvertToOpenidOptions) (info UserConvertToOpenidSchema, err error)
- func (r *Client) UserConvertToUserid(options UserConvertToUseridOptions) (info UserConvertToUseridSchema, err error)
- func (r *Client) UserCreate(options UserCreateOptions) (info util.CommonError, err error)
- func (r *Client) UserDelete(options UserDeleteOptions) (info util.CommonError, err error)
- func (r *Client) UserGet(options UserGetOptions) (info UserGetSchema, err error)
- func (r *Client) UserGetActiveStat(options UserGetActiveStatOptions) (info UserGetActiveStatSchema, err error)
- func (r *Client) UserList(options UserListOptions) (info UserListSchema, err error)
- func (r *Client) UserListId(options UserListIdOptions) (info UserListIdSchema, err error)
- func (r *Client) UserSimplelist(options UserSimplelistOptions) (info UserSimplelistSchema, err error)
- func (r *Client) UserSync(options UserSyncOptions) (info UserSyncSchema, err error)
- func (r *Client) UserUpdate(options UserUpdateOptions) (info util.CommonError, err error)
- func (r *Client) VerifyURL(options SignatureOptions) (string, error)
- type CommonError
- type CorpGetJoinQrcodeOptions
- type CorpGetJoinQrcodeSchema
- type CreatePartyCallbackMessage
- type CreateTagOption
- type CreateUserCallbackMessage
- type DeletePartyCallbackMessage
- type DeleteUserCallbackMessage
- type DepartmentCreateOptions
- type DepartmentCreateSchema
- type DepartmentDeleteOptions
- type DepartmentInfoSchema
- type DepartmentListOptions
- type DepartmentListSchema
- type DepartmentUpdateOptions
- type EnableUserOptions
- type Error
- type SignatureOptions
- type TagCommonError
- type UpdatePartyCallbackMessage
- type UpdateTagCallbackMessage
- type UpdateUserCallbackMessage
- type UserAuthsuccOptions
- type UserBatchdeleteOptions
- type UserConvertToOpenidOptions
- type UserConvertToOpenidSchema
- type UserConvertToUseridOptions
- type UserConvertToUseridSchema
- type UserCreateOptions
- type UserDeleteOptions
- type UserGetActiveStatOptions
- type UserGetActiveStatSchema
- type UserGetOptions
- type UserGetSchema
- type UserListIdDeptUser
- type UserListIdOptions
- type UserListIdSchema
- type UserListInfoSchema
- type UserListOptions
- type UserListSchema
- type UserSimpleInfoSchema
- type UserSimplelistOptions
- type UserSimplelistSchema
- type UserSyncCallbackOptions
- type UserSyncInfoSchema
- type UserSyncJobOptions
- type UserSyncJobSchema
- type UserSyncOptions
- type UserSyncSchema
- type UserUpdateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchInviteOptions ¶
type BatchInviteOptions struct { User []string `json:"user"` Party []int `json:"party"` Tag []int `json:"tag"` }
BatchInviteOptions 邀请成员请求参数
type BatchInviteSchema ¶
type BatchInviteSchema struct { util.CommonError Invaliduser []string `json:"invaliduser"` Invalidparty []int `json:"invalidparty"` Invalidtag []int `json:"invalidtag"` }
BatchInviteSchema 邀请成员响应内容
type BatchJob ¶
type BatchJob struct { JobId string `json:"job_id"` // 异步任务id,最大长度为64字符 JobType string `json:"job_type"` // 操作类型,字符串,目前分别有:sync_user(增量更新成员)、 replace_user(全量覆盖成员)、invite_user(邀请成员关注)、replace_party(全量覆盖部门) ErrCode int `json:"err_code"` // 返回码 ErrMsg string `json:"err_msg"` // 对返回码的文本描述内容 }
BatchJob 异步任务信息
type BatchJobResultCallbackMessage ¶
type BatchJobResultCallbackMessage struct { CallbackMessage BatchJob BatchJob `json:"batch_job"` // 异步任务信息 }
BatchJobResultCallbackMessage 异步任务完成通知
type CallbackMessage ¶
type CallbackMessage struct { ToUserName string `json:"to_user_name"` // 企业微信CorpID FromUserName string `json:"from_user_name"` // 此事件该值固定为sys,表示该消息由系统生成 CreateTime int `json:"create_time"` // 消息创建时间 (整型) MsgType string `json:"msgtype"` // 消息的类型,此时固定为event Event string `json:"event"` // 事件的类型,此时固定为change_contact ChangeType string `json:"change_type"` // 此时固定为delete_user }
CallbackMessage 基础回调消息
type CallbackMessageLog ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 通讯录实例
func (*Client) BatchInvite ¶
func (r *Client) BatchInvite(options BatchInviteOptions) (info BatchInviteSchema, err error)
BatchInvite 邀请成员
func (*Client) CorpGetJoinQrcode ¶
func (r *Client) CorpGetJoinQrcode(options CorpGetJoinQrcodeOptions) (info CorpGetJoinQrcodeSchema, err error)
CorpGetJoinQrcode 获取加入企业二维码
func (*Client) CreateTag ¶
func (r *Client) CreateTag(options CreateTagOption) (info TagCommonError, err error)
func (*Client) DepartmentCreate ¶
func (r *Client) DepartmentCreate(options DepartmentCreateOptions) (info DepartmentCreateSchema, err error)
DepartmentCreate 创建部门
func (*Client) DepartmentDelete ¶
func (r *Client) DepartmentDelete(options DepartmentDeleteOptions) (info util.CommonError, err error)
DepartmentDelete 删除客服账号
func (*Client) DepartmentList ¶
func (r *Client) DepartmentList(options DepartmentListOptions) (info DepartmentListSchema, err error)
DepartmentList 获取部门列表
func (*Client) DepartmentUpdate ¶
func (r *Client) DepartmentUpdate(options DepartmentUpdateOptions) (info util.CommonError, err error)
DepartmentUpdate 更新部门
func (*Client) EnableUser ¶
func (r *Client) EnableUser(optionJson string) (info util.CommonError, err error)
EnableUser 禁用启用员工
func (*Client) GetCallbackMessage ¶
func (r *Client) GetCallbackMessage(signatureOptions SignatureOptions, encryptedMsg []byte) (rawData []byte, msg CallbackMessage, err error)
GetCallbackMessage 获取回调事件中的消息内容
//Gin框架的使用示例 r.POST("/v1/event/callback", func(c *gin.Context) { var ( message kf.CallbackMessage body []byte ) // 读取原始消息内容 body, err = c.GetRawData() if err != nil { c.String(http.StatusInternalServerError, err.Error()) return } // 解析原始数据 message, err = kfClient.GetCallbackMessage(body) if err != nil { c.String(http.StatusInternalServerError, "消息获取失败") return } fmt.Println(message) c.String(200, "ok") })
func (*Client) GetUserSyncJob ¶
func (r *Client) GetUserSyncJob(options UserSyncJobOptions) (info UserSyncJobSchema, err error)
GetUserSyncJob 获取异步任务结果
func (*Client) UserAuthsucc ¶
func (r *Client) UserAuthsucc(options UserAuthsuccOptions) (info util.CommonError, err error)
UserAuthsucc 二次验证
func (*Client) UserBatchdelete ¶
func (r *Client) UserBatchdelete(options UserBatchdeleteOptions) (info util.CommonError, err error)
UserBatchdelete 批量删除成员
func (*Client) UserConvertToOpenid ¶
func (r *Client) UserConvertToOpenid(options UserConvertToOpenidOptions) (info UserConvertToOpenidSchema, err error)
UserConvertToOpenid userid转openid
func (*Client) UserConvertToUserid ¶
func (r *Client) UserConvertToUserid(options UserConvertToUseridOptions) (info UserConvertToUseridSchema, err error)
UserConvertToUserid openid转userid
func (*Client) UserCreate ¶
func (r *Client) UserCreate(options UserCreateOptions) (info util.CommonError, err error)
UserCreate 创建成员
func (*Client) UserDelete ¶
func (r *Client) UserDelete(options UserDeleteOptions) (info util.CommonError, err error)
UserDelete 删除成员
func (*Client) UserGet ¶
func (r *Client) UserGet(options UserGetOptions) (info UserGetSchema, err error)
UserGet UserGet 读取成员 微信已经废弃此接口 2022-08, 新IP不再能调用
func (*Client) UserGetActiveStat ¶
func (r *Client) UserGetActiveStat(options UserGetActiveStatOptions) (info UserGetActiveStatSchema, err error)
UserGetActiveStat 获取企业活跃成员数
func (*Client) UserList ¶
func (r *Client) UserList(options UserListOptions) (info UserListSchema, err error)
UserList 获取部门成员详情 微信已经废弃此接口 2022-08, 新IP不再能调用
func (*Client) UserListId ¶
func (r *Client) UserListId(options UserListIdOptions) (info UserListIdSchema, err error)
UserListId 获取员工ID列表
func (*Client) UserSimplelist ¶
func (r *Client) UserSimplelist(options UserSimplelistOptions) (info UserSimplelistSchema, err error)
UserSimplelist 获取部门成员
func (*Client) UserSync ¶
func (r *Client) UserSync(options UserSyncOptions) (info UserSyncSchema, err error)
UserSync 异步更改员工信息
func (*Client) UserUpdate ¶
func (r *Client) UserUpdate(options UserUpdateOptions) (info util.CommonError, err error)
UserUpdate 更新成员
func (*Client) VerifyURL ¶
func (r *Client) VerifyURL(options SignatureOptions) (string, error)
VerifyURL 验证请求参数是否合法并返回解密后的消息内容
//Gin框架的使用示例 r.GET("/v1/event/callback", func(c *gin.Context) { options := kf.SignatureOptions{} //获取回调的的校验参数 if = c.ShouldBindQuery(&options); err != nil { c.String(http.StatusUnauthorized, "参数解析失败") } // 调用VerifyURL方法校验当前请求,如果合法则把解密后的内容作为响应返回给微信服务器 echo, err := kfClient.VerifyURL(options) if err == nil { c.String(http.StatusOK, echo) } else { c.String(http.StatusUnauthorized, "非法请求来源") } })
type CommonError ¶
type CorpGetJoinQrcodeOptions ¶
type CorpGetJoinQrcodeOptions struct {
SizeType int `json:"size_type"`
}
CorpGetJoinQrcodeOptions 获取加入企业二维码请求参数
type CorpGetJoinQrcodeSchema ¶
type CorpGetJoinQrcodeSchema struct { util.CommonError JoinQrcode int `json:"join_qrcode"` }
CorpGetJoinQrcodeSchema 获取加入企业二维码响应内容
type CreatePartyCallbackMessage ¶
type CreatePartyCallbackMessage struct { CallbackMessage Id int `json:"id"` // 部门Id Name string `json:"name"` // 部门名称 ParentId int `json:"parent_id"` // 父部门id Order int `json:"order"` // 部门排序 }
CreatePartyCallbackMessage 新增部门事件回调消息
type CreateTagOption ¶
type CreateUserCallbackMessage ¶
type CreateUserCallbackMessage struct { CallbackMessage UserID string `json:"user_id"` // 成员UserID NewUserID string `json:"new_user_id"` // 新的成员id Name string `json:"name"` // 成员名称 Department string `json:"department"` // 成员部门列表,仅返回该应用有查看权限的部门id MainDepartment int `json:"main_department"` // 主部门 IsLeaderInDept string `json:"is_leader_in_dept"` // 表示所在部门是否为上级,0-否,1-是,顺序与Department字段的部门逐一对应 Mobile string `json:"mobile"` // 手机号码 Position string `json:"position"` // 职位信息。长度为0~64个字节 Gender string `json:"gender"` // 性别,1表示男性,2表示女性 Email string `json:"email"` // 邮箱 Status int `json:"status"` // 激活状态:1=已激活 2=已禁用 4=未激活 已激活代表已激活企业微信或已关注微工作台(原企业号)5=成员退出 Avatar string `json:"avatar"` // 头像url。注:如果要获取小图将url最后的”/0”改成”/100”即可。 Alias string `json:"alias"` // 成员别名 Telephone string `json:"telephone"` // 座机 Address string `json:"address"` // 地址 ExtAttr map[string]interface{} `json:"ext_attr"` // 扩展属性 }
CreateUserCallbackMessage 新增成员事件回调消息
type DeletePartyCallbackMessage ¶
type DeletePartyCallbackMessage struct { CallbackMessage Id int `json:"id"` // 部门Id }
DeletePartyCallbackMessage 删除部门事件回调消息
type DeleteUserCallbackMessage ¶
type DeleteUserCallbackMessage struct { CallbackMessage UserID string `json:"user_id"` // 成员UserID }
DeleteUserCallbackMessage 删除成员事件回调消息
type DepartmentCreateOptions ¶
type DepartmentCreateOptions struct { Id int `json:"id,omitempty"` // 部门id,32位整型,指定时必须大于1。若不填该参数,将自动生成id Name string `json:"name"` // 部门名称。同一个层级的部门名称不能重复。长度限制为1~32个字符,字符不能包括\:*?”<>| NameEn string `json:"name_en,omitempty"` // 英文名称。同一个层级的部门名称不能重复。需要在管理后台开启多语言支持才能生效。长度限制为1~32个字符,字符不能包括\:*?”<>| Parentid int `json:"parentid"` // 父部门id,32位整型 Order int `json:"order,omitempty"` // 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^32) }
DepartmentCreateOptions 创建部门请求参数
type DepartmentCreateSchema ¶
type DepartmentCreateSchema struct { util.CommonError Id int `json:"id"` // 新创建的部门ID }
DepartmentCreateSchema 添加创建部门响应内容
type DepartmentDeleteOptions ¶
type DepartmentDeleteOptions struct {
Id string `json:"id"` // 部门id。(注:不能删除根部门;不能删除含有子部门、成员的部门)
}
DepartmentDeleteOptions 删除部门请求参数
type DepartmentInfoSchema ¶
type DepartmentInfoSchema struct { Id int `json:"id"` // 部门id,32位整型,指定时必须大于1。若不填该参数,将自动生成id Name string `json:"name"` // 部门名称。同一个层级的部门名称不能重复。长度限制为1~32个字符,字符不能包括\:*?”<>| NameEn string `json:"media_id"` // 英文名称。同一个层级的部门名称不能重复。需要在管理后台开启多语言支持才能生效。长度限制为1~32个字符,字符不能包括\:*?”<>| Parentid int `json:"parentid"` // 父部门id,32位整型 Order int `json:"order"` // 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^32) }
DepartmentInfoSchema 部门详情
type DepartmentListOptions ¶
type DepartmentListOptions struct {
Id string `json:"id"` // 部门id。获取指定部门及其下的子部门(以及及子部门的子部门等等,递归)。 如果不填,默认获取全量组织架构
}
DepartmentListOptions 获取部门列表请求参数
type DepartmentListSchema ¶
type DepartmentListSchema struct { util.CommonError DepartmentList []DepartmentInfoSchema `json:"department"` // 部门列表 }
DepartmentListSchema 获取部门列表响应内容
type DepartmentUpdateOptions ¶
type DepartmentUpdateOptions struct { Id int `json:"id"` // 部门id,32位整型,指定时必须大于1。若不填该参数,将自动生成id Name string `json:"name"` // 部门名称。同一个层级的部门名称不能重复。长度限制为1~32个字符,字符不能包括\:*?”<>| NameEn string `json:"name_en,omitempty"` // 英文名称。同一个层级的部门名称不能重复。需要在管理后台开启多语言支持才能生效。长度限制为1~32个字符,字符不能包括\:*?”<>| Parentid int `json:"parentid"` // 父部门id,32位整型 Order int `json:"order,omitempty"` // 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^32) }
DepartmentUpdateOptions 更新部门请求参数
type EnableUserOptions ¶
type EnableUserOptions struct { Userid string `json:"userid"` // 企业微信员工ID Enable int `json:"enable,omitempty"` // 启用/禁用成员。1表示启用成员,0表示禁用成员 }
EnableUserOptions 禁用启用成员
type Error ¶
type Error string
Error 错误
const ( // SDKInitFailed 错误码:50001 SDKInitFailed Error = "SDK初始化失败" SDKCacheUnavailable Error = "缓存无效" // SDKUnknownError 错误码:50003 SDKUnknownError Error = "未知错误" // SDKInvalidCredential 错误码:40001 SDKInvalidCredential Error = "不合法的secret参数" // SDKInvalidCorpID 错误码:40013 SDKInvalidCorpID Error = "无效的 CorpID" // SDKAccessTokenInvalid 错误码:40014 SDKAccessTokenInvalid Error = "AccessToken 无效" // SDKValidateSignatureFailed 错误码:40015 SDKValidateSignatureFailed Error = "校验签名错误" // SDKDecryptMSGFailed 错误码:40016 SDKDecryptMSGFailed Error = "消息解密失败" // SDKAccessTokenMissing 错误码:41001 SDKAccessTokenMissing Error = "缺少AccessToken参数" // SDKAccessTokenExpired 错误码:42001 SDKAccessTokenExpired Error = "AccessToken 已过期" // SDKApiFreqOutOfLimit 错误码:45009 SDKApiFreqOutOfLimit Error = "接口请求次数超频" // SDKApiForbidden 错误码:48002 SDKApiForbidden Error = "API 禁止调用" // SDKInvalidOpenKFID 错误码:95000 SDKInvalidOpenKFID Error = "无效的 open_kfid" // SDKOpenKFIDNotExist 错误码:95004 SDKOpenKFIDNotExist Error = "open_kfid 不存在" // SDKWeWorkAlready 错误码:95011 SDKWeWorkAlready Error = "已在企业微信使用微信客服" // SDKNotUseInWeCom 错误码:95012 SDKNotUseInWeCom Error = "未在企业微信使用微信客服" // SDKApiNotOpen 错误码:95017 SDKApiNotOpen Error = "API 功能没有被开启" //SDKContactWayMoreThanLimit 错误码:41041 SDKContactWayMoreThanLimit Error = "「联系我」使用人数超过限制" //SDKApiContactMoreThanLimit 错误码:41045 SDKApiContactMoreThanLimit Error = "API添加「联系我」达到数量上限" )
type SignatureOptions ¶
type SignatureOptions struct { Signature string `form:"msg_signature"` TimeStamp string `form:"timestamp"` Nonce string `form:"nonce"` EchoStr string `form:"echostr"` Encrypt string `form:"encrypt"` }
SignatureOptions 微信服务器验证参数
type TagCommonError ¶
type TagCommonError struct { CommonError CommonError `json:"common_error"` TagId int `json:"tagid"` }
type UpdatePartyCallbackMessage ¶
type UpdatePartyCallbackMessage struct { CallbackMessage Id int `json:"id"` // 部门Id Name string `json:"name"` // 部门名称,仅当该字段发生变更时传递 ParentId int `json:"parent_id"` // 父部门id,仅当该字段发生变更时传递 }
UpdatePartyCallbackMessage 更新部门事件回调消息
type UpdateTagCallbackMessage ¶
type UpdateTagCallbackMessage struct { CallbackMessage TagId int `json:"tag_id"` // 标签Id AddUserItems string `json:"add_user_items"` // 标签中新增的成员userid列表,用逗号分隔 DelUserItems string `json:"del_user_items"` // 标签中删除的成员userid列表,用逗号分隔 AddPartyItems string `json:"add_party_items"` // 标签中新增的部门id列表,用逗号分隔 用[] int 会报错 DelPartyItems string `json:"del_party_items"` // 标签中删除的部门id列表,用逗号分隔 }
UpdateTagCallbackMessage 标签变更通知回调消息
type UpdateUserCallbackMessage ¶
type UpdateUserCallbackMessage struct { CallbackMessage CreateUserCallbackMessage NewUserID string `json:"new_user_id"` // 新的UserID,变更时推送(userid由系统生成时可更改一次) }
UpdateUserCallbackMessage 更新成员事件回调消息
type UserAuthsuccOptions ¶
type UserAuthsuccOptions struct {
Userid string `json:"userid"`
}
UserAuthsuccOptions 二次验证请求参数
type UserBatchdeleteOptions ¶
type UserBatchdeleteOptions struct {
Useridlist []string `json:"useridlist"`
}
UserBatchdeleteOptions 批量删除成员请求参数
type UserConvertToOpenidOptions ¶
type UserConvertToOpenidOptions struct {
Userid string `json:"userid"`
}
UserConvertToOpenidOptions userid转openid请求参数
type UserConvertToOpenidSchema ¶
type UserConvertToOpenidSchema struct { util.CommonError Openid string `json:"openid"` }
UserConvertToOpenidSchema userid转openid响应内容
type UserConvertToUseridOptions ¶
type UserConvertToUseridOptions struct {
Openid string `json:"openid"`
}
openid转userid请求参数
type UserConvertToUseridSchema ¶
type UserConvertToUseridSchema struct { util.CommonError Userid string `json:"userid"` }
UserConvertToUseridSchema openid转userid响应内容
type UserCreateOptions ¶
type UserCreateOptions struct { OpenUserid string `json:"open_userid,omitempty"` // 全局唯一 Userid string `json:"userid"` // 企业微信员工ID Name string `json:"name,omitempty"` // 成员名称 Alias string `json:"alias,omitempty"` // 成员别名 Position string `json:"position,omitempty"` // 职务信息 Mobile string `json:"mobile,omitempty"` // 电话号码 Gender string `json:"gender,omitempty"` // 0表示未定义,1表示男性,2表示女性 Email string `json:"email,omitempty"` // 邮件 Avatar string `json:"avatar,omitempty"` // 头像 LeaderInDept []int `json:"leader_in_dept,omitempty"` // 是否是管理,表示在所在的部门内是否为上级 IsLeaderInDept []int `json:"is_leader_in_dept,omitempty"` // 是否是管理,表示在所在的部门内是否为上级 Enable int `json:"enable,omitempty"` // 启用/禁用成员。1表示启用成员,0表示禁用成员 Extattr map[string]interface{} `json:"extattr,omitempty"` // 扩展属性 Telephone string `json:"telephone,omitempty"` // 座机 MainDepartment int `json:"main_department,omitempty"` // 主部门 QrCode string `json:"qr_code,omitempty"` // 员工个人二维码 Department []int `json:"department,omitempty"` // 成员所属部门id列表 Order []int `json:"order,omitempty"` // 部门内的排序值 ThumbAvatar string `json:"thumb_avatar,omitempty"` // 头像缩略图url ExternalProfile map[string]interface{} `json:"external_profile,omitempty"` // 成员对外属性 ExternalPosition string `json:"external_position,omitempty"` // 对外职务 Address string `json:"address,omitempty"` // 地址 HideMobile int `json:"hide_mobile,omitempty"` Isleader int `json:"isleader,omitempty"` }
UserCreateOptions 创建成员请求参数
type UserDeleteOptions ¶
type UserDeleteOptions struct {
Userid string `json:"userid"` // 企业微信员工ID
}
UserDeleteOptions 删除成员请求参数
type UserGetActiveStatOptions ¶
type UserGetActiveStatOptions struct {
Date string `json:"date"`
}
UserGetActiveStatOptions 获取企业活跃成员数请求参数
type UserGetActiveStatSchema ¶
type UserGetActiveStatSchema struct { util.CommonError ActiveCnt int `json:"active_cnt"` }
UserGetActiveStatSchema 获取企业活跃成员数响应内容
type UserGetOptions ¶
type UserGetOptions struct {
Userid string `json:"userid"` // 成员UserID。对应管理端的帐号,企业内必须唯一。不区分大小写,长度为1~64个字节
}
UserGetOptions 读取成员请求参数
type UserGetSchema ¶
type UserGetSchema struct { util.CommonError UserCreateOptions Status int `json:"status"` // 1=已激活,2=已禁用,4=未激活,5=退出企业。 }
UserGetSchema 成员详情响应内容
type UserListIdDeptUser ¶
UserListIdDeptUser 获取员工ID列表响应子集
type UserListIdOptions ¶
UserListIdOptions 员工列表请求参数
type UserListIdSchema ¶
type UserListIdSchema struct { util.CommonError NextCursor string `json:"next_cursor"` DeptUser []UserListIdDeptUser `json:"dept_user"` }
UserListIdSchema 获取员工ID列表响应
type UserListInfoSchema ¶
type UserListInfoSchema struct { UserCreateOptions Status int `json:"status"` // 1=已激活,2=已禁用,4=未激活,5=退出企业。 }
UserListInfoSchema 获取部门成员详情信息
type UserListOptions ¶
type UserListOptions struct { DepartmentId string `json:"department_id"` FetchChild string `json:"fetch_child"` }
UserListOptions 获取部门成员详情请求参数
type UserListSchema ¶
type UserListSchema struct { util.CommonError Userlist []UserListInfoSchema `json:"userlist"` }
UserListSchema 获取部门成员详情响应内容
type UserSimpleInfoSchema ¶
type UserSimpleInfoSchema struct { Userid string `json:"userid"` Name string `json:"name"` Department []int `json:"department"` OpenUserid string `json:"open_userid"` }
UserSimpleInfoSchema 部门成员信息
type UserSimplelistOptions ¶
type UserSimplelistOptions struct { DepartmentId string `json:"department_id"` FetchChild string `json:"fetch_child"` }
UserSimplelistOptions 获取部门成员请求参数
type UserSimplelistSchema ¶
type UserSimplelistSchema struct { util.CommonError Userlist []UserSimpleInfoSchema `json:"userlist"` }
UserSimplelistSchema 部门成员响应内容
type UserSyncCallbackOptions ¶
type UserSyncInfoSchema ¶
type UserSyncInfoSchema struct { util.CommonError Userid string `json:"userid"` }
type UserSyncJobOptions ¶
type UserSyncJobOptions struct {
JobId string `json:"job_id"`
}
type UserSyncJobSchema ¶
type UserSyncJobSchema struct { util.CommonError Status int `json:"status"` Type string `json:"type"` Total int `json:"total"` Percentage int `json:"percentage"` Result []UserSyncInfoSchema `json:"result"` }
UserSyncJobSchema 获取异步查询结果
type UserSyncOptions ¶
type UserSyncOptions struct { MediaId string `json:"media_id"` ToInvite bool `json:"to_invite"` UserSyncCallbackOptions }
UserSyncOptions 异步更改员工信息请求参数
type UserSyncSchema ¶
type UserSyncSchema struct { util.CommonError Jobid string `json:"jobid"` }
type UserUpdateOptions ¶
type UserUpdateOptions struct { UserCreateOptions AvatarMediaid string `json:"avatar_mediaid,omitempty"` }
UserUpdateOptions 更新成员请求参数