Merge pull request #16835 from Symbianx/include-metadata-in-checks-api
Include the failureMetadata and successMetadata in TechInsightsApi
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-tech-insights': patch
|
||||
---
|
||||
|
||||
The `Check` type now optionally includes the `failureMetadata` and `successMetadata` as returned by the `runChecks` call.
|
||||
@@ -27,6 +27,8 @@ export type Check = {
|
||||
name: string;
|
||||
description: string;
|
||||
factIds: string[];
|
||||
successMetadata?: Record<string, unknown>;
|
||||
failureMetadata?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
// @public
|
||||
|
||||
@@ -22,11 +22,48 @@ import { JsonValue } from '@backstage/types';
|
||||
* @public
|
||||
*/
|
||||
export type Check = {
|
||||
/**
|
||||
* Unique identifier of the check
|
||||
*
|
||||
* Used to identify which checks to use when running checks.
|
||||
*/
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* Type identifier for the check.
|
||||
* Can be used to determine storage options, logical routing to correct FactChecker implementation
|
||||
* or to help frontend render correct component types based on this
|
||||
*/
|
||||
type: string;
|
||||
|
||||
/**
|
||||
* Human readable name of the check, may be displayed in the UI
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Human readable description of the check, may be displayed in the UI
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* A collection of string referencing fact rows that a check will be run against.
|
||||
*
|
||||
* References the fact container, aka fact retriever itself which may or may not contain multiple individual facts and values
|
||||
*/
|
||||
factIds: string[];
|
||||
|
||||
/**
|
||||
* Metadata to be returned in case a check has been successfully evaluated
|
||||
* Can contain links, description texts or other actionable items
|
||||
*/
|
||||
successMetadata?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* Metadata to be returned in case a check evaluation has ended in failure
|
||||
* Can contain links, description texts or other actionable items
|
||||
*/
|
||||
failureMetadata?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user