From c743e2577f491d15a24ba286ba93be74bb2efb46 Mon Sep 17 00:00:00 2001 From: Liza K Date: Wed, 12 Aug 2020 16:56:27 +0300 Subject: [PATCH] ISearchInterceptor interface --- src/plugins/data/public/search/search_interceptor.ts | 2 ++ src/plugins/data/public/search/search_service.ts | 4 ++-- src/plugins/data/public/search/types.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/data/public/search/search_interceptor.ts b/src/plugins/data/public/search/search_interceptor.ts index 7bc4cdfaa3c93..1f4082594be81 100644 --- a/src/plugins/data/public/search/search_interceptor.ts +++ b/src/plugins/data/public/search/search_interceptor.ts @@ -199,3 +199,5 @@ export class SearchInterceptor { } }; } + +export type ISearchInterceptor = PublicMethodsOf; diff --git a/src/plugins/data/public/search/search_service.ts b/src/plugins/data/public/search/search_service.ts index 30b694f8b9c31..4c94925b66d6e 100644 --- a/src/plugins/data/public/search/search_service.ts +++ b/src/plugins/data/public/search/search_service.ts @@ -28,7 +28,7 @@ import { calculateBounds, TimeRange } from '../../common/query'; import { IndexPatternsContract } from '../index_patterns/index_patterns'; import { GetInternalStartServicesFn } from '../types'; -import { SearchInterceptor } from './search_interceptor'; +import { ISearchInterceptor, SearchInterceptor } from './search_interceptor'; import { getAggTypes, getAggTypesFunctions, @@ -54,7 +54,7 @@ interface SearchServiceStartDependencies { export class SearchService implements Plugin { private esClient?: LegacyApiCaller; private readonly aggTypesRegistry = new AggTypesRegistry(); - private searchInterceptor!: SearchInterceptor; + private searchInterceptor!: ISearchInterceptor; private usageCollector?: SearchUsageCollector; /** diff --git a/src/plugins/data/public/search/types.ts b/src/plugins/data/public/search/types.ts index c7277c35670c1..47ac5c214dfdb 100644 --- a/src/plugins/data/public/search/types.ts +++ b/src/plugins/data/public/search/types.ts @@ -55,7 +55,7 @@ export interface ISearchStartLegacy { } export interface SearchEnhancements { - searchInterceptor: SearchInterceptor; + searchInterceptor: ISearchInterceptor; } /** * The setup contract exposed by the Search plugin exposes the search strategy extension