SuperAPI AI 工具集

add-connector

编程与开发

查看项目

更新于 10-16 06:47

技能介绍

用途:向 Power Apps 代码应用添加任意 Power Platform 连接器,是未被专用技能覆盖的连接器的通用回退方案。常见连接器应优先使用专用技能:Dataverse 用 /add-dataverse,Azure DevOps 用 /add-azuredevops,Teams 用 /add-teams,Excel Online(Business)用 /add-excel,OneDrive for Business 用 /add-onedrive,SharePoint Online 用 /add-sharepoint,Office 365 Outlook 用 /add-office365,Work IQ 用 /add-workiq;若连接器有专用技能,应立即改调该技能并停止本流程。

主要流程:检查 memory-bank.md;确定连接器(可由 $ARGUMENTS 直接指定);先运行 /list-connections 查找连接 ID,若无连接,按当前环境的 Connections URL 手动创建;然后执行添加命令。非表格类连接器(Teams、Azure DevOps 等):pa app add data-source --connector <connector-api-name> -c <connection-id>。表格类连接器(SharePoint、Excel、SQL 等)还需 dataset 与 table:pa app add data-source --connector <connector-api-name> -c <connection-id> -d '<dataset>' --table '<table>'。参数中 --connector 为连接器 API 名,-c 为连接 ID(除 Dataverse 外均必填),-d 为 dataset,--table 为表/列表名。

添加后检查生成文件:src/generated/services/<Connector>Service.ts(可用 Grep 查找 async 方法)、src/generated/models/<Connector>Model.ts、.power/schemas/<connector>/,确认方法签名、必填与可选参数及返回类型,再协助编写调用代码。最后运行 npm run build,修复 TypeScript 错误,暂不部署,并更新 memory-bank.md(连接器、已配置操作、构建状态)。

限制:具体连接器支持范围与专用技能划分依据公开资料;未提供的细节暂未提供。