// 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"
)

// EventV1AppUninstalled 了解事件订阅的使用场景和配置流程, 请点击查看 [事件订阅概述](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM)
//
// - 自建应用无此事件。
// - 企业解散后会推送此事件。商店应用开发者可在收到此事件后进行相应的账户注销、数据清理等处理。
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/event/app-uninstalled
// new doc: https://open.feishu.cn/document/server-docs/application-v6/event/app-uninstalled
func (r *EventCallbackService) HandlerEventV1AppUninstalled(f EventV1AppUninstalledHandler) {
	r.cli.eventHandler.eventV1AppUninstalledHandler = f
}

// EventV1AppUninstalledHandler event EventV1AppUninstalled handler
type EventV1AppUninstalledHandler func(ctx context.Context, cli *Lark, schema string, header *EventHeaderV1, event *EventV1AppUninstalled) (string, error)

// EventV1AppUninstalled ...
type EventV1AppUninstalled struct {
	AppID     string `json:"app_id,omitempty"`     // 被卸载的应用ID. 如: cli_xxx
	TenantKey string `json:"tenant_key,omitempty"` // 卸载应用的企业ID. 如: xxx
	Type      string `json:"type,omitempty"`       // 事件类型. 如: app_uninstalled
}
