catalog-client: clean up api exports

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-02-11 15:51:18 +01:00
parent da6e8838f3
commit 538ca90790
22 changed files with 349 additions and 335 deletions
@@ -14,13 +14,13 @@
* limitations under the License.
*/
import { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model';
import { RELATION_OWNED_BY } from '@backstage/catalog-model';
import {
PluginEndpointDiscovery,
getVoidLogger,
} from '@backstage/backend-common';
import { ConfigReader } from '@backstage/config';
import { CatalogListResponse } from '@backstage/catalog-client';
import { GetEntitiesResponse } from '@backstage/catalog-client';
import { entityMetadataFactRetriever } from './entityMetadataFactRetriever';
const getEntitiesMock = jest.fn();
@@ -36,7 +36,7 @@ const discovery: jest.Mocked<PluginEndpointDiscovery> = {
getExternalBaseUrl: jest.fn(),
};
const defaultEntityListResponse: CatalogListResponse<Entity> = {
const defaultEntityListResponse: GetEntitiesResponse = {
items: [
{
apiVersion: 'backstage.io/v1beta1',
@@ -15,13 +15,13 @@
*/
import { entityOwnershipFactRetriever } from './entityOwnershipFactRetriever';
import { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model';
import { RELATION_OWNED_BY } from '@backstage/catalog-model';
import {
PluginEndpointDiscovery,
getVoidLogger,
} from '@backstage/backend-common';
import { ConfigReader } from '@backstage/config';
import { CatalogListResponse } from '@backstage/catalog-client';
import { GetEntitiesResponse } from '@backstage/catalog-client';
const getEntitiesMock = jest.fn();
jest.mock('@backstage/catalog-client', () => {
@@ -36,7 +36,7 @@ const discovery: jest.Mocked<PluginEndpointDiscovery> = {
getExternalBaseUrl: jest.fn(),
};
const defaultEntityListResponse: CatalogListResponse<Entity> = {
const defaultEntityListResponse: GetEntitiesResponse = {
items: [
{
apiVersion: 'backstage.io/v1beta1',
@@ -15,13 +15,13 @@
*/
import { techdocsFactRetriever } from './techdocsFactRetriever';
import { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model';
import { RELATION_OWNED_BY } from '@backstage/catalog-model';
import {
PluginEndpointDiscovery,
getVoidLogger,
} from '@backstage/backend-common';
import { ConfigReader } from '@backstage/config';
import { CatalogListResponse } from '@backstage/catalog-client';
import { GetEntitiesResponse } from '@backstage/catalog-client';
const getEntitiesMock = jest.fn();
jest.mock('@backstage/catalog-client', () => {
@@ -36,7 +36,7 @@ const discovery: jest.Mocked<PluginEndpointDiscovery> = {
getExternalBaseUrl: jest.fn(),
};
const defaultEntityListResponse: CatalogListResponse<Entity> = {
const defaultEntityListResponse: GetEntitiesResponse = {
items: [
{
apiVersion: 'backstage.io/v1beta1',