request

package
v0.0.0-...-85301ac Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddDriveSpacesFilesPermissions

func NewAddDriveSpacesFilesPermissions() *addDriveSpacesFilesPermissionsBuilder

func NewCorpConvMessage

func NewCorpConvMessage(msg message.Message) *corpConvMessageBuilder

func NewCreatChat

func NewCreatChat(name, owner string, userIds ...string) *creatChatBuilder

func NewCreateCooperateCorp

func NewCreateCooperateCorp(name string) *createCooperateCorpBuilder

func NewCreateDept

func NewCreateDept(name string, parentId uint) *createDeptBuilder

func NewCreateDriveSpacesFiles

func NewCreateDriveSpacesFiles(unionId, spaceId, fileName string, fileType file.Genre) *createDriveSpacesFilesBuilder

func NewCreateExtContact

func NewCreateExtContact(name, mobile, stateCode, follower string, labels ...int) *createExtContactBuilder

func NewCreateTodo

func NewCreateTodo(unionId, subject string) *createTodoBuilder

func NewCreateUser

func NewCreateUser(name, mobile string, dept int, deptIds ...int) *createUserBuilder

func NewDeptDetail

func NewDeptDetail(deptId int) *deptDetailBuilder

func NewDeptDetailUserInfo

func NewDeptDetailUserInfo(deptId, cursor, size int) *deptDetailUserInfoBuilder

func NewDeptList

func NewDeptList() *deptListBuilder

func NewDeptSimpleUserInfo

func NewDeptSimpleUserInfo(deptId, cursor, size int) *deptSimpleUserInfoBuilder

func NewGetDriveSpacesFiles

func NewGetDriveSpacesFiles(spaceId, unionId string, size int) *getDriveSpacesFilesBuilder

func NewGetDriveSpacesFilesUploadInfo

func NewGetDriveSpacesFilesUploadInfo(spaceId, parenId, fileName string, fileSize int, md5,
	unionId string,
) *driveSpacesFilesUploadInfoBuilder

func NewInactiveUser

func NewInactiveUser(active bool, offset, size int, date string) *inactiveUserBuilder

func NewMoveDriveSpacesFiles

func NewMoveDriveSpacesFiles(spaceId, fileId, targetSpaceId, unionId string) *moveDriveSpacesFilesBuilder

func NewSendTemplateMessage

func NewSendTemplateMessage(agentId int, templateId string) *sendTemplateMessageBuilder

func NewSetUserRoleManageScope

func NewSetUserRoleManageScope(userId string, roleId int) *setUserRoleManageScopeBuilder

func NewUpdateChat

func NewUpdateChat(chatId string) *updateChatBuilder

func NewUpdateCorpConvMsgStatus

func NewUpdateCorpConvMsgStatus(taskId int, value string) *updateCorpConvMsgStatusBuilder

func NewUpdateDept

func NewUpdateDept(Id uint) *updateDeptBuilder

func NewUpdateExtContact

func NewUpdateExtContact(userId, name, follower string, labels ...int) *updateExtContactBuilder

func NewUpdateTodo

func NewUpdateTodo(unionId, taskId string) *updateTodoBuilder

func NewUpdateTodoDone

func NewUpdateTodoDone(unionId, taskId string) *updateTodoDoneBuilder

func NewUpdateUser

func NewUpdateUser(userId string) *updateUserBuilder

func NewUserDetail

func NewUserDetail(userId string) *userDetailBuilder

Types

type ActivateSuite

type ActivateSuite struct {
	// 第三方应用的SuiteKey
	SuiteKey string `json:"suite_key,omitempty" validate:"required"`

	// 授权企业的CorpId。
	CorpId string `json:"auth_corpid,omitempty" validate:"required"`

	// 授权企业的永久授权码
	PermanentCode string `json:"permanent_code,omitempty" validate:"required"`
}

func NewActivateSuite

func NewActivateSuite(suiteKey, corpId, permanentCode string) *ActivateSuite

type AddDriveSpacesFilesPermissions

type AddDriveSpacesFilesPermissions struct {
	// 钉盘空间ID
	SpaceId string `json:"-" validate:"required"`

	// 文件ID
	FileId string `json:"-" validate:"required"`

	// 用户unionId
	UnionId string `json:"unionId" validate:"required"`

	//权限角色。
	//
	//owner:所有者
	//admin:管理员
	//editor:可编辑
	//viewer:可查看/下载
	//only_viewer:只读
	Role string `json:"role"`

	// 成员权限列表
	Members []driveSpacesFileMember `json:"members"`
}

type AdminUserScope

type AdminUserScope struct {
	UserId string `json:"userid" validate:"required"`
}

func NewAdminUserScope

func NewAdminUserScope(userId string) *AdminUserScope

func (*AdminUserScope) String

func (a *AdminUserScope) String() string

type AgentInfo

type AgentInfo struct {
	AgentId  int    `json:"agentid" validate:"required"`
	SuiteKey string `json:"suite_key" validate:"required"`
	CorpId   string `json:"auth_corpid" validate:"required"`
}

AgentInfo 获取授权应用的基本信息

func NewAgentInfo

func NewAgentInfo(agentId int, key, corpId string) *AgentInfo

type AuthInfo

type AuthInfo struct {
	SuiteKey string `json:"suite_key" validate:"required"`
	CorpId   string `json:"auth_corpid" validate:"required"`
}

func NewAuthInfo

func NewAuthInfo(suiteKey, corpId string) *AuthInfo

type BatchRemoveUserRole

type BatchRemoveUserRole struct {
	RoleIds string `json:"roleIds"`

	RS []int `json:"-" validate:"max=20"`

	UserIds string `json:"userIds"`

	US []string `json:"-" validate:"max=100"`
}

func NewBatchRemoveUserRole

func NewBatchRemoveUserRole(roleIds []int, userIds []string) *BatchRemoveUserRole

type ChatFriendSwitch

type ChatFriendSwitch struct {
	// 群会话ID,可通过创建群会话接口获取
	ChatId string `json:"chatid" validate:"required"`

	// true:开启禁止开关
	// false:关闭禁止开关
	Prohibit bool `json:"is_prohibit" validate:"required"`
}

ChatFriendSwitch 设置禁止群成员私聊

func NewChatFriendSwitch

func NewChatFriendSwitch(chatId string, prohibit bool) *ChatFriendSwitch

type ChatQRCode

type ChatQRCode struct {
	// 群会话的chatid
	ChatId string `json:"chatid,omitempty" validate:"required"`

	// 分享二维码用户的userid
	UserId string `json:"userid,omitempty" validate:"required"`
}

func NewChatQRCode

func NewChatQRCode(chatId, userId string) *ChatQRCode

type ChatSetSubAdmin

type ChatSetSubAdmin struct {
	// 群会话ID,可通过创建群会话接口获取
	ChatId string `json:"chatid" validate:"required"`

	// 群成员userid,可通过根据手机号获取userid接口获取userid。
	UserId string `json:"userids" validate:"required"`

	// 2:添加为管理员
	// 3:删除该管理员
	Role int `json:"role" validate:"required,min=2,max=3"`
}

func NewChatSetSubAdmin

func NewChatSetSubAdmin(chatId, userId string, role int) *ChatSetSubAdmin

type ChatSetUserNick

type ChatSetUserNick struct {
	// 群会话ID,可通过创建群会话接口获取
	ChatId string `json:"chatid" validate:"required"`

	// 要更改群昵称的群成员userid
	UserId string `json:"userid" validate:"required"`

	// 该成员在群中的昵称
	Nick string `json:"group_nick" validate:"required"`
}

func NewChatSetUserNick

func NewChatSetUserNick(chatId, userId, nick string) *ChatSetUserNick

type CodeGetUserInfo

type CodeGetUserInfo struct {
	Code string `json:"code,omitempty"  validate:"required"`
}

func NewCodeGetUserInfo

func NewCodeGetUserInfo(code string) *CodeGetUserInfo

type CorpAccessToken

type CorpAccessToken struct {
	CorpId string `json:"auth_corpid" validate:"required"`
}

CorpAccessToken 获取suite套件token

func NewCorpAccessToken

func NewCorpAccessToken(corpId string) *CorpAccessToken

type CorpConvMessage

type CorpConvMessage struct {
	// 发送消息时使用的微应用的ID。
	AgentId int `json:"agent_id" validate:"required"`

	// 接收者的企业内部用户的userId列表,最大用户列表长度100。
	UserIds []string `json:"-" validate:"lte=100"`

	UserIdList string `json:"userid_list,omitempty"`

	// 接收者的部门id列表,最大列表长度20。接收者是部门Id下包括子部门下的所有用户。
	DeptIdList string `json:"dept_id_list,omitempty"`

	DeptIds []int `json:"-" validate:"lte=20"`

	// 是否发送给企业全部用户。当设置为false时必须指定userid_list或dept_id_list其中一个参数的值。
	All *bool `json:"to_all_user,omitempty"`

	Msg message.Message `json:"msg,omitempty" validate:"required"`
}

CorpConvMessage 工作通知

type CorpPermanentCode

type CorpPermanentCode struct {
	Code string `json:"tmp_auth_code" validate:"required"`
}

func NewCorpPermanentCode

func NewCorpPermanentCode(code string) *CorpPermanentCode

type CreatChat

type CreatChat struct {
	// 群名称,长度限制为1~20个字符
	Name string `json:"name" validate:"required,min=1,max=20"`

	// 群主的userid,该员工必须为会话useridlist的成员之一。
	Owner string `json:"owner" validate:"required"`

	// 群成员列表,每次最多支持40人,群人数上限为1000
	Users []string `json:"useridlist" validate:"required,max=40"`

	//新成员是否可查看100条历史消息:
	//
	//1:可查看
	//
	//0:不可查看
	//
	//如果不传值,代表不可查看。
	ShowHistory *int `json:"showHistoryType,omitempty" validate:"omitempty,max=1,min=0"`

	//群是否可以被搜索:
	//
	//0(默认):不可搜索
	//
	//1:可搜索
	Searchable *int `json:"searchable,omitempty" validate:"omitempty,max=1,min=0"`

	//入群是否需要验证
	//
	//0(默认):不验证
	//
	//1:入群验证
	Validation *int `json:"validationType,omitempty" validate:"omitempty,max=1,min=0"`

	//@all 使用范围:
	//
	//0(默认):所有人可使用
	//
	//1:仅群主可@all
	MentionAllAuthority *int `json:"mentionAllAuthority,omitempty" validate:"omitempty,max=1,min=0"`

	//群管理类型:
	//
	//0(默认):所有人可管理
	//1:仅群主可管理
	ManagementType *int `json:"managementType,omitempty" validate:"omitempty,max=1,min=0"`

	// 是否开启群禁言:
	// 0(默认):不禁言
	// 1:全员禁言
	ChatBannedType *int `json:"chatBannedType,omitempty" validate:"omitempty,max=1,min=0"`
}

type CreateCooperateCorp

type CreateCooperateCorp struct {
	// 合作空间组织名称
	Name string `json:"orgName" validate:"required"`

	// 合作空间的logo
	LogoMediaId string `json:"logoMediaId,omitempty"`

	// 行业code
	IndustryCode int `json:"industryCode,omitempty"`
}

CreateCooperateCorp 创建合作空间

type CreateDept

type CreateDept struct {
	// 部门名称。长度限制为1~64个字符,不允许包含字符"-"","以及","
	Name string `json:"name" validate:"required,min=1,max=64"`

	// 父部门ID,根部门ID为1。
	ParentId uint `json:"parent_id" validate:"required,min=1"`

	//是否隐藏本部门:
	//
	//true:隐藏部门,隐藏后本部门将不会显示在公司通讯录中
	//
	//false(默认值):显示部门
	HideDept *bool `json:"hide_dept,omitempty"`

	//指定可以查看本部门的其他部门列表,总数不能超过200
	//
	//当hide_dept为true时,则此值生效
	DeptPermits string `json:"dept_ds,omitempty"`

	DeptPermit []int `json:"-" validate:"max=200"`

	//指定可以查看本部门的人员userid列表,总数不能超过200
	//
	//当hide_dept为true时,则此值生效
	UserPermits string `json:"user_ds,omitempty"`

	UserPermit []string `json:"-" validate:"max=200"`

	//是否限制本部门成员查看通讯录:
	//
	//true:开启限制。开启后本部门成员只能看到限定范围内的通讯录
	//
	//false(默认值):不限制
	OuterDept *bool `json:"outer_dept,omitempty"`

	//本部门成员是否只能看到所在部门及下级部门通讯录:
	//
	//true:只能看到所在部门及下级部门通讯录
	//
	//false:不能查看所有通讯录,在通讯录中仅能看到自己
	//
	//当outer_dept为true时,此参数生效。
	OuterDeptOnlySelf *bool `json:"outer_dept_only_self,omitempty"`

	//指定本部门成员可查看的通讯录用户userid列表,总数不能超过200
	//
	//当outer_dept为true时,此参数生效。
	UserPermitsUsers string `json:"outer_permit_users,omitempty"`

	UserPermitsUserIds []string `json:"-" validate:"max=200"`

	//指定本部门成员可查看的通讯录部门ID列表,总数不能超过200
	//
	//当outer_dept为true时,此参数生效
	UserPermitsDepts string `json:"outer_permit_depts,omitempty"`

	UserPermitsDeptIds []int `json:"-" validate:"max=200"`

	// 是否创建一个关联此部门的企业群,默认为false即不创建
	CreateDeptGroup *bool `json:"create_dept_group,omitempty"`

	//是否默认同意加入该部门的申请:
	//
	//true:表示加入该部门的申请将默认同意
	//
	//false:表示加入该部门的申请需要有权限的管理员同意
	AutoApproveApply *bool `json:"auto_approve_apply,omitempty"`

	// 在父部门中的排序值,order值小的排序靠前
	Order uint `json:"order,omitempty"`

	// 部门标识字段,开发者可用该字段来唯一标识一个部门,并与钉钉外部通讯录里的部门做映射
	SourceIdentifier string `json:"source_identifier,omitempty"`
}

func (*CreateDept) String

func (cd *CreateDept) String() string

type CreateDriveSpaces

type CreateDriveSpaces struct {
	// 空间名称(不能为空)
	Name string `json:"name,omitempty" validate:"required"`

	// 用户unionId
	UnionId string `json:"unionId,omitempty" validate:"required"`
}

CreateDriveSpaces 新建空间

func NewCreateDriveSpaces

func NewCreateDriveSpaces(name, unionId string) *CreateDriveSpaces

type CreateDriveSpacesFiles

type CreateDriveSpacesFiles struct {
	// 钉盘空间ID
	SpaceId string `json:"-" validate:"required"`

	// 用户unionId
	UnionId string `json:"unionId" validate:"required"`

	// 父目录ID,根目录时传0
	ParentId string `json:"parentId,omitempty"`

	//文件类型。
	//
	//file:文件
	//folder:文件夹
	FileType string `json:"fileType,omitempty" validate:"required,oneof=file folder"`

	// 文件名
	FileName string `json:"fileName,omitempty" validate:"required"`

	// 对应OSS Object Key。可以通过调用获取文件上传信息接口获取。
	// 当fileType值为file文件时,此参数必填。
	// 当fileType值为folder文件夹时,此参数可不填。
	MediaId string `json:"mediaId,omitempty"`

	//文件名称冲突策略,取值:
	//
	//autoRename:自动重命名
	//overwrite:覆写
	//returnExisting:返回已存在文件
	//returnError:报错
	ConflictPolicy string `json:"addConflictPolicy,omitempty" validate:"omitempty,oneof=autoRename overwrite returnExisting returnError"`
}

type CreateExtContact

type CreateExtContact struct {
	Contact *createExtContact `json:"contact" validate:"required"`
}

CreateExtContact 添加外部联系人

func (*CreateExtContact) String

func (e *CreateExtContact) String() string

type CreateRole

type CreateRole struct {
	// 角色名称
	Name string `json:"roleName" validate:"required"`
	// 角色组ID
	GroupId int `json:"groupId" validate:"required"`
}

func NewCreateRole

func NewCreateRole(name string, groupId int) *CreateRole

type CreateRoleGroup

type CreateRoleGroup struct {
	// 角色名称
	Name string `json:"name" validate:"required"`
}

func NewCreateRoleGroup

func NewCreateRoleGroup(name string) *CreateRoleGroup

type CreateTodo

type CreateTodo struct {
	// 业务系统侧的唯一标识ID,即业务ID。
	SourceId string `json:"sourceId,omitempty"`

	// 待办标题
	Subject string `json:"subject" validate:"required"`

	// 创建者的unionId
	CreatorId string `json:"creatorId" validate:"required"`

	// 待办备注描述
	Desc string `json:"description,omitempty"`

	// 截止时间,Unix时间戳,单位毫秒。
	DueTime *int `json:"dueTime,omitempty"`

	// 执行者的unionId
	Executors []string `json:"executorIds,omitempty"`

	// 参与者的unionId
	Participants []string `json:"participantIds,omitempty"`

	// 详情页url跳转地址。
	Urls *detailUrl `json:"detailUrl,omitempty"`

	// 生成的待办是否仅展示在执行者的待办列表中
	OnlyShowExecutor *bool `json:"isOnlyShowExecutor,omitempty"`

	// 优先级,取值:
	// 10:较低
	// 20:普通
	// 30:紧急
	// 40:非常紧急
	Priority *int `json:"priority,omitempty"`

	// 待办通知配置
	NotifyConfigs *notifyConfigs `json:"notifyConfigs,omitempty"`
}

CreateTodo 新增钉钉待办任务

func (*CreateTodo) String

func (todo *CreateTodo) String() string

type CreateUser

type CreateUser struct {
	UserId string `json:"userid,omitempty" validate:"omitempty,min=1,max=64"`

	Name string `json:"name" validate:"required,min=1,max=80"`

	Mobile string `json:"mobile" validate:"required"`

	HideMobile *bool `json:"hide_mobile,omitempty"`

	Telephone string `json:"telephone,omitempty" validate:"omitempty,min=1,max=50"`

	JobNumber string `json:"job_number,omitempty" validate:"omitempty,min=1,max=50"`

	ManagerUserId string `json:"manager_userid,omitempty"`

	Title string `json:"title,omitempty" validate:"omitempty,max=200"`

	Email string `json:"email,omitempty" validate:"omitempty,max=50"`

	OrgEmail string `json:"org_email,omitempty" validate:"omitempty,max=100"`

	OrgEmailType string `json:"org_email_type,omitempty" validate:"omitempty,oneof=profession base"`

	WorkPlace string `json:"work_place,omitempty" validate:"omitempty,max=100"`

	Remark string `json:"remark,omitempty" validate:"omitempty,max=2000"`

	DeptIdList string `json:"dept_id_list" validate:"required"`

	DeptOrders []DeptOrder `json:"dept_order_list,omitempty"`

	DeptTitles []deptTitle `json:"dept_title_list,omitempty"`

	Extension string `json:"extension,omitempty" validate:"omitempty,max=2000"`

	SeniorMode *bool `json:"senior_mode,omitempty"`

	HiredDate *int `json:"hired_date,omitempty"`

	LoginEmail string `json:"login_email,omitempty"`

	ExclusiveAccount *bool `json:"exclusive_account,omitempty"`

	ExclusiveAccountType string `json:"exclusive_account_type,omitempty" validate:"omitempty,oneof=sso dingtalk"`

	LoginId string `json:"loginId,omitempty"`

	Password string `json:"init_password,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUser) String

func (cu *CreateUser) String() string

type DeleteDept

type DeleteDept struct {
	DeptId int `json:"dept_id" validate:"required"`
}

func NewDeleteDept

func NewDeleteDept(deptId int) *DeleteDept

func (*DeleteDept) String

func (d *DeleteDept) String() string

type DeleteExtContact

type DeleteExtContact struct {
	UserId string `json:"user_id" validate:"required"`
}

func NewDeleteExtContact

func NewDeleteExtContact(userId string) *DeleteExtContact

type DeleteRole

type DeleteRole struct {
	Id int `json:"role_id"`
}

func NewDeleteRole

func NewDeleteRole(id int) *DeleteRole

type DeleteUser

type DeleteUser struct {
	UserId string `json:"userid" validate:"required"`
}

func NewDeleteUser

func NewDeleteUser(userId string) *DeleteUser

func (*DeleteUser) String

func (d *DeleteUser) String() string

type DeptDetail

type DeptDetail struct {
	DeptId int `json:"dept_id" validate:"required"`

	// 通讯录语言,默认zh_CN。如果是英文,请传入en_US。
	Language string `json:"language,omitempty" validate:"omitempty,oneof=zh_CN en_US"`
}

type DeptDetailUserInfo

type DeptDetailUserInfo struct {
	// 部门ID,根部门ID为1
	DeptId int `json:"dept_id" validate:"required,min=1"`

	// 分页查询的游标,最开始传0,后续传返回参数中的next_cursor值
	Cursor int `json:"cursor" validate:"omitempty,min=0"`

	// 分页长度,最大值100。
	Size int `json:"size" validate:"required,max=100"`

	//部门成员的排序规则:
	//
	//entry_asc:代表按照进入部门的时间升序。
	//
	//entry_desc:代表按照进入部门的时间降序。
	//
	//modify_asc:代表按照部门信息修改时间升序。
	//
	//modify_desc:代表按照部门信息修改时间降序。
	//
	//custom:代表用户定义(未定义时按照拼音)排序。
	//
	//默认值:custom。
	OrderField string `json:"order_field,omitempty" validate:"omitempty,oneof=entry_asc entry_desc modify_asc modify_desc"`

	// 是否返回访问受限的员工
	ContainAccessLimit bool `json:"contain_access_limit,omitempty"`

	// 通讯录语言,默认zh_CN。如果是英文,请传入en_US。
	Language string `json:"language,omitempty" validate:"omitempty,oneof=zh_CN en_US"`
}

type DeptList

type DeptList struct {
	//父部门ID。
	//
	//如果不传,默认部门为根部门,根部门ID为1。只支持查询下一级子部门,不支持查询多级子部门。
	DeptId int `json:"dept_id,omitempty"`

	// 通讯录语言,默认zh_CN。如果是英文,请传入en_US。
	Language string `json:"language,omitempty" validate:"omitempty,oneof=zh_CN en_US"`
}

type DeptOrder

type DeptOrder struct {
	DeptId int `json:"dept_id"`

	Order int `json:"order"`
}

DeptOrder 员工在对应的部门中的排序

type DeptSimpleUserInfo

type DeptSimpleUserInfo struct {
	// 部门ID,根部门ID为1
	DeptId int `json:"dept_id" validate:"required,min=1"`

	// 分页查询的游标,最开始传0,后续传返回参数中的next_cursor值
	Cursor int `json:"cursor" validate:"omitempty,min=0"`

	// 分页长度,最大值100。
	Size int `json:"size" validate:"required,max=100"`

	//部门成员的排序规则:
	//
	//entry_asc:代表按照进入部门的时间升序。
	//
	//entry_desc:代表按照进入部门的时间降序。
	//
	//modify_asc:代表按照部门信息修改时间升序。
	//
	//modify_desc:代表按照部门信息修改时间降序。
	//
	//custom:代表用户定义(未定义时按照拼音)排序。
	//
	//默认值:custom。
	OrderField string `json:"order_field,omitempty" validate:"omitempty,oneof=entry_asc entry_desc modify_asc modify_desc"`

	// 是否返回访问受限的员工
	ContainAccessLimit bool `json:"contain_access_limit,omitempty"`

	// 通讯录语言,默认zh_CN。如果是英文,请传入en_US。
	Language string `json:"language,omitempty" validate:"omitempty,oneof=zh_CN en_US"`
}

DeptSimpleUserInfo 获取部门用户基础信息

type DeptUserId

type DeptUserId struct {
	// 部门ID,根部门ID为1
	DeptId int `json:"dept_id" validate:"required,min=1"`
}

func NewDeptUserId

func NewDeptUserId(deptId int) *DeptUserId

type GetDriveSpacesFiles

type GetDriveSpacesFiles struct {
	// 钉盘空间ID
	SpaceId string `json:"spaceId" validate:"required"`

	// 用户unionId
	UnionId string `json:"unionId" validate:"required"`

	// 父目录ID
	ParentId string `json:"parentId,omitempty"`

	// 分页游标
	Token string `json:"nextToken,omitempty"`

	// 分页大小
	Size int `json:"maxResults"`

	//排序类型,取值:
	//
	//createTimeAsc:按创建时间升序
	//createTimeDesc:按创建时间降序
	//modifyTimeAsc:按修改时间升序
	//modifyTimeDesc:按修改时间降序
	//nameAsc:按名称升序
	//nameDesc:按名称降序
	//sizeAsc:按大小升序
	//sizeDesc:按大小降序
	//默认值:createTimeDesc
	OrderType string `json:"orderType,omitempty"`
}

type GetDriveSpacesFilesUploadInfo

type GetDriveSpacesFilesUploadInfo struct {
	// 钉盘空间ID
	SpaceId string `json:"-" validate:"required"`

	// ParentId 父目录ID。
	ParentId string `json:"-" validate:"required"`

	UnionId string `json:"unionId,omitempty" validate:"required"`

	// 文件名,带文件扩展名
	FileName string `json:"fileName,omitempty" validate:"required"`

	// 文件大小
	FileSize int `json:"fileSize,omitempty" validate:"required"`

	// 文件md5
	Md5 string `json:"md5,omitempty" validate:"required"`

	//文件名称冲突策略,取值:
	//
	//autoRename:自动重命名
	//overwrite:覆写
	//returnExisting:返回已存在文件
	//returnError:报错
	ConflictPolicy string `json:"addConflictPolicy,omitempty" validate:"omitempty,oneof=autoRename overwrite returnExisting returnError"`

	//对应OSS Object Key。
	//
	//如果首次调用本接口,为了获取文件的上传信息,无需填写mediaId。
	//如果非首次调用本接口,为了刷新上次调用时返回值中的accessToken,需要传入上次调用返回值的mediaId。
	MediaId string `json:"mediaId,omitempty"`
}

type GetExtContact

type GetExtContact struct {
	// 支持分页查询,与size参数同时设置时才生效,此参数代表偏移量,偏移量从0开始
	Offset int `json:"offset"`

	// 支持分页查询,与offset参数同时设置时才生效,此参数代表分页大小,最大100
	Size int `json:"size" validate:"max=100"`
}

func NewGetExtContact

func NewGetExtContact(offset, size int) *GetExtContact

type GetExtContactDetail

type GetExtContactDetail struct {
	UserId string `json:"user_id" validate:"required"`
}

GetExtContactDetail 获取外部联系人详情

func NewGetExtContactDetail

func NewGetExtContactDetail(userId string) *GetExtContactDetail

type GetHrmEmployee

type GetHrmEmployee struct {

	// 在职员工子状态筛选,可以查询多个状态。不同状态之间使用英文逗号分隔。
	//
	//2:试用期
	//
	//3:正式
	//
	//5:待离职
	//
	//-1:无状态
	Status string `json:"status_list"`

	// 分页游标,从0开始。根据返回结果里的next_cursor是否为空来判断是否还有下一页,且再次调用时offset设置成next_cursor的值。
	Offset int `json:"offset"`

	// 分页大小,最大50。
	Size int `json:"size" validate:"max=50"`
}

func NewGetHrmEmployee

func NewGetHrmEmployee(offset, size int, status []employee.Status) *GetHrmEmployee

type GetHrmToBeHiredEmployee

type GetHrmToBeHiredEmployee struct {
	// 分页游标,从0开始。根据返回结果里的next_cursor是否为空来判断是否还有下一页,且再次调用时offset设置成next_cursor的值。
	Offset int `json:"offset"`

	// 分页大小,最大50。
	Size int `json:"size" validate:"max=50"`
}

func NewGetHrmToBeHiredEmployee

func NewGetHrmToBeHiredEmployee(offset, size int) *GetHrmToBeHiredEmployee

type GetIndustryDept

type GetIndustryDept struct {
	DeptId int `json:"dept_id" validate:"required"`

	// 支持分页查询,与size参数同时设置时才生效,此参数代表偏移量,偏移量从0开始
	Offset int `json:"cursor"`

	// 支持分页查询,与offset参数同时设置时才生效,此参数代表分页大小,最大100
	Size int `json:"size" validate:"max=1000"`
}

func NewIndustryDept

func NewIndustryDept(deptId, offset, size int) *GetIndustryDept

type GetIndustryDeptDetail

type GetIndustryDeptDetail struct {
	DeptId int `json:"dept_id" validate:"required"`
}

func NewIndustryDeptDetail

func NewIndustryDeptDetail(deptId int) *GetIndustryDeptDetail

type GetParentIdsByDeptId

type GetParentIdsByDeptId struct {
	DeptId int `json:"dept_id" validate:"required"`
}

func NewGetParentIdsByDeptId

func NewGetParentIdsByDeptId(id int) *GetParentIdsByDeptId

type GetParentIdsByUserId

type GetParentIdsByUserId struct {
	UserId string `json:"userid" validate:"required"`
}

func NewGetParentIdsByUserId

func NewGetParentIdsByUserId(userId string) *GetParentIdsByUserId

type GetTodoList

type GetTodoList struct {
	// 分页游标
	Token string `json:"nextToken,omitempty"`

	// 待办完成状态
	Done bool `json:"isDone,omitempty"`
}

func NewGetTodoList

func NewGetTodoList(token string, done bool) *GetTodoList

type GroupRole

type GroupRole struct {
	// 员工在企业中的userid
	GroupId int `json:"group_id"`
}

func NewGroupRole

func NewGroupRole(id int) *GroupRole

type InactiveUser

type InactiveUser struct {
	//是否活跃:
	//
	//false:未登录
	//
	//true:登录
	Active bool `json:"is_active" validate:"required"`

	// 过滤部门ID列表,不传表示查询整个企业
	DeptIds []int `json:"dept_ids,omitempty"`

	// 支持分页查询,与size参数同时设置时才生效,此参数代表偏移量,偏移量从0开始
	Offset *int `json:"offset" validate:"required,min=0"`

	// 支持分页查询,与offset参数同时设置时才生效,此参数代表分页大小,最大100
	Size int `json:"size" validate:"required,max=100"`

	// 查询日期,日期格式为:yyyyMMdd
	Date string `json:"query_date" validate:"required,max=100"`
}

InactiveUser 获取未登录钉钉的员工列表

type MessageProgress

type MessageProgress struct {
	// 发送消息时使用的微应用的ID
	AgentId int `json:"agent_id" validate:"required"`

	// 发送消息时钉钉返回的任务ID。
	TaskId int `json:"task_id" validate:"required"`
}

func NewMessageProgress

func NewMessageProgress(agentId, taskId int) *MessageProgress

type MobileGetUserId

type MobileGetUserId struct {
	Mobile string `json:"mobile" validate:"required"`
}

func NewMobileGetUserId

func NewMobileGetUserId(mobile string) *MobileGetUserId

type MoveDriveSpacesFiles

type MoveDriveSpacesFiles struct {
	// 空间ID。可调用获取空间列表接口获取
	SpaceId string `json:"-" validate:"required"`

	// 文件ID。可以调用查询文件列表接口获取
	FileId string `json:"-" validate:"required"`

	// 用户unionId,可以调用通过免登码获取用户信息(v2)接口获取
	UnionId string `json:"unionId,omitempty" validate:"required"`

	// 目标空间ID
	TargetSpaceId string `json:"targetSpaceId,omitempty" validate:"required"`

	// 目标父目录ID
	TargetParentId string `json:"targetParentId,omitempty"`

	//文件名称冲突策略,取值:
	//
	//autoRename:自动重命名
	//overwrite:覆写
	//returnExisting:返回已存在文件
	//returnError:报错
	ConflictPolicy string `json:"addConflictPolicy,omitempty" validate:"omitempty,oneof=autoRename overwrite returnExisting returnError"`
}

type ReauthCorp

type ReauthCorp struct {

	// 套件下的微应用ID
	AppId int `json:"app_id" validate:"required,min=1"`

	// 授权未激活应用的CorpId列表
	CorpIds []string `json:"corpid_list" validate:"required,min=1"`
}

func NewReauthCorp

func NewReauthCorp(appId int, corpIds []string) *ReauthCorp

type RecallCorpConvMessage

type RecallCorpConvMessage struct {
	// 发送消息时使用的微应用的ID
	AgentId int `json:"agent_id" validate:"required"`

	// 发送消息时钉钉返回的任务ID。
	TaskId int `json:"msg_task_id" validate:"required"`
}

func NewRecallCorpConvMessage

func NewRecallCorpConvMessage(agentId, taskId int) *RecallCorpConvMessage

type RenameDriveSpacesFiles

type RenameDriveSpacesFiles struct {
	// 用户unionId,可以调用通过免登码获取用户信息(v2)接口获取
	UnionId string `json:"unionId,omitempty" validate:"required"`

	// 新的文件(夹)名称
	NewFileName string `json:"newFileName" validate:"required"`
}

func NewRenameDriveSpacesFiles

func NewRenameDriveSpacesFiles(newFileName, unionId string) *RenameDriveSpacesFiles

type Request

type Request interface {
	// String struct to json string
	String() string
}

type RoleAddUser

type RoleAddUser struct {
	Rs []string `validate:"required,max=20" json:"-"`

	// 角色roleId列表 多个roleId用英文逗号(,)分隔,最多可传20个
	RoleIds string `validate:"required" json:"roleIds"`

	Us []string `validate:"required,max=20" json:"-"`

	// 员工的userId 多个userId用英文逗号(,)分隔,最多可传20个
	UserIds string `validate:"required" json:"userIds"`
}

func NewRoleAddUser

func NewRoleAddUser(roleIds []int, userIds []string) *RoleAddUser

func (*RoleAddUser) String

func (r *RoleAddUser) String() string

type RoleDetail

type RoleDetail struct {
	Id int `json:"roleId"`
}

func NewRoleDetail

func NewRoleDetail(id int) *RoleDetail

type RoleList

type RoleList struct {

	// 支持分页查询,与size参数同时设置时才生效,此参数代表偏移量,偏移量从0开始
	Offset int `json:"offset"`

	// 支持分页查询,与offset参数同时设置时才生效,此参数代表分页大小,默认值20,最大值200
	Size int `json:"size" validate:"max=200"`
}

func NewRoleList

func NewRoleList(offset, size int) *RoleList

type RoleUser

type RoleUser struct {
	// 角色Id
	RoleId int `json:"role_id"`

	// 支持分页查询,与size参数同时设置时才生效,此参数代表偏移量,偏移量从0开始
	Offset int `json:"offset"`

	// 支持分页查询,与offset参数同时设置时才生效,此参数代表分页大小,默认值20,最大值200
	Size int `json:"size" validate:"max=100"`
}

func NewRoleUser

func NewRoleUser(roleId, offset, size int) *RoleUser

type SendChatMessage

type SendChatMessage struct {
	// 群会话的ID
	ChatId string `json:"chatid" validate:"required"`

	// 消息内容,最长不超过2048个字节。
	Msg message.Message `json:"msg" validate:"required"`
}

func NewSendChatMessage

func NewSendChatMessage(chatId string, msg message.Message) *SendChatMessage

type SendMessage

type SendMessage struct {
	// 消息发送者的userid。
	Sender string `json:"sender" validate:"required"`

	// 群会话或者个人会话的id,通过JSAPI接口唤起联系人界面选择会话获取会话cid
	ChatId string `json:"cid" validate:"required"`

	// 消息内容,最长不超过2048个字节
	Msg message.Message `json:"msg" validate:"required"`
}

func NewSendMessage

func NewSendMessage(sender, chatId string, msg message.Message) *SendMessage

type SendTemplateMessage

type SendTemplateMessage struct {
	// 应用的agentId
	AgentId int `json:"agent_id" validate:"required"`

	// 消息模板ID
	TemplateId string `json:"template_id" validate:"required"`

	UserIdList string `json:"userid_list,omitempty"`

	// 接收者的用户userid列表。最大列表长度为5000
	UserIds []string `json:"-" validate:"omitempty,max=5000"`

	DeptIdList string `json:"dept_id_list,omitempty"`

	// 接收者的部门id列表。最大列表长度为500
	DeptIds []int `json:"-" validate:"omitempty,max=500"`

	// 消息模板动态参数赋值数据
	Data map[string]string `json:"data"`
}

type SetUserRoleManageScope

type SetUserRoleManageScope struct {
	// 员工在企业中的userid
	UserId string `json:"userid" validate:"required"`

	// 角色Id
	RoleId int `json:"role_id"`

	DeptIds string `json:"dept_ids,omitempty"`

	Ds []string `json:"-" validate:"max=50"`
}

func (*SetUserRoleManageScope) String

func (s *SetUserRoleManageScope) String() string

type SnsUserInfo

type SnsUserInfo struct {
	//用户授权的临时授权码,只能使用一次。获取方法请参考:
	//
	//扫码登录第三方网站:开发流程
	//
	//免登第三方网站:开发流程
	//
	//使用钉钉账号登录第三方网站:开发流程
	AutoCode string `json:"tmp_auth_code,omitempty" validate:"required"`
}

func NewSnsUserInfo

func NewSnsUserInfo(code string) *SnsUserInfo

type SubDeptList

type SubDeptList struct {
	DeptId int `json:"dept_id" validate:"required"`
}

func NewSubDept

func NewSubDept(id int) *SubDeptList

type SuiteAccessToken

type SuiteAccessToken struct {
	Key string `json:"suite_key" validate:"required"`

	Secret string `json:"suite_secret" validate:"required"`

	Ticket string `json:"suite_ticket" validate:"required"`
}

SuiteAccessToken 获取suite套件token

func NewSuiteAccessToken

func NewSuiteAccessToken(key, secret, ticket string) *SuiteAccessToken

type UnactiveCorp

type UnactiveCorp struct {
	// 微应用ID
	AppId int `json:"app_id"`
}

func NewUnactiveCorp

func NewUnactiveCorp(appId int) *UnactiveCorp

type UnionIdGetUserId

type UnionIdGetUserId struct {
	UnionId string `json:"unionid" validate:"required"`
}

func NewUnionIdGetUserId

func NewUnionIdGetUserId(unionId string) *UnionIdGetUserId

type UpdateChat

type UpdateChat struct {
	ChatId string `json:"chatid" validate:"required"`

	// 群名称,长度限制为1~20个字符
	Name string `json:"name,omitempty" validate:"omitempty,min=1,max=20"`

	// 群主的userid,该员工必须为会话useridlist的成员之一。
	Owner string `json:"owner,omitempty"`

	//群主类型:
	//
	//emp:企业员工
	//
	//ext:外部联系人
	OwnerType string `json:"ownerType,omitempty" validate:"omitempty,oneof=emp ext"`

	// 群成员列表,每次最多支持40人,群人数上限为1000
	AddUsers []string `json:"add_useridlist,omitempty" validate:"omitempty,max=40"`

	// 删除的成员列表
	DelUsers []string `json:"del_useridlist,omitempty"`

	// 添加的外部联系人成员列表。
	ExtUsers []string `json:"add_extidlist,omitempty"`

	// 删除的外部联系人成员列表。
	DelExtUsers []string `json:"del_extidlist,omitempty"`

	// 群头像的mediaId
	Icon string `json:"icon,omitempty"`

	//新成员是否可查看100条历史消息:
	//
	//1:可查看
	//
	//0:不可查看
	//
	//如果不传值,代表不可查看。
	ShowHistory *int `json:"showHistoryType,omitempty" validate:"omitempty,max=1,min=0"`

	//群是否可以被搜索:
	//
	//0(默认):不可搜索
	//
	//1:可搜索
	Searchable *int `json:"searchable,omitempty" validate:"omitempty,max=1,min=0"`

	//入群是否需要验证
	//
	//0(默认):不验证
	//
	//1:入群验证
	Validation *int `json:"validationType,omitempty" validate:"omitempty,max=1,min=0"`

	//@all 使用范围:
	//
	//0(默认):所有人可使用
	//
	//1:仅群主可@all
	MentionAllAuthority *int `json:"mentionAllAuthority,omitempty" validate:"omitempty,max=1,min=0"`

	//群管理类型:
	//
	//0(默认):所有人可管理
	//1:仅群主可管理
	ManagementType *int `json:"managementType,omitempty" validate:"omitempty,max=1,min=0"`

	// 是否开启群禁言:
	// 0(默认):不禁言
	// 1:全员禁言
	ChatBannedType *int `json:"chatBannedType,omitempty" validate:"omitempty,max=1,min=0"`
}

func (*UpdateChat) String

func (uc *UpdateChat) String() string

type UpdateCorpConvMsgStatus

type UpdateCorpConvMsgStatus struct {
	// 发送消息时使用的微应用的ID。
	AgentId int `json:"agent_id" validate:"required"`

	TaskId int `json:"task_id" validate:"required"`

	// 状态栏值
	StatusValue string `json:"status_value,omitempty" validate:"required"`

	// 状态栏背景色,推荐0xFF加六位颜色值
	StatusBgColor string `json:"status_bg,omitempty"`
}

type UpdateDept

type UpdateDept struct {
	// 部门id
	Id uint `json:"dept_id" validate:"required"`

	// 部门名称。长度限制为1~64个字符,不允许包含字符"-"","以及","
	Name string `json:"name,omitempty" validate:"omitempty,min=1,max=64"`

	// 父部门ID,根部门ID为1。
	ParentId *uint `json:"parent_id,omitempty" validate:"omitempty,min=1"`

	//是否隐藏本部门:
	//
	//true:隐藏部门,隐藏后本部门将不会显示在公司通讯录中
	//
	//false(默认值):显示部门
	HideDept *bool `json:"hide_dept,omitempty"`

	//指定可以查看本部门的其他部门列表,总数不能超过200
	//
	//当hide_dept为true时,则此值生效
	DeptPermits string `json:"dept_permits,omitempty"`

	DeptPermit []int `json:"-" validate:"max=200"`

	//指定可以查看本部门的人员userid列表,总数不能超过200
	//
	//当hide_dept为true时,则此值生效
	UserPermits string `json:"user_permits,omitempty"`

	UserPermit []string `json:"-" validate:"max=200"`

	//是否限制本部门成员查看通讯录:
	//
	//true:开启限制。开启后本部门成员只能看到限定范围内的通讯录
	//
	//false(默认值):不限制
	OuterDept *bool `json:"outer_dept,omitempty"`

	//本部门成员是否只能看到所在部门及下级部门通讯录:
	//
	//true:只能看到所在部门及下级部门通讯录
	//
	//false:不能查看所有通讯录,在通讯录中仅能看到自己
	//
	//当outer_dept为true时,此参数生效。
	OuterDeptOnlySelf *bool `json:"outer_dept_only_self,omitempty"`

	//指定本部门成员可查看的通讯录用户userid列表,总数不能超过200
	//
	//当outer_dept为true时,此参数生效。
	UserPermitsUsers string `json:"outer_permit_users,omitempty"`

	UserPermitsUserIds []string `json:"-" validate:"max=200"`

	//指定本部门成员可查看的通讯录部门ID列表,总数不能超过200
	//
	//当outer_dept为true时,此参数生效
	UserPermitsDepts string `json:"outer_permit_depts,omitempty"`

	UserPermitsDeptIds []int `json:"-" validate:"max=200"`

	// 是否创建一个关联此部门的企业群,默认为false即不创建
	CreateDeptGroup *bool `json:"create_dept_group,omitempty"`

	//是否默认同意加入该部门的申请:
	//
	//true:表示加入该部门的申请将默认同意
	//
	//false:表示加入该部门的申请需要有权限的管理员同意
	AutoApproveApply *bool `json:"auto_approve_apply,omitempty"`

	// 在父部门中的排序值,order值小的排序靠前
	Order uint `json:"order,omitempty"`

	// 部门标识字段,开发者可用该字段来唯一标识一个部门,并与钉钉外部通讯录里的部门做映射
	SourceIdentifier string `json:"source_identifier,omitempty"`

	//当部门群已经创建后,有新人加入部门时是否会自动加入该群:
	//
	//true:自动加入群
	//
	//false:不会自动加入群
	//
	//不传值,则保持不变
	AutoAddUser *bool `json:"auto_add_user,omitempty"`

	// 部门的主管userid列表,多个userid之间使用英文逗号分隔
	DeptManagerUseridList string `json:"dept_manager_userid_list,omitempty"`

	//部门群是否包含子部门:
	//
	//true:包含
	//
	//false:不包含
	//
	//不传值,则保持不变
	GroupContainSubDept *bool `json:"group_contain_sub_dept,omitempty"`

	//部门群是否包含外包部门:
	//
	//true:包含
	//
	//false:不包含
	//
	//不传值,则保持不变
	GroupContainOuterDept *bool `json:"group_contain_outer_dept,omitempty"`

	//部门群是否包含隐藏部门:
	//
	//true:包含
	//
	//false:不包含
	//
	//不传值,则保持不变
	GroupContainHiddenDept *bool `json:"group_contain_hidden_dept,omitempty"`

	// 企业群群主的userid
	OrgDeptOwner string `json:"org_dept_owner,omitempty"`

	// 强制更新的字段,支持清空指定的字段,多个字段之间使用英文逗号分隔。目前支持字段: dept_manager_userid_list
	ForceUpdateFields string `json:"force_update_fields,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateDept) String

func (u *UpdateDept) String() string

type UpdateExtContact

type UpdateExtContact struct {
	Contact *updateExtContact `json:"contact" validate:"required"`
}

UpdateExtContact 更新外部联系人

func (*UpdateExtContact) String

func (e *UpdateExtContact) String() string

type UpdateRole

type UpdateRole struct {
	// 角色id
	Id int `json:"roleId" validate:"required"`
	// 角色名称
	Name string `json:"roleName" validate:"required"`
}

func NewUpdateRole

func NewUpdateRole(id int, name string) *UpdateRole

type UpdateTodo

type UpdateTodo struct {
	// 当前访问资源所归属用户的unionId
	UnionId string `json:"unionId,omitempty" validate:"required"`

	// 待办ID
	TaskId string `json:"taskId,omitempty" validate:"required"`

	// 待办标题
	Subject string `json:"subject,omitempty"`

	// 待办描述
	Desc string `json:"description,omitempty"`

	// 截止时间,Unix时间戳,单位毫秒。
	DueTime *int `json:"dueTime,omitempty"`

	// 完成状态
	Done *bool `json:"done,omitempty"`

	// 执行者的unionId
	Executors []string `json:"executorIds,omitempty"`

	// 参与者的unionId
	Participants []string `json:"participantIds,omitempty"`
}

type UpdateTodoDone

type UpdateTodoDone struct {
	// 当前访问资源所归属用户的unionId
	UnionId string `json:"unionId,omitempty" validate:"required"`

	// 待办ID
	TaskId string `json:"taskId,omitempty" validate:"required"`

	// 执行者状态列表,id需传用户的unionId
	TodoDone []*todoDone `json:"executorStatusList,omitempty"`
}

type UpdateUser

type UpdateUser struct {
	// 员工的userid
	UserId string `json:"userid" validate:"required"`

	// 员工名称,长度最大80个字符
	Name string `json:"name,omitempty"`

	// 手机号码,企业内必须唯一,不可重复,如果是国际号码,请使用+xx-xxxxxx的格式
	Mobile string `json:"mobile,omitempty"`

	// 是否号码隐藏: true:隐藏 隐藏手机号后,手机号在个人资料页隐藏,但仍可对其发DING、发起钉钉免费商务电话。 false:不隐藏
	HideMobile *bool `json:"hide_mobile,omitempty"`

	// 分机号,长度最大50个字符。企业内必须唯一,不可重复
	Telephone string `json:"telephone,omitempty" validate:"omitempty,min=1,max=50"`

	// 员工工号,长度最大50个字符
	JobNumber string `json:"job_number,omitempty" validate:"omitempty,min=1,max=50"`

	// 直属主管的userId
	ManagerUserId string `json:"manager_userid,omitempty"`

	// 职位,长度最大200个字符
	Title string `json:"title,omitempty" validate:"omitempty,max=200"`

	// 员工邮箱,长度最大50个字符。企业内必须唯一,不可重复
	Email string `json:"email,omitempty" validate:"omitempty,max=50"`

	// 员工的企业邮箱。员工的企业邮箱已开通,才能增加此字段
	OrgEmail string `json:"org_email,omitempty" validate:"omitempty,max=100"`

	// 员工的企业邮箱类型,仅对支持的组织生效(profession: 标准版,base: 基础版)
	OrgEmailType string `json:"org_email_type,omitempty" validate:"omitempty,oneof=profession base"`

	// 办公地点,长度最大100个字符
	WorkPlace string `json:"work_place,omitempty" validate:"omitempty,max=100"`

	// Remark 备注,长度最大2000个字符
	Remark string `json:"remark,omitempty" validate:"omitempty,max=2000"`

	// 所属部门ID列表
	DeptIdList string `json:"dept_id_list,omitempty"`

	// 员工在对应的部门中的排序
	DeptOrders []DeptOrder `json:"dept_order_list,omitempty"`

	// 员工在对应的部门中的职位
	DeptTitles []deptTitle `json:"dept_title_list,omitempty"`

	// 扩展属性,长度最大2000个字符
	Extension string `json:"extension,omitempty" validate:"omitempty,max=2000"`

	// 是否开启高管模式.开启后,手机号码对所有员工隐藏。普通员工无法对其发DING、发起钉钉免费商务电话。高管之间不受影响
	SeniorMode *bool `json:"senior_mode,omitempty"`

	// 入职时间,UNIX时间戳,单位毫秒
	HiredDate int `json:"hired_date,omitempty"`

	// 通讯录语言,默认zh_CN。如果是英文,请传入en_US。
	Language string `json:"language,omitempty" validate:"omitempty,oneof=zh_CN en_US"`

	// 强制更新的字段,支持清空指定的字段,多个字段之间使用逗号分隔。目前支持字段: manager_userid
	ForceUpdateFields string `json:"force_update_fields,omitempty"`

	// LoginId 专属帐号登录名。
	LoginId string `json:"loginId,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUser) String

func (u *UpdateUser) String() string

type UploadFile

type UploadFile struct {
	//媒体文件类型:
	//
	//image:图片,图片最大1MB。支持上传jpg、gif、png、bmp格式。
	//
	//voice:语音,语音文件最大2MB。支持上传amr、mp3、wav格式。
	//
	//video:视频,视频最大10MB。支持上传mp4格式。
	//
	//file:普通文件,最大10MB。支持上传doc、docx、xls、xlsx、ppt、pptx、zip、pdf、rar格式。
	Genre string `validate:"required,oneof=image voice file video"`

	// 文件名称
	FileName string `validate:"required"`

	// 字段名称
	FieldName string `validate:"required"`

	Reader io.Reader `validate:"required"`
}

UploadFile 上传文件

func NewUploadFile

func NewUploadFile(src string, genre file.Genre) UploadFile

type UserCount

type UserCount struct {
	// 是否包含未激活钉钉人数
	OnlyActive bool `json:"only_active" validate:"required"`
}

func NewUserCount

func NewUserCount(active bool) *UserCount

type UserDetail

type UserDetail struct {
	UserId string `json:"userid" validate:"required"`

	// 通讯录语言,默认zh_CN。如果是英文,请传入en_US。
	Language string `json:"language,omitempty" validate:"omitempty,oneof=zh_CN en_US"`
}

func (*UserDetail) String

func (u *UserDetail) String() string

Source Files

Jump to

Keyboard shortcuts

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