diff --git a/docs/development/core/public/kibana-plugin-core-public.coresetup.getstartservices.md b/docs/development/core/public/kibana-plugin-core-public.coresetup.getstartservices.md index e4fec4eae31b1..8664ad0e2a0e5 100644 --- a/docs/development/core/public/kibana-plugin-core-public.coresetup.getstartservices.md +++ b/docs/development/core/public/kibana-plugin-core-public.coresetup.getstartservices.md @@ -9,5 +9,5 @@ Signature: ```typescript -getStartServices: StartServicesAccessor; +getStartServices: StartServicesAccessor; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.coresetup.md b/docs/development/core/public/kibana-plugin-core-public.coresetup.md index c039bc19348cc..870fa33dce900 100644 --- a/docs/development/core/public/kibana-plugin-core-public.coresetup.md +++ b/docs/development/core/public/kibana-plugin-core-public.coresetup.md @@ -9,7 +9,7 @@ Core services exposed to the `Plugin` setup lifecycle Signature: ```typescript -export interface CoreSetup +export interface CoreSetup ``` ## Properties @@ -19,7 +19,7 @@ export interface CoreSetup | [application](./kibana-plugin-core-public.coresetup.application.md) | ApplicationSetup | [ApplicationSetup](./kibana-plugin-core-public.applicationsetup.md) | | [context](./kibana-plugin-core-public.coresetup.context.md) | ContextSetup | [ContextSetup](./kibana-plugin-core-public.contextsetup.md) | | [fatalErrors](./kibana-plugin-core-public.coresetup.fatalerrors.md) | FatalErrorsSetup | [FatalErrorsSetup](./kibana-plugin-core-public.fatalerrorssetup.md) | -| [getStartServices](./kibana-plugin-core-public.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart> | [StartServicesAccessor](./kibana-plugin-core-public.startservicesaccessor.md) | +| [getStartServices](./kibana-plugin-core-public.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart> | [StartServicesAccessor](./kibana-plugin-core-public.startservicesaccessor.md) | | [http](./kibana-plugin-core-public.coresetup.http.md) | HttpSetup | [HttpSetup](./kibana-plugin-core-public.httpsetup.md) | | [injectedMetadata](./kibana-plugin-core-public.coresetup.injectedmetadata.md) | {
getInjectedVar: (name: string, defaultValue?: any) => unknown;
} | exposed temporarily until https://github.com/elastic/kibana/issues/41990 done use \*only\* to retrieve config values. There is no way to set injected values in the new platform. Use the legacy platform API instead. | | [notifications](./kibana-plugin-core-public.coresetup.notifications.md) | NotificationsSetup | [NotificationsSetup](./kibana-plugin-core-public.notificationssetup.md) | diff --git a/docs/development/core/public/kibana-plugin-core-public.legacycoresetup.md b/docs/development/core/public/kibana-plugin-core-public.legacycoresetup.md index 25387ff5ec8c0..26220accbfaf3 100644 --- a/docs/development/core/public/kibana-plugin-core-public.legacycoresetup.md +++ b/docs/development/core/public/kibana-plugin-core-public.legacycoresetup.md @@ -13,7 +13,7 @@ Setup interface exposed to the legacy platform via the `ui/new_platform` module. Signature: ```typescript -export interface LegacyCoreSetup extends CoreSetup +export interface LegacyCoreSetup extends CoreSetup ``` ## Remarks diff --git a/docs/development/core/public/kibana-plugin-core-public.plugin.setup.md b/docs/development/core/public/kibana-plugin-core-public.plugin.setup.md index 7ed0e056b390f..7fa05588a3301 100644 --- a/docs/development/core/public/kibana-plugin-core-public.plugin.setup.md +++ b/docs/development/core/public/kibana-plugin-core-public.plugin.setup.md @@ -7,14 +7,14 @@ Signature: ```typescript -setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise; +setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| core | CoreSetup<TPluginsStart> | | +| core | CoreSetup<TPluginsStart, TStart> | | | plugins | TPluginsSetup | | Returns: diff --git a/docs/development/core/public/kibana-plugin-core-public.startservicesaccessor.md b/docs/development/core/public/kibana-plugin-core-public.startservicesaccessor.md index 02e896a6b47e5..ad53307d53d69 100644 --- a/docs/development/core/public/kibana-plugin-core-public.startservicesaccessor.md +++ b/docs/development/core/public/kibana-plugin-core-public.startservicesaccessor.md @@ -9,5 +9,5 @@ Allows plugins to get access to APIs available in start inside async handlers, s Signature: ```typescript -export declare type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart]>; +export declare type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart, TStart]>; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.coresetup.getstartservices.md b/docs/development/core/server/kibana-plugin-core-server.coresetup.getstartservices.md index ea8e610ee56de..1f326449156f0 100644 --- a/docs/development/core/server/kibana-plugin-core-server.coresetup.getstartservices.md +++ b/docs/development/core/server/kibana-plugin-core-server.coresetup.getstartservices.md @@ -9,5 +9,5 @@ Signature: ```typescript -getStartServices: StartServicesAccessor; +getStartServices: StartServicesAccessor; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.coresetup.md b/docs/development/core/server/kibana-plugin-core-server.coresetup.md index b0eba8ac78063..29fdc37a81176 100644 --- a/docs/development/core/server/kibana-plugin-core-server.coresetup.md +++ b/docs/development/core/server/kibana-plugin-core-server.coresetup.md @@ -9,7 +9,7 @@ Context passed to the plugins `setup` method. Signature: ```typescript -export interface CoreSetup +export interface CoreSetup ``` ## Properties @@ -19,7 +19,7 @@ export interface CoreSetup | [capabilities](./kibana-plugin-core-server.coresetup.capabilities.md) | CapabilitiesSetup | [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | | [context](./kibana-plugin-core-server.coresetup.context.md) | ContextSetup | [ContextSetup](./kibana-plugin-core-server.contextsetup.md) | | [elasticsearch](./kibana-plugin-core-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | [ElasticsearchServiceSetup](./kibana-plugin-core-server.elasticsearchservicesetup.md) | -| [getStartServices](./kibana-plugin-core-server.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart> | [StartServicesAccessor](./kibana-plugin-core-server.startservicesaccessor.md) | +| [getStartServices](./kibana-plugin-core-server.coresetup.getstartservices.md) | StartServicesAccessor<TPluginsStart, TStart> | [StartServicesAccessor](./kibana-plugin-core-server.startservicesaccessor.md) | | [http](./kibana-plugin-core-server.coresetup.http.md) | HttpServiceSetup | [HttpServiceSetup](./kibana-plugin-core-server.httpservicesetup.md) | | [metrics](./kibana-plugin-core-server.coresetup.metrics.md) | MetricsServiceSetup | [MetricsServiceSetup](./kibana-plugin-core-server.metricsservicesetup.md) | | [savedObjects](./kibana-plugin-core-server.coresetup.savedobjects.md) | SavedObjectsServiceSetup | [SavedObjectsServiceSetup](./kibana-plugin-core-server.savedobjectsservicesetup.md) | diff --git a/docs/development/core/server/kibana-plugin-core-server.startservicesaccessor.md b/docs/development/core/server/kibana-plugin-core-server.startservicesaccessor.md index 4de781fc99cc1..7f90060d3ffa8 100644 --- a/docs/development/core/server/kibana-plugin-core-server.startservicesaccessor.md +++ b/docs/development/core/server/kibana-plugin-core-server.startservicesaccessor.md @@ -9,5 +9,5 @@ Allows plugins to get access to APIs available in start inside async handlers. P Signature: ```typescript -export declare type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart]>; +export declare type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart, TStart]>; ``` diff --git a/examples/alerting_example/public/plugin.tsx b/examples/alerting_example/public/plugin.tsx index 299806d393446..e3748e3235f47 100644 --- a/examples/alerting_example/public/plugin.tsx +++ b/examples/alerting_example/public/plugin.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { Plugin, CoreSetup, AppMountParameters, CoreStart } from 'kibana/public'; +import { Plugin, CoreSetup, AppMountParameters } from 'kibana/public'; import { PluginSetupContract as AlertingSetup } from '../../../x-pack/plugins/alerting/public'; import { ChartsPluginStart } from '../../../src/plugins/charts/public'; import { TriggersAndActionsUIPublicPluginSetup } from '../../../x-pack/plugins/triggers_actions_ui/public'; @@ -43,17 +43,14 @@ export interface AlertingExamplePublicStartDeps { export class AlertingExamplePlugin implements Plugin { public setup( - core: CoreSetup, + core: CoreSetup, { alerting, triggers_actions_ui }: AlertingExamplePublicSetupDeps ) { core.application.register({ id: 'AlertingExample', title: 'Alerting Example', async mount(params: AppMountParameters) { - const [coreStart, depsStart]: [ - CoreStart, - AlertingExamplePublicStartDeps - ] = await core.getStartServices(); + const [coreStart, depsStart] = await core.getStartServices(); const { renderApp } = await import('./application'); return renderApp(coreStart, depsStart, params); }, diff --git a/examples/bfetch_explorer/public/plugin.tsx b/examples/bfetch_explorer/public/plugin.tsx index 3155354c91fd4..fc3202f08bf70 100644 --- a/examples/bfetch_explorer/public/plugin.tsx +++ b/examples/bfetch_explorer/public/plugin.tsx @@ -34,7 +34,10 @@ export interface BfetchExplorerStartPlugins { } export class BfetchExplorerPlugin implements Plugin { - public setup(core: CoreSetup, plugins: BfetchExplorerSetupPlugins) { + public setup( + core: CoreSetup, + plugins: BfetchExplorerSetupPlugins + ) { const double = plugins.bfetch.batchedFunction<{ num: number }, { num: number }>({ url: '/bfetch_explorer/double', }); diff --git a/examples/embeddable_examples/public/index.ts b/examples/embeddable_examples/public/index.ts index 1c2c3911d1006..5fcd454b17a5c 100644 --- a/examples/embeddable_examples/public/index.ts +++ b/examples/embeddable_examples/public/index.ts @@ -26,9 +26,18 @@ export { export { ListContainer, LIST_CONTAINER } from './list_container'; export { TODO_EMBEDDABLE } from './todo'; -import { EmbeddableExamplesPlugin } from './plugin'; +import { + EmbeddableExamplesPlugin, + EmbeddableExamplesSetupDependencies, + EmbeddableExamplesStartDependencies, +} from './plugin'; export { SearchableListContainer, SEARCHABLE_LIST_CONTAINER } from './searchable_list_container'; export { MULTI_TASK_TODO_EMBEDDABLE } from './multi_task_todo'; -export const plugin: PluginInitializer = () => new EmbeddableExamplesPlugin(); +export const plugin: PluginInitializer< + void, + void, + EmbeddableExamplesSetupDependencies, + EmbeddableExamplesStartDependencies +> = () => new EmbeddableExamplesPlugin(); diff --git a/examples/embeddable_examples/public/plugin.ts b/examples/embeddable_examples/public/plugin.ts index 3663af68ae2c7..5c202d96ceb1a 100644 --- a/examples/embeddable_examples/public/plugin.ts +++ b/examples/embeddable_examples/public/plugin.ts @@ -28,11 +28,11 @@ import { } from './searchable_list_container'; import { LIST_CONTAINER, ListContainerFactory } from './list_container'; -interface EmbeddableExamplesSetupDependencies { +export interface EmbeddableExamplesSetupDependencies { embeddable: EmbeddableSetup; } -interface EmbeddableExamplesStartDependencies { +export interface EmbeddableExamplesStartDependencies { embeddable: EmbeddableStart; } diff --git a/examples/search_explorer/public/plugin.tsx b/examples/search_explorer/public/plugin.tsx index 29b236e82bf46..70b37aa9e626c 100644 --- a/examples/search_explorer/public/plugin.tsx +++ b/examples/search_explorer/public/plugin.tsx @@ -21,7 +21,7 @@ import { Plugin, CoreSetup, AppMountParameters } from 'kibana/public'; import { AppPluginStartDependencies } from './types'; export class SearchExplorerPlugin implements Plugin { - public setup(core: CoreSetup) { + public setup(core: CoreSetup) { core.application.register({ id: 'searchExplorer', title: 'Search Explorer', diff --git a/packages/kbn-spec-to-console/README.md b/packages/kbn-spec-to-console/README.md index bf60afd88f494..526ceef43e3cd 100644 --- a/packages/kbn-spec-to-console/README.md +++ b/packages/kbn-spec-to-console/README.md @@ -26,7 +26,7 @@ At the root of the Kibana repository, run the following commands: yarn spec_to_console -g "/rest-api-spec/src/main/resources/rest-api-spec/api/*" -d "src/plugins/console/server/lib/spec_definitions/json" # X-pack -yarn spec_to_console -g "/x-pack/plugin/src/test/resources/rest-api-spec/api/*" -d "x-pack/plugins/console_extensions/server/spec/generated" +yarn spec_to_console -g "/x-pack/plugin/src/test/resources/rest-api-spec/api/*" -d "x-pack/plugins/console_extensions/server/lib/spec_definitions/json" ``` ### Information used in Console that is not available in the REST spec diff --git a/src/core/public/index.ts b/src/core/public/index.ts index f72e115fd24ff..254cac3495599 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -177,13 +177,18 @@ export { MountPoint, UnmountCallback, PublicUiSettingsParams } from './types'; /** * Core services exposed to the `Plugin` setup lifecycle * + * @typeParam TPluginsStart - the type of the consuming plugin's start dependencies. Should be the same + * as the consuming {@link Plugin}'s `TPluginsStart` type. Used by `getStartServices`. + * @typeParam TStart - the type of the consuming plugin's start contract. Should be the same as the + * consuming {@link Plugin}'s `TStart` type. Used by `getStartServices`. + * * @public * * @internalRemarks We document the properties with \@link tags to improve * navigation in the generated docs until there's a fix for * https://github.com/Microsoft/web-build-tools/issues/1237 */ -export interface CoreSetup { +export interface CoreSetup { /** {@link ApplicationSetup} */ application: ApplicationSetup; /** @@ -209,7 +214,7 @@ export interface CoreSetup { getInjectedVar: (name: string, defaultValue?: any) => unknown; }; /** {@link StartServicesAccessor} */ - getStartServices: StartServicesAccessor; + getStartServices: StartServicesAccessor; } /** @@ -219,9 +224,10 @@ export interface CoreSetup { * * @public */ -export type StartServicesAccessor = () => Promise< - [CoreStart, TPluginsStart] ->; +export type StartServicesAccessor< + TPluginsStart extends object = object, + TStart = unknown +> = () => Promise<[CoreStart, TPluginsStart, TStart]>; /** * Core services exposed to the `Plugin` start lifecycle @@ -274,7 +280,7 @@ export interface CoreStart { * @public * @deprecated */ -export interface LegacyCoreSetup extends CoreSetup { +export interface LegacyCoreSetup extends CoreSetup { /** @deprecated */ injectedMetadata: InjectedMetadataSetup; } diff --git a/src/core/public/legacy/legacy_service.ts b/src/core/public/legacy/legacy_service.ts index 1b7e25f585566..39ca7bdf54b7c 100644 --- a/src/core/public/legacy/legacy_service.ts +++ b/src/core/public/legacy/legacy_service.ts @@ -57,7 +57,7 @@ export class LegacyPlatformService { public readonly legacyId = Symbol(); private bootstrapModule?: BootstrapModule; private targetDomElement?: HTMLElement; - private readonly startDependencies$ = new Subject<[LegacyCoreStart, object]>(); + private readonly startDependencies$ = new Subject<[LegacyCoreStart, object, {}]>(); private readonly startDependencies = this.startDependencies$.pipe(first()).toPromise(); constructor(private readonly params: LegacyPlatformParams) {} @@ -129,7 +129,7 @@ export class LegacyPlatformService { }, }; - this.startDependencies$.next([legacyCore, plugins]); + this.startDependencies$.next([legacyCore, plugins, {}]); // Inject parts of the new platform into parts of the legacy platform // so that legacy APIs/modules can mimic their new platform counterparts diff --git a/src/core/public/mocks.ts b/src/core/public/mocks.ts index c860e9de8334e..0c4930592b233 100644 --- a/src/core/public/mocks.ts +++ b/src/core/public/mocks.ts @@ -49,13 +49,22 @@ export { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock'; export { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock'; export { scopedHistoryMock } from './application/scoped_history.mock'; -function createCoreSetupMock({ basePath = '' } = {}) { +function createCoreSetupMock({ + basePath = '', + pluginStartDeps = {}, + pluginStartContract, +}: { + basePath?: string; + pluginStartDeps?: object; + pluginStartContract?: any; +} = {}) { const mock = { application: applicationServiceMock.createSetupContract(), context: contextServiceMock.createSetupContract(), fatalErrors: fatalErrorsServiceMock.createSetupContract(), - getStartServices: jest.fn, object]>, []>(() => - Promise.resolve([createCoreStartMock({ basePath }), {}]) + getStartServices: jest.fn, object, any]>, []>( + () => + Promise.resolve([createCoreStartMock({ basePath }), pluginStartDeps, pluginStartContract]) ), http: httpServiceMock.createSetupContract({ basePath }), notifications: notificationServiceMock.createSetupContract(), diff --git a/src/core/public/plugins/plugin.test.ts b/src/core/public/plugins/plugin.test.ts index 111ee93dd699b..39330711f7980 100644 --- a/src/core/public/plugins/plugin.test.ts +++ b/src/core/public/plugins/plugin.test.ts @@ -109,6 +109,10 @@ describe('PluginWrapper', () => { test("`start` resolves `startDependencies` Promise after plugin's start", async () => { expect.assertions(2); + const pluginStartContract = { + someApi: () => 'foo', + }; + let startDependenciesResolved = false; mockPluginLoader.mockResolvedValueOnce(() => ({ setup: jest.fn(), @@ -116,6 +120,7 @@ describe('PluginWrapper', () => { // Add small delay to ensure startDependencies is not resolved until after the plugin instance's start resolves. await new Promise(resolve => setTimeout(resolve, 10)); expect(startDependenciesResolved).toBe(false); + return pluginStartContract; }, })); await plugin.load(addBasePath); @@ -127,7 +132,7 @@ describe('PluginWrapper', () => { // called. const startDependenciesCheck = plugin.startDependencies.then(res => { startDependenciesResolved = true; - expect(res).toEqual([context, deps]); + expect(res).toEqual([context, deps, pluginStartContract]); }); await plugin.start(context, deps); await startDependenciesCheck; diff --git a/src/core/public/plugins/plugin.ts b/src/core/public/plugins/plugin.ts index e880627e352c8..e51c45040c452 100644 --- a/src/core/public/plugins/plugin.ts +++ b/src/core/public/plugins/plugin.ts @@ -35,7 +35,7 @@ export interface Plugin< TPluginsSetup extends object = object, TPluginsStart extends object = object > { - setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise; + setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise; start(core: CoreStart, plugins: TPluginsStart): TStart | Promise; stop?(): void; } @@ -72,7 +72,7 @@ export class PluginWrapper< private initializer?: PluginInitializer; private instance?: Plugin; - private readonly startDependencies$ = new Subject<[CoreStart, TPluginsStart]>(); + private readonly startDependencies$ = new Subject<[CoreStart, TPluginsStart, TStart]>(); public readonly startDependencies = this.startDependencies$.pipe(first()).toPromise(); constructor( @@ -105,7 +105,7 @@ export class PluginWrapper< * @param plugins The dictionary where the key is the dependency name and the value * is the contract returned by the dependency's `setup` function. */ - public async setup(setupContext: CoreSetup, plugins: TPluginsSetup) { + public async setup(setupContext: CoreSetup, plugins: TPluginsSetup) { this.instance = await this.createPluginInstance(); return await this.instance.setup(setupContext, plugins); @@ -125,7 +125,7 @@ export class PluginWrapper< const startContract = await this.instance.start(startContext, plugins); - this.startDependencies$.next([startContext, plugins]); + this.startDependencies$.next([startContext, plugins, startContract]); return startContract; } diff --git a/src/core/public/plugins/plugins_service.ts b/src/core/public/plugins/plugins_service.ts index 8e1574d05baf8..e698af689036d 100644 --- a/src/core/public/plugins/plugins_service.ts +++ b/src/core/public/plugins/plugins_service.ts @@ -53,7 +53,7 @@ export interface PluginsServiceStart { */ export class PluginsService implements CoreService { /** Plugin wrappers in topological order. */ - private readonly plugins = new Map>>(); + private readonly plugins = new Map>(); private readonly pluginDependencies = new Map(); private readonly satupPlugins: PluginName[] = []; diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index eec12f2348176..9f7f649f1e2a5 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -371,7 +371,7 @@ export interface CoreContext { } // @public -export interface CoreSetup { +export interface CoreSetup { // (undocumented) application: ApplicationSetup; // @deprecated (undocumented) @@ -379,7 +379,7 @@ export interface CoreSetup { // (undocumented) fatalErrors: FatalErrorsSetup; // (undocumented) - getStartServices: StartServicesAccessor; + getStartServices: StartServicesAccessor; // (undocumented) http: HttpSetup; // @deprecated @@ -807,7 +807,7 @@ export interface IUiSettingsClient { } // @public @deprecated -export interface LegacyCoreSetup extends CoreSetup { +export interface LegacyCoreSetup extends CoreSetup { // Warning: (ae-forgotten-export) The symbol "InjectedMetadataSetup" needs to be exported by the entry point index.d.ts // // @deprecated (undocumented) @@ -907,7 +907,7 @@ export interface PackageInfo { // @public export interface Plugin { // (undocumented) - setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise; + setup(core: CoreSetup, plugins: TPluginsSetup): TSetup | Promise; // (undocumented) start(core: CoreStart, plugins: TPluginsStart): TStart | Promise; // (undocumented) @@ -1237,7 +1237,7 @@ export class SimpleSavedObject { } // @public -export type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart]>; +export type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart, TStart]>; // @public export type StringValidation = StringValidationRegex | StringValidationRegexString; diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 1b436bfd72622..56ce16a951aa2 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -333,9 +333,13 @@ export interface RequestHandlerContext { /** * Context passed to the plugins `setup` method. * + * @typeParam TPluginsStart - the type of the consuming plugin's start dependencies. Should be the same + * as the consuming {@link Plugin}'s `TPluginsStart` type. Used by `getStartServices`. + * @typeParam TStart - the type of the consuming plugin's start contract. Should be the same as the + * consuming {@link Plugin}'s `TStart` type. Used by `getStartServices`. * @public */ -export interface CoreSetup { +export interface CoreSetup { /** {@link CapabilitiesSetup} */ capabilities: CapabilitiesSetup; /** {@link ContextSetup} */ @@ -353,7 +357,7 @@ export interface CoreSetup { /** {@link MetricsServiceSetup} */ metrics: MetricsServiceSetup; /** {@link StartServicesAccessor} */ - getStartServices: StartServicesAccessor; + getStartServices: StartServicesAccessor; } /** @@ -364,9 +368,10 @@ export interface CoreSetup { * * @public */ -export type StartServicesAccessor = () => Promise< - [CoreStart, TPluginsStart] ->; +export type StartServicesAccessor< + TPluginsStart extends object = object, + TStart = unknown +> = () => Promise<[CoreStart, TPluginsStart, TStart]>; /** * Context passed to the plugins `start` method. diff --git a/src/core/server/legacy/legacy_service.ts b/src/core/server/legacy/legacy_service.ts index b19a991fdf0d1..361fade6a4d0c 100644 --- a/src/core/server/legacy/legacy_service.ts +++ b/src/core/server/legacy/legacy_service.ts @@ -312,7 +312,7 @@ export class LegacyService implements CoreService { uuid: { getInstanceUuid: setupDeps.core.uuid.getInstanceUuid, }, - getStartServices: () => Promise.resolve([coreStart, startDeps.plugins]), + getStartServices: () => Promise.resolve([coreStart, startDeps.plugins, {}]), }; // eslint-disable-next-line @typescript-eslint/no-var-requires diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 2aa35dff563f0..31bf17da041af 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -96,7 +96,13 @@ function pluginInitializerContextMock(config: T = {} as T) { type CoreSetupMockType = MockedKeys & jest.Mocked>; -function createCoreSetupMock() { +function createCoreSetupMock({ + pluginStartDeps = {}, + pluginStartContract, +}: { + pluginStartDeps?: object; + pluginStartContract?: any; +} = {}) { const httpService = httpServiceMock.createSetupContract(); const httpMock: jest.Mocked = { createCookieSessionStorageFactory: httpService.createCookieSessionStorageFactory, @@ -131,8 +137,8 @@ function createCoreSetupMock() { uuid: uuidServiceMock.createSetupContract(), metrics: metricsServiceMock.createSetupContract(), getStartServices: jest - .fn, object]>, []>() - .mockResolvedValue([createCoreStartMock(), {}]), + .fn, object, any]>, []>() + .mockResolvedValue([createCoreStartMock(), pluginStartDeps, pluginStartContract]), }; return mock; diff --git a/src/core/server/plugins/integration_tests/plugins_service.test.ts b/src/core/server/plugins/integration_tests/plugins_service.test.ts index d5531478f03c5..1521fc332bcdb 100644 --- a/src/core/server/plugins/integration_tests/plugins_service.test.ts +++ b/src/core/server/plugins/integration_tests/plugins_service.test.ts @@ -107,7 +107,7 @@ describe('PluginsService', () => { }); it("properly resolves `getStartServices` in plugin's lifecycle", async () => { - expect.assertions(5); + expect.assertions(6); const pluginPath = 'plugin-path'; @@ -125,20 +125,25 @@ describe('PluginsService', () => { let contextFromStart: any = null; let contextFromStartService: any = null; + const pluginStartContract = { + someApi: () => 'foo', + }; + const pluginInitializer = () => ({ setup: async (coreSetup, deps) => { - coreSetup.getStartServices().then(([core, plugins]) => { + coreSetup.getStartServices().then(([core, plugins, pluginStart]) => { startDependenciesResolved = true; - contextFromStartService = { core, plugins }; + contextFromStartService = { core, plugins, pluginStart }; }); }, start: async (core, plugins) => { contextFromStart = { core, plugins }; await new Promise(resolve => setTimeout(resolve, 10)); expect(startDependenciesResolved).toBe(false); + return pluginStartContract; }, - } as Plugin); + } as Plugin); jest.doMock( join(pluginPath, 'server'), @@ -163,5 +168,6 @@ describe('PluginsService', () => { expect(startDependenciesResolved).toBe(true); expect(contextFromStart!.core).toEqual(contextFromStartService!.core); expect(contextFromStart!.plugins).toEqual(contextFromStartService!.plugins); + expect(contextFromStartService!.pluginStart).toEqual(pluginStartContract); }); }); diff --git a/src/core/server/plugins/plugin.test.ts b/src/core/server/plugins/plugin.test.ts index 6875302f88a9d..1e4d94dd00d0d 100644 --- a/src/core/server/plugins/plugin.test.ts +++ b/src/core/server/plugins/plugin.test.ts @@ -250,6 +250,9 @@ test("`start` resolves `startDependencies` Promise after plugin's start", async }); const startContext = { any: 'thing' } as any; const pluginDeps = { someDep: 'value' }; + const pluginStartContract = { + someApi: () => 'foo', + }; let startDependenciesResolved = false; @@ -259,6 +262,7 @@ test("`start` resolves `startDependencies` Promise after plugin's start", async // delay to ensure startDependencies is not resolved until after the plugin instance's start resolves. await new Promise(resolve => setTimeout(resolve, 10)); expect(startDependenciesResolved).toBe(false); + return pluginStartContract; }, }; mockPluginInitializer.mockReturnValue(mockPluginInstance); @@ -267,7 +271,7 @@ test("`start` resolves `startDependencies` Promise after plugin's start", async const startDependenciesCheck = plugin.startDependencies.then(resolvedStartDeps => { startDependenciesResolved = true; - expect(resolvedStartDeps).toEqual([startContext, pluginDeps]); + expect(resolvedStartDeps).toEqual([startContext, pluginDeps, pluginStartContract]); }); await plugin.start(startContext, pluginDeps); diff --git a/src/core/server/plugins/plugin.ts b/src/core/server/plugins/plugin.ts index b372874264eb5..7c67ab7a48df1 100644 --- a/src/core/server/plugins/plugin.ts +++ b/src/core/server/plugins/plugin.ts @@ -61,7 +61,7 @@ export class PluginWrapper< private instance?: Plugin; - private readonly startDependencies$ = new Subject<[CoreStart, TPluginsStart]>(); + private readonly startDependencies$ = new Subject<[CoreStart, TPluginsStart, TStart]>(); public readonly startDependencies = this.startDependencies$.pipe(first()).toPromise(); constructor( @@ -115,7 +115,7 @@ export class PluginWrapper< this.log.debug('Starting plugin'); const startContract = await this.instance.start(startContext, plugins); - this.startDependencies$.next([startContext, plugins]); + this.startDependencies$.next([startContext, plugins, startContract]); return startContract; } diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index f45c493ccfc3d..a0a4c9e07b2a5 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -622,7 +622,7 @@ export interface ContextSetup { export type CoreId = symbol; // @public -export interface CoreSetup { +export interface CoreSetup { // (undocumented) capabilities: CapabilitiesSetup; // (undocumented) @@ -630,7 +630,7 @@ export interface CoreSetup { // (undocumented) elasticsearch: ElasticsearchServiceSetup; // (undocumented) - getStartServices: StartServicesAccessor; + getStartServices: StartServicesAccessor; // (undocumented) http: HttpServiceSetup; // (undocumented) @@ -2272,7 +2272,7 @@ export type SharedGlobalConfig = RecursiveReadonly_2<{ }>; // @public -export type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart]>; +export type StartServicesAccessor = () => Promise<[CoreStart, TPluginsStart, TStart]>; // @public export type StringValidation = StringValidationRegex | StringValidationRegexString; diff --git a/src/legacy/core_plugins/input_control_vis/public/plugin.ts b/src/legacy/core_plugins/input_control_vis/public/plugin.ts index e85ccd94f9e6a..c45e0d17872ec 100644 --- a/src/legacy/core_plugins/input_control_vis/public/plugin.ts +++ b/src/legacy/core_plugins/input_control_vis/public/plugin.ts @@ -24,7 +24,7 @@ import { VisualizationsSetup, VisualizationsStart } from '../../visualizations/p import { createInputControlVisFn } from './input_control_fn'; import { createInputControlVisTypeDefinition } from './input_control_vis_type'; -type InputControlVisCoreSetup = CoreSetup; +type InputControlVisCoreSetup = CoreSetup; export interface InputControlVisDependencies { core: InputControlVisCoreSetup; @@ -46,7 +46,7 @@ export interface InputControlVisPluginStartDependencies { } /** @internal */ -export class InputControlVisPlugin implements Plugin, void> { +export class InputControlVisPlugin implements Plugin { constructor(public initializerContext: PluginInitializerContext) {} public async setup( diff --git a/src/legacy/core_plugins/kibana/public/discover/plugin.ts b/src/legacy/core_plugins/kibana/public/discover/plugin.ts index d3cdeb49fba71..42f3ec6726097 100644 --- a/src/legacy/core_plugins/kibana/public/discover/plugin.ts +++ b/src/legacy/core_plugins/kibana/public/discover/plugin.ts @@ -91,7 +91,7 @@ export class DiscoverPlugin implements Plugin { public initializeInnerAngular?: () => void; public initializeServices?: () => Promise<{ core: CoreStart; plugins: DiscoverStartPlugins }>; - setup(core: CoreSetup, plugins: DiscoverSetupPlugins) { + setup(core: CoreSetup, plugins: DiscoverSetupPlugins) { const { appMounted, appUnMounted, stop: stopUrlTracker } = createKbnUrlTracker({ baseUrl: core.http.basePath.prepend('/app/kibana'), defaultSubUrl: '#/discover', diff --git a/src/legacy/core_plugins/vis_type_timelion/public/plugin.ts b/src/legacy/core_plugins/vis_type_timelion/public/plugin.ts index 9d69c312b48f4..8d067369fef70 100644 --- a/src/legacy/core_plugins/vis_type_timelion/public/plugin.ts +++ b/src/legacy/core_plugins/vis_type_timelion/public/plugin.ts @@ -35,7 +35,7 @@ import { getTimelionVisualizationConfig } from './timelion_vis_fn'; import { getTimelionVisDefinition } from './timelion_vis_type'; import { setIndexPatterns, setSavedObjectsClient } from './helpers/plugin_services'; -type TimelionVisCoreSetup = CoreSetup; +type TimelionVisCoreSetup = CoreSetup; /** @internal */ export interface TimelionVisDependencies extends Partial { diff --git a/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts b/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts index 9539adbd2ec29..3022a03d65fe6 100644 --- a/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts +++ b/src/legacy/core_plugins/vis_type_vislib/public/plugin.ts @@ -62,10 +62,10 @@ export interface VisTypeVislibPluginStartDependencies { data: DataPublicPluginStart; } -type VisTypeVislibCoreSetup = CoreSetup; +type VisTypeVislibCoreSetup = CoreSetup; /** @internal */ -export class VisTypeVislibPlugin implements Plugin, void> { +export class VisTypeVislibPlugin implements Plugin { constructor(public initializerContext: PluginInitializerContext) {} public async setup( diff --git a/src/legacy/core_plugins/vis_type_xy/public/plugin.ts b/src/legacy/core_plugins/vis_type_xy/public/plugin.ts index 35abb04fd8732..0884cdf6a5e18 100644 --- a/src/legacy/core_plugins/vis_type_xy/public/plugin.ts +++ b/src/legacy/core_plugins/vis_type_xy/public/plugin.ts @@ -47,10 +47,10 @@ export interface VisTypeXyPluginStartDependencies { visualizations: VisualizationsStart; } -type VisTypeXyCoreSetup = CoreSetup; +type VisTypeXyCoreSetup = CoreSetup; /** @internal */ -export class VisTypeXyPlugin implements Plugin, void> { +export class VisTypeXyPlugin implements Plugin { constructor(public initializerContext: PluginInitializerContext) {} public async setup( diff --git a/src/plugins/console/server/lib/spec_definitions/json/.eslintrc b/src/plugins/console/server/lib/spec_definitions/json/.eslintrc deleted file mode 100644 index 10f7444ecaf1b..0000000000000 --- a/src/plugins/console/server/lib/spec_definitions/json/.eslintrc +++ /dev/null @@ -1,27 +0,0 @@ ---- - -root: true -extends: '../../../../../../../.eslintrc.js' - -rules: - block-scoped-var: off - camelcase: off - dot-location: off - dot-notation: off - eqeqeq: off - guard-for-in: off - new-cap: off - no-caller: off - no-empty: off - no-extend-native: off - no-loop-func: off - no-multi-str: off - no-nested-ternary: off - no-proto: off - no-sequences: off - no-undef: off - no-use-before-define: off - one-var: off - strict: off - no-var: off - prefer-const: off diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_template.json index e6317bd6eb537..8fb31277da44e 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/indices.put_template.json @@ -4,7 +4,8 @@ "include_type_name": "__flag__", "order": "", "create": "__flag__", - "master_timeout": "" + "master_timeout": "", + "flat_settings": "__flag__" }, "methods": [ "PUT", diff --git a/src/plugins/console/server/lib/spec_definitions/json/overrides/indices.get_template.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/indices.get_template.json new file mode 100644 index 0000000000000..e0cbcc9cee2ec --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/overrides/indices.get_template.json @@ -0,0 +1,8 @@ +{ + "indices.get_template": { + "patterns": [ + "_template", + "_template/{template}" + ] + } +} diff --git a/src/plugins/home/public/plugin.ts b/src/plugins/home/public/plugin.ts index 2353df600aa69..fab7808b5072e 100644 --- a/src/plugins/home/public/plugin.ts +++ b/src/plugins/home/public/plugin.ts @@ -50,7 +50,9 @@ export interface HomePluginSetupDependencies { kibanaLegacy: KibanaLegacySetup; } -export class HomePublicPlugin implements Plugin { +export class HomePublicPlugin + implements + Plugin { private readonly featuresCatalogueRegistry = new FeatureCatalogueRegistry(); private readonly environmentService = new EnvironmentService(); private readonly tutorialService = new TutorialService(); diff --git a/x-pack/legacy/plugins/siem/cypress.json b/x-pack/legacy/plugins/siem/cypress.json index d2397e1ec90dd..cc41b72714ed9 100644 --- a/x-pack/legacy/plugins/siem/cypress.json +++ b/x-pack/legacy/plugins/siem/cypress.json @@ -1,6 +1,6 @@ { "baseUrl": "http://localhost:5601", - "defaultCommandTimeout": 30000, + "defaultCommandTimeout": 60000, "screenshotsFolder": "../../../../target/kibana-siem/cypress/screenshots", "trashAssetsBeforeRuns": false, "video": false, diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/login.ts b/x-pack/legacy/plugins/siem/cypress/tasks/login.ts index 3abf5a6930486..c7788b080d06e 100644 --- a/x-pack/legacy/plugins/siem/cypress/tasks/login.ts +++ b/x-pack/legacy/plugins/siem/cypress/tasks/login.ts @@ -131,5 +131,5 @@ export const loginAndWaitForPageWithoutDateRange = (url: string) => { login(); cy.viewport('macbook-15'); cy.visit(url); - cy.contains('a', 'SIEM', { timeout: 60000 }); + cy.contains('a', 'SIEM', { timeout: 120000 }); }; diff --git a/x-pack/plugins/actions/server/plugin.ts b/x-pack/plugins/actions/server/plugin.ts index c6c4f377ab618..ce31e62bc9b8e 100644 --- a/x-pack/plugins/actions/server/plugin.ts +++ b/x-pack/plugins/actions/server/plugin.ts @@ -175,7 +175,7 @@ export class ActionsPlugin implements Plugin, Plugi const usageCollection = plugins.usageCollection; if (usageCollection) { - core.getStartServices().then(async ([coreStart, startPlugins]: [CoreStart, any]) => { + core.getStartServices().then(async ([, startPlugins]: [CoreStart, any, any]) => { registerActionsUsageCollector(usageCollection, startPlugins.taskManager); initializeActionsTelemetry( diff --git a/x-pack/plugins/alerting/server/plugin.ts b/x-pack/plugins/alerting/server/plugin.ts index e88124322c1eb..b0d06d4aeeb74 100644 --- a/x-pack/plugins/alerting/server/plugin.ts +++ b/x-pack/plugins/alerting/server/plugin.ts @@ -143,7 +143,7 @@ export class AlertingPlugin { const usageCollection = plugins.usageCollection; if (usageCollection) { - core.getStartServices().then(async ([coreStart, startPlugins]: [CoreStart, any]) => { + core.getStartServices().then(async ([, startPlugins]: [CoreStart, any, any]) => { registerAlertsUsageCollector(usageCollection, startPlugins.taskManager); initializeAlertingTelemetry( diff --git a/x-pack/plugins/console_extensions/server/lib/spec_definitions/js/index.ts b/x-pack/plugins/console_extensions/server/lib/spec_definitions/js/index.ts new file mode 100644 index 0000000000000..bc9fbec194d0c --- /dev/null +++ b/x-pack/plugins/console_extensions/server/lib/spec_definitions/js/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { processors } from './ingest'; diff --git a/x-pack/plugins/console_extensions/server/spec/ingest/index.ts b/x-pack/plugins/console_extensions/server/lib/spec_definitions/js/ingest.ts similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/ingest/index.ts rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/js/ingest.ts diff --git a/x-pack/plugins/console_extensions/server/spec/generated/async_search.delete.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.delete.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/async_search.delete.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.delete.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/async_search.get.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.get.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/async_search.get.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.get.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/async_search.submit.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.submit.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/async_search.submit.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/async_search.submit.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/autoscaling.get_autoscaling_decision.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_decision.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/autoscaling.get_autoscaling_decision.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/autoscaling.get_autoscaling_decision.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/cat.ml_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/cat.ml_data_frame_analytics.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/cat.ml_datafeeds.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_datafeeds.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/cat.ml_datafeeds.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_datafeeds.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/cat.ml_jobs.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_jobs.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/cat.ml_jobs.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_jobs.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/cat.ml_trained_models.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_trained_models.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/cat.ml_trained_models.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/cat.ml_trained_models.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.delete_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.delete_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.delete_auto_follow_pattern.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.delete_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.follow.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.follow.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.follow_info.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow_info.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.follow_info.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow_info.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.follow_stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.follow_stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.follow_stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.forget_follower.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.forget_follower.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.forget_follower.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.forget_follower.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.get_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.get_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.get_auto_follow_pattern.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.get_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.pause_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.pause_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.pause_auto_follow_pattern.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.pause_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.pause_follow.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.pause_follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.pause_follow.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.pause_follow.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.put_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.put_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.put_auto_follow_pattern.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.put_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.resume_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.resume_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.resume_auto_follow_pattern.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.resume_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.resume_follow.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.resume_follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.resume_follow.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.resume_follow.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ccr.unfollow.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.unfollow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ccr.unfollow.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ccr.unfollow.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/enrich.delete_policy.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.delete_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/enrich.delete_policy.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.delete_policy.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/enrich.execute_policy.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.execute_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/enrich.execute_policy.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.execute_policy.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/enrich.get_policy.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.get_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/enrich.get_policy.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.get_policy.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/enrich.put_policy.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.put_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/enrich.put_policy.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.put_policy.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/enrich.stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/enrich.stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/enrich.stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/graph.explore.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/graph.explore.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/graph.explore.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/graph.explore.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.delete_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.delete_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.delete_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.delete_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.explain_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.explain_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.explain_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.explain_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.get_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.get_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.get_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.get_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.get_status.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.get_status.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.get_status.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.get_status.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.move_to_step.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.move_to_step.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.move_to_step.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.move_to_step.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.put_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.put_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.put_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.put_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.remove_policy.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.remove_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.remove_policy.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.remove_policy.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.retry.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.retry.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.retry.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.retry.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.set_policy.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.set_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.set_policy.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.set_policy.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.start.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.start.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.start.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.start.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ilm.stop.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.stop.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ilm.stop.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ilm.stop.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/indices.freeze.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.freeze.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/indices.freeze.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.freeze.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/indices.reload_search_analyzers.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.reload_search_analyzers.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/indices.reload_search_analyzers.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.reload_search_analyzers.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/indices.unfreeze.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.unfreeze.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/indices.unfreeze.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/indices.unfreeze.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/license.delete.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.delete.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/license.delete.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.delete.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/license.get.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/license.get.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/license.get_basic_status.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get_basic_status.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/license.get_basic_status.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get_basic_status.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/license.get_trial_status.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get_trial_status.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/license.get_trial_status.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.get_trial_status.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/license.post.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/license.post.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/license.post_start_basic.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post_start_basic.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/license.post_start_basic.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post_start_basic.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/license.post_start_trial.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post_start_trial.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/license.post_start_trial.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/license.post_start_trial.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/migration.deprecations.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.deprecations.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/migration.deprecations.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.deprecations.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/migration.get_assistance.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.get_assistance.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/migration.get_assistance.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.get_assistance.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/migration.upgrade.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.upgrade.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/migration.upgrade.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/migration.upgrade.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.close_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.close_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.close_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.close_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar_event.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_event.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar_event.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_event.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_calendar_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_calendar_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_data_frame_analytics.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_datafeed.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_datafeed.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_expired_data.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_expired_data.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_expired_data.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_expired_data.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_filter.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_filter.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_filter.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_filter.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_forecast.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_forecast.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_forecast.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_forecast.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_model_snapshot.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_model_snapshot.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.delete_trained_model.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_trained_model.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.delete_trained_model.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.delete_trained_model.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.evaluate_data_frame.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.evaluate_data_frame.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.evaluate_data_frame.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.evaluate_data_frame.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.explain_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.explain_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.explain_data_frame_analytics.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.explain_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.find_file_structure.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.find_file_structure.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.find_file_structure.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.find_file_structure.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.flush_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.flush_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.flush_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.flush_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.forecast.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.forecast.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.forecast.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.forecast.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_buckets.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_buckets.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_buckets.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_buckets.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_calendar_events.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendar_events.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_calendar_events.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendar_events.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_calendars.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendars.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_calendars.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_calendars.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_categories.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_categories.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_categories.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_categories.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_data_frame_analytics.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_data_frame_analytics_stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_data_frame_analytics_stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_data_frame_analytics_stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_datafeed_stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeed_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_datafeed_stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeed_stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_datafeeds.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeeds.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_datafeeds.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_datafeeds.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_filters.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_filters.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_filters.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_filters.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_influencers.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_influencers.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_influencers.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_influencers.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_job_stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_job_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_job_stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_job_stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_jobs.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_jobs.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_jobs.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_jobs.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_model_snapshots.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_model_snapshots.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_model_snapshots.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_model_snapshots.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_overall_buckets.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_overall_buckets.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_overall_buckets.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_overall_buckets.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_records.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_records.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_records.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_records.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_trained_models.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_trained_models.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.get_trained_models_stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.get_trained_models_stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.get_trained_models_stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.info.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.info.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.info.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.info.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.open_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.open_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.open_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.open_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.post_calendar_events.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.post_calendar_events.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.post_calendar_events.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.post_calendar_events.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.post_data.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.post_data.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.post_data.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.post_data.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.preview_datafeed.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.preview_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.preview_datafeed.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.preview_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.put_calendar.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.put_calendar.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.put_calendar_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.put_calendar_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_calendar_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.put_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.put_data_frame_analytics.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.put_datafeed.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.put_datafeed.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.put_filter.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_filter.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.put_filter.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_filter.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.put_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.put_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.put_trained_model.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_trained_model.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.put_trained_model.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.put_trained_model.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.revert_model_snapshot.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.revert_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.revert_model_snapshot.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.revert_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.set_upgrade_mode.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.set_upgrade_mode.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.set_upgrade_mode.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.set_upgrade_mode.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.start_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.start_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.start_data_frame_analytics.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.start_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.start_datafeed.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.start_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.start_datafeed.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.start_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.stop_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.stop_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.stop_data_frame_analytics.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.stop_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.stop_datafeed.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.stop_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.stop_datafeed.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.stop_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.update_datafeed.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.update_datafeed.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.update_filter.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_filter.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.update_filter.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_filter.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.update_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.update_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.update_model_snapshot.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.update_model_snapshot.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.update_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.upgrade.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.upgrade.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.upgrade.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.upgrade.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.validate.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.validate.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ml.validate_detector.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate_detector.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ml.validate_detector.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ml.validate_detector.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/monitoring.bulk.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/monitoring.bulk.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/monitoring.bulk.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/monitoring.bulk.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/rollup.delete_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.delete_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/rollup.delete_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.delete_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/rollup.get_jobs.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_jobs.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/rollup.get_jobs.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_jobs.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/rollup.get_rollup_caps.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_caps.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/rollup.get_rollup_caps.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_caps.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/rollup.get_rollup_index_caps.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_index_caps.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/rollup.get_rollup_index_caps.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.get_rollup_index_caps.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/rollup.put_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.put_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/rollup.put_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.put_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/rollup.rollup_search.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.rollup_search.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/rollup.rollup_search.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.rollup_search.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/rollup.start_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.start_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/rollup.start_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.start_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/rollup.stop_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.stop_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/rollup.stop_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/rollup.stop_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.authenticate.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.authenticate.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.authenticate.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.authenticate.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.change_password.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.change_password.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.change_password.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.change_password.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.clear_cached_realms.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.clear_cached_realms.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.clear_cached_realms.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.clear_cached_realms.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.clear_cached_roles.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.clear_cached_roles.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.clear_cached_roles.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.clear_cached_roles.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.create_api_key.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.create_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.create_api_key.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.create_api_key.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.delete_privileges.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.delete_privileges.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_privileges.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.delete_role.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.delete_role.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_role.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.delete_role_mapping.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.delete_role_mapping.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_role_mapping.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.delete_user.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.delete_user.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.delete_user.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.disable_user.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.disable_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.disable_user.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.disable_user.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.enable_user.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.enable_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.enable_user.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.enable_user.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.get_api_key.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.get_api_key.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_api_key.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.get_builtin_privileges.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_builtin_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.get_builtin_privileges.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_builtin_privileges.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.get_privileges.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.get_privileges.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_privileges.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.get_role.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.get_role.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_role.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.get_role_mapping.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.get_role_mapping.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_role_mapping.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.get_token.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.get_token.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_token.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.get_user.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.get_user.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_user.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.get_user_privileges.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_user_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.get_user_privileges.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.get_user_privileges.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.has_privileges.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.has_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.has_privileges.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.has_privileges.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.invalidate_api_key.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.invalidate_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.invalidate_api_key.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.invalidate_api_key.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.invalidate_token.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.invalidate_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.invalidate_token.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.invalidate_token.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.put_privileges.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.put_privileges.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_privileges.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.put_role.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.put_role.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_role.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.put_role_mapping.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.put_role_mapping.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_role_mapping.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/security.put_user.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/security.put_user.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/security.put_user.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/slm.delete_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.delete_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/slm.delete_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.delete_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/slm.execute_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.execute_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/slm.execute_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.execute_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/slm.execute_retention.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.execute_retention.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/slm.execute_retention.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.execute_retention.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/slm.get_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/slm.get_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/slm.get_stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/slm.get_stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/slm.get_status.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_status.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/slm.get_status.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.get_status.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/slm.put_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.put_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/slm.put_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.put_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/slm.start.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.start.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/slm.start.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.start.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/slm.stop.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.stop.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/slm.stop.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/slm.stop.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/sql.clear_cursor.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.clear_cursor.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/sql.clear_cursor.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.clear_cursor.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/sql.query.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.query.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/sql.query.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.query.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/sql.translate.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.translate.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/sql.translate.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/sql.translate.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/ssl.certificates.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ssl.certificates.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/ssl.certificates.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/ssl.certificates.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/transform.cat_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.cat_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/transform.cat_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.cat_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/transform.delete_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.delete_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/transform.delete_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.delete_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/transform.get_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.get_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/transform.get_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.get_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/transform.get_transform_stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.get_transform_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/transform.get_transform_stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.get_transform_stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/transform.preview_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.preview_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/transform.preview_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.preview_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/transform.put_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.put_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/transform.put_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.put_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/transform.start_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.start_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/transform.start_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.start_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/transform.stop_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.stop_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/transform.stop_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.stop_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/transform.update_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.update_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/transform.update_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/transform.update_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.ack_watch.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.ack_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.ack_watch.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.ack_watch.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.activate_watch.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.activate_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.activate_watch.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.activate_watch.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.deactivate_watch.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.deactivate_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.deactivate_watch.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.deactivate_watch.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.delete_watch.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.delete_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.delete_watch.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.delete_watch.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.execute_watch.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.execute_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.execute_watch.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.execute_watch.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.get_watch.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.get_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.get_watch.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.get_watch.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.put_watch.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.put_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.put_watch.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.put_watch.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.start.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.start.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.start.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.start.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/watcher.stop.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.stop.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/watcher.stop.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/watcher.stop.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/xpack.info.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.info.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/xpack.info.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.info.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/xpack.ssl.certificates.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.ssl.certificates.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/xpack.ssl.certificates.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.ssl.certificates.json diff --git a/x-pack/plugins/console_extensions/server/spec/generated/xpack.usage.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.usage.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/generated/xpack.usage.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/generated/xpack.usage.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/async_search.submit.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/async_search.submit.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/async_search.submit.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/async_search.submit.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ccr.follow.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ccr.follow.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.follow.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ccr.forget_follower.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.forget_follower.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ccr.forget_follower.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.forget_follower.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ccr.put_auto_follow_pattern.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.put_auto_follow_pattern.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ccr.put_auto_follow_pattern.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.put_auto_follow_pattern.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ccr.resume_follow.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.resume_follow.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ccr.resume_follow.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ccr.resume_follow.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/enrich.put_policy.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/enrich.put_policy.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/enrich.put_policy.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/enrich.put_policy.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ilm.move_to_step.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ilm.move_to_step.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ilm.move_to_step.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ilm.move_to_step.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ilm.put_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ilm.put_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ilm.put_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ilm.put_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.evaluate_data_frame.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.evaluate_data_frame.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.evaluate_data_frame.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.evaluate_data_frame.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.explain_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.explain_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.explain_data_frame_analytics.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.explain_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_buckets.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_buckets.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.get_buckets.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_buckets.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_calendar_events.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_calendar_events.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.get_calendar_events.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_calendar_events.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_calendars.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_calendars.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.get_calendars.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_calendars.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_categories.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_categories.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.get_categories.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_categories.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_influencers.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_influencers.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.get_influencers.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_influencers.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_model_snapshots.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_model_snapshots.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.get_model_snapshots.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_model_snapshots.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_overall_buckets.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_overall_buckets.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.get_overall_buckets.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_overall_buckets.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.get_records.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_records.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.get_records.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.get_records.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.post_calendar_events.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.post_calendar_events.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.post_calendar_events.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.post_calendar_events.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_calendar.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_calendar.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.put_calendar.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_calendar.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_data_frame_analytics.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_data_frame_analytics.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.put_data_frame_analytics.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_data_frame_analytics.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_datafeed.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.put_datafeed.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.put_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.put_trained_model.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_trained_model.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.put_trained_model.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.put_trained_model.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.revert_model_snapshot.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.revert_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.revert_model_snapshot.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.revert_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.update_datafeed.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_datafeed.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.update_datafeed.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_datafeed.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.update_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.update_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/ml.update_model_snapshot.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_model_snapshot.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/ml.update_model_snapshot.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/ml.update_model_snapshot.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.authenticate.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.authenticate.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.authenticate.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.authenticate.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.change_password.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.change_password.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.change_password.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.change_password.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.create_api_key.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.create_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.create_api_key.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.create_api_key.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.get_token.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.get_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.get_token.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.get_token.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.has_privileges.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.has_privileges.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.has_privileges.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.has_privileges.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.invalidate_api_key.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.invalidate_api_key.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.invalidate_api_key.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.invalidate_api_key.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.invalidate_token.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.invalidate_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.invalidate_token.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.invalidate_token.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.put_role.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.put_role.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_role.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.put_role_mapping.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.put_role_mapping.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_role_mapping.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/security.put_user.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/security.put_user.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/security.put_user.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/slm.put_lifecycle.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.put_lifecycle.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/slm.put_lifecycle.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.put_lifecycle.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/slm.start.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.start.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/slm.start.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.start.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/slm.stop.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.stop.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/slm.stop.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/slm.stop.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/sql.query.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/sql.query.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/sql.query.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/sql.query.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/transform.get_transform_stats.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.get_transform_stats.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/transform.get_transform_stats.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.get_transform_stats.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/transform.preview_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.preview_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/transform.preview_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.preview_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/transform.put_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.put_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/transform.put_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.put_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/transform.stop_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.stop_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/transform.stop_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.stop_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/transform.update_transform.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.update_transform.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/transform.update_transform.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/transform.update_transform.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.graph.explore.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.graph.explore.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.graph.explore.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.graph.explore.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.info.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.info.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.info.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.info.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.license.post.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.license.post.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.license.post.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.license.post.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.delete_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.delete_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.delete_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.delete_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.put_job.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.put_job.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.put_job.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.put_job.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.rollup_search.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.rollup_search.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.rollup.rollup_search.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.rollup.rollup_search.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.authenticate.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.authenticate.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.authenticate.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.authenticate.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.change_password.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.change_password.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.change_password.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.change_password.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.get_token.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.get_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.get_token.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.get_token.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.invalidate_token.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.invalidate_token.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.invalidate_token.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.invalidate_token.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_role.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_role.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_role.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_role.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_role_mapping.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_role_mapping.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_role_mapping.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_role_mapping.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_user.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_user.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.security.put_user.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.security.put_user.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.watcher.execute_watch.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.watcher.execute_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.watcher.execute_watch.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.watcher.execute_watch.json diff --git a/x-pack/plugins/console_extensions/server/spec/overrides/xpack.watcher.put_watch.json b/x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.watcher.put_watch.json similarity index 100% rename from x-pack/plugins/console_extensions/server/spec/overrides/xpack.watcher.put_watch.json rename to x-pack/plugins/console_extensions/server/lib/spec_definitions/json/overrides/xpack.watcher.put_watch.json diff --git a/x-pack/plugins/console_extensions/server/plugin.ts b/x-pack/plugins/console_extensions/server/plugin.ts index 8c2cb4d0db42b..2a08c258f4bbd 100644 --- a/x-pack/plugins/console_extensions/server/plugin.ts +++ b/x-pack/plugins/console_extensions/server/plugin.ts @@ -8,7 +8,7 @@ import { CoreSetup, CoreStart, Logger, Plugin, PluginInitializerContext } from ' import { ConsoleSetup, ConsoleStart } from '../../../../src/plugins/console/server'; -import { processors } from './spec/ingest/index'; +import { processors } from './lib/spec_definitions/js'; interface SetupDependencies { console: ConsoleSetup; @@ -18,7 +18,7 @@ interface StartDependencies { console: ConsoleStart; } -const CONSOLE_XPACK_JSON_SPEC_PATH = join(__dirname, 'spec/'); +const CONSOLE_XPACK_JSON_SPEC_PATH = join(__dirname, 'lib/spec_definitions/json'); export class ConsoleExtensionsServerPlugin implements Plugin { log: Logger; diff --git a/x-pack/plugins/ingest_manager/public/plugin.ts b/x-pack/plugins/ingest_manager/public/plugin.ts index 99dcebd9bfba1..d7be1c1f1fe6e 100644 --- a/x-pack/plugins/ingest_manager/public/plugin.ts +++ b/x-pack/plugins/ingest_manager/public/plugin.ts @@ -32,7 +32,9 @@ export interface IngestManagerStartDeps { data: DataPublicPluginStart; } -export class IngestManagerPlugin implements Plugin { +export class IngestManagerPlugin + implements + Plugin { private config: IngestManagerConfigType; constructor(private readonly initializerContext: PluginInitializerContext) { @@ -50,7 +52,8 @@ export class IngestManagerPlugin implements Plugin { async mount(params: AppMountParameters) { const [coreStart, startDeps] = (await core.getStartServices()) as [ CoreStart, - IngestManagerStartDeps + IngestManagerStartDeps, + IngestManagerStart ]; const { renderApp } = await import('./applications/ingest_manager'); return renderApp(coreStart, params, deps, startDeps, config); diff --git a/x-pack/plugins/ml/public/index.ts b/x-pack/plugins/ml/public/index.ts index f9f2be390e05f..8070f94a1264d 100755 --- a/x-pack/plugins/ml/public/index.ts +++ b/x-pack/plugins/ml/public/index.ts @@ -6,8 +6,19 @@ import { PluginInitializer } from 'kibana/public'; import './index.scss'; -import { MlPlugin, MlPluginSetup, MlPluginStart } from './plugin'; +import { + MlPlugin, + MlPluginSetup, + MlPluginStart, + MlSetupDependencies, + MlStartDependencies, +} from './plugin'; -export const plugin: PluginInitializer = () => new MlPlugin(); +export const plugin: PluginInitializer< + MlPluginSetup, + MlPluginStart, + MlSetupDependencies, + MlStartDependencies +> = () => new MlPlugin(); export { MlPluginSetup, MlPluginStart }; diff --git a/x-pack/plugins/ml/public/plugin.ts b/x-pack/plugins/ml/public/plugin.ts index d4bec3d617a04..62b60f81b672f 100644 --- a/x-pack/plugins/ml/public/plugin.ts +++ b/x-pack/plugins/ml/public/plugin.ts @@ -31,7 +31,7 @@ export interface MlSetupDependencies { } export class MlPlugin implements Plugin { - setup(core: CoreSetup, pluginsSetup: MlSetupDependencies) { + setup(core: CoreSetup, pluginsSetup: MlSetupDependencies) { core.application.register({ id: PLUGIN_ID, title: i18n.translate('xpack.ml.plugin.title', { diff --git a/x-pack/plugins/monitoring/server/plugin.ts b/x-pack/plugins/monitoring/server/plugin.ts index d9500284b52dc..24d8bcaa4397c 100644 --- a/x-pack/plugins/monitoring/server/plugin.ts +++ b/x-pack/plugins/monitoring/server/plugin.ts @@ -224,7 +224,7 @@ export class Plugin { this.monitoringCore = this.getLegacyShim( config, legacyConfig, - core.getStartServices as () => Promise<[CoreStart, PluginsStart]>, + core.getStartServices as () => Promise<[CoreStart, PluginsStart, {}]>, this.licenseService, this.cluster ); @@ -293,7 +293,7 @@ export class Plugin { getLegacyShim( config: MonitoringConfig, legacyConfig: any, - getCoreServices: () => Promise<[CoreStart, PluginsStart]>, + getCoreServices: () => Promise<[CoreStart, PluginsStart, {}]>, licenseService: MonitoringLicenseService, cluster: ICustomClusterClient ): MonitoringCore { diff --git a/x-pack/plugins/security/public/account_management/account_management_app.test.ts b/x-pack/plugins/security/public/account_management/account_management_app.test.ts index ad40c61718c73..bac98d5639755 100644 --- a/x-pack/plugins/security/public/account_management/account_management_app.test.ts +++ b/x-pack/plugins/security/public/account_management/account_management_app.test.ts @@ -38,7 +38,7 @@ describe('accountManagementApp', () => { it('properly sets breadcrumbs and renders application', async () => { const coreSetupMock = coreMock.createSetup(); const coreStartMock = coreMock.createStart(); - coreSetupMock.getStartServices.mockResolvedValue([coreStartMock, {}]); + coreSetupMock.getStartServices.mockResolvedValue([coreStartMock, {}, {}]); const authcMock = securityMock.createSetup().authc; const containerMock = document.createElement('div'); diff --git a/x-pack/plugins/security/public/authentication/logged_out/logged_out_app.test.ts b/x-pack/plugins/security/public/authentication/logged_out/logged_out_app.test.ts index c8303ecc940d6..f0c18a3f1408e 100644 --- a/x-pack/plugins/security/public/authentication/logged_out/logged_out_app.test.ts +++ b/x-pack/plugins/security/public/authentication/logged_out/logged_out_app.test.ts @@ -35,7 +35,7 @@ describe('loggedOutApp', () => { it('properly renders application', async () => { const coreSetupMock = coreMock.createSetup(); const coreStartMock = coreMock.createStart(); - coreSetupMock.getStartServices.mockResolvedValue([coreStartMock, {}]); + coreSetupMock.getStartServices.mockResolvedValue([coreStartMock, {}, {}]); const containerMock = document.createElement('div'); diff --git a/x-pack/plugins/security/public/authentication/login/login_app.test.ts b/x-pack/plugins/security/public/authentication/login/login_app.test.ts index 2597a935f45df..b7119d179b0b6 100644 --- a/x-pack/plugins/security/public/authentication/login/login_app.test.ts +++ b/x-pack/plugins/security/public/authentication/login/login_app.test.ts @@ -38,7 +38,7 @@ describe('loginApp', () => { it('properly renders application', async () => { const coreSetupMock = coreMock.createSetup(); const coreStartMock = coreMock.createStart(); - coreSetupMock.getStartServices.mockResolvedValue([coreStartMock, {}]); + coreSetupMock.getStartServices.mockResolvedValue([coreStartMock, {}, {}]); const containerMock = document.createElement('div'); loginApp.create({ diff --git a/x-pack/plugins/security/public/authentication/overwritten_session/overwritten_session_app.test.ts b/x-pack/plugins/security/public/authentication/overwritten_session/overwritten_session_app.test.ts index 7b15d8c46f6eb..96e72ead22990 100644 --- a/x-pack/plugins/security/public/authentication/overwritten_session/overwritten_session_app.test.ts +++ b/x-pack/plugins/security/public/authentication/overwritten_session/overwritten_session_app.test.ts @@ -37,7 +37,7 @@ describe('overwrittenSessionApp', () => { it('properly sets breadcrumbs and renders application', async () => { const coreSetupMock = coreMock.createSetup(); const coreStartMock = coreMock.createStart(); - coreSetupMock.getStartServices.mockResolvedValue([coreStartMock, {}]); + coreSetupMock.getStartServices.mockResolvedValue([coreStartMock, {}, {}]); const authcMock = securityMock.createSetup().authc; const containerMock = document.createElement('div'); diff --git a/x-pack/plugins/security/public/index.ts b/x-pack/plugins/security/public/index.ts index fdb8b544d61d3..458f7ab801fdf 100644 --- a/x-pack/plugins/security/public/index.ts +++ b/x-pack/plugins/security/public/index.ts @@ -6,13 +6,22 @@ import './index.scss'; import { PluginInitializer, PluginInitializerContext } from 'src/core/public'; -import { SecurityPlugin, SecurityPluginSetup, SecurityPluginStart } from './plugin'; +import { + SecurityPlugin, + SecurityPluginSetup, + SecurityPluginStart, + PluginSetupDependencies, + PluginStartDependencies, +} from './plugin'; export { SecurityPluginSetup, SecurityPluginStart }; export { SessionInfo } from './types'; export { AuthenticatedUser } from '../common/model'; export { SecurityLicense, SecurityLicenseFeatures } from '../common/licensing'; -export const plugin: PluginInitializer = ( - initializerContext: PluginInitializerContext -) => new SecurityPlugin(initializerContext); +export const plugin: PluginInitializer< + SecurityPluginSetup, + SecurityPluginStart, + PluginSetupDependencies, + PluginStartDependencies +> = (initializerContext: PluginInitializerContext) => new SecurityPlugin(initializerContext); diff --git a/x-pack/plugins/spaces/public/management/spaces_management_app.test.tsx b/x-pack/plugins/spaces/public/management/spaces_management_app.test.tsx index 7738a440cb5e1..61c872ec9269c 100644 --- a/x-pack/plugins/spaces/public/management/spaces_management_app.test.tsx +++ b/x-pack/plugins/spaces/public/management/spaces_management_app.test.tsx @@ -51,7 +51,7 @@ async function mountApp(basePath: string, spaceId?: string) { .create({ spacesManager, securityLicense, - getStartServices: async () => [coreStart, pluginsStart as PluginsStart], + getStartServices: async () => [coreStart, pluginsStart as PluginsStart, {}], }) .mount({ basePath, element: container, setBreadcrumbs }); diff --git a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.test.ts b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.test.ts index 2c1ab26dd3d82..b4489e5700159 100644 --- a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.test.ts +++ b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.test.ts @@ -103,6 +103,7 @@ const setup = (space: Space) => { coreSetup.getStartServices.mockResolvedValue([ coreMock.createStart(), { features: featuresStart }, + {}, ]); const spacesService = spacesServiceMock.createSetupContract(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/es_index.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/es_index.tsx index 706d746b92995..8a13c461fb313 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/es_index.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/es_index.tsx @@ -193,7 +193,8 @@ const IndexActionConnectorFields: React.FunctionComponent @@ -224,8 +225,7 @@ const IndexActionConnectorFields: React.FunctionComponent diff --git a/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts b/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts index 5d1a52e3c2c21..61e1763cc9f75 100644 --- a/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts +++ b/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts @@ -147,7 +147,8 @@ export default ({ getService }: FtrProviderContext) => { }, ]; - describe('calculate model memory limit', function() { + // failing test, see https://github.com/elastic/kibana/issues/61400 + describe.skip('calculate model memory limit', function() { before(async () => { await esArchiver.load('ml/ecommerce'); }); diff --git a/x-pack/test/plugin_functional/plugins/resolver_test/public/index.ts b/x-pack/test/plugin_functional/plugins/resolver_test/public/index.ts index c5f3c0e19138f..51ec5a08b7a39 100644 --- a/x-pack/test/plugin_functional/plugins/resolver_test/public/index.ts +++ b/x-pack/test/plugin_functional/plugins/resolver_test/public/index.ts @@ -5,6 +5,15 @@ */ import { PluginInitializer } from 'kibana/public'; -import { ResolverTestPlugin } from './plugin'; +import { + ResolverTestPlugin, + ResolverTestPluginSetupDependencies, + ResolverTestPluginStartDependencies, +} from './plugin'; -export const plugin: PluginInitializer = () => new ResolverTestPlugin(); +export const plugin: PluginInitializer< + void, + void, + ResolverTestPluginSetupDependencies, + ResolverTestPluginStartDependencies +> = () => new ResolverTestPlugin();