@lark-project/cli
Version:
飞书项目插件开发工具
114 lines (113 loc) • 2.52 kB
TypeScript
export declare enum ECommandName {
init = "init",
start = "start",
build = "build",
release = "release",
config = "config",
update = "update"
}
/**
* 插件框架版本
*/
export declare enum EPluginFrameworkVersion {
v1 = "1.0.0",
v2 = "2.0.0"
}
/**
* 插件产物配置项(2.0 插件框架)
*/
export interface IPluginConfigResource {
id: string;
entry: string;
}
/**
* 插件配置文件(2.0 插件框架)
*/
export interface IPluginConfig {
siteDomain: string;
pluginId: string;
pluginSecret: string;
resources: IPluginConfigResource[];
}
/**
* 插件构成后端类型枚举
*/
export declare enum EFeatureType {
page = "board",// 导航
button = "button",// 按钮
tab = "dashboard",// 详情页标签
control = "control",// 控件
view = "view",// 视图模式
config = "config",// 插件配置页
intercept = "intercept",// 拦截事件
component = "component",
field_template = "field_template"
}
/**
* component 组件类型
*/
export declare enum ECompType {
schedule = "component_schedule"
}
/**
* 插件构成适用工作项类型范围枚举
*/
export declare enum EFeatureWorkItemTypeScope {
all = "_all",
issue = "issue",
sprint = "sprint",
story = "story",
version = "version",
others = "work_object"
}
/**
* 插件构成适配端类型枚举
*/
export declare enum EFeaturePlatform {
web = "web",
mobile = "mobile"
}
/**
* 插件构成适用位置
*/
export declare enum EFeatureScene {
controlTable = 1,
controlDetailForm = 2,
controlNodeForm = 6,
buttonWorkItemMore = 3,
buttonWorkItemNodeMore = 4,
buttonWorkItemCreate = 5,
buttonWorkItemNodeComplete = 7,// 节点按钮完成事件
buttonScheduleUnit = 8,// 计划表更多按钮
buttonBatch = 9
}
/**
* 插件构成
*/
export interface IPluginFeature {
key: string;
name: string;
icon: string;
type: EFeatureType;
component_type: ECompType;
workItemTypeKeys: EFeatureWorkItemTypeScope[];
customWorkItemTypeKeys?: string[];
[EFeaturePlatform.mobile]: {
scenes: EFeatureScene[];
resourceId: {
resource: string;
};
};
[EFeaturePlatform.web]: {
scenes: EFeatureScene[];
resourceId: {
resource: string;
};
};
extension?: {
ext_key: string;
ext_type: string;
ext_subType: string;
ext_config: unknown;
}[];
}