feat(tech-inights): adds getFactSchemas method to client
Signed-off-by: Fernando.Teixeira <fernando.Teixeira@traderev.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import { createApiRef } from '@backstage/core-plugin-api';
|
||||
import {
|
||||
CheckResult,
|
||||
BulkCheckResponse,
|
||||
FactSchema,
|
||||
} from '@backstage/plugin-tech-insights-common';
|
||||
import { Check, InsightFacts } from './types';
|
||||
import { CheckResultRenderer } from '../components/CheckResultRenderer';
|
||||
@@ -49,4 +50,5 @@ export interface TechInsightsApi {
|
||||
checks?: Check[],
|
||||
): Promise<BulkCheckResponse>;
|
||||
getFacts(entity: CompoundEntityRef, facts: string[]): Promise<InsightFacts>;
|
||||
getFactSchemas(): Promise<FactSchema[]>;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import { TechInsightsApi } from './TechInsightsApi';
|
||||
import {
|
||||
BulkCheckResponse,
|
||||
CheckResult,
|
||||
FactSchema,
|
||||
} from '@backstage/plugin-tech-insights-common';
|
||||
import { Check, InsightFacts } from './types';
|
||||
import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';
|
||||
@@ -69,6 +70,10 @@ export class TechInsightsClient implements TechInsightsApi {
|
||||
return this.api('/checks');
|
||||
}
|
||||
|
||||
async getFactSchemas(): Promise<FactSchema[]> {
|
||||
return this.api('/fact-schemas');
|
||||
}
|
||||
|
||||
async runChecks(
|
||||
entityParams: CompoundEntityRef,
|
||||
checks?: string[],
|
||||
|
||||
Reference in New Issue
Block a user