From 631675ba39a1b6f685885d803ac86b103f438f29 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Wed, 25 Jan 2023 13:38:05 +0100 Subject: [PATCH] [Saved Objects] Import SO types from `server` rather than `common` to avoid deprecation (#149289) ## Summary After merging https://github.com/elastic/kibana/pull/148979 there are a number of imports that can be fixed immediately to address our new deprecation notice. ## To Core reviewers The package `core-saved-objects-server` is using types from `core-saved-objects-api-server` which creates a circular dependency when using `SavedObject` type from it's new home in `core-saved-object-server`: `core-saved-objects-server` -> `core-saved-objects-api-server` -> `core-saved-objects-server` One solution is that we can create a new package `packages/core/saved-objects/core-saved-objects-server-shared` that will only hold the `SavedObject` type and a select few others. I'm not sure what the best approach here is. I have left `core-saved-objects-api-server` unchanged for now (i.e., it is still importing `SavedObject` from `common` which is deprecated). Any input would be greatly appreciated! Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../src/lib/collect_multi_namespace_references.ts | 2 +- .../src/lib/internal_bulk_resolve.test.ts | 2 +- .../src/lib/internal_bulk_resolve.ts | 2 +- .../src/lib/internal_utils.ts | 2 +- .../src/lib/repository.security_extension.test.ts | 2 +- .../src/lib/repository.spaces_extension.test.ts | 2 +- .../src/lib/repository.test.ts | 2 +- .../src/lib/repository.ts | 2 +- .../src/lib/update_objects_spaces.ts | 2 +- .../src/saved_objects_client.ts | 2 +- .../src/test_helpers/repository.test.common.ts | 2 +- .../core-saved-objects-api-server/src/apis/create.ts | 6 ++---- .../core-saved-objects-api-server/tsconfig.json | 2 +- .../core-saved-objects-common/src/saved_objects.ts | 10 +++++----- .../src/export/apply_export_transforms.test.ts | 2 +- .../src/export/collect_exported_objects.test.ts | 3 ++- .../src/export/collect_exported_objects.ts | 2 +- .../src/export/errors.ts | 2 +- .../src/export/saved_objects_exporter.test.ts | 2 +- .../src/export/saved_objects_exporter.ts | 2 +- .../src/export/sort_objects.test.ts | 2 +- .../src/export/sort_objects.ts | 2 +- .../src/export/utils.test.ts | 2 +- .../src/export/utils.ts | 2 +- .../src/import/import_saved_objects.test.ts | 2 +- .../src/import/lib/check_conflicts.test.ts | 7 ++----- .../src/import/lib/check_conflicts.ts | 2 +- .../src/import/lib/check_origin_conflicts.test.ts | 8 +++++--- .../src/import/lib/check_origin_conflicts.ts | 3 +-- .../src/import/lib/collect_saved_objects.ts | 3 ++- .../src/import/lib/create_objects_filter.ts | 3 ++- .../src/import/lib/create_saved_objects.test.ts | 3 ++- .../src/import/lib/create_saved_objects.ts | 3 ++- .../src/import/lib/execute_import_hooks.test.ts | 3 ++- .../src/import/lib/execute_import_hooks.ts | 3 ++- .../src/import/lib/extract_errors.test.ts | 3 +-- .../src/import/lib/extract_errors.ts | 3 ++- .../lib/get_import_state_map_for_retries.test.ts | 3 ++- .../src/import/lib/get_import_state_map_for_retries.ts | 3 ++- .../src/import/lib/regenerate_ids.test.ts | 2 +- .../src/import/lib/split_overwrites.ts | 3 ++- .../src/import/lib/validate_references.ts | 2 +- .../src/import/resolve_import_errors.test.ts | 3 +-- .../src/import/resolve_import_errors.ts | 2 +- .../src/routes/legacy_import_export/import.ts | 2 +- .../lib/collect_references_deep.test.ts | 2 +- .../lib/collect_references_deep.ts | 2 +- .../legacy_import_export/lib/import_dashboards.test.ts | 2 +- .../legacy_import_export/lib/import_dashboards.ts | 2 +- .../src/routes/utils.ts | 2 +- .../core-saved-objects-server-internal/tsconfig.json | 1 - .../core-saved-objects-server/src/export.ts | 3 ++- .../src/extensions/encryption.ts | 2 +- .../src/extensions/security.ts | 2 +- .../core-saved-objects-server/src/import.ts | 2 +- .../src/saved_objects_management.ts | 2 +- .../core-saved-objects-server/src/serialization.ts | 6 ++---- .../service/lib/repository_with_proxy.test.ts | 2 +- .../server/rules_client/tests/bulk_disable.test.ts | 2 +- .../alerting/server/rules_client/tests/test_helpers.ts | 2 +- .../server/saved_objects/migrations/7.11/index.ts | 2 +- .../server/saved_objects/migrations/7.13/index.ts | 2 +- .../server/saved_objects/migrations/7.15/index.ts | 2 +- .../server/saved_objects/migrations/7.16/index.ts | 2 +- x-pack/plugins/alerting/tsconfig.json | 1 - .../cases/server/authorization/authorization.ts | 2 +- x-pack/plugins/cases/server/authorization/utils.ts | 2 +- x-pack/plugins/cases/server/common/types.ts | 2 +- .../saved_objects_encryption_extension.ts | 2 +- x-pack/plugins/encrypted_saved_objects/tsconfig.json | 1 - .../fleet/server/services/agents/action.mock.ts | 2 +- .../server/embeddable/make_lens_embeddable_factory.ts | 2 +- x-pack/plugins/lens/tsconfig.json | 1 + .../observability/server/services/slo/fixtures/slo.ts | 2 +- x-pack/plugins/observability/tsconfig.json | 1 - .../saved_objects/saved_objects_security_extension.ts | 2 +- x-pack/plugins/security/tsconfig.json | 1 - .../monitor_cruds/bulk_cruds/delete_monitor_bulk.ts | 2 +- x-pack/plugins/synthetics/tsconfig.json | 1 + .../apis/synthetics/sync_global_params.ts | 2 +- x-pack/test/tsconfig.json | 1 - 81 files changed, 98 insertions(+), 98 deletions(-) diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/collect_multi_namespace_references.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/collect_multi_namespace_references.ts index 9a97f2f91e4eb..183d2509ad48d 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/collect_multi_namespace_references.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/collect_multi_namespace_references.ts @@ -7,7 +7,7 @@ */ import { isNotFoundFromUnsupportedServer } from '@kbn/core-elasticsearch-server-internal'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsCollectMultiNamespaceReferencesObject, SavedObjectsCollectMultiNamespaceReferencesOptions, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_bulk_resolve.test.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_bulk_resolve.test.ts index 3ef9aa48f30e4..cd888ddb4c2e4 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_bulk_resolve.test.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_bulk_resolve.test.ts @@ -13,7 +13,7 @@ import { } from './internal_bulk_resolve.test.mock'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsBulkResolveObject, SavedObjectsBaseOptions, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_bulk_resolve.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_bulk_resolve.ts index 747a0d5f5e6d6..2d4e75654b1fe 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_bulk_resolve.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_bulk_resolve.ts @@ -9,7 +9,7 @@ import type { MgetResponseItem } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { isNotFoundFromUnsupportedServer } from '@kbn/core-elasticsearch-server-internal'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsBaseOptions, SavedObjectsBulkResolveObject, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_utils.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_utils.ts index 2dfe78a3d5ccd..37b29a6a94e66 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_utils.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/internal_utils.ts @@ -7,7 +7,7 @@ */ import type { Payload } from '@hapi/boom'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { ISavedObjectTypeRegistry, SavedObjectsRawDoc, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.security_extension.test.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.security_extension.test.ts index dad313988e1c6..bd30f9a10eeb1 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.security_extension.test.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.security_extension.test.ts @@ -20,7 +20,7 @@ import { estypes } from '@elastic/elasticsearch'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { SavedObjectsBulkUpdateObject } from '@kbn/core-saved-objects-api-server'; import { SavedObjectsSerializer } from '@kbn/core-saved-objects-base-server-internal'; -import { SavedObject } from '@kbn/core-saved-objects-common'; +import { SavedObject } from '@kbn/core-saved-objects-server'; import { ISavedObjectsSecurityExtension, AuditAction, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.spaces_extension.test.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.spaces_extension.test.ts index 59162f991928a..adfa75a48e986 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.spaces_extension.test.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.spaces_extension.test.ts @@ -27,7 +27,7 @@ import { SavedObjectsBulkUpdateObject, } from '@kbn/core-saved-objects-api-server'; import { SavedObjectsSerializer } from '@kbn/core-saved-objects-base-server-internal'; -import { SavedObject } from '@kbn/core-saved-objects-common'; +import { SavedObject } from '@kbn/core-saved-objects-server'; import { ISavedObjectsSpacesExtension, ISavedObjectsSecurityExtension, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.test.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.test.ts index e8365293991fe..550bf9560a9fd 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.test.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.test.ts @@ -23,7 +23,7 @@ import { import type { Payload } from '@hapi/boom'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import type { SavedObject, SavedObjectReference } from '@kbn/core-saved-objects-common'; +import type { SavedObject, SavedObjectReference } from '@kbn/core-saved-objects-server'; import type { SavedObjectsBaseOptions, SavedObjectsFindOptions, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.ts index cb23c5f89fbcf..1c36ad1edc8b8 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.ts @@ -17,7 +17,7 @@ import { isSupportedEsServer, isNotFoundFromUnsupportedServer, } from '@kbn/core-elasticsearch-server-internal'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsBaseOptions, SavedObjectsIncrementCounterOptions, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/update_objects_spaces.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/update_objects_spaces.ts index 3144460270178..5eab945874309 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/update_objects_spaces.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/update_objects_spaces.ts @@ -34,7 +34,7 @@ import type { IndexMapping, SavedObjectsSerializer, } from '@kbn/core-saved-objects-base-server-internal'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { getBulkOperationError, getExpectedVersionProperties, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/saved_objects_client.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/saved_objects_client.ts index 50f78f09dd684..1771012ebba33 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/saved_objects_client.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/saved_objects_client.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract, ISavedObjectsRepository, diff --git a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/test_helpers/repository.test.common.ts b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/test_helpers/repository.test.common.ts index a6b9ba684b568..bbe40c8dba8c5 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server-internal/src/test_helpers/repository.test.common.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server-internal/src/test_helpers/repository.test.common.ts @@ -20,7 +20,7 @@ import { SavedObjectsType, SavedObjectsTypeMappingDefinition, } from '@kbn/core-saved-objects-server'; -import { SavedObject, SavedObjectReference } from '@kbn/core-saved-objects-common'; +import { SavedObject, SavedObjectReference } from '@kbn/core-saved-objects-server'; import { SavedObjectsBaseOptions, SavedObjectsBulkCreateObject, diff --git a/packages/core/saved-objects/core-saved-objects-api-server/src/apis/create.ts b/packages/core/saved-objects/core-saved-objects-api-server/src/apis/create.ts index 78a017ed03aba..f26e75bd37865 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server/src/apis/create.ts +++ b/packages/core/saved-objects/core-saved-objects-api-server/src/apis/create.ts @@ -6,10 +6,8 @@ * Side Public License, v 1. */ -import type { - SavedObjectsMigrationVersion, - SavedObjectReference, -} from '@kbn/core-saved-objects-common'; +import type { SavedObjectsMigrationVersion } from '@kbn/core-saved-objects-common'; +import type { SavedObjectReference } from '@kbn/core-saved-objects-common'; import type { MutatingOperationRefreshSetting, SavedObjectsBaseOptions } from './base'; /** diff --git a/packages/core/saved-objects/core-saved-objects-api-server/tsconfig.json b/packages/core/saved-objects/core-saved-objects-api-server/tsconfig.json index 0e593db446f6f..c091f255cbd21 100644 --- a/packages/core/saved-objects/core-saved-objects-api-server/tsconfig.json +++ b/packages/core/saved-objects/core-saved-objects-api-server/tsconfig.json @@ -11,7 +11,7 @@ "**/*.ts" ], "kbn_references": [ - "@kbn/core-saved-objects-common" + "@kbn/core-saved-objects-common", ], "exclude": [ "target/**/*", diff --git a/packages/core/saved-objects/core-saved-objects-common/src/saved_objects.ts b/packages/core/saved-objects/core-saved-objects-common/src/saved_objects.ts index 12e554cf185c8..00c12280bccda 100644 --- a/packages/core/saved-objects/core-saved-objects-common/src/saved_objects.ts +++ b/packages/core/saved-objects/core-saved-objects-common/src/saved_objects.ts @@ -51,30 +51,30 @@ export interface SavedObjectError { /** * @public - * @deprecated See https://github.com/elastic/kibana/issues/149098 + * @deprecated See https://github.com/elastic/kibana/issues/149098. Import this type from @kbn/core/server instead. */ export type SavedObjectAttributeSingle = serverTypes.SavedObjectAttributeSingle; /** * @public - * @deprecated See https://github.com/elastic/kibana/issues/149098 + * @deprecated See https://github.com/elastic/kibana/issues/149098. Import this type from @kbn/core/server instead. */ export type SavedObjectAttribute = serverTypes.SavedObjectAttribute; /** * @public - * @deprecated See https://github.com/elastic/kibana/issues/149098 + * @deprecated See https://github.com/elastic/kibana/issues/149098. Import this type from @kbn/core/server instead. */ export type SavedObjectAttributes = serverTypes.SavedObjectAttributes; /** * @public - * @deprecated See https://github.com/elastic/kibana/issues/149098 + * @deprecated See https://github.com/elastic/kibana/issues/149098. Import this type from @kbn/core/server instead. */ export type SavedObjectReference = serverTypes.SavedObjectReference; /** * @public - * @deprecated See https://github.com/elastic/kibana/issues/149098 + * @deprecated See https://github.com/elastic/kibana/issues/149098. Import this type from @kbn/core/server instead. */ export type SavedObject = serverTypes.SavedObject; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/apply_export_transforms.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/apply_export_transforms.test.ts index daa13393d962e..f963342b7e2d7 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/apply_export_transforms.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/apply_export_transforms.test.ts @@ -8,7 +8,7 @@ import { CoreKibanaRequest } from '@kbn/core-http-router-server-internal'; import { httpServerMock } from '@kbn/core-http-server-mocks'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsExportTransform } from '@kbn/core-saved-objects-server'; import { applyExportTransforms } from './apply_export_transforms'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/collect_exported_objects.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/collect_exported_objects.test.ts index 6125c9fb7d739..e440b1baffafc 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/collect_exported_objects.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/collect_exported_objects.test.ts @@ -7,7 +7,8 @@ */ import { httpServerMock } from '@kbn/core-http-server-mocks'; -import type { SavedObject, SavedObjectError } from '@kbn/core-saved-objects-common'; +import type { SavedObjectError } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsExportTransform, SavedObjectsExportablePredicate, diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/collect_exported_objects.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/collect_exported_objects.ts index 6d9adeb8a0d94..dddefe8ad73f7 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/collect_exported_objects.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/collect_exported_objects.ts @@ -8,7 +8,7 @@ import type { Logger } from '@kbn/logging'; import type { KibanaRequest } from '@kbn/core-http-server'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { SavedObjectsExportablePredicate, diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/errors.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/errors.ts index 6ca23c358f931..a90c0fd78e743 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/errors.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/errors.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; /** * @public diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.test.ts index 498ddde9fbbae..2bb65c891d837 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.test.ts @@ -7,7 +7,7 @@ */ import { httpServerMock } from '@kbn/core-http-server-mocks'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { SavedObjectTypeRegistry } from '@kbn/core-saved-objects-base-server-internal'; import { SavedObjectsExporter } from './saved_objects_exporter'; import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.ts index bd122dbf8b392..0f7705396f256 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.ts @@ -9,7 +9,7 @@ import type { Readable } from 'stream'; import { createListStream } from '@kbn/utils'; import type { Logger } from '@kbn/logging'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract, SavedObjectsFindResult, diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.test.ts index 27fbb09a37018..07310a86fe7dc 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.test.ts @@ -8,7 +8,7 @@ import { range } from 'lodash'; import { sortObjects } from './sort_objects'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; describe('sortObjects()', () => { test('should return on empty array', () => { diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.ts index 551ba3989e527..d742a60d6be99 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; const getId = (object: { type: string; id: string }) => `${object.type}:${object.id}`; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/utils.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/utils.test.ts index 6088217bd9201..030edcbca7f3f 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/utils.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/utils.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { byIdAscComparator, getPreservedOrderComparator } from './utils'; const createObj = (id: string): SavedObject => ({ diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/utils.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/utils.ts index dbace21e98ca6..a02fefa8068df 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/utils.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/utils.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; export type SavedObjectComparator = (a: SavedObject, b: SavedObject) => number; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/import_saved_objects.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/import_saved_objects.test.ts index 02af9ca6dca77..a88e0864f532c 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/import_saved_objects.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/import_saved_objects.test.ts @@ -20,10 +20,10 @@ import { import { Readable } from 'stream'; import { v4 as uuidv4 } from 'uuid'; import type { - SavedObject, SavedObjectsImportFailure, SavedObjectsImportWarning, } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { SavedObjectsType, diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_conflicts.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_conflicts.test.ts index 8c58af772b882..13faae72ea25a 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_conflicts.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_conflicts.test.ts @@ -7,11 +7,8 @@ */ import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; -import type { - SavedObject, - SavedObjectReference, - SavedObjectsImportRetry, -} from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportRetry } from '@kbn/core-saved-objects-common'; +import type { SavedObject, SavedObjectReference } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { SavedObjectsErrorHelpers } from '@kbn/core-saved-objects-utils-server'; import { checkConflicts } from './check_conflicts'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_conflicts.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_conflicts.ts index f4f6082ef18ab..c145d8ee97b26 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_conflicts.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_conflicts.ts @@ -8,11 +8,11 @@ import { v4 as uuidv4 } from 'uuid'; import type { - SavedObject, SavedObjectsImportFailure, SavedObjectError, SavedObjectsImportRetry, } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { ImportStateMap } from './types'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_origin_conflicts.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_origin_conflicts.test.ts index 225db282b31ee..42ba91279d75d 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_origin_conflicts.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_origin_conflicts.test.ts @@ -9,13 +9,15 @@ import { mockCreateOriginQuery } from './check_reference_origins.test.mock'; import type { - SavedObjectReference, - SavedObject, SavedObjectsImportFailure, SavedObjectsImportRetry, } from '@kbn/core-saved-objects-common'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; -import type { ISavedObjectTypeRegistry } from '@kbn/core-saved-objects-server'; +import type { + ISavedObjectTypeRegistry, + SavedObject, + SavedObjectReference, +} from '@kbn/core-saved-objects-server'; import { typeRegistryMock } from '@kbn/core-saved-objects-base-server-mocks'; import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; import { checkOriginConflicts } from './check_origin_conflicts'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_origin_conflicts.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_origin_conflicts.ts index 079c5c22191ed..0d4765743cddb 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_origin_conflicts.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/check_origin_conflicts.ts @@ -9,12 +9,11 @@ import pMap from 'p-map'; import { v4 as uuidv4 } from 'uuid'; import type { - SavedObject, SavedObjectsImportFailure, SavedObjectsImportRetry, } from '@kbn/core-saved-objects-common'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; -import type { ISavedObjectTypeRegistry } from '@kbn/core-saved-objects-server'; +import type { ISavedObjectTypeRegistry, SavedObject } from '@kbn/core-saved-objects-server'; import { getObjectKey } from '@kbn/core-saved-objects-base-server-internal'; import type { ImportStateMap } from './types'; import { createOriginQuery } from './utils'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/collect_saved_objects.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/collect_saved_objects.ts index e86ff1f70794d..4120aff3ef215 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/collect_saved_objects.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/collect_saved_objects.ts @@ -14,7 +14,8 @@ import { createPromiseFromStreams, } from '@kbn/utils'; -import type { SavedObject, SavedObjectsImportFailure } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportFailure } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { SavedObjectsImportError } from '../errors'; import { getNonUniqueEntries } from './get_non_unique_entries'; import { createLimitStream } from './create_limit_stream'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_objects_filter.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_objects_filter.ts index 4b830e80fa6cb..872df75d2960b 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_objects_filter.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_objects_filter.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import type { SavedObject, SavedObjectsImportRetry } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportRetry } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; export function createObjectsFilter(retries: SavedObjectsImportRetry[]) { const retryKeys = new Set(retries.map((retry) => `${retry.type}:${retry.id}`)); diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_saved_objects.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_saved_objects.test.ts index 146e6650fa4c4..9e332f1da896e 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_saved_objects.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_saved_objects.test.ts @@ -7,7 +7,8 @@ */ import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; -import type { SavedObject, SavedObjectsImportFailure } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportFailure } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { SavedObjectsErrorHelpers } from '@kbn/core-saved-objects-utils-server'; import { createSavedObjects } from './create_saved_objects'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_saved_objects.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_saved_objects.ts index 31caf8a130cae..6276902e7b3a2 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_saved_objects.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/create_saved_objects.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import type { SavedObject, SavedObjectsImportFailure } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportFailure } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { CreatedObject } from '@kbn/core-saved-objects-server'; import { extractErrors } from './extract_errors'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/execute_import_hooks.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/execute_import_hooks.test.ts index bebe27492d41a..d677205526113 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/execute_import_hooks.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/execute_import_hooks.test.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import type { SavedObject, SavedObjectsImportWarning } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportWarning } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsImportHookResult } from '@kbn/core-saved-objects-server'; import { executeImportHooks } from './execute_import_hooks'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/execute_import_hooks.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/execute_import_hooks.ts index d2e3063b1c49f..c2ae2ead97ee5 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/execute_import_hooks.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/execute_import_hooks.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import type { SavedObject, SavedObjectsImportWarning } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportWarning } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsImportHook } from '@kbn/core-saved-objects-server'; export interface ExecuteImportHooksOptions { diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/extract_errors.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/extract_errors.test.ts index c4d3d0e4c2722..4ce5ac5d82d85 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/extract_errors.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/extract_errors.test.ts @@ -6,8 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; -import type { CreatedObject } from '@kbn/core-saved-objects-server'; +import type { SavedObject, CreatedObject } from '@kbn/core-saved-objects-server'; import { SavedObjectsErrorHelpers } from '@kbn/core-saved-objects-utils-server'; import { extractErrors } from './extract_errors'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/extract_errors.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/extract_errors.ts index 97eca4a5d57be..a5124f269daa6 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/extract_errors.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/extract_errors.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import type { SavedObject, SavedObjectsImportFailure } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportFailure } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { CreatedObject } from '@kbn/core-saved-objects-server'; export function extractErrors( diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/get_import_state_map_for_retries.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/get_import_state_map_for_retries.test.ts index d598326afa136..c0f0e510e1bb0 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/get_import_state_map_for_retries.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/get_import_state_map_for_retries.test.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import type { SavedObject, SavedObjectsImportRetry } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportRetry } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { getImportStateMapForRetries } from './get_import_state_map_for_retries'; describe('#getImportStateMapForRetries', () => { diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/get_import_state_map_for_retries.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/get_import_state_map_for_retries.ts index dd4ed3036fb8c..65d30b040b2b3 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/get_import_state_map_for_retries.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/get_import_state_map_for_retries.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import type { SavedObject, SavedObjectsImportRetry } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportRetry } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { ImportStateMap } from './types'; interface GetImportStateMapForRetriesParams { diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/regenerate_ids.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/regenerate_ids.test.ts index f8a8c502af38a..485c3ccb03380 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/regenerate_ids.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/regenerate_ids.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { regenerateIds } from './regenerate_ids'; jest.mock('uuid', () => ({ diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/split_overwrites.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/split_overwrites.ts index 818b6e512dcc2..77599011836a5 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/split_overwrites.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/split_overwrites.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import type { SavedObject, SavedObjectsImportRetry } from '@kbn/core-saved-objects-common'; +import type { SavedObjectsImportRetry } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; export function splitOverwrites( savedObjects: Array>, diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.ts index 8f271908bf48d..05f6b9aa061b5 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/lib/validate_references.ts @@ -7,10 +7,10 @@ */ import type { - SavedObject, SavedObjectsImportFailure, SavedObjectsImportRetry, } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { SavedObjectsImportError } from '../errors'; import type { ImportStateMap } from './types'; diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/resolve_import_errors.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/resolve_import_errors.test.ts index 0bc8a9190202e..e1cafa319eaf9 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/resolve_import_errors.test.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/resolve_import_errors.test.ts @@ -24,12 +24,11 @@ import { import { Readable } from 'stream'; import { v4 as uuidv4 } from 'uuid'; import type { - SavedObject, SavedObjectsImportFailure, SavedObjectsImportRetry, - SavedObjectReference, SavedObjectsImportWarning, } from '@kbn/core-saved-objects-common'; +import type { SavedObject, SavedObjectReference } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { SavedObjectsType, diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/resolve_import_errors.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/resolve_import_errors.ts index 72533ba7c877b..d6876492d11f3 100644 --- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/resolve_import_errors.ts +++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/import/resolve_import_errors.ts @@ -8,12 +8,12 @@ import { Readable } from 'stream'; import type { - SavedObject, SavedObjectsImportRetry, SavedObjectsImportFailure, SavedObjectsImportResponse, SavedObjectsImportSuccess, } from '@kbn/core-saved-objects-common'; +import { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { ISavedObjectTypeRegistry, diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/import.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/import.ts index 44ee99aa2c970..5de9d4dc82b1a 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/import.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/import.ts @@ -8,7 +8,7 @@ import { schema } from '@kbn/config-schema'; import type { Logger } from '@kbn/logging'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { InternalCoreUsageDataSetup } from '@kbn/core-usage-data-base-server-internal'; import type { InternalSavedObjectRouter } from '../../internal_types'; import { importDashboards } from './lib'; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.test.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.test.ts index 4470983fafc62..d9c5f48b3bab1 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.test.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject, SavedObjectAttributes } from '@kbn/core-saved-objects-common'; +import type { SavedObject, SavedObjectAttributes } from '@kbn/core-saved-objects-server'; import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; import { collectReferencesDeep } from './collect_references_deep'; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.ts index 0c193f618624d..e6b31d044479e 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; const MAX_BULK_GET_SIZE = 10000; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/import_dashboards.test.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/import_dashboards.test.ts index 87452664ac517..e931ec2d3eb2a 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/import_dashboards.test.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/import_dashboards.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; import { importDashboards } from './import_dashboards'; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/import_dashboards.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/import_dashboards.ts index 51a63f23322bf..052576916c12d 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/import_dashboards.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/import_dashboards.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; export async function importDashboards( diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.ts index 47579b949aced..1faaba0f5b710 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/utils.ts @@ -17,8 +17,8 @@ import { } from '@kbn/utils'; import Boom from '@hapi/boom'; import type { RequestHandlerWrapper } from '@kbn/core-http-server'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; import type { + SavedObject, ISavedObjectTypeRegistry, SavedObjectsExportResultDetails, } from '@kbn/core-saved-objects-server'; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/tsconfig.json b/packages/core/saved-objects/core-saved-objects-server-internal/tsconfig.json index f2db7db82446d..6d9f8874ebdb4 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/tsconfig.json +++ b/packages/core/saved-objects/core-saved-objects-server-internal/tsconfig.json @@ -18,7 +18,6 @@ "@kbn/core-http-server", "@kbn/core-http-server-internal", "@kbn/core-elasticsearch-server", - "@kbn/core-saved-objects-common", "@kbn/core-saved-objects-server", "@kbn/core-saved-objects-api-server", "@kbn/core-saved-objects-api-server-internal", diff --git a/packages/core/saved-objects/core-saved-objects-server/src/export.ts b/packages/core/saved-objects/core-saved-objects-server/src/export.ts index 67afd0b011a1d..72133ce4319a2 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/export.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/export.ts @@ -8,8 +8,9 @@ import type { Readable } from 'stream'; import type { KibanaRequest } from '@kbn/core-http-server'; -import type { SavedObject, SavedObjectTypeIdTuple } from '@kbn/core-saved-objects-common'; +import type { SavedObjectTypeIdTuple } from '@kbn/core-saved-objects-common'; import type { SavedObjectsFindOptionsReference } from '@kbn/core-saved-objects-api-server'; +import type { SavedObject } from '..'; /** * Utility class used to export savedObjects. diff --git a/packages/core/saved-objects/core-saved-objects-server/src/extensions/encryption.ts b/packages/core/saved-objects/core-saved-objects-server/src/extensions/encryption.ts index 6dcdac347faca..64bfa8d6c736a 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/extensions/encryption.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/extensions/encryption.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '../..'; /** * The EncryptedObjectDescriptor interface contains settings for describing diff --git a/packages/core/saved-objects/core-saved-objects-server/src/extensions/security.ts b/packages/core/saved-objects/core-saved-objects-server/src/extensions/security.ts index 4364bbbf2ad8f..7ad9c37062a3d 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/extensions/security.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/extensions/security.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; import type { EcsEventOutcome } from '@kbn/ecs'; +import type { SavedObject } from '../..'; /** * The PerformAuthorizationParams interface contains settings for checking diff --git a/packages/core/saved-objects/core-saved-objects-server/src/import.ts b/packages/core/saved-objects/core-saved-objects-server/src/import.ts index e0f6a4c05e14a..b42ebeb68b03a 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/import.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/import.ts @@ -8,11 +8,11 @@ import { Readable } from 'stream'; import { - SavedObject, SavedObjectsImportRetry, SavedObjectsImportWarning, SavedObjectsImportResponse, } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '..'; /** * Utility class used to import savedObjects. diff --git a/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_management.ts b/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_management.ts index 7a67d70cbf4d4..b68fa59d95302 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_management.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_management.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; import type { SavedObjectsExportTransform } from './export'; import type { SavedObjectsImportHook } from './import'; +import type { SavedObject } from '..'; /** * Configuration options for the {@link SavedObjectsType | type}'s management section. diff --git a/packages/core/saved-objects/core-saved-objects-server/src/serialization.ts b/packages/core/saved-objects/core-saved-objects-server/src/serialization.ts index 7752d0dd99e90..6b8159f9fce18 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/serialization.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/serialization.ts @@ -6,10 +6,8 @@ * Side Public License, v 1. */ -import type { - SavedObjectsMigrationVersion, - SavedObjectReference, -} from '@kbn/core-saved-objects-common'; +import type { SavedObjectsMigrationVersion } from '@kbn/core-saved-objects-common'; +import type { SavedObjectReference } from '..'; /** * A serializer that can be used to manually convert {@link SavedObjectsRawDoc | raw} or diff --git a/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts b/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts index 8cb2a5452726b..e38231a6e0ea4 100644 --- a/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts +++ b/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts @@ -9,7 +9,7 @@ import Hapi from '@hapi/hapi'; import h2o2 from '@hapi/h2o2'; import { URL } from 'url'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { ISavedObjectsRepository } from '@kbn/core-saved-objects-api-server'; import type { InternalCoreSetup, InternalCoreStart } from '@kbn/core-lifecycle-server-internal'; import { Root } from '@kbn/core-root-server-internal'; diff --git a/x-pack/plugins/alerting/server/rules_client/tests/bulk_disable.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/bulk_disable.test.ts index ddb1a5da58e5b..7d35c1e12c57e 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/bulk_disable.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/bulk_disable.test.ts @@ -8,7 +8,7 @@ import { RulesClient, ConstructorOptions } from '../rules_client'; import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { ruleTypeRegistryMock } from '../../rule_type_registry.mock'; import { alertingAuthorizationMock } from '../../authorization/alerting_authorization.mock'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; diff --git a/x-pack/plugins/alerting/server/rules_client/tests/test_helpers.ts b/x-pack/plugins/alerting/server/rules_client/tests/test_helpers.ts index 0100242672be9..08c037e9410e7 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/test_helpers.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/test_helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; export const savedObjectWith500Error = { id: 'id2', diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts index 186b20679c00d..0a4dc41390f2b 100644 --- a/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectAttributes } from '@kbn/core-saved-objects-common'; +import { SavedObjectAttributes } from '@kbn/core-saved-objects-server'; import { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; import { RawRule, RawRuleAction } from '../../../types'; diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.13/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.13/index.ts index 67b595531dfdb..75848e1a304c4 100644 --- a/x-pack/plugins/alerting/server/saved_objects/migrations/7.13/index.ts +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.13/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectAttribute } from '@kbn/core-saved-objects-common'; +import { SavedObjectAttribute } from '@kbn/core-saved-objects-server'; import { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; import { RawRule } from '../../../types'; diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts index a7b90ab347a71..e972f7e754f0f 100644 --- a/x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.15/index.ts @@ -9,7 +9,7 @@ import { SavedObjectAttribute, SavedObjectAttributes, SavedObjectReference, -} from '@kbn/core-saved-objects-common'; +} from '@kbn/core-saved-objects-server'; import { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; import { isString } from 'lodash/fp'; diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.16/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.16/index.ts index 35aded8311803..bf2870eb613bb 100644 --- a/x-pack/plugins/alerting/server/saved_objects/migrations/7.16/index.ts +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.16/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectAttribute, SavedObjectReference } from '@kbn/core-saved-objects-common'; +import { SavedObjectAttribute, SavedObjectReference } from '@kbn/core-saved-objects-server'; import { SavedObjectUnsanitizedDoc } from '@kbn/core-saved-objects-server'; import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; import { isString } from 'lodash/fp'; diff --git a/x-pack/plugins/alerting/tsconfig.json b/x-pack/plugins/alerting/tsconfig.json index 73c407bd325a8..1f7017de59a2e 100644 --- a/x-pack/plugins/alerting/tsconfig.json +++ b/x-pack/plugins/alerting/tsconfig.json @@ -34,7 +34,6 @@ "@kbn/rule-data-utils", "@kbn/logging-mocks", "@kbn/core-logging-server-mocks", - "@kbn/core-saved-objects-common", "@kbn/securitysolution-rules", "@kbn/apm-utils", "@kbn/data-views-plugin", diff --git a/x-pack/plugins/cases/server/authorization/authorization.ts b/x-pack/plugins/cases/server/authorization/authorization.ts index 07c4b70e45bb6..884ae817a7a95 100644 --- a/x-pack/plugins/cases/server/authorization/authorization.ts +++ b/x-pack/plugins/cases/server/authorization/authorization.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { KibanaRequest, Logger } from '@kbn/core/server'; import Boom from '@hapi/boom'; import type { SecurityPluginStart } from '@kbn/security-plugin/server'; diff --git a/x-pack/plugins/cases/server/authorization/utils.ts b/x-pack/plugins/cases/server/authorization/utils.ts index 1b1a7b218c0e8..3ca28e3f2d7e3 100644 --- a/x-pack/plugins/cases/server/authorization/utils.ts +++ b/x-pack/plugins/cases/server/authorization/utils.ts @@ -8,7 +8,7 @@ import { partition, remove, uniq } from 'lodash'; import type { KueryNode } from '@kbn/es-query'; import { nodeBuilder } from '@kbn/es-query'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { OWNER_FIELD } from '../../common/api'; export const getOwnersFilter = ( diff --git a/x-pack/plugins/cases/server/common/types.ts b/x-pack/plugins/cases/server/common/types.ts index 8ae038992b28f..6a9eaed578a8f 100644 --- a/x-pack/plugins/cases/server/common/types.ts +++ b/x-pack/plugins/cases/server/common/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { KueryNode } from '@kbn/es-query'; import type { CaseAttributes, SavedObjectFindOptions } from '../../common/api'; diff --git a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/saved_objects_encryption_extension.ts b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/saved_objects_encryption_extension.ts index 32015c8c23036..10c870275e590 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/saved_objects/saved_objects_encryption_extension.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/saved_objects/saved_objects_encryption_extension.ts @@ -5,11 +5,11 @@ * 2.0. */ -import type { SavedObject } from '@kbn/core-saved-objects-common'; import type { EncryptedObjectDescriptor, ISavedObjectsEncryptionExtension, ISavedObjectTypeRegistry, + SavedObject, } from '@kbn/core-saved-objects-server'; import type { AuthenticatedUser } from '@kbn/security-plugin/common'; diff --git a/x-pack/plugins/encrypted_saved_objects/tsconfig.json b/x-pack/plugins/encrypted_saved_objects/tsconfig.json index 4359bebb24833..7d60b8171f1d9 100644 --- a/x-pack/plugins/encrypted_saved_objects/tsconfig.json +++ b/x-pack/plugins/encrypted_saved_objects/tsconfig.json @@ -10,7 +10,6 @@ "@kbn/core", "@kbn/utility-types", "@kbn/core-saved-objects-server", - "@kbn/core-saved-objects-common", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/fleet/server/services/agents/action.mock.ts b/x-pack/plugins/fleet/server/services/agents/action.mock.ts index 7f381ba009066..3534327e196db 100644 --- a/x-pack/plugins/fleet/server/services/agents/action.mock.ts +++ b/x-pack/plugins/fleet/server/services/agents/action.mock.ts @@ -7,7 +7,7 @@ import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { AgentPolicy } from '../../types'; diff --git a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts index aa4f634b700af..b1abbca792cea 100644 --- a/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts +++ b/x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts @@ -7,7 +7,7 @@ import { EmbeddableRegistryDefinition } from '@kbn/embeddable-plugin/server'; import type { SerializableRecord } from '@kbn/utility-types'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import { mergeMigrationFunctionMaps, MigrateFunctionsObject, diff --git a/x-pack/plugins/lens/tsconfig.json b/x-pack/plugins/lens/tsconfig.json index d09cd3fd47eb4..86430fa103252 100644 --- a/x-pack/plugins/lens/tsconfig.json +++ b/x-pack/plugins/lens/tsconfig.json @@ -62,6 +62,7 @@ "@kbn/language-documentation-popover", "@kbn/core-saved-objects-common", "@kbn/core-ui-settings-browser", + "@kbn/core-saved-objects-server", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/observability/server/services/slo/fixtures/slo.ts b/x-pack/plugins/observability/server/services/slo/fixtures/slo.ts index 9d68ad174f127..3a097cc0a8381 100644 --- a/x-pack/plugins/observability/server/services/slo/fixtures/slo.ts +++ b/x-pack/plugins/observability/server/services/slo/fixtures/slo.ts @@ -7,7 +7,7 @@ import { cloneDeep } from 'lodash'; import { v1 as uuidv1 } from 'uuid'; -import { SavedObject } from '@kbn/core-saved-objects-common'; +import { SavedObject } from '@kbn/core-saved-objects-server'; import { sloSchema, CreateSLOParams } from '@kbn/slo-schema'; import { SO_SLO_TYPE } from '../../../saved_objects'; diff --git a/x-pack/plugins/observability/tsconfig.json b/x-pack/plugins/observability/tsconfig.json index 0460c75bf1011..04217f4087e17 100644 --- a/x-pack/plugins/observability/tsconfig.json +++ b/x-pack/plugins/observability/tsconfig.json @@ -63,7 +63,6 @@ "@kbn/logging", "@kbn/core-saved-objects-api-server", "@kbn/core-saved-objects-utils-server", - "@kbn/core-saved-objects-common", "@kbn/share-plugin", "@kbn/core-notifications-browser", "@kbn/slo-schema", diff --git a/x-pack/plugins/security/server/saved_objects/saved_objects_security_extension.ts b/x-pack/plugins/security/server/saved_objects/saved_objects_security_extension.ts index 6a85951231a59..e464fbe8e4478 100644 --- a/x-pack/plugins/security/server/saved_objects/saved_objects_security_extension.ts +++ b/x-pack/plugins/security/server/saved_objects/saved_objects_security_extension.ts @@ -6,7 +6,6 @@ */ import type { SavedObjectsClient } from '@kbn/core-saved-objects-api-server-internal'; -import type { SavedObject } from '@kbn/core-saved-objects-common'; import type { AddAuditEventParams, AuthorizationTypeEntry, @@ -17,6 +16,7 @@ import type { ISavedObjectsSecurityExtension, PerformAuthorizationParams, RedactNamespacesParams, + SavedObject, } from '@kbn/core-saved-objects-server'; import { ALL_SPACES_ID, UNKNOWN_SPACE } from '../../common/constants'; diff --git a/x-pack/plugins/security/tsconfig.json b/x-pack/plugins/security/tsconfig.json index 46043f33e56ec..ac00fedba9ebe 100644 --- a/x-pack/plugins/security/tsconfig.json +++ b/x-pack/plugins/security/tsconfig.json @@ -45,7 +45,6 @@ "@kbn/es-errors", "@kbn/logging", "@kbn/core-saved-objects-api-server-internal", - "@kbn/core-saved-objects-common", "@kbn/core-saved-objects-api-server-mocks", "@kbn/logging-mocks", "@kbn/web-worker-stub", diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/bulk_cruds/delete_monitor_bulk.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/bulk_cruds/delete_monitor_bulk.ts index 305963e1ce430..d720306f357c6 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/bulk_cruds/delete_monitor_bulk.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/bulk_cruds/delete_monitor_bulk.ts @@ -5,7 +5,7 @@ * 2.0. */ import { SavedObjectsClientContract, KibanaRequest } from '@kbn/core/server'; -import { SavedObject } from '@kbn/core-saved-objects-common'; +import { SavedObject } from '@kbn/core-saved-objects-server'; import { formatTelemetryDeleteEvent, sendTelemetryEvents, diff --git a/x-pack/plugins/synthetics/tsconfig.json b/x-pack/plugins/synthetics/tsconfig.json index 685a74cc6e871..e752376f4e908 100644 --- a/x-pack/plugins/synthetics/tsconfig.json +++ b/x-pack/plugins/synthetics/tsconfig.json @@ -70,6 +70,7 @@ "@kbn/actions-plugin", "@kbn/core-elasticsearch-server", "@kbn/core-saved-objects-api-server-mocks", + "@kbn/core-saved-objects-server", ], "exclude": [ "target/**/*", diff --git a/x-pack/test/api_integration/apis/synthetics/sync_global_params.ts b/x-pack/test/api_integration/apis/synthetics/sync_global_params.ts index 1ea7933ce57de..73fcffe5a67e0 100644 --- a/x-pack/test/api_integration/apis/synthetics/sync_global_params.ts +++ b/x-pack/test/api_integration/apis/synthetics/sync_global_params.ts @@ -15,7 +15,7 @@ import { secretKeys } from '@kbn/synthetics-plugin/common/constants/monitor_mana import { PackagePolicy } from '@kbn/fleet-plugin/common'; import expect from '@kbn/expect'; import { syntheticsParamType } from '@kbn/synthetics-plugin/common/types/saved_objects'; -import { SavedObject } from '@kbn/core-saved-objects-common'; +import { SavedObject } from '@kbn/core-saved-objects-server'; import { FtrProviderContext } from '../../ftr_provider_context'; import { getFixtureJson } from '../uptime/rest/helper/get_fixture_json'; import { PrivateLocationTestService } from './services/private_location_test_service'; diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index b3be2d080e7fe..0deb6cd41c437 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -105,7 +105,6 @@ "@kbn/controls-plugin", "@kbn/core-saved-objects-server", "@kbn/core-provider-plugin", - "@kbn/core-saved-objects-common", "@kbn/user-profile-components", "@kbn/apm-synthtrace-client", "@kbn/utils",