Skip to content

Commit

Permalink
remove elasticsearch import from infra
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Jul 29, 2021
1 parent 56593b8 commit c6c23bc
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { GenericParams, SearchResponse } from 'elasticsearch';
import type { estypes } from '@elastic/elasticsearch';
import { Lifecycle } from '@hapi/hapi';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { JsonArray, JsonValue } from '@kbn/common-utils';
Expand Down Expand Up @@ -38,7 +38,7 @@ export interface InfraServerPluginStartDeps {
data: DataPluginStart;
}

export interface CallWithRequestParams extends GenericParams {
export interface CallWithRequestParams extends estypes.RequestBase {
max_concurrent_shard_requests?: number;
name?: string;
index?: string | string[];
Expand All @@ -50,6 +50,7 @@ export interface CallWithRequestParams extends GenericParams {
path?: string;
query?: string | object;
track_total_hits?: boolean | number;
body?: any;
}

export type InfraResponse = Lifecycle.ReturnValue;
Expand Down Expand Up @@ -117,7 +118,7 @@ export interface InfraDatabaseGetIndicesResponse {
};
}

export type SearchHit = SearchResponse<object>['hits']['hits'][0];
export type SearchHit = estypes.SearchHit;

export interface SortedSearchHit extends SearchHit {
sort: any[];
Expand Down

0 comments on commit c6c23bc

Please sign in to comment.