1- /*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
1+ /*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
22import * as service from './service' ;
33import * as models from 'powerbi-models' ;
44declare global {
@@ -27,6 +27,9 @@ export interface IEmbedConfiguration {
2727 pageName ?: string ;
2828 filters ?: models . IFilter [ ] ;
2929 pageView ?: models . PageView ;
30+ datasetId ?: string ;
31+ permissions ?: models . Permissions ;
32+ viewMode ?: models . ViewMode ;
3033}
3134export interface IInternalEmbedConfiguration extends models . IReportLoadConfiguration {
3235 uniqueId : string ;
@@ -83,10 +86,20 @@ export declare abstract class Embed {
8386 * @type {IInternalEmbedConfiguration }
8487 */
8588 config : IInternalEmbedConfiguration ;
89+ /**
90+ * Gets or sets the configuration settings for creating report.
91+ *
92+ * @type {models.IReportCreateConfiguration }
93+ */
94+ createConfig : models . IReportCreateConfiguration ;
8695 /**
8796 * Url used in the load request.
8897 */
8998 loadPath : string ;
99+ /**
100+ * Type of embed
101+ */
102+ embeType : string ;
90103 /**
91104 * Creates an instance of Embed.
92105 *
@@ -97,7 +110,32 @@ export declare abstract class Embed {
97110 * @param {HTMLElement } element
98111 * @param {IEmbedConfiguration } config
99112 */
100- constructor ( service : service . Service , element : HTMLElement , config : IEmbedConfiguration ) ;
113+ constructor ( service : service . Service , element : HTMLElement , config : IEmbedConfiguration , iframe ?: HTMLIFrameElement ) ;
114+ /**
115+ * Sends createReport configuration data.
116+ *
117+ * ```javascript
118+ * createReport({
119+ * datasetId: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
120+ * accessToken: 'eyJ0eXA ... TaE2rTSbmg',
121+ * ```
122+ *
123+ * @param {models.IReportCreateConfiguration } config
124+ * @returns {Promise<void> }
125+ */
126+ createReport ( config : models . IReportCreateConfiguration ) : Promise < void > ;
127+ /**
128+ * Saves Report.
129+ *
130+ * @returns {Promise<void> }
131+ */
132+ save ( ) : Promise < void > ;
133+ /**
134+ * SaveAs Report.
135+ *
136+ * @returns {Promise<void> }
137+ */
138+ saveAs ( saveAsParameters : models . ISaveAsParameters ) : Promise < void > ;
101139 /**
102140 * Sends load configuration data.
103141 *
@@ -168,6 +206,12 @@ export declare abstract class Embed {
168206 * ```
169207 */
170208 reload ( ) : Promise < void > ;
209+ /**
210+ * Set accessToken.
211+ *
212+ * @returns {Promise<void> }
213+ */
214+ setAccessToken ( accessToken : string ) : Promise < void > ;
171215 /**
172216 * Gets an access token from the first available location: config, attribute, global.
173217 *
@@ -176,6 +220,14 @@ export declare abstract class Embed {
176220 * @returns {string }
177221 */
178222 private getAccessToken ( globalAccessToken ) ;
223+ /**
224+ * Populate config for create and load
225+ *
226+ * @private
227+ * @param {IEmbedConfiguration }
228+ * @returns {void }
229+ */
230+ private populateConfig ( config ) ;
179231 /**
180232 * Gets an embed url from the first available location: options, attribute.
181233 *
@@ -216,7 +268,11 @@ export declare abstract class Embed {
216268 */
217269 private isFullscreen ( iframe ) ;
218270 /**
219- * Validate load configuration.
271+ * Validate load and create configuration.
272+ */
273+ abstract validate ( config : models . IReportLoadConfiguration | models . IDashboardLoadConfiguration | models . IReportCreateConfiguration ) : models . IError [ ] ;
274+ /**
275+ * Sets Iframe for embed
220276 */
221- abstract validate ( config : models . IReportLoadConfiguration | models . IDashboardLoadConfiguration ) : models . IError [ ] ;
277+ private setIframe ( isLoad ) ;
222278}
0 commit comments