From e43b412af2bbf33124f39387f30c98245b811924 Mon Sep 17 00:00:00 2001 From: Christiane Heiligers Date: Mon, 29 Jun 2020 12:24:30 -0700 Subject: [PATCH] Updates type --- .../server/telemetry_collection/get_nodes_usage.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts b/src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts index 6b6f57d2846c86..c5c110fbb4149b 100644 --- a/src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts +++ b/src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts @@ -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 { @@ -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. @@ -53,7 +53,9 @@ export type NodesUsageGetter = ( * * The Nodes usage API was introduced in v6.0.0 */ -export async function fetchNodesUsage(callCluster: APICaller): Promise { +export async function fetchNodesUsage( + callCluster: LegacyAPICaller +): Promise { const response = await callCluster('transport.request', { method: 'GET', path: '/_nodes/usage',