Skip to content

Commit

Permalink
Updates type
Browse files Browse the repository at this point in the history
  • Loading branch information
TinaHeiligers committed Jun 29, 2020
1 parent 5acbcdb commit e43b412
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { APICaller } from 'kibana/server';
import { LegacyAPICaller } from 'kibana/server';
import { TIMEOUT } from './constants';

export interface NodeAggregation {
Expand Down Expand Up @@ -44,7 +44,7 @@ export interface NodesFeatureUsageResponse {
}

export type NodesUsageGetter = (
callCluster: APICaller
callCluster: LegacyAPICaller
) => Promise<{ nodes: NodeObj[] | Array<{}> }>;
/**
* Get the nodes usage data from the connected cluster.
Expand All @@ -53,7 +53,9 @@ export type NodesUsageGetter = (
*
* The Nodes usage API was introduced in v6.0.0
*/
export async function fetchNodesUsage(callCluster: APICaller): Promise<NodesFeatureUsageResponse> {
export async function fetchNodesUsage(
callCluster: LegacyAPICaller
): Promise<NodesFeatureUsageResponse> {
const response = await callCluster('transport.request', {
method: 'GET',
path: '/_nodes/usage',
Expand Down

0 comments on commit e43b412

Please sign in to comment.