diff --git a/.changeset/lazy-monkeys-worry.md b/.changeset/lazy-monkeys-worry.md new file mode 100644 index 0000000000..2c7e2ba4a2 --- /dev/null +++ b/.changeset/lazy-monkeys-worry.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights': minor +--- + +The Check class now includes the failureMetadata and successMetadata as returned by the runChecks call. diff --git a/plugins/tech-insights/src/api/types.ts b/plugins/tech-insights/src/api/types.ts index ac1f2e44ee..aa073dcbc4 100644 --- a/plugins/tech-insights/src/api/types.ts +++ b/plugins/tech-insights/src/api/types.ts @@ -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; + + /** + * Metadata to be returned in case a check evaluation has ended in failure + * Can contain links, description texts or other actionable items + */ + failureMetadata?: Record; }; /**