@@ -110,6 +110,9 @@ declare module "embed" {
110110 height ?: number ;
111111 width ?: number ;
112112 }
113+ export interface IVisualEmbedConfiguration extends IEmbedConfiguration {
114+ visualName : string ;
115+ }
113116 /**
114117 * Configuration settings for Power BI QNA embed component
115118 *
@@ -414,7 +417,7 @@ declare module "ifilterable" {
414417 removeFilters ( ) : Promise < void > ;
415418 }
416419}
417- declare module "visual " {
420+ declare module "visualDescriptor " {
418421 import * as models from 'powerbi-models' ;
419422 import { IPageNode } from "page" ;
420423 /**
@@ -434,10 +437,10 @@ declare module "visual" {
434437 * A Power BI visual within a page
435438 *
436439 * @export
437- * @class Visual
440+ * @class VisualDescriptor
438441 * @implements {IVisualNode}
439442 */
440- export class Visual implements IVisualNode {
443+ export class VisualDescriptor implements IVisualNode {
441444 /**
442445 * The visual name
443446 *
@@ -474,7 +477,7 @@ declare module "visual" {
474477declare module "page" {
475478 import { IFilterable } from "ifilterable" ;
476479 import { IReportNode } from "report" ;
477- import { Visual } from "visual " ;
480+ import { VisualDescriptor } from "visualDescriptor " ;
478481 import * as models from 'powerbi-models' ;
479482 /**
480483 * A Page node within a report hierarchy
@@ -579,9 +582,9 @@ declare module "page" {
579582 * .then(visuals => { ... });
580583 * ```
581584 *
582- * @returns {Promise<Visual []> }
585+ * @returns {Promise<VisualDescriptor []> }
583586 */
584- getVisuals ( ) : Promise < Visual [ ] > ;
587+ getVisuals ( ) : Promise < VisualDescriptor [ ] > ;
585588 }
586589}
587590declare module "defaults" {
@@ -961,6 +964,80 @@ declare module "qna" {
961964 validate ( config : embed . IEmbedConfigurationBase ) : models . IError [ ] ;
962965 }
963966}
967+ declare module "visual" {
968+ import * as service from "service" ;
969+ import * as embed from "embed" ;
970+ import * as models from 'powerbi-models' ;
971+ import { Report } from "report" ;
972+ import { Page } from "page" ;
973+ /**
974+ * The Power BI Visual embed component
975+ *
976+ * @export
977+ * @class Visual
978+ */
979+ export class Visual extends Report {
980+ static type : string ;
981+ static GetFiltersNotSupportedError : string ;
982+ static SetFiltersNotSupportedError : string ;
983+ static GetPagesNotSupportedError : string ;
984+ static SetPageNotSupportedError : string ;
985+ /**
986+ * Creates an instance of a Power BI Single Visual.
987+ *
988+ * @param {service.Service } service
989+ * @param {HTMLElement } element
990+ * @param {embed.IEmbedConfiguration } config
991+ */
992+ constructor ( service : service . Service , element : HTMLElement , baseConfig : embed . IEmbedConfigurationBase , phasedRender ?: boolean , iframe ?: HTMLIFrameElement ) ;
993+ load ( baseConfig : embed . IEmbedConfigurationBase , phasedRender ?: boolean ) : Promise < void > ;
994+ /**
995+ * Gets the list of pages within the report - not supported in visual embed.
996+ *
997+ * @returns {Promise<Page[]> }
998+ */
999+ getPages ( ) : Promise < Page [ ] > ;
1000+ /**
1001+ * Sets the active page of the report - not supported in visual embed.
1002+ *
1003+ * @param {string } pageName
1004+ * @returns {Promise<void> }
1005+ */
1006+ setPage ( pageName : string ) : Promise < void > ;
1007+ /**
1008+ * Gets filters that are applied at the visual level.
1009+ *
1010+ * ```javascript
1011+ * // Get filters applied at visual level
1012+ * visual.getFilters()
1013+ * .then(filters => {
1014+ * ...
1015+ * });
1016+ * ```
1017+ *
1018+ * @returns {Promise<models.IFilter[]> }
1019+ */
1020+ getFilters ( ) : Promise < models . IFilter [ ] > ;
1021+ /**
1022+ * Sets filters at the visual level.
1023+ *
1024+ * ```javascript
1025+ * const filters: [
1026+ * ...
1027+ * ];
1028+ *
1029+ * visual.setFilters(filters)
1030+ * .catch(errors => {
1031+ * ...
1032+ * });
1033+ * ```
1034+ *
1035+ * @param {(models.IFilter[]) } filters
1036+ * @returns {Promise<void> }
1037+ */
1038+ setFilters ( filters : models . IFilter [ ] ) : Promise < void > ;
1039+ }
1040+ }
9641041declare module "service" {
9651042 import * as embed from "embed" ;
9661043 import * as wpmp from 'window-post-message-proxy' ;
@@ -1212,6 +1289,7 @@ declare module "powerbi-client" {
12121289 export { Page } from "page" ;
12131290 export { Qna } from "qna" ;
12141291 export { Visual } from "visual" ;
1292+ export { VisualDescriptor } from "visualDescriptor" ;
12151293 global {
12161294 interface Window {
12171295 powerbi : service . Service ;
0 commit comments