UNPKG

@lark-project/cli

Version:

飞书项目插件开发工具

45 lines (44 loc) 1.58 kB
import { AppType } from "../../types"; /** * 对齐 IDL:meego_idl/app_center/api/api_app_development.thrift * - APICreateAppRequest / APICreateAppResponse * - POST /goapi/v5/app/development/tool/plugin/create */ export interface AppBasicInfo { /** 插件使用场景(IDL: SceneType) */ scene?: number; /** 是否跨空间 */ cross_prj_flag?: boolean; /** 插件名称 */ name?: string; /** 插件图标 */ icon?: string; /** 是否 onboarding 插件:0/1 */ onboarding_type?: number; /** 插件类型(IDL: AppType):0 普通插件 / 1 AI */ app_type?: number; /** 插件能力点位类型(AI 插件必传,与 app_type=1 配套) */ point_types?: string[]; } interface APICreateAppResponseBody { certificate?: AppBasicInfo; app_key?: string; app_secret?: string; } interface CreatePluginRequest { siteDomain: string; /** 对齐 IDL:certificate.name */ name: string; /** 对齐 IDL:api_only */ apiOnly?: boolean; /** 插件图标 */ icon?: string; /** 对齐 IDL:release_product */ releaseProduct?: boolean; /** 插件形态。映射到 certificate.app_type / point_types。不传按 'normal'。 */ appType?: AppType; /** 额外可选字段(对齐 IDL:AppBasicInfo),会被 appType / name 派生值覆盖 */ basicInfo?: Omit<AppBasicInfo, 'name'>; } export declare function createPlugin({ siteDomain, name, apiOnly, releaseProduct, icon, appType, basicInfo, }: CreatePluginRequest): Promise<APICreateAppResponseBody>; export {};