@backstage-community/plugin-cost-insights 0.12.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,655 @@
1
+ /// <reference types="react" />
2
+ import * as React from 'react';
3
+ import React__default, { ForwardRefExoticComponent, RefAttributes, ReactNode, PropsWithChildren, Dispatch, SetStateAction } from 'react';
4
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
5
+ import * as common from '@backstage-community/plugin-cost-insights-common';
6
+ import { Maybe as Maybe$1, ChangeStatistic as ChangeStatistic$1, Group as Group$1, Project as Project$1, Cost as Cost$1, MetricData as MetricData$1, Entity as Entity$1, Metric as Metric$1, Product as Product$1 } from '@backstage-community/plugin-cost-insights-common';
7
+ import { TooltipProps } from 'recharts';
8
+ import { TypographyProps } from '@material-ui/core/Typography';
9
+ import { BackstagePalette, BackstageTheme } from '@backstage/theme';
10
+ import { PaletteOptions } from '@material-ui/core/styles/createPalette';
11
+
12
+ /** @public */
13
+ declare const costInsightsPlugin: _backstage_core_plugin_api.BackstagePlugin<{
14
+ root: _backstage_core_plugin_api.RouteRef<undefined>;
15
+ growthAlerts: _backstage_core_plugin_api.RouteRef<undefined>;
16
+ unlabeledDataflowAlerts: _backstage_core_plugin_api.RouteRef<undefined>;
17
+ }, {}, {}>;
18
+ /** @public */
19
+ declare const CostInsightsPage: () => React.JSX.Element;
20
+ /**
21
+ * An extension for displaying costs on an entity page.
22
+ *
23
+ * @public
24
+ */
25
+ declare const EntityCostInsightsContent: () => React.JSX.Element;
26
+ /** @public */
27
+ declare const CostInsightsProjectGrowthInstructionsPage: () => React.JSX.Element;
28
+ /** @public */
29
+ declare const CostInsightsLabelDataflowInstructionsPage: () => React.JSX.Element;
30
+
31
+ /**
32
+ * Time periods for cost comparison; slight abuse of ISO 8601 periods. We take P3M to mean
33
+ * 'last completed quarter', and P30D/P90D to be '[month|quarter] relative to today'. So if
34
+ * it's September 15, P3M represents costs for Q2 and P30D represents August 16 -
35
+ * September 15.
36
+ *
37
+ * @public
38
+ */
39
+ declare enum Duration {
40
+ P7D = "P7D",
41
+ P30D = "P30D",
42
+ P90D = "P90D",
43
+ P3M = "P3M"
44
+ }
45
+
46
+ /**
47
+ * Generic alert type with required fields for display. The `element` field will be rendered in
48
+ * the Cost Insights "Action Items" section. This should use data fetched in the CostInsightsApi
49
+ * implementation to render an InfoCard or other visualization.
50
+ *
51
+ * The alert type exposes hooks which can be used to enable and access various events,
52
+ * such as when a user dismisses or snoozes an alert. Default forms and buttons
53
+ * will be rendered if a hook is defined.
54
+ *
55
+ * Each default form can be overridden with a custom component. It must be implemented using
56
+ * React.forwardRef. See https://reactjs.org/docs/forwarding-refs
57
+ *
58
+ * Errors thrown within hooks will generate a snackbar error notification.
59
+ *
60
+ * @public
61
+ */
62
+ type Alert = {
63
+ title: string | JSX.Element;
64
+ subtitle: string | JSX.Element;
65
+ element?: JSX.Element;
66
+ status?: AlertStatus;
67
+ url?: string;
68
+ buttonText?: string;
69
+ SnoozeForm?: Maybe$1<AlertForm>;
70
+ AcceptForm?: Maybe$1<AlertForm>;
71
+ DismissForm?: Maybe$1<AlertForm>;
72
+ onSnoozed?(options: AlertOptions): Promise<Alert[]>;
73
+ onAccepted?(options: AlertOptions): Promise<Alert[]>;
74
+ onDismissed?(options: AlertOptions): Promise<Alert[]>;
75
+ };
76
+ /** @public */
77
+ type AlertForm<A extends Alert = any, Data = any> = ForwardRefExoticComponent<AlertFormProps<A, Data> & RefAttributes<HTMLFormElement>>;
78
+ /** @public */
79
+ interface AlertOptions<T = any> {
80
+ data: T;
81
+ group: string;
82
+ }
83
+ /**
84
+ * Default snooze form intervals are expressed using an ISO 8601 repeating interval string.
85
+ * For example, R1/P7D/2020-09-02 for 1 week or R1/P30D/2020-09-02 for 1 month.
86
+ *
87
+ * For example, if a user dismisses an alert on Monday January 01 for 1 week,
88
+ * it can be re-served on Monday, January 08. 7 calendar days from January 02,
89
+ * inclusive of the last day.
90
+ *
91
+ * https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals
92
+ *
93
+ * @public
94
+ */
95
+ interface AlertSnoozeFormData {
96
+ intervals: string;
97
+ }
98
+ /** @public */
99
+ interface AlertDismissFormData {
100
+ other: Maybe$1<string>;
101
+ reason: AlertDismissReason;
102
+ feedback: Maybe$1<string>;
103
+ }
104
+ /** @public */
105
+ declare enum AlertStatus {
106
+ Snoozed = "snoozed",
107
+ Accepted = "accepted",
108
+ Dismissed = "dismissed"
109
+ }
110
+ /** @public */
111
+ type AlertFormProps<A extends Alert, FormData = {}> = {
112
+ alert: A;
113
+ onSubmit: (data: FormData) => void;
114
+ disableSubmit: (isDisabled: boolean) => void;
115
+ };
116
+ /** @public */
117
+ interface AlertDismissOption {
118
+ label: string;
119
+ reason: string;
120
+ }
121
+ /** @public */
122
+ declare enum AlertDismissReason {
123
+ Other = "other",
124
+ Resolved = "resolved",
125
+ Expected = "expected",
126
+ Seasonal = "seasonal",
127
+ Migration = "migration",
128
+ NotApplicable = "not-applicable"
129
+ }
130
+ /** @public */
131
+ declare const AlertDismissOptions: AlertDismissOption[];
132
+ /** @public */
133
+ type AlertSnoozeOption = {
134
+ label: string;
135
+ duration: Duration;
136
+ };
137
+ /** @public */
138
+ declare const AlertSnoozeOptions: AlertSnoozeOption[];
139
+ /** @public */
140
+ interface AlertCost {
141
+ id: string;
142
+ aggregation: [number, number];
143
+ }
144
+ /** @public */
145
+ interface ResourceData {
146
+ previous: number;
147
+ current: number;
148
+ name: Maybe$1<string>;
149
+ }
150
+ /** @public */
151
+ interface BarChartOptions {
152
+ previousFill: string;
153
+ currentFill: string;
154
+ previousName: string;
155
+ currentName: string;
156
+ }
157
+ /**
158
+ * @public
159
+ * @deprecated use BarChartOptions instead
160
+ */
161
+ interface BarChartData extends BarChartOptions {
162
+ }
163
+ /** @public */
164
+ declare enum DataKey {
165
+ Previous = "previous",
166
+ Current = "current",
167
+ Name = "name"
168
+ }
169
+ /** @public */
170
+ interface ProjectGrowthData {
171
+ project: string;
172
+ periodStart: string;
173
+ periodEnd: string;
174
+ aggregation: [number, number];
175
+ change: ChangeStatistic$1;
176
+ products: Array<AlertCost>;
177
+ }
178
+ /** @public */
179
+ interface UnlabeledDataflowData {
180
+ periodStart: string;
181
+ periodEnd: string;
182
+ projects: Array<UnlabeledDataflowAlertProject>;
183
+ unlabeledCost: number;
184
+ labeledCost: number;
185
+ }
186
+ /** @public */
187
+ interface UnlabeledDataflowAlertProject {
188
+ id: string;
189
+ unlabeledCost: number;
190
+ labeledCost: number;
191
+ }
192
+
193
+ /** @public */
194
+ declare const EngineerThreshold = 0.5;
195
+ /** @public */
196
+ declare enum ChangeThreshold {
197
+ upper = 0.05,
198
+ lower = -0.05
199
+ }
200
+ /** @public */
201
+ declare enum GrowthType {
202
+ Negligible = 0,
203
+ Savings = 1,
204
+ Excess = 2
205
+ }
206
+
207
+ /**
208
+ * @public
209
+ */
210
+ type ChartData = {
211
+ date: number;
212
+ trend: number;
213
+ dailyCost: number;
214
+ [key: string]: number;
215
+ };
216
+
217
+ /**
218
+ * @public
219
+ */
220
+ interface Currency {
221
+ kind: string | null;
222
+ label: string;
223
+ unit: string;
224
+ prefix?: string;
225
+ rate?: number;
226
+ }
227
+
228
+ /** @public */
229
+ declare enum CurrencyType {
230
+ USD = "USD",
231
+ CarbonOffsetTons = "CARBON_OFFSET_TONS",
232
+ Beers = "BEERS",
233
+ IceCream = "PINTS_OF_ICE_CREAM"
234
+ }
235
+
236
+ /** @public */
237
+ declare const DEFAULT_DATE_FORMAT = "yyyy-LL-dd";
238
+
239
+ /**
240
+ * @public
241
+ */
242
+ interface PageFilters {
243
+ group: Maybe$1<string>;
244
+ project: Maybe$1<string>;
245
+ duration: Duration;
246
+ metric: string | null;
247
+ }
248
+ /**
249
+ * @public
250
+ */
251
+ type ProductFilters = Array<ProductPeriod>;
252
+ /**
253
+ * @public
254
+ */
255
+ interface ProductPeriod {
256
+ duration: Duration;
257
+ productType: string;
258
+ }
259
+
260
+ /** @public */
261
+ type Icon = {
262
+ kind: string;
263
+ component: JSX.Element;
264
+ };
265
+ /** @public */
266
+ declare enum IconType {
267
+ Compute = "compute",
268
+ Data = "data",
269
+ Database = "database",
270
+ Storage = "storage",
271
+ Search = "search",
272
+ ML = "ml"
273
+ }
274
+
275
+ /** @public */
276
+ type Loading = Record<string, boolean>;
277
+
278
+ /** @public */
279
+ type CostInsightsTooltipOptions = {
280
+ background: string;
281
+ color: string;
282
+ };
283
+ /** @public */
284
+ type CostInsightsPaletteAdditions = {
285
+ blue: string;
286
+ lightBlue: string;
287
+ darkBlue: string;
288
+ magenta: string;
289
+ yellow: string;
290
+ tooltip: CostInsightsTooltipOptions;
291
+ navigationText: string;
292
+ alertBackground: string;
293
+ dataViz: string[];
294
+ };
295
+ /** @public */
296
+ type CostInsightsPalette = BackstagePalette & CostInsightsPaletteAdditions;
297
+ /** @public */
298
+ type CostInsightsPaletteOptions = PaletteOptions & CostInsightsPaletteAdditions;
299
+ /** @public */
300
+ interface CostInsightsThemeOptions extends PaletteOptions {
301
+ palette: CostInsightsPaletteOptions;
302
+ }
303
+ /** @public */
304
+ interface CostInsightsTheme extends BackstageTheme {
305
+ palette: CostInsightsPalette;
306
+ }
307
+
308
+ /** @public */
309
+ type TooltipRenderer = (props: TooltipProps<string, string>) => ReactNode;
310
+
311
+ /**
312
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
313
+ * @public
314
+ */
315
+ type ChangeStatistic = common.ChangeStatistic;
316
+ /**
317
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
318
+ * @public
319
+ */
320
+ type Cost = common.Cost;
321
+ /**
322
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
323
+ * @public
324
+ */
325
+ type DateAggregation = common.DateAggregation;
326
+ /**
327
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
328
+ * @public
329
+ */
330
+ type Entity = common.Entity;
331
+ /**
332
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
333
+ * @public
334
+ */
335
+ type Group = common.Group;
336
+ /**
337
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
338
+ * @public
339
+ */
340
+ type Maybe<T> = common.Maybe<T>;
341
+ /**
342
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
343
+ * @public
344
+ */
345
+ type Metric = common.Metric;
346
+ /**
347
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
348
+ * @public
349
+ */
350
+ type MetricData = common.MetricData;
351
+ /**
352
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
353
+ * @public
354
+ */
355
+ type Product = common.Product;
356
+ /**
357
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
358
+ * @public
359
+ */
360
+ type Project = common.Project;
361
+ /**
362
+ * @deprecated use the same type from `@backstage-community/plugin-cost-insights-common` instead
363
+ * @public
364
+ */
365
+ type Trendline = common.Trendline;
366
+
367
+ /** @public */
368
+ type ProductInsightsOptions = {
369
+ /**
370
+ * The product from the cost-insights configuration in app-config.yaml
371
+ */
372
+ product: string;
373
+ /**
374
+ * The group id from getUserGroups or query parameters
375
+ */
376
+ group: string;
377
+ /**
378
+ * An ISO 8601 repeating interval string, such as R2/P3M/2020-09-01
379
+ */
380
+ intervals: string;
381
+ /**
382
+ * (optional) The project id from getGroupProjects or query parameters
383
+ */
384
+ project: Maybe$1<string>;
385
+ };
386
+ /** @public */
387
+ type CostInsightsApi = {
388
+ /**
389
+ * Get the most current date for which billing data is complete, in YYYY-MM-DD format. This helps
390
+ * define the intervals used in other API methods to avoid showing incomplete cost. The costs for
391
+ * today, for example, will not be complete. This ideally comes from the cloud provider.
392
+ */
393
+ getLastCompleteBillingDate(): Promise<string>;
394
+ /**
395
+ * Get a list of groups the given user belongs to. These may be LDAP groups or similar
396
+ * organizational groups. Cost Insights is designed to show costs based on group membership;
397
+ * if a user has multiple groups, they are able to switch between groups to see costs for each.
398
+ *
399
+ * This method should be removed once the Backstage identity plugin provides the same concept.
400
+ *
401
+ * @param userId - The login id for the current user
402
+ */
403
+ getUserGroups(userId: string): Promise<Group$1[]>;
404
+ /**
405
+ * Get a list of cloud billing entities that belong to this group (projects in GCP, AWS has a
406
+ * similar concept in billing accounts). These act as filters for the displayed costs, users can
407
+ * choose whether they see all costs for a group, or those from a particular owned project.
408
+ *
409
+ * @param group - The group id from getUserGroups or query parameters
410
+ */
411
+ getGroupProjects(group: string): Promise<Project$1[]>;
412
+ /**
413
+ * Get daily cost aggregations for a given catalog entity and interval time frame.
414
+ *
415
+ * The return type includes an array of daily cost aggregations as well as statistics about the
416
+ * change in cost over the intervals. Calculating these statistics requires us to bucket costs
417
+ * into two or more time periods, hence a repeating interval format rather than just a start and
418
+ * end date.
419
+ *
420
+ * The rate of change in this comparison allows teams to reason about their cost growth (or
421
+ * reduction) and compare it to metrics important to the business.
422
+ *
423
+ * Note: implementing this is only required when using the `EntityCostInsightsContent` extension.
424
+ *
425
+ * @param catalogEntityRef - A reference to the catalog entity, as described in
426
+ * https://backstage.io/docs/features/software-catalog/references
427
+ * @param intervals - An ISO 8601 repeating interval string, such as R2/P30D/2020-09-01
428
+ * https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals
429
+ */
430
+ getCatalogEntityDailyCost?(catalogEntityRef: string, intervals: string): Promise<Cost$1>;
431
+ /**
432
+ * Get daily cost aggregations for a given group and interval time frame.
433
+ *
434
+ * The return type includes an array of daily cost aggregations as well as statistics about the
435
+ * change in cost over the intervals. Calculating these statistics requires us to bucket costs
436
+ * into two or more time periods, hence a repeating interval format rather than just a start and
437
+ * end date.
438
+ *
439
+ * The rate of change in this comparison allows teams to reason about their cost growth (or
440
+ * reduction) and compare it to metrics important to the business.
441
+ *
442
+ * @param group - The group id from getUserGroups or query parameters
443
+ * @param intervals - An ISO 8601 repeating interval string, such as R2/P30D/2020-09-01
444
+ * https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals
445
+ */
446
+ getGroupDailyCost(group: string, intervals: string): Promise<Cost$1>;
447
+ /**
448
+ * Get daily cost aggregations for a given billing entity (project in GCP, AWS has a similar
449
+ * concept in billing accounts) and interval time frame.
450
+ *
451
+ * The return type includes an array of daily cost aggregations as well as statistics about the
452
+ * change in cost over the intervals. Calculating these statistics requires us to bucket costs
453
+ * into two or more time periods, hence a repeating interval format rather than just a start and
454
+ * end date.
455
+ *
456
+ * The rate of change in this comparison allows teams to reason about the project's cost growth
457
+ * (or reduction) and compare it to metrics important to the business.
458
+ *
459
+ * @param project - The project id from getGroupProjects or query parameters
460
+ * @param intervals - An ISO 8601 repeating interval string, such as R2/P30D/2020-09-01
461
+ * https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals
462
+ */
463
+ getProjectDailyCost(project: string, intervals: string): Promise<Cost$1>;
464
+ /**
465
+ * Get aggregations for a particular metric and interval time frame. Teams
466
+ * can see metrics important to their business in comparison to the growth
467
+ * (or reduction) of a project or group's daily costs.
468
+ *
469
+ * @param metric - A metric from the cost-insights configuration in app-config.yaml.
470
+ * @param intervals - An ISO 8601 repeating interval string, such as R2/P30D/2020-09-01
471
+ * https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals
472
+ */
473
+ getDailyMetricData(metric: string, intervals: string): Promise<MetricData$1>;
474
+ /**
475
+ * Get cost aggregations for a particular cloud product and interval time frame. This includes
476
+ * total cost for the product, as well as a breakdown of particular entities that incurred cost
477
+ * in this product. The type of entity depends on the product - it may be deployed services,
478
+ * storage buckets, managed database instances, etc.
479
+ *
480
+ * If project is supplied, this should only return product costs for the given billing entity
481
+ * (project in GCP).
482
+ *
483
+ * The time period is supplied as a Duration rather than intervals, since this is always expected
484
+ * to return data for two bucketed time period (e.g. month vs month, or quarter vs quarter).
485
+ *
486
+ * @param options - Options to use when fetching insights for a particular cloud product and
487
+ * interval time frame.
488
+ */
489
+ getProductInsights(options: ProductInsightsOptions): Promise<Entity$1>;
490
+ /**
491
+ * Get current cost alerts for a given group. These show up as Action Items for the group on the
492
+ * Cost Insights page. Alerts may include cost-saving recommendations, such as infrastructure
493
+ * migrations, or cost-related warnings, such as an unexpected billing anomaly.
494
+ */
495
+ getAlerts(group: string): Promise<Alert[]>;
496
+ };
497
+ /** @public */
498
+ declare const costInsightsApiRef: _backstage_core_plugin_api.ApiRef<CostInsightsApi>;
499
+
500
+ /** @public */
501
+ declare class ExampleCostInsightsClient implements CostInsightsApi {
502
+ private request;
503
+ getLastCompleteBillingDate(): Promise<string>;
504
+ getUserGroups(userId: string): Promise<Group$1[]>;
505
+ getGroupProjects(group: string): Promise<Project$1[]>;
506
+ getDailyMetricData(metric: string, intervals: string): Promise<MetricData$1>;
507
+ getCatalogEntityDailyCost(entityRef: string, intervals: string): Promise<Cost$1>;
508
+ getGroupDailyCost(group: string, intervals: string): Promise<Cost$1>;
509
+ getProjectDailyCost(project: string, intervals: string): Promise<Cost$1>;
510
+ getProductInsights(options: ProductInsightsOptions): Promise<Entity$1>;
511
+ getAlerts(group: string): Promise<Alert[]>;
512
+ }
513
+
514
+ /** @public */
515
+ type BarChartProps = {
516
+ resources: ResourceData[];
517
+ responsive?: boolean;
518
+ displayAmount?: number;
519
+ options?: Partial<BarChartOptions>;
520
+ tooltip?: TooltipRenderer;
521
+ onClick?: (...args: any[]) => void;
522
+ onMouseMove?: (...args: any[]) => void;
523
+ };
524
+ /** @public */
525
+ declare const BarChart: (props: BarChartProps) => React__default.JSX.Element;
526
+
527
+ /** @public */
528
+ type BarChartLegendOptions = {
529
+ previousName: string;
530
+ previousFill: string;
531
+ currentName: string;
532
+ currentFill: string;
533
+ hideMarker?: boolean;
534
+ };
535
+ /** @public */
536
+ type BarChartLegendProps = {
537
+ costStart: number;
538
+ costEnd: number;
539
+ options?: Partial<BarChartLegendOptions>;
540
+ };
541
+ /** @public */
542
+ declare const BarChartLegend: (props: PropsWithChildren<BarChartLegendProps>) => React__default.JSX.Element;
543
+
544
+ /** @public */
545
+ type BarChartTooltipProps = {
546
+ title: string;
547
+ content?: ReactNode | string;
548
+ subtitle?: ReactNode;
549
+ topRight?: ReactNode;
550
+ actions?: ReactNode;
551
+ };
552
+ /** @public */
553
+ declare const BarChartTooltip: (props: PropsWithChildren<BarChartTooltipProps>) => React__default.JSX.Element;
554
+
555
+ /** @public */
556
+ type TooltipItem = {
557
+ fill: string;
558
+ label?: string;
559
+ value?: string;
560
+ };
561
+ /** @public */
562
+ type BarChartTooltipItemProps = {
563
+ item: TooltipItem;
564
+ };
565
+ /** @public */
566
+ declare const BarChartTooltipItem: (props: BarChartTooltipItemProps) => React__default.JSX.Element;
567
+
568
+ /** @public */
569
+ type CostGrowthProps = {
570
+ change: ChangeStatistic$1;
571
+ duration: Duration;
572
+ };
573
+ /** @public */
574
+ declare const CostGrowth: (props: CostGrowthProps) => React__default.JSX.Element;
575
+
576
+ /** @public */
577
+ type CostGrowthIndicatorProps = TypographyProps & {
578
+ change: ChangeStatistic$1;
579
+ formatter?: (change: ChangeStatistic$1, options?: {
580
+ absolute: boolean;
581
+ }) => Maybe$1<string>;
582
+ };
583
+ /** @public */
584
+ declare const CostGrowthIndicator: (props: CostGrowthIndicatorProps) => React__default.JSX.Element;
585
+
586
+ /** @public */
587
+ type LegendItemProps = {
588
+ title: string;
589
+ tooltipText?: string;
590
+ markerColor?: string;
591
+ };
592
+ /** @public */
593
+ declare const LegendItem: (props: PropsWithChildren<LegendItemProps>) => React__default.JSX.Element;
594
+
595
+ /** @public */
596
+ type ConfigContextProps = {
597
+ baseCurrency: Intl.NumberFormat;
598
+ metrics: Metric$1[];
599
+ products: Product$1[];
600
+ icons: Icon[];
601
+ engineerCost: number;
602
+ engineerThreshold: number;
603
+ hideTrendLine: boolean;
604
+ currencies: Currency[];
605
+ };
606
+
607
+ /** @public */
608
+ type CurrencyContextProps = {
609
+ currency: Currency;
610
+ setCurrency: Dispatch<SetStateAction<Currency>>;
611
+ };
612
+
613
+ /** @public */
614
+ type MockConfigProviderProps = PropsWithChildren<Partial<ConfigContextProps>>;
615
+ /** @public */
616
+ declare const MockConfigProvider: (props: MockConfigProviderProps) => React__default.JSX.Element;
617
+ /** @public */
618
+ type MockCurrencyProviderProps = PropsWithChildren<Partial<CurrencyContextProps>>;
619
+ /** @public */
620
+ declare const MockCurrencyProvider: (props: MockCurrencyProviderProps) => React__default.JSX.Element;
621
+
622
+ /**
623
+ * The alert below is an example of an Alert implementation; the CostInsightsApi permits returning
624
+ * any implementation of the Alert type, so adopters can create their own. The CostInsightsApi
625
+ * fetches alert data from the backend, then creates Alert classes with the data.
626
+ *
627
+ * @public
628
+ */
629
+ declare class ProjectGrowthAlert implements Alert {
630
+ data: ProjectGrowthData;
631
+ constructor(data: ProjectGrowthData);
632
+ get url(): string;
633
+ get title(): string;
634
+ get subtitle(): string;
635
+ get element(): React__default.JSX.Element;
636
+ }
637
+
638
+ /**
639
+ * The alert below is an example of an Alert implementation; the CostInsightsApi permits returning
640
+ * any implementation of the Alert type, so adopters can create their own. The CostInsightsApi
641
+ * fetches alert data from the backend, then creates Alert classes with the data.
642
+ *
643
+ * @public
644
+ */
645
+ declare class UnlabeledDataflowAlert implements Alert {
646
+ data: UnlabeledDataflowData;
647
+ status?: AlertStatus;
648
+ constructor(data: UnlabeledDataflowData);
649
+ get url(): string;
650
+ get title(): string;
651
+ get subtitle(): string;
652
+ get element(): React__default.JSX.Element;
653
+ }
654
+
655
+ export { type Alert, type AlertCost, type AlertDismissFormData, type AlertDismissOption, AlertDismissOptions, AlertDismissReason, type AlertForm, type AlertFormProps, type AlertOptions, type AlertSnoozeFormData, type AlertSnoozeOption, AlertSnoozeOptions, AlertStatus, BarChart, type BarChartData, BarChartLegend, type BarChartLegendOptions, type BarChartLegendProps, type BarChartOptions, type BarChartProps, BarChartTooltip, BarChartTooltipItem, type BarChartTooltipItemProps, type BarChartTooltipProps, type ChangeStatistic, ChangeThreshold, type ChartData, type ConfigContextProps, type Cost, CostGrowth, CostGrowthIndicator, type CostGrowthIndicatorProps, type CostGrowthProps, type CostInsightsApi, CostInsightsLabelDataflowInstructionsPage, CostInsightsPage, type CostInsightsPalette, type CostInsightsPaletteAdditions, type CostInsightsPaletteOptions, CostInsightsProjectGrowthInstructionsPage, type CostInsightsTheme, type CostInsightsThemeOptions, type CostInsightsTooltipOptions, type Currency, type CurrencyContextProps, CurrencyType, DEFAULT_DATE_FORMAT, DataKey, type DateAggregation, Duration, EngineerThreshold, type Entity, EntityCostInsightsContent, ExampleCostInsightsClient, type Group, GrowthType, type Icon, IconType, LegendItem, type LegendItemProps, type Loading, type Maybe, type Metric, type MetricData, MockConfigProvider, type MockConfigProviderProps, MockCurrencyProvider, type MockCurrencyProviderProps, type PageFilters, type Product, type ProductFilters, type ProductInsightsOptions, type ProductPeriod, type Project, ProjectGrowthAlert, type ProjectGrowthData, type ResourceData, type TooltipItem, type TooltipRenderer, type Trendline, UnlabeledDataflowAlert, type UnlabeledDataflowAlertProject, type UnlabeledDataflowData, costInsightsApiRef, costInsightsPlugin, costInsightsPlugin as plugin };