Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug] Power BI connector generated client fails TypeScript type check (Goals operations)

Abierto
#47 1 comentario 0 reacciones 1 asignado Ver en GitHub

@eschavez ya está trabajando en esto.

Desde el 23/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

bug

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.
  1. GoalValueOrNoteUpserted.checkIns[].status references a type GoalValueOrNoteUpsertedstatus that 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;
  1. GetGoal puts a required $expand after the optional pbi_source. Per the Power BI REST docs (Goals – Get By ID), expand is 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

  1. Create a code app / managed app (React + Vite + TypeScript template).
  2. Add data source: connector shared_powerbi, action mode (no table).
  3. Run tsc -p tsconfig.app.json --noEmit (or the template's typecheck script).
  4. 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-apps 0.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.

Lenguaje dominante
TypeScript
Estrellas
27
Forks
8
Merge medio
5 h 29 min
PR fusionados (30 d)
4

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/managed-apps

Todos los issues de microsoft/managed-apps

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.