addr_book

package
v0.0.0-...-2636f62 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchDeleteUser

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

BatchDeleteUser 批量删除成员

func BatchGetResult

func BatchGetResult(dest *BatchSyncResult, jobID string) wx.Action

func BatchInvite

func BatchInvite(dest *InviteResult, params *ParamsInvite) wx.Action

BatchInvite 邀请成员

func BatchReplaceParty

func BatchReplaceParty(dest *BatchSyncJob, params *ParamsBatchSync) wx.Action

func BatchReplaceUser

func BatchReplaceUser(dest *BatchSyncJob, params *ParamsBatchSync) wx.Action

func BatchSyncUser

func BatchSyncUser(dest *BatchSyncJob, params *ParamsBatchSync) wx.Action

func Convert2OpenID

func Convert2OpenID(dest *ConvertResult, userID string) wx.Action

Convert2OpenID userid转openid

func Convert2UserID

func Convert2UserID(dest *ConvertResult, openid string) wx.Action

Convert2UserID openid转userid

func CreateDepartment

func CreateDepartment(data *Department) wx.Action

CreateDepartment 创建部门

func CreateTag

func CreateTag(data *Tag) wx.Action

CreateTag 创建标签

func CreateUser

func CreateUser(data *User) wx.Action

CreateUser 创建成员

func DeleteDepartment

func DeleteDepartment(id int64) wx.Action

DeleteDepartment 删除部门

func DeleteTag

func DeleteTag(tagID int64) wx.Action

func DeleteUser

func DeleteUser(userID string) wx.Action

DeleteUser 删除成员

func GetActiveStat

func GetActiveStat(dest *ActiveStat, date string) wx.Action

GetActiveStat 获取企业活跃成员数

func GetDepartmentList

func GetDepartmentList(dest *[]*Department, id ...int64) wx.Action

GetDepartmentList 获取部门列表

func GetJoinQRCode

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

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

func GetLinkedCorpDeparmentList

func GetLinkedCorpDeparmentList(dest *[]*LinkedCorpDepartment, linkedID, departmentID string) wx.Action

func GetLinkedCorpPermList

func GetLinkedCorpPermList(dest *LinkedCorpPermList) wx.Action

func GetLinkedCorpUser

func GetLinkedCorpUser(dest *LinkedCorpUser, corpID, userID string) wx.Action

func GetLinkedCorpUserList

func GetLinkedCorpUserList(dest *[]*LinkedCorpUser, linkedID, departmentID string, fetchChild bool) wx.Action

func GetLinkedCorpUserSimpleList

func GetLinkedCorpUserSimpleList(dest *[]*LinkedCorpUser, linkedID, departmentID string, fetchChild bool) wx.Action

func GetTag

func GetTag(dest *TagSpec, tagID int64) wx.Action

func GetTagList

func GetTagList(dest *[]*Tag) wx.Action

func GetUser

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

GetUser 读取成员

func GetUserSimpleList

func GetUserSimpleList(dest *[]*User, departmentID int64, fetchChild bool) wx.Action

GetUserSimpleList 获取部门成员

func UpdateDepartment

func UpdateDepartment(data *Department) wx.Action

UpdateDepartment 更新部门

func UpdateTag

func UpdateTag(data *Tag) wx.Action

func UpdateUser

func UpdateUser(data *User) wx.Action

UpdateUser 更新成员

func UserList

func UserList(dest *[]*User, departmentID int64, fetchChild bool) wx.Action

UserList 获取部门成员详情

Types

type ActiveStat

type ActiveStat struct {
	Count int `json:"active_cnt"`
}

type Attr

type Attr struct {
	Type        AttrType          `json:"type"`
	Name        string            `json:"name"`
	Text        map[string]string `json:"text,omitempty"`
	Web         map[string]string `json:"web,omitempty"`
	Miniprogram map[string]string `json:"miniprogram,omitempty"`
}

type AttrType

type AttrType int
const (
	TextAttr  AttrType = 0
	WebAttr   AttrType = 1
	MinipAttr AttrType = 2
)

type BatchSyncJob

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

type BatchSyncResult

type BatchSyncResult struct {
	Status     int           `json:"status"`
	Type       BatchSyncType `json:"type"`
	Total      int           `json:"total"`
	Percentage int           `json:"percentage"`
	Result     []*SyncResult `json:"result"`
}

type BatchSyncType

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

type ConvertResult

type ConvertResult struct {
	UserID string `json:"userid"`
	OpenID string `json:"openid"`
}

type Department

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

type ExtAttr

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

type ExternalProfile

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

type Gender

type Gender string

Gender 性别

const (
	GenderUnknown Gender = "0" // 未知
	GenderMale    Gender = "1" // 男性
	GenderFemale  Gender = "2" // 女性
)

type InviteResult

type InviteResult struct {
	InvalidUser  []string `json:"invaliduser"`
	InvalidParth []string `json:"invalidparth"`
	InvalidTag   []string `json:"invalidtag"`
}

type JoinQRCode

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

type LinkedCorpAttrType

type LinkedCorpAttrType int
const (
	LinkedCorpAttrText LinkedCorpAttrType = 0
	LinkedCorpAttrWeb  LinkedCorpAttrType = 1
)

type LinkedCorpDepartment

type LinkedCorpDepartment struct {
	DepartmentID   string `json:"department_id"`
	DepartmentName string `json:"department_name"`
	ParentID       string `json:"parentid"`
	Order          int    `json:"order"`
}

type LinkedCorpPermList

type LinkedCorpPermList struct {
	UserIDs       []string `json:"userids"`
	DepartmentIDs []string `json:"department_ids"`
}

type LinkedCorpUser

type LinkedCorpUser struct {
	UserID     string                 `json:"userid"`
	Name       string                 `json:"name"`
	Department []string               `json:"department"`
	Mobile     string                 `json:"mobile"`
	Telephone  string                 `json:"telephone"`
	EMail      string                 `json:"email"`
	Position   string                 `json:"position"`
	CorpID     string                 `json:"corpid"`
	ExtAttr    *LinkedCorpUserExtAttr `json:"extattr"`
}

type LinkedCorpUserAttr

type LinkedCorpUserAttr struct {
	Type  LinkedCorpAttrType `json:"type" `
	Name  string             `json:"name"`
	Value string             `json:"value"`
	Text  map[string]string  `json:"text"`
	Web   map[string]string  `json:"web"`
}

type LinkedCorpUserExtAttr

type LinkedCorpUserExtAttr struct {
	Attrs []*LinkedCorpUserAttr `json:"attrs"`
}

type ParamsBatchSync

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

type ParamsInvite

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

type SyncCallback

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

type SyncResult

type SyncResult struct {
	UserID  string `json:"userid"`
	Action  int    `json:"action"`
	PartyID int    `json:"partyid"`
}

type Tag

type Tag struct {
	ID   int64  `json:"tagid"`
	Name string `json:"tagname"`
}

type TagSpec

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

type TagUser

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

type User

type User struct {
	UserID           string           `json:"user_id"`
	Name             string           `json:"name"`
	Alias            string           `json:"alias,omitempty"`
	Mobile           string           `json:"mobile,omitempty"`
	Department       []int64          `json:"department"`
	Order            []int64          `json:"order,omitempty"`
	Position         string           `json:"position,omitempty"`
	Gender           Gender           `json:"gender,omitempty"`
	Email            string           `json:"email,omitempty"`
	IsLeaderInDept   []int64          `json:"is_leader_in_dept,omitempty"`
	Enable           int              `json:"enable,omitempty"`
	AvatarMediaID    string           `json:"avatar_mediaid,omitempty"` // 仅创建/更新可见
	Avatar           string           `json:"avatar,omitempty"`         // 仅详情可见
	ThumbAvatar      string           `json:"thumb_avatar,omitempty"`   // 仅详情可见
	Telephone        string           `json:"telephone,omitempty"`
	Address          string           `json:"address,omitempty"`
	OpenUserID       string           `json:"open_userid,omitempty"` // 仅详情可见
	MainDepartment   int64            `json:"main_department,omitempty"`
	ExtAttr          *ExtAttr         `json:"extattr,omitempty"`
	ToInvite         bool             `json:"to_invite,omitempty"` // 仅创建/更新可见
	Status           int              `json:"status,omitempty"`    // 仅详情可见
	QRCode           string           `json:"qr_code,omitempty"`   // 仅详情可见
	ExternalPosition string           `json:"external_position,omitempty"`
	ExternalProfile  *ExternalProfile `json:"external_profile,omitempty"`
}

Jump to

Keyboard shortcuts

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