diff --git a/src/core/public/saved_objects/saved_objects_client.ts b/src/core/public/saved_objects/saved_objects_client.ts index 729d356e76ebd..c71fe51956c28 100644 --- a/src/core/public/saved_objects/saved_objects_client.ts +++ b/src/core/public/saved_objects/saved_objects_client.ts @@ -33,6 +33,7 @@ import { import { isAutoCreateIndexError, showAutoCreateIndexErrorPage, + // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '../../../legacy/ui/public/error_auto_create_index/error_auto_create_index'; import { SimpleSavedObject } from './simple_saved_object'; import { HttpFetchOptions, HttpServiceBase } from '../http'; diff --git a/src/core/server/legacy/plugins/find_legacy_plugin_specs.ts b/src/core/server/legacy/plugins/find_legacy_plugin_specs.ts index c0a6026708af3..9c95ed61ae66e 100644 --- a/src/core/server/legacy/plugins/find_legacy_plugin_specs.ts +++ b/src/core/server/legacy/plugins/find_legacy_plugin_specs.ts @@ -25,6 +25,7 @@ import { // @ts-ignore } from '../../../../legacy/plugin_discovery/find_plugin_specs.js'; import { LoggerFactory } from '../../logging'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths import { collectUiExports as collectLegacyUiExports } from '../../../../legacy/ui/ui_exports/collect_ui_exports'; import { Config } from '../../config'; diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts index 51d4a8ad50ad6..edb41fe4136c0 100644 --- a/src/core/server/saved_objects/service/lib/repository.ts +++ b/src/core/server/saved_objects/service/lib/repository.ts @@ -18,7 +18,7 @@ */ import { omit } from 'lodash'; -import { CallCluster } from 'src/legacy/core_plugins/elasticsearch'; +import { APICaller } from '../../../elasticsearch/'; import { getRootPropertiesObjects, IndexMapping } from '../../mappings'; import { getSearchDsl } from './search_dsl'; @@ -77,12 +77,12 @@ export interface SavedObjectsRepositoryOptions { index: string; config: Config; mappings: IndexMapping; - callCluster: CallCluster; + callCluster: APICaller; schema: SavedObjectsSchema; serializer: SavedObjectsSerializer; migrator: KibanaMigrator; allowedTypes: string[]; - onBeforeWrite?: (...args: Parameters) => Promise; + onBeforeWrite?: (...args: Parameters) => Promise; } export interface IncrementCounterOptions extends SavedObjectsBaseOptions { @@ -100,8 +100,8 @@ export class SavedObjectsRepository { private _mappings: IndexMapping; private _schema: SavedObjectsSchema; private _allowedTypes: string[]; - private _onBeforeWrite: (...args: Parameters) => Promise; - private _unwrappedCallCluster: CallCluster; + private _onBeforeWrite: (...args: Parameters) => Promise; + private _unwrappedCallCluster: APICaller; private _serializer: SavedObjectsSerializer; constructor(options: SavedObjectsRepositoryOptions) { @@ -136,7 +136,7 @@ export class SavedObjectsRepository { this._onBeforeWrite = onBeforeWrite; - this._unwrappedCallCluster = async (...args: Parameters) => { + this._unwrappedCallCluster = async (...args: Parameters) => { await migrator.runMigrations(); return callCluster(...args); }; diff --git a/src/core/server/ui_settings/integration_tests/lib/servers.ts b/src/core/server/ui_settings/integration_tests/lib/servers.ts index a1be1e7e7291e..1abe6dc2d0683 100644 --- a/src/core/server/ui_settings/integration_tests/lib/servers.ts +++ b/src/core/server/ui_settings/integration_tests/lib/servers.ts @@ -25,7 +25,7 @@ import { TestKibanaUtils, TestUtils, } from '../../../../../test_utils/kbn_server'; -import { CallCluster } from '../../../../../legacy/core_plugins/elasticsearch'; +import { APICaller } from '../../../elasticsearch/'; let servers: TestUtils; let esServer: TestElasticsearchUtils; @@ -36,7 +36,7 @@ let kbnServer: TestKibanaUtils['kbnServer']; interface AllServices { kbnServer: TestKibanaUtils['kbnServer']; savedObjectsClient: SavedObjectsClientContract; - callCluster: CallCluster; + callCluster: APICaller; uiSettings: IUiSettingsClient; deleteKibanaIndex: typeof deleteKibanaIndex; } @@ -61,7 +61,7 @@ export async function startServers() { kbnServer = kbn.kbnServer; } -async function deleteKibanaIndex(callCluster: CallCluster) { +async function deleteKibanaIndex(callCluster: APICaller) { const kibanaIndices = await callCluster('cat.indices', { index: '.kibana*', format: 'json' }); const indexNames = kibanaIndices.map((x: any) => x.index); if (!indexNames.length) {