remove legacy ES plugin (#77703)

* remove legacy ES plug

* fix types

* delete some `legacy/core_plugins` references

* fix type
This commit is contained in:
Pierre Gayvallet 2020-09-18 09:30:13 +02:00 committed by GitHub
parent eb825db09e
commit 3759063e81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 53 additions and 944 deletions

5
.github/CODEOWNERS vendored
View file

@ -59,7 +59,6 @@
# APM
/x-pack/plugins/apm/ @elastic/apm-ui
/x-pack/test/functional/apps/apm/ @elastic/apm-ui
/src/legacy/core_plugins/apm_oss/ @elastic/apm-ui
/src/plugins/apm_oss/ @elastic/apm-ui
/src/apm.js @watson @vigneshshanmugam
@ -83,9 +82,6 @@
/src/plugins/home/public @elastic/kibana-core-ui
/src/plugins/home/server/*.ts @elastic/kibana-core-ui
/src/plugins/home/server/services/ @elastic/kibana-core-ui
# Exclude tutorial resources folder for now because they are not owned by Kibana app and most will move out soon
/src/legacy/core_plugins/kibana/public/home/*.ts @elastic/kibana-core-ui
/src/legacy/core_plugins/kibana/public/home/np_ready/ @elastic/kibana-core-ui
/x-pack/plugins/global_search_bar/ @elastic/kibana-core-ui
# Observability UIs
@ -285,7 +281,6 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
# Core design
/src/plugins/dashboard/**/*.scss @elastic/kibana-core-ui-designers
/x-pack/plugins/canvas/**/*.scss @elastic/kibana-core-ui-designers
/src/legacy/core_plugins/kibana/public/home/**/*.scss @elastic/kibana-core-ui-designers
/x-pack/legacy/plugins/spaces/**/*.scss @elastic/kibana-core-ui-designers
/x-pack/plugins/spaces/**/*.scss @elastic/kibana-core-ui-designers
/x-pack/plugins/security/**/*.scss @elastic/kibana-core-ui-designers

10
kibana.d.ts vendored
View file

@ -28,7 +28,6 @@ export { Public, Server };
/**
* All exports from TS ambient definitions (where types are added for JS source in a .d.ts file).
*/
import * as LegacyElasticsearch from './src/legacy/core_plugins/elasticsearch';
import * as LegacyKibanaPluginSpec from './src/legacy/plugin_discovery/plugin_spec/plugin_spec_options';
import * as LegacyKibanaServer from './src/legacy/server/kbn_server';
@ -44,13 +43,4 @@ export namespace Legacy {
export type InitPluginFunction = LegacyKibanaPluginSpec.InitPluginFunction;
export type UiExports = LegacyKibanaPluginSpec.UiExports;
export type PluginSpecOptions = LegacyKibanaPluginSpec.PluginSpecOptions;
export namespace Plugins {
export namespace elasticsearch {
export type Plugin = LegacyElasticsearch.ElasticsearchPlugin;
export type Cluster = LegacyElasticsearch.Cluster;
export type ClusterConfig = LegacyElasticsearch.ClusterConfig;
export type CallClusterOptions = LegacyElasticsearch.CallClusterOptions;
}
}
}

View file

@ -224,7 +224,6 @@ export class ClusterManager {
new Set(
[
fromRoot('src/core'),
fromRoot('src/legacy/core_plugins'),
fromRoot('src/legacy/server'),
fromRoot('src/legacy/ui'),
fromRoot('src/legacy/utils'),

View file

@ -178,7 +178,7 @@ export default function (program) {
'A path to scan for plugins, this can be specified multiple ' +
'times to specify multiple directories',
pluginDirCollector,
[fromRoot('plugins'), fromRoot('src/legacy/core_plugins')]
[fromRoot('plugins')]
)
.option(
'--plugin-path <path>',

View file

@ -25,7 +25,6 @@ export default {
'<rootDir>/src/plugins',
'<rootDir>/src/legacy/ui',
'<rootDir>/src/core',
'<rootDir>/src/legacy/core_plugins',
'<rootDir>/src/legacy/server',
'<rootDir>/src/cli',
'<rootDir>/src/cli_keystore',
@ -51,14 +50,11 @@ export default {
'packages/kbn-ui-framework/src/services/**/*.js',
'!packages/kbn-ui-framework/src/services/index.js',
'!packages/kbn-ui-framework/src/services/**/*/index.js',
'src/legacy/core_plugins/**/*.{js,mjs,jsx,ts,tsx}',
'!src/legacy/core_plugins/**/{__test__,__snapshots__}/**/*',
],
moduleNameMapper: {
'@elastic/eui$': '<rootDir>/node_modules/@elastic/eui/test-env',
'@elastic/eui/lib/(.*)?': '<rootDir>/node_modules/@elastic/eui/test-env/$1',
'^src/plugins/(.*)': '<rootDir>/src/plugins/$1',
'^plugins/([^/.]*)(.*)': '<rootDir>/src/legacy/core_plugins/$1/public$2',
'^uiExports/(.*)': '<rootDir>/src/dev/jest/mocks/file_mock.js',
'^test_utils/(.*)': '<rootDir>/src/test_utils/public/$1',
'^fixtures/(.*)': '<rootDir>/src/fixtures/$1',

View file

@ -132,11 +132,6 @@ export const REMOVE_EXTENSION = ['packages/kbn-plugin-generator/template/**/*.ej
* @type {Array}
*/
export const TEMPORARILY_IGNORED_PATHS = [
'src/legacy/core_plugins/console/public/src/directives/helpExample.txt',
'src/legacy/core_plugins/console/public/src/sense_editor/theme-sense-dark.js',
'src/legacy/core_plugins/tile_map/public/__tests__/scaledCircleMarkers.png',
'src/legacy/core_plugins/tile_map/public/__tests__/shadedCircleMarkers.png',
'src/legacy/core_plugins/tile_map/public/__tests__/shadedGeohashGrid.png',
'src/fixtures/config_upgrade_from_4.0.0_to_4.0.1-snapshot.json',
'src/core/server/core_app/assets/favicons/android-chrome-192x192.png',
'src/core/server/core_app/assets/favicons/android-chrome-256x256.png',

View file

@ -1,526 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import {
Client as ESClient,
GenericParams,
// root params
BulkIndexDocumentsParams,
ClearScrollParams,
CountParams,
CreateDocumentParams,
DeleteDocumentParams,
DeleteDocumentByQueryParams,
DeleteScriptParams,
DeleteTemplateParams,
ExistsParams,
ExplainParams,
FieldStatsParams,
GetParams,
GetResponse,
GetScriptParams,
GetSourceParams,
GetTemplateParams,
IndexDocumentParams,
InfoParams,
MGetParams,
MSearchParams,
MSearchTemplateParams,
MTermVectorsParams,
PingParams,
PutScriptParams,
PutTemplateParams,
ReindexParams,
ReindexRethrottleParams,
RenderSearchTemplateParams,
ScrollParams,
SearchParams,
SearchShardsParams,
SearchTemplateParams,
SuggestParams,
TermvectorsParams,
UpdateDocumentParams,
UpdateDocumentByQueryParams,
MGetResponse,
MSearchResponse,
SearchResponse,
// cat
CatAliasesParams,
CatAllocationParams,
CatFielddataParams,
CatHealthParams,
CatHelpParams,
CatIndicesParams,
CatCommonParams,
CatRecoveryParams,
CatSegmentsParams,
CatShardsParams,
CatSnapshotsParams,
CatTasksParams,
CatThreadPoolParams,
// cluster
ClusterAllocationExplainParams,
ClusterGetSettingsParams,
ClusterHealthParams,
ClusterPendingTasksParams,
ClusterPutSettingsParams,
ClusterRerouteParams,
ClusterStateParams,
ClusterStatsParams,
// indices
IndicesAnalyzeParams,
IndicesClearCacheParams,
IndicesCloseParams,
IndicesCreateParams,
IndicesDeleteParams,
IndicesDeleteAliasParams,
IndicesDeleteTemplateParams,
IndicesExistsParams,
IndicesExistsAliasParams,
IndicesExistsTemplateParams,
IndicesExistsTypeParams,
IndicesFlushParams,
IndicesFlushSyncedParams,
IndicesForcemergeParams,
IndicesGetParams,
IndicesGetAliasParams,
IndicesGetFieldMappingParams,
IndicesGetMappingParams,
IndicesGetSettingsParams,
IndicesGetTemplateParams,
IndicesGetUpgradeParams,
IndicesOpenParams,
IndicesPutAliasParams,
IndicesPutMappingParams,
IndicesPutSettingsParams,
IndicesPutTemplateParams,
IndicesRecoveryParams,
IndicesRefreshParams,
IndicesRolloverParams,
IndicesSegmentsParams,
IndicesShardStoresParams,
IndicesShrinkParams,
IndicesStatsParams,
IndicesUpdateAliasesParams,
IndicesUpgradeParams,
IndicesValidateQueryParams,
// ingest
IngestDeletePipelineParams,
IngestGetPipelineParams,
IngestPutPipelineParams,
IngestSimulateParams,
// nodes
NodesHotThreadsParams,
NodesInfoParams,
NodesStatsParams,
// snapshot
SnapshotCreateParams,
SnapshotCreateRepositoryParams,
SnapshotDeleteParams,
SnapshotDeleteRepositoryParams,
SnapshotGetParams,
SnapshotGetRepositoryParams,
SnapshotRestoreParams,
SnapshotStatusParams,
SnapshotVerifyRepositoryParams,
// tasks
TasksCancelParams,
TasksGetParams,
TasksListParams,
} from 'elasticsearch';
export class Cluster {
public callWithRequest: CallClusterWithRequest;
public callWithInternalUser: CallCluster;
constructor(config: ClusterConfig);
}
export interface ClusterConfig {
[option: string]: any;
}
export interface Request {
headers: RequestHeaders;
}
interface RequestHeaders {
[name: string]: string;
}
interface AssistantAPIClientParams extends GenericParams {
path: '/_migration/assistance';
method: 'GET';
}
type MIGRATION_ASSISTANCE_INDEX_ACTION = 'upgrade' | 'reindex';
type MIGRATION_DEPRECATION_LEVEL = 'none' | 'info' | 'warning' | 'critical';
export interface AssistanceAPIResponse {
indices: {
[indexName: string]: {
action_required: MIGRATION_ASSISTANCE_INDEX_ACTION;
};
};
}
interface DeprecationAPIClientParams extends GenericParams {
path: '/_migration/deprecations';
method: 'GET';
}
export interface DeprecationInfo {
level: MIGRATION_DEPRECATION_LEVEL;
message: string;
url: string;
details?: string;
}
export interface IndexSettingsDeprecationInfo {
[indexName: string]: DeprecationInfo[];
}
export interface DeprecationAPIResponse {
cluster_settings: DeprecationInfo[];
ml_settings: DeprecationInfo[];
node_settings: DeprecationInfo[];
index_settings: IndexSettingsDeprecationInfo;
}
export interface CallClusterOptions {
wrap401Errors?: boolean;
signal?: AbortSignal;
}
export interface CallClusterWithRequest {
/* eslint-disable */
(request: Request, endpoint: 'bulk', params: BulkIndexDocumentsParams, options?: CallClusterOptions): ReturnType<ESClient['bulk']>;
(request: Request, endpoint: 'clearScroll', params: ClearScrollParams, options?: CallClusterOptions): ReturnType<ESClient['clearScroll']>;
(request: Request, endpoint: 'count', params: CountParams, options?: CallClusterOptions): ReturnType<ESClient['count']>;
(request: Request, endpoint: 'create', params: CreateDocumentParams, options?: CallClusterOptions): ReturnType<ESClient['create']>;
(request: Request, endpoint: 'delete', params: DeleteDocumentParams, options?: CallClusterOptions): ReturnType<ESClient['delete']>;
(request: Request, endpoint: 'deleteByQuery', params: DeleteDocumentByQueryParams, options?: CallClusterOptions): ReturnType<ESClient['deleteByQuery']>;
(request: Request, endpoint: 'deleteScript', params: DeleteScriptParams, options?: CallClusterOptions): ReturnType<ESClient['deleteScript']>;
(request: Request, endpoint: 'deleteTemplate', params: DeleteTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['deleteTemplate']>;
(request: Request, endpoint: 'exists', params: ExistsParams, options?: CallClusterOptions): ReturnType<ESClient['exists']>;
(request: Request, endpoint: 'explain', params: ExplainParams, options?: CallClusterOptions): ReturnType<ESClient['explain']>;
(request: Request, endpoint: 'fieldStats', params: FieldStatsParams, options?: CallClusterOptions): ReturnType<ESClient['fieldStats']>;
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
<T>(request: Request, endpoint: 'get', params: GetParams, options?: CallClusterOptions): Promise<GetResponse<T>>;
(request: Request, endpoint: 'getScript', params: GetScriptParams, options?: CallClusterOptions): ReturnType<ESClient['getScript']>;
(request: Request, endpoint: 'getSource', params: GetSourceParams, options?: CallClusterOptions): ReturnType<ESClient['getSource']>;
(request: Request, endpoint: 'getTemplate', params: GetTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['getTemplate']>;
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
<T>(request: Request, endpoint: 'index', params: IndexDocumentParams<T>, options?: CallClusterOptions): ReturnType<ESClient['index']>;
(request: Request, endpoint: 'info', params: InfoParams, options?: CallClusterOptions): ReturnType<ESClient['info']>;
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
<T>(request: Request, endpoint: 'mget', params: MGetParams, options?: CallClusterOptions): Promise<MGetResponse<T>>;
<T>(request: Request, endpoint: 'msearch', params: MSearchParams, options?: CallClusterOptions): Promise<MSearchResponse<T>>;
<T>(request: Request, endpoint: 'msearchTemplate', params: MSearchTemplateParams, options?: CallClusterOptions): Promise<MSearchResponse<T>>;
(request: Request, endpoint: 'mtermvectors', params: MTermVectorsParams, options?: CallClusterOptions): ReturnType<ESClient['mtermvectors']>;
(request: Request, endpoint: 'ping', params: PingParams, options?: CallClusterOptions): ReturnType<ESClient['ping']>;
(request: Request, endpoint: 'putScript', params: PutScriptParams, options?: CallClusterOptions): ReturnType<ESClient['putScript']>;
(request: Request, endpoint: 'putTemplate', params: PutTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['putTemplate']>;
(request: Request, endpoint: 'reindex', params: ReindexParams, options?: CallClusterOptions): ReturnType<ESClient['reindex']>;
(request: Request, endpoint: 'reindexRethrottle', params: ReindexRethrottleParams, options?: CallClusterOptions): ReturnType<ESClient['reindexRethrottle']>;
(request: Request, endpoint: 'renderSearchTemplate', params: RenderSearchTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['renderSearchTemplate']>;
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
<T>(request: Request, endpoint: 'scroll', params: ScrollParams, options?: CallClusterOptions): Promise<SearchResponse<T>>;
<T>(request: Request, endpoint: 'search', params: SearchParams, options?: CallClusterOptions): Promise<SearchResponse<T>>;
(request: Request, endpoint: 'searchShards', params: SearchShardsParams, options?: CallClusterOptions): ReturnType<ESClient['searchShards']>;
(request: Request, endpoint: 'searchTemplate', params: SearchTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['searchTemplate']>;
(request: Request, endpoint: 'suggest', params: SuggestParams, options?: CallClusterOptions): ReturnType<ESClient['suggest']>;
(request: Request, endpoint: 'termvectors', params: TermvectorsParams, options?: CallClusterOptions): ReturnType<ESClient['termvectors']>;
(request: Request, endpoint: 'update', params: UpdateDocumentParams, options?: CallClusterOptions): ReturnType<ESClient['update']>;
(request: Request, endpoint: 'updateByQuery', params: UpdateDocumentByQueryParams, options?: CallClusterOptions): ReturnType<ESClient['updateByQuery']>;
// cat namespace
(request: Request, endpoint: 'cat.aliases', params: CatAliasesParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['aliases']>;
(request: Request, endpoint: 'cat.allocation', params: CatAllocationParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['allocation']>;
(request: Request, endpoint: 'cat.count', params: CatAllocationParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['count']>;
(request: Request, endpoint: 'cat.fielddata', params: CatFielddataParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['fielddata']>;
(request: Request, endpoint: 'cat.health', params: CatHealthParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['health']>;
(request: Request, endpoint: 'cat.help', params: CatHelpParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['help']>;
(request: Request, endpoint: 'cat.indices', params: CatIndicesParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['indices']>;
(request: Request, endpoint: 'cat.master', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['master']>;
(request: Request, endpoint: 'cat.nodeattrs', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['nodeattrs']>;
(request: Request, endpoint: 'cat.nodes', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['nodes']>;
(request: Request, endpoint: 'cat.pendingTasks', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['pendingTasks']>;
(request: Request, endpoint: 'cat.plugins', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['plugins']>;
(request: Request, endpoint: 'cat.recovery', params: CatRecoveryParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['recovery']>;
(request: Request, endpoint: 'cat.repositories', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['repositories']>;
(request: Request, endpoint: 'cat.segments', params: CatSegmentsParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['segments']>;
(request: Request, endpoint: 'cat.shards', params: CatShardsParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['shards']>;
(request: Request, endpoint: 'cat.snapshots', params: CatSnapshotsParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['snapshots']>;
(request: Request, endpoint: 'cat.tasks', params: CatTasksParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['tasks']>;
(request: Request, endpoint: 'cat.threadPool', params: CatThreadPoolParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['threadPool']>;
// cluster namespace
(request: Request, endpoint: 'cluster.allocationExplain', params: ClusterAllocationExplainParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['allocationExplain']>;
(request: Request, endpoint: 'cluster.getSettings', params: ClusterGetSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['getSettings']>;
(request: Request, endpoint: 'cluster.health', params: ClusterHealthParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['health']>;
(request: Request, endpoint: 'cluster.pendingTasks', params: ClusterPendingTasksParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['pendingTasks']>;
(request: Request, endpoint: 'cluster.putSettings', params: ClusterPutSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['putSettings']>;
(request: Request, endpoint: 'cluster.reroute', params: ClusterRerouteParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['reroute']>;
(request: Request, endpoint: 'cluster.state', params: ClusterStateParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['state']>;
(request: Request, endpoint: 'cluster.stats', params: ClusterStatsParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['stats']>;
// indices namespace
(request: Request, endpoint: 'indices.analyze', params: IndicesAnalyzeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['analyze']>;
(request: Request, endpoint: 'indices.clearCache', params: IndicesClearCacheParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['clearCache']>;
(request: Request, endpoint: 'indices.close', params: IndicesCloseParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['close']>;
(request: Request, endpoint: 'indices.create', params: IndicesCreateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['create']>;
(request: Request, endpoint: 'indices.delete', params: IndicesDeleteParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['delete']>;
(request: Request, endpoint: 'indices.deleteAlias', params: IndicesDeleteAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['deleteAlias']>;
(request: Request, endpoint: 'indices.deleteTemplate', params: IndicesDeleteTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['deleteTemplate']>;
(request: Request, endpoint: 'indices.exists', params: IndicesExistsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['exists']>;
(request: Request, endpoint: 'indices.existsAlias', params: IndicesExistsAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['existsAlias']>;
(request: Request, endpoint: 'indices.existsTemplate', params: IndicesExistsTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['existsTemplate']>;
(request: Request, endpoint: 'indices.existsType', params: IndicesExistsTypeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['existsType']>;
(request: Request, endpoint: 'indices.flush', params: IndicesFlushParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['flush']>;
(request: Request, endpoint: 'indices.flushSynced', params: IndicesFlushSyncedParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['flushSynced']>;
(request: Request, endpoint: 'indices.forcemerge', params: IndicesForcemergeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['forcemerge']>;
(request: Request, endpoint: 'indices.get', params: IndicesGetParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['get']>;
(request: Request, endpoint: 'indices.getAlias', params: IndicesGetAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getAlias']>;
(request: Request, endpoint: 'indices.getFieldMapping', params: IndicesGetFieldMappingParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getFieldMapping']>;
(request: Request, endpoint: 'indices.getMapping', params: IndicesGetMappingParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getMapping']>;
(request: Request, endpoint: 'indices.getSettings', params: IndicesGetSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getSettings']>;
(request: Request, endpoint: 'indices.getTemplate', params: IndicesGetTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getTemplate']>;
(request: Request, endpoint: 'indices.getUpgrade', params: IndicesGetUpgradeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getUpgrade']>;
(request: Request, endpoint: 'indices.open', params: IndicesOpenParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['open']>;
(request: Request, endpoint: 'indices.putAlias', params: IndicesPutAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putAlias']>;
(request: Request, endpoint: 'indices.putMapping', params: IndicesPutMappingParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putMapping']>;
(request: Request, endpoint: 'indices.putSettings', params: IndicesPutSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putSettings']>;
(request: Request, endpoint: 'indices.putTemplate', params: IndicesPutTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putTemplate']>;
(request: Request, endpoint: 'indices.recovery', params: IndicesRecoveryParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['recovery']>;
(request: Request, endpoint: 'indices.refresh', params: IndicesRefreshParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['refresh']>;
(request: Request, endpoint: 'indices.rollover', params: IndicesRolloverParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['rollover']>;
(request: Request, endpoint: 'indices.segments', params: IndicesSegmentsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['segments']>;
(request: Request, endpoint: 'indices.shardStores', params: IndicesShardStoresParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['shardStores']>;
(request: Request, endpoint: 'indices.shrink', params: IndicesShrinkParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['shrink']>;
(request: Request, endpoint: 'indices.stats', params: IndicesStatsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['stats']>;
(request: Request, endpoint: 'indices.updateAliases', params: IndicesUpdateAliasesParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['updateAliases']>;
(request: Request, endpoint: 'indices.upgrade', params: IndicesUpgradeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['upgrade']>;
(request: Request, endpoint: 'indices.validateQuery', params: IndicesValidateQueryParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['validateQuery']>;
// ingest namepsace
(request: Request, endpoint: 'ingest.deletePipeline', params: IngestDeletePipelineParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['deletePipeline']>;
(request: Request, endpoint: 'ingest.getPipeline', params: IngestGetPipelineParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['getPipeline']>;
(request: Request, endpoint: 'ingest.putPipeline', params: IngestPutPipelineParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['putPipeline']>;
(request: Request, endpoint: 'ingest.simulate', params: IngestSimulateParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['simulate']>;
// nodes namespace
(request: Request, endpoint: 'nodes.hotThreads', params: NodesHotThreadsParams, options?: CallClusterOptions): ReturnType<ESClient['nodes']['hotThreads']>;
(request: Request, endpoint: 'nodes.info', params: NodesInfoParams, options?: CallClusterOptions): ReturnType<ESClient['nodes']['info']>;
(request: Request, endpoint: 'nodes.stats', params: NodesStatsParams, options?: CallClusterOptions): ReturnType<ESClient['nodes']['stats']>;
// snapshot namespace
(request: Request, endpoint: 'snapshot.create', params: SnapshotCreateParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['create']>;
(request: Request, endpoint: 'snapshot.createRepository', params: SnapshotCreateRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['createRepository']>;
(request: Request, endpoint: 'snapshot.delete', params: SnapshotDeleteParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['delete']>;
(request: Request, endpoint: 'snapshot.deleteRepository', params: SnapshotDeleteRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['deleteRepository']>;
(request: Request, endpoint: 'snapshot.get', params: SnapshotGetParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['get']>;
(request: Request, endpoint: 'snapshot.getRepository', params: SnapshotGetRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['getRepository']>;
(request: Request, endpoint: 'snapshot.restore', params: SnapshotRestoreParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['restore']>;
(request: Request, endpoint: 'snapshot.status', params: SnapshotStatusParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['status']>;
(request: Request, endpoint: 'snapshot.verifyRepository', params: SnapshotVerifyRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['verifyRepository']>;
// tasks namespace
(request: Request, endpoint: 'tasks.cancel', params: TasksCancelParams, options?: CallClusterOptions): ReturnType<ESClient['tasks']['cancel']>;
(request: Request, endpoint: 'tasks.get', params: TasksGetParams, options?: CallClusterOptions): ReturnType<ESClient['tasks']['get']>;
(request: Request, endpoint: 'tasks.list', params: TasksListParams, options?: CallClusterOptions): ReturnType<ESClient['tasks']['list']>;
// other APIs accessed via transport.request
(
request: Request,
endpoint: 'transport.request',
clientParams: AssistantAPIClientParams,
options?: {}
): Promise<AssistanceAPIResponse>;
(
request: Request,
endpoint: 'transport.request',
clientParams: DeprecationAPIClientParams,
options?: {}
): Promise<DeprecationAPIResponse>;
// Catch-all definition
<T = any>(
request: Request,
endpoint: string,
clientParams?: any,
options?: CallClusterOptions
): Promise<T>;
/* eslint-enable */
}
export interface CallCluster {
/* eslint-disable */
(endpoint: 'bulk', params: BulkIndexDocumentsParams, options?: CallClusterOptions): ReturnType<ESClient['bulk']>;
(endpoint: 'clearScroll', params: ClearScrollParams, options?: CallClusterOptions): ReturnType<ESClient['clearScroll']>;
(endpoint: 'count', params: CountParams, options?: CallClusterOptions): ReturnType<ESClient['count']>;
(endpoint: 'create', params: CreateDocumentParams, options?: CallClusterOptions): ReturnType<ESClient['create']>;
(endpoint: 'delete', params: DeleteDocumentParams, options?: CallClusterOptions): ReturnType<ESClient['delete']>;
(endpoint: 'deleteByQuery', params: DeleteDocumentByQueryParams, options?: CallClusterOptions): ReturnType<ESClient['deleteByQuery']>;
(endpoint: 'deleteScript', params: DeleteScriptParams, options?: CallClusterOptions): ReturnType<ESClient['deleteScript']>;
(endpoint: 'deleteTemplate', params: DeleteTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['deleteTemplate']>;
(endpoint: 'exists', params: ExistsParams, options?: CallClusterOptions): ReturnType<ESClient['exists']>;
(endpoint: 'explain', params: ExplainParams, options?: CallClusterOptions): ReturnType<ESClient['explain']>;
(endpoint: 'fieldStats', params: FieldStatsParams, options?: CallClusterOptions): ReturnType<ESClient['fieldStats']>;
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
<T>(endpoint: 'get', params: GetParams, options?: CallClusterOptions): Promise<GetResponse<T>>;
(endpoint: 'getScript', params: GetScriptParams, options?: CallClusterOptions): ReturnType<ESClient['getScript']>;
(endpoint: 'getSource', params: GetSourceParams, options?: CallClusterOptions): ReturnType<ESClient['getSource']>;
(endpoint: 'getTemplate', params: GetTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['getTemplate']>;
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
<T>(endpoint: 'index', params: IndexDocumentParams<T>, options?: CallClusterOptions): ReturnType<ESClient['index']>;
(endpoint: 'info', params: InfoParams, options?: CallClusterOptions): ReturnType<ESClient['info']>;
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
<T>(endpoint: 'mget', params: MGetParams, options?: CallClusterOptions): Promise<MGetResponse<T>>;
<T>(endpoint: 'msearch', params: MSearchParams, options?: CallClusterOptions): Promise<MSearchResponse<T>>;
<T>(endpoint: 'msearchTemplate', params: MSearchTemplateParams, options?: CallClusterOptions): Promise<MSearchResponse<T>>;
(endpoint: 'mtermvectors', params: MTermVectorsParams, options?: CallClusterOptions): ReturnType<ESClient['mtermvectors']>;
(endpoint: 'ping', params: PingParams, options?: CallClusterOptions): ReturnType<ESClient['ping']>;
(endpoint: 'putScript', params: PutScriptParams, options?: CallClusterOptions): ReturnType<ESClient['putScript']>;
(endpoint: 'putTemplate', params: PutTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['putTemplate']>;
(endpoint: 'reindex', params: ReindexParams, options?: CallClusterOptions): ReturnType<ESClient['reindex']>;
(endpoint: 'reindexRethrottle', params: ReindexRethrottleParams, options?: CallClusterOptions): ReturnType<ESClient['reindexRethrottle']>;
(endpoint: 'renderSearchTemplate', params: RenderSearchTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['renderSearchTemplate']>;
// Generic types cannot be properly looked up with ReturnType. Hard code these explicitly.
<T>(endpoint: 'scroll', params: ScrollParams, options?: CallClusterOptions): Promise<SearchResponse<T>>;
<T>(endpoint: 'search', params: SearchParams, options?: CallClusterOptions): Promise<SearchResponse<T>>;
(endpoint: 'searchShards', params: SearchShardsParams, options?: CallClusterOptions): ReturnType<ESClient['searchShards']>;
(endpoint: 'searchTemplate', params: SearchTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['searchTemplate']>;
(endpoint: 'suggest', params: SuggestParams, options?: CallClusterOptions): ReturnType<ESClient['suggest']>;
(endpoint: 'termvectors', params: TermvectorsParams, options?: CallClusterOptions): ReturnType<ESClient['termvectors']>;
(endpoint: 'update', params: UpdateDocumentParams, options?: CallClusterOptions): ReturnType<ESClient['update']>;
(endpoint: 'updateByQuery', params: UpdateDocumentByQueryParams, options?: CallClusterOptions): ReturnType<ESClient['updateByQuery']>;
// cat namespace
(endpoint: 'cat.aliases', params: CatAliasesParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['aliases']>;
(endpoint: 'cat.allocation', params: CatAllocationParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['allocation']>;
(endpoint: 'cat.count', params: CatAllocationParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['count']>;
(endpoint: 'cat.fielddata', params: CatFielddataParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['fielddata']>;
(endpoint: 'cat.health', params: CatHealthParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['health']>;
(endpoint: 'cat.help', params: CatHelpParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['help']>;
(endpoint: 'cat.indices', params: CatIndicesParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['indices']>;
(endpoint: 'cat.master', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['master']>;
(endpoint: 'cat.nodeattrs', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['nodeattrs']>;
(endpoint: 'cat.nodes', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['nodes']>;
(endpoint: 'cat.pendingTasks', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['pendingTasks']>;
(endpoint: 'cat.plugins', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['plugins']>;
(endpoint: 'cat.recovery', params: CatRecoveryParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['recovery']>;
(endpoint: 'cat.repositories', params: CatCommonParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['repositories']>;
(endpoint: 'cat.segments', params: CatSegmentsParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['segments']>;
(endpoint: 'cat.shards', params: CatShardsParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['shards']>;
(endpoint: 'cat.snapshots', params: CatSnapshotsParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['snapshots']>;
(endpoint: 'cat.tasks', params: CatTasksParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['tasks']>;
(endpoint: 'cat.threadPool', params: CatThreadPoolParams, options?: CallClusterOptions): ReturnType<ESClient['cat']['threadPool']>;
// cluster namespace
(endpoint: 'cluster.allocationExplain', params: ClusterAllocationExplainParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['allocationExplain']>;
(endpoint: 'cluster.getSettings', params: ClusterGetSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['getSettings']>;
(endpoint: 'cluster.health', params: ClusterHealthParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['health']>;
(endpoint: 'cluster.pendingTasks', params: ClusterPendingTasksParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['pendingTasks']>;
(endpoint: 'cluster.putSettings', params: ClusterPutSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['putSettings']>;
(endpoint: 'cluster.reroute', params: ClusterRerouteParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['reroute']>;
(endpoint: 'cluster.state', params: ClusterStateParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['state']>;
(endpoint: 'cluster.stats', params: ClusterStatsParams, options?: CallClusterOptions): ReturnType<ESClient['cluster']['stats']>;
// indices namespace
(endpoint: 'indices.analyze', params: IndicesAnalyzeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['analyze']>;
(endpoint: 'indices.clearCache', params: IndicesClearCacheParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['clearCache']>;
(endpoint: 'indices.close', params: IndicesCloseParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['close']>;
(endpoint: 'indices.create', params: IndicesCreateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['create']>;
(endpoint: 'indices.delete', params: IndicesDeleteParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['delete']>;
(endpoint: 'indices.deleteAlias', params: IndicesDeleteAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['deleteAlias']>;
(endpoint: 'indices.deleteTemplate', params: IndicesDeleteTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['deleteTemplate']>;
(endpoint: 'indices.exists', params: IndicesExistsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['exists']>;
(endpoint: 'indices.existsAlias', params: IndicesExistsAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['existsAlias']>;
(endpoint: 'indices.existsTemplate', params: IndicesExistsTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['existsTemplate']>;
(endpoint: 'indices.existsType', params: IndicesExistsTypeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['existsType']>;
(endpoint: 'indices.flush', params: IndicesFlushParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['flush']>;
(endpoint: 'indices.flushSynced', params: IndicesFlushSyncedParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['flushSynced']>;
(endpoint: 'indices.forcemerge', params: IndicesForcemergeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['forcemerge']>;
(endpoint: 'indices.get', params: IndicesGetParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['get']>;
(endpoint: 'indices.getAlias', params: IndicesGetAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getAlias']>;
(endpoint: 'indices.getFieldMapping', params: IndicesGetFieldMappingParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getFieldMapping']>;
(endpoint: 'indices.getMapping', params: IndicesGetMappingParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getMapping']>;
(endpoint: 'indices.getSettings', params: IndicesGetSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getSettings']>;
(endpoint: 'indices.getTemplate', params: IndicesGetTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getTemplate']>;
(endpoint: 'indices.getUpgrade', params: IndicesGetUpgradeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['getUpgrade']>;
(endpoint: 'indices.open', params: IndicesOpenParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['open']>;
(endpoint: 'indices.putAlias', params: IndicesPutAliasParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putAlias']>;
(endpoint: 'indices.putMapping', params: IndicesPutMappingParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putMapping']>;
(endpoint: 'indices.putSettings', params: IndicesPutSettingsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putSettings']>;
(endpoint: 'indices.putTemplate', params: IndicesPutTemplateParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['putTemplate']>;
(endpoint: 'indices.recovery', params: IndicesRecoveryParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['recovery']>;
(endpoint: 'indices.refresh', params: IndicesRefreshParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['refresh']>;
(endpoint: 'indices.rollover', params: IndicesRolloverParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['rollover']>;
(endpoint: 'indices.segments', params: IndicesSegmentsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['segments']>;
(endpoint: 'indices.shardStores', params: IndicesShardStoresParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['shardStores']>;
(endpoint: 'indices.shrink', params: IndicesShrinkParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['shrink']>;
(endpoint: 'indices.stats', params: IndicesStatsParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['stats']>;
(endpoint: 'indices.updateAliases', params: IndicesUpdateAliasesParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['updateAliases']>;
(endpoint: 'indices.upgrade', params: IndicesUpgradeParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['upgrade']>;
(endpoint: 'indices.validateQuery', params: IndicesValidateQueryParams, options?: CallClusterOptions): ReturnType<ESClient['indices']['validateQuery']>;
// ingest namespace
(endpoint: 'ingest.deletePipeline', params: IngestDeletePipelineParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['deletePipeline']>;
(endpoint: 'ingest.getPipeline', params: IngestGetPipelineParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['getPipeline']>;
(endpoint: 'ingest.putPipeline', params: IngestPutPipelineParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['putPipeline']>;
(endpoint: 'ingest.simulate', params: IngestSimulateParams, options?: CallClusterOptions): ReturnType<ESClient['ingest']['simulate']>;
// nodes namespace
(endpoint: 'nodes.hotThreads', params: NodesHotThreadsParams, options?: CallClusterOptions): ReturnType<ESClient['nodes']['hotThreads']>;
(endpoint: 'nodes.info', params: NodesInfoParams, options?: CallClusterOptions): ReturnType<ESClient['nodes']['info']>;
(endpoint: 'nodes.stats', params: NodesStatsParams, options?: CallClusterOptions): ReturnType<ESClient['nodes']['stats']>;
// snapshot namespace
(endpoint: 'snapshot.create', params: SnapshotCreateParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['create']>;
(endpoint: 'snapshot.createRepository', params: SnapshotCreateRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['createRepository']>;
(endpoint: 'snapshot.delete', params: SnapshotDeleteParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['delete']>;
(endpoint: 'snapshot.deleteRepository', params: SnapshotDeleteRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['deleteRepository']>;
(endpoint: 'snapshot.get', params: SnapshotGetParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['get']>;
(endpoint: 'snapshot.getRepository', params: SnapshotGetRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['getRepository']>;
(endpoint: 'snapshot.restore', params: SnapshotRestoreParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['restore']>;
(endpoint: 'snapshot.status', params: SnapshotStatusParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['status']>;
(endpoint: 'snapshot.verifyRepository', params: SnapshotVerifyRepositoryParams, options?: CallClusterOptions): ReturnType<ESClient['snapshot']['verifyRepository']>;
// tasks namespace
(endpoint: 'tasks.cancel', params: TasksCancelParams, options?: CallClusterOptions): ReturnType<ESClient['tasks']['cancel']>;
(endpoint: 'tasks.get', params: TasksGetParams, options?: CallClusterOptions): ReturnType<ESClient['tasks']['get']>;
(endpoint: 'tasks.list', params: TasksListParams, options?: CallClusterOptions): ReturnType<ESClient['tasks']['list']>;
// other APIs accessed via transport.request
(endpoint: 'transport.request', clientParams: AssistantAPIClientParams, options?: {}): Promise<
AssistanceAPIResponse
>;
(endpoint: 'transport.request', clientParams: DeprecationAPIClientParams, options?: {}): Promise<
DeprecationAPIResponse
>;
// Catch-all definition
<T = any>(endpoint: string, clientParams?: any, options?: CallClusterOptions): Promise<T>;
/* eslint-enable */
}
export interface ElasticsearchPlugin {
status: { on: (status: string, cb: () => void) => void };
getCluster(name: string): Cluster;
}

View file

@ -1,58 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { Cluster } from './server/lib/cluster';
import { createProxy } from './server/lib/create_proxy';
export default function (kibana) {
return new kibana.Plugin({
require: [],
async init(server) {
// All methods that ES plugin exposes are synchronous so we should get the first
// value from all observables here to be able to synchronously return and create
// cluster clients afterwards.
const { client } = server.newPlatform.setup.core.elasticsearch.legacy;
const adminCluster = new Cluster(client);
const dataCluster = new Cluster(client);
const clusters = new Map();
server.expose('getCluster', (name) => {
if (name === 'admin') {
return adminCluster;
}
if (name === 'data') {
return dataCluster;
}
return clusters.get(name);
});
server.events.on('stop', () => {
for (const cluster of clusters.values()) {
cluster.close();
}
clusters.clear();
});
createProxy(server);
},
});
}

View file

@ -1,5 +0,0 @@
{
"name": "elasticsearch",
"version": "kibana",
"types": "index.d.ts"
}

View file

@ -1,34 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { AbortController } from 'abortcontroller-polyfill/dist/cjs-ponyfill';
/*
* A simple utility for generating a handler that provides a signal to the handler that signals when
* the client has closed the connection on this request.
*/
export function abortableRequestHandler(fn) {
return (req, ...args) => {
const controller = new AbortController();
req.events.once('disconnect', () => {
controller.abort();
});
return fn(controller.signal, req, ...args);
};
}

View file

@ -1,58 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { AbortSignal } from 'abortcontroller-polyfill/dist/cjs-ponyfill';
import { abortableRequestHandler } from './abortable_request_handler';
describe('abortableRequestHandler', () => {
jest.useFakeTimers();
it('should call abort if disconnected', () => {
const eventHandlers = new Map();
const mockRequest = {
events: {
once: jest.fn((key, fn) => eventHandlers.set(key, fn)),
},
};
const handler = jest.fn();
const onAborted = jest.fn();
const abortableHandler = abortableRequestHandler(handler);
abortableHandler(mockRequest);
const [signal, request] = handler.mock.calls[0];
expect(signal instanceof AbortSignal).toBe(true);
expect(request).toBe(mockRequest);
signal.addEventListener('abort', onAborted);
// Shouldn't be aborted or call onAborted prior to disconnecting
expect(signal.aborted).toBe(false);
expect(onAborted).not.toBeCalled();
expect(eventHandlers.has('disconnect')).toBe(true);
eventHandlers.get('disconnect')();
jest.runAllTimers();
// Should be aborted and call onAborted after disconnecting
expect(signal.aborted).toBe(true);
expect(onAborted).toBeCalled();
});
});

View file

@ -1,51 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { Request } from 'hapi';
import { errors } from 'elasticsearch';
import { LegacyCallAPIOptions, LegacyClusterClient, FakeRequest } from 'kibana/server';
export class Cluster {
public readonly errors = errors;
constructor(private readonly clusterClient: LegacyClusterClient) {}
public callWithRequest = async (
req: Request | FakeRequest,
endpoint: string,
clientParams?: Record<string, unknown>,
options?: LegacyCallAPIOptions
) => {
return await this.clusterClient
.asScoped(req)
.callAsCurrentUser(endpoint, clientParams, options);
};
public callWithInternalUser = async (
endpoint: string,
clientParams?: Record<string, unknown>,
options?: LegacyCallAPIOptions
) => {
return await this.clusterClient.callAsInternalUser(endpoint, clientParams, options);
};
public close() {
this.clusterClient.close();
}
}

View file

@ -1,79 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import Joi from 'joi';
import { abortableRequestHandler } from './abortable_request_handler';
export function createProxy(server) {
const { callWithRequest } = server.plugins.elasticsearch.getCluster('data');
server.route({
method: 'POST',
path: '/elasticsearch/_msearch',
config: {
payload: {
parse: 'gunzip',
},
},
handler: abortableRequestHandler((signal, req, h) => {
const { query, payload } = req;
return callWithRequest(
req,
'transport.request',
{
path: '/_msearch',
method: 'POST',
query,
body: payload.toString('utf8'),
},
{ signal }
).finally((r) => h.response(r));
}),
});
server.route({
method: 'POST',
path: '/elasticsearch/{index}/_search',
config: {
validate: {
params: Joi.object().keys({
index: Joi.string().required(),
}),
},
},
handler: abortableRequestHandler(async (signal, req) => {
const { query, payload: body } = req;
try {
return await callWithRequest(
req,
'transport.request',
{
path: `/${encodeURIComponent(req.params.index)}/_search`,
method: 'POST',
query,
body,
},
{ signal }
);
} catch (error) {
return JSON.parse(error.response);
}
}),
});
}

View file

@ -33,7 +33,6 @@ import {
import { LegacyConfig, ILegacyInternals } from '../../core/server/legacy';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { UiPlugins } from '../../core/server/plugins';
import { ElasticsearchPlugin } from '../core_plugins/elasticsearch';
// lot of legacy code was assuming this type only had these two methods
export type KibanaConfig = Pick<LegacyConfig, 'get' | 'has'>;
@ -41,10 +40,7 @@ export type KibanaConfig = Pick<LegacyConfig, 'get' | 'has'>;
// Extend the defaults with the plugins and server methods we need.
declare module 'hapi' {
interface PluginProperties {
elasticsearch: ElasticsearchPlugin;
kibana: any;
spaces: any;
// add new plugin types here
}
interface Server {

View file

@ -1,40 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export default function ({ getService }) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
describe('elasticsearch', () => {
before(() => esArchiver.load('elasticsearch'));
after(() => esArchiver.unload('elasticsearch'));
it('allows search to specific index', async () =>
await supertest.post('/elasticsearch/elasticsearch/_search').expect(200));
it('allows msearch', async () =>
await supertest
.post('/elasticsearch/_msearch')
.set('content-type', 'application/x-ndjson')
.send(
'{"index":"logstash-2015.04.21","ignore_unavailable":true}\n{"size":500,"sort":{"@timestamp":"desc"},"query":{"bool":{"must":[{"query_string":{"analyze_wildcard":true,"query":"*"}},{"bool":{"must":[{"range":{"@timestamp":{"gte":1429577068175,"lte":1429577968175}}}],"must_not":[]}}],"must_not":[]}},"highlight":{"pre_tags":["@kibana-highlighted-field@"],"post_tags":["@/kibana-highlighted-field@"],"fields":{"*":{}}},"aggs":{"2":{"date_histogram":{"field":"@timestamp","interval":"30s","min_doc_count":0,"extended_bounds":{"min":1429577068175,"max":1429577968175}}}},"stored_fields":["*"],"_source": true,"script_fields":{},"docvalue_fields":["timestamp_offset","@timestamp","utc_time"]}\n'
)
.expect(200));
});
}

View file

@ -20,7 +20,6 @@
export default function ({ loadTestFile }) {
describe('apis', () => {
loadTestFile(require.resolve('./core'));
loadTestFile(require.resolve('./elasticsearch'));
loadTestFile(require.resolve('./general'));
loadTestFile(require.resolve('./home'));
loadTestFile(require.resolve('./index_patterns'));

View file

@ -18,7 +18,6 @@ export function createJestConfig({ kibanaDirectory, rootDir, xPackKibanaDirector
'^src/core/(.*)': `${kibanaDirectory}/src/core/$1`,
'^src/legacy/(.*)': `${kibanaDirectory}/src/legacy/$1`,
'^src/plugins/(.*)': `${kibanaDirectory}/src/plugins/$1`,
'^plugins/([^/.]*)(.*)': `${kibanaDirectory}/src/legacy/core_plugins/$1/public$2`,
'^legacy/plugins/xpack_main/(.*);': `${xPackKibanaDirectory}/legacy/plugins/xpack_main/public/$1`,
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': fileMockPath,
'\\.module.(css|scss)$': `${kibanaDirectory}/src/dev/jest/mocks/css_module_mock.js`,

View file

@ -16,7 +16,7 @@ export const spaces = (kibana: Record<string, any>) =>
id: 'spaces',
configPrefix: 'xpack.spaces',
publicDir: resolve(__dirname, 'public'),
require: ['elasticsearch', 'xpack_main'],
require: ['xpack_main'],
config(Joi: any) {
return Joi.object({
enabled: Joi.boolean().default(true),

View file

@ -13,7 +13,7 @@ export const xpackMain = (kibana) => {
id: 'xpack_main',
configPrefix: 'xpack.xpack_main',
publicDir: resolve(__dirname, 'public'),
require: ['elasticsearch'],
require: [],
config(Joi) {
return Joi.object({

View file

@ -5,9 +5,9 @@
*/
import { Legacy } from 'kibana';
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { LegacyAPICaller } from '../../../../../../src/core/server';
export type CallWithRequest = (...args: any[]) => CallCluster;
export type CallWithRequest = (...args: any[]) => LegacyAPICaller;
export declare function callWithRequestFactory(
server: Legacy.Server,

View file

@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { LegacyAPICaller } from 'kibana/server';
import { TelemetryCollector } from '../../types';
import { workpadCollector } from './workpad_collector';
@ -32,7 +32,7 @@ export function registerCanvasUsageCollector(
const canvasCollector = usageCollection.makeUsageCollector({
type: 'canvas',
isReady: () => true,
fetch: async (callCluster: CallCluster) => {
fetch: async (callCluster: LegacyAPICaller) => {
const collectorResults = await Promise.all(
collectors.map((collector) => collector(kibanaIndex, callCluster))
);

View file

@ -38,10 +38,6 @@ module.exports = {
'src/plugins/data/public/expressions/interpreter'
),
'kbn/interpreter': path.resolve(KIBANA_ROOT, 'packages/kbn-interpreter/target/common'),
'types/interpreter': path.resolve(
KIBANA_ROOT,
'src/legacy/core_plugins/interpreter/public/types'
),
tinymath: path.resolve(KIBANA_ROOT, 'node_modules/tinymath/lib/tinymath.es5.js'),
core_app_image_assets: path.resolve(KIBANA_ROOT, 'src/core/public/core_app/images'),
},

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { LegacyAPICaller } from 'kibana/server';
/**
Function for collecting information about canvas usage
@ -13,7 +13,7 @@ export type TelemetryCollector = (
/** The server instance */
kibanaIndex: string,
/** Function for calling elasticsearch */
callCluster: CallCluster
callCluster: LegacyAPICaller
) => Record<string, any>;
export interface TelemetryCustomElementDocument {

View file

@ -5,7 +5,7 @@
*/
import { get } from 'lodash';
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { LegacyAPICaller } from 'kibana/server';
import { ReportingConfig } from '../';
import { ExportTypesRegistry } from '../lib/export_types_registry';
import { GetLicense } from './';
@ -118,7 +118,7 @@ async function handleResponse(response: SearchResponse): Promise<Partial<RangeSt
export async function getReportingUsage(
config: ReportingConfig,
getLicense: GetLicense,
callCluster: CallCluster,
callCluster: LegacyAPICaller,
exportTypesRegistry: ExportTypesRegistry
): Promise<ReportingUsageType> {
const reportingIndex = config.get('index');

View file

@ -5,7 +5,7 @@
*/
import { first, map } from 'rxjs/operators';
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { LegacyAPICaller } from 'kibana/server';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { ReportingCore } from '../';
import { ExportTypesRegistry } from '../lib/export_types_registry';
@ -36,7 +36,7 @@ export function getReportingUsageCollector(
) {
return usageCollection.makeUsageCollector<ReportingUsageType, XpackBulkUpload>({
type: 'reporting',
fetch: (callCluster: CallCluster) => {
fetch: (callCluster: LegacyAPICaller) => {
const config = reporting.getConfig();
return getReportingUsage(config, getLicense, callCluster, exportTypesRegistry);
},

View file

@ -6,7 +6,7 @@
import { get } from 'lodash';
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { LegacyAPICaller } from 'kibana/server';
interface IdToFlagMap {
[key: string]: boolean;
@ -27,7 +27,7 @@ function createIdToFlagMap(ids: string[]) {
}, {} as any);
}
async function fetchRollupIndexPatterns(kibanaIndex: string, callCluster: CallCluster) {
async function fetchRollupIndexPatterns(kibanaIndex: string, callCluster: LegacyAPICaller) {
const searchParams = {
size: ES_MAX_RESULT_WINDOW_DEFAULT_VALUE,
index: kibanaIndex,
@ -56,7 +56,7 @@ async function fetchRollupIndexPatterns(kibanaIndex: string, callCluster: CallCl
async function fetchRollupSavedSearches(
kibanaIndex: string,
callCluster: CallCluster,
callCluster: LegacyAPICaller,
rollupIndexPatternToFlagMap: IdToFlagMap
) {
const searchParams = {
@ -104,7 +104,7 @@ async function fetchRollupSavedSearches(
async function fetchRollupVisualizations(
kibanaIndex: string,
callCluster: CallCluster,
callCluster: LegacyAPICaller,
rollupIndexPatternToFlagMap: IdToFlagMap,
rollupSavedSearchesToFlagMap: IdToFlagMap
) {
@ -211,7 +211,7 @@ export function registerRollupUsageCollector(
total: { type: 'long' },
},
},
fetch: async (callCluster: CallCluster) => {
fetch: async (callCluster: LegacyAPICaller) => {
const rollupIndexPatterns = await fetchRollupIndexPatterns(kibanaIndex, callCluster);
const rollupIndexPatternToFlagMap = createIdToFlagMap(rollupIndexPatterns);

View file

@ -20,10 +20,9 @@ export class SearchProfilerServerPlugin implements Plugin {
this.licenseStatus = { valid: false };
}
async setup({ http }: CoreSetup, { licensing, elasticsearch }: AppServerPluginDependencies) {
async setup({ http }: CoreSetup, { licensing }: AppServerPluginDependencies) {
const router = http.createRouter();
profileRoute.register({
elasticsearch,
router,
getLicenseStatus: () => this.licenseStatus,
log: this.log,

View file

@ -5,18 +5,15 @@
*/
import { IRouter, Logger } from 'kibana/server';
import { ElasticsearchPlugin } from '../../../../src/legacy/core_plugins/elasticsearch';
import { LicensingPluginSetup } from '../../licensing/server';
import { LicenseStatus } from '../common';
export interface AppServerPluginDependencies {
licensing: LicensingPluginSetup;
elasticsearch: ElasticsearchPlugin;
}
export interface RouteDependencies {
getLicenseStatus: () => LicenseStatus;
elasticsearch: ElasticsearchPlugin;
router: IRouter;
log: Logger;
}

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { LegacyAPICaller } from 'kibana/server';
import { TIMEOUT } from './constants';
/**
@ -14,7 +14,7 @@ import { TIMEOUT } from './constants';
*
* Like any X-Pack related API, X-Pack must installed for this to work.
*/
export function getXPackUsage(callCluster: CallCluster) {
export function getXPackUsage(callCluster: LegacyAPICaller) {
return callCluster('transport.request', {
method: 'GET',
path: '/_xpack/usage',

View file

@ -10,8 +10,8 @@ import {
RequestHandler,
RequestHandlerContext,
SavedObjectsClientContract,
LegacyAPICaller,
} from 'kibana/server';
import { CallCluster } from 'src/legacy/core_plugins/elasticsearch';
import { wrapEsError } from '../../../../../legacy/server/lib/create_router/error_wrappers';
import { TRANSFORM_STATE } from '../../../common/constants';
@ -394,7 +394,7 @@ export function registerTransformsRoutes(routeDependencies: RouteDependencies) {
const getTransforms = async (
options: { transformId?: string },
callAsCurrentUser: CallCluster
callAsCurrentUser: LegacyAPICaller
): Promise<GetTransformsResponseSchema> => {
return await callAsCurrentUser('transform.getTransforms', options);
};
@ -570,7 +570,7 @@ const startTransformsHandler: RequestHandler<
async function startTransforms(
transformsInfo: StartTransformsRequestSchema,
callAsCurrentUser: CallCluster
callAsCurrentUser: LegacyAPICaller
) {
const results: StartTransformsResponseSchema = {};
@ -612,7 +612,7 @@ const stopTransformsHandler: RequestHandler<
async function stopTransforms(
transformsInfo: StopTransformsRequestSchema,
callAsCurrentUser: CallCluster
callAsCurrentUser: LegacyAPICaller
) {
const results: StopTransformsResponseSchema = {};

View file

@ -4,8 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { DeprecationInfo } from 'src/legacy/core_plugins/elasticsearch';
import { SavedObject, SavedObjectAttributes } from 'src/core/public';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationInfo } from '../../../../src/core/server/elasticsearch/legacy/api_types';
export enum ReindexStep {
// Enum values are spaced out by 10 to give us room to insert steps in between.

View file

@ -6,8 +6,8 @@
import { IconColor } from '@elastic/eui';
import { invert } from 'lodash';
import { DeprecationInfo } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationInfo } from '../../../../../../../../src/core/server/elasticsearch/legacy/api_types';
export const LEVEL_MAP: { [level: string]: number } = {
warning: 0,

View file

@ -8,8 +8,8 @@ import React, { FunctionComponent, useState } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiButton, EuiFieldSearch, EuiFlexGroup, EuiFlexItem, EuiCallOut } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { DeprecationInfo } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationInfo } from '../../../../../../../../src/core/server/elasticsearch/legacy/api_types';
import { GroupByOption, LevelFilterOption, LoadingState } from '../../types';
import { FilterBar } from './filter_bar';
import { GroupByBar } from './group_by_bar';

View file

@ -7,10 +7,10 @@
import { range } from 'lodash';
import React from 'react';
import { mountWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { EuiBadge, EuiPagination } from '@elastic/eui';
import { DeprecationInfo } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationInfo } from '../../../../../../../../../src/core/server/elasticsearch/legacy/api_types';
import { EnrichedDeprecationInfo } from '../../../../../../common/types';
import { GroupByOption, LevelFilterOption } from '../../../types';
import { DeprecationAccordion, filterDeps, GroupedDeprecations } from './grouped';

View file

@ -18,7 +18,8 @@ import {
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { DeprecationInfo } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationInfo } from '../../../../../../../../../src/core/server/elasticsearch/legacy/api_types';
import { EnrichedDeprecationInfo } from '../../../../../../common/types';
import { GroupByOption, LevelFilterOption } from '../../../types';

View file

@ -10,7 +10,8 @@ import React, { FunctionComponent } from 'react';
import { EuiBadge, EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { DeprecationInfo } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationInfo } from '../../../../../../../../../src/core/server/elasticsearch/legacy/api_types';
import { COLOR_MAP, LEVEL_MAP, REVERSE_LEVEL_MAP } from '../constants';
const LocalizedLevels: { [level: string]: string } = {

View file

@ -6,7 +6,8 @@
import React, { FunctionComponent } from 'react';
import { DeprecationInfo } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationInfo } from '../../../../../../../../../src/core/server/elasticsearch/legacy/api_types';
import { EnrichedDeprecationInfo } from '../../../../../../common/types';
import { GroupByOption } from '../../../types';

View file

@ -7,7 +7,8 @@
import { mount, shallow } from 'enzyme';
import React from 'react';
import { DeprecationInfo } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationInfo } from '../../../../../../../../src/core/server/elasticsearch/legacy/api_types';
import { LevelFilterOption } from '../../types';
import { FilterBar } from './filter_bar';

View file

@ -10,7 +10,8 @@ import React from 'react';
import { EuiFilterButton, EuiFilterGroup, EuiFlexItem } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { DeprecationInfo } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationInfo } from '../../../../../../../../src/core/server/elasticsearch/legacy/api_types';
import { LevelFilterOption } from '../../types';
const LocalizedOptions: { [option: string]: string } = {

View file

@ -6,7 +6,8 @@
import _ from 'lodash';
import { elasticsearchServiceMock } from 'src/core/server/mocks';
import { DeprecationAPIResponse } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationAPIResponse } from '../../../../../src/core/server/elasticsearch/legacy/api_types';
import { getUpgradeAssistantStatus } from './es_migration_apis';
import fakeDeprecations from './__fixtures__/fake_deprecations.json';

View file

@ -5,7 +5,8 @@
*/
import { ILegacyScopedClusterClient } from 'src/core/server';
import { DeprecationAPIResponse } from 'src/legacy/core_plugins/elasticsearch';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import type { DeprecationAPIResponse } from '../../../../../src/core/server/elasticsearch/legacy/api_types';
import { EnrichedDeprecationInfo, UpgradeAssistantStatus } from '../../common/types';
import { esIndicesStateCheck } from './es_indices_state_check';

View file

@ -21,22 +21,13 @@
"paths": {
"kibana/public": ["src/core/public"],
"kibana/server": ["src/core/server"],
"plugins/xpack_main/*": [
"x-pack/legacy/plugins/xpack_main/public/*"
],
"plugins/spaces/*": [
"x-pack/legacy/plugins/spaces/public/*"
],
"test_utils/*": [
"x-pack/test_utils/*"
],
"plugins/*": ["src/legacy/core_plugins/*/public/"],
"fixtures/*": ["src/fixtures/*"],
"plugins/xpack_main/*": ["x-pack/legacy/plugins/xpack_main/public/*"],
"plugins/spaces/*": ["x-pack/legacy/plugins/spaces/public/*"],
"test_utils/*": ["x-pack/test_utils/*"],
"fixtures/*": ["src/fixtures/*"]
},
// overhead is too significant
"incremental": false,
"incremental": false
},
"references": [
{ "path": "../src/core/tsconfig.json" }
]
"references": [{ "path": "../src/core/tsconfig.json" }]
}