Skip to content

Commit

Permalink
Add workspacePluginSetup type
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Mar 12, 2024
1 parent 362ab1e commit ee8e94a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/plugins/workspace/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export const config: PluginConfigDescriptor = {
schema: configSchema,
};

export { WorkspaceFindOptions } from './types';
export { WorkspaceFindOptions, WorkspacePluginSetup } from './types';
4 changes: 2 additions & 2 deletions src/plugins/workspace/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import {
Logger,
CoreStart,
} from '../../../core/server';
import { IWorkspaceClientImpl } from './types';
import { IWorkspaceClientImpl, WorkspacePluginSetup } 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';

export class WorkspacePlugin implements Plugin<{}, {}> {
export class WorkspacePlugin implements Plugin<WorkspacePluginSetup, {}> {
private readonly logger: Logger;
private client?: IWorkspaceClientImpl;
private workspaceConflictControl?: WorkspaceConflictSavedObjectsClientWrapper;
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/workspace/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,7 @@ export type IResponse<T> =
success: false;
error?: string;
};

export interface WorkspacePluginSetup {
client: IWorkspaceClientImpl;
}

0 comments on commit ee8e94a

Please sign in to comment.