{pictureUrl ? (
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/user_row/user_row.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/user_row/user_row.tsx
index 45866c10a5b21..b9413724db818 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/user_row/user_row.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/user_row/user_row.tsx
@@ -8,14 +8,14 @@ import React from 'react';
import { EuiTableRow, EuiTableRowCell } from '@elastic/eui';
-import { IUser } from '../../../types';
+import { User } from '../../../types';
-interface IUserRowProps {
- user: IUser;
+interface UserRowProps {
+ user: User;
showEmail?: boolean;
}
-export const UserRow: React.FC
= ({ user: { name, email }, showEmail }) => (
+export const UserRow: React.FC = ({ user: { name, email }, showEmail }) => (
{name}
{showEmail && {email}}
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/view_content_header/view_content_header.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/view_content_header/view_content_header.tsx
index 0e2d781020294..c6cf7d4991689 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/view_content_header/view_content_header.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/view_content_header/view_content_header.tsx
@@ -10,7 +10,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiText, EuiTitle, EuiSpacer } from '@elasti
import { FlexGroupAlignItems } from '@elastic/eui/src/components/flex/flex_group';
-interface IViewContentHeaderProps {
+interface ViewContentHeaderProps {
title: React.ReactNode;
description?: React.ReactNode;
action?: React.ReactNode;
@@ -18,7 +18,7 @@ interface IViewContentHeaderProps {
titleSize?: 's' | 'm' | 'l';
}
-export const ViewContentHeader: React.FC = ({
+export const ViewContentHeader: React.FC = ({
title,
titleSize = 'm',
description,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx
index 9875af7889447..311f30a891eb9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx
@@ -9,7 +9,7 @@ import { Route, Redirect, Switch } from 'react-router-dom';
import { useActions, useValues } from 'kea';
import { WORKPLACE_SEARCH_PLUGIN } from '../../../common/constants';
-import { IInitialAppData } from '../../../common/types';
+import { InitialAppData } from '../../../common/types';
import { KibanaLogic } from '../shared/kibana';
import { HttpLogic } from '../shared/http';
import { AppLogic } from './app_logic';
@@ -24,12 +24,12 @@ import { NotFound } from '../shared/not_found';
import { Overview } from './views/overview';
import { GroupsRouter } from './views/groups';
-export const WorkplaceSearch: React.FC = (props) => {
+export const WorkplaceSearch: React.FC = (props) => {
const { config } = useValues(KibanaLogic);
return !config.host ? : ;
};
-export const WorkplaceSearchConfigured: React.FC = (props) => {
+export const WorkplaceSearchConfigured: React.FC = (props) => {
const { hasInitialized } = useValues(AppLogic);
const { initializeAppData } = useActions(AppLogic);
const { renderHeaderActions } = useValues(KibanaLogic);
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts
index 747fba56e060e..8f44fcacc17f6 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/types.ts
@@ -6,12 +6,54 @@
export * from '../../../common/types/workplace_search';
-export type TSpacerSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
+export type SpacerSizeTypes = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
-export interface ISourcePriority {
- [id: string]: number;
+export interface Group {
+ id: string;
+ name: string;
+ createdAt: string;
+ updatedAt: string;
+ contentSources: ContentSource[];
+ users: User[];
+ usersCount: number;
+ color?: string;
+}
+
+export interface GroupDetails extends Group {
+ contentSources: ContentSourceDetails[];
+ canEditGroup: boolean;
+ canDeleteGroup: boolean;
+}
+
+export interface User {
+ id: string;
+ name: string | null;
+ initials: string;
+ pictureUrl: string | null;
+ color: string;
+ email: string;
+ role?: string;
+ groupIds: string[];
}
-export interface IComponentLoader {
- text?: string;
+export interface ContentSource {
+ id: string;
+ serviceType: string;
+ name: string;
+}
+
+export interface ContentSourceDetails extends ContentSource {
+ status: string;
+ statusMessage: string;
+ documentCount: string;
+ isFederatedSource: boolean;
+ searchable: boolean;
+ supportedByLicense: boolean;
+ errorReason: number;
+ allowsReauth: boolean;
+ boost: number;
+}
+
+export interface SourcePriority {
+ [id: string]: number;
}
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/group_logic.mock.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/group_logic.mock.ts
index 18e7851485222..3baaa07a9b0e7 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/group_logic.mock.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/group_logic.mock.ts
@@ -4,12 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { IGroupValues } from '../group_logic';
-
-import { IGroupDetails, ISourcePriority } from '../../../types';
+import { GroupDetails, SourcePriority } from '../../../types';
export const mockGroupValues = {
- group: {} as IGroupDetails,
+ group: {} as GroupDetails,
dataLoading: true,
manageUsersModalVisible: false,
managerModalFormErrors: [],
@@ -19,6 +17,6 @@ export const mockGroupValues = {
selectedGroupSources: [],
selectedGroupUsers: [],
groupPrioritiesUnchanged: true,
- activeSourcePriorities: {} as ISourcePriority,
- cachedSourcePriorities: {} as ISourcePriority,
-} as IGroupValues;
+ activeSourcePriorities: {} as SourcePriority,
+ cachedSourcePriorities: {} as SourcePriority,
+};
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/groups_logic.mock.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/groups_logic.mock.ts
index 0483799b73093..c21cc602967a5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/groups_logic.mock.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/__mocks__/groups_logic.mock.ts
@@ -4,16 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { IGroupsValues } from '../groups_logic';
-
-import { IContentSource, IUser, IGroup } from '../../../types';
+import { ContentSource, User, Group } from '../../../types';
import { DEFAULT_META } from '../../../../shared/constants';
export const mockGroupsValues = {
- groups: [] as IGroup[],
- contentSources: [] as IContentSource[],
- users: [] as IUser[],
+ groups: [] as Group[],
+ contentSources: [] as ContentSource[],
+ users: [] as User[],
groupsDataLoading: true,
groupListLoading: true,
newGroupModalOpen: false,
@@ -29,4 +27,4 @@ export const mockGroupsValues = {
allGroupUsers: [],
filterValue: '',
groupsMeta: DEFAULT_META,
-} as IGroupsValues;
+};
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_list.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_list.test.tsx
index f23a0c8d14042..07fae45b6b714 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_list.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_list.test.tsx
@@ -15,7 +15,7 @@ import { EuiFieldSearch, EuiFilterSelectItem, EuiCard, EuiPopoverTitle } from '@
import { FilterableUsersList } from './filterable_users_list';
-import { IUser } from '../../../types';
+import { User } from '../../../types';
const mockSetState = jest.fn();
const useStateMock: any = (initState: any) => [initState, mockSetState];
@@ -96,7 +96,7 @@ describe('FilterableUsersList', () => {
});
it('handles hidden users when count is higher than 20', () => {
- const _users = [] as IUser[];
+ const _users = [] as User[];
const NUM_TOTAL_USERS = 30;
const NUM_VISIBLE_USERS = 20;
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_list.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_list.tsx
index a7b5d3e83bee2..02a46125ed8ce 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_list.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_list.tsx
@@ -17,7 +17,7 @@ import {
EuiSpacer,
} from '@elastic/eui';
-import { IUser } from '../../../types';
+import { User } from '../../../types';
import { UserOptionItem } from './user_option_item';
@@ -36,8 +36,8 @@ const NO_USERS_FOUND = i18n.translate(
}
);
-interface IFilterableUsersListProps {
- users: IUser[];
+interface FilterableUsersListProps {
+ users: User[];
selectedOptions?: string[];
itemsClickable?: boolean;
isPopover?: boolean;
@@ -46,7 +46,7 @@ interface IFilterableUsersListProps {
removeFilteredUser(userId: string): void;
}
-export const FilterableUsersList: React.FC = ({
+export const FilterableUsersList: React.FC = ({
users,
selectedOptions = [],
itemsClickable,
@@ -59,7 +59,7 @@ export const FilterableUsersList: React.FC = ({
const filterUsers = (userId: string): boolean => {
if (!filterValue) return true;
- const filterUser = users.find(({ id }) => id === userId) as IUser;
+ const filterUser = users.find(({ id }) => id === userId) as User;
const filteredName = filterUser.name || filterUser.email;
return filteredName.toLowerCase().indexOf(filterValue.toLowerCase()) > -1;
};
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_popover.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_popover.tsx
index c9bf03c5d4700..e397d796124ab 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_popover.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/filterable_users_popover.tsx
@@ -10,13 +10,13 @@ import { useActions } from 'kea';
import { EuiFilterGroup, EuiPopover } from '@elastic/eui';
-import { IUser } from '../../../types';
+import { User } from '../../../types';
import { GroupsLogic } from '../groups_logic';
import { FilterableUsersList } from './filterable_users_list';
-interface IIFilterableUsersPopoverProps {
- users: IUser[];
+interface FilterableUsersPopoverProps {
+ users: User[];
selectedOptions?: string[];
itemsClickable?: boolean;
isPopoverOpen: boolean;
@@ -26,7 +26,7 @@ interface IIFilterableUsersPopoverProps {
closePopover(): void;
}
-export const FilterableUsersPopover: React.FC = ({
+export const FilterableUsersPopover: React.FC = ({
users,
selectedOptions = [],
itemsClickable,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.tsx
index c91516edf7b15..11c0430a8b429 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_manager_modal.tsx
@@ -28,7 +28,7 @@ import {
import { EuiButton as EuiLinkButton } from '../../../../shared/react_router_helpers';
-import { IGroup } from '../../../types';
+import { Group } from '../../../types';
import { ORG_SOURCES_PATH } from '../../../routes';
import noSharedSourcesIcon from '../../../assets/share_circle.svg';
@@ -67,17 +67,17 @@ const EMPTY_STATE_BODY = i18n.translate(
}
);
-interface IGroupManagerModalProps {
+interface GroupManagerModalProps {
children: React.ReactElement;
label: string;
allItems: object[];
numSelected: number;
- hideModal(group: IGroup): void;
+ hideModal(group: Group): void;
selectAll(allItems: object[]): void;
saveItems(): void;
}
-export const GroupManagerModal: React.FC = ({
+export const GroupManagerModal: React.FC = ({
children,
label,
allItems,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row.tsx
index 9642d48af55f5..5cebb96d00eb9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row.tsx
@@ -15,7 +15,7 @@ import { EuiTableRow, EuiTableRowCell, EuiIcon } from '@elastic/eui';
import { TruncatedContent } from '../../../../shared/truncate';
import { EuiLink } from '../../../../shared/react_router_helpers';
-import { IGroup } from '../../../types';
+import { Group } from '../../../types';
import { AppLogic } from '../../../app_logic';
import { getGroupPath } from '../../../routes';
@@ -42,7 +42,7 @@ const dateDisplay = (date: string) =>
? moment(date).fromNow()
: moment(date).format('MMMM D, YYYY');
-export const GroupRow: React.FC = ({
+export const GroupRow: React.FC = ({
id,
name,
updatedAt,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_sources_dropdown.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_sources_dropdown.tsx
index c686bc67c5015..eadfd2978872a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_sources_dropdown.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_sources_dropdown.tsx
@@ -10,19 +10,19 @@ import { i18n } from '@kbn/i18n';
import { EuiFilterGroup, EuiPopover, EuiPopoverTitle, EuiButtonEmpty } from '@elastic/eui';
-import { IContentSource } from '../../../types';
+import { ContentSource } from '../../../types';
import { SourceOptionItem } from './source_option_item';
-interface IGroupRowSourcesDropdownProps {
+interface GroupRowSourcesDropdownProps {
isPopoverOpen: boolean;
numOptions: number;
- groupSources: IContentSource[];
+ groupSources: ContentSource[];
onButtonClick(): void;
closePopover(): void;
}
-export const GroupRowSourcesDropdown: React.FC = ({
+export const GroupRowSourcesDropdown: React.FC = ({
isPopoverOpen,
numOptions,
groupSources,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_users_dropdown.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_users_dropdown.tsx
index 7ecf01db9c044..660df866ee906 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_users_dropdown.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_row_users_dropdown.tsx
@@ -13,7 +13,7 @@ import { EuiLoadingContent, EuiButtonEmpty } from '@elastic/eui';
import { GroupsLogic } from '../groups_logic';
import { FilterableUsersPopover } from './filterable_users_popover';
-interface IGroupRowUsersDropdownProps {
+interface GroupRowUsersDropdownProps {
isPopoverOpen: boolean;
numOptions: number;
groupId: string;
@@ -21,7 +21,7 @@ interface IGroupRowUsersDropdownProps {
closePopover(): void;
}
-export const GroupRowUsersDropdown: React.FC = ({
+export const GroupRowUsersDropdown: React.FC = ({
isPopoverOpen,
numOptions,
groupId,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.tsx
index 4bdff20bde888..8c054ed9abc87 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_source_prioritization.tsx
@@ -32,7 +32,7 @@ import { SourceIcon } from '../../../components/shared/source_icon';
import { GroupLogic } from '../group_logic';
-import { IContentSource } from '../../../types';
+import { ContentSource } from '../../../types';
const HEADER_TITLE = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.groups.sourceProioritization.headerTitle',
@@ -140,7 +140,7 @@ export const GroupSourcePrioritization: React.FC = () => {
{PRIORITY_TABLE_HEADER}
- {contentSources.map(({ id, name, serviceType }: IContentSource) => (
+ {contentSources.map(({ id, name, serviceType }: ContentSource) => (
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sources.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sources.test.tsx
index 38c56aefebafd..8ab3ace7aed93 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sources.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sources.test.tsx
@@ -16,7 +16,7 @@ import { GroupRowSourcesDropdown } from './group_row_sources_dropdown';
import { SourceIcon } from '../../../components/shared/source_icon';
-import { IContentSourceDetails } from '../../../types';
+import { ContentSourceDetails } from '../../../types';
describe('GroupSources', () => {
it('renders', () => {
@@ -26,7 +26,7 @@ describe('GroupSources', () => {
});
it('handles hidden sources when count is higer than 10', () => {
- const sources = [] as IContentSourceDetails[];
+ const sources = [] as ContentSourceDetails[];
const NUM_TOTAL_SOURCES = 10;
[...Array(NUM_TOTAL_SOURCES)].forEach((_, i) => {
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sources.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sources.tsx
index 7ae9856834443..b7d32a83750c9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sources.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_sources.tsx
@@ -9,15 +9,15 @@ import React, { useState } from 'react';
import { SourceIcon } from '../../../components/shared/source_icon';
import { MAX_TABLE_ROW_ICONS } from '../../../constants';
-import { IContentSource } from '../../../types';
+import { ContentSource } from '../../../types';
import { GroupRowSourcesDropdown } from './group_row_sources_dropdown';
-interface IGroupSourcesProps {
- groupSources: IContentSource[];
+interface GroupSourcesProps {
+ groupSources: ContentSource[];
}
-export const GroupSources: React.FC = ({ groupSources }) => {
+export const GroupSources: React.FC = ({ groupSources }) => {
const [popoverOpen, setPopoverOpen] = useState(false);
const closePopover = () => setPopoverOpen(false);
const togglePopover = () => setPopoverOpen(!popoverOpen);
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users.test.tsx
index 6a635eacf2585..581486141d0b0 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users.test.tsx
@@ -11,7 +11,7 @@ import { users } from '../../../__mocks__/users.mock';
import React from 'react';
import { shallow } from 'enzyme';
-import { IUser } from '../../../types';
+import { User } from '../../../types';
import { GroupUsers } from './group_users';
import { GroupRowUsersDropdown } from './group_row_users_dropdown';
@@ -32,7 +32,7 @@ describe('GroupUsers', () => {
});
it('handles hidden users when count is higher than 20', () => {
- const _users = [] as IUser[];
+ const _users = [] as User[];
const NUM_TOTAL_USERS = 20;
[...Array(NUM_TOTAL_USERS)].forEach((_, i) => {
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users.tsx
index 6ce4370ccb8d1..4615c953be791 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users.tsx
@@ -9,17 +9,17 @@ import React, { useState } from 'react';
import { UserIcon } from '../../../components/shared/user_icon';
import { MAX_TABLE_ROW_ICONS } from '../../../constants';
-import { IUser } from '../../../types';
+import { User } from '../../../types';
import { GroupRowUsersDropdown } from './group_row_users_dropdown';
-interface IGroupUsersProps {
- groupUsers: IUser[];
+interface GroupUsersProps {
+ groupUsers: User[];
usersCount: number;
groupId: string;
}
-export const GroupUsers: React.FC = ({ groupUsers, usersCount, groupId }) => {
+export const GroupUsers: React.FC = ({ groupUsers, usersCount, groupId }) => {
const [popoverOpen, setPopoverOpen] = useState(false);
const closePopover = () => setPopoverOpen(false);
const togglePopover = () => setPopoverOpen(!popoverOpen);
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users_table.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users_table.test.tsx
index 8747a838689c4..479fd5668cf40 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users_table.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users_table.test.tsx
@@ -12,7 +12,7 @@ import { groups } from '../../../__mocks__/groups.mock';
import React from 'react';
import { shallow } from 'enzyme';
-import { IUser } from '../../../types';
+import { User } from '../../../types';
import { GroupUsersTable } from './group_users_table';
import { TableHeader } from '../../../../shared/table_header';
@@ -38,7 +38,7 @@ describe('GroupUsersTable', () => {
});
it('renders pagination', () => {
- const users = [] as IUser[];
+ const users = [] as User[];
const NUM_TOTAL_USERS = 20;
[...Array(NUM_TOTAL_USERS)].forEach((_, i) => {
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users_table.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users_table.tsx
index 5ab71056aba7e..d29d7f33c706e 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users_table.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/group_users_table.tsx
@@ -13,7 +13,7 @@ import { i18n } from '@kbn/i18n';
import { EuiTable, EuiTableBody, EuiTablePagination } from '@elastic/eui';
import { Pager } from '@elastic/eui';
-import { IUser } from '../../../types';
+import { User } from '../../../types';
import { TableHeader } from '../../../../shared/table_header';
import { UserRow } from '../../../components/shared/user_row';
@@ -74,7 +74,7 @@ export const GroupUsersTable: React.FC = () => {
- {users.slice(firstItem, lastItem + 1).map((user: IUser) => (
+ {users.slice(firstItem, lastItem + 1).map((user: User) => (
))}
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/source_option_item.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/source_option_item.tsx
index f6677670f8a88..d537ada886f12 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/source_option_item.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/source_option_item.tsx
@@ -11,15 +11,15 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { TruncatedContent } from '../../../../shared/truncate';
import { SourceIcon } from '../../../components/shared/source_icon';
-import { IContentSource } from '../../../types';
+import { ContentSource } from '../../../types';
const MAX_LENGTH = 28;
-interface ISourceOptionItemProps {
- source: IContentSource;
+interface SourceOptionItemProps {
+ source: ContentSource;
}
-export const SourceOptionItem: React.FC = ({ source }) => (
+export const SourceOptionItem: React.FC = ({ source }) => (
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/sources_list.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/sources_list.tsx
index e8f9027d98e0d..2644bcb9975d6 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/sources_list.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/sources_list.tsx
@@ -8,18 +8,18 @@ import React from 'react';
import { EuiFilterSelectItem } from '@elastic/eui';
-import { IContentSource } from '../../../types';
+import { ContentSource } from '../../../types';
import { SourceOptionItem } from './source_option_item';
-interface ISourcesListProps {
- contentSources: IContentSource[];
+interface SourcesListProps {
+ contentSources: ContentSource[];
filteredSources: string[];
addFilteredSource(sourceId: string): void;
removeFilteredSource(sourceId: string): void;
}
-export const SourcesList: React.FC = ({
+export const SourcesList: React.FC = ({
contentSources,
filteredSources,
addFilteredSource,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/user_option_item.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/user_option_item.tsx
index 8eb199d67cf92..b9350bc4e2833 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/user_option_item.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/components/user_option_item.tsx
@@ -9,13 +9,13 @@ import React from 'react';
import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { UserIcon } from '../../../components/shared/user_icon';
-import { IUser } from '../../../types';
+import { User } from '../../../types';
-interface IUserOptionItemProps {
- user: IUser;
+interface UserOptionItemProps {
+ user: User;
}
-export const UserOptionItem: React.FC = ({ user }) => (
+export const UserOptionItem: React.FC = ({ user }) => (
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts
index b895200d3fc22..357f0553c69e1 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts
@@ -6,7 +6,6 @@
import { kea, MakeLogicType } from 'kea';
import { isEqual } from 'lodash';
-import { History } from 'history';
import { i18n } from '@kbn/i18n';
import { HttpLogic } from '../../../shared/http';
@@ -20,26 +19,26 @@ import {
} from '../../../shared/flash_messages';
import { GROUPS_PATH } from '../../routes';
-import { IContentSourceDetails, IGroupDetails, IUser, ISourcePriority } from '../../types';
+import { ContentSourceDetails, GroupDetails, User, SourcePriority } from '../../types';
export const MAX_NAME_LENGTH = 40;
-export interface IGroupActions {
- onInitializeGroup(group: IGroupDetails): IGroupDetails;
- onGroupNameChanged(group: IGroupDetails): IGroupDetails;
- onGroupPrioritiesChanged(group: IGroupDetails): IGroupDetails;
+interface GroupActions {
+ onInitializeGroup(group: GroupDetails): GroupDetails;
+ onGroupNameChanged(group: GroupDetails): GroupDetails;
+ onGroupPrioritiesChanged(group: GroupDetails): GroupDetails;
onGroupNameInputChange(groupName: string): string;
addGroupSource(sourceId: string): string;
removeGroupSource(sourceId: string): string;
addGroupUser(userId: string): string;
removeGroupUser(userId: string): string;
- onGroupSourcesSaved(group: IGroupDetails): IGroupDetails;
- onGroupUsersSaved(group: IGroupDetails): IGroupDetails;
+ onGroupSourcesSaved(group: GroupDetails): GroupDetails;
+ onGroupUsersSaved(group: GroupDetails): GroupDetails;
setGroupModalErrors(errors: string[]): string[];
- hideSharedSourcesModal(group: IGroupDetails): IGroupDetails;
- hideManageUsersModal(group: IGroupDetails): IGroupDetails;
- selectAllSources(contentSources: IContentSourceDetails[]): IContentSourceDetails[];
- selectAllUsers(users: IUser[]): IUser[];
+ hideSharedSourcesModal(group: GroupDetails): GroupDetails;
+ hideManageUsersModal(group: GroupDetails): GroupDetails;
+ selectAllSources(contentSources: ContentSourceDetails[]): ContentSourceDetails[];
+ selectAllUsers(users: User[]): User[];
updatePriority(id: string, boost: number): { id: string; boost: number };
resetGroup(): void;
showConfirmDeleteModal(): void;
@@ -55,8 +54,8 @@ export interface IGroupActions {
saveGroupSourcePrioritization(): void;
}
-export interface IGroupValues {
- group: IGroupDetails;
+interface GroupValues {
+ group: GroupDetails;
dataLoading: boolean;
manageUsersModalVisible: boolean;
managerModalFormErrors: string[];
@@ -66,36 +65,36 @@ export interface IGroupValues {
selectedGroupSources: string[];
selectedGroupUsers: string[];
groupPrioritiesUnchanged: boolean;
- activeSourcePriorities: ISourcePriority;
- cachedSourcePriorities: ISourcePriority;
+ activeSourcePriorities: SourcePriority;
+ cachedSourcePriorities: SourcePriority;
}
-export const GroupLogic = kea>({
+export const GroupLogic = kea>({
path: ['enterprise_search', 'workplace_search', 'group'],
actions: {
- onInitializeGroup: (group: IGroupDetails) => group,
- onGroupNameChanged: (group: IGroupDetails) => group,
- onGroupPrioritiesChanged: (group: IGroupDetails) => group,
- onGroupNameInputChange: (groupName: string) => groupName,
- addGroupSource: (sourceId: string) => sourceId,
- removeGroupSource: (sourceId: string) => sourceId,
- addGroupUser: (userId: string) => userId,
- removeGroupUser: (userId: string) => userId,
- onGroupSourcesSaved: (group: IGroupDetails) => group,
- onGroupUsersSaved: (group: IGroupDetails) => group,
- setGroupModalErrors: (errors: string[]) => errors,
- hideSharedSourcesModal: (group: IGroupDetails) => group,
- hideManageUsersModal: (group: IGroupDetails) => group,
- selectAllSources: (contentSources: IContentSourceDetails[]) => contentSources,
- selectAllUsers: (users: IUser[]) => users,
- updatePriority: (id: string, boost: number) => ({ id, boost }),
+ onInitializeGroup: (group) => group,
+ onGroupNameChanged: (group) => group,
+ onGroupPrioritiesChanged: (group) => group,
+ onGroupNameInputChange: (groupName) => groupName,
+ addGroupSource: (sourceId) => sourceId,
+ removeGroupSource: (sourceId) => sourceId,
+ addGroupUser: (userId) => userId,
+ removeGroupUser: (userId) => userId,
+ onGroupSourcesSaved: (group) => group,
+ onGroupUsersSaved: (group) => group,
+ setGroupModalErrors: (errors) => errors,
+ hideSharedSourcesModal: (group) => group,
+ hideManageUsersModal: (group) => group,
+ selectAllSources: (contentSources) => contentSources,
+ selectAllUsers: (users) => users,
+ updatePriority: (id, boost) => ({ id, boost }),
resetGroup: () => true,
showConfirmDeleteModal: () => true,
hideConfirmDeleteModal: () => true,
showSharedSourcesModal: () => true,
showManageUsersModal: () => true,
resetFlashMessages: () => true,
- initializeGroup: (groupId: string, history: History) => ({ groupId, history }),
+ initializeGroup: (groupId) => ({ groupId }),
deleteGroup: () => true,
updateGroupName: () => true,
saveGroupSources: () => true,
@@ -104,13 +103,13 @@ export const GroupLogic = kea>({
},
reducers: {
group: [
- {} as IGroupDetails,
+ {} as GroupDetails,
{
onInitializeGroup: (_, group) => group,
onGroupNameChanged: (_, group) => group,
onGroupSourcesSaved: (_, group) => group,
onGroupUsersSaved: (_, group) => group,
- resetGroup: () => ({} as IGroupDetails),
+ resetGroup: () => ({} as GroupDetails),
},
],
dataLoading: [
@@ -375,8 +374,8 @@ export const GroupLogic = kea>({
}),
});
-const mapPriorities = (contentSources: IContentSourceDetails[]): ISourcePriority => {
- const prioritiesMap = {} as ISourcePriority;
+const mapPriorities = (contentSources: ContentSourceDetails[]): SourcePriority => {
+ const prioritiesMap = {} as SourcePriority;
contentSources.forEach(({ id, boost }) => {
prioritiesMap[id] = boost;
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups_logic.ts
index 685a2651cb24a..618ca84f825c9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/groups_logic.ts
@@ -15,37 +15,37 @@ import {
setSuccessMessage,
} from '../../../shared/flash_messages';
-import { IContentSource, IGroup, IUser } from '../../types';
+import { ContentSource, Group, User } from '../../types';
import { JSON_HEADER as headers } from '../../../../../common/constants';
import { DEFAULT_META } from '../../../shared/constants';
-import { IMeta } from '../../../../../common/types';
+import { Meta } from '../../../../../common/types';
export const MAX_NAME_LENGTH = 40;
-interface IGroupsServerData {
- contentSources: IContentSource[];
- users: IUser[];
+interface GroupsServerData {
+ contentSources: ContentSource[];
+ users: User[];
}
-interface IGroupsSearchResponse {
- results: IGroup[];
- meta: IMeta;
+interface GroupsSearchResponse {
+ results: Group[];
+ meta: Meta;
}
-export interface IGroupsActions {
- onInitializeGroups(data: IGroupsServerData): IGroupsServerData;
- setSearchResults(data: IGroupsSearchResponse): IGroupsSearchResponse;
+interface GroupsActions {
+ onInitializeGroups(data: GroupsServerData): GroupsServerData;
+ setSearchResults(data: GroupsSearchResponse): GroupsSearchResponse;
addFilteredSource(sourceId: string): string;
removeFilteredSource(sourceId: string): string;
addFilteredUser(userId: string): string;
removeFilteredUser(userId: string): string;
- setGroupUsers(allGroupUsers: IUser[]): IUser[];
+ setGroupUsers(allGroupUsers: User[]): User[];
setAllGroupLoading(allGroupUsersLoading: boolean): boolean;
setFilterValue(filterValue: string): string;
setActivePage(activePage: number): number;
setNewGroupName(newGroupName: string): string;
- setNewGroup(newGroup: IGroup): IGroup;
+ setNewGroup(newGroup: Group): Group;
setNewGroupFormErrors(errors: string[]): string[];
openNewGroupModal(): void;
closeNewGroupModal(): void;
@@ -62,43 +62,43 @@ export interface IGroupsActions {
saveNewGroup(): void;
}
-export interface IGroupsValues {
- groups: IGroup[];
- contentSources: IContentSource[];
- users: IUser[];
+interface GroupsValues {
+ groups: Group[];
+ contentSources: ContentSource[];
+ users: User[];
groupsDataLoading: boolean;
groupListLoading: boolean;
newGroupModalOpen: boolean;
newGroupName: string;
- newGroup: IGroup | null;
+ newGroup: Group | null;
newGroupNameErrors: string[];
filterSourcesDropdownOpen: boolean;
filteredSources: string[];
filterUsersDropdownOpen: boolean;
filteredUsers: string[];
allGroupUsersLoading: boolean;
- allGroupUsers: IUser[];
+ allGroupUsers: User[];
filterValue: string;
- groupsMeta: IMeta;
+ groupsMeta: Meta;
hasFiltersSet: boolean;
}
-export const GroupsLogic = kea>({
+export const GroupsLogic = kea>({
path: ['enterprise_search', 'workplace_search', 'groups'],
actions: {
- onInitializeGroups: (data: IGroupsServerData) => data,
- setSearchResults: (data: IGroupsSearchResponse) => data,
- addFilteredSource: (sourceId: string) => sourceId,
- removeFilteredSource: (sourceId: string) => sourceId,
- addFilteredUser: (userId: string) => userId,
- removeFilteredUser: (userId: string) => userId,
- setGroupUsers: (allGroupUsers: IUser[]) => allGroupUsers,
+ onInitializeGroups: (data) => data,
+ setSearchResults: (data) => data,
+ addFilteredSource: (sourceId) => sourceId,
+ removeFilteredSource: (sourceId) => sourceId,
+ addFilteredUser: (userId) => userId,
+ removeFilteredUser: (userId) => userId,
+ setGroupUsers: (allGroupUsers) => allGroupUsers,
setAllGroupLoading: (allGroupUsersLoading: boolean) => allGroupUsersLoading,
- setFilterValue: (filterValue: string) => filterValue,
- setActivePage: (activePage: number) => activePage,
- setNewGroupName: (newGroupName: string) => newGroupName,
- setNewGroup: (newGroup: IGroup) => newGroup,
- setNewGroupFormErrors: (errors: string[]) => errors,
+ setFilterValue: (filterValue) => filterValue,
+ setActivePage: (activePage) => activePage,
+ setNewGroupName: (newGroupName) => newGroupName,
+ setNewGroup: (newGroup) => newGroup,
+ setNewGroupFormErrors: (errors) => errors,
openNewGroupModal: () => true,
closeNewGroupModal: () => true,
closeFilterSourcesDropdown: () => true,
@@ -109,13 +109,13 @@ export const GroupsLogic = kea>({
resetGroupsFilters: () => true,
resetGroups: () => true,
initializeGroups: () => true,
- getSearchResults: (resetPagination?: boolean) => ({ resetPagination }),
- fetchGroupUsers: (groupId: string) => ({ groupId }),
+ getSearchResults: (resetPagination) => ({ resetPagination }),
+ fetchGroupUsers: (groupId) => ({ groupId }),
saveNewGroup: () => true,
},
reducers: {
groups: [
- [] as IGroup[],
+ [] as Group[],
{
setSearchResults: (_, { results }) => results,
},
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/overview_logic.mock.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/overview_logic.mock.ts
index c497e51be96a6..9befb67d3e806 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/overview_logic.mock.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/__mocks__/overview_logic.mock.ts
@@ -4,8 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { IOverviewValues } from '../overview_logic';
-
import { setMockValues as setMockKeaValues, setMockActions } from '../../../../__mocks__/kea.mock';
import { DEFAULT_INITIAL_APP_DATA } from '../../../../../../common/__mocks__';
@@ -22,7 +20,7 @@ export const mockOverviewValues = {
personalSourcesCount: 0,
sourcesCount: 0,
dataLoading: true,
-} as IOverviewValues;
+};
export const mockActions = {
initializeOverview: jest.fn(() => ({})),
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_card.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_card.tsx
index 422e9b1276d4f..01539f491357a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_card.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_card.tsx
@@ -22,7 +22,7 @@ import {
import { TelemetryLogic } from '../../../shared/telemetry';
import { getWorkplaceSearchUrl } from '../../../shared/enterprise_search_url';
-interface IOnboardingCardProps {
+interface OnboardingCardProps {
title: React.ReactNode;
icon: React.ReactNode;
description: React.ReactNode;
@@ -32,7 +32,7 @@ interface IOnboardingCardProps {
complete?: boolean;
}
-export const OnboardingCard: React.FC = ({
+export const OnboardingCard: React.FC = ({
title,
icon,
description,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.ts
index a156b8a8009f9..bfb53a1b719c6 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/overview_logic.ts
@@ -7,9 +7,9 @@
import { kea, MakeLogicType } from 'kea';
import { HttpLogic } from '../../../shared/http';
-import { IFeedActivity } from './recent_activity';
+import { FeedActivity } from './recent_activity';
-export interface IOverviewServerData {
+interface OverviewServerData {
hasUsers: boolean;
hasOrgSources: boolean;
canCreateContentSources: boolean;
@@ -18,19 +18,19 @@ export interface IOverviewServerData {
pendingInvitationsCount: number;
accountsCount: number;
personalSourcesCount: number;
- activityFeed: IFeedActivity[];
+ activityFeed: FeedActivity[];
}
-export interface IOverviewActions {
- setServerData(serverData: IOverviewServerData): IOverviewServerData;
+interface OverviewActions {
+ setServerData(serverData: OverviewServerData): OverviewServerData;
initializeOverview(): void;
}
-export interface IOverviewValues extends IOverviewServerData {
+interface OverviewValues extends OverviewServerData {
dataLoading: boolean;
}
-export const OverviewLogic = kea>({
+export const OverviewLogic = kea>({
path: ['enterprise_search', 'workplace_search', 'overview_logic'],
actions: {
setServerData: (serverData) => serverData,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/recent_activity.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/recent_activity.tsx
index b3bdf7ae2c47d..6911196afa81d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/recent_activity.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/recent_activity.tsx
@@ -22,7 +22,7 @@ import { OverviewLogic } from './overview_logic';
import './recent_activity.scss';
-export interface IFeedActivity {
+export interface FeedActivity {
status?: string;
id: string;
message: string;
@@ -50,7 +50,7 @@ export const RecentActivity: React.FC = () => {
{activityFeed.length > 0 ? (
<>
- {activityFeed.map((props: IFeedActivity, index) => (
+ {activityFeed.map((props: FeedActivity, index) => (
))}
>
@@ -86,7 +86,7 @@ export const RecentActivity: React.FC = () => {
);
};
-export const RecentActivityItem: React.FC = ({
+export const RecentActivityItem: React.FC = ({
id,
status,
message,
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/statistic_card.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/statistic_card.tsx
index 6c4f43b1a3a22..f2e915a3116e9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/statistic_card.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/statistic_card.tsx
@@ -9,13 +9,13 @@ import { EuiCard, EuiFlexItem, EuiTitle, EuiTextColor } from '@elastic/eui';
import { getWorkplaceSearchUrl } from '../../../shared/enterprise_search_url';
-interface IStatisticCardProps {
+interface StatisticCardProps {
title: string;
count?: number;
actionPath?: string;
}
-export const StatisticCard: React.FC = ({ title, count = 0, actionPath }) => {
+export const StatisticCard: React.FC = ({ title, count = 0, actionPath }) => {
const linkProps = actionPath
? {
href: getWorkplaceSearchUrl(actionPath),
diff --git a/x-pack/plugins/enterprise_search/public/plugin.ts b/x-pack/plugins/enterprise_search/public/plugin.ts
index 0f025bd325ecd..f4ee8283122fd 100644
--- a/x-pack/plugins/enterprise_search/public/plugin.ts
+++ b/x-pack/plugins/enterprise_search/public/plugin.ts
@@ -17,22 +17,23 @@ import {
HomePublicPluginSetup,
} from '../../../../src/plugins/home/public';
import { LicensingPluginStart } from '../../licensing/public';
+
import {
APP_SEARCH_PLUGIN,
ENTERPRISE_SEARCH_PLUGIN,
WORKPLACE_SEARCH_PLUGIN,
} from '../common/constants';
-import { IInitialAppData } from '../common/types';
+import { InitialAppData } from '../common/types';
export interface ClientConfigType {
host?: string;
}
-export interface ClientData extends IInitialAppData {
+export interface ClientData extends InitialAppData {
publicUrl?: string;
errorConnecting?: boolean;
}
-export interface PluginsSetup {
+interface PluginsSetup {
home?: HomePublicPluginSetup;
}
export interface PluginsStart {
diff --git a/x-pack/plugins/enterprise_search/server/__mocks__/router.mock.ts b/x-pack/plugins/enterprise_search/server/__mocks__/router.mock.ts
index f00e0f2807e8d..c02d5cf0ff130 100644
--- a/x-pack/plugins/enterprise_search/server/__mocks__/router.mock.ts
+++ b/x-pack/plugins/enterprise_search/server/__mocks__/router.mock.ts
@@ -19,7 +19,7 @@ import {
type MethodType = 'get' | 'post' | 'put' | 'patch' | 'delete';
type PayloadType = 'params' | 'query' | 'body';
-interface IMockRouterProps {
+interface IMockRouter {
method: MethodType;
path: string;
payload?: PayloadType;
@@ -29,7 +29,7 @@ interface IMockRouterRequest {
query?: object;
params?: object;
}
-type TMockRouterRequest = KibanaRequest | IMockRouterRequest;
+type MockRouterRequest = KibanaRequest | IMockRouterRequest;
export class MockRouter {
public router!: jest.Mocked;
@@ -38,7 +38,7 @@ export class MockRouter {
public payload?: PayloadType;
public response = httpServerMock.createResponseFactory();
- constructor({ method, path, payload }: IMockRouterProps) {
+ constructor({ method, path, payload }: IMockRouter) {
this.createRouter();
this.method = method;
this.path = path;
@@ -49,7 +49,7 @@ export class MockRouter {
this.router = httpServiceMock.createRouter();
};
- public callRoute = async (request: TMockRouterRequest) => {
+ public callRoute = async (request: MockRouterRequest) => {
const routerCalls = this.router[this.method].mock.calls as any[];
if (!routerCalls.length) throw new Error('No routes registered.');
@@ -65,7 +65,7 @@ export class MockRouter {
* Schema validation helpers
*/
- public validateRoute = (request: TMockRouterRequest) => {
+ public validateRoute = (request: MockRouterRequest) => {
if (!this.payload) throw new Error('Cannot validate wihout a payload type specified.');
const [config] = this.router[this.method].mock.calls[0];
@@ -77,11 +77,11 @@ export class MockRouter {
payloadValidation.validate(payloadRequest);
};
- public shouldValidate = (request: TMockRouterRequest) => {
+ public shouldValidate = (request: MockRouterRequest) => {
expect(() => this.validateRoute(request)).not.toThrow();
};
- public shouldThrow = (request: TMockRouterRequest) => {
+ public shouldThrow = (request: MockRouterRequest) => {
expect(() => this.validateRoute(request)).toThrow();
};
}
diff --git a/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.ts b/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.ts
index ede776b6e0dce..9aa3eede1c71c 100644
--- a/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.ts
+++ b/x-pack/plugins/enterprise_search/server/collectors/app_search/telemetry.ts
@@ -10,7 +10,7 @@ import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { getSavedObjectAttributesFromRepo } from '../lib/telemetry';
-interface ITelemetry {
+interface Telemetry {
ui_viewed: {
setup_guide: number;
engines_overview: number;
@@ -37,7 +37,7 @@ export const registerTelemetryUsageCollector = (
savedObjects: SavedObjectsServiceStart,
log: Logger
) => {
- const telemetryUsageCollector = usageCollection.makeUsageCollector({
+ const telemetryUsageCollector = usageCollection.makeUsageCollector({
type: 'app_search',
fetch: async () => fetchTelemetryMetrics(savedObjects, log),
isReady: () => true,
@@ -72,7 +72,7 @@ const fetchTelemetryMetrics = async (savedObjects: SavedObjectsServiceStart, log
log
);
- const defaultTelemetrySavedObject: ITelemetry = {
+ const defaultTelemetrySavedObject: Telemetry = {
ui_viewed: {
setup_guide: 0,
engines_overview: 0,
@@ -111,5 +111,5 @@ const fetchTelemetryMetrics = async (savedObjects: SavedObjectsServiceStart, log
header_launch_button: get(savedObjectAttributes, 'ui_clicked.header_launch_button', 0),
engine_table_link: get(savedObjectAttributes, 'ui_clicked.engine_table_link', 0),
},
- } as ITelemetry;
+ } as Telemetry;
};
diff --git a/x-pack/plugins/enterprise_search/server/collectors/enterprise_search/telemetry.ts b/x-pack/plugins/enterprise_search/server/collectors/enterprise_search/telemetry.ts
index d6bd8bd9305f5..293fe9e3222c4 100644
--- a/x-pack/plugins/enterprise_search/server/collectors/enterprise_search/telemetry.ts
+++ b/x-pack/plugins/enterprise_search/server/collectors/enterprise_search/telemetry.ts
@@ -10,7 +10,7 @@ import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { getSavedObjectAttributesFromRepo } from '../lib/telemetry';
-interface ITelemetry {
+interface Telemetry {
ui_viewed: {
overview: number;
setup_guide: number;
@@ -35,7 +35,7 @@ export const registerTelemetryUsageCollector = (
savedObjects: SavedObjectsServiceStart,
log: Logger
) => {
- const telemetryUsageCollector = usageCollection.makeUsageCollector({
+ const telemetryUsageCollector = usageCollection.makeUsageCollector({
type: 'enterprise_search',
fetch: async () => fetchTelemetryMetrics(savedObjects, log),
isReady: () => true,
@@ -68,7 +68,7 @@ const fetchTelemetryMetrics = async (savedObjects: SavedObjectsServiceStart, log
log
);
- const defaultTelemetrySavedObject: ITelemetry = {
+ const defaultTelemetrySavedObject: Telemetry = {
ui_viewed: {
overview: 0,
setup_guide: 0,
@@ -99,5 +99,5 @@ const fetchTelemetryMetrics = async (savedObjects: SavedObjectsServiceStart, log
app_search: get(savedObjectAttributes, 'ui_clicked.app_search', 0),
workplace_search: get(savedObjectAttributes, 'ui_clicked.workplace_search', 0),
},
- } as ITelemetry;
+ } as Telemetry;
};
diff --git a/x-pack/plugins/enterprise_search/server/collectors/lib/telemetry.ts b/x-pack/plugins/enterprise_search/server/collectors/lib/telemetry.ts
index f5f4fa368555f..cd8ad72bf8358 100644
--- a/x-pack/plugins/enterprise_search/server/collectors/lib/telemetry.ts
+++ b/x-pack/plugins/enterprise_search/server/collectors/lib/telemetry.ts
@@ -37,7 +37,7 @@ export const getSavedObjectAttributesFromRepo = async (
* Set saved objection attributes - used by telemetry route
*/
-interface IIncrementUICounter {
+interface IncrementUICounter {
id: string; // Telemetry name
savedObjects: SavedObjectsServiceStart;
uiAction: string;
@@ -49,7 +49,7 @@ export async function incrementUICounter({
savedObjects,
uiAction,
metric,
-}: IIncrementUICounter) {
+}: IncrementUICounter) {
const internalRepository = savedObjects.createInternalRepository();
await internalRepository.incrementCounter(
diff --git a/x-pack/plugins/enterprise_search/server/collectors/workplace_search/telemetry.ts b/x-pack/plugins/enterprise_search/server/collectors/workplace_search/telemetry.ts
index cc08febf41f45..f093e80542e6a 100644
--- a/x-pack/plugins/enterprise_search/server/collectors/workplace_search/telemetry.ts
+++ b/x-pack/plugins/enterprise_search/server/collectors/workplace_search/telemetry.ts
@@ -10,7 +10,7 @@ import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { getSavedObjectAttributesFromRepo } from '../lib/telemetry';
-interface ITelemetry {
+interface Telemetry {
ui_viewed: {
setup_guide: number;
overview: number;
@@ -38,7 +38,7 @@ export const registerTelemetryUsageCollector = (
savedObjects: SavedObjectsServiceStart,
log: Logger
) => {
- const telemetryUsageCollector = usageCollection.makeUsageCollector({
+ const telemetryUsageCollector = usageCollection.makeUsageCollector({
type: 'workplace_search',
fetch: async () => fetchTelemetryMetrics(savedObjects, log),
isReady: () => true,
@@ -74,7 +74,7 @@ const fetchTelemetryMetrics = async (savedObjects: SavedObjectsServiceStart, log
log
);
- const defaultTelemetrySavedObject: ITelemetry = {
+ const defaultTelemetrySavedObject: Telemetry = {
ui_viewed: {
setup_guide: 0,
overview: 0,
@@ -115,5 +115,5 @@ const fetchTelemetryMetrics = async (savedObjects: SavedObjectsServiceStart, log
0
),
},
- } as ITelemetry;
+ } as Telemetry;
};
diff --git a/x-pack/plugins/enterprise_search/server/lib/check_access.ts b/x-pack/plugins/enterprise_search/server/lib/check_access.ts
index 497747f953289..8b32260bb7322 100644
--- a/x-pack/plugins/enterprise_search/server/lib/check_access.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/check_access.ts
@@ -10,13 +10,13 @@ import { ConfigType } from '../';
import { callEnterpriseSearchConfigAPI } from './enterprise_search_config_api';
-interface ICheckAccess {
+interface CheckAccess {
request: KibanaRequest;
security?: SecurityPluginSetup;
config: ConfigType;
log: Logger;
}
-export interface IAccess {
+export interface Access {
hasAppSearchAccess: boolean;
hasWorkplaceSearchAccess: boolean;
}
@@ -40,7 +40,7 @@ export const checkAccess = async ({
security,
request,
log,
-}: ICheckAccess): Promise => {
+}: CheckAccess): Promise => {
// If security has been disabled, always show the plugin
if (!security?.authz.mode.useRbacForRequest(request)) {
return ALLOW_ALL_PLUGINS;
diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts
index 325d7b0ce48f9..f9e84741997cf 100644
--- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts
@@ -9,18 +9,18 @@ import fetch from 'node-fetch';
import { KibanaRequest, Logger } from 'src/core/server';
import { ConfigType } from '../';
-import { IAccess } from './check_access';
+import { Access } from './check_access';
-import { IInitialAppData } from '../../common/types';
+import { InitialAppData } from '../../common/types';
import { stripTrailingSlash } from '../../common/strip_slashes';
-interface IParams {
+interface Params {
request: KibanaRequest;
config: ConfigType;
log: Logger;
}
-interface IReturn extends IInitialAppData {
- access?: IAccess;
+interface Return extends InitialAppData {
+ access?: Access;
publicUrl?: string;
}
@@ -35,7 +35,7 @@ export const callEnterpriseSearchConfigAPI = async ({
config,
log,
request,
-}: IParams): Promise => {
+}: Params): Promise => {
if (!config.host) return {};
const TIMEOUT_WARNING = `Enterprise Search access check took over ${config.accessCheckTimeoutWarning}ms. Please ensure your Enterprise Search server is responding normally and not adversely impacting Kibana load speeds.`;
diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_request_handler.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_request_handler.ts
index ad6d936ac0c36..8e4a817a82551 100644
--- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_request_handler.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_request_handler.ts
@@ -16,16 +16,16 @@ import {
import { ConfigType } from '../index';
import { JSON_HEADER, READ_ONLY_MODE_HEADER } from '../../common/constants';
-interface IConstructorDependencies {
+interface ConstructorDependencies {
config: ConfigType;
log: Logger;
}
-interface IRequestParams {
+interface RequestParams {
path: string;
params?: object;
hasValidData?: (body?: ResponseBody) => boolean;
}
-interface IErrorResponse {
+interface ErrorResponse {
message: string;
attributes: {
errors: string[];
@@ -48,7 +48,7 @@ export class EnterpriseSearchRequestHandler {
private log: Logger;
private headers: Record = {};
- constructor({ config, log }: IConstructorDependencies) {
+ constructor({ config, log }: ConstructorDependencies) {
this.log = log;
this.enterpriseSearchUrl = config.host as string;
}
@@ -57,7 +57,7 @@ export class EnterpriseSearchRequestHandler {
path,
params = {},
hasValidData = () => true,
- }: IRequestParams) {
+ }: RequestParams) {
return async (
_context: RequestHandlerContext,
request: KibanaRequest,
@@ -136,7 +136,7 @@ export class EnterpriseSearchRequestHandler {
const contentType = apiResponse.headers.get('content-type') || '';
// Default response
- let body: IErrorResponse = {
+ let body: ErrorResponse = {
message: statusText,
attributes: { errors: [statusText] },
};
diff --git a/x-pack/plugins/enterprise_search/server/plugin.ts b/x-pack/plugins/enterprise_search/server/plugin.ts
index 292767c8fcdb9..d8f23674844b8 100644
--- a/x-pack/plugins/enterprise_search/server/plugin.ts
+++ b/x-pack/plugins/enterprise_search/server/plugin.ts
@@ -45,13 +45,13 @@ import { workplaceSearchTelemetryType } from './saved_objects/workplace_search/t
import { registerTelemetryUsageCollector as registerWSTelemetryUsageCollector } from './collectors/workplace_search/telemetry';
import { registerWorkplaceSearchRoutes } from './routes/workplace_search';
-export interface PluginsSetup {
+interface PluginsSetup {
usageCollection?: UsageCollectionSetup;
security?: SecurityPluginSetup;
features: FeaturesPluginSetup;
}
-export interface IRouteDependencies {
+export interface RouteDependencies {
router: IRouter;
config: ConfigType;
log: Logger;
diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/credentials.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/credentials.ts
index 85d213c82dd05..a5611af9bba79 100644
--- a/x-pack/plugins/enterprise_search/server/routes/app_search/credentials.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/app_search/credentials.ts
@@ -6,7 +6,7 @@
import { schema } from '@kbn/config-schema';
-import { IRouteDependencies } from '../../plugin';
+import { RouteDependencies } from '../../plugin';
const tokenSchema = schema.oneOf([
schema.object({
@@ -32,7 +32,7 @@ const tokenSchema = schema.oneOf([
export function registerCredentialsRoutes({
router,
enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+}: RouteDependencies) {
// Credentials API
router.get(
{
diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/engines.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/engines.ts
index 49fc5b100e0d1..6cbd60e494fe3 100644
--- a/x-pack/plugins/enterprise_search/server/routes/app_search/engines.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/app_search/engines.ts
@@ -6,10 +6,10 @@
import { schema } from '@kbn/config-schema';
-import { IRouteDependencies } from '../../plugin';
+import { RouteDependencies } from '../../plugin';
import { ENGINES_PAGE_SIZE } from '../../../common/constants';
-interface IEnginesResponse {
+interface EnginesResponse {
results: object[];
meta: { page: { total_results: number } };
}
@@ -17,7 +17,7 @@ interface IEnginesResponse {
export function registerEnginesRoute({
router,
enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+}: RouteDependencies) {
router.get(
{
path: '/api/app_search/engines',
@@ -38,7 +38,7 @@ export function registerEnginesRoute({
'page[current]': pageIndex,
'page[size]': ENGINES_PAGE_SIZE,
},
- hasValidData: (body?: IEnginesResponse) =>
+ hasValidData: (body?: EnginesResponse) =>
Array.isArray(body?.results) && typeof body?.meta?.page?.total_results === 'number',
})(context, request, response);
}
diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/index.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/index.ts
index b10b8190d780c..7ce3ee9654f42 100644
--- a/x-pack/plugins/enterprise_search/server/routes/app_search/index.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/app_search/index.ts
@@ -4,13 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { IRouteDependencies } from '../../plugin';
+import { RouteDependencies } from '../../plugin';
import { registerEnginesRoute } from './engines';
import { registerCredentialsRoutes } from './credentials';
import { registerSettingsRoutes } from './settings';
-export const registerAppSearchRoutes = (dependencies: IRouteDependencies) => {
+export const registerAppSearchRoutes = (dependencies: RouteDependencies) => {
registerEnginesRoute(dependencies);
registerCredentialsRoutes(dependencies);
registerSettingsRoutes(dependencies);
diff --git a/x-pack/plugins/enterprise_search/server/routes/app_search/settings.ts b/x-pack/plugins/enterprise_search/server/routes/app_search/settings.ts
index b510349839f11..f9684cdbc060a 100644
--- a/x-pack/plugins/enterprise_search/server/routes/app_search/settings.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/app_search/settings.ts
@@ -6,12 +6,12 @@
import { schema } from '@kbn/config-schema';
-import { IRouteDependencies } from '../../plugin';
+import { RouteDependencies } from '../../plugin';
export function registerSettingsRoutes({
router,
enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+}: RouteDependencies) {
router.get(
{
path: '/api/app_search/log_settings',
diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/config_data.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/config_data.ts
index 453c7fd99bf4c..dbb626a80b321 100644
--- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/config_data.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/config_data.ts
@@ -4,10 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { IRouteDependencies } from '../../plugin';
+import { RouteDependencies } from '../../plugin';
import { callEnterpriseSearchConfigAPI } from '../../lib/enterprise_search_config_api';
-export function registerConfigDataRoute({ router, config, log }: IRouteDependencies) {
+export function registerConfigDataRoute({ router, config, log }: RouteDependencies) {
router.get(
{
path: '/api/enterprise_search/config_data',
diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/telemetry.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/telemetry.ts
index 8f6638ddc099e..caed6176e3304 100644
--- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/telemetry.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/telemetry.ts
@@ -6,7 +6,7 @@
import { schema } from '@kbn/config-schema';
-import { IRouteDependencies } from '../../plugin';
+import { RouteDependencies } from '../../plugin';
import { incrementUICounter } from '../../collectors/lib/telemetry';
import { ES_TELEMETRY_NAME } from '../../collectors/enterprise_search/telemetry';
@@ -18,11 +18,7 @@ const productToTelemetryMap = {
workplace_search: WS_TELEMETRY_NAME,
};
-export function registerTelemetryRoute({
- router,
- getSavedObjectsService,
- log,
-}: IRouteDependencies) {
+export function registerTelemetryRoute({ router, getSavedObjectsService, log }: RouteDependencies) {
router.put(
{
path: '/api/enterprise_search/stats',
diff --git a/x-pack/plugins/enterprise_search/server/routes/workplace_search/groups.ts b/x-pack/plugins/enterprise_search/server/routes/workplace_search/groups.ts
index fa01f983bbb89..ed75b0d6a91c8 100644
--- a/x-pack/plugins/enterprise_search/server/routes/workplace_search/groups.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/workplace_search/groups.ts
@@ -6,12 +6,9 @@
import { schema } from '@kbn/config-schema';
-import { IRouteDependencies } from '../../plugin';
+import { RouteDependencies } from '../../plugin';
-export function registerGroupsRoute({
- router,
- enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+export function registerGroupsRoute({ router, enterpriseSearchRequestHandler }: RouteDependencies) {
router.get(
{
path: '/api/workplace_search/groups',
@@ -43,7 +40,7 @@ export function registerGroupsRoute({
export function registerSearchGroupsRoute({
router,
enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+}: RouteDependencies) {
router.post(
{
path: '/api/workplace_search/groups/search',
@@ -70,7 +67,7 @@ export function registerSearchGroupsRoute({
);
}
-export function registerGroupRoute({ router, enterpriseSearchRequestHandler }: IRouteDependencies) {
+export function registerGroupRoute({ router, enterpriseSearchRequestHandler }: RouteDependencies) {
router.get(
{
path: '/api/workplace_search/groups/{id}',
@@ -129,7 +126,7 @@ export function registerGroupRoute({ router, enterpriseSearchRequestHandler }: I
export function registerGroupUsersRoute({
router,
enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+}: RouteDependencies) {
router.get(
{
path: '/api/workplace_search/groups/{id}/group_users',
@@ -150,7 +147,7 @@ export function registerGroupUsersRoute({
export function registerShareGroupRoute({
router,
enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+}: RouteDependencies) {
router.post(
{
path: '/api/workplace_search/groups/{id}/share',
@@ -175,7 +172,7 @@ export function registerShareGroupRoute({
export function registerAssignGroupRoute({
router,
enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+}: RouteDependencies) {
router.post(
{
path: '/api/workplace_search/groups/{id}/assign',
@@ -200,7 +197,7 @@ export function registerAssignGroupRoute({
export function registerBoostsGroupRoute({
router,
enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+}: RouteDependencies) {
router.put(
{
path: '/api/workplace_search/groups/{id}/boosts',
@@ -224,7 +221,7 @@ export function registerBoostsGroupRoute({
);
}
-export const registerGroupsRoutes = (dependencies: IRouteDependencies) => {
+export const registerGroupsRoutes = (dependencies: RouteDependencies) => {
registerGroupsRoute(dependencies);
registerSearchGroupsRoute(dependencies);
registerGroupRoute(dependencies);
diff --git a/x-pack/plugins/enterprise_search/server/routes/workplace_search/index.ts b/x-pack/plugins/enterprise_search/server/routes/workplace_search/index.ts
index 0edf0b980cf21..130898806ad51 100644
--- a/x-pack/plugins/enterprise_search/server/routes/workplace_search/index.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/workplace_search/index.ts
@@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { IRouteDependencies } from '../../plugin';
+import { RouteDependencies } from '../../plugin';
import { registerOverviewRoute } from './overview';
import { registerGroupsRoutes } from './groups';
-export const registerWorkplaceSearchRoutes = (dependencies: IRouteDependencies) => {
+export const registerWorkplaceSearchRoutes = (dependencies: RouteDependencies) => {
registerOverviewRoute(dependencies);
registerGroupsRoutes(dependencies);
};
diff --git a/x-pack/plugins/enterprise_search/server/routes/workplace_search/overview.ts b/x-pack/plugins/enterprise_search/server/routes/workplace_search/overview.ts
index e5f9fcc746b5b..82b846302bf5d 100644
--- a/x-pack/plugins/enterprise_search/server/routes/workplace_search/overview.ts
+++ b/x-pack/plugins/enterprise_search/server/routes/workplace_search/overview.ts
@@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { IRouteDependencies } from '../../plugin';
+import { RouteDependencies } from '../../plugin';
export function registerOverviewRoute({
router,
enterpriseSearchRequestHandler,
-}: IRouteDependencies) {
+}: RouteDependencies) {
router.get(
{
path: '/api/workplace_search/overview',