deprecate EntityName, introduce CompoundEntityRef
deprecate getEntityName, introduce getCompoundEntityRef Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ import {
|
||||
} from '@backstage/plugin-tech-insights-common';
|
||||
import { Check } from './types';
|
||||
import { CheckResultRenderer } from '../components/CheckResultRenderer';
|
||||
import { EntityName } from '@backstage/catalog-model';
|
||||
import { CompoundEntityRef } from '@backstage/catalog-model';
|
||||
|
||||
/**
|
||||
* {@link @backstage/core-plugin-api#ApiRef} for the {@link TechInsightsApi}
|
||||
@@ -45,9 +45,12 @@ export interface TechInsightsApi {
|
||||
description?: string,
|
||||
) => CheckResultRenderer | undefined;
|
||||
getAllChecks(): Promise<Check[]>;
|
||||
runChecks(entityParams: EntityName, checks?: Check[]): Promise<CheckResult[]>;
|
||||
runChecks(
|
||||
entityParams: CompoundEntityRef,
|
||||
checks?: Check[],
|
||||
): Promise<CheckResult[]>;
|
||||
runBulkChecks(
|
||||
entities: EntityName[],
|
||||
entities: CompoundEntityRef[],
|
||||
checks?: Check[],
|
||||
): Promise<BulkCheckResponse>;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
import { Check } from './types';
|
||||
import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';
|
||||
import { ResponseError } from '@backstage/errors';
|
||||
import { EntityName } from '@backstage/catalog-model';
|
||||
import { CompoundEntityRef } from '@backstage/catalog-model';
|
||||
|
||||
import {
|
||||
CheckResultRenderer,
|
||||
@@ -74,7 +74,7 @@ export class TechInsightsClient implements TechInsightsApi {
|
||||
}
|
||||
|
||||
async runChecks(
|
||||
entityParams: EntityName,
|
||||
entityParams: CompoundEntityRef,
|
||||
checks?: Check[],
|
||||
): Promise<CheckResult[]> {
|
||||
const url = await this.discoveryApi.getBaseUrl('tech-insights');
|
||||
@@ -102,7 +102,7 @@ export class TechInsightsClient implements TechInsightsApi {
|
||||
}
|
||||
|
||||
async runBulkChecks(
|
||||
entities: EntityName[],
|
||||
entities: CompoundEntityRef[],
|
||||
checks?: Check[],
|
||||
): Promise<BulkCheckResponse> {
|
||||
const url = await this.discoveryApi.getBaseUrl('tech-insights');
|
||||
|
||||
Reference in New Issue
Block a user