diff --git a/src/core/server/index.ts b/src/core/server/index.ts index c05faf0cc6a89..8de4ccda2f022 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -429,7 +429,11 @@ export type { DeprecationsClient, DeprecationsRequestHandlerContext, } from '@kbn/core-deprecations-server'; -export type { DeprecationsDetails } from '@kbn/core-deprecations-common'; +export type { + DeprecationsDetails, + DomainDeprecationDetails, + DeprecationsGetResponse, +} from '@kbn/core-deprecations-common'; export type { AppCategory } from '@kbn/core-application-common'; export { DEFAULT_APP_CATEGORIES, APP_WRAPPER_CLASS } from '@kbn/core-application-common'; diff --git a/src/core/server/types.ts b/src/core/server/types.ts deleted file mode 100644 index 130674543ae48..0000000000000 --- a/src/core/server/types.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -/** This module is intended for consumption by public to avoid import issues with server-side code */ -export type { EnvironmentMode, PackageInfo } from '@kbn/config'; -export type { PluginOpaqueId } from '@kbn/core-base-common'; -export type { - SavedObjectsImportResponse, - SavedObjectsImportSuccess, - SavedObjectsImportConflictError, - SavedObjectsImportAmbiguousConflictError, - SavedObjectsImportUnsupportedTypeError, - SavedObjectsImportMissingReferencesError, - SavedObjectsImportUnknownError, - SavedObjectsImportFailure, - SavedObjectsImportRetry, - SavedObjectsImportWarning, - SavedObjectsImportActionRequiredWarning, - SavedObjectsImportSimpleWarning, - SavedObjectAttributes, - SavedObjectAttribute, - SavedObjectAttributeSingle, - SavedObject, - SavedObjectsNamespaceType, - SavedObjectError, - SavedObjectReference, - SavedObjectsMigrationVersion, -} from '@kbn/core-saved-objects-common'; -export type { - SavedObjectsFindOptionsReference, - SavedObjectsFindOptions, - SavedObjectsPitParams, - SavedObjectsBaseOptions, - MutatingOperationRefreshSetting, - SavedObjectsClientContract, - SavedObjectReferenceWithContext, - SavedObjectsCollectMultiNamespaceReferencesResponse, -} from '@kbn/core-saved-objects-api-server'; -export type { - DomainDeprecationDetails, - DeprecationsGetResponse, -} from '@kbn/core-deprecations-common'; -export type { ExternalUrlConfig } from '@kbn/core-http-server-internal'; -export type { SavedObjectStatusMeta } from '@kbn/core-saved-objects-server'; -export type { - UiSettingsParams, - PublicUiSettingsParams, - UiSettingsType, - UserProvidedValues, - DeprecationSettings, -} from '@kbn/core-ui-settings-common'; -export type { - IUiSettingsClient, - UiSettingsServiceSetup, - UiSettingsServiceStart, - UiSettingsRequestHandlerContext, -} from '@kbn/core-ui-settings-server'; diff --git a/test/api_integration/apis/data_views/deprecations/scripted_fields.ts b/test/api_integration/apis/data_views/deprecations/scripted_fields.ts index 2b3ffca019370..17c99763611ea 100644 --- a/test/api_integration/apis/data_views/deprecations/scripted_fields.ts +++ b/test/api_integration/apis/data_views/deprecations/scripted_fields.ts @@ -7,7 +7,7 @@ */ import expect from '@kbn/expect'; -import type { DeprecationsGetResponse } from '@kbn/core/server/types'; +import type { DeprecationsGetResponse } from '@kbn/core/server'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { diff --git a/test/plugin_functional/test_suites/core/deprecations.ts b/test/plugin_functional/test_suites/core/deprecations.ts index 4b63f62670cca..6fe8e912745e0 100644 --- a/test/plugin_functional/test_suites/core/deprecations.ts +++ b/test/plugin_functional/test_suites/core/deprecations.ts @@ -7,8 +7,9 @@ */ import expect from '@kbn/expect'; -import type { DomainDeprecationDetails, DeprecationsGetResponse } from '@kbn/core/server/types'; + import type { ResolveDeprecationResponse } from '@kbn/core/public'; +import type { DeprecationsGetResponse, DomainDeprecationDetails } from '@kbn/core/server'; import { PluginFunctionalProviderContext } from '../../services'; export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { diff --git a/x-pack/plugins/actions/server/lib/action_task_params_utils.ts b/x-pack/plugins/actions/server/lib/action_task_params_utils.ts index 4c2d1b4c9dc20..425e8dfb107f2 100644 --- a/x-pack/plugins/actions/server/lib/action_task_params_utils.ts +++ b/x-pack/plugins/actions/server/lib/action_task_params_utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectAttribute, SavedObjectReference } from '@kbn/core/server/types'; +import { SavedObjectAttribute, SavedObjectReference } from '@kbn/core/server'; import { RelatedSavedObjects } from './related_saved_objects'; export const ACTION_REF_NAME = `actionRef`; diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts index 2cf665e0fc094..1bf00f7045224 100644 --- a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts @@ -12,9 +12,10 @@ import type { SavedObjectsBulkCreateObject, SavedObjectsClientContract, ISavedObjectsImporter, + SavedObjectsImportSuccess, + SavedObjectsImportFailure, Logger, } from '@kbn/core/server'; -import type { SavedObjectsImportSuccess, SavedObjectsImportFailure } from '@kbn/core/server/types'; import { createListStream } from '@kbn/utils'; import { partition } from 'lodash'; diff --git a/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts index 4e7aeefd33711..af38b09935c77 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.test.ts @@ -6,7 +6,7 @@ */ import { deprecationsServiceMock } from '@kbn/core/server/mocks'; -import { DomainDeprecationDetails } from '@kbn/core/server/types'; +import type { DomainDeprecationDetails } from '@kbn/core/server'; import { getKibanaUpgradeStatus } from './kibana_status'; diff --git a/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.ts b/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.ts index 89fdd8e83847b..dd07e2761b5cc 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/kibana_status.ts @@ -5,8 +5,7 @@ * 2.0. */ -import { DeprecationsClient } from '@kbn/core/server'; -import { DomainDeprecationDetails } from '@kbn/core/server/types'; +import { DeprecationsClient, DomainDeprecationDetails } from '@kbn/core/server'; export const getKibanaUpgradeStatus = async (deprecationsClient: DeprecationsClient) => { const kibanaDeprecations: DomainDeprecationDetails[] =