dispatcher

package
v3.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 24 Imported by: 22

Documentation

Overview

Package dispatcher code generated by oapi sdk gen

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppTicketEvent added in v3.0.1

type AppTicketEvent struct {
	*larkevent.EventBase
	Event *appTicketEventData `json:"event"`
}

type CustomAppTicketEventHandler added in v3.0.1

type CustomAppTicketEventHandler struct {
	// contains filtered or unexported fields
}

func (*CustomAppTicketEventHandler) Event added in v3.0.1

func (h *CustomAppTicketEventHandler) Event() interface{}

func (*CustomAppTicketEventHandler) Handle added in v3.0.1

func (h *CustomAppTicketEventHandler) Handle(ctx context.Context, event interface{}) error

type EventDispatcher

type EventDispatcher struct {
	*larkcore.Config
	// contains filtered or unexported fields
}

func NewEventDispatcher

func NewEventDispatcher(verificationToken, eventEncryptKey string) *EventDispatcher

func (*EventDispatcher) AuthByChallenge

func (dispatcher *EventDispatcher) AuthByChallenge(ctx context.Context, reqType larkevent.ReqType, challenge, token string) (*larkevent.EventResp, error)

func (*EventDispatcher) DecryptEvent

func (dispatcher *EventDispatcher) DecryptEvent(ctx context.Context, cipherEventJsonStr string) (str string, er error)

func (*EventDispatcher) Do added in v3.2.0

func (dispatcher *EventDispatcher) Do(ctx context.Context, payload []byte) (interface{}, error)

func (*EventDispatcher) DoHandle

func (dispatcher *EventDispatcher) DoHandle(ctx context.Context, reqType larkevent.ReqType, eventType, challenge, token,
	plainEventJsonStr string, path string, req *larkevent.EventReq) (*larkevent.EventResp, error)

func (*EventDispatcher) Handle

func (dispatcher *EventDispatcher) Handle(ctx context.Context, req *larkevent.EventReq) (eventResp *larkevent.EventResp)

func (*EventDispatcher) InitConfig

func (dispatcher *EventDispatcher) InitConfig(options ...larkevent.OptionFunc)

func (*EventDispatcher) Logger

func (dispatcher *EventDispatcher) Logger() larkcore.Logger

func (*EventDispatcher) OnAppTicketEvent added in v3.0.1

func (dispatcher *EventDispatcher) OnAppTicketEvent(handler func(ctx context.Context, event *AppTicketEvent) error) *EventDispatcher

当 ISV 需要自己管理 app_ticket 和 token 时,需要注册该处理器,以获取app_ticket。这时 SDK 内将不能帮开发者自动获取和缓存token。

事件描述文档:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/event/app_ticket-events

func (*EventDispatcher) OnCustomizedEvent

func (dispatcher *EventDispatcher) OnCustomizedEvent(eventType string, handler func(ctx context.Context, event *larkevent.EventReq) error) *EventDispatcher

订阅事件扩展:开发者可自己传递事件类型,并传递对应事件类型的处理器

func (*EventDispatcher) OnP1AddBotV1

func (dispatcher *EventDispatcher) OnP1AddBotV1(handler func(ctx context.Context, event *larkim.P1AddBotV1) error) *EventDispatcher

v1消息协议:机器人被邀请加入群聊时触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/ugzMugzMugzM/event/bot-added-to-group

func (*EventDispatcher) OnP1AppOpenV6

func (dispatcher *EventDispatcher) OnP1AppOpenV6(handler func(ctx context.Context, event *larkapplication.P1AppOpenV6) error) *EventDispatcher

v1消息协议:当租户第一次安装并启用此应用时触发此事件,启用应用包含以下场景:

当租户管理员后台首次开通应用
租户内的普通成员首次安装此应用

事件描述文档:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/event/app-first-enabled

func (*EventDispatcher) OnP1AppStatusChangedV6

func (dispatcher *EventDispatcher) OnP1AppStatusChangedV6(handler func(ctx context.Context, event *larkapplication.P1AppStatusChangedV6) error) *EventDispatcher

v1消息协议:当企业管理员在管理员后台启用、停用应用,或应用被平台停用时,开放平台推送 app_status_change 事件到请求网址。

事件描述文档:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/event/app-enabled-or-disabled

func (*EventDispatcher) OnP1AppUninstalledV6

func (dispatcher *EventDispatcher) OnP1AppUninstalledV6(handler func(ctx context.Context, event *larkapplication.P1AppUninstalledV6) error) *EventDispatcher

v1消息协议:企业解散后会推送此事件。商店应用开发者可在收到此事件后进行相应的账户注销、数据清理等处理。自建应用无此事件。

事件描述文档:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/event/app-uninstalled

func (*EventDispatcher) OnP1ChatDisbandV1

func (dispatcher *EventDispatcher) OnP1ChatDisbandV1(handler func(ctx context.Context, event *larkim.P1ChatDisbandV1) error) *EventDispatcher

v1消息协议:群聊被解散后触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uQDOwUjL0gDM14CN4ATN/event/group-closed

func (*EventDispatcher) OnP1ContactScopeChangedV3

func (dispatcher *EventDispatcher) OnP1ContactScopeChangedV3(handler func(ctx context.Context, event *larkcontact.P1ContactScopeChangedV3) error) *EventDispatcher

v1消息协议:当应用申请了 以应用身份访问通讯录 权限后,管理员可以配置应用的通讯录授权范围,当此范围变化时,就会触发授权范围变化事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM//event/scope-change

func (*EventDispatcher) OnP1DepartmentChangedV3

func (dispatcher *EventDispatcher) OnP1DepartmentChangedV3(handler func(ctx context.Context, event *larkcontact.P1DepartmentChangedV3) error) *EventDispatcher

v1消息协议:当新建部门(dept_add)、删除部门(dept_delete)、修改部门(dept_update)时,推送此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM//event/department-update

func (*EventDispatcher) OnP1GroupSettingUpdatedV1

func (dispatcher *EventDispatcher) OnP1GroupSettingUpdatedV1(handler func(ctx context.Context, event *larkim.P1GroupSettingUpdatedV1) error) *EventDispatcher

v1消息协议:群配置修改后触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uQDOwUjL0gDM14CN4ATN/event/group-configuration-changes

func (*EventDispatcher) OnP1LeaveApprovalV4

func (dispatcher *EventDispatcher) OnP1LeaveApprovalV4(handler func(ctx context.Context, event *larkapproval.P1LeaveApprovalV4) error) *EventDispatcher

v1消息协议:审批」应用的表单里如果包含 请假控件组,则在此表单审批通过后触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uIDO24iM4YjLygjN/event/leave

func (*EventDispatcher) OnP1MessageReadV1

func (dispatcher *EventDispatcher) OnP1MessageReadV1(handler func(ctx context.Context, event *larkim.P1MessageReadV1) error) *EventDispatcher

v1消息协议:用户阅读机器人发送的消息后触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/ugzMugzMugzM/event/message-read

func (*EventDispatcher) OnP1MessageReceiveV1

func (dispatcher *EventDispatcher) OnP1MessageReceiveV1(handler func(ctx context.Context, event *larkim.P1MessageReceiveV1) error) *EventDispatcher

v1消息协议:当用户发送消息给机器人或在群聊中@机器人时触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/ugzMugzMugzM/event/receive-message

func (*EventDispatcher) OnP1OrderPaidV6

func (dispatcher *EventDispatcher) OnP1OrderPaidV6(handler func(ctx context.Context, event *larkapplication.P1OrderPaidV6) error) *EventDispatcher

v1消息协议:用户购买应用商店付费应用成功后发送给应用ISV的通知事件。

事件描述文档:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/event/public-app-purchase

func (*EventDispatcher) OnP1OutApprovalV4

func (dispatcher *EventDispatcher) OnP1OutApprovalV4(handler func(ctx context.Context, event *larkapproval.P1OutApprovalV4) error) *EventDispatcher

v1消息协议:「审批」应用的表单里如果包含 外出控件组,则在此表单审批通过后触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uIDO24iM4YjLygjN/event/out-of-office

func (*EventDispatcher) OnP1P2PChatCreatedV1

func (dispatcher *EventDispatcher) OnP1P2PChatCreatedV1(handler func(ctx context.Context, event *larkim.P1P2PChatCreatedV1) error) *EventDispatcher

v1消息协议:首次会话是用户了解应用的重要机会,你可以发送操作说明、配置地址来指导用户开始使用你的应用。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/bot-events

func (*EventDispatcher) OnP1RemedyApprovalV4

func (dispatcher *EventDispatcher) OnP1RemedyApprovalV4(handler func(ctx context.Context, event *larkapproval.P1RemedyApprovalV4) error) *EventDispatcher

v1消息协议:补卡申请审批通过后触发此事件。 你可以在「打卡」应用里提交补卡申请。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uIDO24iM4YjLygjN/event/attendance-record-correction

func (*EventDispatcher) OnP1RemoveAddBotV1

func (dispatcher *EventDispatcher) OnP1RemoveAddBotV1(handler func(ctx context.Context, event *larkim.P1RemoveBotV1) error) *EventDispatcher

v1消息协议:机器人被从群聊中移除时触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/ugzMugzMugzM/event/bot-removed-from-group

func (*EventDispatcher) OnP1ShiftApprovalV4

func (dispatcher *EventDispatcher) OnP1ShiftApprovalV4(handler func(ctx context.Context, event *larkapproval.P1ShiftApprovalV4) error) *EventDispatcher

v1消息协议:换班申请审批通过后触发此事件。 你可以在「打卡」应用里提交换班申请。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uIDO24iM4YjLygjN/event/shift-change

func (*EventDispatcher) OnP1ThirdPartyMeetingRoomChangedV1

func (dispatcher *EventDispatcher) OnP1ThirdPartyMeetingRoomChangedV1(handler func(ctx context.Context, event *larkmeeting_room.P1ThirdPartyMeetingRoomChangedV1) error) *EventDispatcher

v1消息协议:当添加了第三方会议室的日程发生变动时(创建/更新/删除)触发此事件。

事件描述文档:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/meeting_room-v1/event/third-room-event-changes

func (*EventDispatcher) OnP1TripApprovalV4

func (dispatcher *EventDispatcher) OnP1TripApprovalV4(handler func(ctx context.Context, event *larkapproval.P1TripApprovalV4) error) *EventDispatcher

v1消息协议:「审批」应用的表单里如果包含 出差控件组,则在此表单审批通过后触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uIDO24iM4YjLygjN/event/business-trip

func (*EventDispatcher) OnP1UserChangedV3

func (dispatcher *EventDispatcher) OnP1UserChangedV3(handler func(ctx context.Context, event *larkcontact.P1UserChangedV3) error) *EventDispatcher

v1消息协议:当员工加入企业(user_add)、离职(user_leave)、个人信息发生变化(user_update)时,推送此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM//event/employee-change

func (*EventDispatcher) OnP1UserInOutChatV1

func (dispatcher *EventDispatcher) OnP1UserInOutChatV1(handler func(ctx context.Context, event *larkim.P1UserInOutChatV1) error) *EventDispatcher

v1消息协议:用户进群、出群后触发此事件

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uQDOwUjL0gDM14CN4ATN/event/user-joins-or-leave-group

func (*EventDispatcher) OnP1UserStatusChangedV3

func (dispatcher *EventDispatcher) OnP1UserStatusChangedV3(handler func(ctx context.Context, event *larkcontact.P1UserStatusChangedV3) error) *EventDispatcher

v1消息协议:当员工的激活、暂停账号/恢复账号、操作离职时会触发此事件。此事件不依赖于任何权限。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uETNz4SM1MjLxUzM//event/user-status-changed

func (*EventDispatcher) OnP1WorkApprovalV4

func (dispatcher *EventDispatcher) OnP1WorkApprovalV4(handler func(ctx context.Context, event *larkapproval.P1WorkApprovalV4) error) *EventDispatcher

v1消息协议:「审批」应用的表单里如果包含 加班控件组,则在此表单审批通过后触发此事件。

事件描述文档:https://open.feishu.cn/document/ukTMukTMukTM/uIDO24iM4YjLygjN/event/overtime

func (*EventDispatcher) OnP2AccessRecordCreatedV1

func (dispatcher *EventDispatcher) OnP2AccessRecordCreatedV1(handler func(ctx context.Context, event *larkacs.P2AccessRecordCreatedV1) error) *EventDispatcher

新增门禁访问记录

- 门禁设备识别用户成功后发送该事件给订阅应用。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record/events/created

func (*EventDispatcher) OnP2ApplicationAppVersionAuditV6

func (dispatcher *EventDispatcher) OnP2ApplicationAppVersionAuditV6(handler func(ctx context.Context, event *larkapplication.P2ApplicationAppVersionAuditV6) error) *EventDispatcher

应用审核

- 通过订阅该事件,可接收应用审核(通过 / 拒绝)事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/events/audit

func (*EventDispatcher) OnP2ApplicationAppVersionPublishApplyV6

func (dispatcher *EventDispatcher) OnP2ApplicationAppVersionPublishApplyV6(handler func(ctx context.Context, event *larkapplication.P2ApplicationAppVersionPublishApplyV6) error) *EventDispatcher

申请发布应用

- 通过订阅该事件,可接收应用提交发布申请事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/events/publish_apply

func (*EventDispatcher) OnP2ApplicationAppVersionPublishRevokeV6

func (dispatcher *EventDispatcher) OnP2ApplicationAppVersionPublishRevokeV6(handler func(ctx context.Context, event *larkapplication.P2ApplicationAppVersionPublishRevokeV6) error) *EventDispatcher

撤回应用发布申请

- 通过订阅该事件,可接收应用撤回发布申请事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/events/publish_revoke

func (*EventDispatcher) OnP2ApplicationCreatedV6

func (dispatcher *EventDispatcher) OnP2ApplicationCreatedV6(handler func(ctx context.Context, event *larkapplication.P2ApplicationCreatedV6) error) *EventDispatcher

应用创建

- 当企业内有新的应用被创建时推送此事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/events/created

func (*EventDispatcher) OnP2ApplicationDeletedV1 added in v3.1.3

func (dispatcher *EventDispatcher) OnP2ApplicationDeletedV1(handler func(ctx context.Context, event *larkhire.P2ApplicationDeletedV1) error) *EventDispatcher

删除投递

- 删除投递

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/events/deleted

func (*EventDispatcher) OnP2ApplicationFeedbackCreatedV6

func (dispatcher *EventDispatcher) OnP2ApplicationFeedbackCreatedV6(handler func(ctx context.Context, event *larkapplication.P2ApplicationFeedbackCreatedV6) error) *EventDispatcher

新增应用反馈

- 当应用收到新反馈时,触发该事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/events/created

func (*EventDispatcher) OnP2ApplicationFeedbackUpdatedV6

func (dispatcher *EventDispatcher) OnP2ApplicationFeedbackUpdatedV6(handler func(ctx context.Context, event *larkapplication.P2ApplicationFeedbackUpdatedV6) error) *EventDispatcher

反馈更新

- 当反馈的处理状态被更新时,触发该事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/events/updated

func (*EventDispatcher) OnP2ApplicationStageChangedV1 added in v3.0.19

func (dispatcher *EventDispatcher) OnP2ApplicationStageChangedV1(handler func(ctx context.Context, event *larkhire.P2ApplicationStageChangedV1) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/event/application-stage-changed

func (*EventDispatcher) OnP2ApplicationVisibilityAddedV6

func (dispatcher *EventDispatcher) OnP2ApplicationVisibilityAddedV6(handler func(ctx context.Context, event *larkapplication.P2ApplicationVisibilityAddedV6) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/event/app-availability-scope-extended

func (*EventDispatcher) OnP2ApprovalUpdatedV4

func (dispatcher *EventDispatcher) OnP2ApprovalUpdatedV4(handler func(ctx context.Context, event *larkapproval.P2ApprovalUpdatedV4) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uIDO24iM4YjLygjN/event/custom-approval-event

func (*EventDispatcher) OnP2BotMenuV6 added in v3.0.20

func (dispatcher *EventDispatcher) OnP2BotMenuV6(handler func(ctx context.Context, event *larkapplication.P2BotMenuV6) error) *EventDispatcher

机器人自定义菜单

- 当用户点击类型为事件的机器人菜单时触发

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/bot/events/menu

func (*EventDispatcher) OnP2CalendarAclCreatedV4

func (dispatcher *EventDispatcher) OnP2CalendarAclCreatedV4(handler func(ctx context.Context, event *larkcalendar.P2CalendarAclCreatedV4) error) *EventDispatcher

ACL新建

- 当被订阅的日历上有ACL被创建时触发此事件。

- 特殊说明:应用首先需要调用上述接口建立订阅关系。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/events/created

func (*EventDispatcher) OnP2CalendarAclDeletedV4

func (dispatcher *EventDispatcher) OnP2CalendarAclDeletedV4(handler func(ctx context.Context, event *larkcalendar.P2CalendarAclDeletedV4) error) *EventDispatcher

ACL移除

- 当被订阅的日历上有ACL被删除时触发此事件。

- 特殊说明:应用首先需要调用上述接口建立订阅关系。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/events/deleted

func (*EventDispatcher) OnP2CalendarChangedV4

func (dispatcher *EventDispatcher) OnP2CalendarChangedV4(handler func(ctx context.Context, event *larkcalendar.P2CalendarChangedV4) error) *EventDispatcher

日历变更

- 当订阅用户的日历列表有日历变动时触发此事件。

- 应用首先需要调用上述接口建立订阅关系。应用收到该事件后,使用事件的 user_list 字段中的用户对应的 user_access_token 调用[获取日历列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list)接口拉取增量的变更数据

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/events/changed

func (*EventDispatcher) OnP2CalendarEventChangedV4

func (dispatcher *EventDispatcher) OnP2CalendarEventChangedV4(handler func(ctx context.Context, event *larkcalendar.P2CalendarEventChangedV4) error) *EventDispatcher

日程变更

- 当被订阅的用户日历下有日程变更时触发此事件。

- 应用首先需要调用[订阅日程变更事件接口](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/subscription)建立订阅关系。应用收到该事件后,使用事件的 user_list 字段中的用户对应的 user_access_token 调用[获取日程列表](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list)接口拉取事件中 calendar_id 字段对应的日历下的日程数据

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/events/changed

func (*EventDispatcher) OnP2CardActionTrigger added in v3.3.3

func (dispatcher *EventDispatcher) OnP2CardActionTrigger(handler func(ctx context.Context, event *callback.CardActionTriggerEvent) (*callback.CardActionTriggerReponse, error)) *EventDispatcher

func (*EventDispatcher) OnP2CardURLPreviewGet added in v3.3.3

func (dispatcher *EventDispatcher) OnP2CardURLPreviewGet(handler func(ctx context.Context, event *callback.URLPreviewGetEvent) (*callback.URLPreviewGetResponse, error)) *EventDispatcher

func (*EventDispatcher) OnP2ChatAccessEventBotP2pChatEnteredV1 added in v3.2.9

func (dispatcher *EventDispatcher) OnP2ChatAccessEventBotP2pChatEnteredV1(handler func(ctx context.Context, event *larkim.P2ChatAccessEventBotP2pChatEnteredV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ChatDisbandedV1

func (dispatcher *EventDispatcher) OnP2ChatDisbandedV1(handler func(ctx context.Context, event *larkim.P2ChatDisbandedV1) error) *EventDispatcher

群解散

- 群组被解散后触发此事件。

- 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 需要订阅 ==消息与群组== 分类下的 ==解散群== 事件;- 事件会向群内订阅了该事件的机器人进行推送

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/events/disbanded

func (*EventDispatcher) OnP2ChatMemberBotAddedV1

func (dispatcher *EventDispatcher) OnP2ChatMemberBotAddedV1(handler func(ctx context.Context, event *larkim.P2ChatMemberBotAddedV1) error) *EventDispatcher

机器人进群

- 机器人被用户添加至群聊时触发此事件。

- 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 需要订阅 ==消息与群组== 分类下的 ==机器人进群== 事件;- 事件会向进群的机器人进行推送;- 机器人邀请机器人不会触发事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-member-bot/events/added

func (*EventDispatcher) OnP2ChatMemberBotDeletedV1

func (dispatcher *EventDispatcher) OnP2ChatMemberBotDeletedV1(handler func(ctx context.Context, event *larkim.P2ChatMemberBotDeletedV1) error) *EventDispatcher

机器人被移出群

- 机器人被移出群聊后触发此事件。

- 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 需要订阅 ==消息与群组== 分类下的 ==机器人被移出群== 事件;- 事件会向被移出群的机器人进行推送

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-member-bot/events/deleted

func (*EventDispatcher) OnP2ChatMemberUserAddedV1

func (dispatcher *EventDispatcher) OnP2ChatMemberUserAddedV1(handler func(ctx context.Context, event *larkim.P2ChatMemberUserAddedV1) error) *EventDispatcher

用户进群

- 新用户进群(包含话题群)触发此事件。

- 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 需要订阅 ==消息与群组== 分类下的 ==用户进群== 事件;- 事件会向群内订阅了该事件的机器人进行推送

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-member-user/events/added

func (*EventDispatcher) OnP2ChatMemberUserDeletedV1

func (dispatcher *EventDispatcher) OnP2ChatMemberUserDeletedV1(handler func(ctx context.Context, event *larkim.P2ChatMemberUserDeletedV1) error) *EventDispatcher

用户出群

- 用户主动退群或被移出群聊时推送事件。

- 注意事项:;- 应用需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)并且机器人所在群发生上述变化;- 机器人需要订阅 ==消息与群组== 分类下的 ==用户主动退群或被移出群聊== 事件;- 事件会向群内订阅了该事件的机器人进行推送

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-member-user/events/deleted

func (*EventDispatcher) OnP2ChatMemberUserWithdrawnV1

func (dispatcher *EventDispatcher) OnP2ChatMemberUserWithdrawnV1(handler func(ctx context.Context, event *larkim.P2ChatMemberUserWithdrawnV1) error) *EventDispatcher

撤销拉用户进群

- 撤销拉用户进群后触发此事件。

- 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 需要订阅 ==消息与群组== 分类下的 ==撤销拉用户进群== 事件;- 事件会向群内订阅了该事件的机器人进行推送

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-member-user/events/withdrawn

func (*EventDispatcher) OnP2ChatUpdatedV1

func (dispatcher *EventDispatcher) OnP2ChatUpdatedV1(handler func(ctx context.Context, event *larkim.P2ChatUpdatedV1) error) *EventDispatcher

群配置修改

- 群组配置被修改后触发此事件,包含:;- 群主转移;- 群基本信息修改(群头像/群名称/群描述/群国际化名称);- 群权限修改(加人入群权限/群编辑权限/at所有人权限/群分享权限)。

- 注意事项:; - 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability);- 需要订阅 ==消息与群组== 分类下的 ==群配置修改== 事件;- 事件会向群内订阅了该事件的机器人进行推送

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/events/updated

func (*EventDispatcher) OnP2CommentCreatedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2CommentCreatedV1(handler func(ctx context.Context, event *larkmoments.P2CommentCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2CommentDeletedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2CommentDeletedV1(handler func(ctx context.Context, event *larkmoments.P2CommentDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ContractCreatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2ContractCreatedV1(handler func(ctx context.Context, event *larkcorehr.P2ContractCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ContractDeletedV1 added in v3.0.32

func (dispatcher *EventDispatcher) OnP2ContractDeletedV1(handler func(ctx context.Context, event *larkcorehr.P2ContractDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ContractUpdatedV1 added in v3.0.32

func (dispatcher *EventDispatcher) OnP2ContractUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2ContractUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2CustomAttrEventUpdatedV3

func (dispatcher *EventDispatcher) OnP2CustomAttrEventUpdatedV3(handler func(ctx context.Context, event *larkcontact.P2CustomAttrEventUpdatedV3) error) *EventDispatcher

成员字段变更

- 通过该事件订阅成员字段变更。old_object 展示更新字段的原始值。

- 触发事件的动作有「打开/关闭」开关、「增加/删除」成员字段。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/custom_attr_event/events/updated

func (*EventDispatcher) OnP2DepartmentCreatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2DepartmentCreatedV1(handler func(ctx context.Context, event *larkcorehr.P2DepartmentCreatedV1) error) *EventDispatcher

部门创建

- 飞书人事中「部门被创建」时将触发此事件。触发时间为部门实际生效时间,如在 2022-01-01 创建部门,部门生效时间设置为 2022-05-01,事件将在 2022-05-01 进行推送。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/events/created

func (*EventDispatcher) OnP2DepartmentCreatedV3

func (dispatcher *EventDispatcher) OnP2DepartmentCreatedV3(handler func(ctx context.Context, event *larkcontact.P2DepartmentCreatedV3) error) *EventDispatcher

部门被创建

- 创建通讯录部门时发送该事件给订阅应用。

- 只有当应用拥有被改动字段的数据权限时,才会接收到事件。具体的数据权限与字段的关系请参考[应用权限](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN),或查看事件体参数列表的字段描述。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/events/created

func (*EventDispatcher) OnP2DepartmentDeletedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2DepartmentDeletedV1(handler func(ctx context.Context, event *larkcorehr.P2DepartmentDeletedV1) error) *EventDispatcher

部门删除

- 飞书人事中「部门被删除」时将触发此事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/events/deleted

func (*EventDispatcher) OnP2DepartmentDeletedV3

func (dispatcher *EventDispatcher) OnP2DepartmentDeletedV3(handler func(ctx context.Context, event *larkcontact.P2DepartmentDeletedV3) error) *EventDispatcher

部门被删除

- 订阅这一事件可以获得被删除部门的信息。

- 只有当应用拥有被改动字段的数据权限时,才会接收到事件。具体的数据权限与字段的关系请参考[应用权限](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN),或查看事件体参数列表的字段描述。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/events/deleted

func (*EventDispatcher) OnP2DepartmentUpdatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2DepartmentUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2DepartmentUpdatedV1) error) *EventDispatcher

部门更新

- 飞书人事中「部门信息被更新」时将触发此事件。触发时间为部门更新实际生效时间,如在 2022-01-01 更新部门,部门更新生效时间设置为 2022-05-01,事件将在 2022-05-01 进行推送。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/events/updated

func (*EventDispatcher) OnP2DepartmentUpdatedV3

func (dispatcher *EventDispatcher) OnP2DepartmentUpdatedV3(handler func(ctx context.Context, event *larkcontact.P2DepartmentUpdatedV3) error) *EventDispatcher

部门信息被修改

- 通过该事件订阅部门更新。`old_object`只展示被更新字段的原始值。应用身份访问通讯录的权限为历史版本,不推荐申请。

- 只有当应用拥有被改动字段的数据权限时,才会接收到事件。具体的数据权限与字段的关系请参考[应用权限](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN),或查看事件体参数列表的字段描述。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/events/updated

func (*EventDispatcher) OnP2DislikeCreatedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2DislikeCreatedV1(handler func(ctx context.Context, event *larkmoments.P2DislikeCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2DislikeDeletedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2DislikeDeletedV1(handler func(ctx context.Context, event *larkmoments.P2DislikeDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2EcoAccountCreatedV1 added in v3.0.32

func (dispatcher *EventDispatcher) OnP2EcoAccountCreatedV1(handler func(ctx context.Context, event *larkhire.P2EcoAccountCreatedV1) error) *EventDispatcher

帐号绑定

- 招聘管理员添加三方服务商帐号时,系统会推送事件给应用开发者,开发者可根据事件获取用户添加的帐号类型(背调 或 笔试)和 帐号自定义字段信息,并根据这些信息识别用户在服务商处的身份,完成三方服务商帐号 和 招聘帐号之间的绑定,并根据用户服务商身份推送对应的背调套餐或试卷列表。

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account/events/created

func (*EventDispatcher) OnP2EcoBackgroundCheckCanceledV1 added in v3.0.32

func (dispatcher *EventDispatcher) OnP2EcoBackgroundCheckCanceledV1(handler func(ctx context.Context, event *larkhire.P2EcoBackgroundCheckCanceledV1) error) *EventDispatcher

终止背调

- 用户在招聘系统终止背调后,系统会推送事件给对应的应用开发者。开发者可根据事件获取背调 ID,完成在三方服务商处的订单取消等后续操作。

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/events/canceled

func (*EventDispatcher) OnP2EcoBackgroundCheckCreatedV1 added in v3.0.32

func (dispatcher *EventDispatcher) OnP2EcoBackgroundCheckCreatedV1(handler func(ctx context.Context, event *larkhire.P2EcoBackgroundCheckCreatedV1) error) *EventDispatcher

创建背调

- 用户在招聘系统安排背调后,系统会推送事件给对应的应用开发者。开发者可根据事件获取候选人信息、委托人信息和自定义字段信息,并根据这些信息完成在三方服务商处的背调订单创建。

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/events/created

func (*EventDispatcher) OnP2EcoExamCreatedV1 added in v3.0.32

func (dispatcher *EventDispatcher) OnP2EcoExamCreatedV1(handler func(ctx context.Context, event *larkhire.P2EcoExamCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2EhrImportTaskForInternshipOfferImportedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2EhrImportTaskForInternshipOfferImportedV1(handler func(ctx context.Context, event *larkhire.P2EhrImportTaskForInternshipOfferImportedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2EhrImportTaskImportedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2EhrImportTaskImportedV1(handler func(ctx context.Context, event *larkhire.P2EhrImportTaskImportedV1) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/event/import-ehr

func (*EventDispatcher) OnP2EmployeeDomainEventV2 added in v3.2.8

func (dispatcher *EventDispatcher) OnP2EmployeeDomainEventV2(handler func(ctx context.Context, event *larkcorehr.P2EmployeeDomainEventV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2EmployeeTypeEnumActivedV3

func (dispatcher *EventDispatcher) OnP2EmployeeTypeEnumActivedV3(handler func(ctx context.Context, event *larkcontact.P2EmployeeTypeEnumActivedV3) error) *EventDispatcher

启用人员类型事件

- 启用人员类型会发出对应事件。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/events/actived

func (*EventDispatcher) OnP2EmployeeTypeEnumCreatedV3

func (dispatcher *EventDispatcher) OnP2EmployeeTypeEnumCreatedV3(handler func(ctx context.Context, event *larkcontact.P2EmployeeTypeEnumCreatedV3) error) *EventDispatcher

新建人员类型事件

- 新建人员类型会发出对应事件。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/events/created

func (*EventDispatcher) OnP2EmployeeTypeEnumDeactivatedV3

func (dispatcher *EventDispatcher) OnP2EmployeeTypeEnumDeactivatedV3(handler func(ctx context.Context, event *larkcontact.P2EmployeeTypeEnumDeactivatedV3) error) *EventDispatcher

停用人员类型事件

- 停用人员类型会发出对应事件。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/events/deactivated

func (*EventDispatcher) OnP2EmployeeTypeEnumDeletedV3

func (dispatcher *EventDispatcher) OnP2EmployeeTypeEnumDeletedV3(handler func(ctx context.Context, event *larkcontact.P2EmployeeTypeEnumDeletedV3) error) *EventDispatcher

删除人员类型事件

- 删除人员类型会发出对应事件。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/events/deleted

func (*EventDispatcher) OnP2EmployeeTypeEnumUpdatedV3

func (dispatcher *EventDispatcher) OnP2EmployeeTypeEnumUpdatedV3(handler func(ctx context.Context, event *larkcontact.P2EmployeeTypeEnumUpdatedV3) error) *EventDispatcher

修改人员类型名称事件

- 修改人员类型名称会发出对应事件。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/events/updated

func (*EventDispatcher) OnP2EmploymentConvertedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2EmploymentConvertedV1(handler func(ctx context.Context, event *larkcorehr.P2EmploymentConvertedV1) error) *EventDispatcher

员工转正

- 员工在飞书人事转正完成后将触发该事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/events/converted

func (*EventDispatcher) OnP2EmploymentCreatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2EmploymentCreatedV1(handler func(ctx context.Context, event *larkcorehr.P2EmploymentCreatedV1) error) *EventDispatcher

雇佣信息创建

- 员工在飞书人事的「雇佣信息被创建」时将触发此事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/events/created

func (*EventDispatcher) OnP2EmploymentDeletedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2EmploymentDeletedV1(handler func(ctx context.Context, event *larkcorehr.P2EmploymentDeletedV1) error) *EventDispatcher

雇佣信息删除

- 员工在飞书人事的「雇佣信息被删除」时将触发此事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/events/deleted

func (*EventDispatcher) OnP2EmploymentResignedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2EmploymentResignedV1(handler func(ctx context.Context, event *larkcorehr.P2EmploymentResignedV1) error) *EventDispatcher

员工完成离职

- 员工完成离职,即离职日期的次日凌晨时,员工雇佣状态更改为“离职”后触发该事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/events/resigned

func (*EventDispatcher) OnP2EmploymentUpdatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2EmploymentUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2EmploymentUpdatedV1) error) *EventDispatcher

雇佣信息更新

- 员工在飞书人事的「雇佣信息被更新」时将触发此事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employment/events/updated

func (*EventDispatcher) OnP2FileBitableFieldChangedV1 added in v3.0.5

func (dispatcher *EventDispatcher) OnP2FileBitableFieldChangedV1(handler func(ctx context.Context, event *larkdrive.P2FileBitableFieldChangedV1) error) *EventDispatcher

多维表格字段变更

- 多维表格字段变更

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/events/bitable_field_changed

func (*EventDispatcher) OnP2FileBitableRecordChangedV1 added in v3.2.6

func (dispatcher *EventDispatcher) OnP2FileBitableRecordChangedV1(handler func(ctx context.Context, event *larkdrive.P2FileBitableRecordChangedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2FileDeletedV1

func (dispatcher *EventDispatcher) OnP2FileDeletedV1(handler func(ctx context.Context, event *larkdrive.P2FileDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/event/file-deleted-completely

func (*EventDispatcher) OnP2FileEditV1

func (dispatcher *EventDispatcher) OnP2FileEditV1(handler func(ctx context.Context, event *larkdrive.P2FileEditV1) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/event/file-edited

func (*EventDispatcher) OnP2FilePermissionMemberAddedV1

func (dispatcher *EventDispatcher) OnP2FilePermissionMemberAddedV1(handler func(ctx context.Context, event *larkdrive.P2FilePermissionMemberAddedV1) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/event/file-collaborator-add

func (*EventDispatcher) OnP2FilePermissionMemberRemovedV1

func (dispatcher *EventDispatcher) OnP2FilePermissionMemberRemovedV1(handler func(ctx context.Context, event *larkdrive.P2FilePermissionMemberRemovedV1) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/event/file-collaborator-remove

func (*EventDispatcher) OnP2FileReadV1

func (dispatcher *EventDispatcher) OnP2FileReadV1(handler func(ctx context.Context, event *larkdrive.P2FileReadV1) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/event/file-read

func (*EventDispatcher) OnP2FileTitleUpdatedV1

func (dispatcher *EventDispatcher) OnP2FileTitleUpdatedV1(handler func(ctx context.Context, event *larkdrive.P2FileTitleUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/event/file-title-update

func (*EventDispatcher) OnP2FileTrashedV1

func (dispatcher *EventDispatcher) OnP2FileTrashedV1(handler func(ctx context.Context, event *larkdrive.P2FileTrashedV1) error) *EventDispatcher

-

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/event/delete-file-to-trash-can

func (*EventDispatcher) OnP2JobChangeStatusUpdatedV2 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2JobChangeStatusUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2JobChangeStatusUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2JobChangeUpdatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2JobChangeUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2JobChangeUpdatedV1) error) *EventDispatcher

异动状态变更事件

- 在异动发起审批和产生审批结果时触发该事件,审批结果产生的场景包括撤销、审批通过、审批拒绝

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_change/events/updated

func (*EventDispatcher) OnP2JobChangeUpdatedV2 added in v3.2.7

func (dispatcher *EventDispatcher) OnP2JobChangeUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2JobChangeUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2JobCreatedV1 added in v3.1.0

func (dispatcher *EventDispatcher) OnP2JobCreatedV1(handler func(ctx context.Context, event *larkcorehr.P2JobCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2JobDataChangedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2JobDataChangedV1(handler func(ctx context.Context, event *larkcorehr.P2JobDataChangedV1) error) *EventDispatcher

员工异动

- 员工在飞书人事异动完成后将触发该事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/events/changed

func (*EventDispatcher) OnP2JobDataCreatedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2JobDataCreatedV1(handler func(ctx context.Context, event *larkcorehr.P2JobDataCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2JobDataDeletedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2JobDataDeletedV1(handler func(ctx context.Context, event *larkcorehr.P2JobDataDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2JobDataEmployedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2JobDataEmployedV1(handler func(ctx context.Context, event *larkcorehr.P2JobDataEmployedV1) error) *EventDispatcher

员工完成入职

- 在「飞书人事」将待入职员工手动操作“完成入职”后,触发该事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/events/employed

func (*EventDispatcher) OnP2JobDataUpdatedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2JobDataUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2JobDataUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2JobDeletedV1 added in v3.1.0

func (dispatcher *EventDispatcher) OnP2JobDeletedV1(handler func(ctx context.Context, event *larkcorehr.P2JobDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2JobUpdatedV1 added in v3.1.0

func (dispatcher *EventDispatcher) OnP2JobUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2JobUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2MeetingAllMeetingEndedV1 added in v3.0.13

func (dispatcher *EventDispatcher) OnP2MeetingAllMeetingEndedV1(handler func(ctx context.Context, event *larkvc.P2MeetingAllMeetingEndedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2MeetingAllMeetingStartedV1 added in v3.0.13

func (dispatcher *EventDispatcher) OnP2MeetingAllMeetingStartedV1(handler func(ctx context.Context, event *larkvc.P2MeetingAllMeetingStartedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2MeetingEndedV1

func (dispatcher *EventDispatcher) OnP2MeetingEndedV1(handler func(ctx context.Context, event *larkvc.P2MeetingEndedV1) error) *EventDispatcher

会议结束

- 发生在会议结束时

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/events/meeting_ended

func (*EventDispatcher) OnP2MeetingJoinMeetingV1

func (dispatcher *EventDispatcher) OnP2MeetingJoinMeetingV1(handler func(ctx context.Context, event *larkvc.P2MeetingJoinMeetingV1) error) *EventDispatcher

加入会议

- 发生在有人加入会议时

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/events/join_meeting

func (*EventDispatcher) OnP2MeetingLeaveMeetingV1

func (dispatcher *EventDispatcher) OnP2MeetingLeaveMeetingV1(handler func(ctx context.Context, event *larkvc.P2MeetingLeaveMeetingV1) error) *EventDispatcher

离开会议

- 发生在有人离开会议时

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/events/leave_meeting

func (*EventDispatcher) OnP2MeetingRecordingEndedV1

func (dispatcher *EventDispatcher) OnP2MeetingRecordingEndedV1(handler func(ctx context.Context, event *larkvc.P2MeetingRecordingEndedV1) error) *EventDispatcher

录制停止

- 发生在录制结束时

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/events/recording_ended

func (*EventDispatcher) OnP2MeetingRecordingReadyV1

func (dispatcher *EventDispatcher) OnP2MeetingRecordingReadyV1(handler func(ctx context.Context, event *larkvc.P2MeetingRecordingReadyV1) error) *EventDispatcher

录制完成

- 发生在录制文件上传完毕时

- 收到该事件后,方可进行录制文件获取、授权等操作

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/events/recording_ready

func (*EventDispatcher) OnP2MeetingRecordingStartedV1

func (dispatcher *EventDispatcher) OnP2MeetingRecordingStartedV1(handler func(ctx context.Context, event *larkvc.P2MeetingRecordingStartedV1) error) *EventDispatcher

录制开始

- 发生在开始录制时

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/events/recording_started

func (*EventDispatcher) OnP2MeetingRoomCreatedV1

func (dispatcher *EventDispatcher) OnP2MeetingRoomCreatedV1(handler func(ctx context.Context, event *larkmeeting_room.P2MeetingRoomCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2MeetingRoomDeletedV1

func (dispatcher *EventDispatcher) OnP2MeetingRoomDeletedV1(handler func(ctx context.Context, event *larkmeeting_room.P2MeetingRoomDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2MeetingRoomStatusChangedV1

func (dispatcher *EventDispatcher) OnP2MeetingRoomStatusChangedV1(handler func(ctx context.Context, event *larkmeeting_room.P2MeetingRoomStatusChangedV1) error) *EventDispatcher

会议室状态信息变更

- 会议室状态信息变更将触发此事件。

- 了解事件订阅的使用场景和配置流程,请点击查看 [事件订阅概述](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM)

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/meeting_room-v1/meeting_room/events/status_changed

func (*EventDispatcher) OnP2MeetingRoomUpdatedV1

func (dispatcher *EventDispatcher) OnP2MeetingRoomUpdatedV1(handler func(ctx context.Context, event *larkmeeting_room.P2MeetingRoomUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2MeetingShareEndedV1

func (dispatcher *EventDispatcher) OnP2MeetingShareEndedV1(handler func(ctx context.Context, event *larkvc.P2MeetingShareEndedV1) error) *EventDispatcher

屏幕共享结束

- 发生在屏幕共享结束时

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/events/share_ended

func (*EventDispatcher) OnP2MeetingShareStartedV1

func (dispatcher *EventDispatcher) OnP2MeetingShareStartedV1(handler func(ctx context.Context, event *larkvc.P2MeetingShareStartedV1) error) *EventDispatcher

屏幕共享开始

- 发生在屏幕共享开始时

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/events/share_started

func (*EventDispatcher) OnP2MeetingStartedV1

func (dispatcher *EventDispatcher) OnP2MeetingStartedV1(handler func(ctx context.Context, event *larkvc.P2MeetingStartedV1) error) *EventDispatcher

会议开始

- 发生在会议开始时,目前仅提供预约会议的相关事件。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/events/meeting_started

func (*EventDispatcher) OnP2MessageReactionCreatedV1

func (dispatcher *EventDispatcher) OnP2MessageReactionCreatedV1(handler func(ctx context.Context, event *larkim.P2MessageReactionCreatedV1) error) *EventDispatcher

新增消息表情回复

- 消息被添加某一个表情回复后触发此事件

- 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 具备==获取单聊、群组消息== 或 ==获取与发送单聊、群组消息==权限,并订阅 ==消息与群组== 分类下的 ==消息被reaction== 事件才可接收推送;- 机器人只能收到所在群聊内的消息被添加表情回复事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/events/created

func (*EventDispatcher) OnP2MessageReactionDeletedV1

func (dispatcher *EventDispatcher) OnP2MessageReactionDeletedV1(handler func(ctx context.Context, event *larkim.P2MessageReactionDeletedV1) error) *EventDispatcher

删除消息表情回复

- 消息被删除某一个表情回复后触发此事件

- 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 具备==获取单聊、群组消息== 或 ==获取与发送单聊、群组消息==权限,并订阅 ==消息与群组== 分类下的 ==消息被取消reaction== 事件才可接收推送;- 机器人只能收到所在群聊内的消息被删除表情回复事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/events/deleted

func (*EventDispatcher) OnP2MessageReadV1

func (dispatcher *EventDispatcher) OnP2MessageReadV1(handler func(ctx context.Context, event *larkim.P2MessageReadV1) error) *EventDispatcher

消息已读

- 用户阅读机器人发送的单聊消息后触发此事件。

- 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability) ;- 需要订阅 ==消息与群组== 分类下的 ==消息已读== 事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/events/message_read

func (*EventDispatcher) OnP2MessageRecalledV1 added in v3.0.10

func (dispatcher *EventDispatcher) OnP2MessageRecalledV1(handler func(ctx context.Context, event *larkim.P2MessageRecalledV1) error) *EventDispatcher

消息撤回事件

- 消息被撤回后触发此事件。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/events/recalled

func (*EventDispatcher) OnP2MessageReceiveV1

func (dispatcher *EventDispatcher) OnP2MessageReceiveV1(handler func(ctx context.Context, event *larkim.P2MessageReceiveV1) error) *EventDispatcher

接收消息

- 机器人接收到用户发送的消息后触发此事件。

- 注意事项:;- 需要开启[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability),并订阅 ==消息与群组== 分类下的 ==接收消息v2.0== 事件才可接收推送;- 同时,将根据应用具备的权限,判断可推送的信息:; - 当具备==获取用户发给机器人的单聊消息==权限或者==读取用户发给机器人的单聊消息(历史权限)==,可接收与机器人单聊会话中用户发送的所有消息; - 当具备==获取群组中所有消息== 权限时,可接收与机器人所在群聊会话中用户发送的所有消息; - 当具备==获取用户在群组中@机器人的消息== 权限或者==获取用户在群聊中@机器人的消息(历史权限)==,可接收机器人所在群聊中用户 @ 机器人的消息

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/events/receive

func (*EventDispatcher) OnP2NotificationApproveV1 added in v3.0.1

func (dispatcher *EventDispatcher) OnP2NotificationApproveV1(handler func(ctx context.Context, event *larkhelpdesk.P2NotificationApproveV1) error) *EventDispatcher

审核事件

- Push审核状态通知事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/notification/events/approve

func (*EventDispatcher) OnP2OffboardingChecklistUpdatedV2 added in v3.2.6

func (dispatcher *EventDispatcher) OnP2OffboardingChecklistUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2OffboardingChecklistUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2OffboardingStatusUpdatedV2 added in v3.2.6

func (dispatcher *EventDispatcher) OnP2OffboardingStatusUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2OffboardingStatusUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2OffboardingUpdatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2OffboardingUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2OffboardingUpdatedV1) error) *EventDispatcher

离职状态变更事件

- 在离职发起审批和产生审批结果时触发该事件,审批结果产生的场景包括撤销、审批通过、审批拒绝

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/events/updated

func (*EventDispatcher) OnP2OffboardingUpdatedV2 added in v3.2.6

func (dispatcher *EventDispatcher) OnP2OffboardingUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2OffboardingUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2OfferStatusChangedV1 added in v3.0.21

func (dispatcher *EventDispatcher) OnP2OfferStatusChangedV1(handler func(ctx context.Context, event *larkhire.P2OfferStatusChangedV1) error) *EventDispatcher

Offer 状态变更

- 当 Offer 状态发生变更时将触发该事件。

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/events/status_changed

func (*EventDispatcher) OnP2OrgRoleAuthorizationUpdatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2OrgRoleAuthorizationUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2OrgRoleAuthorizationUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2PersonCreatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2PersonCreatedV1(handler func(ctx context.Context, event *larkcorehr.P2PersonCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2PersonDeletedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2PersonDeletedV1(handler func(ctx context.Context, event *larkcorehr.P2PersonDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2PersonUpdatedV1 added in v3.0.22

func (dispatcher *EventDispatcher) OnP2PersonUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2PersonUpdatedV1) error) *EventDispatcher

个人信息更新

- 员工在飞书人事的「个人信息被更新」时将触发此事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/events/updated

func (*EventDispatcher) OnP2PostCreatedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2PostCreatedV1(handler func(ctx context.Context, event *larkmoments.P2PostCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2PostDeletedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2PostDeletedV1(handler func(ctx context.Context, event *larkmoments.P2PostDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2PostStatisticsUpdatedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2PostStatisticsUpdatedV1(handler func(ctx context.Context, event *larkmoments.P2PostStatisticsUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2PreHireUpdatedV1 added in v3.0.31

func (dispatcher *EventDispatcher) OnP2PreHireUpdatedV1(handler func(ctx context.Context, event *larkcorehr.P2PreHireUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ProbationUpdatedV2 added in v3.1.0

func (dispatcher *EventDispatcher) OnP2ProbationUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2ProbationUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ProcessApproverUpdatedV2 added in v3.1.0

func (dispatcher *EventDispatcher) OnP2ProcessApproverUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2ProcessApproverUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ProcessCcUpdatedV2 added in v3.1.0

func (dispatcher *EventDispatcher) OnP2ProcessCcUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2ProcessCcUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ProcessNodeUpdatedV2 added in v3.2.2

func (dispatcher *EventDispatcher) OnP2ProcessNodeUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2ProcessNodeUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ProcessUpdatedV2 added in v3.1.0

func (dispatcher *EventDispatcher) OnP2ProcessUpdatedV2(handler func(ctx context.Context, event *larkcorehr.P2ProcessUpdatedV2) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ReactionCreatedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2ReactionCreatedV1(handler func(ctx context.Context, event *larkmoments.P2ReactionCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ReactionDeletedV1 added in v3.3.3

func (dispatcher *EventDispatcher) OnP2ReactionDeletedV1(handler func(ctx context.Context, event *larkmoments.P2ReactionDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ReferralAccountAssetsUpdateV1 added in v3.0.32

func (dispatcher *EventDispatcher) OnP2ReferralAccountAssetsUpdateV1(handler func(ctx context.Context, event *larkhire.P2ReferralAccountAssetsUpdateV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2ReserveConfigUpdatedV1 added in v3.0.17

func (dispatcher *EventDispatcher) OnP2ReserveConfigUpdatedV1(handler func(ctx context.Context, event *larkvc.P2ReserveConfigUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2RoomCreatedV1 added in v3.0.10

func (dispatcher *EventDispatcher) OnP2RoomCreatedV1(handler func(ctx context.Context, event *larkvc.P2RoomCreatedV1) error) *EventDispatcher

创建会议室

- 当创建会议室时,会触发该事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/events/created

func (*EventDispatcher) OnP2RoomDeletedV1 added in v3.0.10

func (dispatcher *EventDispatcher) OnP2RoomDeletedV1(handler func(ctx context.Context, event *larkvc.P2RoomDeletedV1) error) *EventDispatcher

删除会议室

- 当删除会议室时,会触发该事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/events/deleted

func (*EventDispatcher) OnP2RoomLevelCreatedV1 added in v3.0.17

func (dispatcher *EventDispatcher) OnP2RoomLevelCreatedV1(handler func(ctx context.Context, event *larkvc.P2RoomLevelCreatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2RoomLevelDeletedV1 added in v3.0.17

func (dispatcher *EventDispatcher) OnP2RoomLevelDeletedV1(handler func(ctx context.Context, event *larkvc.P2RoomLevelDeletedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2RoomLevelUpdatedV1 added in v3.0.17

func (dispatcher *EventDispatcher) OnP2RoomLevelUpdatedV1(handler func(ctx context.Context, event *larkvc.P2RoomLevelUpdatedV1) error) *EventDispatcher

-

- 事件描述文档链接:

func (*EventDispatcher) OnP2RoomUpdatedV1 added in v3.0.10

func (dispatcher *EventDispatcher) OnP2RoomUpdatedV1(handler func(ctx context.Context, event *larkvc.P2RoomUpdatedV1) error) *EventDispatcher

更新会议室

- 当更新会议室时,会触发该事件

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/events/updated

func (*EventDispatcher) OnP2ScopeUpdatedV3

func (dispatcher *EventDispatcher) OnP2ScopeUpdatedV3(handler func(ctx context.Context, event *larkcontact.P2ScopeUpdatedV3) error) *EventDispatcher

通讯录范围权限被更新

- 当应用通讯录范围权限发生变更时,订阅这个事件的应用会收到事件。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/scope/events/updated

func (*EventDispatcher) OnP2TalentDeletedV1 added in v3.3.0

func (dispatcher *EventDispatcher) OnP2TalentDeletedV1(handler func(ctx context.Context, event *larkhire.P2TalentDeletedV1) error) *EventDispatcher

删除人才

- 删除人才

- 事件描述文档链接:https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/events/deleted

func (*EventDispatcher) OnP2TaskCommentUpdatedV1

func (dispatcher *EventDispatcher) OnP2TaskCommentUpdatedV1(handler func(ctx context.Context, event *larktask.P2TaskCommentUpdatedV1) error) *EventDispatcher

任务评论信息变更

- 当 APP 创建的任务评论信息发生变更时触发此事件,包括任务评论的创建、回复、更新、删除。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/events/updated

func (*EventDispatcher) OnP2TaskUpdateTenantV1

func (dispatcher *EventDispatcher) OnP2TaskUpdateTenantV1(handler func(ctx context.Context, event *larktask.P2TaskUpdateTenantV1) error) *EventDispatcher

任务信息变更(租户维度)

- APP 订阅此事件后可接收到该 APP 所在租户的所有来源接口创建的任务的变更事件。事件体为发生变更任务的相关用户的 open_id,可用此 open_id ,通过 获取任务列表接口获取与该用户相关的所有任务。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/events/update_tenant

func (*EventDispatcher) OnP2TaskUpdatedV1

func (dispatcher *EventDispatcher) OnP2TaskUpdatedV1(handler func(ctx context.Context, event *larktask.P2TaskUpdatedV1) error) *EventDispatcher

任务信息变更

- 当 APP 订阅此事件后可以接收到由该 APP 创建的任务发生的变更,包括任务标题、描述、截止时间、协作者、关注者、提醒时间、状态(完成或取消完成)。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/events/updated

func (*EventDispatcher) OnP2TicketCreatedV1 added in v3.0.1

func (dispatcher *EventDispatcher) OnP2TicketCreatedV1(handler func(ctx context.Context, event *larkhelpdesk.P2TicketCreatedV1) error) *EventDispatcher

工单创建事件

- 可监听服务台的工单创建事件。需使用订阅接口订阅:[事件订阅](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/event/overview)

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/events/created

func (*EventDispatcher) OnP2TicketMessageCreatedV1 added in v3.0.1

func (dispatcher *EventDispatcher) OnP2TicketMessageCreatedV1(handler func(ctx context.Context, event *larkhelpdesk.P2TicketMessageCreatedV1) error) *EventDispatcher

工单消息事件

- 该消息事件属于工单消息事件。需使用订阅接口订阅:[事件订阅](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/event/overview)

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_message/events/created

func (*EventDispatcher) OnP2TicketUpdatedV1 added in v3.0.1

func (dispatcher *EventDispatcher) OnP2TicketUpdatedV1(handler func(ctx context.Context, event *larkhelpdesk.P2TicketUpdatedV1) error) *EventDispatcher

工单状态变更事件

- 可监听工单状态和阶段变更事件。需使用订阅接口订阅:[事件订阅](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/event/overview)

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket/events/updated

func (*EventDispatcher) OnP2UserCreatedV3

func (dispatcher *EventDispatcher) OnP2UserCreatedV3(handler func(ctx context.Context, event *larkcontact.P2UserCreatedV3) error) *EventDispatcher

员工入职

- 通过该事件订阅员工入职。

- 只有当应用拥有被改动字段的数据权限时,才会接收到事件。具体的数据权限与字段的关系请参考[应用权限](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN),或查看事件体参数列表的字段描述。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/events/created

func (*EventDispatcher) OnP2UserDeletedV3

func (dispatcher *EventDispatcher) OnP2UserDeletedV3(handler func(ctx context.Context, event *larkcontact.P2UserDeletedV3) error) *EventDispatcher

员工离职

- 通过该事件订阅员工离职。应用身份访问通讯录的权限为历史版本,不推荐申请。

- 只有当应用拥有被改动字段的数据权限时,才会接收到事件。具体的数据权限与字段的关系请参考[应用权限](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN),或查看事件体参数列表的字段描述。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/events/deleted

func (*EventDispatcher) OnP2UserUpdatedV1

func (dispatcher *EventDispatcher) OnP2UserUpdatedV1(handler func(ctx context.Context, event *larkacs.P2UserUpdatedV1) error) *EventDispatcher

用户信息变更

- 智能门禁用户特征值变化时,发送此事件。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/events/updated

func (*EventDispatcher) OnP2UserUpdatedV3

func (dispatcher *EventDispatcher) OnP2UserUpdatedV3(handler func(ctx context.Context, event *larkcontact.P2UserUpdatedV3) error) *EventDispatcher

员工变更

- 通过该事件订阅员工变更。old_object中只展示更新的字段的原始值。

- 只有当应用拥有被改动字段的数据权限时,才会接收到事件。具体的数据权限与字段的关系请参考[应用权限](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN),或查看事件体参数列表的字段描述。

- 事件描述文档链接:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/events/updated

func (*EventDispatcher) ParseReq

func (dispatcher *EventDispatcher) ParseReq(ctx context.Context, req *larkevent.EventReq) (string, error)

func (*EventDispatcher) VerifySign

func (dispatcher *EventDispatcher) VerifySign(ctx context.Context, req *larkevent.EventReq) error

type NotFoundEventHandlerErr added in v3.2.0

type NotFoundEventHandlerErr struct {
	// contains filtered or unexported fields
}

func (NotFoundEventHandlerErr) Error added in v3.2.0

func (e NotFoundEventHandlerErr) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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