import * as pbi from 'powerbi-client' ; import { IBaseTarget , IError , IVisualCapabilities , IVisualLayout , IVisualPropertySelector , IVisualPropertyValue , } from 'powerbi-models' ; import { extensions } from './extensions' ; import { IVisualResponse } from './models' ; declare module 'report' { interface interface Report { param visualType returns { Promise < IVisualCapabilities > } getVisualCapabilities ( visualType ) : Promise < IVisualCapabilities > ; returns { Promise < string [ ] > } getAvailableVisualTypes ( ) : Promise < string [ ] > ; } } declare module 'page' { interface interface Page { param visualType param layout param autoFocus returns { ICreateVisualResponse } createVisual ( this , visualType , layout ? , autoFocus ? ) : Promise < IVisualResponse > ; param visualName deleteVisual ( this , visualName ) : Promise < void > ; } } declare module 'visualDescriptor' { interface interface VisualDescriptor { param visualType changeType ( visualType ) : Promise < void > ; returns { ( Promise < IVisualCapabilities > ) } getCapabilities ( ) : Promise < IVisualCapabilities > ; param dataRole param index getDataFieldDisplayName ( dataRole , index ) : Promise < string > ; param dataRole param index param newDisplayName setDataFieldDisplayName ( dataRole , index , newDisplayName ) : Promise < IError > ; param dataRole param dataField param index addDataField ( dataRole , dataField , index ? ) : Promise < IError > ; param dataRole returns getDataFields ( dataRole ) : Promise < IBaseTarget [ ] > ; param dataRole param index removeDataField ( dataRole , index ) : Promise < IError > ; param selector returns { ( Promise < IVisualPropertyValue > ) } getProperty ( selector ) : Promise < IVisualPropertyValue > ; param selector param value setProperty ( selector , value ) : Promise < void > ; param selector resetProperty ( selector ) : Promise < void > ; } } hidden export function startAuthoring ( ) { extensions . forEach ( ( extension ) => { extension . initialize ( ) ; } ) ; } startAuthoring ( ) ;