powerbi-visuals-api
Advanced tools
Comparing version 5.4.0 to 5.6.0
# Change Log - Power BI Custom Visuals API | ||
## 5.6.0 | ||
* Adds the `storageV2` service. | ||
* Adds the `acquireAADToken` service. | ||
@@ -3,0 +6,0 @@ ## 5.4.0 |
{ | ||
"name": "powerbi-visuals-api", | ||
"version": "5.4.0", | ||
"version": "5.6.0", | ||
"description": "Power BI Custom Visuals API type definitions for typescript", | ||
@@ -5,0 +5,0 @@ "types": "index", |
@@ -1532,2 +1532,23 @@ declare namespace powerbi { | ||
declare module powerbi.extensibility { | ||
export interface AcquireAADTokenResult { | ||
accessToken?: string; | ||
} | ||
export interface IAcquireAADTokenService { | ||
/** Returns an authentication token for the resource that the visual defined as a privilge | ||
* and the scope is the visual guid plus a constant string "_CV_ForPBI" | ||
* @returns the promise that resolves to the authentication token | ||
*/ | ||
acquireAADToken(): IPromise<AcquireAADTokenResult>; | ||
/** | ||
* Returns the availability status of the service. | ||
* | ||
* @returns the promise that resolves to privilege status of the service | ||
*/ | ||
acquireAADTokenstatus(): IPromise<PrivilegeStatus>; | ||
} | ||
} | ||
declare module powerbi { | ||
@@ -1601,2 +1622,46 @@ /** | ||
declare module powerbi.extensibility { | ||
interface StorageV2ResultInfo { | ||
success: boolean; | ||
} | ||
/** | ||
* Provides an access to local storage for read / write access | ||
*/ | ||
interface IVisualLocalStorageV2Service { | ||
/** | ||
* Returns the availability status of the service. | ||
* | ||
* @returns the promise that resolves to privilege status of the service | ||
*/ | ||
status(): IPromise<PrivilegeStatus>; | ||
/** | ||
* Returns promise that resolves to the data associated with 'key' if it was found or rejects otherwise. | ||
* | ||
* @param key - the name of the payload to retrieve | ||
* @returns the promise that resolves to the data required or rejects if it wasn't found or an error occured. | ||
*/ | ||
get(key: string): IPromise<string>; | ||
/** | ||
* Saves the data to local storage. This data can be later be retrieved using the 'key'. | ||
* Returns a promise that resolves to StorageV2ResultInfo, or rejects if an error occured. | ||
* | ||
* @param key - the name of the payload to store | ||
* @param data - the payload string to store | ||
* @returns the promise resolves to StorageV2ResultInfo, or rejects if an error occured. | ||
*/ | ||
set(key: string, data: string): IPromise<StorageV2ResultInfo>; | ||
/** | ||
* Deletes data associated with 'key' from local storage. | ||
* | ||
* @param key - the name of the payload to remove | ||
*/ | ||
remove(key: string): void; | ||
} | ||
} | ||
declare module powerbi.extensibility { | ||
/** | ||
@@ -1737,2 +1802,4 @@ * An interface for reporting rendering events | ||
applyCustomSort: (args: CustomVisualApplyCustomSortArgs) => void; | ||
storageV2Service: IVisualLocalStorageV2Service; | ||
acquireAADTokenService: IAcquireAADTokenService; | ||
} | ||
@@ -1739,0 +1806,0 @@ |
164387
3841