Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"es6-promise": "^3.2.2",
"bootstrap": "^3.3.6",
"jquery": "^3.1.0",
"powerbi-client": "^2.2.1",
"powerbi-client": "^2.2.7",
"http-server": "^0.9.0"
},
"devDependencies": {}
Expand Down
2 changes: 1 addition & 1 deletion dist/config.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
declare const config: {
version: string;
type: string;
Expand Down
28 changes: 28 additions & 0 deletions dist/create.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
import * as service from './service';
import * as models from 'powerbi-models';
import * as embed from './embed';
export declare class Create extends embed.Embed {
constructor(service: service.Service, element: HTMLElement, config: embed.IEmbedConfiguration);
/**
* Gets the dataset ID from the first available location: createConfig or embed url.
*
* @returns {string}
*/
getId(): string;
/**
* Validate create report configuration.
*/
validate(config: models.IReportCreateConfiguration): models.IError[];
/**
* Adds the ability to get datasetId from url.
* (e.g. http://embedded.powerbi.com/appTokenReportEmbed?datasetId=854846ed-2106-4dc2-bc58-eb77533bf2f1).
*
* By extracting the ID we can ensure that the ID is always explicitly provided as part of the create configuration.
*
* @static
* @param {string} url
* @returns {string}
*/
static findIdFromEmbedUrl(url: string): string;
}
2 changes: 1 addition & 1 deletion dist/dashboard.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
import * as service from './service';
import * as embed from './embed';
import * as models from 'powerbi-models';
Expand Down
64 changes: 60 additions & 4 deletions dist/embed.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
import * as service from './service';
import * as models from 'powerbi-models';
declare global {
Expand Down Expand Up @@ -27,6 +27,9 @@ export interface IEmbedConfiguration {
pageName?: string;
filters?: models.IFilter[];
pageView?: models.PageView;
datasetId?: string;
permissions?: models.Permissions;
viewMode?: models.ViewMode;
}
export interface IInternalEmbedConfiguration extends models.IReportLoadConfiguration {
uniqueId: string;
Expand Down Expand Up @@ -83,10 +86,20 @@ export declare abstract class Embed {
* @type {IInternalEmbedConfiguration}
*/
config: IInternalEmbedConfiguration;
/**
* Gets or sets the configuration settings for creating report.
*
* @type {models.IReportCreateConfiguration}
*/
createConfig: models.IReportCreateConfiguration;
/**
* Url used in the load request.
*/
loadPath: string;
/**
* Type of embed
*/
embeType: string;
/**
* Creates an instance of Embed.
*
Expand All @@ -97,7 +110,32 @@ export declare abstract class Embed {
* @param {HTMLElement} element
* @param {IEmbedConfiguration} config
*/
constructor(service: service.Service, element: HTMLElement, config: IEmbedConfiguration);
constructor(service: service.Service, element: HTMLElement, config: IEmbedConfiguration, iframe?: HTMLIFrameElement);
/**
* Sends createReport configuration data.
*
* ```javascript
* createReport({
* datasetId: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
* accessToken: 'eyJ0eXA ... TaE2rTSbmg',
* ```
*
* @param {models.IReportCreateConfiguration} config
* @returns {Promise<void>}
*/
createReport(config: models.IReportCreateConfiguration): Promise<void>;
/**
* Saves Report.
*
* @returns {Promise<void>}
*/
save(): Promise<void>;
/**
* SaveAs Report.
*
* @returns {Promise<void>}
*/
saveAs(saveAsParameters: models.ISaveAsParameters): Promise<void>;
/**
* Sends load configuration data.
*
Expand Down Expand Up @@ -168,6 +206,12 @@ export declare abstract class Embed {
* ```
*/
reload(): Promise<void>;
/**
* Set accessToken.
*
* @returns {Promise<void>}
*/
setAccessToken(accessToken: string): Promise<void>;
/**
* Gets an access token from the first available location: config, attribute, global.
*
Expand All @@ -176,6 +220,14 @@ export declare abstract class Embed {
* @returns {string}
*/
private getAccessToken(globalAccessToken);
/**
* Populate config for create and load
*
* @private
* @param {IEmbedConfiguration}
* @returns {void}
*/
private populateConfig(config);
/**
* Gets an embed url from the first available location: options, attribute.
*
Expand Down Expand Up @@ -216,7 +268,11 @@ export declare abstract class Embed {
*/
private isFullscreen(iframe);
/**
* Validate load configuration.
* Validate load and create configuration.
*/
abstract validate(config: models.IReportLoadConfiguration | models.IDashboardLoadConfiguration | models.IReportCreateConfiguration): models.IError[];
/**
* Sets Iframe for embed
*/
abstract validate(config: models.IReportLoadConfiguration | models.IDashboardLoadConfiguration): models.IError[];
private setIframe(isLoad);
}
2 changes: 1 addition & 1 deletion dist/factories.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
/**
* TODO: Need to find better place for these factory functions or refactor how we handle dependency injection
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/ifilterable.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
import * as models from 'powerbi-models';
/**
* Decorates embed components that support filters
Expand Down
2 changes: 1 addition & 1 deletion dist/page.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
import { IFilterable } from './ifilterable';
import { IReportNode } from './report';
import * as models from 'powerbi-models';
Expand Down
2 changes: 1 addition & 1 deletion dist/powerbi.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
import * as service from './service';
import * as factories from './factories';
import * as models from 'powerbi-models';
Expand Down
Loading