addrbook

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTagUser

func AddTagUser(tagID int64, userIDs []string, partyIDs []int64, result *ResultTagUserAdd) wx.Action

AddTagUser 增加标签成员

func BatchDeleteUser

func BatchDeleteUser(userIDs ...string) wx.Action

BatchDeleteUser 批量删除成员

func BatchInvite

func BatchInvite(userIDs []string, partyIDs, tagIDs []int64, result *ResultBatchInvite) wx.Action

BatchInvite 邀请成员

func BatchReplaceParty

func BatchReplaceParty(mediaID string, callback *BatchCallback, result *ResultBatch) wx.Action

BatchReplaceParty 全量覆盖部门

func BatchReplaceUser

func BatchReplaceUser(mediaID string, toInvite bool, callback *BatchCallback, result *ResultBatch) wx.Action

BatchReplaceUser 全量覆盖成员

func BatchSyncUser

func BatchSyncUser(mediaID string, toInvite bool, callback *BatchCallback, result *ResultBatch) wx.Action

BatchSyncUser 增量更新成员

func ConvertToOpenID

func ConvertToOpenID(userID string, result *ResultOpenIDConvert) wx.Action

ConvertToOpenID userid转openid

func ConvertToUserID

func ConvertToUserID(openid string, result *ResultUserIDConvert) wx.Action

ConvertToUserID openid转userid

func CreateDepartment

func CreateDepartment(params *ParamsDepartmentCreate, result *ResultDepartmentCreate) wx.Action

CreateDepartment 创建部门

func CreateTag

func CreateTag(name string, result *ResultTagCreate) wx.Action

CreateTag 创建标签

func CreateUser

func CreateUser(params *ParamsUserCreate) wx.Action

CreateUser 创建成员

func DeleteDepartment

func DeleteDepartment(id int64) wx.Action

DeleteDepartment 删除部门

func DeleteTag

func DeleteTag(tagID int64) wx.Action

DeleteTag 删除标签

func DeleteTagUser

func DeleteTagUser(tagID int64, userIDs []string, partyIDs []int64, result *ResultTagUserDelete) wx.Action

DeleteTagUser 删除标签成员

func DeleteUser

func DeleteUser(userID string) wx.Action

DeleteUser 删除成员

func ExportDepartment

func ExportDepartment(encodingAESKey string, blockSize int64, result *ResultExport) wx.Action

ExportDepartment 导出部门

func ExportSimpleUser

func ExportSimpleUser(encodingAESKey string, blockSize int64, result *ResultExport) wx.Action

ExportSimpleUser 导出成员

func ExportTagUser

func ExportTagUser(tagID int64, encodingAESKey string, blockSize int64, result *ResultExport) wx.Action

ExportTagUser 导出标签成员

func ExportUser

func ExportUser(encodingAESKey string, blockSize int64, result *ResultExport) wx.Action

ExportUser 导出成员详情

func GetActiveStat

func GetActiveStat(date string, result *ResultActiveStat) wx.Action

GetActiveStat 获取企业活跃成员数

func GetBatchResult

func GetBatchResult(jobID string, result *ResultBatchRet) wx.Action

GetBatchResult 获取异步任务结果

func GetDepartment

func GetDepartment(id int64, result *ResultDepartmentGet) wx.Action

GetDepartment 获取单个部门详情

func GetExportResult

func GetExportResult(jobID string, result *ResultExportRet) wx.Action

GetExportResult 获取导出结果

func GetJoinQRCode

func GetJoinQRCode(size int, result *JoinQRCode) wx.Action

GetJoinQRCode 获取加入企业二维码 尺寸: 1 - 171 x 171 2 - 399 x 399 3 - 741 x 741 4 - 2052 x 2052

func GetTagUser

func GetTagUser(tagID int64, result *ResultTagUser) wx.Action

GetTagUser 获取标签成员

func GetUser

func GetUser(userID string, result *User) wx.Action

GetUser 读取成员

func GetUserID

func GetUserID(mobile string, result *ResultUserID) wx.Action

GetUserID 通过手机号获取其所对应的userid

func ListDepartment

func ListDepartment(id int64, result *ResultDepartmentList) wx.Action

ListDepartment 获取部门列表

func ListSimpleDepartment

func ListSimpleDepartment(id int64, result *ResultSimpleDepartmentList) wx.Action

ListSimpleDepartment 获取子部门ID列表

func ListSimpleUser

func ListSimpleUser(departmentID int64, fetchChild int, result *ResultSimipleUserList) wx.Action

ListSimpleUser 获取部门成员

func ListTag

func ListTag(result *ResultTagList) wx.Action

ListTag 获取标签列表

func ListUser

func ListUser(departmentID int64, fetchChild int, result *ResultUserList) wx.Action

ListUser 获取部门成员详情

func UpdateDepartment

func UpdateDepartment(params *ParamsDepartmentUpdate) wx.Action

UpdateDepartment 更新部门

func UpdateTag

func UpdateTag(tagID int64, tagName string) wx.Action

UpdateTag 更新标签名字

func UpdateUser

func UpdateUser(params *ParamsUserUpdate) wx.Action

UpdateUser 更新成员

Types

type Attr

type Attr struct {
	Type        int        `json:"type"`
	Name        string     `json:"name"`
	Text        *AttrText  `json:"text,omitempty"`
	Web         *AttrWeb   `json:"web,omitempty"`
	Miniprogram *AttrMinip `json:"miniprogram,omitempty"`
}

type AttrMinip

type AttrMinip struct {
	AppID    string `json:"appid"`
	PagePath string `json:"pagepath"`
	Title    string `json:"title"`
}

type AttrText

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

type AttrWeb

type AttrWeb struct {
	URL   string `json:"url"`
	Title string `json:"title"`
}

type BatchCallback

type BatchCallback struct {
	URL            string `json:"url,omitempty"`
	Token          string `json:"token,omitempty"`
	EncodingAESKey string `json:"encodingaeskey,omitempty"`
}

type BatchRet

type BatchRet struct {
	UserID  string `json:"userid"`
	Action  int    `json:"action"`
	PartyID int    `json:"partyid"`
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

type BatchType

type BatchType string
const (
	SyncUser     BatchType = "sync_user"
	ReplaceUser  BatchType = "replace_user"
	ReplaceParty BatchType = "replace_party"
)

type Department

type Department struct {
	ID               int64    `json:"id"`
	Name             string   `json:"name"`
	NameEN           string   `json:"name_en"`
	DepartmentLeader []string `json:"department_leader"`
	ParentID         int64    `json:"parentid"`
	Order            int64    `json:"order"`
}

type ExportData

type ExportData struct {
	URL  string `json:"url"`
	Size int64  `json:"size"`
	MD5  string `json:"md5"`
}

type ExtAttr

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

type ExternalProfile

type ExternalProfile struct {
	ExternalCorpName string          `json:"external_corp_name"`
	WechatChannels   *WechatChannels `json:"wechat_channels"`
	ExternalAttr     []*Attr         `json:"external_attr"`
}

type JoinQRCode

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

type ParamsActiveStat

type ParamsActiveStat struct {
	Date string `json:"date"`
}

type ParamsBatchInvite

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

type ParamsDepartmentCreate

type ParamsDepartmentCreate struct {
	Name     string `json:"name"`
	NameEN   string `json:"name_en,omitempty"`
	ParentID int64  `json:"parentid"`
	Order    int64  `json:"order,omitempty"`
}

type ParamsDepartmentUpdate

type ParamsDepartmentUpdate struct {
	ID       int64  `json:"id"`
	Name     string `json:"name,omitempty"`
	NameEN   string `json:"name_en,omitempty"`
	ParentID int64  `json:"parentid,omitempty"`
	Order    int64  `json:"order,omitempty"`
}

type ParamsExport

type ParamsExport struct {
	TagID          int64  `json:"tagid,omitempty"`
	EncodingAESKey string `json:"encoding_aeskey"`
	BlockSize      int64  `json:"block_size"`
}

type ParamsOpenIDConvert

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

type ParamsPartyBatchReplace

type ParamsPartyBatchReplace struct {
	MediaID  string         `json:"media_id"`
	Callback *BatchCallback `json:"callback,omitempty"`
}

type ParamsTagCreate

type ParamsTagCreate struct {
	TagName string `json:"tagname"`
}

type ParamsTagUpdate

type ParamsTagUpdate struct {
	TagID   int64  `json:"tagid"`
	TagName string `json:"tagname"`
}

type ParamsTagUserAdd

type ParamsTagUserAdd struct {
	TagID     int64    `json:"tagid"`
	UserList  []string `json:"userlist"`
	PartyList []int64  `json:"partylist"`
}

type ParamsTagUserDelete

type ParamsTagUserDelete struct {
	TagID     int64    `json:"tagid"`
	UserList  []string `json:"userlist"`
	PartyList []int64  `json:"partylist"`
}

type ParamsUserBatchDelete

type ParamsUserBatchDelete struct {
	UserIDList []string `json:"useridlist"`
}

type ParamsUserBatchReplace

type ParamsUserBatchReplace struct {
	MediaID  string         `json:"media_id"`
	ToInvite bool           `json:"to_invite"`
	Callback *BatchCallback `json:"callback,omitempty"`
}

type ParamsUserBatchSync

type ParamsUserBatchSync struct {
	MediaID  string         `json:"media_id"`
	ToInvite bool           `json:"to_invite"`
	Callback *BatchCallback `json:"callback,omitempty"`
}

type ParamsUserCreate

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

type ParamsUserID

type ParamsUserID struct {
	Mobile string `json:"mobile"`
}

type ParamsUserIDConvert

type ParamsUserIDConvert struct {
	OpenID string `json:"openid"`
}

type ParamsUserUpdate

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

type ResultActiveStat

type ResultActiveStat struct {
	ActiveCnt int `json:"active_cnt"`
}

type ResultBatch

type ResultBatch struct {
	JobID string `json:"jobid"`
}

type ResultBatchInvite

type ResultBatchInvite struct {
	InvalidUser  []string `json:"invaliduser"`
	InvalidParty []int64  `json:"invalidparty"`
	InvalidTag   []int64  `json:"invalidtag"`
}

type ResultBatchRet

type ResultBatchRet struct {
	Status     int         `json:"status"`
	Type       BatchType   `json:"type"`
	Total      int         `json:"total"`
	Percentage int         `json:"percentage"`
	Result     []*BatchRet `json:"result"`
}

type ResultDepartmentCreate

type ResultDepartmentCreate struct {
	ID int64 `json:"id"`
}

type ResultDepartmentGet

type ResultDepartmentGet struct {
	Department *Department `json:"department"`
}

type ResultDepartmentList

type ResultDepartmentList struct {
	Department []*Department `json:"department"`
}

type ResultExport

type ResultExport struct {
	JobID string `json:"jobid"`
}

type ResultExportRet

type ResultExportRet struct {
	Status   int           `json:"status"`
	DataList []*ExportData `json:"data_list"`
}

type ResultOpenIDConvert

type ResultOpenIDConvert struct {
	OpenID string `json:"openid"`
}

type ResultSimipleUserList

type ResultSimipleUserList struct {
	UserList []*SimpleUser `json:"userlist"`
}

type ResultSimpleDepartmentList

type ResultSimpleDepartmentList struct {
	DepartmentID []*SimpleDepartment `json:"department_id"`
}

type ResultTagCreate

type ResultTagCreate struct {
	TagID int64 `json:"tagid"`
}

type ResultTagList

type ResultTagList struct {
	TagList []*Tag `json:"taglist"`
}

type ResultTagUser

type ResultTagUser struct {
	TagName   string     `json:"tagname"`
	UserList  []*TagUser `json:"userlist"`
	PartyList []int      `json:"partylist"`
}

type ResultTagUserAdd

type ResultTagUserAdd struct {
	InvalidList  string  `json:"invalidlist"`
	InvalidParty []int64 `json:"invalidparty"`
}

type ResultTagUserDelete

type ResultTagUserDelete struct {
	InvalidList  string  `json:"invalidlist"`
	InvalidParty []int64 `json:"invalidparty"`
}

type ResultUserID

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

type ResultUserIDConvert

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

type ResultUserList

type ResultUserList struct {
	UserList []*User `json:"userlist"`
}

type SimpleDepartment

type SimpleDepartment struct {
	ID       int64 `json:"id"`
	ParentID int64 `json:"parentid"`
	Order    int64 `json:"order"`
}

type SimpleUser

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

type Tag

type Tag struct {
	TagID   int64  `json:"tagid"`
	TagName string `json:"tagname"`
}

type TagUser

type TagUser struct {
	UserID string `json:"userid"`
	Name   string `json:"name"`
}

type User

type User struct {
	UserID           string           `json:"userid"`
	Name             string           `json:"name"`
	Alias            string           `json:"alias"`
	Mobile           string           `json:"mobile"`
	Department       []int64          `json:"department"`
	Order            []int            `json:"order"`
	Position         string           `json:"position"`
	Gender           string           `json:"gender"`
	Email            string           `json:"email"`
	BizMail          string           `json:"biz_mail"`
	IsLeaderInDept   []int            `json:"is_leader_in_dept"`
	DirectLeader     []string         `json:"direct_leader,omitempty"`
	Avatar           string           `json:"avatar"`
	ThumbAvatar      string           `json:"thumb_avatar"`
	Telephone        string           `json:"telephone"`
	Address          string           `json:"address"`
	OpenUserID       string           `json:"open_userid"`
	MainDepartment   int64            `json:"main_department"`
	ExtAttr          *ExtAttr         `json:"extattr"`
	Status           int              `json:"status"`
	QRCode           string           `json:"qr_code"`
	ExternalPosition string           `json:"external_position"`
	ExternalProfile  *ExternalProfile `json:"external_profile"`
}

type WechatChannels

type WechatChannels struct {
	Nickname string `json:"nickname,omitempty"`
	Status   int    `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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