diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index a4e2b566b8..7717b4c7ee 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -22,6 +22,7 @@ "@backstage/backend-common": "^0.5.3", "@backstage/config": "^0.1.2", "@backstage/plugin-search-indexer-backend": "^0.1.1", + "@backstage/search-common": "^0.1.1", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^3.0.3", diff --git a/plugins/search-backend/src/index.ts b/plugins/search-backend/src/index.ts index 8d30303db2..38e2cdf4cb 100644 --- a/plugins/search-backend/src/index.ts +++ b/plugins/search-backend/src/index.ts @@ -15,4 +15,3 @@ */ export * from './service/router'; -export * from './types'; diff --git a/plugins/search-backend/src/types.ts b/plugins/search-backend/src/types.ts deleted file mode 100644 index 119ecf35f3..0000000000 --- a/plugins/search-backend/src/types.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2021 Spotify AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { JsonObject } from '@backstage/config'; -import { IndexableDocument } from '@backstage/plugin-search-indexer-backend'; - -export interface SearchQuery { - term: string; - filters?: JsonObject; - pageCursor: string; -} - -export interface SearchResult { - document: IndexableDocument; -} - -export interface SearchResultSet { - results: SearchResult[]; -} diff --git a/plugins/search/package.json b/plugins/search/package.json index 6fa80cda54..d88ed9b241 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -33,6 +33,7 @@ "@backstage/catalog-model": "^0.7.3", "@backstage/plugin-catalog-react": "^0.1.2", "@backstage/plugin-search-backend": "^0.1.1", + "@backstage/search-common": "^0.1.1", "@backstage/theme": "^0.2.4", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", diff --git a/plugins/search/src/apis.ts b/plugins/search/src/apis.ts index a222cde5a9..dc6c12e249 100644 --- a/plugins/search/src/apis.ts +++ b/plugins/search/src/apis.ts @@ -18,7 +18,7 @@ import { createApiRef, DiscoveryApi } from '@backstage/core'; import { Entity, ENTITY_DEFAULT_NAMESPACE } from '@backstage/catalog-model'; import { CatalogApi } from '@backstage/plugin-catalog-react'; -import { SearchQuery, SearchResultSet } from '@backstage/plugin-search-backend'; +import { SearchQuery, SearchResultSet } from '@backstage/search-common'; import qs from 'qs'; export const searchApiRef = createApiRef({