dingtalk

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION               = "0.1"
	OAPIURL               = "https://oapi.dingtalk.com/"
	NEWOAPIURL            = "https://api.dingtalk.com/"
	TOPAPIURL             = "https://eco.taobao.com/router/rest"
	MessageTypeText       = "text"
	MessageTypeActionCard = "action_card"
	MessageTypeImage      = "image"
	MessageTypeVoice      = "voice"
	MessageTypeFile       = "file"
	MessageTypeLink       = "link"
	MessageTypeOA         = "oa"
	MessageTypeMarkdown   = "markdown"
)

包外部可用的常量

Variables

This section is empty.

Functions

func HandJSONTopResponse

func HandJSONTopResponse(responseData interface{}, content []byte)

func HandXMLTopResponse

func HandXMLTopResponse(responseData interface{}, content []byte)

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	OpenAPIResponse
	AccessToken string `json:"access_token"`
	Expires     int    `json:"expires_in"`
	Created     int64
}

func (*AccessTokenResponse) CreatedAt

func (e *AccessTokenResponse) CreatedAt() int64

func (*AccessTokenResponse) ExpiresIn

func (e *AccessTokenResponse) ExpiresIn() int

type ActivateSuiteResponse

type ActivateSuiteResponse struct {
	OpenAPIResponse
}

type Admins

type Admins struct {
	UserID   string `json:"userid"`
	SysLevel int    `json:"sys_level"`
}

type AuthCorpInfo

type AuthCorpInfo struct {
	CorpID   string `json:"corpid"`
	CorpName string `json:"corp_name"`
}

type AuthOrgScopes

type AuthOrgScopes struct {
	AuthedDept []int
	AuthedUser []string
}

type CBCallBackRequest

type CBCallBackRequest struct {
	CallbackTag []string `json:"call_back_tag"`
	Token       string   `json:"token"`
	AesKey      string   `json:"aes_key"`
	URL         string   `json:"url"`
}

type CBCallBackResponse

type CBCallBackResponse struct {
	OpenAPIResponse
}

type CBGetFailedCallbackResponse

type CBGetFailedCallbackResponse struct {
	OpenAPIResponse
	HasMore    bool              `json:"has_more"`
	FailedList []FailedCallbacks `json:"failed_list"`
}

type CBQueryCallbackResponse

type CBQueryCallbackResponse struct {
	OpenAPIResponse
	CallbackTag []string `json:"call_back_tag"`
	Token       string   `json:"token"`
	AesKey      string   `json:"aes_key"`
	URL         string   `json:"url"`
}

type Cache

type Cache interface {
	Set(data Expirable) error
	Get(data Expirable) error
}

type ChatCreateRequest

type ChatCreateRequest struct {
	Name            string   `json:"name"`
	Owner           string   `json:"owner"`
	UserIdList      []string `json:"useridlist"`
	ShowHistoryType int      `json:"showHistoryType,omitempty"`
}

type ChatCreateResponse

type ChatCreateResponse struct {
	OpenAPIResponse
	ChatId string `json:"chatid"`
}

type ChatGetInfo

type ChatGetInfo struct {
	Name       string
	Owner      string
	UserIdList []string `json:"useridlist"`
}

type ChatGetResponse

type ChatGetResponse struct {
	OpenAPIResponse
	ChatInfo ChatGetInfo `json:"chat_info"`
}

type ChatSendActionCard

type ChatSendActionCard struct {
	Title          string      `json:"title"`
	Markdown       string      `json:"markdown"`
	SingleTitle    string      `json:"single_title,omitempty"`
	SingleUrl      string      `json:"single_url,omitempty"`
	BtnOrientation string      `json:"btn_orientation,omitempty"`
	BtnJSONList    interface{} `json:"btn_json_list,omitempty"`
	AgentId        string      `json:"agentid,omitempty"`
}

type ChatSendActionCardRequest

type ChatSendActionCardRequest struct {
	ChatSendRequest
	ActionCard *ChatSendActionCard `json:"action_card"`
}

type ChatSendFile

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

type ChatSendFileRequest

type ChatSendFileRequest struct {
	ChatSendRequest
	File *ChatSendFile `json:"file"`
}

type ChatSendImage

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

type ChatSendImageRequest

type ChatSendImageRequest struct {
	ChatSendRequest
	Image *ChatSendImage `json:"image"`
}
type ChatSendLink struct {
	Title      string `json:"title"`
	Text       string `json:"text"`
	PicUrl     string `json:"pic_url"`
	MessageUrl string `json:"message_url"`
}

type ChatSendLinkRequest

type ChatSendLinkRequest struct {
	ChatSendRequest
	Link *ChatSendLink `json:"link"`
}

type ChatSendMarkdown

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

type ChatSendMarkdownRequest

type ChatSendMarkdownRequest struct {
	ChatSendRequest
	Markdown *ChatSendMarkdown `json:"markdown"`
}

type ChatSendOA

type ChatSendOA struct {
	MessageUrl   string      `json:"message_url"`
	PcMessageUrl string      `json:"pc_message_url,omitempty"`
	Head         interface{} `json:"head"`
	Body         interface{} `json:"body"`
}

type ChatSendOARequest

type ChatSendOARequest struct {
	ChatSendRequest
	Oa *ChatSendOA `json:"oa"`
}

type ChatSendRequest

type ChatSendRequest struct {
	ChatId  string `json:"chatid"`
	MsgType string `json:"msgtype"`
}

type ChatSendResponse

type ChatSendResponse struct {
	OpenAPIResponse
}

type ChatSendText

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

type ChatSendTextRequest

type ChatSendTextRequest struct {
	ChatSendRequest
	Text *ChatSendText `json:"text"`
}

type ChatSendVoice

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

type ChatSendVoiceRequest

type ChatSendVoiceRequest struct {
	ChatSendRequest
	Voice *ChatSendVoice `json:"voice"`
}

type ChatUpdateRequest

type ChatUpdateRequest struct {
	ChatId        string   `json:"chatid"`
	Name          string   `json:"name,omitempty"`
	Owner         string   `json:"owner,omitempty"`
	AddUserIdList []string `json:"add_useridlist,omitempty"`
	DelUserIdList []string `json:"del_useridlist,omitempty"`
}

type ChatUpdateResponse

type ChatUpdateResponse struct {
	OpenAPIResponse
}

type CorpExtcontactRequest

type CorpExtcontactRequest struct {
	Title          string   `json:"title,omitempty"`
	LabelIDs       []int    `json:"label_ids"`
	ShareDeptIDs   []int    `json:"share_dept_ids,omitempty"`
	Address        string   `json:"address,omitempty"`
	Remark         string   `json:"remark,omitempty"`
	FollowerUserID string   `json:"follower_user_id"`
	Name           string   `json:"name"`
	UserID         string   `json:"user_id,omitempty"`
	StateCode      string   `json:"state_code"`
	CompanyName    string   `json:"company_name,omitempty"`
	ShareUserIDs   []string `json:"share_user_ids,omitempty"`
	Mobile         string   `json:"mobile"`
}

type CspaceAddRequest

type CspaceAddRequest struct {
	AgentID   string `json:"agent_id,omitempty"`
	Code      string `json:"code"`
	MediaID   string `json:"media_id"`
	SpaceID   string `json:"space_id"`
	FolderID  string `json:"folder_id"`
	Name      string `json:"name"`
	Overwrite bool   `json:"overwrite,omitempty"`
}

type CspaceAddResponse

type CspaceAddResponse struct {
	OpenAPIResponse
	Dentry string
}

type CspaceAddToSingleChatRequest

type CspaceAddToSingleChatRequest struct {
	AgentID  string `json:"agent_id"`
	UserID   string `json:"userid"`
	MediaID  string `json:"media_id"`
	FileName string `json:"file_name"`
}

type CspaceAddToSingleChatResponse

type CspaceAddToSingleChatResponse struct {
	OpenAPIResponse
}

type CspaceGetCustomSpaceRequest

type CspaceGetCustomSpaceRequest struct {
	Domain  string `json:"domain"`
	AgentID string `json:"agent_id"`
}

type CspaceGetCustomSpaceResponse

type CspaceGetCustomSpaceResponse struct {
	OpenAPIResponse
	SpaceID string
}

type CspaceGrantCustomSpaceRequest

type CspaceGrantCustomSpaceRequest struct {
	AgentID  string `json:"agent_id"`
	Domain   string `json:"domain"`
	IType    string `json:"type"`
	UserID   string `json:"userid"`
	Path     string `json:"path"`
	Fileids  string `json:"fileids"`
	Duration int64  `json:"Duration"`
}

type CspaceGrantCustomSpaceResponse

type CspaceGrantCustomSpaceResponse struct {
	OpenAPIResponse
}

type DTConfig

type DTConfig struct {
	TopConfig
	CorpID        string
	CorpSecret    string
	AgentID       string
	SuiteKey      string
	SuiteSecret   string
	SuiteTicket   string
	ChannelSecret string
	SSOSecret     string
	SNSAppID      string
	SNSSecret     string
}

type DTIsvGetCompanyInfo

type DTIsvGetCompanyInfo struct {
	AuthCorpID      string
	PermanentCode   string
	AuthAccessToken string
}

type DataRecordResponse

type DataRecordResponse struct {
	OpenAPIResponse
	ID string `json:"id"`
}

type DataRequest

type DataRequest struct {
	ID          string      `json:"id,omitempty"`
	StartTimeMs string      `json:"startTimeMs"`
	EndTimeMs   string      `json:"endTimeMs"`
	Module      string      `json:"module,omitempty"`
	OriginID    string      `json:"originId,omitempty"`
	UserID      string      `json:"userid"`
	AgentID     string      `json:"agentId"`
	CallbackUrl string      `json:"callbackUrl"`
	Extension   interface{} `json:"extension,omitempty"`
}

type DataUpdateResponse

type DataUpdateResponse struct {
	OpenAPIResponse
}

type Department

type Department struct {
	DeptId          int64  `json:"dept_id"`
	Name            string `json:"name"`
	ParentId        int64  `json:"parent_id"`
	CreateDeptGroup bool   `json:"create_dept_group"`
	AutoAddUser     bool   `json:"auto_add_user"`
}

type DepartmentCreateRequest

type DepartmentCreateRequest struct {
	Name             string `json:"name"`
	ParentId         string `json:"parentid"`
	Order            string `json:"order,omitempty"`
	CreateDeptGroup  bool   `json:"createDeptGroup,omitempty"`
	DeptHiding       bool   `json:"deptHiding,omitempty"`
	DeptPerimits     string `json:"deptPerimits,omitempty"`
	UserPerimits     string `json:"userPerimits,omitempty"`
	OuterDept        string `json:"outerDept,omitempty"`
	OuterPermitDepts string `json:"outerPermitDepts,omitempty"`
	OuterPermitUsers string `json:"outerPermitUsers,omitempty"`
	SourceIdentifier string `json:"sourceIdentifier,omitempty"`
}

type DepartmentCreateResponse

type DepartmentCreateResponse struct {
	OpenAPIResponse
	Id int
}

type DepartmentDeleteResponse

type DepartmentDeleteResponse struct {
	OpenAPIResponse
}

type DepartmentDetailResponse

type DepartmentDetailResponse struct {
	OpenAPIResponse
	Id                    int
	Name                  string
	Order                 int
	ParentId              int
	CreateDeptGroup       bool
	AutoAddUser           bool
	DeptHiding            bool
	DeptPerimits          string
	UserPerimits          string
	OuterDept             bool
	OuterPermitDepts      string
	OuterPermitUsers      string
	OrgDeptOwner          string
	DeptManagerUserIdList string
	SourceIdentifier      string
}

type DepartmentListParentDeptsByDeptResponse

type DepartmentListParentDeptsByDeptResponse struct {
	OpenAPIResponse
	ParentIds []int `json:"parentIds"`
}

type DepartmentListParentDeptsResponse

type DepartmentListParentDeptsResponse struct {
	OpenAPIResponse
	ParentIds interface{} `json:"dep"`
}

type DepartmentListsubParam added in v1.0.5

type DepartmentListsubParam struct {
	DeptId   int64  `json:"dept_id"`
	Language string `json:"language"`
}

type DepartmentListsubResponse added in v1.0.5

type DepartmentListsubResponse struct {
	OpenAPIResponse
	Result []Department `json:"result"`
}

type DepartmentUpdateRequest

type DepartmentUpdateRequest struct {
	Lang                  string `json:"lang,omitempty"`
	Name                  string `json:"name,omitempty"`
	ParentId              string `json:"parentid,omitempty"`
	Order                 string `json:"order,omitempty"`
	Id                    string `json:"id"`
	CreateDeptGroup       bool   `json:"createDeptGroup,omitempty"`
	AutoAddUser           bool   `json:"autoAddUser,omitempty"`
	DeptManagerUseridList string `json:"deptManagerUseridList,omitempty"`
	DeptHiding            bool   `json:"deptHiding,omitempty"`
	DeptPerimits          string `json:"deptPerimits,omitempty"`
	UserPerimits          string `json:"userPerimits,omitempty"`
	OuterDept             string `json:"outerDept,omitempty"`
	OuterPermitDepts      string `json:"outerPermitDepts,omitempty"`
	OuterPermitUsers      string `json:"outerPermitUsers,omitempty"`
	OrgDeptOwner          string `json:"orgDeptOwner,omitempty"`
	SourceIdentifier      string `json:"sourceIdentifier,omitempty"`
}

type DepartmentUpdateResponse

type DepartmentUpdateResponse struct {
	OpenAPIResponse
	Id int
}

type DingTalkClient

type DingTalkClient struct {
	DTConfig              *DTConfig
	TopConfig             *TopConfig
	HTTPClient            *http.Client
	AccessToken           string
	SSOAccessToken        string
	SNSAccessToken        string
	SuiteAccessToken      string
	AccessTokenCache      Cache
	TicketCache           Cache
	SSOAccessTokenCache   Cache
	SNSAccessTokenCache   Cache
	SuiteAccessTokenCache Cache
	DevType               string
	Locker                *sync.Mutex
}

func NewDingTalkClient

func NewDingTalkClient(devType string, config *DTConfig) *DingTalkClient

func NewDingTalkCompanyClient

func NewDingTalkCompanyClient(config *DTConfig) *DingTalkClient

func NewDingTalkISVClient

func NewDingTalkISVClient(config *DTConfig) *DingTalkClient

func NewDingTalkMiniClient

func NewDingTalkMiniClient(config *DTConfig) *DingTalkClient

func (*DingTalkClient) CBDeleteCallback

func (dtc *DingTalkClient) CBDeleteCallback() (CBCallBackResponse, error)

删除事件回调接口

func (*DingTalkClient) CBGetFailedCallbacks

func (dtc *DingTalkClient) CBGetFailedCallbacks() (CBGetFailedCallbackResponse, error)

获取回调失败的结果

func (*DingTalkClient) CBQueryCallback

func (dtc *DingTalkClient) CBQueryCallback() (CBQueryCallbackResponse, error)

查询事件回调接口

func (*DingTalkClient) CBRegisterCallback

func (dtc *DingTalkClient) CBRegisterCallback(info *CBCallBackRequest) (CBCallBackResponse, error)

注册事件回调接口

func (*DingTalkClient) CBUpdateCallback

func (dtc *DingTalkClient) CBUpdateCallback(info *CBCallBackRequest) (CBCallBackResponse, error)

更新事件回调接口

func (*DingTalkClient) ChatCreate

func (dtc *DingTalkClient) ChatCreate(info *ChatCreateRequest) (ChatCreateResponse, error)

创建会话

func (*DingTalkClient) ChatGet

func (dtc *DingTalkClient) ChatGet(chatId string) (ChatGetResponse, error)

获取会话

func (*DingTalkClient) ChatSend

func (dtc *DingTalkClient) ChatSend(info interface{}) (ChatSendResponse, error)

发送群消息

func (*DingTalkClient) ChatUpdate

func (dtc *DingTalkClient) ChatUpdate(info *ChatUpdateRequest) (ChatUpdateResponse, error)

修改会话

func (*DingTalkClient) CspaceAdd

func (dtc *DingTalkClient) CspaceAdd(info *CspaceAddRequest) (CspaceAddResponse, error)

新增文件到用户钉盘

func (*DingTalkClient) CspaceAddToSingleChat

发送文件给指定用户

func (*DingTalkClient) CspaceGetCustomSpace

获取企业下的自定义空间

func (*DingTalkClient) CspaceGrantCustomSpace

授权用户访问企业下的自定义空间

func (*DingTalkClient) DataRecord

func (dtc *DingTalkClient) DataRecord(info *DataRequest) (DataRecordResponse, error)

记录统计数据

func (*DingTalkClient) DataUpdate

func (dtc *DingTalkClient) DataUpdate(info *DataRequest) (DataUpdateResponse, error)

更新统计数据

func (*DingTalkClient) DepartmentCreate

func (dtc *DingTalkClient) DepartmentCreate(info *DepartmentCreateRequest) (DepartmentCreateResponse, error)

创建部门

func (*DingTalkClient) DepartmentDelete

func (dtc *DingTalkClient) DepartmentDelete(id int) (DepartmentDeleteResponse, error)

删除部门

func (*DingTalkClient) DepartmentDetail

func (dtc *DingTalkClient) DepartmentDetail(id interface{}, lang interface{}) (DepartmentDetailResponse, error)

获取部门详情

func (*DingTalkClient) DepartmentListParentDepts

func (dtc *DingTalkClient) DepartmentListParentDepts(userId string) (DepartmentListParentDeptsResponse, error)

查询指定用户的所有上级父部门路径

func (*DingTalkClient) DepartmentListParentDeptsByDept

func (dtc *DingTalkClient) DepartmentListParentDeptsByDept(id int) (DepartmentListParentDeptsByDeptResponse, error)

查询部门的所有上级父部门路径

func (*DingTalkClient) DepartmentListsub added in v1.0.5

func (dtc *DingTalkClient) DepartmentListsub(param DepartmentListsubParam) (DepartmentListsubResponse, error)

获取部门列表

func (*DingTalkClient) DepartmentUpdate

func (dtc *DingTalkClient) DepartmentUpdate(info *DepartmentUpdateRequest) (DepartmentUpdateResponse, error)

更新部门

func (*DingTalkClient) FileUploadChunk

func (dtc *DingTalkClient) FileUploadChunk(info *FileUploadChunkRequest) (FileUploadChunkResponse, error)

上传文件块

func (*DingTalkClient) FileUploadEndTransaction

提交文件上传事务

func (*DingTalkClient) FileUploadSingle

func (dtc *DingTalkClient) FileUploadSingle(agentID string, fileSize int64, fileName string, reader io.Reader) (FileUploadSingleResponse, error)

上传单个文件

func (*DingTalkClient) FileUploadStartTransaction

func (dtc *DingTalkClient) FileUploadStartTransaction(agentID string, fileSize int, chunkNumbers int) (FileUploadStartTransactionResponse, error)

开启文件上传事务

func (*DingTalkClient) GetAuthScopes

func (dtc *DingTalkClient) GetAuthScopes() (ScopesResponse, error)

获取授权范围

func (*DingTalkClient) GetConfig

func (dtc *DingTalkClient) GetConfig(nonceStr string, timestamp string, url string) string

配置config信息

func (*DingTalkClient) GetJSAPITicket

func (dtc *DingTalkClient) GetJSAPITicket() (ticket string, err error)

获取Ticket

func (*DingTalkClient) IsvActivateSuite

func (dtc *DingTalkClient) IsvActivateSuite(authCorpID string, permanentCode string) (ActivateSuiteResponse, error)

激活套件

func (*DingTalkClient) IsvGetCAT

func (dtc *DingTalkClient) IsvGetCAT(tmpAuthCode string)

直接获取企业授权的凭证

func (*DingTalkClient) IsvGetCompanyInfo

func (dtc *DingTalkClient) IsvGetCompanyInfo(authCorpID string) (GetCompanyInfoResponse, error)

获取企业的基本信息

func (*DingTalkClient) IsvGetCorpAccessToken

func (dtc *DingTalkClient) IsvGetCorpAccessToken(authCorpID string, permanentCode string) (GetCorpAccessTokenResponse, error)

获取企业授权的凭证

func (*DingTalkClient) IsvGetPermanentCode

func (dtc *DingTalkClient) IsvGetPermanentCode(tmpAuthCode string) (GetPermanentCodeResponse, error)

获取企业授权的永久授权码

func (*DingTalkClient) MediaDownloadFile

func (dtc *DingTalkClient) MediaDownloadFile(mediaID string, write io.Writer) error

获取媒体文件

func (*DingTalkClient) MediaUpload

func (dtc *DingTalkClient) MediaUpload(mediaType string, fileName string, reader io.Reader) (MediaUploadResponse, error)

上传媒体文件

func (*DingTalkClient) MessageCorpconversationAsyncsend added in v1.0.10

发送工作通知

func (*DingTalkClient) MessageSendToConversation

func (dtc *DingTalkClient) MessageSendToConversation(info interface{}) (MessageSendToConversationResponse, error)

发送普通消息

func (*DingTalkClient) MicroAppCreate

func (dtc *DingTalkClient) MicroAppCreate(info *MicroAppCreateRequest) (MicroAppCreateResponse, error)

创建微应用

func (*DingTalkClient) MicroAppDelete

func (dtc *DingTalkClient) MicroAppDelete(agentId int) (MicroAppDeleteResponse, error)

删除微应用

func (*DingTalkClient) MicroAppList

func (dtc *DingTalkClient) MicroAppList() (MicroAppListResponse, error)

列出微应用

func (*DingTalkClient) MicroAppListByUserId

func (dtc *DingTalkClient) MicroAppListByUserId(userId string) (MicroAppListByUserIdResponse, error)

列出员工可见的微应用

func (*DingTalkClient) MicroAppRuleDelete

func (dtc *DingTalkClient) MicroAppRuleDelete(agentId int, ruleId int) (MicroAppRuleDeleteResponse, error)

删除规则(定向开放接口)

func (*DingTalkClient) MicroAppRuleGetRuleList

func (dtc *DingTalkClient) MicroAppRuleGetRuleList(userId string, agentId string) (MicroAppRuleGetRuleListResponse, error)

获取指定微应用下指定用户绑定的全部规则(定向开放接口)

func (*DingTalkClient) MicroAppRuleGetUserTota

func (dtc *DingTalkClient) MicroAppRuleGetUserTota(agentId int, ruleIdList []int) (MicroAppRuleGetUserTotaResponse, error)

获取规则绑定的用户数(定向开放接口)

func (*DingTalkClient) MicroAppSetVisibleScopes

设置微应用的可见范围

func (*DingTalkClient) MicroAppUpdate

func (dtc *DingTalkClient) MicroAppUpdate(info *MicroAppUpdateRequest) (MicroAppUpdateResponse, error)

更新微应用

func (*DingTalkClient) MicroAppVisibleScopes

func (dtc *DingTalkClient) MicroAppVisibleScopes(agentId int) (MicroAppVisibleScopesResponse, error)

获取企业设置的微应用可见范围

func (*DingTalkClient) RefreshCompanyAccessToken

func (dtc *DingTalkClient) RefreshCompanyAccessToken() error

刷新企业获取的access_token

func (*DingTalkClient) RefreshSNSAccessToken

func (dtc *DingTalkClient) RefreshSNSAccessToken() error

刷新 SNS access_token

func (*DingTalkClient) RefreshSSOAccessToken

func (dtc *DingTalkClient) RefreshSSOAccessToken() error

刷新企业获取的sso_access_token

func (*DingTalkClient) RefreshSuiteAccessToken

func (dtc *DingTalkClient) RefreshSuiteAccessToken() error

刷新 isv suite_access_token

func (*DingTalkClient) SNSGetPersistentCode

func (dtc *DingTalkClient) SNSGetPersistentCode(code string) (SNSGetPersistentCodeResponse, error)

func (*DingTalkClient) SNSGetSNSToken

func (dtc *DingTalkClient) SNSGetSNSToken(openID string, persistentCode string) (SNSGetSNSTokenResponse, error)

func (*DingTalkClient) SNSGetUserInfo

func (dtc *DingTalkClient) SNSGetUserInfo(snsToken string) (SNSGetUserInfoResponse, error)

func (*DingTalkClient) SSOAdminInfoByCode

func (dtc *DingTalkClient) SSOAdminInfoByCode(code string) (SSOAdminInfoByCodeResponse, error)

通过CODE换取微应用管理员的身份信息

func (*DingTalkClient) SmartworkAttendanceListRecord

考勤打卡记录开放

func (*DingTalkClient) SmartworkCheckinRecord

获得签到数据

func (*DingTalkClient) SubDepartmentList

func (dtc *DingTalkClient) SubDepartmentList(id interface{}) (SubDepartmentListResponse, error)

获取子部门Id列表

func (*DingTalkClient) TodoUsersUnionidTasks added in v1.0.10

TodoUsersUnionidTasks 新增钉钉待办任务

func (*DingTalkClient) TopCorpExtcontactCreate

func (dtc *DingTalkClient) TopCorpExtcontactCreate(info *CorpExtcontactRequest) ([]byte, error)

添加企业外部联系人

func (*DingTalkClient) TopCorpExtcontactGet

func (dtc *DingTalkClient) TopCorpExtcontactGet(userID string) ([]byte, error)

外部单个联系人详情

func (*DingTalkClient) TopCorpExtcontactList

func (dtc *DingTalkClient) TopCorpExtcontactList(size int, offset int) ([]byte, error)

获取外部联系人列表

func (*DingTalkClient) TopCorpExtcontactListlabelgroups

func (dtc *DingTalkClient) TopCorpExtcontactListlabelgroups(size int, offset int) ([]byte, error)

外部联系人标签列表

func (*DingTalkClient) TopCorpExtcontactUpdate

func (dtc *DingTalkClient) TopCorpExtcontactUpdate(info *CorpExtcontactRequest) ([]byte, error)

更新外部联系人

func (*DingTalkClient) TopCorpHealthStepinfoGetUserStatus

func (dtc *DingTalkClient) TopCorpHealthStepinfoGetUserStatus(userId string) ([]byte, error)

查询用户是否开启了钉钉运动

func (*DingTalkClient) TopCorpHealthStepinfoListByUserid

func (dtc *DingTalkClient) TopCorpHealthStepinfoListByUserid(userIds []string, statDate string) ([]byte, error)

批量查询多个用户的钉钉运动步数

func (*DingTalkClient) TopCorpMessageCorpconversationAsyncsend

func (dtc *DingTalkClient) TopCorpMessageCorpconversationAsyncsend(info *TopCorpMessageCorpconversationAsyncsendRequest) ([]byte, error)

企业会话消息异步发送

func (*DingTalkClient) TopCorpMessageCorpconversationAsyncsendbycode

func (dtc *DingTalkClient) TopCorpMessageCorpconversationAsyncsendbycode(info *TopCorpMessageCorpconversationAsyncsendbycodeRequest) ([]byte, error)

通过用户授权码异步向企业会话发送消息

func (*DingTalkClient) TopCorpMessageCorpconversationGetsendprogress

func (dtc *DingTalkClient) TopCorpMessageCorpconversationGetsendprogress(agentId int, taskId int) ([]byte, error)

获取异步发送企业会话消息的发送进度

func (*DingTalkClient) TopCorpMessageCorpconversationGetsendresult

func (dtc *DingTalkClient) TopCorpMessageCorpconversationGetsendresult(agentId interface{}, taskId interface{}) ([]byte, error)

获取异步向企业会话发送消息的结果

func (*DingTalkClient) TopCorpRoleAddRolesForemps

func (dtc *DingTalkClient) TopCorpRoleAddRolesForemps(rolelIdList []int, userIdList []string) ([]byte, error)

批量为员工增加角色信息

func (*DingTalkClient) TopCorpRoleDeleteRole

func (dtc *DingTalkClient) TopCorpRoleDeleteRole(roleId int) ([]byte, error)

删除角色信息

func (*DingTalkClient) TopCorpRoleGetRoleGroup

func (dtc *DingTalkClient) TopCorpRoleGetRoleGroup(groupId int) ([]byte, error)

获取角色组信息

func (*DingTalkClient) TopCorpRoleList

func (dtc *DingTalkClient) TopCorpRoleList(size int, offset int) ([]byte, error)

获取企业角色列表

func (*DingTalkClient) TopCorpRoleRemoveRolesForemps

func (dtc *DingTalkClient) TopCorpRoleRemoveRolesForemps(roleIdList []int, userIdList []string) ([]byte, error)

批量删除员工角的色信息

func (*DingTalkClient) TopCorpRoleSimpleList

func (dtc *DingTalkClient) TopCorpRoleSimpleList(roleId int, size int, offset int) ([]byte, error)

获取角色的员工列表

func (*DingTalkClient) TopSmartworkAttendsGetsimplegroups

func (dtc *DingTalkClient) TopSmartworkAttendsGetsimplegroups(offset int, size int) ([]byte, error)

获取考勤组列表详情

func (*DingTalkClient) TopSmartworkAttendsListschedule

func (dtc *DingTalkClient) TopSmartworkAttendsListschedule(workDate string, offset int, size int) ([]byte, error)

考勤排班信息按天全量查询接口

func (*DingTalkClient) TopSmartworkBpmsProcessCopy

func (dtc *DingTalkClient) TopSmartworkBpmsProcessCopy(info *SmartworkBpmsProcessCopyRequest) ([]byte, error)

复制审批流

func (*DingTalkClient) TopSmartworkBpmsProcessSync

func (dtc *DingTalkClient) TopSmartworkBpmsProcessSync(info *SmartworkBpmsProcessSyncRequest) ([]byte, error)

更新审批流

func (*DingTalkClient) TopSmartworkBpmsProcessinstanceCreate

func (dtc *DingTalkClient) TopSmartworkBpmsProcessinstanceCreate(info *SmartworkBpmsProcessinstanceCreateRequest) ([]byte, error)

发起审批实例

func (*DingTalkClient) TopSmartworkBpmsProcessinstanceList

func (dtc *DingTalkClient) TopSmartworkBpmsProcessinstanceList(info *SmartworkBpmsProcessinstanceListRequest) ([]byte, error)

获取审批实例列表

func (*DingTalkClient) TopSmartworkCheckinRecordGet

func (dtc *DingTalkClient) TopSmartworkCheckinRecordGet(info *SmartworkCheckinRecordGetRequest) ([]byte, error)

获取多个用户的签到记录

func (*DingTalkClient) UserAdminList

func (dtc *DingTalkClient) UserAdminList() (UserAdminListResponse, error)

获取管理员列表

func (*DingTalkClient) UserBatchDelete

func (dtc *DingTalkClient) UserBatchDelete(userIdList []string) (UserBatchDeleteResponse, error)

批量删除成员

func (*DingTalkClient) UserCanAccessMicroapp

func (dtc *DingTalkClient) UserCanAccessMicroapp(appID string, userID string) (UserCanAccessMicroappResponse, error)

获取管理员的微应用管理权限

func (*DingTalkClient) UserCreate

func (dtc *DingTalkClient) UserCreate(info *UserCreateRequest) (UserCreateResponse, error)

创建成员

func (*DingTalkClient) UserDelete

func (dtc *DingTalkClient) UserDelete(userID string) (UserDeleteResponse, error)

删除成员

func (*DingTalkClient) UserGetOrgUserCount

func (dtc *DingTalkClient) UserGetOrgUserCount(onlyActive int) (UserGetOrgUserCountResponse, error)

获取企业员工人数

func (*DingTalkClient) UserIdByCode

func (dtc *DingTalkClient) UserIdByCode(code string) (UserIdResponse, error)

通过Code换取userid

func (*DingTalkClient) UserIdByUnionId

func (dtc *DingTalkClient) UserIdByUnionId(unionID string) (UserIdByUnionIdResponse, error)

通过UnionId获取UserId

func (*DingTalkClient) UserInfoByUserId

func (dtc *DingTalkClient) UserInfoByUserId(userID string, lang string, isvGetCompanyInfo *DTIsvGetCompanyInfo) (UserInfoResponse, error)

通过userid 换取 用户详细信息

func (*DingTalkClient) UserList

func (dtc *DingTalkClient) UserList(param UserListParam) (UserListResponse, error)

获取部门成员(详情版)

func (*DingTalkClient) UserSimpleList

func (dtc *DingTalkClient) UserSimpleList(departmentID int) (UserSimpleListResponse, error)

获取部门成员(简化版)

func (*DingTalkClient) UserUpdate

func (dtc *DingTalkClient) UserUpdate(info *UserUpdateRequest) (UserUpdateResponse, error)

更新成员

type DingTalkCrypto

type DingTalkCrypto struct {
	Token          string
	EncodingAESKey string
	SuiteKey       string
	BKey           []byte
	Block          cipher.Block
}

func NewDingTalkCrypto

func NewDingTalkCrypto(token, encodingAESKey, suiteKey string) *DingTalkCrypto

func (*DingTalkCrypto) CreateSignature

func (c *DingTalkCrypto) CreateSignature(token, timestamp, nonce, msg string) string

数据签名

func (*DingTalkCrypto) GetDecryptMsg

func (c *DingTalkCrypto) GetDecryptMsg(signature, timestamp, nonce, secretMsg string) (string, error)

func (*DingTalkCrypto) GetEncryptMsg

func (c *DingTalkCrypto) GetEncryptMsg(msg, timestamp, nonce string) (string, string, error)

func (*DingTalkCrypto) VerificationSignature

func (c *DingTalkCrypto) VerificationSignature(token, timestamp, nonce, msg, sigture string) bool

验证数据签名

type Expirable

type Expirable interface {
	CreatedAt() int64
	ExpiresIn() int
}

type FailedCallbacks

type FailedCallbacks struct {
	EventTime   int      `json:"event_time"`
	CallbackTag string   `json:"call_back_tag"`
	UserID      []string `json:"userid"`
	CorpID      string   `json:"corpid"`
}

type FileCache

type FileCache struct {
	Path string
}

func NewFileCache

func NewFileCache(path string) *FileCache

func (*FileCache) Get

func (f *FileCache) Get(data Expirable) error

func (*FileCache) Set

func (f *FileCache) Set(data Expirable) error

type FileUploadChunkRequest

type FileUploadChunkRequest struct {
	AgentID       string
	UploadID      string
	ChunkSequence int64
	FileName      string
	Reader        io.Reader
}

type FileUploadChunkResponse

type FileUploadChunkResponse struct {
	OpenAPIResponse
}

type FileUploadEndTransactionRequest

type FileUploadEndTransactionRequest struct {
	AgentID      string
	FileSize     int64
	ChunkNumbers int64
	UploadDI     string
}

type FileUploadEndTransactionResponse

type FileUploadEndTransactionResponse struct {
	OpenAPIResponse
	MediaID string `json:"media_id"`
}

type FileUploadSingleResponse

type FileUploadSingleResponse struct {
	OpenAPIResponse
	MediaID string `json:"media_id"`
}

type FileUploadStartTransactionResponse

type FileUploadStartTransactionResponse struct {
	OpenAPIResponse
	UploadID string `json:"upload_id"`
}

type GCIRAuthCorpInfo

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

type GCIRAuthUserInfo

type GCIRAuthUserInfo struct {
	UserID string `json:"userId"`
}

type GetCompanyInfoResponse

type GetCompanyInfoResponse struct {
	OpenAPIResponse
	AuthCorpInfo    GCIRAuthCorpInfo `json:"auth_corp_info"`
	AuthUserInfo    GCIRAuthUserInfo `json:"auth_user_info"`
	AuthInfo        interface{}      `json:"auth_info"`
	ChannelAuthInfo interface{}      `json:"channel_auth_info"`
}

type GetCorpAccessTokenResponse

type GetCorpAccessTokenResponse struct {
	OpenAPIResponse
	AccessToken string `json:"access_token"`
	Expires     int    `json:"expires_in"`
}

type GetPermanentCodeResponse

type GetPermanentCodeResponse struct {
	OpenAPIResponse
	PermanentCode   string       `json:"permanent_code"`
	ChPermanentCode string       `json:"ch_permanent_code"`
	AuthCorpInfo    AuthCorpInfo `json:"auth_corp_info"`
}

type MALBUIAppList

type MALBUIAppList struct {
	AppIcon       string `json:"appIcon"`
	AgentId       int    `json:"agentId"`
	AppDesc       string `json:"appDesc"`
	IsSelf        bool   `json:"isSelf"`
	Name          string `json:"name"`
	HomePageUrl   string `json:"homepageUrl"`
	PcHomePageUrl string `json:"pcHomepageUrl"`
	AppStatus     int    `json:"appStatus"`
	OmpLink       string `json:"ompLink"`
}

type MediaDownloadFileResponse

type MediaDownloadFileResponse struct {
	OpenAPIResponse
	MediaID string
	Writer  io.Writer
}

type MediaUploadResponse

type MediaUploadResponse struct {
	OpenAPIResponse
	Type      string
	MediaID   string `json:"media_id"`
	CreatedAt int64  `json:"created_at"`
}

type MessageCorpconversationAsyncsendParam added in v1.0.10

type MessageCorpconversationAsyncsendParam struct {
	AgentId    string `json:"agent_id"`
	UseridList string `json:"userid_list,omitempty"`
	DeptIdList string `json:"dept_id_list,omitempty"`
	ToAllUser  bool   `json:"to_all_user,omitempty"`
	Msg        string `json:"msg"`
}

type MessageCorpconversationAsyncsendResponse added in v1.0.10

type MessageCorpconversationAsyncsendResponse struct {
	OpenAPIResponse
	TaskId int64 `json:"task_id"`
}

type MessageSendActionCard

type MessageSendActionCard struct {
	Title          string      `json:"title"`
	Markdown       string      `json:"markdown"`
	SingleTitle    string      `json:"single_title,omitempty"`
	SingleUrl      string      `json:"single_url,omitempty"`
	BtnOrientation string      `json:"btn_orientation,omitempty"`
	BtnJSONList    interface{} `json:"btn_json_list,omitempty"`
	AgentId        string      `json:"agentid,omitempty"`
}

type MessageSendActionCardRequest

type MessageSendActionCardRequest struct {
	MessageSendRequest
	ActionCard *MessageSendActionCard `json:"action_card"`
}

type MessageSendFile

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

type MessageSendFileRequest

type MessageSendFileRequest struct {
	MessageSendRequest
	File *MessageSendFile `json:"file"`
}

type MessageSendImage

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

type MessageSendImageRequest

type MessageSendImageRequest struct {
	MessageSendRequest
	Image *MessageSendImage `json:"image"`
}
type MessageSendLink struct {
	Title      string `json:"title"`
	Text       string `json:"text"`
	PicUrl     string `json:"pic_url"`
	MessageUrl string `json:"message_url"`
}

type MessageSendLinkRequest

type MessageSendLinkRequest struct {
	MessageSendRequest
	Link *MessageSendLink `json:"link"`
}

type MessageSendMarkdown

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

type MessageSendMarkdownRequest

type MessageSendMarkdownRequest struct {
	MessageSendRequest
	Markdown *MessageSendMarkdown `json:"markdown"`
}

type MessageSendOA

type MessageSendOA struct {
	MessageUrl   string      `json:"message_url"`
	PcMessageUrl string      `json:"pc_message_url,omitempty"`
	Head         interface{} `json:"head"`
	Body         interface{} `json:"body"`
}

type MessageSendOARequest

type MessageSendOARequest struct {
	MessageSendRequest
	Oa *MessageSendOA `json:"oa"`
}

type MessageSendRequest

type MessageSendRequest struct {
	Sender  string `json:"sender"`
	Cid     string `json:"cid"`
	MsgType string `json:"msgtype"`
}

type MessageSendText

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

type MessageSendTextRequest

type MessageSendTextRequest struct {
	MessageSendRequest
	Text *MessageSendText `json:"text"`
}

type MessageSendToConversationResponse

type MessageSendToConversationResponse struct {
	OpenAPIResponse
	Receiver string
}

type MessageSendVoice

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

type MessageSendVoiceRequest

type MessageSendVoiceRequest struct {
	MessageSendRequest
	Voice *MessageSendVoice `json:"voice"`
}

type MicroAppCreateRequest

type MicroAppCreateRequest struct {
	AppIcon       string `json:"appIcon"`
	AppName       string `json:"appName"`
	AppDesc       string `json:"appDesc"`
	HomePageUrl   string `json:"homepageUrl"`
	PcHomePageUrl string `json:"pcHomepageUrl,omitempty"`
	OmpLink       string `json:"ompLink,omitempty"`
}

type MicroAppCreateResponse

type MicroAppCreateResponse struct {
	OpenAPIResponse
	AgentId int `json:"agentId"`
}

type MicroAppDeleteResponse

type MicroAppDeleteResponse struct {
	OpenAPIResponse
}

type MicroAppListByUserIdResponse

type MicroAppListByUserIdResponse struct {
	OpenAPIResponse
	AppList []MALBUIAppList
}

type MicroAppListResponse

type MicroAppListResponse struct {
	OpenAPIResponse
	AppList []MALBUIAppList
}

type MicroAppRGUTResult

type MicroAppRGUTResult struct {
	RuleId    int
	UserTotal int
}

type MicroAppRuleDeleteResponse

type MicroAppRuleDeleteResponse struct {
	OpenAPIResponse
}

type MicroAppRuleGetRuleListResponse

type MicroAppRuleGetRuleListResponse struct {
	OpenAPIResponse
	RuleIdList []int `json:"ruleIdList"`
}

type MicroAppRuleGetUserTotaResponse

type MicroAppRuleGetUserTotaResponse struct {
	OpenAPIResponse
	Result []MicroAppRGUTResult
}

type MicroAppSetVisibleScopesRequest

type MicroAppSetVisibleScopesRequest struct {
	AgentId           int      `json:"agentId"`
	IsHiddent         bool     `json:"isHiddent,omitempty"`
	DeptVisibleScopes []int    `json:"deptVisibleScopes,omitempty"`
	UserVisibleScopes []string `json:"userVisibleScopes,omitempty"`
}

type MicroAppSetVisibleScopesResponse

type MicroAppSetVisibleScopesResponse struct {
	OpenAPIResponse
}

type MicroAppUpdateRequest

type MicroAppUpdateRequest struct {
	AppIcon       string `json:"appIcon,omitempty"`
	AppName       string `json:"appName,omitempty"`
	AppDesc       string `json:"appDesc,omitempty"`
	HomePageUrl   string `json:"homepageUrl,omitempty"`
	PcHomePageUrl string `json:"pcHomepageUrl,omitempty"`
	OmpLink       string `json:"ompLink,omitempty"`
	AgentId       int    `json:"agentId"`
}

type MicroAppUpdateResponse

type MicroAppUpdateResponse struct {
	OpenAPIResponse
	AgentId int `json:"agentId"`
}

type MicroAppVisibleScopesResponse

type MicroAppVisibleScopesResponse struct {
	OpenAPIResponse
	IsHidden          bool     `json:"isHidden"`
	DeptVisibleScopes []int    `json:"deptVisibleScopes"`
	UserVisibleScopes []string `json:"userVisibleScopes"`
}

type OpenAPIResponse

type OpenAPIResponse struct {
	RequestId string `json:"request_id"`
	ErrCode   int    `json:"errcode"`
	ErrMsg    string `json:"errmsg"`
}

type Roles

type Roles struct {
	ID        int `json:"id"`
	Name      string
	GroupName string
}

type SNSAccessTokenResponse

type SNSAccessTokenResponse struct {
	OpenAPIResponse
	SNSAccessToken string `json:"access_token"`
	Expires        int    `json:"expires_in"`
	Created        int64
}

func (*SNSAccessTokenResponse) CreatedAt

func (e *SNSAccessTokenResponse) CreatedAt() int64

func (*SNSAccessTokenResponse) ExpiresIn

func (e *SNSAccessTokenResponse) ExpiresIn() int

type SNSGetPersistentCodeResponse

type SNSGetPersistentCodeResponse struct {
	OpenAPIResponse
	OpenID         string `json:"openid"`
	PersistentCode string `json:"persistent_code"`
	UnionID        string `json:"unionid"`
}

type SNSGetSNSTokenResponse

type SNSGetSNSTokenResponse struct {
	OpenAPIResponse
	Expires  int    `json:"expires_in"`
	SnsToken string `json:"sns_token"`
}

type SNSGetUserInfo

type SNSGetUserInfo struct {
	MaskedMobile string
	Nick         string
	OpenID       string
	UnionID      string
	DingID       string
}

type SNSGetUserInfoResponse

type SNSGetUserInfoResponse struct {
	OpenAPIResponse
	UserInfo SNSGetUserInfo `json:"user_info"`
}

type SSOAccessTokenResponse

type SSOAccessTokenResponse struct {
	OpenAPIResponse
	SSOAccessToken string `json:"access_token"`
	Expires        int    `json:"expires_in"`
	Created        int64
}

func (*SSOAccessTokenResponse) CreatedAt

func (e *SSOAccessTokenResponse) CreatedAt() int64

func (*SSOAccessTokenResponse) ExpiresIn

func (e *SSOAccessTokenResponse) ExpiresIn() int

type SSOAdminInfoByCodeResponse

type SSOAdminInfoByCodeResponse struct {
	OpenAPIResponse
	CorpInfo SSOCorpInfo `json:"corp_info"`
	IsSys    bool        `json:"is_sys"`
}

type SSOCorpInfo

type SSOCorpInfo struct {
	CorpName string `json:"corp_name"`
	CorpID   string `json:"corpid"`
}

type SSOUserInfo

type SSOUserInfo struct {
	Avatar string
	Email  string
	Name   string
	UserID string `json:"userid"`
}

type ScopesResponse

type ScopesResponse struct {
	OpenAPIResponse
	AuthUserField  []string
	ConditionField []string
	AuthOrgScopes
}

type SmartworkALRRecordResult

type SmartworkALRRecordResult struct {
	GmtModified    int64   `json:"gmtModified"`
	IsLegal        string  `json:"isLegal"`
	BaseCheckTime  int64   `json:"baseCheckTime"`
	ID             int64   `json:"id"`
	UserAddress    string  `json:"userAddress"`
	UserID         string  `json:"userId"`
	CheckType      string  `json:"checkType"`
	TimeResult     string  `json:"timeResult"`
	DeviceID       string  `json:"deviceId"`
	CorpID         string  `json:"corpId"`
	SourceType     string  `json:"sourceType"`
	WorkDate       int64   `json:"workDate"`
	PlanCheckTime  int64   `json:"planCheckTime"`
	GmtCreate      int64   `json:"gmtCreate"`
	LocationMethod string  `json:"locationMethod"`
	LocationResult string  `json:"locationResult"`
	UserLongitude  float64 `json:"userLongitude"`
	PlanID         int64   `json:"planId"`
	GroupID        int64   `json:"groupId"`
	UserAccuracy   int     `json:"userAccuracy"`
	UserCheckTime  int64   `json:"userCheckTime"`
	UserLatitude   float64 `json:"userLatitude"`
	ProcInstId     string  `json:"procInstId"`
}

type SmartworkAttendanceListRecordRequest

type SmartworkAttendanceListRecordRequest struct {
	UserIds       []string `json:"userIds"`
	CheckDateFrom string   `json:"checkDateFrom"`
	CheckDateTo   string   `json:"checkDateTo"`
}

type SmartworkAttendanceListRecordResponse

type SmartworkAttendanceListRecordResponse struct {
	OpenAPIResponse
	RecordResult []SmartworkALRRecordResult `json:"recordresult"`
}

type SmartworkBpmsProcessCopyRequest

type SmartworkBpmsProcessCopyRequest struct {
	AgentID       int64  `json:"agent_id"`
	ProcessCode   string `json:"process_code"`
	BizCategoryID string `json:"biz_category_id"`
	ProcessName   string `json:"process_name"`
	Description   string `json:"description"`
}

type SmartworkBpmsProcessSyncRequest

type SmartworkBpmsProcessSyncRequest struct {
	AgentID           int64  `json:"agent_id"`
	SrcProcessCode    string `json:"src_process_code"`
	TargetProcessCode string `json:"target_process_code"`
	BizCategoryID     string `json:"biz_category_id"`
	ProcessName       string `json:"process_name"`
}

type SmartworkBpmsProcessinstanceCreateRequest

type SmartworkBpmsProcessinstanceCreateRequest struct {
	AgentID              int64               `json:"agent_id"`
	ProcessCode          string              `json:"process_code"`
	OriginatorUserID     string              `json:"originator_user_id"`
	DeptID               int                 `json:"dept_id"`
	Approvers            []string            `json:"approvers"`
	CCList               []string            `json:"cc_list"`
	CCPosition           []string            `json:"cc_position"`
	FormComponentValueVo []map[string]string `json:"form_component_values"`
}

type SmartworkBpmsProcessinstanceListRequest

type SmartworkBpmsProcessinstanceListRequest struct {
	ProcessCode string   `json:"process_code"`
	StartTime   int64    `json:"start_time"`
	EndTime     int64    `json:"end_time"`
	Size        int      `json:"size"`
	Cursor      int      `json:"cursor"`
	UserIDList  []string `json:"userid_list"`
}

type SmartworkCheckinRecordData

type SmartworkCheckinRecordData struct {
	Name        string   `json:"name"`
	UserID      string   `json:"userId"`
	Timestamp   int64    `json:"timestamp"`
	Avatar      string   `json:"avatar"`
	Place       string   `json:"place"`
	DetailPlace string   `json:"detailPlace"`
	Remark      string   `json:"remark"`
	Latitude    float64  `json:"latitude"`
	Longitude   float64  `json:"longitude"`
	ImageList   []string `json:"imageList"`
}

type SmartworkCheckinRecordGetRequest

type SmartworkCheckinRecordGetRequest struct {
	UserIDList []string `json:"userid_list"`
	StartTime  int64    `json:"start_time"`
	EndTime    int64    `json:"end_time"`
	Cursor     int      `json:"cursor"`
	Size       int      `json:"size"`
}

type SmartworkCheckinRecordRequest

type SmartworkCheckinRecordRequest struct {
	DepartmentID string
	StartTime    int64
	EndTime      int64
	Offset       int
	Size         int
	Order        string
}

type SmartworkCheckinRecordResponse

type SmartworkCheckinRecordResponse struct {
	OpenAPIResponse
	Data []SmartworkCheckinRecordData `json:"data"`
}

type SubDepartmentListResponse

type SubDepartmentListResponse struct {
	OpenAPIResponse
	SubDeptIdList []int
}

type SuiteAccessTokenResponse

type SuiteAccessTokenResponse struct {
	OpenAPIResponse
	SuiteAccessToken string `json:"suite_access_token"`
	Expires          int    `json:"expires_in"`
	Created          int64
}

func (*SuiteAccessTokenResponse) CreatedAt

func (e *SuiteAccessTokenResponse) CreatedAt() int64

func (*SuiteAccessTokenResponse) ExpiresIn

func (e *SuiteAccessTokenResponse) ExpiresIn() int

type TicketResponse

type TicketResponse struct {
	OpenAPIResponse
	Ticket  string `json:"ticket"`
	Expires int    `json:"expires_in"`
	Created int64
}

func (*TicketResponse) CreatedAt

func (e *TicketResponse) CreatedAt() int64

func (*TicketResponse) ExpiresIn

func (e *TicketResponse) ExpiresIn() int

type TodoUsersUnionidTasksDetailUrlParam added in v1.0.10

type TodoUsersUnionidTasksDetailUrlParam struct {
	AppUrl string `json:"appUrl,omitempty"`
	PcUrl  string `json:"pcUrl,omitempty"`
}

type TodoUsersUnionidTasksNotifyConfigsParam added in v1.0.10

type TodoUsersUnionidTasksNotifyConfigsParam struct {
	DingNotify string `json:"dingNotify,omitempty"`
}

type TodoUsersUnionidTasksParam added in v1.0.10

type TodoUsersUnionidTasksParam struct {
	UnionId            string                                   `json:"-"`
	OperatorId         string                                   `json:"-"`
	SourceId           string                                   `json:"sourceId,omitempty"`
	Subject            string                                   `json:"subject"`
	CreatorId          string                                   `json:"creatorId"`
	Description        string                                   `json:"description,omitempty"`
	DueTime            int64                                    `json:"dueTime,omitempty"`
	ExecutorIds        string                                   `json:"executorIds,omitempty"`
	ParticipantIds     string                                   `json:"participantIds,omitempty"`
	DetailUrl          *TodoUsersUnionidTasksDetailUrlParam     `json:"detailUrl,omitempty"`
	IsOnlyShowExecutor bool                                     `json:"isOnlyShowExecutor,omitempty"`
	Priority           int64                                    `json:"priority,omitempty"`
	NotifyConfigs      *TodoUsersUnionidTasksNotifyConfigsParam `json:"notifyConfigs,omitempty"`
}

type TodoUsersUnionidTasksResponse added in v1.0.10

type TodoUsersUnionidTasksResponse struct {
	CreatedTime    int64    `json:"createdTime"`
	CreatorID      string   `json:"creatorId"`
	Done           bool     `json:"done"`
	DueTime        int64    `json:"dueTime"`
	ExecutorIds    []string `json:"executorIds"`
	ID             string   `json:"id"`
	ModifiedTime   int64    `json:"modifiedTime"`
	ParticipantIds []string `json:"participantIds"`
	Priority       int64    `json:"priority"`
	RequestID      string   `json:"requestId"`
	Source         string   `json:"source"`
	StartTime      int64    `json:"startTime"`
	Subject        string   `json:"subject"`
}

type TopCHSGUSResponse

type TopCHSGUSResponse struct {
	Result    TopCHSGUSResult
	RequestId string `json:"request_id"`
}

type TopCHSGUSResult

type TopCHSGUSResult struct {
	DingOpenErrCode int    `json:"ding_open_errcode"`
	ErrorMsg        string `json:"error_msg"`
	Success         bool
	Status          bool
}

type TopCHSLBUResponse

type TopCHSLBUResponse struct {
	Result    TopCHSLBUResult
	RequestId string `json:"request_id"`
}

type TopCHSLBUResult

type TopCHSLBUResult struct {
	DingOpenErrCode int    `json:"ding_open_errcode"`
	ErrorMsg        string `json:"error_msg"`
	Success         bool
	StepInfoList    interface{} `json:"stepinfo_list"`
}

type TopCMCACodeResponse

type TopCMCACodeResponse struct {
	Result TopCMCACodeResult
}

type TopCMCACodeResult

type TopCMCACodeResult struct {
	DingOpenErrCode int    `json:"ding_open_errcode"`
	ErrorMsg        string `json:"error_msg"`
	Success         bool
	TaskId          int `json:"task_id"`
}

type TopCMCAResponse

type TopCMCAResponse struct {
	Result    TopCMCAResult
	RequestId string `json:"request_id"`
}

type TopCMCAResult

type TopCMCAResult struct {
	DingOpenErrCode int    `json:"ding_open_errcode"`
	ErrorMsg        string `json:"error_msg"`
	Success         bool
	TaskId          int `json:"task_id"`
}

type TopCMCGRProgress

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

type TopCMCGRResponse

type TopCMCGRResponse struct {
	Result TopCMCGRResult
}

type TopCMCGRResult

type TopCMCGRResult struct {
	DingOpenErrCode int    `json:"ding_open_errcode"`
	ErrorMsg        string `json:"error_msg"`
	Success         bool
	Progress        TopCMCGRProgress `json:"progress"`
}

type TopCMCGResponse

type TopCMCGResponse struct {
	Result TopCMCGRResult
}

type TopCMCGResult

type TopCMCGResult struct {
	DingOpenErrCode int    `json:"ding_open_errcode"`
	ErrorMsg        string `json:"error_msg"`
	Success         bool
	SendResult      interface{} `json:"send_result"`
}

type TopCRSLResponse

type TopCRSLResponse struct {
	Result    TopCRSLResult
	RequestId string `json:"request_id"`
}

type TopCRSLResult

type TopCRSLResult struct {
	HasMore bool `json:"has_more"`
	List    interface{}
}

type TopConfig

type TopConfig struct {
	TopFormat     string // json xml byte
	TopV          string
	TopSimplify   bool
	TopSecret     string
	TopSignMethod string
}

type TopCorpHealthStepinfoGetUserStatusResponse

type TopCorpHealthStepinfoGetUserStatusResponse struct {
	ErrorResponse                                   TopErrorResponse  `json:"error_response"`
	DingTalkCorpHealthStepinfoGetuserstatusResponse TopCHSGUSResponse `json:"dingtalk_corp_health_stepinfo_getuserstatus_response"`
}

type TopCorpHealthStepinfoListByUseridResponse

type TopCorpHealthStepinfoListByUseridResponse struct {
	ErrorResponse                                  TopErrorResponse  `json:"error_response"`
	DingtalkCorpHealthStepinfoListByUseridResponse TopCHSLBUResponse `json:"dingtalk_corp_health_stepinfo_listbyuserid_response"`
}

type TopCorpMessageCorpconversationAsyncsendRequest

type TopCorpMessageCorpconversationAsyncsendRequest struct {
	MsgType    string
	AgentId    int
	UserIdList []string
	DeptIdList []int
	ToAllUser  bool
	Msgcontent interface{}
}

type TopCorpMessageCorpconversationAsyncsendResponse

type TopCorpMessageCorpconversationAsyncsendResponse struct {
	ErrorResponse                                        TopErrorResponse `json:"error_response"`
	DingtalkCorpMessageCorpconversationAsyncsendResponse TopCMCAResponse  `json:"dingtalk_corp_message_corpconversation_asyncsend_response"`
}

type TopCorpMessageCorpconversationAsyncsendbycodeRequest

type TopCorpMessageCorpconversationAsyncsendbycodeRequest struct {
	MsgType    string
	AgentId    int
	UserIdList []string
	DeptIdList []int
	ToAllUser  bool
	Msgcontent interface{}
	Code       string
}

type TopCorpMessageCorpconversationAsyncsendbycodeResponse

type TopCorpMessageCorpconversationAsyncsendbycodeResponse struct {
	ErrorResponse                                              TopErrorResponse    `json:"error_response"`
	DingtalkCorpMessageCorpconversationAsyncsendbycodeResponse TopCMCACodeResponse `json:"dingtalk_corp_message_corpconversation_asyncsendbycode_response"`
}

type TopCorpMessageCorpconversationGetsendprogressResponse

type TopCorpMessageCorpconversationGetsendprogressResponse struct {
	ErrorResponse                                              TopErrorResponse `json:"error_response"`
	DingtalkCorpMessageCorpconversationGetsendprogressResponse TopCMCGRResponse `json:"dingtalk_corp_message_corpconversation_getsendprogress_response"`
}

type TopCorpMessageCorpconversationGetsendresultResponse

type TopCorpMessageCorpconversationGetsendresultResponse struct {
	ErrorResponse                                            TopErrorResponse `json:"error_response"`
	DingtalkCorpMessageCorpconversationGetsendresultResponse TopCMCGResponse  `json:"dingtalk_corp_message_corpconversation_getsendresult_response"`
}

type TopCorpRoleSimpleListResponse

type TopCorpRoleSimpleListResponse struct {
	ErrorResponse                      TopErrorResponse `json:"error_response"`
	DingtalkCorpRoleSimpleListResponse TopCRSLResponse  `json:"dingtalk_corp_role_simplelist_response"`
}

type TopErrorResponse

type TopErrorResponse struct {
	SubMsg  string `json:"sub_msg"`
	Code    int    `json:"code"`
	SubCode string `json:"sub_code"`
	Msg     string `json:"msg"`
}

type TopMapRequest

type TopMapRequest map[string]interface{}

type UDetailedList

type UDetailedList struct {
	UserID               string  `json:"userid"`
	UnionID              string  `json:"unionid"`
	Name                 string  `json:"name"`
	Avatar               string  `json:"avatar"`
	StateCode            string  `json:"state_code"`
	Mobile               string  `json:"mobile"`
	HideMobile           bool    `json:"hide_mobile"`
	Telephone            string  `json:"telephone"`
	JobNumber            string  `json:"job_number"`
	Title                string  `json:"title"`
	Email                string  `json:"email"`
	OrgEmail             string  `json:"org_email"`
	WorkPlace            string  `json:"work_place"`
	Remark               string  `json:"remark"`
	DeptIdList           []int64 `json:"dept_id_list"`
	DeptOrder            int64   `json:"dept_order"`
	Extension            string  `json:"extension"`
	HiredDate            int64   `json:"hired_date"`
	Active               bool    `json:"active"`
	Admin                bool    `json:"admin"`
	Boss                 bool    `json:"boss"`
	Leader               bool    `json:"leader"`
	ExclusiveAccount     bool    `json:"exclusive_account"`
	LoginID              string  `json:"login_id"`
	ExclusiveAccountType string  `json:"exclusive_account_type"`
	Nickname             string  `json:"nickname"`
}

type USimpleList

type USimpleList struct {
	UserID string
	Name   string
}

type Unmarshallable

type Unmarshallable interface {
	// contains filtered or unexported methods
}

type UserAdminListResponse

type UserAdminListResponse struct {
	OpenAPIResponse
	AdminList []Admins
}

type UserBatchDeleteResponse

type UserBatchDeleteResponse struct {
	OpenAPIResponse
}

type UserCanAccessMicroappResponse

type UserCanAccessMicroappResponse struct {
	OpenAPIResponse
	CanAccess bool
}

type UserCreateRequest

type UserCreateRequest struct {
	UserID       string      `json:"userid,omitempty"`
	Name         string      `json:"name"`
	OrderInDepts string      `json:"orderInDepts,omitempty"`
	Department   []int       `json:"department"`
	Position     string      `json:"position,omitempty"`
	Mobile       string      `json:"mobile"`
	Tel          string      `json:"tel,omitempty"`
	WorkPlace    string      `json:"workPlace,omitempty"`
	Remark       string      `json:"remark,omitempty"`
	Email        string      `json:"email,omitempty"`
	OrgEmail     string      `json:"orgEmail,omitempty"`
	JobNumber    string      `json:"jobnumber,omitempty"`
	IsHide       bool        `json:"isHide,omitempty"`
	IsSenior     bool        `json:"isSenior,omitempty"`
	Extattr      interface{} `json:"extattr,omitempty"`
}

type UserCreateResponse

type UserCreateResponse struct {
	OpenAPIResponse
	UserID string
}

type UserDeleteResponse

type UserDeleteResponse struct {
	OpenAPIResponse
}

type UserGetOrgUserCountResponse

type UserGetOrgUserCountResponse struct {
	OpenAPIResponse
	Count int
}

type UserIdByUnionIdResponse

type UserIdByUnionIdResponse struct {
	OpenAPIResponse
	UserID      string `json:"userid"`
	ContactType int    `json:"contactType"`
}

type UserIdResponse

type UserIdResponse struct {
	OpenAPIResponse
	UserID   string `json:"userid"`
	DeviceID string `json:"deviceId"`
	IsSys    bool   `json:"is_sys"`
	SysLevel int    `json:"sys_level"`
}

type UserInfoResponse

type UserInfoResponse struct {
	OpenAPIResponse
	UserID          string `json:"userid"`
	OpenID          string `json:"openid"`
	Name            string
	Tel             string
	WorkPlace       string
	Remark          string
	Mobile          string
	Email           string
	OrgEmail        string
	Active          bool
	IsAdmin         bool
	IsBoos          bool
	DingID          string
	UnionID         string
	IsHide          bool
	Department      []int
	Position        string
	Avatar          string
	Jobnumber       string
	IsSenior        bool
	StateCode       string
	OrderInDepts    string
	IsLeaderInDepts string
	Extattr         interface{}
	Roles           []Roles
}

type UserListParam

type UserListParam struct {
	DeptID             int64  `json:"dept_id"`
	Cursor             int64  `json:"cursor"`
	Size               int64  `json:"size"`
	OrderField         string `json:"order_field"`
	ContainAccessLimit bool   `json:"contain_access_limit"`
	Language           string `json:"language"`
}

type UserListResponse

type UserListResponse struct {
	OpenAPIResponse
	Result UserListResult `json:"result"`
}

type UserListResult added in v1.0.8

type UserListResult struct {
	HasMore    bool            `json:"has_more"`
	NextCursor int64           `json:"next_cursor"`
	List       []UDetailedList `json:"list"`
}

type UserSimpleListResponse

type UserSimpleListResponse struct {
	OpenAPIResponse
	HasMore  bool
	UserList []USimpleList
}

type UserUpdateRequest

type UserUpdateRequest struct {
	Lang         string      `json:"lang,omitempty"`
	UserID       string      `json:"userid"`
	Name         string      `json:"name"`
	OrderInDepts string      `json:"orderInDepts,omitempty"`
	Department   []int       `json:"department,omitempty"`
	Position     string      `json:"position,omitempty"`
	Mobile       string      `json:"mobile,omitempty"`
	Tel          string      `json:"tel,omitempty"`
	WorkPlace    string      `json:"workPlace,omitempty"`
	Remark       string      `json:"remark,omitempty"`
	Email        string      `json:"email,omitempty"`
	OrgEmail     string      `json:"orgEmail,omitempty"`
	JobNumber    string      `json:"jobnumber,omitempty"`
	IsHide       bool        `json:"isHide,omitempty"`
	IsSenior     bool        `json:"isSenior,omitempty"`
	Extattr      interface{} `json:"extattr,omitempty"`
}

type UserUpdateResponse

type UserUpdateResponse struct {
	OpenAPIResponse
}

Jump to

Keyboard shortcuts

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