response

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: 2 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 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 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
	// contains filtered or unexported fields
}

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

	PermanentCode string `json:"permanent_code"`
	// contains filtered or unexported fields
}

type CreatChat

type CreatChat struct {
	Response

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

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

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

type CreateCooperateCorp

type CreateCooperateCorp struct {
	Response

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

CreateCooperateCorp 创建合作空间

type CreateDept

type CreateDept struct {
	Response
	// contains filtered or unexported fields
}

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

	// 待办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 *detailUrl `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 notifyConfigs `json:"notifyConfigs"`
}

type CreateUser

type CreateUser struct {
	Response
	// contains filtered or unexported fields
}

type DeleteTodo

type DeleteTodo struct {
	Response

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

type DeptDetail

type DeptDetail struct {
	Response
	// contains filtered or unexported fields
}

type DeptDetailUserInfo

type DeptDetailUserInfo struct {
	Response
	// contains filtered or unexported fields
}

type DeptList

type DeptList struct {
	Response

	Depts []deptList `json:"result"`
}

type DeptSimpleUserInfo

type DeptSimpleUserInfo struct {
	Response
	// contains filtered or unexported fields
}

type DeptUserId

type DeptUserId struct {
	Response
	// contains filtered or unexported fields
}

type DriveSpacesFilesPermissions

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

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

type GetChatInfo

type GetChatInfo struct {
	Response
	// contains filtered or unexported fields
}

type GetDriveSpaces

type GetDriveSpaces struct {
	Response

	Spaces []spaces `json:"spaces"`

	Token string `json:"nextToken"`
}

type GetDriveSpacesFileInfo

type GetDriveSpacesFileInfo struct {
	Response
	// contains filtered or unexported fields
}

type GetDriveSpacesFiles

type GetDriveSpacesFiles struct {
	Response

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

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

type GetExtContact

type GetExtContact struct {
	Response

	Contacts []extContact `json:"results"`
}

type GetExtContactDetail

type GetExtContactDetail struct {
	Response
	// contains filtered or unexported fields
}

type GetExtContactLabel

type GetExtContactLabel struct {
	Response

	Results []labels `json:"results"`
}

type GetHrmEmployee

type GetHrmEmployee struct {
	Response
	// contains filtered or unexported fields
}

type GetIndustryDept

type GetIndustryDept struct {
	Response
}

type GetIndustryDeptDetail

type GetIndustryDeptDetail struct {
	Response
	// contains filtered or unexported fields
}

type GetParentIdsByDeptId

type GetParentIdsByDeptId struct {
	Response
	// contains filtered or unexported fields
}

type GetParentIdsByUserId

type GetParentIdsByUserId struct {
	Response
	// contains filtered or unexported fields
}

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 *detailUrl `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
	// contains filtered or unexported fields
}

type InactiveUser

type InactiveUser struct {
	Response
	// contains filtered or unexported fields
}

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

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
	// contains filtered or unexported fields
}

type MessageSendResult

type MessageSendResult struct {
	Response
	// contains filtered or unexported fields
}

type MobileGetUserId

type MobileGetUserId struct {
	Response
	// contains filtered or unexported fields
}

type OrgAdminUser

type OrgAdminUser struct {
	Response

	AdminUser []orgAdminUser `json:"result"`
}

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"`
}

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 RoleDetail

type RoleDetail struct {
	Response
	// contains filtered or unexported fields
}

type RoleList

type RoleList struct {
	Response
	// contains filtered or unexported fields
}

type RoleUser

type RoleUser struct {
	Response
	// contains filtered or unexported fields
}

type SSOUserInfo

type SSOUserInfo struct {
	Response

	// 是否是管理员
	Admin bool `json:"is_sys"`
	// contains filtered or unexported fields
}

type SendChatMessage

type SendChatMessage struct {
	Response

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

type SendMessage

type SendMessage struct {
	Response

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

type SendTemplateMessage

type SendTemplateMessage struct {
	Response

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

type SnsUserInfo

type SnsUserInfo struct {
	Response
	// contains filtered or unexported fields
}

type SubDeptList

type SubDeptList struct {
	Response
	DeptIds subDeptList `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 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
	// contains filtered or unexported fields
}

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 UpdateTodo

type UpdateTodo struct {
	Response

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

type UserCanAccessApplet

type UserCanAccessApplet struct {
	Response

	Access bool `json:"canAccess"`
}

type UserCont

type UserCont struct {
	Response
	// contains filtered or unexported fields
}

type UserDetail

type UserDetail struct {
	Response
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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