@@ -116,6 +116,14 @@ declare module "util" {
116116 * @returns {number }
117117 */
118118 export function getTimeDiffInMilliseconds ( start : Date , end : Date ) : number ;
119+ /**
120+ * Checks if the embed type is for create
121+ *
122+ * @export
123+ * @param {string } embedType
124+ * @returns {boolean }
125+ */
126+ export function isCreate ( embedType : string ) : boolean ;
119127}
120128declare module "embed" {
121129 import * as models from 'powerbi-models' ;
@@ -249,13 +257,6 @@ declare module "embed" {
249257 * @hidden
250258 */
251259 bootstrapConfig : IBootstrapEmbedConfiguration ;
252- /**
253- * Gets or sets the configuration settings for creating report.
254- *
255- * @type {models.IReportCreateConfiguration }
256- * @hidden
257- */
258- createConfig : models . IReportCreateConfiguration ;
259260 /**
260261 * Url used in the load request.
261262 *
@@ -299,19 +300,12 @@ declare module "embed" {
299300 */
300301 constructor ( service : Service , element : HTMLElement , config : IEmbedConfigurationBase , iframe ?: HTMLIFrameElement , phasedRender ?: boolean , isBootstrap ?: boolean ) ;
301302 /**
302- * Sends createReport configuration data.
303- *
304- * ```javascript
305- * createReport({
306- * datasetId: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
307- * accessToken: 'eyJ0eXA ... TaE2rTSbmg',
308- * ```
303+ * Create is not supported by default
309304 *
310305 * @hidden
311- * @param {models.IReportCreateConfiguration } config
312306 * @returns {Promise<void> }
313307 */
314- createReport ( config : models . IReportCreateConfiguration ) : Promise < void > ;
308+ create ( ) : Promise < void > ;
315309 /**
316310 * Saves Report.
317311 *
@@ -1633,6 +1627,13 @@ declare module "create" {
16331627 * @extends {Embed }
16341628 */
16351629 export class Create extends Embed {
1630+ /**
1631+ * Gets or sets the configuration settings for creating report.
1632+ *
1633+ * @type {IReportCreateConfiguration }
1634+ * @hidden
1635+ */
1636+ createConfig : IReportCreateConfiguration ;
16361637 constructor ( service : Service , element : HTMLElement , config : IEmbedConfiguration | IReportCreateConfiguration , phasedRender ?: boolean , isBootstrap ?: boolean ) ;
16371638 /**
16381639 * Gets the dataset ID from the first available location: createConfig or embed url.
@@ -1678,6 +1679,19 @@ declare module "create" {
16781679 * @hidden
16791680 */
16801681 static findIdFromEmbedUrl ( url : string ) : string ;
1682+ /**
1683+ * Sends create configuration data.
1684+ *
1685+ * ```javascript
1686+ * create ({
1687+ * datasetId: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
1688+ * accessToken: 'eyJ0eXA ... TaE2rTSbmg',
1689+ * ```
1690+ *
1691+ * @hidden
1692+ * @returns {Promise<void> }
1693+ */
1694+ create ( ) : Promise < void > ;
16811695 }
16821696}
16831697declare module "dashboard" {
@@ -2003,11 +2017,70 @@ declare module "visual" {
20032017 private getFiltersLevelUrl ;
20042018 }
20052019}
2020+ declare module "quickCreate" {
2021+ import { IError , IQuickCreateConfiguration } from 'powerbi-models' ;
2022+ import { Service } from "service" ;
2023+ import { Embed , IEmbedConfigurationBase } from "embed" ;
2024+ /**
2025+ * A Power BI Quick Create component
2026+ *
2027+ * @export
2028+ * @class QuickCreate
2029+ * @extends {Embed }
2030+ */
2031+ export class QuickCreate extends Embed {
2032+ /**
2033+ * Gets or sets the configuration settings for creating report.
2034+ *
2035+ * @type {IQuickCreateConfiguration }
2036+ * @hidden
2037+ */
2038+ createConfig : IQuickCreateConfiguration ;
2039+ constructor ( service : Service , element : HTMLElement , config : IQuickCreateConfiguration , phasedRender ?: boolean , isBootstrap ?: boolean ) ;
2040+ /**
2041+ * Override the getId abstract function
2042+ * QuickCreate does not need any ID
2043+ *
2044+ * @returns {string }
2045+ */
2046+ getId ( ) : string ;
2047+ /**
2048+ * Validate create report configuration.
2049+ */
2050+ validate ( config : IEmbedConfigurationBase ) : IError [ ] ;
2051+ /**
2052+ * Handle config changes.
2053+ *
2054+ * @hidden
2055+ * @returns {void }
2056+ */
2057+ configChanged ( isBootstrap : boolean ) : void ;
2058+ /**
2059+ * @hidden
2060+ * @returns {string }
2061+ */
2062+ getDefaultEmbedUrlEndpoint ( ) : string ;
2063+ /**
2064+ * Sends quickCreate configuration data.
2065+ *
2066+ * ```javascript
2067+ * quickCreate({
2068+ * accessToken: 'eyJ0eXA ... TaE2rTSbmg',
2069+ * datasetCreateConfig: {}})
2070+ * ```
2071+ *
2072+ * @hidden
2073+ * @param {IQuickCreateConfiguration } createConfig
2074+ * @returns {Promise<void> }
2075+ */
2076+ create ( ) : Promise < void > ;
2077+ }
2078+ }
20062079declare module "service" {
20072080 import { WindowPostMessageProxy } from 'window-post-message-proxy' ;
20082081 import { HttpPostMessage } from 'http-post-message' ;
20092082 import { Router , IExtendedRequest , Response as IExtendedResponse } from 'powerbi-router' ;
2010- import { IReportCreateConfiguration } from 'powerbi-models' ;
2083+ import { IQuickCreateConfiguration , IReportCreateConfiguration } from 'powerbi-models' ;
20112084 import { Embed , IBootstrapEmbedConfiguration , IDashboardEmbedConfiguration , IEmbedConfiguration , IEmbedConfigurationBase , IQnaEmbedConfiguration , IReportEmbedConfiguration , ITileEmbedConfiguration , IVisualEmbedConfiguration } from "embed" ;
20122085 export interface IEvent < T > {
20132086 type : string ;
@@ -2120,6 +2193,14 @@ declare module "service" {
21202193 * @returns {Embed }
21212194 */
21222195 createReport ( element : HTMLElement , config : IEmbedConfiguration | IReportCreateConfiguration ) : Embed ;
2196+ /**
2197+ * Creates new dataset
2198+ *
2199+ * @param {HTMLElement } element
2200+ * @param {IEmbedConfiguration } [config={}]
2201+ * @returns {Embed }
2202+ */
2203+ quickCreate ( element : HTMLElement , config : IQuickCreateConfiguration ) : Embed ;
21232204 /**
21242205 * TODO: Add a description here
21252206 *
0 commit comments