sdk

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

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

Go to latest
Published: Jul 10, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateJsApiSign

func CalculateJsApiSign(ticket string, nonceStr string, timestamp int64, url string) string

func CorpAuth

func CorpAuth(url string, suiteKey string, suiteSecret string, suiteTicket string, authCorpId string, agentId int) (string, error)

CorpAuth is the common signature methods for multiple authentication interfaces Get a common interface for enterprise authentication information

func RobotSender

func RobotSender(webHook string, msg WorkNoticeMsg)

Types

type ActionCardBtnJsonList

type ActionCardBtnJsonList struct {
	Title     string `json:"title"`
	ActionUrl string `json:"action_url"`
}

type ActionCardNotice

type ActionCardNotice struct {
	Title          string                   `json:"title"`
	Markdown       string                   `json:"markdown"`
	SingleTitle    string                   `json:"single_title"`
	SingleUrl      string                   `json:"single_url"`
	BtnOrientation int                      `json:"btn_orientation"`
	BtnJsonList    *[]ActionCardBtnJsonList `json:"btn_json_list"`
}

type AddFileToUserCSpaceResp

type AddFileToUserCSpaceResp struct {
	BaseResp
	DEntry string `json:"dentry"`
}

type AdminList

type AdminList struct {
	SysLevel int    `json:"sys_level"`
	UserId   string `json:"userid"`
}

type Agent

type Agent struct {
	AgentName string   `json:"agent_name"`
	AgentId   int      `json:"agentid"`
	AppId     int      `json:"appid"`
	LogoUrl   string   `json:"logo_url"`
	AdminList []string `json:"admin_list"`
}

type AuthCorpInfo

type AuthCorpInfo struct {
	CorpLogoUrl     string `json:"corp_logo_url"`
	CorpName        string `json:"corp_name"`
	CorpId          string `json:"corpid"`
	Industry        string `json:"industry"`
	InviteCode      string `json:"invite_code"`
	LicenseCode     string `json:"license_code"`
	AuthChannel     string `json:"auth_channel"`
	AuthChannelType string `json:"auth_channel_type"`
	IsAuthenticated bool   `json:"is_authenticated"`
	AuthLevel       int    `json:"auth_level"`
	InviteUrl       string `json:"invite_url"`
	CorpProvince    string `json:"corp_province"`
	CorpCity        string `json:"corp_city"`
}

type AuthInfo

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

type AuthUserInfo

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

type BaseResp

type BaseResp struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

type BeginUploadTransaction

type BeginUploadTransaction struct {
	BaseResp
	UploadId string `json:"upload_id"`
}

type CanAccessMicroAppResp

type CanAccessMicroAppResp struct {
	BaseResp

	CanAccess bool `json:"canAccess"`
}

type CancelTaskGroupRequest

type CancelTaskGroupRequest struct {
	AgentId           int     `json:"agentid"`
	ProcessInstanceId string  `json:"process_instance_id"`
	ActivityId        *string `json:"activity_id"`
}

type ChannelAgent

type ChannelAgent struct {
	AgentName string `json:"agent_name"`
	AgentId   int    `json:"agentid"`
	AppId     int    `json:"appid"`
	LogoUrl   int    `json:"logo_url"`
}

type ChannelAuthInfo

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

type CommitUploadTransaction

type CommitUploadTransaction struct {
	BaseResp
	MediaId string `json:"media_id"`
}

type Corp

type Corp struct {
	CorpId      string
	SuiteTicket string
	SuiteKey    string
	SuiteSecret string
}

func CreateCorp

func CreateCorp() *Corp

Create Corp just for test

func NewCorp

func NewCorp(suiteTicket string, corpId string) *Corp

func (*Corp) CreateDingTalkClient

func (corp *Corp) CreateDingTalkClient() (*DingTalkClient, error)

func (*Corp) GetAgent

func (corp *Corp) GetAgent(agentId int) (GetAgentResp, error)

Desc: 获取授权应用信息 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/vfitg0

func (*Corp) GetAuthInfo

func (corp *Corp) GetAuthInfo() (GetAuthInfoResp, error)

Desc: 获取企业授权信息 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/fmdqvx

func (*Corp) GetCorpToken

func (corp *Corp) GetCorpToken() (GetCorpTokenResp, error)

GetCorpToken can get corporation's token Desc: 获取企业凭证 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/hv357q

type CreateOrUpdateBackLogReq

type CreateOrUpdateBackLogReq struct {
	SaveProcessRequest SaveProcessRequest `json:"SaveProcessRequest"`
}

type CreateOrUpdateBackLogResp

type CreateOrUpdateBackLogResp struct {
	BaseResp

	Result CreateOrUpdateBackLogResult `json:"result"`
}

type CreateOrUpdateBackLogResult

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

type CreateProcessInstanceReq

type CreateProcessInstanceReq struct {
	AgentId             *int                         `json:"agent_id"`
	ProcessCode         string                       `json:"process_code"`
	OriginatorUserId    string                       `json:"originator_user_id"`
	DeptId              int                          `json:"dept_id"`
	Approvers           string                       `json:"approvers"`
	ApproversV2         *[]ProcessInstanceApproverVo `json:"approvers_v2"`
	CcList              *string                      `json:"cc_list"`
	CcPosition          *string                      `json:"cc_position"`
	FormComponentValues []FormComponentValuesVo      `json:"form_component_values"`
}

type CreateProcessInstanceResp

type CreateProcessInstanceResp struct {
	BaseResp
	ProcessInstanceId string `json:"process_instance_id"`
}

type CreateWorkRecordRequest

type CreateWorkRecordRequest struct {
	AgentId             int                   `json:"agentid"`
	ProcessCode         string                `json:"process_code"`
	OriginatorUserId    string                `json:"originator_user_id"`
	FormComponentValues []FormComponentValues `json:"form_component_values"`
	Url                 string                `json:"url"`
}

type CreateWorkRecordResp

type CreateWorkRecordResp struct {
	BaseResp

	Result CreateWorkRecordResult `json:"result"`
}

type CreateWorkRecordResult

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

type CreateWorkRecordTaskRequest

type CreateWorkRecordTaskRequest struct {
	AgentId           int                       `json:"agentid"`
	ProcessInstanceId string                    `json:"process_instance_id"`
	ActivityId        *string                   `json:"activity_id,omitempty"`
	Tasks             []CreateWorkRecordTaskTop `json:"tasks"`
}

type CreateWorkRecordTaskResp

type CreateWorkRecordTaskResp struct {
	BaseResp

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

type CreateWorkRecordTaskRespTasks

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

type CreateWorkRecordTaskTop

type CreateWorkRecordTaskTop struct {
	UserId string `json:"userid"`
	Url    string `json:"url"`
}

type DeleteBackLogReq

type DeleteBackLogReq struct {
	AgentId     int    `json:"agentid"`
	ProcessCode string `json:"process_code"`
}

type DingTalkClient

type DingTalkClient struct {
	AccessToken string
	AgentId     int
}

func CreateClient

func CreateClient() *DingTalkClient

Create Client just for test

func NewDingTalkClient

func NewDingTalkClient(accessToken string, agentId int) *DingTalkClient

func (*DingTalkClient) AddFileToUserCSpace

func (client *DingTalkClient) AddFileToUserCSpace(code string, mediaId string, spaceId string, folderId string, name string, overwrite bool) (*AddFileToUserCSpaceResp, error)

Desc: 新增文件到用户钉盘 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-6

func (*DingTalkClient) BaseGetDepMemberList

func (client *DingTalkClient) BaseGetDepMemberList(url string, deptId string, lang string, offset int64, size int64, order string) (GetDepMemberListResp, error)

func (*DingTalkClient) BeginUploadChunk

func (client *DingTalkClient) BeginUploadChunk(uploadId string, sequence int, reader io.Reader) (*BaseResp, error)

Desc: 分块上传文件:上传文件块 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-12

func (*DingTalkClient) BeginUploadTransaction

func (client *DingTalkClient) BeginUploadTransaction(size int64, count int) (*BeginUploadTransaction, error)

Desc: 分块上传文件:开启分块上传事务 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-12

func (*DingTalkClient) CanAccessMicroApp

func (client *DingTalkClient) CanAccessMicroApp(adminId string, appId string) (CanAccessMicroAppResp, error)

Desc: 查询管理员是否具备管理某个应用的权限 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5

func (*DingTalkClient) CancelTaskGroup

func (client *DingTalkClient) CancelTaskGroup(req CancelTaskGroupRequest) (*BaseResp, error)

Desc: 批量取消任务 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/cqukim

func (*DingTalkClient) CommitUploadTransaction

func (client *DingTalkClient) CommitUploadTransaction(size int64, count int, uploadId string) (*CommitUploadTransaction, error)

Desc: 提交文件上传事务 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-12

func (*DingTalkClient) CreateOrUpdateBackLog

func (client *DingTalkClient) CreateOrUpdateBackLog(req SaveProcessRequest) (*CreateOrUpdateBackLogResp, error)

Desc: 创建或更新待办模板 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/hhaed5

func (*DingTalkClient) CreateProcessInstance

func (client *DingTalkClient) CreateProcessInstance(createParams CreateProcessInstanceReq) (CreateProcessInstanceResp, error)

发起审批实例 https://open-doc.dingtalk.com/microapp/serverapi3/zzerip

func (*DingTalkClient) CreateWorkRecord

func (client *DingTalkClient) CreateWorkRecord(req CreateWorkRecordRequest, title *string) (*CreateWorkRecordResp, error)

Desc: 创建待办实例 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/gk2b3e

func (*DingTalkClient) CreateWorkRecordTask

func (client *DingTalkClient) CreateWorkRecordTask(req CreateWorkRecordTaskRequest) (*CreateWorkRecordTaskResp, error)

Desc: 创建待办任务 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/ulgaro

func (*DingTalkClient) DeleteBackLog

func (client *DingTalkClient) DeleteBackLog(req DeleteBackLogReq) (*BaseResp, error)

Desc: 删除待办模板 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/dvr6o6

func (*DingTalkClient) FileUploadSingle

func (client *DingTalkClient) FileUploadSingle(path string) (*FileUploadSingleResp, error)

Desc: 单步文件上传 Doc: https://open-doc.dingtalk.com/microapp/serverapi2/wk3krc#g5zpqs

func (*DingTalkClient) FormConditionList

func (client *DingTalkClient) FormConditionList(processCode string, agentId *int) (FormConditionListResp, error)

查询已设置为条件的表单组件 https://open-doc.dingtalk.com/microapp/serverapi3/yqcw6y

func (*DingTalkClient) GetAdminList

func (client *DingTalkClient) GetAdminList() (GetAdminListResp, error)

Desc: 获取管理员列表 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5

func (*DingTalkClient) GetAdminScope

func (client *DingTalkClient) GetAdminScope(adminId string) (GetAdminScopeResp, error)

Desc: 获取管理员通讯录权限范围 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5

func (*DingTalkClient) GetAuthScopes

func (client *DingTalkClient) GetAuthScopes() (GetAuthScopesResp, error)

func (*DingTalkClient) GetCspaceInfo

func (client *DingTalkClient) GetCspaceInfo(userId string) (GetCspaceInfoResp, error)

获取审批钉盘空间信息 https://open-doc.dingtalk.com/microapp/serverapi3/dnh74x

func (*DingTalkClient) GetCustomSpace

func (client *DingTalkClient) GetCustomSpace(domain string) (*GetCustomSpaceResp, error)

Desc: 获取企业下的自定义空间 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-7

func (*DingTalkClient) GetDepMemberDetailList

func (client *DingTalkClient) GetDepMemberDetailList(deptId string, lang string, offset int64, size int64, order string) (GetDepMemberListResp, error)

Desc: 获取部门用户详情 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5

func (*DingTalkClient) GetDepMemberIds

func (client *DingTalkClient) GetDepMemberIds(deptId string) (GetDepMemberIdsResp, error)

Desc: 获取部门用户userid列表 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5

func (*DingTalkClient) GetDepMemberList

func (client *DingTalkClient) GetDepMemberList(deptId string, lang string, offset int64, size int64, order string) (GetDepMemberListResp, error)

Desc: 获取部门用户 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5

func (*DingTalkClient) GetDeptDetail

func (client *DingTalkClient) GetDeptDetail(id string, lang *string) (GetDeptDetailResp, error)

func (*DingTalkClient) GetDeptList

func (client *DingTalkClient) GetDeptList(lang *string, fetchChild *bool, id string) (GetDeptListResp, error)

func (*DingTalkClient) GetExtcontactDetail

func (client *DingTalkClient) GetExtcontactDetail(userId string) (GetExtcontactDetailResp, error)

func (*DingTalkClient) GetExtcontactList

func (client *DingTalkClient) GetExtcontactList(size string, offset string) (GetExtcontactListResp, error)

func (*DingTalkClient) GetJsApiTicket

func (client *DingTalkClient) GetJsApiTicket(authType string) (*GetJsApiTicketResp, error)

Desc: 获取jsapi_ticket Doc: https://open-doc.dingtalk.com/microapp/dev/uwa7vs

func (*DingTalkClient) GetOrgUserCount

func (client *DingTalkClient) GetOrgUserCount(onlyActive int) (GetOrgUserCountResp, error)

Desc: 获取企业员工人数 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5

func (*DingTalkClient) GetProcessInstanceInfo

func (client *DingTalkClient) GetProcessInstanceInfo(processInstanceId string) (GetProcessInstanceInfoResp, error)

获取审批实例详情 https://open-doc.dingtalk.com/microapp/serverapi3/tkgfol

func (*DingTalkClient) GetRoleDetail

func (client *DingTalkClient) GetRoleDetail(roleId int) (GetRoleDetailResp, error)

Desc: 获取角色详情 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/qydf9c

func (*DingTalkClient) GetRoleGroup

func (client *DingTalkClient) GetRoleGroup(groupId int) (GetRoleGroupResp, error)

Desc: 获取角色组 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/qydf9c

func (*DingTalkClient) GetRoleList

func (client *DingTalkClient) GetRoleList(offset int, size int) (GetRoleListResp, error)

Desc: 获取角色列表 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/qydf9c

func (*DingTalkClient) GetSubDept

func (client *DingTalkClient) GetSubDept(id string) (GetSubdeptResp, error)

func (*DingTalkClient) GetUserDetail

func (client *DingTalkClient) GetUserDetail(userId string, lang *string) (GetUserDetailResp, error)

Desc: 获取用户详情 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5

func (*DingTalkClient) GetUserIdByUnionId

func (client *DingTalkClient) GetUserIdByUnionId(unionId string) (GetUserIdByUnionIdResp, error)

Desc: 根据unionid获取userid Doc: https://open-doc.dingtalk.com/microapp/serverapi3/momrx5

func (*DingTalkClient) GetUserInfoByCode

func (client *DingTalkClient) GetUserInfoByCode(code string) (GetUserInfoByCodeResp, error)

func (*DingTalkClient) GetUserInfoFromAdmin

func (client *DingTalkClient) GetUserInfoFromAdmin(code string) (GetUserInfoFromAdminResp, error)

应用管理后台免登(获取应用管理员的身份信息) https://open-doc.dingtalk.com/microapp/serverapi3/ydc8us

func (*DingTalkClient) GetUserInfoFromThird

func (client *DingTalkClient) GetUserInfoFromThird(code string) (GetUserInfoFromThirdResp, error)

第三方企业应用免登(获取用户userid) https://open-doc.dingtalk.com/microapp/serverapi3/xcdh0r

func (*DingTalkClient) GetUsersInRole

func (client *DingTalkClient) GetUsersInRole(roleId int, offset int, size int) (GetUsersInRoleResp, error)

Desc: 获取角色下的员工列表 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/qydf9c

func (*DingTalkClient) GetWorkNoticeProgress

func (client *DingTalkClient) GetWorkNoticeProgress(taskId int) (GetWorkNoticeProgressResp, error)

Desc: 查询工作通知消息的发送进度 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/is3zms#

func (*DingTalkClient) GetWorkNoticeSendResult

func (client *DingTalkClient) GetWorkNoticeSendResult(taskId int) (GetWorkNoticeResultResp, error)

Desc: 查询工作通知消息的发送结果 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/is3zms#

func (*DingTalkClient) GrantCustomSpace

func (client *DingTalkClient) GrantCustomSpace(domain string, grantType string, userId string, path string, fileIds string, duration int) (*BaseResp, error)

Desc: 授权用户访问企业自定义空间 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-8

func (*DingTalkClient) ListLabelGroups

func (client *DingTalkClient) ListLabelGroups(size string, offset string) (ListLabelGroupsResp, error)

func (*DingTalkClient) ListParentDepts

func (client *DingTalkClient) ListParentDepts(userId string) (ListParentDeptsResp, error)

func (*DingTalkClient) ListParentDeptsByDept

func (client *DingTalkClient) ListParentDeptsByDept(id string) (ListParentDeptsByDeptResp, error)

func (*DingTalkClient) RecallWorkNotice

func (client *DingTalkClient) RecallWorkNotice(taskId int) (WorkNoticeRecallResp, error)

Desc: 工作通知消息撤回 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/is3zms#

func (*DingTalkClient) SaveProcess

func (client *DingTalkClient) SaveProcess(saveProcessRequest SaveProcessReq, fakeMode *bool, templateEditUrl *string) (SaveProcessResp, error)

创建或更新审批模板 https://open-doc.dingtalk.com/microapp/serverapi3/svyi4c

func (*DingTalkClient) SendDingPanFileToSingleChat

func (client *DingTalkClient) SendDingPanFileToSingleChat(userId string, mediaId string, fileName string) (*BaseResp, error)

Desc: 发送钉盘文件给指定用户 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/zmmoa5#-5

func (*DingTalkClient) SendNormalNotice

func (client *DingTalkClient) SendNormalNotice(sender string, cid string, msg WorkNoticeMsg) (SendNormalNoticeResp, error)

Desc: 发送普通消息 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/wvdxel

func (*DingTalkClient) SendWorkNotice

func (client *DingTalkClient) SendWorkNotice(userIdList *string, deptIdList *string, toAllUser bool, msg WorkNoticeMsg) (SendWorkNoticeResp, error)

Desc: 工作通知消息 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/is3zms

func (*DingTalkClient) UpdateWorkRecord

func (client *DingTalkClient) UpdateWorkRecord(req UpdateWorkRecordRequest) (*BaseResp, error)

Desc: 更新实例状态 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/vo0gqo

func (*DingTalkClient) UpdateWorkRecordTask

func (client *DingTalkClient) UpdateWorkRecordTask(req UpdateWorkRecordTaskRequest) (*CreateWorkRecordTaskResp, error)

Desc: 更新任务状态 Doc: https://open-doc.dingtalk.com/microapp/serverapi3/sbl5ms

func (*DingTalkClient) UploadMedia

func (client *DingTalkClient) UploadMedia(mediaType string, path string) (UploadMediaResp, error)

type ExtcontactDetail

type ExtcontactDetail struct {
	Title          string   `json:"title"`
	ShareDeptIds   []int64  `json:"share_dept_ids"`
	LabelIds       []int64  `json:"label_ids"`
	Remark         string   `json:"remark"`
	Address        string   `json:"address"`
	Name           string   `json:"name"`
	FollowerUserId string   `json:"follower_user_id"`
	StateCode      string   `json:"state_code"`
	CompanyName    string   `json:"company_name"`
	ShareUserIds   []string `json:"share_user_ids"`
	UserId         string   `json:"userid"`
}

type FileNotice

type FileNotice struct {
	MediaId string `json:"media_id"`
}

type FileUploadSingleResp

type FileUploadSingleResp struct {
	BaseResp

	MediaId string `json:"media_id"`
}

type FormComponentList

type FormComponentList struct {
	ComponentName string `json:"component_name"`
	Props         Props  `json:"props"`
}

type FormComponentPropVo

type FormComponentPropVo struct {
	Id          string                 `json:"id"`
	Label       string                 `json:"label"`
	Required    *bool                  `json:"required"`
	NotPrint    *string                `json:"not_print"`
	Placeholder *string                `json:"placeholder"`
	NotUpper    *string                `json:"not_upper"`
	Unit        *string                `json:"unit"`
	Options     *[]string              `json:"options"`
	Choice      *int64                 `json:"choice"`
	Link        *string                `json:"link"`
	ActionName  *string                `json:"action_name"`
	StatField   *[]FormComponentStatVo `json:"stat_field"`
}

type FormComponentStatVo

type FormComponentStatVo struct {
	Id    *string `json:"id"`
	Label *string `json:"label"`
	Upper *bool   `json:"upper"`
	Unit  *string `json:"unit"`
}

type FormComponentValues

type FormComponentValues struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type FormComponentValuesVo

type FormComponentValuesVo struct {
	Name     string `json:"name"`
	Value    string `json:"value"`
	ExtValue string `json:"ext_value"`
}

type FormComponentVo

type FormComponentVo struct {
	ComponentName string              `json:"component_name"`
	Props         FormComponentPropVo `json:"props"`
	Children      *FormComponentVo    `json:"children"`
}

type FormConditionListResp

type FormConditionListResp struct {
	BaseResp
	Result struct {
		List struct {
			Id    string `json:"id"`
			Label string `json:"label"`
		} `json:"list"`
	} `json:"result"`
}

type GetAdminListResp

type GetAdminListResp struct {
	BaseResp

	AdminList []AdminList `json:"admin_list"`
}

type GetAdminScopeResp

type GetAdminScopeResp struct {
	BaseResp

	DeptIds []int `json:"dept_ids"`
}

type GetAgentResp

type GetAgentResp struct {
	BaseResp

	AgentId     int    `json:"agentid"`
	Name        string `json:"name"`
	LogoUrl     string `json:"logo_url"`
	Description string `json:"description"`
	Close       int    `json:"close"`
}

======================== 获取授权应用信息: https://open-doc.dingtalk.com/microapp/serverapi3/vfitg0

type GetAuthInfoResp

type GetAuthInfoResp struct {
	BaseResp

	AuthCorpInfo    AuthCorpInfo    `json:"auth_corp_info"`
	AuthUserInfo    AuthUserInfo    `json:"auth_user_info"`
	AuthInfo        AuthInfo        `json:"auth_info"`
	ChannelAuthInfo ChannelAuthInfo `json:"channel_auth_info"`
}

======================== 获取企业授权信息: https://open-doc.dingtalk.com/microapp/serverapi3/hv357q

type GetAuthScopesResp

type GetAuthScopesResp struct {
	BaseResp
	AuthUserField  []string `json:"auth_user_field"`
	ConditionField []string `json:"condition_field"`
	AuthOrgScopes  struct {
		AuthedDept []int64  `json:"authed_dept"`
		AuthedUser []string `json:"authed_user"`
	} `json:"auth_org_scopes"`
}

type GetCorpTokenResp

type GetCorpTokenResp struct {
	BaseResp

	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
}

======================== 获取企业凭证: https://open-doc.dingtalk.com/microapp/serverapi3/vfitg0

type GetCspaceInfoResp

type GetCspaceInfoResp struct {
	BaseResp
	Result struct {
		SpaceId int `json:"space_id"`
	} `json:"result"`
	Success bool `json:"success"`
}

type GetCustomSpaceResp

type GetCustomSpaceResp struct {
	BaseResp
	SpaceId string `json:"spaceid"`
}

type GetDepMemberIdsResp

type GetDepMemberIdsResp struct {
	BaseResp
	UserIds []string `json:"userIds"`
}

type GetDepMemberListResp

type GetDepMemberListResp struct {
	BaseResp

	HasMore  bool       `json:"hasMore"`
	UserList []UserList `json:"userlist"`
}

type GetDeptDetailResp

type GetDeptDetailResp struct {
	BaseResp
	Id                    int    `json:"id"`
	Name                  string `json:"name"`
	Order                 int64  `json:"order"`
	ParentId              int    `json:"parentid"`
	CreateDeptGroup       bool   `json:"createDeptGroup"`
	AutoAddUser           bool   `json:"autoAddUser"`
	DeptHiding            bool   `json:"deptHiding"`
	DeptPermits           string `json:"deptPermits"`
	UserPermits           string `json:"userPermits"`
	OuterDept             bool   `json:"outerDept"`
	OuterPermitDepts      string `json:"outerPermitDepts"`
	OuterPermitUsers      string `json:"outerPermitUsers"`
	OrgDeptOwner          string `json:"orgDeptOwner"`
	DeptManagerUseridList string `json:"deptManagerUseridList"`
	SourceIdentifier      string `json:"sourceIdentifier"`
}

type GetDeptListResp

type GetDeptListResp struct {
	BaseResp
	Department []struct {
		Id              int    `json:"id"`
		Name            string `json:"name"`
		ParentId        int    `json:"parentid"`
		CreateDeptGroup bool   `json:"createDeptGroup"`
		AutoAddUser     bool   `json:"autoAddUser"`
	} `json:"department"`
}

type GetExtcontactDetailResp

type GetExtcontactDetailResp struct {
	BaseResp
	Result ExtcontactDetail `json:"result"`
}

type GetExtcontactListResp

type GetExtcontactListResp struct {
	BaseResp
	Results []ExtcontactDetail `json:"results"`
}

type GetJsApiTicketResp

type GetJsApiTicketResp struct {
	BaseResp

	Ticket    string `json:"ticket"`
	ExpiresIn int    `json:"expires_in"`
}

type GetOrgUserCountResp

type GetOrgUserCountResp struct {
	BaseResp

	Count int64 `json:"count"`
}

type GetProcessInstanceInfoResp

type GetProcessInstanceInfoResp struct {
	BaseResp
	ProcessInstance ProcessInstanceVo `json:"process_instance"`
}

type GetRoleDetailResp

type GetRoleDetailResp struct {
	BaseResp

	Role Role `json:"role"`
}

type GetRoleGroupResp

type GetRoleGroupResp struct {
	BaseResp

	RoleGroup RoleGroupV1 `json:"role_group"`
}

type GetRoleListResp

type GetRoleListResp struct {
	BaseResp

	Result GetRoleListResult `json:"result"`
}

type GetRoleListResult

type GetRoleListResult struct {
	HasMore  bool        `json:"hasMore"`
	RoleList []RoleGroup `json:"list"`
}

type GetSubdeptResp

type GetSubdeptResp struct {
	BaseResp
	SubDeptIdList []int `json:"sub_dept_id_list"`
}

type GetUserDetailResp

type GetUserDetailResp struct {
	BaseResp

	UserList
}

type GetUserIdByUnionIdResp

type GetUserIdByUnionIdResp struct {
	BaseResp

	ContactType int    `json:"contactType"`
	UserId      string `json:"userid"`
}

type GetUserInRoleResult

type GetUserInRoleResult struct {
	HasMore    bool       `json:"hasMore"`
	NextCursor int        `json:"nextCursor"`
	UserList   []UserList `json:"list"`
}

type GetUserInfoByCodeResp

type GetUserInfoByCodeResp struct {
	BaseResp
	UserInfo struct {
		Nick    string `json:"nick"`
		OpenId  string `json:"openid"`
		UnionId string `json:"unionid"`
	} `json:"user_info"`
}

type GetUserInfoFromAdminResp

type GetUserInfoFromAdminResp struct {
	BaseResp
	CropInfo struct {
		CropName string `json:"crop_name"`
		CropId   string `json:"cropid"`
	}
	IsSys    bool `json:"is_sys"`
	UserInfo struct {
		Avatar string `json:"avatar"`
		Email  string `json:"email"`
		Name   string `json:"name"`
		UserId string `json:"userid"`
	} `json:"user_info"`
}

type GetUserInfoFromThirdResp

type GetUserInfoFromThirdResp struct {
	BaseResp
	UserId   string `json:"userid"`
	SysLevel int64  `json:"sys_level"`
	IsSys    bool   `json:"is_sys"`
	DeviceId string `json:"deviceId"`
}

type GetUsersInRoleResp

type GetUsersInRoleResp struct {
	BaseResp

	Result GetUserInRoleResult `json:"result"`
}

type GetWorkNoticeProgressResp

type GetWorkNoticeProgressResp struct {
	ErrCode  int            `json:"errcode"`
	ErrMsg   string         `json:"errmsg"`
	Progress NoticeProgress `json:"progress"`
}

type GetWorkNoticeResultResp

type GetWorkNoticeResultResp struct {
	ErrCode    int              `json:"errcode"`
	ErrMsg     string           `json:"errmsg"`
	SendResult NoticeSendResult `json:"send_result"`
}

type ImageNotice

type ImageNotice struct {
	MediaId string `json:"media_id"`
}

type Labels

type Labels struct {
	Name string `json:"name"`
	Id   int64  `json:"id"`
}

type LinkNotice

type LinkNotice struct {
	MsgUrl string `json:"messageUrl"`
	PicUrl string `json:"picUrl"`
	Title  string `json:"title"`
	Text   string `json:"text"`
}

type ListLabelGroupsResp

type ListLabelGroupsResp struct {
	BaseResp
	Results []struct {
		Name   string   `json:"name"`
		Color  int64    `json:"color"`
		Labels []Labels `json:"labels"`
	}
}

type ListParentDeptsByDeptResp

type ListParentDeptsByDeptResp struct {
	BaseResp
	ParentIds []int `json:"parentIds"`
}

type ListParentDeptsResp

type ListParentDeptsResp struct {
	BaseResp
	Department [][]int `json:"department"`
}

type MarkdownNotice

type MarkdownNotice struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type NoticeProgress

type NoticeProgress struct {
	ProgressInPercent int `json:"progress_in_percent"`
	Status            int `json:"status"`
}

type NoticeSendResult

type NoticeSendResult struct {
	InvalidUserIdList   []string `json:"invalid_user_id_list"`
	ForbiddenUserIdList []string `json:"forbidden_user_id_list"`
	FailedUserIdList    []string `json:"failed_user_id_list"`
	ReadUserIdList      []string `json:"read_user_id_list"`
	UnreadUserIdList    []string `json:"unread_user_id_list"`
	InvalidDeptIdList   []string `json:"invalid_dept_id_list"`
}

type OANotice

type OANotice struct {
	MsgUrl string       `json:"message_url"`
	Head   OANoticeHead `json:"head"`
	Body   OANoticeBody `json:"body"`
}

type OANoticeBody

type OANoticeBody struct {
	Title     string             `json:"title"`
	Form      []OANoticeBodyForm `json:"form"`
	Rich      OANoticeBodyRich   `json:"rich"`
	Content   string             `json:"content"`
	Image     string             `json:"image"`
	FileCount string             `json:"file_count"`
	Author    string             `json:"author"`
}

type OANoticeBodyForm

type OANoticeBodyForm struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type OANoticeBodyRich

type OANoticeBodyRich struct {
	Num  string `json:"num"`
	Unit string `json:"unit"`
}

type OANoticeHead

type OANoticeHead struct {
	BgColor string `json:"bgcolor"`
	Text    string `json:"text"`
}

type OperationRecordsVo

type OperationRecordsVo struct {
	UserId          string `json:"userid"`
	Date            string `json:"date"`
	OperationResult string `json:"operation_result"`
	Remark          string `json:"remark"`
}

type ProcessInstanceApproverVo

type ProcessInstanceApproverVo struct {
	UserIds        *[]string `json:"user_ids"`
	TaskActionType *string   `json:"task_action_type"`
}

type ProcessInstanceVo

type ProcessInstanceVo struct {
	Title                      string                  `json:"title"`
	CreateTime                 string                  `json:"create_time"`
	FinishTime                 string                  `json:"finish_time"`
	OriginatorUserId           string                  `json:"originator_userid"`
	OriginatorDeptId           string                  `json:"originator_dept_id"`
	Status                     string                  `json:"status"`
	CcUserIds                  string                  `json:"cc_userids"`
	FormComponentValues        []FormComponentValuesVo `json:"form_component_values"`
	Result                     string                  `json:"result"`
	BusinessId                 string                  `json:"business_id"`
	OperationRecords           []OperationRecordsVo    `json:"operation_records"`
	Tasks                      []TasksVo               `json:"tasks"`
	OriginatorDeptName         string                  `json:"originator_dept_name"`
	BizAction                  string                  `json:"biz_action"`
	AttachedProcessInstanceIds []string                `json:"attached_process_instance_ids"`
}

type Props

type Props struct {
	Id          string `json:"id"`
	Label       string `json:"label"`
	Required    bool   `json:"required"`
	Unit        string `json:"unit,omitempty"`
	Placeholder string `json:"placeholder"`
}

type Role

type Role struct {
	Name string `json:"name"`
	Id   int    `json:"id"`
}

type RoleGroup

type RoleGroup struct {
	Name    string `json:"name"`
	GroupId int    `json:"groupId"`
	Roles   []Role `json:"roles"`
}

type RoleGroupV1

type RoleGroupV1 struct {
	Name  string   `json:"group_name"`
	Roles []RoleV1 `json:"roles"`
}

type RoleV1

type RoleV1 struct {
	Name string `json:"role_name"`
	Id   int    `json:"role_id"`
}

type SaveProcessReq

type SaveProcessReq struct {
	ProcessCode       *string           `json:"process_code"`
	AgentId           int               `json:"agentid"`
	DisableFormEdit   *string           `json:"disable_form_edit"`
	Name              string            `json:"name"`
	Description       string            `json:"description"`
	FormComponentList []FormComponentVo `json:"form_component_list"`
}

type SaveProcessRequest

type SaveProcessRequest struct {
	AgentId           int                 `json:"agentid"`
	ProcessCode       string              `json:"process_code,omitempty"`
	Name              string              `json:"name"`
	Description       string              `json:"description"`
	FormComponentList []FormComponentList `json:"form_component_list"`
	FakeMode          bool                `json:"fake_mode"`
}

type SaveProcessResp

type SaveProcessResp struct {
	BaseResp
	Result struct {
		ProcessCode string `json:"process_code"`
	} `json:"result"`
}

type SendNormalNoticeResp

type SendNormalNoticeResp struct {
	ErrCode  int    `json:"errcode"`
	ErrMsg   string `json:"errmsg"`
	Receiver string `json:"receiver"`
}

type SendWorkNoticeResp

type SendWorkNoticeResp struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
	TaskId  int    `json:"task_id"`
}

type TasksVo

type TasksVo struct {
	UserId     string `json:"userid"`
	TaskStatus string `json:"task_status"`
	TaskResult string `json:"task_result"`
	CreateTime string `json:"create_time"`
	FinishTime string `json:"finish_time"`
	TaskId     string `json:"taskid"`
}

type TextNotice

type TextNotice struct {
	Content string `json:"content"`
}

type UpdateWorkRecordRequest

type UpdateWorkRecordRequest struct {
	AgentId           int    `json:"agentid"`
	ProcessInstanceId string `json:"process_instance_id"`
	Status            string `json:"status"`
	Result            string `json:"result,omitempty"`
}

type UpdateWorkRecordTaskRequest

type UpdateWorkRecordTaskRequest struct {
	AgentId           int                       `json:"agentid"`
	ProcessInstanceId string                    `json:"process_instance_id"`
	Tasks             []UpdateWorkRecordTaskTop `json:"tasks"`
}

type UpdateWorkRecordTaskResp

type UpdateWorkRecordTaskResp struct {
	CreateWorkRecordTaskResp
}

type UpdateWorkRecordTaskTop

type UpdateWorkRecordTaskTop struct {
	TaskId int    `json:"task_id"`
	Status string `json:"status"`
	Result string `json:"result,omitempty"`
}

type UploadMediaResp

type UploadMediaResp struct {
	ErrCode   int    `json:"errcode"`
	ErrMsg    string `json:"errmsg"`
	Type      string `json:"type"`
	MediaId   string `json:"media_id"`
	CreatedAt int64  `json:"created_at"`
}

type UserDetailRole

type UserDetailRole struct {
	Id        int64  `json:"id"`
	Name      string `json:"name"`
	GroupName string `json:"groupName"`
}

type UserList

type UserList struct {
	Name            string           `json:"name"`
	UnionId         string           `json:"unionid"`
	UserId          string           `json:"userid"`
	IsLeaderInDepts string           `json:"isLeaderInDepts"`
	IsBoos          bool             `json:"isBoss"`
	HiredDate       int64            `json:"hiredDate"`
	IsSenior        bool             `json:"isSenior"`
	Department      []int            `json:"department"`
	OrderInDepts    string           `json:"orderInDepts"`
	Active          bool             `json:"active"`
	Avatar          string           `json:"avatar"`
	IsAdmin         bool             `json:"isAdmin"`
	IsHide          bool             `json:"isHide"`
	JobNumber       string           `json:"jobnumber"`
	Position        string           `json:"position"`
	DingId          string           `json:"dingId"`
	Roles           []UserDetailRole `json:"roles"`
}

type VoiceNotice

type VoiceNotice struct {
	MediaId  string `json:"media_id"`
	Duration string `json:"duration"`
}

type WorkNoticeMsg

type WorkNoticeMsg struct {
	MsgType    string            `json:"msgtype"`
	Text       *TextNotice       `json:"text"`
	Image      *ImageNotice      `json:"image"`
	Voice      *VoiceNotice      `json:"voice"`
	File       *FileNotice       `json:"file"`
	Link       *LinkNotice       `json:"link"`
	OA         *OANotice         `json:"oa"`
	Markdown   *MarkdownNotice   `json:"markdown"`
	ActionCard *ActionCardNotice `json:"action_card"`
}

type WorkNoticeRecallResp

type WorkNoticeRecallResp struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

Jump to

Keyboard shortcuts

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