You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f0079a8
Browse filesBrowse the repository at this point in the historyBrowse files
Merged PR 1052017: Forward reportDefinition through createReport (P0 read-only preview)
## Why
The read-only "Preview report without publish" flow (P0) renders an agent-edited, unpublished report layout with live data by passing the edited layout as `reportDefinition` on `createReport`. Today `Create.configChanged` rebuilds a whitelisted `createConfig` and `create()` posts only that to `/report/create`, so `reportDefinition` is dropped before it reaches the report engine — the preview silently renders a blank create instead of the edited layout.
## What
- `src/create.ts` — copy `reportDefinition` into `createConfig` in `configChanged` so `createReport` forwards it to the bundle.
- `test/service.spec.ts` — two regression tests (forwarded when present, `undefined` when absent), mirroring the existing `theme` tests.
## How
- Cast the union config to `IReportCreateConfiguration` when reading `reportDefinition` (the field exists only on the create configuration, not on `IEmbedConfiguration`).
## Dependencies
- Requires `powerbi-models` with `IReportCreateConfiguration.reportDefinition` [Add reportDefinition support to embed configuration](https://dev.azure.com/powerbi/Embedded/_git/powerbi-models/pullrequest/1045219) to be published and consumed here before this compiles green.
Related PR:
[[ReportEmbed] [createReport] Add support for previewing report](https://dev.azure.com/powerbi/PowerBIClients/_git/PowerBIClients/pullrequest/1050455)
----
#### AI description (iteration 1)
#### PR Classification
Feature enhancement to support passing `reportDefinition` configuration through the `createReport` API for P0 read-only preview functionality.
#### PR Summary
This change enables the `reportDefinition` property to be forwarded from the embed configuration to the report creation configuration, allowing reports to be created with predefined report definitions.
- `src/create.ts`: Added `reportDefinition` property from `IReportCreateConfiguration` to the `createConfig` object
- `test/service.spec.ts`: Added two test cases to verify `reportDefinition` is correctly passed through when present and remains undefined when absent
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
----
#### AI description (iteration 4)
#### PR Classification
New feature: adds support for forwarding `reportDefinition` through `createReport` to enable read-only report preview from a report definition.
#### PR Summary
This PR extends the `createReport` API to accept an `IReportCreateFromDefinitionConfiguration`, allowing a `reportDefinition` to be included in the create config for report preview scenarios.
- `src/create.ts`: adds `isReportCreateFromDefinitionConfiguration` type guard, updates `createConfig` type to support the new definition-based config, validates using `validateCreateReportFromDefinition` when applicable, and includes `reportDefinition` in the resulting create config.
- `src/service.ts` and `src/embed.ts`: update `createReport` signature and export new `IReportCreateFromDefinitionConfiguration` type from `powerbi-models`.
- `src/po...
Copy file name to clipboardExpand all lines: package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "powerbi-client",
3
-
"version": "2.24.1",
3
+
"version": "2.25.0",
4
4
"description": "JavaScript library for embedding Power BI into your apps. Provides service which makes it easy to embed different types of components and an object model which allows easy interaction with these components such as changing pages, applying filters, and responding to data selection.",
0 commit comments