[Saved Objects] Remove deprecation notices from server SO types (#150839)

## Summary

After merging https://github.com/elastic/kibana/pull/148979 there are a
few interfaces in the server-side code that export a reference to a
deprecated SO type.

In this PR we fix them by updating a few imports to use the
non-deprecated SO type. Additionally, we resolve a potential circular
reference issue between `core-saved-objects-server` and
`core-saved-objects-api-server` by "moving" saved objects and related
types exports to `core-saved-objects-api-server`
This commit is contained in:
Jean-Louis Leysens 2023-02-15 17:13:27 +01:00 committed by GitHub
parent 15d558c36b
commit 5b0b09b59b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 18 additions and 11 deletions

View file

@ -60,3 +60,11 @@ export type {
SavedObjectsBulkDeleteStatus,
SavedObjectsBulkDeleteResponse,
} from './src/apis';
export type {
SavedObject,
SavedObjectAttribute,
SavedObjectAttributes,
SavedObjectAttributeSingle,
SavedObjectReference,
} from '@kbn/core-saved-objects-common/src/server_types';

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import type { SavedObject } from '@kbn/core-saved-objects-common';
import type { SavedObject } from '../..';
/**
* Base options used by most of the savedObject APIs.

View file

@ -6,10 +6,8 @@
* Side Public License, v 1.
*/
import type {
SavedObjectReference,
SavedObjectsMigrationVersion,
} from '@kbn/core-saved-objects-common';
import type { SavedObjectsMigrationVersion } from '@kbn/core-saved-objects-common';
import type { SavedObjectReference } from '../..';
/**
* Object parameters for the bulk create operation

View file

@ -7,7 +7,7 @@
*/
import type { SavedObjectsMigrationVersion } from '@kbn/core-saved-objects-common';
import type { SavedObjectReference } from '@kbn/core-saved-objects-common';
import type { SavedObjectReference } from '../..';
import type { MutatingOperationRefreshSetting, SavedObjectsBaseOptions } from './base';
/**

View file

@ -11,7 +11,7 @@ import type {
AggregationsAggregationContainer,
SortResults,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import type { SavedObject } from '@kbn/core-saved-objects-common';
import type { SavedObject } from '../..';
type KueryNode = any;

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import type { SavedObject } from '@kbn/core-saved-objects-common';
import type { SavedObject } from '../..';
/**
*

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import type { SavedObjectReference, SavedObject } from '@kbn/core-saved-objects-common';
import type { SavedObject, SavedObjectReference } from '../..';
import type { MutatingOperationRefreshSetting, SavedObjectsBaseOptions } from './base';
/**

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
import type { SavedObject } from '@kbn/core-saved-objects-common';
import type { SavedObject } from '..';
import type {
SavedObjectsBaseOptions,
SavedObjectsFindOptions,