powerbi-visuals-api
Advanced tools
Comparing version 4.2.0 to 4.4.0
@@ -103,2 +103,30 @@ declare namespace powerbi { | ||
} | ||
export const enum ServicePlanState { | ||
/** Indicates that the license is not active and shouldn't be used for provisioning benefits. */ | ||
Inactive = 0, | ||
/** Indicates that the license is active and can be used for provisioning benefits. */ | ||
Active = 1, | ||
/** Indicates that the license is in grace period likely due to payment violation. */ | ||
Warning = 2, | ||
/** Indicates that the license is suspended likely due to payment violation. */ | ||
Suspended = 3, | ||
/** Sentinel value. */ | ||
Unknown = 4 | ||
} | ||
export const enum LicenseNotificationType { | ||
/** Used by the visual to display an icon license notification, display "upgrade" button. */ | ||
General = 0, | ||
/** Used by the visual to display an unsupported environment license notification, "upgrade" button won't be displayed. */ | ||
UnsupportedEnv = 1, | ||
/** Used by the visual to display a blocker license notification, display "upgrade" button. */ | ||
VisualIsBlocked = 2, | ||
} | ||
} | ||
@@ -1486,2 +1514,11 @@ | ||
declare module powerbi.extensibility { | ||
export interface IVisualLicenseManager { | ||
getAvailableServicePlans(): IPromise<visual.LicenseInfoResult>; | ||
notifyLicenseRequired(notificationType: LicenseNotificationType): IPromise<boolean>; | ||
notifyFeatureBlocked(tooltip: string): IPromise<boolean>; | ||
clearLicenseNotification(): IPromise<boolean>; | ||
} | ||
} | ||
declare module powerbi.extensibility { | ||
/** | ||
@@ -1556,2 +1593,3 @@ * Provides functionality to save visual content as file | ||
displayWarningIcon: (hoverText: string, detailedText: string) => void; | ||
licenseManager: IVisualLicenseManager; | ||
} | ||
@@ -1607,4 +1645,20 @@ | ||
} | ||
export interface ServicePlan { | ||
spIdentifier: string; | ||
state: ServicePlanState; | ||
} | ||
export interface LicenseInfoResult { | ||
/** An array of Service Plans purchased by the active user for this visual */ | ||
plans: ServicePlan[] | undefined; | ||
/** Indicates that the visual is being rendered in a Power BI environment that doesn't support licenses management or enforcement. */ | ||
isLicenseUnsupportedEnv: boolean; | ||
/** Indicates whether the licenses info could be retrieved. */ | ||
isLicenseInfoAvailable: boolean; | ||
} | ||
} | ||
export default powerbi; |
{ | ||
"name": "powerbi-visuals-api", | ||
"version": "4.2.0", | ||
"version": "4.4.0", | ||
"description": "Power BI Custom Visuals API type definitions for typescript", | ||
@@ -5,0 +5,0 @@ "types": "index", |
129701
3016