Skip to content

Commit f317eb2

Browse files
author
Omri Armstrong
committed
updating package.json of models
1 parent 5d4e0f6 commit f317eb2

16 files changed

Lines changed: 621 additions & 143 deletions

demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"es6-promise": "^3.2.2",
3535
"bootstrap": "^3.3.6",
3636
"jquery": "^3.1.0",
37-
"powerbi-client": "^2.2.1",
37+
"powerbi-client": "^2.2.7",
3838
"http-server": "^0.9.0"
3939
},
4040
"devDependencies": {}

dist/config.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
1+
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
22
declare const config: {
33
version: string;
44
type: string;

dist/create.d.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
2+
import * as service from './service';
3+
import * as models from 'powerbi-models';
4+
import * as embed from './embed';
5+
export declare class Create extends embed.Embed {
6+
constructor(service: service.Service, element: HTMLElement, config: embed.IEmbedConfiguration);
7+
/**
8+
* Gets the dataset ID from the first available location: createConfig or embed url.
9+
*
10+
* @returns {string}
11+
*/
12+
getId(): string;
13+
/**
14+
* Validate create report configuration.
15+
*/
16+
validate(config: models.IReportCreateConfiguration): models.IError[];
17+
/**
18+
* Adds the ability to get datasetId from url.
19+
* (e.g. http://embedded.powerbi.com/appTokenReportEmbed?datasetId=854846ed-2106-4dc2-bc58-eb77533bf2f1).
20+
*
21+
* By extracting the ID we can ensure that the ID is always explicitly provided as part of the create configuration.
22+
*
23+
* @static
24+
* @param {string} url
25+
* @returns {string}
26+
*/
27+
static findIdFromEmbedUrl(url: string): string;
28+
}

dist/dashboard.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
1+
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
22
import * as service from './service';
33
import * as embed from './embed';
44
import * as models from 'powerbi-models';

dist/embed.d.ts

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
1+
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
22
import * as service from './service';
33
import * as models from 'powerbi-models';
44
declare 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
}
3134
export 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
}

dist/factories.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
1+
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
22
/**
33
* TODO: Need to find better place for these factory functions or refactor how we handle dependency injection
44
*/

dist/ifilterable.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
1+
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
22
import * as models from 'powerbi-models';
33
/**
44
* Decorates embed components that support filters

dist/page.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
1+
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
22
import { IFilterable } from './ifilterable';
33
import { IReportNode } from './report';
44
import * as models from 'powerbi-models';

dist/powerbi.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! powerbi-client v2.2.6 | (c) 2016 Microsoft Corporation MIT */
1+
/*! powerbi-client v2.2.7 | (c) 2016 Microsoft Corporation MIT */
22
import * as service from './service';
33
import * as factories from './factories';
44
import * as models from 'powerbi-models';

0 commit comments

Comments
 (0)