powerbi-models
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -1,3 +0,2 @@ | ||
/*! powerbi-models v1.6.0 | (c) 2016 Microsoft Corporation MIT */ | ||
declare const Validators: any; | ||
/*! powerbi-models v1.7.0 | (c) 2016 Microsoft Corporation MIT */ | ||
declare type KeyValuePair = { | ||
@@ -155,2 +154,6 @@ key: string; | ||
} | ||
declare type ISelectable = IVisual; | ||
interface ICavasItemsSelection extends ISelection { | ||
selectedItems?: ISelectable[]; | ||
} | ||
interface ISwipeEvent { | ||
@@ -164,3 +167,18 @@ currentPosition: IPosition; | ||
} | ||
declare type Extensions = IExtension[]; | ||
declare type Extensions = IExtension[] | IExtensions; | ||
interface IMenuExtensionBase extends IExtensionPoint { | ||
title?: string; | ||
icon?: string; | ||
} | ||
interface IFlatMenuExtension extends IMenuExtensionBase { | ||
menuLocation?: MenuLocation; | ||
} | ||
interface IGroupedMenuExtension extends IMenuExtensionBase { | ||
groupName: string; | ||
} | ||
declare type IMenuExtension = IFlatMenuExtension | IGroupedMenuExtension; | ||
interface IExtensions { | ||
commands: ICommandExtension[]; | ||
groups?: IMenuGroupExtension[]; | ||
} | ||
interface IExtension { | ||
@@ -174,2 +192,12 @@ command?: ICommandExtension; | ||
declare type CommandExtensionSelector = IVisualSelector | IVisualTypeSelector; | ||
interface IMenuGroupExtension { | ||
name: string; | ||
title: string; | ||
/** | ||
* If menu location is top, will locate the group at the top of the menu. | ||
* If more than one extension with top value, the latest to be added, will be on top. | ||
* If menu location is bottom or undefined, the group will be added at the bottom of the menu at the time of adding the group first command. | ||
*/ | ||
menuLocation?: MenuLocation; | ||
} | ||
interface ICommandExtension extends IExtensionItem { | ||
@@ -186,7 +214,2 @@ title: string; | ||
} | ||
interface IMenuExtension extends IExtensionPoint { | ||
title?: string; | ||
icon?: string; | ||
menuLocation?: MenuLocation; | ||
} | ||
declare enum MenuLocation { | ||
@@ -459,2 +482,75 @@ Bottom = 0, | ||
declare function isColumnAggr(arg: any): arg is IColumnAggrTarget; | ||
interface IBootstrapEmbedConfiguration { | ||
hostname?: string; | ||
embedUrl?: string; | ||
settings?: ISettings; | ||
uniqueId?: string; | ||
type?: string; | ||
groupId?: string; | ||
bootstrapped?: boolean; | ||
} | ||
interface IEmbedConfigurationBase extends IBootstrapEmbedConfiguration { | ||
accessToken?: string; | ||
tokenType?: TokenType; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
interface IEmbedConfiguration extends IEmbedConfigurationBase { | ||
id?: string; | ||
settings?: ISettings; | ||
pageName?: string; | ||
filters?: IFilter[]; | ||
pageView?: PageView; | ||
datasetId?: string; | ||
permissions?: Permissions; | ||
viewMode?: ViewMode; | ||
action?: string; | ||
dashboardId?: string; | ||
height?: number; | ||
width?: number; | ||
theme?: IReportTheme; | ||
slicers?: ISlicer[]; | ||
bookmark?: IApplyBookmarkRequest; | ||
datasetBinding?: IDatasetBinding; | ||
contrastMode?: ContrastMode; | ||
} | ||
interface ICommonEmbedConfiguration extends IEmbedConfigurationBase { | ||
id?: string; | ||
settings?: ISettings; | ||
filters?: IFilter[]; | ||
action?: string; | ||
contrastMode?: ContrastMode; | ||
permissions?: Permissions; | ||
} | ||
interface IReportEmbedConfiguration extends ICommonEmbedConfiguration { | ||
filters?: ReportLevelFilters[]; | ||
datasetBinding?: IDatasetBinding; | ||
bookmark?: IApplyBookmarkRequest; | ||
pageName?: string; | ||
slicers?: ISlicer[]; | ||
viewMode?: ViewMode; | ||
theme?: IReportTheme; | ||
} | ||
interface IVisualEmbedConfiguration extends IReportEmbedConfiguration { | ||
visualName: string; | ||
height?: number; | ||
width?: number; | ||
} | ||
interface IDashboardEmbedConfiguration extends ICommonEmbedConfiguration { | ||
pageView?: PageView; | ||
} | ||
interface ITileEmbedConfiguration extends IDashboardEmbedConfiguration { | ||
dashboardId: string; | ||
height?: number; | ||
width?: number; | ||
} | ||
interface IQnaEmbedConfiguration extends IEmbedConfigurationBase { | ||
datasetIds: string[]; | ||
question?: string; | ||
viewMode?: QnaMode; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
interface IReportLoadConfiguration { | ||
@@ -478,3 +574,4 @@ accessToken: string; | ||
interface IReportCreateConfiguration { | ||
accessToken: string; | ||
type?: "create"; | ||
accessToken?: string; | ||
datasetId: string; | ||
@@ -485,3 +582,7 @@ groupId?: string; | ||
theme?: IReportTheme; | ||
embedUrl?: string; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
interface IDashboardLoadConfiguration { | ||
@@ -495,2 +596,5 @@ accessToken: string; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
interface ITileLoadConfiguration { | ||
@@ -505,3 +609,8 @@ accessToken: string; | ||
} | ||
interface ILocaleSettings { | ||
language?: string; | ||
formatLocale?: string; | ||
} | ||
interface ISettings { | ||
authoringHintsEnabled?: boolean; | ||
background?: BackgroundType; | ||
@@ -524,2 +633,3 @@ bars?: IReportBars; | ||
visualSettings?: IVisualSettings; | ||
localeSettings?: ILocaleSettings; | ||
} | ||
@@ -567,2 +677,3 @@ interface IReportBars { | ||
name: string; | ||
targetWorkspaceId?: string; | ||
} | ||
@@ -582,3 +693,7 @@ interface IPaginatedReportLoadConfiguration { | ||
hideErrors?: boolean; | ||
localeSettings?: ILocaleSettings; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
interface ILoadQnaConfiguration { | ||
@@ -828,2 +943,6 @@ accessToken: string; | ||
} | ||
declare function isFlatMenuExtension(menuExtension: IMenuExtension): menuExtension is IFlatMenuExtension; | ||
declare function isGroupedMenuExtension(menuExtension: IMenuExtension): menuExtension is IGroupedMenuExtension; | ||
declare function isIExtensions(extensions: Extensions): extensions is IExtensions; | ||
declare function isIExtensionArray(extensions: Extensions): extensions is IExtension[]; | ||
declare function validateVisualSelector(input: any): IError[]; | ||
@@ -848,2 +967,3 @@ declare function validateSlicer(input: any): IError[]; | ||
declare function validateExtension(input: any): IError[]; | ||
declare function validateMenuGroupExtension(input: any): IError[]; | ||
declare function validateReportLoad(input: any): IError[]; | ||
@@ -850,0 +970,0 @@ declare function validateCreateReport(input: any): IError[]; |
@@ -1,3 +0,2 @@ | ||
/*! powerbi-models v1.6.0 | (c) 2016 Microsoft Corporation MIT */ | ||
export declare const Validators: any; | ||
/*! powerbi-models v1.7.0 | (c) 2016 Microsoft Corporation MIT */ | ||
export declare type KeyValuePair = { | ||
@@ -155,2 +154,6 @@ key: string; | ||
} | ||
export declare type ISelectable = IVisual; | ||
export interface ICavasItemsSelection extends ISelection { | ||
selectedItems?: ISelectable[]; | ||
} | ||
export interface ISwipeEvent { | ||
@@ -164,3 +167,18 @@ currentPosition: IPosition; | ||
} | ||
export declare type Extensions = IExtension[]; | ||
export declare type Extensions = IExtension[] | IExtensions; | ||
export interface IMenuExtensionBase extends IExtensionPoint { | ||
title?: string; | ||
icon?: string; | ||
} | ||
export interface IFlatMenuExtension extends IMenuExtensionBase { | ||
menuLocation?: MenuLocation; | ||
} | ||
export interface IGroupedMenuExtension extends IMenuExtensionBase { | ||
groupName: string; | ||
} | ||
export declare type IMenuExtension = IFlatMenuExtension | IGroupedMenuExtension; | ||
export interface IExtensions { | ||
commands: ICommandExtension[]; | ||
groups?: IMenuGroupExtension[]; | ||
} | ||
export interface IExtension { | ||
@@ -174,2 +192,12 @@ command?: ICommandExtension; | ||
export declare type CommandExtensionSelector = IVisualSelector | IVisualTypeSelector; | ||
export interface IMenuGroupExtension { | ||
name: string; | ||
title: string; | ||
/** | ||
* If menu location is top, will locate the group at the top of the menu. | ||
* If more than one extension with top value, the latest to be added, will be on top. | ||
* If menu location is bottom or undefined, the group will be added at the bottom of the menu at the time of adding the group first command. | ||
*/ | ||
menuLocation?: MenuLocation; | ||
} | ||
export interface ICommandExtension extends IExtensionItem { | ||
@@ -186,7 +214,2 @@ title: string; | ||
} | ||
export interface IMenuExtension extends IExtensionPoint { | ||
title?: string; | ||
icon?: string; | ||
menuLocation?: MenuLocation; | ||
} | ||
export declare enum MenuLocation { | ||
@@ -459,2 +482,75 @@ Bottom = 0, | ||
export declare function isColumnAggr(arg: any): arg is IColumnAggrTarget; | ||
export interface IBootstrapEmbedConfiguration { | ||
hostname?: string; | ||
embedUrl?: string; | ||
settings?: ISettings; | ||
uniqueId?: string; | ||
type?: string; | ||
groupId?: string; | ||
bootstrapped?: boolean; | ||
} | ||
export interface IEmbedConfigurationBase extends IBootstrapEmbedConfiguration { | ||
accessToken?: string; | ||
tokenType?: TokenType; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
export interface IEmbedConfiguration extends IEmbedConfigurationBase { | ||
id?: string; | ||
settings?: ISettings; | ||
pageName?: string; | ||
filters?: IFilter[]; | ||
pageView?: PageView; | ||
datasetId?: string; | ||
permissions?: Permissions; | ||
viewMode?: ViewMode; | ||
action?: string; | ||
dashboardId?: string; | ||
height?: number; | ||
width?: number; | ||
theme?: IReportTheme; | ||
slicers?: ISlicer[]; | ||
bookmark?: IApplyBookmarkRequest; | ||
datasetBinding?: IDatasetBinding; | ||
contrastMode?: ContrastMode; | ||
} | ||
export interface ICommonEmbedConfiguration extends IEmbedConfigurationBase { | ||
id?: string; | ||
settings?: ISettings; | ||
filters?: IFilter[]; | ||
action?: string; | ||
contrastMode?: ContrastMode; | ||
permissions?: Permissions; | ||
} | ||
export interface IReportEmbedConfiguration extends ICommonEmbedConfiguration { | ||
filters?: ReportLevelFilters[]; | ||
datasetBinding?: IDatasetBinding; | ||
bookmark?: IApplyBookmarkRequest; | ||
pageName?: string; | ||
slicers?: ISlicer[]; | ||
viewMode?: ViewMode; | ||
theme?: IReportTheme; | ||
} | ||
export interface IVisualEmbedConfiguration extends IReportEmbedConfiguration { | ||
visualName: string; | ||
height?: number; | ||
width?: number; | ||
} | ||
export interface IDashboardEmbedConfiguration extends ICommonEmbedConfiguration { | ||
pageView?: PageView; | ||
} | ||
export interface ITileEmbedConfiguration extends IDashboardEmbedConfiguration { | ||
dashboardId: string; | ||
height?: number; | ||
width?: number; | ||
} | ||
export interface IQnaEmbedConfiguration extends IEmbedConfigurationBase { | ||
datasetIds: string[]; | ||
question?: string; | ||
viewMode?: QnaMode; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
export interface IReportLoadConfiguration { | ||
@@ -478,3 +574,4 @@ accessToken: string; | ||
export interface IReportCreateConfiguration { | ||
accessToken: string; | ||
type?: "create"; | ||
accessToken?: string; | ||
datasetId: string; | ||
@@ -485,3 +582,7 @@ groupId?: string; | ||
theme?: IReportTheme; | ||
embedUrl?: string; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
export interface IDashboardLoadConfiguration { | ||
@@ -495,2 +596,5 @@ accessToken: string; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
export interface ITileLoadConfiguration { | ||
@@ -505,3 +609,8 @@ accessToken: string; | ||
} | ||
export interface ILocaleSettings { | ||
language?: string; | ||
formatLocale?: string; | ||
} | ||
export interface ISettings { | ||
authoringHintsEnabled?: boolean; | ||
background?: BackgroundType; | ||
@@ -524,2 +633,3 @@ bars?: IReportBars; | ||
visualSettings?: IVisualSettings; | ||
localeSettings?: ILocaleSettings; | ||
} | ||
@@ -567,2 +677,3 @@ export interface IReportBars { | ||
name: string; | ||
targetWorkspaceId?: string; | ||
} | ||
@@ -582,3 +693,7 @@ export interface IPaginatedReportLoadConfiguration { | ||
hideErrors?: boolean; | ||
localeSettings?: ILocaleSettings; | ||
} | ||
/** | ||
* @deprecated | ||
*/ | ||
export interface ILoadQnaConfiguration { | ||
@@ -828,2 +943,6 @@ accessToken: string; | ||
} | ||
export declare function isFlatMenuExtension(menuExtension: IMenuExtension): menuExtension is IFlatMenuExtension; | ||
export declare function isGroupedMenuExtension(menuExtension: IMenuExtension): menuExtension is IGroupedMenuExtension; | ||
export declare function isIExtensions(extensions: Extensions): extensions is IExtensions; | ||
export declare function isIExtensionArray(extensions: Extensions): extensions is IExtension[]; | ||
export declare function validateVisualSelector(input: any): IError[]; | ||
@@ -848,2 +967,3 @@ export declare function validateSlicer(input: any): IError[]; | ||
export declare function validateExtension(input: any): IError[]; | ||
export declare function validateMenuGroupExtension(input: any): IError[]; | ||
export declare function validateReportLoad(input: any): IError[]; | ||
@@ -850,0 +970,0 @@ export declare function validateCreateReport(input: any): IError[]; |
122
package.json
{ | ||
"name": "powerbi-models", | ||
"version": "1.6.0", | ||
"description": "Contains JavaScript & TypeScript object models for Microsoft Power BI JavaScript SDK. For each model there is a TypeScript interface, and a validation function to ensure and object is valid.", | ||
"main": "dist/models.js", | ||
"typings": "dist/models.d.ts", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"build": "gulp build", | ||
"test": "gulp test", | ||
"gulp": "gulp" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Microsoft/powerbi-models" | ||
}, | ||
"keywords": [ | ||
"Microsoft", | ||
"PowerBI", | ||
"message", | ||
"validation", | ||
"json" | ||
], | ||
"author": "Microsoft PowerBI Team", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/jasmine": "^3.5.5", | ||
"@types/karma-jasmine": "0.0.31", | ||
"del": "^2.2.1", | ||
"gulp": "^4.0.2", | ||
"gulp-header": "^1.8.7", | ||
"gulp-help-four": "^0.2.3", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-replace": "^0.5.4", | ||
"gulp-tslint": "^7.1.0", | ||
"gulp-typedoc": "^2.0.0", | ||
"gulp-uglify": "^1.5.4", | ||
"gulp4-run-sequence": "^1.0.0", | ||
"jasmine-core": "^2.4.1", | ||
"json-loader": "^0.5.4", | ||
"karma": "^4.4.1", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage": "^2.0.1", | ||
"karma-jasmine": "^2.0.1", | ||
"karma-phantomjs-launcher": "^1.0.4", | ||
"karma-spec-reporter": "0.0.32", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"ts-loader": "^6.2.1", | ||
"tslint": "^5.20.0", | ||
"typedoc": "^0.15.0", | ||
"typescript": "^3.8.2", | ||
"webpack": "^4.42.0", | ||
"webpack-stream": "^5.2.1", | ||
"yargs": "^4.7.1" | ||
}, | ||
"publishConfig": {}, | ||
"dependencies": {} | ||
"name": "powerbi-models", | ||
"version": "1.7.0", | ||
"description": "Contains JavaScript & TypeScript object models for Microsoft Power BI JavaScript SDK. For each model there is a TypeScript interface, and a validation function to ensure and object is valid.", | ||
"main": "dist/models.js", | ||
"typings": "dist/models.d.ts", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"build": "gulp build", | ||
"test": "gulp test", | ||
"gulp": "gulp" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Microsoft/powerbi-models" | ||
}, | ||
"keywords": [ | ||
"Microsoft", | ||
"PowerBI", | ||
"message", | ||
"validation", | ||
"json" | ||
], | ||
"author": "Microsoft PowerBI Team", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/jasmine": "^3.5.5", | ||
"@types/karma-jasmine": "0.0.31", | ||
"del": "^2.2.1", | ||
"gulp": "^4.0.2", | ||
"gulp-header": "^1.8.7", | ||
"gulp-help-four": "^0.2.3", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-replace": "^0.5.4", | ||
"gulp-tslint": "^7.1.0", | ||
"gulp-typedoc": "^2.0.0", | ||
"gulp-uglify": "^1.5.4", | ||
"gulp4-run-sequence": "^1.0.0", | ||
"jasmine-core": "^2.4.1", | ||
"json-loader": "^0.5.4", | ||
"karma": "^4.4.1", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage": "^2.0.1", | ||
"karma-jasmine": "^2.0.1", | ||
"karma-phantomjs-launcher": "^1.0.4", | ||
"karma-spec-reporter": "0.0.32", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"ts-loader": "^6.2.1", | ||
"tslint": "^5.20.0", | ||
"typedoc": "^0.15.0", | ||
"typescript": "^3.8.2", | ||
"webpack": "^4.42.0", | ||
"webpack-stream": "^5.2.1", | ||
"yargs": "^4.7.1" | ||
}, | ||
"publishConfig": {}, | ||
"dependencies": {} | ||
} |
# powerbi-models | ||
[![Build Status](https://img.shields.io/travis/Microsoft/powerbi-models.svg)](https://travis-ci.org/Microsoft/powerbi-models) | ||
@@ -13,2 +14,3 @@ [![NPM Version](https://img.shields.io/npm/v/powerbi-models.svg)](https://www.npmjs.com/package/powerbi-models) | ||
## Documentation | ||
### [https://microsoft.github.io/powerbi-models](https://microsoft.github.io/powerbi-models) | ||
@@ -44,2 +46,3 @@ | ||
``` | ||
Would output to the console: | ||
@@ -56,2 +59,3 @@ | ||
Creating filters: | ||
```typescript | ||
@@ -92,2 +96,3 @@ const basicFilter: models.IBasicFilter = { | ||
Or use the constructor methods: | ||
```typescript | ||
@@ -112,6 +117,8 @@ const advancedFilter = new models.AdvancedFilter( | ||
## Date Formatting | ||
Dates should be formated using [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. Example: `2016-09-08T00:15:46.861Z` | ||
This is how dates are naturally serialized to JSON: | ||
``` | ||
```typescript | ||
new Date().toJSON(); //=> 2016-09-08T00:15:46.861Z | ||
@@ -122,3 +129,3 @@ ``` | ||
``` | ||
```JSON | ||
{ | ||
@@ -138,2 +145,2 @@ "$schema": "http://powerbi.com/product/schema#advanced", | ||
} | ||
``` | ||
``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
580823
6302
140