Skip to content

Commit

Permalink
Don't expose SavedObjectsManagement from core and fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolf committed Jun 14, 2019
1 parent 068716a commit 514e79b
Show file tree
Hide file tree
Showing 15 changed files with 6 additions and 216 deletions.
1 change: 0 additions & 1 deletion docs/development/core/server/kibana-plugin-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [ClusterClient](./kibana-plugin-server.clusterclient.md) | Represents an Elasticsearch cluster API client and allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via <code>asScoped(...)</code>). |
| [KibanaRequest](./kibana-plugin-server.kibanarequest.md) | Kibana specific abstraction for an incoming request. |
| [Router](./kibana-plugin-server.router.md) | |
| [SavedObjectsManagement](./kibana-plugin-server.savedobjectsmanagement.md) | |
| [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md) | Serves the same purpose as "normal" <code>ClusterClient</code> but exposes additional <code>callAsCurrentUser</code> method that doesn't use credentials of the Kibana internal user (as <code>callAsInternalUser</code> does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API |

## Interfaces
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## SavedObjectsService interface


<b>Signature:</b>

```typescript
Expand Down
1 change: 0 additions & 1 deletion src/core/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export {
SavedObjectsCreateOptions,
SavedObjectsFindOptions,
SavedObjectsFindResponse,
SavedObjectsManagement,
SavedObjectsMigrationVersion,
SavedObjectsService,
SavedObjectsUpdateOptions,
Expand Down
3 changes: 3 additions & 0 deletions src/core/server/saved_objects/service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import { ScopedSavedObjectsClientProvider } from './lib';
import { SavedObjectsClient } from './saved_objects_client';

/**
* @public
*/
export interface SavedObjectsService<Request = any> {
// ATTENTION: these types are incomplete
addScopedSavedObjectsClientWrapperFactory: ScopedSavedObjectsClientProvider<
Expand Down
25 changes: 0 additions & 25 deletions src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,37 +576,12 @@ export interface SavedObjectsFindResponse<T extends SavedObjectAttributes = any>
total: number;
}

// Warning: (ae-missing-release-tag) "SavedObjectsManagement" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class SavedObjectsManagement {
// Warning: (ae-forgotten-export) The symbol "SavedObjectsManagementDefinition" needs to be exported by the entry point index.d.ts
constructor(managementDefinition?: SavedObjectsManagementDefinition);
// (undocumented)
getDefaultSearchField(type: string): string | undefined;
// (undocumented)
getEditUrl(savedObject: SavedObject): string | undefined;
// (undocumented)
getIcon(type: string): string | undefined;
// (undocumented)
getInAppUrl(savedObject: SavedObject): {
path: string;
uiCapabilitiesPath: string;
} | undefined;
// (undocumented)
getTitle(savedObject: SavedObject): string | undefined;
// (undocumented)
isImportAndExportable(type: string): boolean;
}

// @public
export interface SavedObjectsMigrationVersion {
// (undocumented)
[pluginName: string]: string;
}

// Warning: (ae-missing-release-tag) "SavedObjectsService" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface SavedObjectsService<Request = any> {
// Warning: (ae-forgotten-export) The symbol "ScopedSavedObjectsClientProvider" needs to be exported by the entry point index.d.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import sinon from 'sinon';
import { shortUrlLookupProvider } from './short_url_lookup';
import { SavedObjectsClient } from '../../../saved_objects';
import { SavedObjectsClient } from '../../../../../core/server';

describe('shortUrlLookupProvider', () => {
const ID = 'bf00ad16941fc51420f91a93428b27a0';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import sinon from 'sinon';
import expect from '@kbn/expect';
import { SavedObjectsClient } from '../../../../server/saved_objects';
import { SavedObjectsClient } from '../../../../../core/server';

export const savedObjectsClientErrors = SavedObjectsClient.errors;

Expand Down

0 comments on commit 514e79b

Please sign in to comment.