Skip to content

Commit 3cccf63

Browse files
committed
fixed some missing types and unused imports
1 parent 31ded81 commit 3cccf63

File tree

6 files changed

+10
-22
lines changed

6 files changed

+10
-22
lines changed

x-pack/plugins/alerting/server/plugin.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
import { first, map } from 'rxjs/operators';
88
import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
99
import { SecurityPluginSetup } from '../../security/server';
10-
import {
11-
EncryptedSavedObjectsPluginSetup,
12-
EncryptedSavedObjectsPluginStart,
13-
} from '../../encrypted_saved_objects/server';
10+
import { EncryptedSavedObjectsPluginSetup } from '../../encrypted_saved_objects/server';
1411
import { TaskManagerSetupContract, TaskManagerStartContract } from '../../task_manager/server';
1512
import { SpacesPluginSetup, SpacesServiceSetup } from '../../spaces/server';
1613
import { AlertsClient } from './alerts_client';
@@ -203,7 +200,7 @@ export class AlertingPlugin {
203200
security,
204201
} = this;
205202

206-
const encryptedSavedObjectsPlugin = this.encryptedSavedObjects.startWithHiddenTypes(['alert']);
203+
const encryptedSavedObjectsPlugin = this.encryptedSavedObjects!.startWithHiddenTypes(['alert']);
207204

208205
alertsClientFactory.initialize({
209206
alertTypeRegistry: alertTypeRegistry!,

x-pack/plugins/encrypted_saved_objects/server/mocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function createEncryptedSavedObjectsSetupMock() {
1111
registerType: jest.fn(),
1212
__legacyCompat: { registerLegacyAPI: jest.fn() },
1313
usingEphemeralEncryptionKey: true,
14+
startWithHiddenTypes: jest.fn(),
1415
} as jest.Mocked<EncryptedSavedObjectsPluginSetup>;
1516
}
1617

x-pack/plugins/encrypted_saved_objects/server/plugin.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import {
8-
Logger,
9-
SavedObjectsBaseOptions,
10-
PluginInitializerContext,
11-
CoreSetup,
12-
} from 'src/core/server';
7+
import { Logger, PluginInitializerContext, CoreSetup } from 'src/core/server';
138
import { first } from 'rxjs/operators';
149
import { createConfig$ } from './config';
1510
import {
@@ -46,7 +41,7 @@ export interface LegacyAPI {
4641
*/
4742
export class Plugin {
4843
private readonly logger: Logger;
49-
private savedObjectsSetup!: SavedObjectsSetup;
44+
private savedObjectsSetup!: (includedHiddenTypes?: string[]) => SavedObjectsSetup;
5045

5146
private legacyAPI?: LegacyAPI;
5247
private readonly getLegacyAPI = () => {

x-pack/test/alerting_api_integration/common/fixtures/plugins/aad/server/plugin.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ interface FixtureSetupDeps {
2121
encryptedSavedObjects: EncryptedSavedObjectsPluginSetup;
2222
}
2323

24-
export class FixturePlugin implements Plugin<void, void, FixtureSetupDeps, FixtureStartDeps> {
25-
public setup(
26-
core: CoreSetup<FixtureStartDeps>,
27-
{ spaces, encryptedSavedObjects }: FixtureSetupDeps
28-
) {
24+
export class FixturePlugin implements Plugin<void, void, FixtureSetupDeps> {
25+
public setup(core: CoreSetup, { spaces, encryptedSavedObjects }: FixtureSetupDeps) {
2926
core.http.createRouter().post(
3027
{
3128
path: '/api/check_aad',

x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/alert_types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import { CoreSetup } from 'kibana/server';
88
import { schema } from '@kbn/config-schema';
99
import { times } from 'lodash';
1010
import { FixtureStartDeps, FixtureSetupDeps } from './plugin';
11+
import { ActionType, ActionTypeExecutorOptions } from '../../../../../../../plugins/actions/server';
12+
import { AlertType, AlertExecutorOptions } from '../../../../../../../plugins/alerting/server';
1113

1214
export function defineAlertTypes(
1315
core: CoreSetup<FixtureStartDeps>,
14-
{ actions, alerting }: FixtureSetupDeps
16+
{ actions, alerting }: Pick<FixtureSetupDeps, 'actions' | 'alerting'>
1517
) {
1618
const clusterClient = core.elasticsearch.adminClient;
1719

x-pack/test/alerting_api_integration/common/fixtures/plugins/alerts/server/plugin.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@
55
*/
66

77
import { Plugin, CoreSetup } from 'kibana/server';
8-
import { schema } from '@kbn/config-schema';
9-
import { times } from 'lodash';
108
import { PluginSetupContract as ActionsPluginSetup } from '../../../../../../../plugins/actions/server/plugin';
119
import { PluginSetupContract as AlertingPluginSetup } from '../../../../../../../plugins/alerting/server/plugin';
1210
import { EncryptedSavedObjectsPluginStart } from '../../../../../../../plugins/encrypted_saved_objects/server';
1311
import { PluginSetupContract as FeaturesPluginSetup } from '../../../../../../../plugins/features/server';
14-
import { ActionType, ActionTypeExecutorOptions } from '../../../../../../../plugins/actions/server';
15-
import { AlertType, AlertExecutorOptions } from '../../../../../../../plugins/alerting/server';
1612
import { defineAlertTypes } from './alert_types';
1713
import { defineRoutes } from './routes';
1814

0 commit comments

Comments
 (0)