{
    "name": "install-plugin",
    "description": "在飞书项目空间中安装指定插件，并自动使用版本历史中的最新版本",
    "createdAt": "2026-05-09T13:36:50.765Z",
    "variables": [
        {
            "name": "project_key",
            "description": "飞书项目空间标识",
            "type": "input",
            "required": true
        },
        {
            "name": "app_key",
            "description": "插件标识",
            "type": "input",
            "required": true
        },
        {
            "name": "app_version",
            "description": "安装时使用的插件版本号，由版本历史接口返回",
            "type": "output",
            "sourceStepIndex": 0,
            "sourcePath": "data.versions.0.version"
        },
        {
            "name": "result_code",
            "description": "安装接口结果码，0 表示成功",
            "type": "output",
            "sourceStepIndex": 1,
            "sourcePath": "code"
        },
        {
            "name": "result_message",
            "description": "安装接口返回消息",
            "type": "output",
            "sourceStepIndex": 1,
            "sourcePath": "msg"
        },
        {
            "name": "install_notice",
            "description": "安装接口返回的提示信息",
            "type": "output",
            "sourceStepIndex": 1,
            "sourcePath": "data.notice_msg"
        }
    ],
    "steps": [
        {
            "method": "GET",
            "pathTemplate": "/goapi/v5/app/center/history/version?app_key=${app_key}&project_key=${project_key}",
            "responseSummary": "获取插件最新版本"
        },
        {
            "method": "POST",
            "pathTemplate": "/goapi/v5/app/center/store/manage",
            "bodyTemplate": {
                "project_key": "${project_key}",
                "app_key": "${app_key}",
                "app_version": "${app_version}",
                "operate_type": 1
            },
            "bodyContentType": "application/json",
            "responseSummary": "安装插件"
        }
    ]
}
