// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
 * Copyright 2022 chyroc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package lark

import (
	"context"
)

// EventV2CorehrProcessUpdatedV2 发起流程后会生成一个流程实例（process_id 是唯一标识）。流程中有审批人操作、流程数据更新、流程状态变化等都会触发事件, 比如流程发起后, 创建流程实例并生成节点每个人的待办任务, 可能会触发多条事件。
//
// 你需要在应用内配置事件订阅, 并订阅该事件, 这样才可以在事件触发时接收到事件数据。了解事件订阅可参见[事件概述](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM)。
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/process/events/updated
func (r *EventCallbackService) HandlerEventV2CorehrProcessUpdatedV2(f EventV2CorehrProcessUpdatedV2Handler) {
	r.cli.eventHandler.eventV2CorehrProcessUpdatedV2Handler = f
}

// EventV2CorehrProcessUpdatedV2Handler event EventV2CorehrProcessUpdatedV2 handler
type EventV2CorehrProcessUpdatedV2Handler func(ctx context.Context, cli *Lark, schema string, header *EventHeaderV2, event *EventV2CorehrProcessUpdatedV2) (string, error)

// EventV2CorehrProcessUpdatedV2 ...
type EventV2CorehrProcessUpdatedV2 struct {
	ProcessID string `json:"process_id,omitempty"` // 流程实例ID
	Status    int64  `json:"status,omitempty"`     // 变更后状态: 1 发起/进行中, 9 完成, 2拒绝, 4 撤回, 8 撤销, 可选值有: 1: 发起/进行中, 9: 完成, 2: 拒绝, 4: 撤回, 8: 撤销
	BizType   string `json:"biz_type,omitempty"`   // 业务类型, 详情请查看[业务类型](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/process-approver/events/biz-type), 长度范围: `1` ～ `200` 字符
}
