@emeryld/rrroutes-openapi 2.4.7 → 2.4.9
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.
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { CacheKeyInsight, CacheTagInsight } from '../../../types/types.cacheLog.js';
|
|
2
|
-
/**
|
|
3
|
-
* Legacy tag stat type – kept for backwards compatibility for callers
|
|
4
|
-
* that still want to pass pre-aggregated tag stats.
|
|
5
|
-
*/
|
|
6
2
|
export interface CacheTagStat {
|
|
7
3
|
tag: string;
|
|
8
4
|
hits: number;
|
|
@@ -14,11 +10,6 @@ export interface CacheTagStat {
|
|
|
14
10
|
missRate: number;
|
|
15
11
|
avgMissDurationMs: number | null;
|
|
16
12
|
}
|
|
17
|
-
/**
|
|
18
|
-
* Normalized insight datum used by the generic chart component.
|
|
19
|
-
* Newer metrics from the /cache/insights endpoint are included as
|
|
20
|
-
* optional fields.
|
|
21
|
-
*/
|
|
22
13
|
export type CacheInsightDatum = {
|
|
23
14
|
id: string;
|
|
24
15
|
label: string;
|
|
@@ -40,26 +31,13 @@ export type CacheInsightsProps = {
|
|
|
40
31
|
tagStats?: CacheInsightDatum[];
|
|
41
32
|
keyStats?: CacheInsightDatum[];
|
|
42
33
|
defaultDimension?: Dimension;
|
|
34
|
+
onVisibleChange?: (ids: string[]) => void;
|
|
43
35
|
};
|
|
44
|
-
|
|
45
|
-
* General, reusable cache insights chart.
|
|
46
|
-
* Can show stats aggregated by tag and/or by key.
|
|
47
|
-
*/
|
|
48
|
-
export declare function CacheInsights({ tagStats, keyStats, defaultDimension, }: CacheInsightsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
49
|
-
/**
|
|
50
|
-
* Backwards-compatible wrapper: behaves like the old CacheTagInsights,
|
|
51
|
-
* but now uses the generalized CacheInsights internally.
|
|
52
|
-
*/
|
|
36
|
+
export declare function CacheInsights({ tagStats, keyStats, defaultDimension, onVisibleChange, }: CacheInsightsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
53
37
|
type CacheTagInsightsProps = {
|
|
54
38
|
stats: CacheTagStat[];
|
|
55
39
|
};
|
|
56
40
|
export declare const CacheTagInsights: ({ stats }: CacheTagInsightsProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
|
-
/**
|
|
58
|
-
* Map server-provided key insights into chart data.
|
|
59
|
-
*/
|
|
60
41
|
export declare function mapKeyInsightsToChartData(keys: CacheKeyInsight[]): CacheInsightDatum[];
|
|
61
|
-
/**
|
|
62
|
-
* Map server-provided tag insights into chart data.
|
|
63
|
-
*/
|
|
64
42
|
export declare function mapTagInsightsToChartData(tags: CacheTagInsight[]): CacheInsightDatum[];
|
|
65
43
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ChartSelectionHook = {
|
|
2
|
+
selectedIds: string[];
|
|
3
|
+
hasSelection: boolean;
|
|
4
|
+
setSelection: (ids: string[]) => void;
|
|
5
|
+
toggle: (id: string) => void;
|
|
6
|
+
clear: () => void;
|
|
7
|
+
isSelected: (id: string) => boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Simple reusable hook for managing a set of selected ids
|
|
11
|
+
* used by cache insights charts and tables.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useChartSelection(): ChartSelectionHook;
|