forked from microsoft/PowerBI-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathifilterable.ts
42 lines (40 loc) · 1.31 KB
/
ifilterable.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { FiltersOperations, IFilter } from 'powerbi-models';
import { IHttpPostMessageResponse } from 'http-post-message';
/**
* Decorates embed components that support filters
* Examples include reports and pages
*
* @export
* @interface IFilterable
*/
export interface IFilterable {
/**
* Gets the filters currently applied to the object.
*
* @returns {(Promise<IFilter[]>)}
*/
getFilters(): Promise<IFilter[]>;
/**
* Update the filters for the current instance according to the operation: Add, replace all, replace by target or remove.
*
* @param {(FiltersOperations)} operation
* @param {(IFilter[])} filters
* @returns {Promise<IHttpPostMessageResponse<void>>}
*/
updateFilters(operation: FiltersOperations, filters?: IFilter[]): Promise<IHttpPostMessageResponse<void>>;
/**
* Removes all filters from the current object.
*
* @returns {Promise<IHttpPostMessageResponse<void>>}
*/
removeFilters(): Promise<IHttpPostMessageResponse<void>>;
/**
* Replaces all filters on the current object with the specified filter values.
*
* @param {(IFilter[])} filters
* @returns {Promise<IHttpPostMessageResponse<void>>}
*/
setFilters(filters: IFilter[]): Promise<IHttpPostMessageResponse<void>>;
}