diff --git a/plugins/cicd-statistics/api-report.md b/plugins/cicd-statistics/api-report.md index 1af39b6f0f..c3976084e5 100644 --- a/plugins/cicd-statistics/api-report.md +++ b/plugins/cicd-statistics/api-report.md @@ -58,7 +58,7 @@ export interface CicdDefaults { // (undocumented) filterStatus: Array; // (undocumented) - filterType: FilterBranchType<'all'>; + filterType: FilterBranchType | 'all'; lowercaseNames: boolean; normalizeTimeRange: boolean; // (undocumented) @@ -117,9 +117,9 @@ export interface FetchBuildsOptions { // (undocumented) entity: Entity; // (undocumented) - filterStatus: Array>; + filterStatus: Array; // (undocumented) - filterType: FilterBranchType<'all'>; + filterType: FilterBranchType | 'all'; // (undocumented) timeFrom: Date; // (undocumented) @@ -131,16 +131,12 @@ export interface FetchBuildsOptions { // Warning: (ae-missing-release-tag) "FilterBranchType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export type FilterBranchType = - | Extra - | 'master' - | 'branch'; +export type FilterBranchType = 'master' | 'branch'; // Warning: (ae-missing-release-tag) "FilterStatusType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export type FilterStatusType = - | Extra +export type FilterStatusType = | 'unknown' | 'enqueued' | 'scheduled' diff --git a/plugins/cicd-statistics/src/apis/types.ts b/plugins/cicd-statistics/src/apis/types.ts index 6bfc21008d..5392657a64 100644 --- a/plugins/cicd-statistics/src/apis/types.ts +++ b/plugins/cicd-statistics/src/apis/types.ts @@ -22,8 +22,7 @@ import { Entity } from '@backstage/catalog-model'; * If all of these aren't applicable to the underlying CI/CD, these can be * configured to be hidden, using the `availableStatuses` in `CicdConfiguration`. */ -export type FilterStatusType = - | Extra +export type FilterStatusType = | 'unknown' | 'enqueued' | 'scheduled' @@ -52,10 +51,7 @@ export const statusTypes: Array = [ * something like 'release' or 'main' or 'trunk' in the underlying CI/CD system, * which is then up to the Api to map accordingly. */ -export type FilterBranchType = - | Extra - | 'master' - | 'branch'; +export type FilterBranchType = 'master' | 'branch'; export const branchTypes: Array = ['master', 'branch']; /** @@ -122,7 +118,7 @@ export interface CicdDefaults { timeFrom: Date; timeTo: Date; filterStatus: Array; - filterType: FilterBranchType<'all'>; + filterType: FilterBranchType | 'all'; /** Lower-case all stage names (to potentially merge stages with different cases) */ lowercaseNames: boolean; @@ -219,8 +215,8 @@ export interface FetchBuildsOptions { abortSignal: AbortSignal; timeFrom: Date; timeTo: Date; - filterStatus: Array>; - filterType: FilterBranchType<'all'>; + filterStatus: Array; + filterType: FilterBranchType | 'all'; } /** diff --git a/plugins/cicd-statistics/src/components/chart-filters.tsx b/plugins/cicd-statistics/src/components/chart-filters.tsx index a6e2b9ede3..a27fb58cf8 100644 --- a/plugins/cicd-statistics/src/components/chart-filters.tsx +++ b/plugins/cicd-statistics/src/components/chart-filters.tsx @@ -74,7 +74,7 @@ const useStyles = makeStyles( }, ); -export type BranchSelection = FilterBranchType<'all'>; +export type BranchSelection = FilterBranchType | 'all'; export type StatusSelection = FilterStatusType; export interface ChartFilter { diff --git a/plugins/cicd-statistics/src/hooks/use-cicd-statistics.ts b/plugins/cicd-statistics/src/hooks/use-cicd-statistics.ts index 645af9900b..bf3558b7dc 100644 --- a/plugins/cicd-statistics/src/hooks/use-cicd-statistics.ts +++ b/plugins/cicd-statistics/src/hooks/use-cicd-statistics.ts @@ -33,8 +33,8 @@ export interface UseCicdStatisticsOptions { abortController: AbortController; timeFrom: Date; timeTo: Date; - filterStatus: Array>; - filterType: FilterBranchType<'all'>; + filterStatus: Array; + filterType: FilterBranchType | 'all'; } export function useCicdStatistics(