[Bug] Power BI connector generated client fails TypeScript type check (Goals operations)
@eschavez 已经在做这个了。
开始于 2026年10月23日。
评估
这个 Issue 还没有评估数据。
描述
Describe the bug
After adding the Power BI connector (shared_powerbi) as an action-mode data source, the generated client fails tsc --noEmit with two errors, both in Goals (scorecard) operations. The app only calls ExecuteDatasetQuery, but the generated files include all 24 operations, so the type check fails and the app can't pass a pre-publish type check. Regenerating (refresh data source) produces the same output.
Errors:
generated/models/PowerBIModel.ts(299,14): error TS2552: Cannot find name 'GoalValueOrNoteUpsertedstatus'. Did you mean 'GoalValueOrNoteUpserted'?
generated/services/PowerBIService.ts(153,5): error TS1016: A required parameter cannot follow an optional parameter.
GoalValueOrNoteUpserted.checkIns[].statusreferences a typeGoalValueOrNoteUpsertedstatusthat is never emitted (looks like an inline enum/string schema that the generator names but doesn't define):
// The status of the goal at the time of check-in.
status?: GoalValueOrNoteUpsertedstatus;
GetGoalputs a required$expandafter the optionalpbi_source. Per the Power BI REST docs (Goals – Get By ID),expandis an optional query parameter:
public static async GetGoal(
groupid: string,
scorecardId: string,
goalId: string,
pbi_source?: string,
$expand: string
): Promise<IOperationResult<FetchedGoal>>
Steps to Reproduce
- Create a code app / managed app (React + Vite + TypeScript template).
- Add data source: connector
shared_powerbi, action mode (no table). - Run
tsc -p tsconfig.app.json --noEmit(or the template'stypecheckscript). - Observe the two errors above. Refresh/regenerate the data source: same result.
Expected behavior
Generated files type-check without manual edits. Either emit the missing GoalValueOrNoteUpsertedstatus type (or fall back to string), and generate $expand as optional ($expand?: string) or order required parameters before optional ones.
Environment information
- Package:
@microsoft/managed-apps0.5.11 (app built with App Builder in Microsoft 365 Copilot) - TypeScript ~5.8.3, Vite 7
- Connector:
shared_powerbi(Power BI, Microsoft), action mode - Production build (
vite build) succeeds; only the type check fails.
Workaround
None without hand-editing generated files (which are overwritten on refresh). Fixing the two lines locally (status?: string; and $expand?: string) makes the type check pass.
Related
Originally filed as microsoft/PowerAppsCodeApps#510 and redirected here.
- 主要语言
- TypeScript
- 星标
- 32
- 派生
- 9
- 平均合并
- 5 小时 29 分钟
- 30 天内合并 PR
- 4
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/managed-apps 的其他 Issue
-
[Bug] SQL Server (`shared_sql`) action operations are always routed to `/procedures` with an unresolved path template, so Insert row (V2), Execute a SQL query (V2), Get tables (V2) etc. all return 404可能已有人在做 @tonystevenj 于 6 天前认领。 未关闭bug product team investigating
microsoft/managed-apps#45 · 1 条评论 · 已指派 1 人 ·
-
[Bug] Table-mode create/update sends a JSON body without a Content-Type header, so the SQL Server connector rejects inserts with 415 "media type 'text/plain' is not supported可能已有人在做 @tonystevenj 于 6 天前认领。 未关闭bug product team investigating
microsoft/managed-apps#44 · 1 条评论 · 已指派 1 人 ·
-
[Bug] Cannot block Tenant wide CLI path可能已有人在做 @ergonza93 于 6 天前认领。 未关闭bug
microsoft/managed-apps#43 · 1 条评论 · 已指派 1 人 ·
-
[Bug] `ms app clone` fails on macOS可能已有人在做 @sokhenglim1 于 5 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 58/100
microsoft/managed-apps#42 · 1 条评论 · 已指派 1 人 ·
-
[Bug] Device-code sign-in fails with post_request_failed: invalid_client in CLI 0.27.0–0.29.0可能已有人在做 @jiankai82 于 6 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 15/100
microsoft/managed-apps#39 · 3 条评论 · 已指派 1 人 ·
查看 microsoft/managed-apps 的全部 Issue
相似的 Issue
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
devdotfast/whiteboard#1415 · 1 条评论 ·
维护者通常 1 天内回复
-
area/sessions comp/desktop desktop/sessions P2 type/bug
难度 2/5 1-3 小时 新手友好度 84/100
NousResearch/hermes-agent#145383 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
enhancement p2 setup
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复