response

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Response
	// Expires 过期时间
	Expires int16 `json:"expires_in"`
	// Create 创建时间
	Create int64 `json:"create"`
	// Token
	Token string `json:"access_token"`
}

AccessToken 获取企业内部应用的access_token https://developers.dingtalk.com/document/app/obtain-orgapp-token

func (*AccessToken) CreatedAt

func (token *AccessToken) CreatedAt() int64

CreatedAt is when the access token is generated

func (*AccessToken) ExpiresIn

func (token *AccessToken) ExpiresIn() int16

ExpiresIn is how soon the access token is expired

type AdminUserScope

type AdminUserScope struct {
	Response
	// 可管理的部门ID列表
	DeptIds []int `json:"dept_ids"`
}

type Agent

type Agent struct {
	// 授权方应用名字。
	Name string `json:"agent_name"`

	// 授权方应用ID。
	AgentId int `json:"agentid"`

	Logo string `json:"logo_url"`

	// 应用ID
	AppId int `json:"appid"`

	// 对此微应用有管理权限的管理员userid。
	Admins []string `json:"admin_list"`

	UseAppRole bool `json:"use_app_role"`
}

type AgentInfo

type AgentInfo struct {
	Response
	// 企业应用名称
	Name string `json:"name"`

	// 企业应用ID。
	AgentId int `json:"agentid"`

	Logo string `json:"logo_url"`

	// 企业应用描述
	Description string `json:"description"`

	//授权方企业应用是否被禁用:
	//
	//0:禁用
	//
	//1:正常
	//
	//2:待激活
	Close int `json:"close"`
}

type AssociatedOrg

type AssociatedOrg struct {
	UnionOrgList []UnionOrg `json:"union_emp_map_list"`
}

AssociatedOrg 关联映射关系

type AtApproveForOpenVo added in v3.0.3

type AtApproveForOpenVo struct {
	DurationUnit string `json:"duration_unit"`
	Duration     string `json:"duration"`
	SubType      string `json:"sub_type"`
	TagName      string `json:"tag_name"`
	ProcInstId   string `json:"procInst_id"`
	BeginTime    string `json:"begin_time"`
	BizType      int    `json:"biz_type"`
	EndTime      string `json:"end_time"`
	GmtFinished  string `json:"gmt_finished"`
}

type AtAttendanceRecordForOpenVo added in v3.0.3

type AtAttendanceRecordForOpenVo struct {
	RecordId          int    `json:"record_id"`
	SourceType        string `json:"source_type"`
	UserAccuracy      string `json:"user_accuracy"`
	ValidMatched      bool   `json:"valid_matched"`
	UserCheckTime     string `json:"user_check_time"`
	UserLongitude     string `json:"user_longitude"`
	UserSsid          string `json:"user_ssid"`
	BaseAccuracy      string `json:"base_accuracy"`
	UserMacAddr       string `json:"user_mac_addr"`
	UserLatitude      string `json:"user_latitude"`
	BaseAddress       string `json:"base_address"`
	InvalidRecordMsg  string `json:"invalid_record_msg"`
	InvalidRecordType string `json:"invalid_record_type"`
}

type AtAttendanceResultForOpenVo added in v3.0.3

type AtAttendanceResultForOpenVo struct {
	RecordId       int    `json:"record_id"`
	SourceType     string `json:"source_type"`
	PlanCheckTime  string `json:"plan_check_time"`
	ClassId        int    `json:"class_id"`
	LocationMethod string `json:"location_method"`
	LocationResult string `json:"location_result"`
	OutsideRemark  string `json:"outside_remark"`
	PlanId         int    `json:"plan_id"`
	UserAddress    string `json:"user_address"`
	GroupId        int    `json:"group_id"`
	UserCheckTime  string `json:"user_check_time"`
	ProcInstId     string `json:"procInst_id"`
	CheckType      string `json:"check_type"`
	TimeResult     string `json:"time_result"`
}

type AtCheckInfoForOpenVo added in v3.0.3

type AtCheckInfoForOpenVo struct {
	WorkDate             string                        `json:"work_date"`
	AttendanceResultList []AtAttendanceResultForOpenVo `json:"attendance_result_list"`
	UserId               string                        `json:"userid"`
	ApproveList          []AtApproveForOpenVo          `json:"approve_list"`
	CheckRecordList      []AtAttendanceRecordForOpenVo `json:"check_record_list"`
	CorpId               string                        `json:"corpId"`
	ClassSettingInfo     AtClassSettingInfoForOpenVo   `json:"class_setting_info"`
}

type AtClassSettingInfoForOpenVo added in v3.0.3

type AtClassSettingInfoForOpenVo struct {
	RestTimeVoList []AtRestTimeVo `json:"rest_time_vo_list"`
}

type AtRestTimeVo added in v3.0.3

type AtRestTimeVo struct {
	RestBeginTime int `json:"rest_begin_time"`
	RestEndTime   int `json:"rest_end_time"`
}

type AttendanceGroup

type AttendanceGroup struct {
	// 考勤组ID
	GroupId int `json:"group_id"`

	//是否是默认考勤组。
	//
	//false:不是
	//
	//true:是
	Default bool `json:"is_default"`

	// 考勤组名称
	GroupName string `json:"group_name"`

	//考勤类型。
	//
	//FIXED为固定排班
	//
	//TURN为轮班排班
	//
	//NONE为无班次
	Type string `json:"type"`

	// 考勤组对应的考勤班次列表
	SelectedClass []SelectedClass `json:"selected_class"`

	// 一周的班次时间展示列表
	ClassesList []string `json:"classes_list"`

	DisableCheckWhenRest bool `json:"disable_check_when_rest"`

	DisableCheckWithoutSchedule bool `json:"disable_check_without_schedule"`

	EnableEmpSelectClass bool `json:"enable_emp_select_class"`

	// 考勤组主负责人
	OwnerUserId string `json:"owner_user_id"`

	//固定班次的工作日班次。
	//
	//说明
	//0表示休息。
	//数组内的值,从左到右依次代表周日到周六,每日的排班情况。
	WorkDayList []string `json:"work_day_list"`

	// 默认班次ID
	DefaultClassId int `json:"default_class_id"`

	// 考勤组子负责人
	ManagerList []string `json:"manager_list"`

	// 参与考勤人员人数。
	MemberCount int `json:"member_count"`
}

type AttendanceGroups

type AttendanceGroups struct {
	HasMore bool `json:"has_more"`

	Groups []AttendanceGroup `json:"groups"`
}

type AuthCorpInfo

type AuthCorpInfo struct {
	CorpId string `json:"corpid"`

	// 企业所属行业
	Industry string `json:"industry"`

	// 邀请码,只有自己邀请的企业才会返回邀请码,可用该邀请码统计不同渠道的拉新,否则值为空字符串
	InviteCode string `json:"invite_code"`

	// 授权方企业名称
	CorpName string `json:"corp_name"`

	// 序列号
	LicenseCode string `json:"license_code"`

	// 渠道码
	AuthChannel string `json:"auth_channel"`

	// 渠道类型。
	// 为了避免渠道码重复,可与渠道码共同确认渠道。可能为空,非空时当前只有满天星类型,值为STAR_ACTIVITY
	AuthChannelType string `json:"auth_channel_type"`

	// 企业是否认证。
	Authenticated bool `json:"is_authenticated"`

	//企业认证等级:
	//
	//0:未认证
	//
	//1:高级认证
	//
	//2:中级认证
	//
	//3:初级认证
	AuthLevel int `json:"auth_level"`

	// 企业邀请链接
	InviteUrl string `json:"invite_url"`

	// 企业logo
	CorpLogoUrl string `json:"corp_logo_url"`
}

type AuthInfo

type AuthInfo struct {
	Agents []Agent `json:"agent"`
}

type AuthUserInfo

type AuthUserInfo struct {
	UserId string `json:"userId"`
}

type BatchUpdateApprovalProcess added in v3.0.3

type BatchUpdateApprovalProcess struct {
	Response
}

type CancelWorkrecord added in v3.0.3

type CancelWorkrecord struct {
	Response
}

type ChannelAgent

type ChannelAgent struct {
	// 授权方应用名字
	Name string `json:"agent_name"`

	// 授权方应用Id
	AgentId int `json:"agentid"`

	Logo string `json:"logo_url"`

	// 应用ID
	AppId int `json:"appid"`
}

type ChannelAuthInfo

type ChannelAuthInfo struct {
	ChannelAgents []ChannelAgent `json:"channelAgent"`
}

ChannelAuthInfo 授权的服务窗应用信息列表

type ChatMsgReadUser

type ChatMsgReadUser struct {
	Response

	// 下次分页获取的起始游标
	NextCursor int `json:"next_cursor"`

	// 已读人员的userid列表。已读人员为空时不返回该参数。
	UserIds []string `json:"readUserIdList"`
}

type ChatQRCode

type ChatQRCode struct {
	Response
	Url string `json:"result"`
}

type CodeGetUserInfo

type CodeGetUserInfo struct {
	Response

	UserInfo struct {
		// 用户名字
		Name string `json:"name"`

		// 用户unionId
		UnionId string `json:"unionid"`

		// 用户的userid
		UserId string `json:"userid"`

		// 用户关联的unionId
		AssociatedUnionId string `json:"associated_unionid"`

		//级别。
		//
		//1:主管理员
		//
		//2:子管理员
		//
		//100:老板
		//
		//0:其他(如普通员工)
		Level int `json:"sys_level"`

		//是否是管理员。
		//
		//true:是
		//
		//false:不是
		Admin bool `json:"sys"`

		// 设备ID
		DeviceId string `json:"device_id"`
	} `json:"result"`
}

type ColumnDayAndVal added in v3.0.3

type ColumnDayAndVal struct {
	Id int `json:"id"`
}

type ColumnForTopVo added in v3.0.3

type ColumnForTopVo struct {
}

type ColumnValForTopVo added in v3.0.3

type ColumnValForTopVo struct {
	ColumnVals []ColumnDayAndVal `json:"column_vals"`
	ColumnVo   ColumnForTopVo    `json:"column_vo"`
	FixedValue string            `json:"fixed_value"`
}

type Columns added in v3.0.3

type Columns struct {
	Id           int    `json:"id"`
	Type         int    `json:"type"`
	Name         string `json:"name"`
	Alias        string `json:"alias"`
	Status       int    `json:"status"`
	SubType      int    `json:"sub_type"`
	ExpressionId int    `json:"expression_id"`
}

type ColumnsKey added in v3.0.3

type ColumnsKey struct {
	Columns []Columns `json:"columns"`
}

type ColumnsValue added in v3.0.3

type ColumnsValue struct {
	ColumnVals []ColumnValForTopVo `json:"column_vals"`
}

type CorpAuthInfo

type CorpAuthInfo struct {
	Response
	AuthInfo        `json:"auth_info"`
	AuthCorpInfo    `json:"auth_corp_info"`
	AuthUserInfo    `json:"auth_user_info"`
	ChannelAuthInfo `json:"channel_auth_info"`
}

type CorpConvMessage

type CorpConvMessage struct {
	Response

	TaskId int `json:"task_id"`
}

type CorpDingIndex

type CorpDingIndex struct {
	Response
	// 日期
	Date string `json:"statDate"`

	// 钉钉指数
	Total float32 `json:"idxTotal"`

	// 效率指数
	Efficiency float32 `json:"idxEfficiency"`

	// 绿色指数
	Carbon float32 `json:"idxCarbon"`

	// 钉钉指数月均分
	MonthlyAvg float32 `json:"idxMonthlyAvg"`
}

CorpDingIndex 获取企业最新钉钉指数信息

type CorpPermanentCode

type CorpPermanentCode struct {
	Response
	CorpInfo struct {
		// 授权方企业CorpId
		CorpId string `json:"corpid"`

		// 授权方企业名称。
		CorpName string `json:"corp_name"`
	} `json:"auth_corp_info"`
	// 永久授权码
	PermanentCode string `json:"permanent_code"`
}

type CreatChat

type CreatChat struct {
	Response

	// 群会话的ID,后续版本中chatid将不再使用,请将openConversationId作为群会话唯一标识
	ChatId string `json:"chatid"`

	// 群会话的ID
	OpenConversationId string `json:"openConversationId"`

	//会话类型:
	//
	//2:企业群。
	ConversationTag int `json:"conversationTag"`
}

type CreateAttendanceGroup

type CreateAttendanceGroup struct {
	Response

	AttendanceGroup struct {
		Id   int    `json:"id"`
		Name string `json:"name"`
	} `json:"result"`
}

type CreateCooperateCorp

type CreateCooperateCorp struct {
	Response

	// 合作空间的CorpId
	CooperateCorpId string `json:"cooperateCorpId"`
}

CreateCooperateCorp 创建合作空间

type CreateDept

type CreateDept struct {
	Response
	Dept struct {
		DeptId int `json:"dept_id"`
	} `json:"result"`
}

type CreateDriveSpaces

type CreateDriveSpaces struct {
	Response

	// 空间ID
	SpaceId string `json:"spaceId"`

	// 空间名称
	Name string `json:"spaceName"`

	// 空间类型
	Type string `json:"spaceType"`

	// 空间总额度
	Quota int `json:"quota"`

	// 空间已使用额度
	UsedQuota int `json:"usedQuota"`

	//授权模式,取值:
	//
	//acl:acl授权
	//custom:自定义授权
	PermissionMode string `json:"permissionMode"`

	// 创建时间
	CreateTime string `json:"createTime"`

	// 修改时间
	ModifyTime string `json:"modifyTime"`
}

type CreateExtContact

type CreateExtContact struct {
	Response
	UserId string `json:"userid"`
}

type CreateRole

type CreateRole struct {
	Response
	RoleId int `json:"roleId"`
}

type CreateRoleGroup

type CreateRoleGroup struct {
	Response
	GroupId int `json:"groupId"`
}

type CreateTodo

type CreateTodo struct {
	Response

	RequestId string `json:"requestId"`
	// 待办ID
	Id string `json:"id"`

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

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

	// 开始时间,Unix时间戳,单位毫秒
	StartTime int `json:"startTime"`

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

	// 完成时间,Unix时间戳,单位毫秒
	FinishTime int `json:"finishTime"`

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

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

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

	// 详情页url跳转地址。
	Urls struct {
		// APP端详情页url跳转地址
		App string `json:"appUrl"`

		// PC端详情页url跳转地址
		Pc string `json:"pcUrl"`
	} `json:"detailUrl"`

	// 业务来源
	Source string `json:"source"`

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

	// 创建时间,Unix时间戳,单位毫秒
	CreatedTime int `json:"createdTime"`

	// 更新时间,Unix时间戳,单位毫秒
	ModifiedTime int `json:"modifiedTime"`

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

	// 更新者的unionId
	ModifierId string `json:"modifierId"`

	// 接入应用标识
	BizTag string `json:"bizTag"`

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

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

	// 待办通知配置
	NotifyConfigs struct {
		Ding string `json:"dingNotify"`
	} `json:"notifyConfigs"`
}

type CreateUser

type CreateUser struct {
	Response
	User struct {
		UserId string `json:"userid"`
	} `json:"result"`
}

type CreateWorkrecord added in v3.0.3

type CreateWorkrecord struct {
	Response

	Tasks []TaskTopVo `json:"tasks"`
}

type DeleteApprovalTemplate added in v3.0.3

type DeleteApprovalTemplate struct {
	Response
}

type DeleteTodo

type DeleteTodo struct {
	Response

	// 删除结果
	Result bool `json:"result"`
}

type DeptDetail

type DeptDetail struct {
	Response

	Detail struct {
		// 部门id
		Id int `json:"dept_id"`

		Name string `json:"name"`

		ParentId int `json:"parent_id"`

		// 备注
		Brief string `json:"brief"`

		// 部门标识字段
		SourceIdentifier string `json:"source_identifier"`

		//是否同步创建一个关联此部门的企业群:
		//
		//true:创建
		//
		//false:不创建
		CreateDeptGroup bool `json:"create_dept_group"`

		//当部门群已经创建后,是否有新人加入部门会自动加入该群:
		//
		//true:自动加入群
		//
		//false:不会自动加入群
		AutoAddUser bool `json:"auto_add_user"`

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

		//部门是否来自关联组织:
		//
		//true:是
		//
		//false:不是
		FromUnionOrg bool `json:"from_union_org"`

		//教育部门标签:
		//
		//campus:校区
		//
		//period:学段
		//
		//grade:年级
		//
		//class:班级
		Tags string `json:"tags"`

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

		// 部门群ID
		DeptGroupChatId string `json:"dept_group_chat_id"`

		//
		//true:包含
		//
		//false:不包含
		//
		//不传值,则保持不变
		GroupContainSubDept bool `json:"group_contain_sub_dept"`

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

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

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

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

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

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

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

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

type DeptDetailUserInfo

type DeptDetailUserInfo struct {
	Response
	Page struct {
		// 是否还有更多的数据
		HasMore bool `json:"has_more"`

		// 下一次分页的游标,如果has_more为false,表示没有更多的分页数据。
		NextCursor int `json:"next_cursor"`

		List []DeptUser `json:"list"`
	} `json:"result"`
}

type DeptList

type DeptList struct {
	Response

	List []struct {
		Id int `json:"dept_id"`

		Name string `json:"name"`

		ParentId int `json:"parent_id"`

		//是否同步创建一个关联此部门的企业群:
		//
		//true:创建
		//
		//false:不创建
		CreateDeptGroup bool `json:"create_dept_group"`

		//当部门群已经创建后,是否有新人加入部门会自动加入该群:
		//
		//true:自动加入群
		//
		//false:不会自动加入群
		AutoAddUser bool `json:"auto_add_user"`
	} `json:"result"`
}

type DeptSimpleUserInfo

type DeptSimpleUserInfo struct {
	Response
	Result struct {
		// 是否还有更多的数据
		HasMore bool `json:"has_more"`

		// 下一次分页的游标,如果has_more为false,表示没有更多的分页数据。
		NextCursor int `json:"next_cursor"`

		DeptUsers []struct {
			UserId string `json:"userid"`

			Name string `json:"name"`
		} `json:"list"`
	} `json:"result"`
}

type DeptUser

type DeptUser struct {
	UserId string `json:"userid"`

	// 员工在当前开发者企业账号范围内的唯一标识
	UnionId string `json:"unionid"`

	// 员工名称
	Name string `json:"name"`

	// 头像
	Avatar string `json:"avatar"`

	// 国际电话区号
	StateCode string `json:"state_code"`

	// 员工的直属主管
	ManagerUserId string `json:"manager_userid"`

	// 手机号码
	Mobile string `json:"mobile"`

	// 是否号码隐藏
	HideMobile bool `json:"hide_mobile"`

	// 分机号
	Telephone string `json:"telephone"`

	// 员工工号
	JobNumber string `json:"job_number"`

	// 职位
	Title string `json:"title"`

	// 办公地点
	WorkPlace string `json:"work_place"`

	// 备注
	Remark string `json:"remark"`

	// 专属帐号登录名
	LoginId string `json:"loginId"`

	// 所属部门ID列表
	DeptIds []int `json:"dept_id_list"`

	// 员工在部门中的排序
	DeptOrder int `json:"dept_order"`

	// 员工在对应的部门中的排序
	Extension string `json:"extension"`

	// 入职时间
	HiredDate int `json:"hired_date"`

	// 是否激活了钉钉
	Active bool `json:"active"`

	//是否为企业的管理员:
	//
	//true:是
	//
	//false:不是
	Admin bool `json:"admin"`

	// 是否为企业的老板
	Boss bool `json:"boss"`

	// 是否专属帐号
	ExclusiveAccount bool `json:"exclusive_account"`

	// 是否是部门的主管
	Leader bool `json:"leader"`

	//专属帐号类型:
	//
	//sso:企业自建专属帐号
	//
	//dingtalk:钉钉自建专属帐号
	ExclusiveAccountType string `json:"exclusive_account_type"`

	//员工的企业邮箱
	//
	//如果员工的企业邮箱没有开通,返回信息中不包含该数据
	OrgEmail string `json:"org_email"`

	//员工邮箱
	//
	//企业内部应用如果没有返回该字段,需要检查当前应用通讯录权限中邮箱等个人信息权限是否开启
	//
	//员工信息面板中有邮箱字段值才返回该字段
	//
	//第三方企业应用不返回该参数
	Email string `json:"email"`
}

DeptUser 部门用户详情

type DeptUserId

type DeptUserId struct {
	Response
	Result struct {
		UserIds []string `json:"userid_list"`
	} `json:"result"`
}

type DriveSpacesFilesPermissions

type DriveSpacesFilesPermissions struct {
	Response
	// 企业内成员权限列表
	Members []SpacesFilesPermissions `json:"members"`

	// 企业外成员权限列表
	OutMembers []SpacesFilesPermissions `json:"outMembers"`
}

type EmpDept

type EmpDept struct {
	// 部门名称
	Name string `json:"dept_path"`

	// 部门id
	Id int `json:"dept_id"`
}

type EmployeeField

type EmployeeField struct {

	//字段类型:
	//
	//DDSelectField
	//
	//TextField
	//
	//DDDateField
	//
	//DDDateWithLongField
	//
	//DDPhotoField
	FieldType string `json:"field_type"`

	// 字段描述
	FieldName string `json:"field_name"`

	// 字段code
	FieldCode string `json:"field_code"`
}

type FailedRegisterEvent

type FailedRegisterEvent struct {
	Response

	// 是否还有推送失败的变更事件,若为true,则表示还有未回调的事件
	HasMore bool `json:"has_more"`

	// 推送失败的事件列表,一次最多200个
	FailedList []struct {
		//
		UserAddOrg struct {
			Userid []string `json:"userid"`
			Corpid string   `json:"corpid"`
		} `json:"user_add_org,omitempty"`

		CallBackTag        string `json:"call_back_tag"`
		EventTime          int64  `json:"event_time"`
		BpmsInstanceChange struct {
			BpmsCallBackData struct {
			} `json:"bpmsCallBackData"`
			Corpid string `json:"corpid"`
		} `json:"bpms_instance_change,omitempty"`
		LabelConfAdd struct {
			RoleLabelChange struct {
			} `json:"roleLabelChange"`
			Corpid string `json:"corpid"`
		} `json:"label_conf_add,omitempty"`
	} `json:"failed_list"`
}

type FetchDeptList

type FetchDeptList struct {
	Response

	// 部门
	Dept []struct {

		//当部门群已经创建后,是否有新人加入部门会自动加入该群:
		//
		//true:自动加入群
		//
		//false:不会自动加入群
		AutoAddUser bool `json:"autoAddUser"`

		//是否同步创建一个关联此部门的企业群:
		//
		//true:创建
		//
		//false:不创建
		CreateDeptGroup bool `json:"createDeptGroup"`

		// 部门id
		Id int `json:"id"`

		// 部门名称
		Name string `json:"name"`

		// 父部门id
		ParentId int `json:"parentid"`
	} `json:"department"`
}

type Field

type Field struct {

	// 字段描述
	FieldName string `json:"field_name"`

	// 字段code
	FieldCode string `json:"field_code"`

	// 分组标识
	GroupId string `json:"group_id"`

	//字段值列表。
	//
	//明细分组字段包含多条。
	//
	//非明细分组仅一条记录。
	Values []struct {

		// 第几条的明细标识,下标从0开始。
		Index int `json:"item_index"`

		// 字段展示值,选项类型字段对应选项的value
		Label string `json:"label"`

		// 字段取值,选项类型字段对应选项的key。
		Value string `json:"value"`
	} `json:"field_value_list"`
}

type FieldGroupMeta

type FieldGroupMeta struct {

	// 字段组ID
	GroupId string `json:"group_id"`

	// 是否支持明细
	HasDetail bool `json:"has_detail"`

	Fields []EmployeeField `json:"field_list"`
}

type FieldMeta

type FieldMeta struct {
	// 字段名称
	FieldName string `json:"field_name"`

	// 字段标识
	FieldCode string `json:"field_code"`

	// 是否衍生字段,例如司龄、年龄等系统计算的字段
	Derived bool `json:"derived"`
}

type Forbidden

type Forbidden struct {

	//流控code:
	//
	//143105表示企业自建应用每日推送给用户的消息超过上限
	//
	//143106表示企业自建应用推送给用户的消息重复
	Code string `json:"code"`

	// 流控阀值
	Count int `json:"count"`

	// 被流控员工的userid
	UserId string `json:"userid"`
}

type FormItemVo added in v3.0.3

type FormItemVo struct {
	Title string `json:"title"`
}

type GetApprovalTemplate added in v3.0.3

type GetApprovalTemplate struct {
	Response

	ProcessCode string `json:"process_code"`
}

type GetAttendanceColumnsKey added in v3.0.2

type GetAttendanceColumnsKey struct {
	Response

	ColumnsKey `json:"result"`
}

type GetAttendanceColumnsValue added in v3.0.2

type GetAttendanceColumnsValue struct {
	Response

	ColumnsValue `json:"result"`
}

type GetAttendanceGroup

type GetAttendanceGroup struct {
	Response

	AttendanceGroups `json:"result"`
}

type GetAttendanceGroupDetail

type GetAttendanceGroupDetail struct {
	Response

	AttendanceGroup struct {
		// 考勤地址
		AddressList []string `json:"address_list"`

		// 考勤组ID
		Id int `json:"id"`

		// 人员人数
		MemberCount int `json:"member_count"`

		// 考勤组名称
		Name string `json:"name"`

		// 考勤组主负责人的userid
		OwnerUserId string `json:"owner_user_id"`

		// 排班ID
		ShiftIds []int `json:"shift_ids"`

		//考勤组类型:
		//
		//FIXED:代表固定班制考勤组
		//
		//TURN:代表排班制考勤组
		//
		//NONE:代表自由工时考勤组
		Type string `json:"type"`

		// 跳转链接
		Url string `json:"url"`

		// wifi名称
		Wifis []string `json:"wifis"`

		// 工作日
		WorkDayList []int `json:"work_day_list"`
	} `json:"result"`
}

type GetAttendanceGroupMinimalism

type GetAttendanceGroupMinimalism struct {
	Response

	MinimalismGroup struct {

		// 游标位置
		Cursor int `json:"cursor"`

		// 是否有更多数据
		HasMore bool `json:"has_more"`

		// 考勤信息
		Attendance []struct {

			// 考勤组ID
			Id int `json:"id"`

			// 考勤组名称
			Name string `json:"name"`
		} `json:"result"`
	} `json:"result"`
}

type GetAttendanceUpdateData added in v3.0.3

type GetAttendanceUpdateData struct {
	Response

	AtCheckInfoForOpenVo `json:"result"`
}

type GetAttendanceUserGroup

type GetAttendanceUserGroup struct {
	Response

	// 查询结果
	AttendanceUserGroup struct {

		// 考勤组ID
		GroupId int `json:"group_id"`

		// 考勤组名称
		Name string `json:"name"`

		//考勤类型:
		//
		//FIXED:固定排班
		//
		//TURN:轮班排班
		//
		//NONE:无班次
		Type string `json:"type"`

		// 考勤组中的班次列表
		Classes []struct {
			// 班次ID
			ClassId int `json:"class_id"`

			// 班次名称
			Name string `json:"name"`

			// 班次中上下班列表
			Sections []struct {
				// 班次中上下班详情列表
				Times []struct {
					// 打卡跨越的时间天数
					Across int `json:"across"`

					// 打卡时间
					CheckTime string `json:"check_time"`

					//打卡类型:
					//
					//OnDuty:上班
					//
					//OffDuty:下班
					CheckType string `json:"check_type"`

					// 允许的最晚延后打卡时间,单位分钟
					EndMin int `json:"end_min"`

					// 允许的最早提前打卡时间,单位分钟
					BeginMin int `json:"begin_min"`
				} `json:"times"`
			} `json:"sections"`

			// 班次配置
			Setting struct {

				// 休息开始设置
				RestBeginTime struct {

					//时间跨度。
					//
					//0:不跨天
					//
					//1:跨天
					Across int `json:"across"`

					// 休息开始时间
					CheckTime string `json:"check_time"`

					//设置类型:
					//
					//OnDuty:休息开始
					//
					//OffDuty:休息结束
					CheckType string `json:"check_type"`
				} `json:"rest_begin_time"`

				// 休息结束时间设置
				RestEndTime struct {

					// 时间跨度
					Across int `json:"across"`

					// 休息结束时间
					CheckTime string `json:"check_time"`

					//打卡类型:
					//
					//OnDuty:休息开始
					//
					//OffDuty:休息结束
					CheckType string `json:"check_type"`
				} `json:"rest_end_time"`
			} `json:"setting"`
		} `json:"classes"`
	} `json:"result"`
}

type GetChatInfo

type GetChatInfo struct {
	Response

	ChatInfo struct {
		ChatId string `json:"chatid"`

		// 群名称
		Name string `json:"name"` // 群名称,长度限制为1~20个字符。

		//状态
		//
		//1:正常
		//
		//2:已解散
		Status int `json:"status"`

		// 群头像的mediaID
		Icon string `json:"icon"`

		// 会话类型 2:企业群
		ConversationTag int `json:"conversationTag"`

		// 群主的userid,
		Owner string `json:"owner"`

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

		// 新成员是否可查看100条历史消息:1:可看
		ShowHistoryType int `json:"showHistoryType"`

		// 群是否可以被搜索.1:可搜索
		Searchable int `json:"searchable"`

		// 入群是否需要验证.1:要验证
		ValidationType int `json:"validationType"`

		//@all 使用范围:.1:仅群主可用
		MentionAllAuthority int `json:"mentionAllAuthority"`

		// 群管理类型:.1:仅群主可管理
		ManagementType int `json:"managementType" `

		// 是否开启群禁言:.1:全员禁言
		ChatBannedType int `json:"chatBannedType" `
	} `json:"chat_info"`
}

type GetDriveSpaces

type GetDriveSpaces struct {
	Response

	Spaces []struct {
		// 空间ID
		SpaceId string `json:"spaceId"`

		// 空间名称
		Name string `json:"spaceName"`

		// 空间类型
		Type string `json:"spaceType"`

		// 空间总额度
		Quota int `json:"quota"`

		// 空间已使用额度
		UsedQuota int `json:"usedQuota"`

		//授权模式,取值:
		//
		//acl:acl授权
		//custom:自定义授权
		PermissionMode string `json:"permissionMode"`

		// 创建时间
		CreateTime string `json:"createTime"`

		// 修改时间
		ModifyTime string `json:"modifyTime"`
	} `json:"spaces"`

	Token string `json:"nextToken"`
}

type GetDriveSpacesFileInfo

type GetDriveSpacesFileInfo struct {
	Response

	SpacesFile
}

type GetDriveSpacesFiles

type GetDriveSpacesFiles struct {
	Response

	// 下一页的游标,为空字符串则表示分页结束
	Token string `json:"nextToken"`

	// 文件列表
	SpacesFiles []SpacesFile `json:"files"`
}

type GetExtContact

type GetExtContact struct {
	Response

	Contacts []struct {
		UserId string `json:"userid"`

		// 邮箱
		Email string `json:"email"`

		// 职位
		Title string `json:"title"`

		// 标签列表
		Labels []int `json:"label_ids"`

		// 共享给的部门ID
		ShareDept []int `json:"share_dept_ids"`

		// 地址
		Address string `json:"address"`

		// 备注
		Remark string `json:"remark"`

		// 负责人的userId
		FollowerUser string `json:"follower_user_id"`

		// 外部联系人的姓名
		Name string `json:"name"`

		// 手机号国家码
		StateCode string `json:"state_code"`

		// 外部联系人的企业名称
		CompanyName string `json:"company_name"`

		// 共享给的员工userid列表
		ShareUser []string `json:"share_user_ids"`

		// 外部联系人的手机号
		Mobile string `json:"mobile"`
	} `json:"results"`
}

type GetExtContactDetail

type GetExtContactDetail struct {
	Response

	Result struct {
		// 职位
		Title string `json:"title"`

		UserId string `json:"userid"`

		// 共享给的部门ID
		ShareDept []int `json:"share_dept_ids"`

		// 备注
		Remark string `json:"remark"`

		// 标签列表
		Labels []int `json:"label_ids"`

		// 邮箱
		Email string `json:"email"`

		// 地址
		Address string `json:"address"`

		// 负责人的userId
		FollowerUser string `json:"follower_user_id"`

		// 外部联系人的姓名
		Name string `json:"name"`

		// 手机号国家码
		StateCode string `json:"state_code"`

		// 外部联系人的企业名称
		CompanyName string `json:"company_name"`

		// 共享给的员工userid列表
		ShareUser []string `json:"share_user_ids"`

		// 外部联系人的手机号
		Mobile string `json:"mobile"`
	} `json:"result"`
}

type GetExtContactLabel

type GetExtContactLabel struct {
	Response

	Results []struct {
		// 标签组名字
		Name string `json:"name"`

		// 标签组颜色
		Color int `json:"color"`

		// 标签
		Labels []struct {
			// 标签名称
			Name string `json:"name"`

			// 标签id
			Id int `json:"id"`
		} `json:"labels"`
	} `json:"results"`
}

type GetHrmEmployee

type GetHrmEmployee struct {
	Response

	Result struct {

		// 查询到的员工userid
		UserIds []string `json:"data_list"`

		// 下一次分页调用的offset值,当返回结果里没有next_cursor时,表示分页结束
		NextCursor int `json:"next_cursor"`
	} `json:"result"`
}

type GetHrmEmployeeField

type GetHrmEmployeeField struct {
	Response

	// 应用AgentID,可在钉钉开发者后台的应用详情页获取。
	EmpFields []RosterField `json:"result"`
}

type GetHrmField

type GetHrmField struct {
	Response

	// 应用AgentID,可在钉钉开发者后台的应用详情页获取。
	FieldGroups []FieldGroupMeta `json:"result"`
}

type GetHrmMeta

type GetHrmMeta struct {
	Response

	GroupMeta []HrmGroupMeta `json:"result"`
}

type GetIndustryDept

type GetIndustryDept struct {
	Response

	// 部门列表信息
	Result struct {
		// 部门详情列表
		Details []struct {
			// 部门ID
			DeptId int `json:"dept_id"`

			//部门的其他业务属性。可JSON反序列化。例如:
			//
			//针对家校
			//
			//period_type:学段类型(幼儿园,小学等)
			//
			//name_mode:学段对应的名称类型(一年级,一年级1班等)
			//
			//grade_level:年纪级数(一年级值为1)
			//
			//start_year:入学年份
			//
			//class_level:年级下班级级数
			//
			//针对农村
			//
			//manager_user_id:组长userID
			//
			//home_tel:家庭电话
			//
			//destitute:是否贫困户
			Feature string `json:"feature"`

			// 部门名称
			Name string `json:"name"`

			//通讯录类型 行业相关。例如:
			//
			//针对学校
			//
			//classic:传统经典校区、学段、年级、班级4层结构。
			//
			//custom:自定义结构
			//
			//针对农村
			//
			//Origin:传统农村类型
			//
			//Community:社区类型
			//
			//custom:自定义结构
			ContactType string `json:"contact_type"`

			//部门类型。行业相关。例如:
			//
			//针对学校
			//
			//campus:校区
			//
			//period:学段
			//
			//grade:年级
			//
			//class:班级
			//
			//针对农村
			//
			//VillageGroup:组
			//
			//Residence:户
			//
			//LeaseholderDept:租客
			//
			//SecretaryDept:村委
			DeptType string `json:"dept_type"`
		} `json:"details"`
		HasMore    bool `json:"has_more"`
		NextCursor int  `json:"next_cursor"`
	} `json:"result"`
}

GetIndustryDept 行业通讯录

type GetIndustryDeptDetail

type GetIndustryDeptDetail struct {
	Response

	Result struct {
		// 部门名称
		Name string `json:"name"`
		// 父部门ID
		SuperId int `json:"super_id"`

		//部门类型。行业相关。例如:
		//
		//针对学校
		//
		//campus:校区
		//
		//period:学段
		//
		//grade:年级
		//
		//class:班级
		//
		//针对农村
		//
		//VillageGroup:组
		//
		//Residence:户
		//
		//LeaseholderDept:租客
		//
		//SecretaryDept:村委
		DeptType string `json:"dept_type"`

		//通讯录类型 行业相关。例如:
		//
		//针对学校
		//
		//classic:传统经典校区、学段、年级、班级4层结构。
		//
		//custom:自定义结构
		//
		//针对农村
		//
		//Origin:传统农村类型
		//
		//Community:社区类型
		//
		//custom:自定义结构
		ContactType string `json:"contact_type"`

		//部门的其他业务属性。可JSON反序列化。例如:
		//
		//针对家校
		//
		//period_type:学段类型(幼儿园,小学等)
		//
		//name_mode:学段对应的名称类型(一年级,一年级1班等)
		//
		//grade_level:年纪级数(一年级值为1)
		//
		//start_year:入学年份
		//
		//class_level:年级下班级级数
		//
		//针对农村
		//
		//manager_user_id:组长userID
		//
		//home_tel:家庭电话
		//
		//destitute:是否贫困户
		Feature string `json:"feature"`
	} `json:"result"`
}

type GetParentIdsByDeptId

type GetParentIdsByDeptId struct {
	Response
	Result struct {
		ParentIds []int `json:"parent_id_list"`
	} `json:"result"`
}

type GetParentIdsByUserId

type GetParentIdsByUserId struct {
	Response
	Result struct {
		Parents []struct {
			ParentIds []int `json:"parent_dept_id_list"`
		} `json:"parent_list"`
	} `json:"result"`
}

type GetTodoDetail

type GetTodoDetail struct {
	Response

	// 待办ID
	Id string `json:"id"`

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

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

	// 开始时间,Unix时间戳,单位毫秒
	StartTime int `json:"startTime"`

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

	// 完成时间,Unix时间戳,单位毫秒
	FinishTime int `json:"finishTime"`

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

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

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

	// 详情页url跳转地址。
	Urls struct {
		// APP端详情页url跳转地址
		App string `json:"appUrl"`

		// PC端详情页url跳转地址
		Pc string `json:"pcUrl"`
	} `json:"detailUrl"`

	// 业务来源
	Source string `json:"source"`

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

	// 创建时间,Unix时间戳,单位毫秒
	CreatedTime int `json:"createdTime"`

	// 更新时间,Unix时间戳,单位毫秒
	ModifiedTime int `json:"modifiedTime"`

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

	// 更新者的unionId
	ModifierId string `json:"modifierId"`

	// 租户ID
	TenantId string `json:"tenantId"`

	// 租户类型。
	// user:个人
	// org:企业
	// group:群
	TenantType string `json:"tenantType"`

	// 接入应用标识
	BizTag string `json:"bizTag"`

	// 待办卡片类型ID
	CardTypeId string `json:"cardTypeId"`

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

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

type GetTodoList

type GetTodoList struct {
	Response

	TotalCount int `json:"totalCount"`

	// 下一次请求的token
	Token string `json:"nextToken"`

	// 待办卡片列表
	Todos []todo `json:"todoCards"`
}

type GroupRole

type GroupRole struct {
	Response

	Group struct {
		// 角色组名
		GroupName string `json:"group_name"`

		Roles []struct {
			// 角色Id
			Id int `json:"role_id"`

			// 角色名
			Name string `json:"role_name"`
		} `json:"roles"`
	} `json:"role_group"`
}

type HrmCreateEmployee

type HrmCreateEmployee struct {
	Response

	// 员工ID
	UserId string `json:"userid"`
}

type HrmGroupMeta

type HrmGroupMeta struct {

	// 分组名称。
	GroupName string `json:"group_name"`

	// 分组标识。
	GroupId string `json:"group_id"`

	// 分组是否支持明细。
	Detail bool `json:"detail"`

	FieldMeta []FieldMeta `json:"field_meta_info_list"`
}

type HrmResignEmployee

type HrmResignEmployee struct {
	Response

	// 离职人员
	ResignEmployee []ResignEmployee `json:"result"`
}

type InactiveUser

type InactiveUser struct {
	Response
	Result struct {
		// 是否还有更多的数据
		HasMore bool `json:"has_more"`

		// 下一次分页的游标,如果has_more为false,表示没有更多的分页数据。
		NextCursor int `json:"next_cursor"`

		UserIds []string `json:"list"`
	} `json:"result"`
}

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

type InitiateApprovalProcess added in v3.0.3

type InitiateApprovalProcess struct {
	Response

	SaveFaceProcessInstanceResponse `json:"result"`
}

type JsApiTicket

type JsApiTicket struct {
	Response
	// Expires 过期时间
	Expires int16 `json:"expires_in"`
	// Create 创建时间
	Create int64 `json:"create"`
	// Ticket 生成的临时jsapi_ticket。
	Ticket string `json:"ticket"`
}

func (*JsApiTicket) CreatedAt

func (token *JsApiTicket) CreatedAt() int64

CreatedAt is when the access token is generated

func (*JsApiTicket) ExpiresIn

func (token *JsApiTicket) ExpiresIn() int16

ExpiresIn is how soon the access token is expired

type LeaderInDept

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

	Leader bool `json:"leader"`
}

type MediaUpload

type MediaUpload struct {
	Response

	// 媒体文件类型
	Genre string `json:"type"`

	// 媒体文件上传后获取的唯一标识
	MediaId string `json:"media_id"`

	// 媒体文件上传时间戳
	CreatTime int `json:"created_at"`
}

type MessageProgress

type MessageProgress struct {
	Response
	Progress struct {
		// 取值0~100,表示处理的百分比
		Percent int `json:"progress_in_percent"`

		// 任务执行状态:
		// 0:未开始
		// 1:处理中
		// 2:处理完毕
		Status int `json:"status"`
	} `json:"progress"`
}

type MessageSendResult

type MessageSendResult struct {
	Response
	SendResult `json:"send_result"`
}

type MicroAppList

type MicroAppList struct {
	Response

	// 应用列表
	Apps []domain.MicroApp `json:"appList"`
}

MicroAppList 小程序列表

type MicroAppVisibleScopes

type MicroAppVisibleScopes struct {
	Response

	// 应用可见的用户列表。
	UserVisibleScopes []string `json:"userVisibleScopes"`

	// 应用可见的部门列表。
	DeptVisibleScopes []int `json:"deptVisibleScopes"`

	// 是否仅限管理员可见,true代表仅限管理员可见。
	Hidden bool `json:"isHidden"`
}

MicroAppVisibleScopes 应用可见范围

type MobileGetUserId

type MobileGetUserId struct {
	Response

	Result struct {
		UserId string `json:"userid"`
	} `json:"result"`
}

type OrgAdminUser

type OrgAdminUser struct {
	Response

	AdminUser []struct {
		UserId string `json:"userid"`

		//管理员角色:
		//
		//1:主管理员
		//
		//2:子管理员
		Level int `json:"sys_level"`
	} `json:"result"`
}

type PageResult added in v3.0.3

type PageResult struct {
	HasMore bool           `json:"has_more"`
	List    []WorkRecordVo `json:"list"`
}

type PermissionMember

type PermissionMember struct {
	// 企业的CorpId
	CorpId string `json:"corpId"`

	//成员ID。
	//
	//当memberType为org时,取值为corpId
	//当memberType为department时,取值为deptId
	//当memberType为conversation时,取值为chatId
	//当memberType为user时,取值为staffId
	MemberId string `json:"memberId"`

	//成员类型。
	//
	//org:企业
	//department:部门
	//conversation:群
	//user:用户
	MemberType string `json:"memberType"`

	// 成员名称
	MemberName string `json:"memberName"`
}

PermissionMember 成员信息

type ProcessTopVo added in v3.0.3

type ProcessTopVo struct {
	ProcessCode string `json:"process_code"`
}

type QueryWorkrecordList added in v3.0.3

type QueryWorkrecordList struct {
	Response

	PageResult `json:"result"`
}

type RegisterEvent

type RegisterEvent struct {
	Response
	// 注册的事件类型
	Tags []string `json:"call_back_tag"`

	// 加解密需要用到的token,可以随机填写,长度大于等于6个字符且少于64个字符。
	Token string `json:"token"`

	// 接收事件回调的url,必须是公网可以访问的url地址。
	Url string `json:"url"`

	//数据加密密钥。用于回调数据的加密,长度固定为43个字符,从a-z,A-Z,0-9共62个字符中选取,您可以随机生成,ISV(服务提供商)推荐使用注册套件时填写的EncodingAESKey
	Secret string `json:"aes_key"`
}

type ResignEmployee

type ResignEmployee struct {

	// 离职员工的userid。
	UserId string `json:"userid"`

	// 最后工作日
	LastWorkDay int `json:"last_work_day"`

	// 离职部门列表
	DeptList []EmpDept `json:"dept_list"`

	// 离职原因备注
	ReasonMemo string `json:"reason_memo"`

	//离职原因类型:
	//
	//1:家庭原因
	//
	//2:个人原因
	//
	//3:发展原因
	//
	//4:合同到期不续签
	//
	//5:协议解除
	//
	//6:无法胜任工作
	//
	//7:经济性裁员
	//
	//8:严重违法违纪
	//
	//9:其他
	ReasonType int `json:"reason_type"`

	//离职状态:
	//
	//1:待离职
	//
	//2:已离职
	//
	//3:未离职
	//
	//4:发起离职审批但还未通过
	//
	//5:失效(离职流程被其他流程强制终止后的状态)
	PreStatus int `json:"pre_status"`

	// 离职前主部门名称
	MainDeptName string `json:"main_dept_name"`

	// 离职前主部门ID
	MainDeptId int `json:"main_dept_id"`
}

type Response

type Response struct {
	Code      int    `json:"errcode"`
	Msg       string `json:"errmsg,omitempty"`
	Success   bool   `json:"success,omitempty"`
	RequestId string `json:"request_id,omitempty"`
	// todo:新版的api使用TraceId
	TraceId string `json:"requestId,omitempty"`

	// 调用结果
	Result bool `json:"result,omitempty"`
}

Response 响应 {"errcode":40035,"errmsg":"缺少参数 corpid or appkey"}

func (*Response) CheckError

func (res *Response) CheckError() (err error)

func (*Response) Ok

func (res *Response) Ok() bool

type RestBeginTime

type RestBeginTime struct {
	// 开始时间
	CheckTime string `json:"check_time"`
}

RestBeginTime 休息开始时间,只有一个时间段的班次有

type RestEndTime

type RestEndTime struct {
	// 结束时间
	CheckTime string `json:"check_time"`
}

RestEndTime 休息结束时间,只有一个时间段的班次有

type RoleDetail

type RoleDetail struct {
	Response

	Role struct {
		// 角色名称
		RoleName string `json:"name"`

		// 所属的角色组Id
		GroupId int `json:"groupId"`
	} `json:"role"`
}

type RoleList

type RoleList struct {
	Response

	Result struct {
		// 是否还有更多数据。
		HasMore bool `json:"hasMore"`

		RoleGroups []struct {
			// 角色组Id
			GroupId int `json:"groupId"`

			// 角色组名称
			Name string `json:"name"`

			Roles []struct {
				// 角色Id
				Id int `json:"id"`

				// 角色名称
				Name string `json:"name"`
			} `json:"roles"`
		} `json:"list"`
	} `json:"result"`
}

type RoleUser

type RoleUser struct {
	Response

	Result struct {
		HasMore    bool `json:"hasMore"`
		NextCursor int  `json:"nextCursor"`

		Users []struct {
			UserId string `json:"userid"`

			Name string `json:"name"`

			ManageScopes []struct {
				// 部门Id
				DeptId int `json:"dept_id"`
				// 部门名称
				DeptName string `json:"name"`
			} `json:"manageScopes"`
		} `json:"list"`
	} `json:"result"`
}

type RosterField

type RosterField struct {

	// 企业的corpid
	CorpId string `json:"corp_id"`

	// 员工的userid
	UserId string `json:"userid"`

	// 返回的字段信息列表
	Fields []Field `json:"field_data_list"`
}

type SSOUserInfo

type SSOUserInfo struct {
	Response

	// 是否是管理员
	Admin bool `json:"is_sys"`

	// 企业信息
	CorpInfo struct {
		// 授权方企业CorpId
		CorpId string `json:"corpid"`

		// 授权方企业名称。
		CorpName string `json:"corp_name"`
	} `json:"corp_info"`

	// 用户信息
	UserInfo struct {

		// 用户名字
		Name string `json:"name"`

		// 用户的userid
		UserId string `json:"userid"`

		// email地址
		Email string `json:"email"`

		// 头像地址
		Avatar string `json:"avatar"`
	} `json:"user_info"`
}

type SaveApprovalTemplate added in v3.0.3

type SaveApprovalTemplate struct {
	Response

	ProcessTopVo `json:"result"`
}

type SaveFaceProcessInstanceResponse added in v3.0.3

type SaveFaceProcessInstanceResponse struct {
	ProcessInstanceId string `json:"process_instance_id"`
}

type SearchAttendanceGroup

type SearchAttendanceGroup struct {
	Response

	AttendanceGroups []struct {
		// 考勤组ID
		Id int `json:"id"`

		// 考勤组名称
		Name string `json:"name"`
	} `json:"result"`
}

type Section

type Section struct {

	// 时间段列表。
	Times []Time `json:"times"`
}

Section 班次打卡时间段

type SelectedClass

type SelectedClass struct {

	// 考勤班次ID
	ClassId int `json:"class_id"`

	// 考勤班次名称
	ClassName string `json:"class_name"`

	// 未排班时是否允许员工选择班次打卡。
	EnableEmpSelectClass bool `json:"enable_emp_select_class"`

	// 未排班时是否禁止员工打卡
	DisableCheckWithoutSchedule bool `json:"disable_check_without_schedule"`

	//休息日打卡是否需审批:
	//
	//true:需要
	//
	//false:不需要
	DisableCheckWhenRest bool `json:"disable_check_when_rest"`

	// 考勤组班次配置
	Setting `json:"setting"`

	// 班次打卡时间段
	Sections []Section `json:"sections"`
}

SelectedClass 考勤组对应的考勤班次列表

type SendChatMessage

type SendChatMessage struct {
	Response

	// 指定员工的部门信息。
	MessageId string `json:"messageId"`
}

type SendMessage

type SendMessage struct {
	Response

	//有效接收消息的员工的userid。
	//
	//接收者可以是单聊接收者或者群聊会话里的接收者,如果接收者是当前接口调用所使用的企业的员工,则是有效接收者。
	//
	//接口返回所有有效接收者的userid。
	//
	//非有效接收者是收不到消息的。
	Receiver string `json:"receiver"`
}

type SendResult

type SendResult struct {
	// 无效的userid。
	InvalidUserIds []string `json:"invalid_user_id_list"`

	//因发送消息过于频繁或超量而被流控过滤后实际未发送的userid。
	//
	//未被限流的接收者仍会被成功发送。
	//
	//限流规则包括:
	//
	//给同一用户发相同内容消息一天仅允许一次
	//
	//同一个应用给同一个用户发送消息:
	//
	//如果是ISV接入方式,给同一用户发消息一天不得超过100次
	//
	//如果是企业接入方式,此上限为500
	ForbiddenUserIds []string `json:"forbidden_user_id_list"`

	// 发送失败的userid。
	FailedUserIds []string `json:"failed_user_id_list"`

	// 已读消息的userid
	ReadUserIds []string `json:"read_user_id_list"`

	// 未读消息的userid
	UnReadUserIds []string `json:"unread_user_id_list"`

	// 无效的部门ID
	InvalidDeptIds []string `json:"invalid_dept_id_list"`

	// 推送被禁止的具体原因。
	Forbiddings []Forbidden `json:"forbidden_list"`
}

type SendTemplateMessage

type SendTemplateMessage struct {
	Response

	// 创建的异步发送任务ID
	TaskId int `json:"task_id"`
}

type Setting

type Setting struct {

	// 考勤组班次ID
	ClassSettingId int `json:"class_setting_id"`

	// 旷工迟到时长,单位分钟(-1表示关闭该功能)
	AbsenteeismLateMinutes int `json:"absenteeism_late_minutes"`

	//是否强制下班打卡。
	//
	//Y:不强制打卡
	//
	//N:强制打卡
	IsOffDutyFreeCheck string `json:"is_off_duty_free_check"`

	// 休息开始时间,只有一个时间段的班次有
	RestBeginTime `json:"rest_begin_time"`

	// 允许迟到时长,单位分钟(-1表示关闭该功能)
	PermitLateMinutes int `json:"permit_late_minutes"`

	// 严重迟到时长,单位分钟(-1表示关闭该功能)
	SeriousLateMinutes int `json:"serious_late_minutes"`

	// 工作时长,单位分钟(-1表示关闭该功能)
	WorkTimeMinutes int `json:"work_time_minutes"`

	// 休息结束时间,只有一个时间段的班次有
	RestEndTime `json:"rest_end_time"`
}

Setting 考勤组班次配置

type SnsUserInfo

type SnsUserInfo struct {
	Response
	UserInfo `json:"user_info"`
}

type SpacesFile

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

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

	// 文件ID
	FileId string `json:"fileId"`

	// 文件名称
	FileName string `json:"fileName"`

	// 文件路径
	FilePath string `json:"filePath"`

	// 文件类型。
	// file:文件
	// folder:文件夹
	FileType string `json:"fileType"`

	//文件内容类型,取值:
	//
	//image:图片
	//document:一般文档
	//alidoc:阿里文档
	//text:文本
	//video:视频
	//audio:音频
	//archive:归档
	//app:应用
	//link:快捷方式
	//other:其他
	ContentType string `json:"contentType"`

	// 文件后缀名
	FileExtension string `json:"fileExtension"`

	// 文件大小
	FileSize int `json:"fileSize"`

	// 创建时间
	CreateTime string `json:"createTime"`

	// 修改时间
	ModifyTime string `json:"modifyTime"`

	// 创建者ID
	Creator string `json:"creator"`

	// 修改者ID
	Modifier string `json:"modifier"`
}

type SpacesFilesPermissions

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

	// 是否是继承的权限
	Extend bool `json:"extend"`

	PermissionMember `json:"member"`
}

type SubDeptList

type SubDeptList struct {
	Response
	Result struct {
		Ids []int `json:"dept_id_list"`
	} `json:"result"`
}

type SuiteAccessToken

type SuiteAccessToken struct {
	Response
	// Token 第三方企业应用的凭证。
	Token string `json:"suite_access_token"`
	// Expires 第三方企业应用的凭证过期时间,单位秒。
	Expires int16 `json:"expires_in"`
	// Create 创建时间
	Create int64 `json:"create"`
}

SuiteAccessToken 获取suite套件token

func (*SuiteAccessToken) CreatedAt

func (token *SuiteAccessToken) CreatedAt() int64

CreatedAt Expired.CreatedAt is when the access token is generated

func (*SuiteAccessToken) ExpiresIn

func (token *SuiteAccessToken) ExpiresIn() int16

ExpiresIn is how soon the access token is expired

type TaskTopVo added in v3.0.3

type TaskTopVo struct {
	TaskId int    `json:"task_id"`
	UserId string `json:"userid"`
}

type Time

type Time struct {
	// 打卡时间跨度
	Across int `json:"across"`

	// 打卡时间。
	CheckTime string `json:"check_time"`

	//打卡类型。
	//
	//OnDuty:上班
	//
	//OffDuty:下班
	CheckType string `json:"check_type"`
}

Time 时间段列表。

type UnactiveCorp

type UnactiveCorp struct {
	Response

	// 微应用ID
	AppId int `json:"app_id"`

	// 授权未激活应用的CorpId列表
	CorpIds []string `json:"corp_list"`

	// 是否还有更多数据
	HasMore bool `json:"has_more"`
}

type UnionIdGetUserId

type UnionIdGetUserId struct {
	Response

	Result struct {
		UserId string `json:"userid"`

		//联系类型:
		//
		//0:企业内部员工
		//
		//1:企业外部联系人
		ContactType int `json:"contact_type"`
	} `json:"result"`
}

type UnionOrg

type UnionOrg struct {
	// 员工的userid
	UserId string `json:"userid"`

	// 当前用户所属的组织的企业corpId
	CorpId string `json:"corp_id"`
}

type Unmarshalled

type Unmarshalled interface {
	CheckError() error
}

Unmarshalled 统一检查返回异常异常

type UpdateApprovalProcess added in v3.0.3

type UpdateApprovalProcess struct {
	Response
}

type UpdateTodo

type UpdateTodo struct {
	Response

	// 更新结果
	Result bool `json:"result"`
}

type UpdateWorkrecord added in v3.0.3

type UpdateWorkrecord struct {
	Response
}

type UserCanAccessApplet

type UserCanAccessApplet struct {
	Response

	Access bool `json:"canAccess"`
}

type UserCont

type UserCont struct {
	Response
	Result struct {
		Count int `json:"count"`
	} `json:"result"`
}

type UserDetail

type UserDetail struct {
	Response
	UserInfoDetail `json:"result"`
}

type UserInfo

type UserInfo struct {
	Nick                 string `json:"nick"`
	UnionId              string `json:"unionid"`
	OpenId               string `json:"openid"`
	MainOrgAuthHighLevel bool   `json:"main_org_auth_high_level"`
}

type UserInfoDetail

type UserInfoDetail struct {
	UserId string `json:"userid"`

	// 员工在当前开发者企业账号范围内的唯一标识
	UnionId string `json:"unionid"`

	// 员工名称
	Name string `json:"name"`

	// 头像
	Avatar string `json:"avatar"`

	// 国际电话区号
	StateCode string `json:"state_code"`

	// 员工的直属主管
	ManagerUserId string `json:"manager_userid"`

	// 手机号码
	Mobile string `json:"mobile"`

	// 是否号码隐藏
	HideMobile bool `json:"hide_mobile"`

	// 分机号
	Telephone string `json:"telephone"`

	// 员工工号
	JobNumber string `json:"job_number"`

	// 职位
	Title string `json:"title"`

	// 办公地点
	WorkPlace string `json:"work_place"`

	// 备注
	Remark string `json:"remark"`

	// 专属帐号登录名
	LoginId string `json:"loginId"`

	// 是否专属帐号
	ExclusiveAccount bool `json:"exclusive_account"`

	//专属帐号类型:
	//
	//sso:企业自建专属帐号
	//
	//dingtalk:钉钉自建专属帐号
	ExclusiveAccountType string `json:"exclusive_account_type"`

	// 所属部门ID列表
	DeptIds []int `json:"dept_id_list"`

	// 所属部门ID列表
	DeptOrders []request.DeptOrder `json:"dept_order_list"`

	// 员工在对应的部门中的排序
	Extension string `json:"extension,omitempty" validate:"omitempty"`

	// 入职时间
	HiredDate int `json:"hired_date"`

	// 是否激活了钉钉
	Active bool `json:"active"`

	// 是否完成了实名认证
	RealAuthed bool `json:"real_authed"`

	//员工的企业邮箱
	//
	//如果员工的企业邮箱没有开通,返回信息中不包含该数据
	OrgEmail string `json:"org_email,omitempty" validate:"omitempty,max=100"`

	// 员工的企业邮箱类型
	OrgEmailType string `json:"org_email_type,omitempty" validate:"omitempty,oneof=profession base"`

	// 是否为企业的高管
	Senior bool `json:"senior"`

	//是否为企业的管理员:
	//
	//true:是
	//
	//false:不是
	Admin bool `json:"admin"`

	// 是否为企业的老板
	Boss bool `json:"boss"`

	// 员工在对应的部门中是否领导
	LeaderInDept []LeaderInDept `json:"leader_in_dept"`

	// 角色列表
	UserRoles []struct {
		// 角色id
		Id int `json:"id"`

		// 角色名称
		Name string `json:"name"`

		// 角色组名称
		GroupName string `json:"group_name"`
	} `json:"role_list"`

	// 当用户来自于关联组织时的关联信息
	UnionOrg `json:"union_emp_ext"`
}

type WorkRecordVo added in v3.0.3

type WorkRecordVo struct {
	Url        string       `json:"url"`
	TaskId     string       `json:"task_id"`
	InstanceId string       `json:"instance_id"`
	Title      string       `json:"title"`
	Forms      []FormItemVo `json:"forms"`
}

Source Files

Jump to

Keyboard shortcuts

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