Merge pull request #6076 from backstage/rugvip/allreports
scripts/api-extractor: create and check API reports for all(most) plugins
This commit is contained in:
@@ -0,0 +1,621 @@
|
||||
## API Report File for "@backstage/plugin-cost-insights"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { ApiRef } from '@backstage/core';
|
||||
import { BackstagePalette } from '@backstage/theme';
|
||||
import { BackstagePlugin } from '@backstage/core';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { ContentRenderer } from 'recharts';
|
||||
import { Dispatch } from 'react';
|
||||
import { ForwardRefExoticComponent } from 'react';
|
||||
import { PaletteOptions } from '@material-ui/core/styles/createPalette';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { RechartsFunction } from 'recharts';
|
||||
import { RefAttributes } from 'react';
|
||||
import { RouteRef } from '@backstage/core';
|
||||
import { SetStateAction } from 'react';
|
||||
import { TooltipProps } from 'recharts';
|
||||
import { TypographyProps } from '@material-ui/core';
|
||||
|
||||
// @public
|
||||
export type Alert = {
|
||||
title: string | JSX.Element;
|
||||
subtitle: string | JSX.Element;
|
||||
element?: JSX.Element;
|
||||
status?: AlertStatus;
|
||||
url?: string;
|
||||
buttonText?: string;
|
||||
SnoozeForm?: Maybe<AlertForm>;
|
||||
AcceptForm?: Maybe<AlertForm>;
|
||||
DismissForm?: Maybe<AlertForm>;
|
||||
onSnoozed?(options: AlertOptions): Promise<Alert[]>;
|
||||
onAccepted?(options: AlertOptions): Promise<Alert[]>;
|
||||
onDismissed?(options: AlertOptions): Promise<Alert[]>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface AlertCost {
|
||||
// (undocumented)
|
||||
aggregation: [number, number];
|
||||
// (undocumented)
|
||||
id: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface AlertDismissFormData {
|
||||
// (undocumented)
|
||||
feedback: Maybe<string>;
|
||||
// (undocumented)
|
||||
other: Maybe<string>;
|
||||
// (undocumented)
|
||||
reason: AlertDismissReason;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface AlertDismissOption {
|
||||
// (undocumented)
|
||||
label: string;
|
||||
// (undocumented)
|
||||
reason: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const AlertDismissOptions: AlertDismissOption[];
|
||||
|
||||
// @public (undocumented)
|
||||
export enum AlertDismissReason {
|
||||
// (undocumented)
|
||||
Expected = "expected",
|
||||
// (undocumented)
|
||||
Migration = "migration",
|
||||
// (undocumented)
|
||||
NotApplicable = "not-applicable",
|
||||
// (undocumented)
|
||||
Other = "other",
|
||||
// (undocumented)
|
||||
Resolved = "resolved",
|
||||
// (undocumented)
|
||||
Seasonal = "seasonal"
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type AlertForm<A extends Alert = any, Data = any> = ForwardRefExoticComponent<AlertFormProps<A, Data> & RefAttributes<HTMLFormElement>>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type AlertFormProps<A extends Alert, FormData = {}> = {
|
||||
alert: A;
|
||||
onSubmit: (data: FormData) => void;
|
||||
disableSubmit: (isDisabled: boolean) => void;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface AlertOptions<T = any> {
|
||||
// (undocumented)
|
||||
data: T;
|
||||
// (undocumented)
|
||||
group: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AlertSnoozeFormData {
|
||||
// (undocumented)
|
||||
intervals: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type AlertSnoozeOption = {
|
||||
label: string;
|
||||
duration: Duration;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const AlertSnoozeOptions: AlertSnoozeOption[];
|
||||
|
||||
// @public (undocumented)
|
||||
export enum AlertStatus {
|
||||
// (undocumented)
|
||||
Accepted = "accepted",
|
||||
// (undocumented)
|
||||
Dismissed = "dismissed",
|
||||
// (undocumented)
|
||||
Snoozed = "snoozed"
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const BarChart: ({ resources, responsive, displayAmount, options, tooltip, onClick, onMouseMove, }: BarChartProps) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export interface BarChartData extends BarChartOptions {
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const BarChartLegend: ({ costStart, costEnd, options, children, }: PropsWithChildren<BarChartLegendProps>) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export type BarChartLegendOptions = {
|
||||
previousName: string;
|
||||
previousFill: string;
|
||||
currentName: string;
|
||||
currentFill: string;
|
||||
hideMarker?: boolean;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type BarChartLegendProps = {
|
||||
costStart: number;
|
||||
costEnd: number;
|
||||
options?: Partial<BarChartLegendOptions>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface BarChartOptions {
|
||||
// (undocumented)
|
||||
currentFill: string;
|
||||
// (undocumented)
|
||||
currentName: string;
|
||||
// (undocumented)
|
||||
previousFill: string;
|
||||
// (undocumented)
|
||||
previousName: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type BarChartProps = {
|
||||
resources: ResourceData[];
|
||||
responsive?: boolean;
|
||||
displayAmount?: number;
|
||||
options?: Partial<BarChartData>;
|
||||
tooltip?: ContentRenderer<TooltipProps>;
|
||||
onClick?: RechartsFunction;
|
||||
onMouseMove?: RechartsFunction;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const BarChartTooltip: ({ title, content, subtitle, topRight, actions, children, }: PropsWithChildren<BarChartTooltipProps>) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const BarChartTooltipItem: ({ item }: BarChartTooltipItemProps) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export type BarChartTooltipItemProps = {
|
||||
item: TooltipItem;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type BarChartTooltipProps = {
|
||||
title: string;
|
||||
content?: ReactNode | string;
|
||||
subtitle?: ReactNode;
|
||||
topRight?: ReactNode;
|
||||
actions?: ReactNode;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ChangeStatistic {
|
||||
// (undocumented)
|
||||
amount: number;
|
||||
// (undocumented)
|
||||
ratio?: number;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export enum ChangeThreshold {
|
||||
// (undocumented)
|
||||
lower = -0.05,
|
||||
// (undocumented)
|
||||
upper = 0.05
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type ChartData = {
|
||||
date: number;
|
||||
trend: number;
|
||||
dailyCost: number;
|
||||
[key: string]: number;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface Cost {
|
||||
// (undocumented)
|
||||
aggregation: DateAggregation[];
|
||||
// (undocumented)
|
||||
change?: ChangeStatistic;
|
||||
// (undocumented)
|
||||
groupedCosts?: Record<string, Cost[]>;
|
||||
// (undocumented)
|
||||
id: string;
|
||||
// (undocumented)
|
||||
trendline?: Trendline;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const CostGrowth: ({ change, duration }: CostGrowthProps) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const CostGrowthIndicator: ({ change, formatter, className, ...props }: CostGrowthIndicatorProps) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export type CostGrowthIndicatorProps = TypographyProps & {
|
||||
change: ChangeStatistic;
|
||||
formatter?: (change: ChangeStatistic) => Maybe<string>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type CostGrowthProps = {
|
||||
change: ChangeStatistic;
|
||||
duration: Duration;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type CostInsightsApi = {
|
||||
getLastCompleteBillingDate(): Promise<string>;
|
||||
getUserGroups(userId: string): Promise<Group[]>;
|
||||
getGroupProjects(group: string): Promise<Project[]>;
|
||||
getGroupDailyCost(group: string, intervals: string): Promise<Cost>;
|
||||
getProjectDailyCost(project: string, intervals: string): Promise<Cost>;
|
||||
getDailyMetricData(metric: string, intervals: string): Promise<MetricData>;
|
||||
getProductInsights(options: ProductInsightsOptions): Promise<Entity>;
|
||||
getAlerts(group: string): Promise<Alert[]>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const costInsightsApiRef: ApiRef<CostInsightsApi>;
|
||||
|
||||
// @public (undocumented)
|
||||
export const CostInsightsLabelDataflowInstructionsPage: () => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const CostInsightsPage: () => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export type CostInsightsPalette = BackstagePalette & CostInsightsPaletteAdditions;
|
||||
|
||||
// @public (undocumented)
|
||||
export type CostInsightsPaletteOptions = PaletteOptions & CostInsightsPaletteAdditions;
|
||||
|
||||
// @public (undocumented)
|
||||
const costInsightsPlugin: BackstagePlugin<{
|
||||
root: RouteRef<undefined>;
|
||||
growthAlerts: RouteRef<undefined>;
|
||||
unlabeledDataflowAlerts: RouteRef<undefined>;
|
||||
}, {}>;
|
||||
|
||||
export { costInsightsPlugin }
|
||||
|
||||
export { costInsightsPlugin as plugin }
|
||||
|
||||
// @public (undocumented)
|
||||
export const CostInsightsProjectGrowthInstructionsPage: () => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface CostInsightsTheme extends BackstageTheme {
|
||||
// (undocumented)
|
||||
palette: CostInsightsPalette;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface CostInsightsThemeOptions extends PaletteOptions {
|
||||
// (undocumented)
|
||||
palette: CostInsightsPaletteOptions;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface Currency {
|
||||
// (undocumented)
|
||||
kind: string | null;
|
||||
// (undocumented)
|
||||
label: string;
|
||||
// (undocumented)
|
||||
prefix?: string;
|
||||
// (undocumented)
|
||||
rate?: number;
|
||||
// (undocumented)
|
||||
unit: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export enum CurrencyType {
|
||||
// (undocumented)
|
||||
Beers = "BEERS",
|
||||
// (undocumented)
|
||||
CarbonOffsetTons = "CARBON_OFFSET_TONS",
|
||||
// (undocumented)
|
||||
IceCream = "PINTS_OF_ICE_CREAM",
|
||||
// (undocumented)
|
||||
USD = "USD"
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export enum DataKey {
|
||||
// (undocumented)
|
||||
Current = "current",
|
||||
// (undocumented)
|
||||
Name = "name",
|
||||
// (undocumented)
|
||||
Previous = "previous"
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type DateAggregation = {
|
||||
date: string;
|
||||
amount: number;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const DEFAULT_DATE_FORMAT = "YYYY-MM-DD";
|
||||
|
||||
// @public
|
||||
export enum Duration {
|
||||
// (undocumented)
|
||||
P30D = "P30D",
|
||||
// (undocumented)
|
||||
P3M = "P3M",
|
||||
// (undocumented)
|
||||
P7D = "P7D",
|
||||
// (undocumented)
|
||||
P90D = "P90D"
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const EngineerThreshold = 0.5;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface Entity {
|
||||
// (undocumented)
|
||||
aggregation: [number, number];
|
||||
// (undocumented)
|
||||
change: ChangeStatistic;
|
||||
// (undocumented)
|
||||
entities: Record<string, Entity[]>;
|
||||
// (undocumented)
|
||||
id: Maybe<string>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class ExampleCostInsightsClient implements CostInsightsApi {
|
||||
// (undocumented)
|
||||
getAlerts(group: string): Promise<Alert[]>;
|
||||
// (undocumented)
|
||||
getDailyMetricData(metric: string, intervals: string): Promise<MetricData>;
|
||||
// (undocumented)
|
||||
getGroupDailyCost(group: string, intervals: string): Promise<Cost>;
|
||||
// (undocumented)
|
||||
getGroupProjects(group: string): Promise<Project[]>;
|
||||
// (undocumented)
|
||||
getLastCompleteBillingDate(): Promise<string>;
|
||||
// (undocumented)
|
||||
getProductInsights(options: ProductInsightsOptions): Promise<Entity>;
|
||||
// (undocumented)
|
||||
getProjectDailyCost(project: string, intervals: string): Promise<Cost>;
|
||||
// (undocumented)
|
||||
getUserGroups(userId: string): Promise<Group[]>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type Group = {
|
||||
id: string;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export enum GrowthType {
|
||||
// (undocumented)
|
||||
Excess = 2,
|
||||
// (undocumented)
|
||||
Negligible = 0,
|
||||
// (undocumented)
|
||||
Savings = 1
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type Icon = {
|
||||
kind: string;
|
||||
component: JSX.Element;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export enum IconType {
|
||||
// (undocumented)
|
||||
Compute = "compute",
|
||||
// (undocumented)
|
||||
Data = "data",
|
||||
// (undocumented)
|
||||
Database = "database",
|
||||
// (undocumented)
|
||||
ML = "ml",
|
||||
// (undocumented)
|
||||
Search = "search",
|
||||
// (undocumented)
|
||||
Storage = "storage"
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const LegendItem: ({ title, tooltipText, markerColor, children, }: PropsWithChildren<LegendItemProps>) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export type LegendItemProps = {
|
||||
title: string;
|
||||
tooltipText?: string;
|
||||
markerColor?: string;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type Loading = Record<string, boolean>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type Maybe<T> = T | null;
|
||||
|
||||
// @public (undocumented)
|
||||
export type Metric = {
|
||||
kind: string;
|
||||
name: string;
|
||||
default: boolean;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface MetricData {
|
||||
// (undocumented)
|
||||
aggregation: DateAggregation[];
|
||||
// (undocumented)
|
||||
change: ChangeStatistic;
|
||||
// (undocumented)
|
||||
format: 'number' | 'currency';
|
||||
// (undocumented)
|
||||
id: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const MockConfigProvider: ({ children, ...context }: MockConfigProviderProps) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export const MockCurrencyProvider: ({ children, ...context }: MockCurrencyProviderProps) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface PageFilters {
|
||||
// (undocumented)
|
||||
duration: Duration;
|
||||
// (undocumented)
|
||||
group: Maybe<string>;
|
||||
// (undocumented)
|
||||
metric: string | null;
|
||||
// (undocumented)
|
||||
project: Maybe<string>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface Product {
|
||||
// (undocumented)
|
||||
kind: string;
|
||||
// (undocumented)
|
||||
name: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type ProductFilters = Array<ProductPeriod>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type ProductInsightsOptions = {
|
||||
product: string;
|
||||
group: string;
|
||||
intervals: string;
|
||||
project: Maybe<string>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ProductPeriod {
|
||||
// (undocumented)
|
||||
duration: Duration;
|
||||
// (undocumented)
|
||||
productType: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface Project {
|
||||
// (undocumented)
|
||||
id: string;
|
||||
// (undocumented)
|
||||
name?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class ProjectGrowthAlert implements Alert {
|
||||
constructor(data: ProjectGrowthData);
|
||||
// (undocumented)
|
||||
data: ProjectGrowthData;
|
||||
// (undocumented)
|
||||
get element(): JSX.Element;
|
||||
// (undocumented)
|
||||
get subtitle(): string;
|
||||
// (undocumented)
|
||||
get title(): string;
|
||||
// (undocumented)
|
||||
get url(): string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ProjectGrowthData {
|
||||
// (undocumented)
|
||||
aggregation: [number, number];
|
||||
// (undocumented)
|
||||
change: ChangeStatistic;
|
||||
// (undocumented)
|
||||
periodEnd: string;
|
||||
// (undocumented)
|
||||
periodStart: string;
|
||||
// (undocumented)
|
||||
products: Array<AlertCost>;
|
||||
// (undocumented)
|
||||
project: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ResourceData {
|
||||
// (undocumented)
|
||||
current: number;
|
||||
// (undocumented)
|
||||
name: Maybe<string>;
|
||||
// (undocumented)
|
||||
previous: number;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type TooltipItem = {
|
||||
fill: string;
|
||||
label: string;
|
||||
value: string;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type Trendline = {
|
||||
slope: number;
|
||||
intercept: number;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class UnlabeledDataflowAlert implements Alert {
|
||||
constructor(data: UnlabeledDataflowData);
|
||||
// (undocumented)
|
||||
data: UnlabeledDataflowData;
|
||||
// (undocumented)
|
||||
get element(): JSX.Element;
|
||||
// (undocumented)
|
||||
status?: AlertStatus;
|
||||
// (undocumented)
|
||||
get subtitle(): string;
|
||||
// (undocumented)
|
||||
get title(): string;
|
||||
// (undocumented)
|
||||
get url(): string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface UnlabeledDataflowAlertProject {
|
||||
// (undocumented)
|
||||
id: string;
|
||||
// (undocumented)
|
||||
labeledCost: number;
|
||||
// (undocumented)
|
||||
unlabeledCost: number;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface UnlabeledDataflowData {
|
||||
// (undocumented)
|
||||
labeledCost: number;
|
||||
// (undocumented)
|
||||
periodEnd: string;
|
||||
// (undocumented)
|
||||
periodStart: string;
|
||||
// (undocumented)
|
||||
projects: Array<UnlabeledDataflowAlertProject>;
|
||||
// (undocumented)
|
||||
unlabeledCost: number;
|
||||
}
|
||||
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user