diff --git a/index.d.ts b/index.d.ts index 7add024..85ccc89 100644 --- a/index.d.ts +++ b/index.d.ts @@ -138,6 +138,11 @@ declare namespace powerbi { /** Grouping becomes the next level in the hierarchy exclusively. Current level grouping is dropped. */ MoveToNextlevel = 3, } + + export const enum RowSubtotalType { + Top = "Top", + Bottom = "Bottom", + } } @@ -1676,6 +1681,7 @@ declare module powerbi.extensibility.visual { licenseManager: IVisualLicenseManager; webAccessService: IWebAccessService; drill: (args: DrillArgs) => void; + applyCustomSort: (args: CustomVisualApplyCustomSortArgs) => void; } export interface VisualUpdateOptions extends extensibility.VisualUpdateOptions { @@ -1742,6 +1748,15 @@ declare module powerbi.extensibility.visual { /** Indicates whether the licenses info could be retrieved. */ isLicenseInfoAvailable: boolean; } + + export interface CustomVisualApplyCustomSortArgs { + sortDescriptors: CustomVisualSortableFieldDescriptor[]; + } + + export interface CustomVisualSortableFieldDescriptor { + queryName: string; + sortDirection: SortDirection; + } } export default powerbi; diff --git a/package-lock.json b/package-lock.json index b2a8c89..7cbfef5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "powerbi-visuals-api", - "version": "4.7.0", + "version": "5.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "powerbi-visuals-api", - "version": "4.7.0", + "version": "5.1.0", "license": "MIT", "dependencies": { "semver": "^7.3.5" diff --git a/package.json b/package.json index a61fea0..cb5fd07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "powerbi-visuals-api", - "version": "4.7.0", + "version": "5.1.0", "description": "Power BI Custom Visuals API type definitions for typescript", "types": "index", "main": "index.js", diff --git a/schema.capabilities.json b/schema.capabilities.json index 74e0f6b..925b458 100644 --- a/schema.capabilities.json +++ b/schema.capabilities.json @@ -72,6 +72,13 @@ "subtotals": { "description": "Specifies the subtotal customizations applied in the customizeQuery method", "$ref": "#/definitions/subtotals" + }, + "migration": { + "$ref": "#/definitions/migration" + }, + "keepAllMetadataColumns": { + "type": "boolean", + "description": "Indicates that visual is going to receive all metadata columns, no matter what the active projections are" } }, "required": [ @@ -888,7 +895,7 @@ } }, "additionalProperties": false, - "oneOf": [ + "anyOf": [ { "required": [ "default" @@ -1415,11 +1422,54 @@ "type": "boolean" } } + }, + "rowSubtotalsType": { + "type": "object", + "description": "Indicates location of row subtotals locations (Top, Bottom). Top means subtotals located on top of DS and calculated even before all DS rows fetched, Bottom means subtotals located at the end of DS and shown only after all rows are fetched", + "properties": { + "propertyIdentifier": { + "type": "object", + "properties": { + "objectName": { + "type": "string" + }, + "propertyName": { + "type": "string" + } + } + }, + "defaultValue": { + "type": "string", + "enum": [ + "Top", + "Bottom" + ] + } + } } }, "requires": [ "matrix" ] + }, + "migration": { + "type": "object", + "description": "Defines the supported APIs for migration", + "properties": { + "filter": { + "$ref": "#/definitions/migration.filter" + } + } + }, + "migration.filter": { + "type": "object", + "description": "Defines the capabilities for migrating the filter API", + "properties": { + "shouldUseIdentityFilter": { + "type": "boolean", + "description": "Indicates whether the new filter should be identity filter" + } + } } } }