UNPKG

@lark-project/cli

Version:

飞书项目插件开发工具

16 lines (15 loc) 774 B
import { AppType } from "../types"; /** * 从后端 GetAppDescriptionInfo 响应(`app_type` 0 普通 / 1 AI,+ `point_types`)派生出 * 本地 plugin.config.json 用的 `AppType` 字符串。config-only init 用它把正确的 app_type * 写进 handle,使 perm / local-config 走对 normal vs AI 分支。 * * 判定规则(对齐 `app-type-guard.ts` 的比对逻辑): * - app_type 非 1(0 / 缺失 / 未知)→ `normal` * - app_type=1 且 point_types 含 `ai_node``ai_node`;含 `ai_field``ai_field` * - app_type=1 但 point_types 缺失 / 不含 AI 关键字(后端数据异常)→ `normal`(不猜) */ export declare function deriveAppTypeFromBackend(descInfo: { app_type?: number; point_types?: string[]; }): AppType;