event

package
v3.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BpmInstanceChange

type BpmInstanceChange struct {
	Event

	ProcessInstanceId string `json:"processInstanceId"`

	FinishTime int `json:"finishTime"`

	BusinessId string `json:"businessId"`

	Title string `json:"title"`

	Type string `json:"type"`

	Url string `json:"url"`

	Result string `json:"result"`

	CreateTime int `json:"createTime"`

	ProcessCode string `json:"processCode"`

	BizCategoryId string `json:"bizCategoryId"`

	StaffId string `json:"staffId"`
}

BpmInstanceChange 审批实例开始,结束

{
   "processInstanceId": "60406628-b642-4740-81e7-68cc67ebaa45",
   "finishTime": 1640683876000,
   "corpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "bpms_instance_change",
   "businessId": "202112281713000090163",
   "title": "赵云提交的审批任务",
   "type": "finish",
   "url": "https://aflow.dingtalk.com/dingtalk/mobile/hom",
   "result": "agree",
   "createTime": 1640682789000,
   "processCode": "PROC-5CB63684-096E-40DD-B326-CF60691C507A",
   "bizCategoryId": "",
   "staffId": "manager164"
}

type BpmTaskChange

type BpmTaskChange struct {
	Event

	ProcessInstanceId string `json:"processInstanceId"`

	FinishTime int `json:"finishTime"`

	BusinessId string `json:"businessId"`

	Title string `json:"title"`

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

	Type string `json:"type"`

	Result string `json:"result"`

	CreateTime int `json:"createTime"`

	ProcessCode string `json:"processCode"`

	BizCategoryId string `json:"bizCategoryId"`

	StaffId string `json:"staffId"`

	TaskId int `json:"taskId"`
}

BpmTaskChange 审批任务开始,结束,转交

{
   "processInstanceId": "60406628-b642-4740-81e7-68cc67ebaa45",
   "corpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "bpms_task_change",
   "businessId": "202112281713000090163",
   "title": "赵云提交的审批任务",
   "type": "start",
   "createTime": 1640682790000,
   "processCode": "PROC-5CB63684-096E-40DD-B326-CF60691C507A",
   "bizCategoryId": "",
   "staffId": "manager164",
   "taskId": 72062030325
}

type ChatAddMember

type ChatAddMember struct {
	ChatRemoveMember
}

ChatAddMember 群添加人员

{
   "Operator": "manager164",
   "OpenConversationId": "cidOuTaLz7/D7zkkM/5PlrQQA==",
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "chat_add_member",
   "UserId": [
       "16399780922588973",
       "011505184066774889"
   ],
   "UnionId": [
       "iSjYiSU5816QIIG0p3h4iP2UQiEiE",
       "oiiRiSE5704kGgOZEHGGYmcQiEiE"
   ],
   "OperatorUnionId": "ABNiSWeAolg5OETyYT60wdQiEiE",
   "TimeStamp": 1640601921836,
   "ChatId": "chat691a41db53b100115bec3603472d78a9"
}

type ChatDisband

type ChatDisband struct {
	Event

	// 操作人
	Operator string `json:"Operator"`

	// 群回话id
	OpenConversationId string `json:"OpenConversationId"`

	OperatorUnionId string `json:"OperatorUnionId"`

	TimeStamp int `json:"TimeStamp"`

	ChatId string `json:"ChatId"`
}

ChatDisband 群会话解散群

{
   "Operator": "manager3060",
   "OpenConversationId": "cid740SMooADFxmWX3DvIyp4g==",
   "CorpId": "ding0761931a826dfde2ffe93478753d9884",
   "EventType": "chat_disband",
   "OperatorUnionId": "3bOBVxFv0J8VOu3J4jGhZQiEiE",
   "TimeStamp": 1640754514696,
   "ChatId": "chat6418e0c8c141114e18491ea2603c09be"
}

type ChatRemoveMember

type ChatRemoveMember struct {
	Event

	// 操作人
	Operator string `json:"Operator"`

	// 群回话id
	OpenConversationId string `json:"OpenConversationId"`

	OperatorUnionId string `json:"OperatorUnionId"`

	UserIds []string `json:"UserId"`

	UnionIds []string `json:"UnionId"`

	TimeStamp int `json:"TimeStamp"`

	ChatId string `json:"ChatId"`
}

ChatRemoveMember 群删除人员

{
   "Operator": "manager164",
   "OpenConversationId": "cidOuTaLz7/D7zkkM/5PlrQQA==",
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "chat_remove_member",
   "UserId": [
       "011505184066774889"
   ],
   "UnionId": [
       "oiiRiSE5704kGgOZEHGGYmcQiEiE"
   ],
   "OperatorUnionId": "ABNiSWeAolg5OETyYT60wdQiEiE",
   "TimeStamp": 1640601958259,
   "ChatId": "chat691a41db53b100115bec3603472d78a9"
}

type CrmCustomerTrack

type CrmCustomerTrack struct {
	Event

	TimeStamp int `json:"EventTime"`

	BizId string `json:"BizId"`

	Tracks []Track `json:"tracks"`
}

CrmCustomerTrack CRM客户动态变更

{
   "CorpId": "dingf5d3534a855bdef9a39a90f97fcb1e09",
   "corpId": "dingf5d3534a855bdef9a39a90f97fcb1e09",
   "EventType": "crm_customer_track",
   "EventTime": 1640749233707,
   "BizId": "21057D5806944EF9C93192B36DC5F7B4",
   "tracks": [
       {
           "creator": "manager4268",
           "corpId": "dingf5d3534a855bdef9a39a90f97fcb1e09",
           "customerId": "ad6b2b05-91f1-4393-8ed5-96e9e558b604",
           "subType": 1,
           "id": "qoZCjgT7of7XAtUjo/4JgFy+RR432dJXcXqRbNxwTVM=",
           "gmtCreate": 1640749233707,
           "type": 1
       }
   ]
}

type Event

type Event struct {
	EventType string `json:"EventType"`

	// 企业id
	CorpId string `json:"CorpId"`
}

type HrmUserRecordChange

type HrmUserRecordChange struct {
	EventType string `json:"EventType"`

	StaffId string `json:"staffId"`

	ActionType string `json:"actionType"`
}

HrmUserRecordChange 人事档案变动等

{
   "actionType": "userInfoChange",
   "EventType": "hrm_user_record_change",
   "staffId": "manager164"
}

type LabelConfAdd

type LabelConfAdd struct {
	Event

	// 时间
	TimeStamp int `json:"TimeStamp,string"`

	Scope string `json:"scope"`

	// 角色id或者角色组id
	LabelIds []int `json:"LabelIdList"`
}

LabelConfAdd 增加角色或者角色组 好像无法区分是角色还是角色组

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "label_conf_add",
   "LabelIdList": [
       2393600321
   ],
   "scope": "1",
   "TimeStamp": "1640672959393"
}

type LabelConfDel

type LabelConfDel struct {
	LabelConfAdd
}

LabelConfDel 删除角色或者角色组

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "label_conf_del",
   "LabelIdList": [
       2393849326
   ],
   "scope": "1",
   "TimeStamp": "1640673879734"
}

type LabelConfModify

type LabelConfModify struct {
	LabelConfAdd
	// 修改后的值
	PostLabels []PostLabel `json:"PostLabelList"`

	// 修改前的值
	PreLabels []PreLabel `json:"PreLabelList"`
}

LabelConfModify 修改角色或者角色组

type LabelUserChange

type LabelUserChange struct {
	Event

	// 动作
	Action string `json:"action"`

	// 时间戳
	TimeStamp int `json:"TimeStamp,string"`

	// 角色组id
	LabelIds []int `json:"LabelIdList"`

	// 用户id
	UserIds []string `json:"UserIdList"`
}

LabelUserChange 员工角色信息发生变更

{
   "UserIdList": [
       "011505184066774889"
   ],
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "label_user_change",
   "LabelIdList": [
       1299380990
   ],
   "action": "add",
   "TimeStamp": "1640670965490"
}

type OrgAdminAdd

type OrgAdminAdd struct {
	Event

	// 时间戳
	TimeStamp int `json:"TimeStamp,string"`

	UserIds []string `json:"UserId"`
}

OrgAdminAdd 通讯录用户被设为管理员 会一起触发label_user_change事件

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "org_admin_add",
   "UserId": [
       "011505184066774889"
   ],
   "TimeStamp": "1640670965261"
}

type OrgAdminRemove

type OrgAdminRemove struct {
	OrgAdminAdd
}

OrgAdminRemove 通讯录用户被取消设置管理员 会一起触发label_user_change事件

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "org_admin_remove",
   "UserId": [
       "011505184066774889"
   ],
   "TimeStamp": "1640671615174"
}

type OrgChange

type OrgChange struct {
	Event

	// 时间
	TimeStamp int `json:"TimeStamp,string"`
}

OrgChange 企业信息发生变更 会一起触发 org_dept_modify 事件

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "org_change",
   "TimeStamp": "1640672244103"
}

type OrgDeptCreate

type OrgDeptCreate struct {
	Event

	// 部门id
	DeptIds []int `json:"DeptId"`

	// 时间戳
	TimeStamp int `json:"TimeStamp,string"`
}

OrgDeptCreate 通讯录企业部门创建

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "org_dept_create",
   "DeptId": [
       581208264
   ],
   "TimeStamp": "1640669222083"
}

type OrgDeptModify

type OrgDeptModify struct {
	OrgDeptCreate
}

OrgDeptModify 通讯录企业部门修改

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "org_dept_modify",
   "DeptId": [
       581208264
   ],
   "TimeStamp": "1640669396434"
}

type OrgDeptRemove

type OrgDeptRemove struct {
	OrgDeptCreate
}

OrgDeptRemove 通讯录企业部门删除

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "org_dept_remove",
   "DeptId": [
       581208264
   ],
   "TimeStamp": "1640670016319"
}

type OrgUserActive

type OrgUserActive struct {
	OrgUserModify
}

OrgUserActive 加入企业后用户激活

{
 "CorpId": "dinge8a5xxxx",
 "EventType": "user_active_org",
 "UserId": [
   "0119296xxx"
 ],
 "TimeStamp": "1608017258073"
}

type OrgUserAdd

type OrgUserAdd struct {
	OrgUserModify
}

OrgUserAdd 通讯录用户增加

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "user_add_org",
   "UserId": [
       "184919295227658120"
   ],
   "OptStaffId": "manager164",
   "TimeStamp": "1640921671286"
}

type OrgUserLeave

type OrgUserLeave struct {
	OrgUserModify
}

OrgUserLeave 通讯录用户离职

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "user_leave_org",
   "UserId": [
       "16399780922588973"
   ],
   "OptStaffId": "manager164",
   "TimeStamp": "1640658366191"
}

type OrgUserModify

type OrgUserModify struct {
	Event

	// 时间戳
	TimeStamp int `json:"TimeStamp,string"`

	// 操作人,不一定会有,智能人事入职的人员没有该字段
	OptStaffId string `json:"OptStaffId"`

	UserIds []string `json:"UserId"`
}

OrgUserModify 通讯录用户更改

{
   "CorpId": "dingc7c5220402493357f2c783f7214b6d69",
   "EventType": "user_modify_org",
   "UserId": [
       "manager164"
   ],
   "OptStaffId": "manager164",
   "TimeStamp": "1640657432022"
}

type PostLabel

type PostLabel struct {
	Hidden bool `json:"hidden"`

	Name string `json:"name"`

	Id int `json:"id"`

	// 扩展信息
	Ext interface{} `json:"extraInfo"`
}

PostLabel 修改后

func (*PostLabel) UnmarshalJSON

func (label *PostLabel) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON "{\"hidden\":false,\"name\":\"权限组修改01\",\"id\":2393887343,\"extraInfo\":{}}"

type PreLabel

type PreLabel struct {
	Hidden bool `json:"hidden"`

	Name string `json:"name"`

	Id int `json:"id"`

	// 扩展信息
	Ext interface{} `json:"extraInfo"`

	Deleted bool `json:"deleted"`

	Color int `json:"color"`

	Level int `json:"level"`

	Scope int `json:"scope"`

	ParentId int `json:"parentId"`
}

PreLabel 修改前

func (*PreLabel) UnmarshalJSON

func (label *PreLabel) UnmarshalJSON(b []byte) (err error)

type Track

type Track struct {
	Creator string `json:"creator"`

	CorpId string `json:"corpId"`

	CustomerId string `json:"customerId"`

	SubType int `json:"subType"`

	Id string `json:"id"`

	GmtCreate int `json:"gmtCreate"`

	Type int `json:"type"`
}

Jump to

Keyboard shortcuts

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