diff --git a/src/plugins/workspace/server/index.ts b/src/plugins/workspace/server/index.ts index fe44b4d71757..2cfd05aaea8a 100644 --- a/src/plugins/workspace/server/index.ts +++ b/src/plugins/workspace/server/index.ts @@ -18,4 +18,4 @@ export const config: PluginConfigDescriptor = { schema: configSchema, }; -export { WorkspaceFindOptions } from './types'; +export { WorkspaceFindOptions, WorkspacePluginSetup, WorkspacePluginStart } from './types'; diff --git a/src/plugins/workspace/server/plugin.ts b/src/plugins/workspace/server/plugin.ts index 56abf1afb918..e846470210c3 100644 --- a/src/plugins/workspace/server/plugin.ts +++ b/src/plugins/workspace/server/plugin.ts @@ -10,14 +10,14 @@ import { Logger, CoreStart, } from '../../../core/server'; -import { IWorkspaceClientImpl } from './types'; +import { IWorkspaceClientImpl, WorkspacePluginSetup, WorkspacePluginStart } from './types'; import { WorkspaceClient } from './workspace_client'; import { registerRoutes } from './routes'; import { WORKSPACE_CONFLICT_CONTROL_SAVED_OBJECTS_CLIENT_WRAPPER_ID } from '../common/constants'; import { WorkspaceConflictSavedObjectsClientWrapper } from './saved_objects/saved_objects_wrapper_for_check_workspace_conflict'; import { cleanWorkspaceId, getWorkspaceIdFromUrl } from '../../../core/server/utils'; -export class WorkspacePlugin implements Plugin<{}, {}> { +export class WorkspacePlugin implements Plugin { private readonly logger: Logger; private client?: IWorkspaceClientImpl; private workspaceConflictControl?: WorkspaceConflictSavedObjectsClientWrapper; diff --git a/src/plugins/workspace/server/types.ts b/src/plugins/workspace/server/types.ts index 0f60597a7a8a..29e8747c7618 100644 --- a/src/plugins/workspace/server/types.ts +++ b/src/plugins/workspace/server/types.ts @@ -117,3 +117,11 @@ export type IResponse = success: false; error?: string; }; + +export interface WorkspacePluginSetup { + client: IWorkspaceClientImpl; +} + +export interface WorkspacePluginStart { + client: IWorkspaceClientImpl; +}