@emeryld/rrroutes-openapi 2.4.6 → 2.4.8

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 @@
1
+ export default function ApplicationLogsSection(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { CacheKeyInsight } from '../../../types/types.cacheLog';
2
+ type CacheInsightsKeySectionProps = {
3
+ keys: CacheKeyInsight[];
4
+ };
5
+ export default function CacheInsightsKeySection({ keys, }: CacheInsightsKeySectionProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { CacheLogsFilter } from '../../../types/types.cacheLog';
2
+ type CacheInsightsOverviewProps = {
3
+ filters: CacheLogsFilter;
4
+ };
5
+ export default function CacheInsightsOverview({ filters, }: CacheInsightsOverviewProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { CacheTagInsight } from '../../../types/types.cacheLog';
2
+ type CacheInsightsTagSectionProps = {
3
+ tags: CacheTagInsight[];
4
+ };
5
+ export default function CacheInsightsTagSection({ tags, }: CacheInsightsTagSectionProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,4 +1,4 @@
1
- import type { CacheSummaryType } from '../../types/types.cacheLog.js';
1
+ import type { CacheSummaryType } from '../../../types/types.cacheLog.js';
2
2
  type CacheKeyDetailModalProps = {
3
3
  open: boolean;
4
4
  cacheKey?: string | null;
@@ -0,0 +1 @@
1
+ export default function CacheLogsSection(): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { CacheLogType } from '../../types/types.cacheLog.js';
1
+ import type { CacheLogType } from '../../../types/types.cacheLog.js';
2
2
  type CacheLogsTableProps = {
3
3
  logs: CacheLogType[];
4
4
  };
@@ -1,4 +1,4 @@
1
- import type { CacheLogType, CacheSummaryType } from '../../types/types.cacheLog.js';
1
+ import type { CacheLogType, CacheSummaryType } from '../../../types/types.cacheLog.js';
2
2
  type CacheSummaryTableProps = {
3
3
  items: CacheSummaryType[];
4
4
  logs: CacheLogType[];
@@ -0,0 +1,43 @@
1
+ import type { CacheKeyInsight, CacheTagInsight } from '../../../types/types.cacheLog.js';
2
+ export interface CacheTagStat {
3
+ tag: string;
4
+ hits: number;
5
+ misses: number;
6
+ sets: number;
7
+ totalSizeKB: number;
8
+ totalRequests: number;
9
+ hitRate: number;
10
+ missRate: number;
11
+ avgMissDurationMs: number | null;
12
+ }
13
+ export type CacheInsightDatum = {
14
+ id: string;
15
+ label: string;
16
+ sets: number;
17
+ totalSizeKB: number;
18
+ totalRequests: number;
19
+ hitRate: number;
20
+ missRate: number;
21
+ avgMissDurationMs: number | null;
22
+ hitsSinceLastSet?: number;
23
+ missesSinceLastSet?: number;
24
+ deletesSinceLastSet?: number;
25
+ avgTimeBetweenSetsMs?: number | null;
26
+ avgHitsBetweenSets?: number | null;
27
+ avgMissesBetweenSets?: number | null;
28
+ };
29
+ type Dimension = 'tag' | 'key';
30
+ export type CacheInsightsProps = {
31
+ tagStats?: CacheInsightDatum[];
32
+ keyStats?: CacheInsightDatum[];
33
+ defaultDimension?: Dimension;
34
+ onVisibleChange?: (ids: string[]) => void;
35
+ };
36
+ export declare function CacheInsights({ tagStats, keyStats, defaultDimension, onVisibleChange, }: CacheInsightsProps): import("react/jsx-runtime").JSX.Element | null;
37
+ type CacheTagInsightsProps = {
38
+ stats: CacheTagStat[];
39
+ };
40
+ export declare const CacheTagInsights: ({ stats }: CacheTagInsightsProps) => import("react/jsx-runtime").JSX.Element;
41
+ export declare function mapKeyInsightsToChartData(keys: CacheKeyInsight[]): CacheInsightDatum[];
42
+ export declare function mapTagInsightsToChartData(tags: CacheTagInsight[]): CacheInsightDatum[];
43
+ export {};
@@ -1,4 +1,4 @@
1
- import type { CacheLogType } from '../../types/types.cacheLog.js';
1
+ import type { CacheLogType } from '../../../types/types.cacheLog.js';
2
2
  type CacheValueDialogProps = {
3
3
  log: CacheLogType;
4
4
  onClose: () => void;
@@ -0,0 +1,308 @@
1
+ import { CacheInsightsFilter } from '../types/types.cacheLog';
2
+ export type UseCacheInsightsOptions = CacheInsightsFilter;
3
+ /**
4
+ * Thin wrapper around GET /__rrroutes/cache/insights.
5
+ *
6
+ * Builds the query from the base filter helpers plus keys/groupBy and
7
+ * exposes the standard react-query fields from useLeafEndpoint.
8
+ */
9
+ export declare function useCacheInsights(options: UseCacheInsightsOptions): import("@emeryld/rrroutes-client").QueryUseEndpointResultFor<import("@emeryld/rrroutes-contract").Prettify<{
10
+ readonly method: "get";
11
+ readonly path: "/__rrroutes/cache/insights";
12
+ readonly cfg: Readonly<import("@emeryld/rrroutes-contract").Prettify<Omit<Readonly<import("@emeryld/rrroutes-contract").Prettify<Omit<Readonly<import("@emeryld/rrroutes-contract").Prettify<Omit<Readonly<import("@emeryld/rrroutes-contract").Prettify<Omit<{}, "queryExtensionSchema" | "outputMetaSchema" | "bodySchema" | "querySchema" | "paramsSchema" | "outputSchema" | Exclude<keyof (import("@emeryld/rrroutes-contract").Prettify<Omit<C, "queryExtensionSchema" | "outputMetaSchema"> & {
13
+ queryExtensionSchema: C["queryExtensionSchema"] extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? C["queryExtensionSchema"] : undefined;
14
+ outputMetaSchema: C["outputMetaSchema"] extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? C["outputMetaSchema"] : undefined;
15
+ }> extends infer WithDefaults extends import("@emeryld/rrroutes-contract").MethodCfg ? import("@emeryld/rrroutes-contract").Prettify<import("@emeryld/rrroutes-contract").Prettify<Omit<Omit<import("@emeryld/rrroutes-contract").MethodCfg, "querySchema" | "outputSchema" | "feed">, Exclude<keyof WithDefaults, "querySchema" | "outputSchema" | "feed">> & Omit<WithDefaults, "querySchema" | "outputSchema" | "feed">> & (WithDefaults["feed"] extends true ? (WithDefaults["feed"] extends true ? {
16
+ feed: true;
17
+ } : {
18
+ feed?: boolean;
19
+ }) & import("@emeryld/rrroutes-contract").FeedQueryField<WithDefaults> & import("@emeryld/rrroutes-contract").OutputField<WithDefaults> & (WithDefaults["paramsSchema"] extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? {
20
+ paramsSchema: WithDefaults["paramsSchema"];
21
+ } : {
22
+ paramsSchema: undefined;
23
+ }) : (WithDefaults["feed"] extends true ? {
24
+ feed: true;
25
+ } : {
26
+ feed?: boolean;
27
+ }) & (WithDefaults["querySchema"] extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? {
28
+ querySchema: WithDefaults["querySchema"];
29
+ } : {
30
+ querySchema?: undefined;
31
+ }) & import("@emeryld/rrroutes-contract").OutputField<WithDefaults> & (WithDefaults["paramsSchema"] extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? {
32
+ paramsSchema: WithDefaults["paramsSchema"];
33
+ } : {
34
+ paramsSchema: undefined;
35
+ }))> : never), "outputMetaSchema" | "bodySchema" | "querySchema" | "paramsSchema" | "outputSchema">> & import("@emeryld/rrroutes-contract").Prettify<Omit<import("@emeryld/rrroutes-contract").Prettify<import("@emeryld/rrroutes-contract").Prettify<Omit<Omit<import("@emeryld/rrroutes-contract").MethodCfg, "querySchema" | "outputSchema" | "feed">, "queryExtensionSchema" | "outputMetaSchema"> & Omit<import("@emeryld/rrroutes-contract").Prettify<Omit<{
36
+ outputSchema: import("zod").ZodObject<{
37
+ computedAt: import("zod").ZodNumber;
38
+ windowStart: import("zod").ZodNullable<import("zod").ZodNumber>;
39
+ windowEnd: import("zod").ZodNullable<import("zod").ZodNumber>;
40
+ groupBy: import("zod").ZodEnum<{
41
+ key: "key";
42
+ tag: "tag";
43
+ both: "both";
44
+ }>;
45
+ keys: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
46
+ key: import("zod").ZodString;
47
+ currentSizeBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
48
+ lastSetAt: import("zod").ZodNullable<import("zod").ZodNumber>;
49
+ lastDeleteAt: import("zod").ZodNullable<import("zod").ZodNumber>;
50
+ lastHitAt: import("zod").ZodNullable<import("zod").ZodNumber>;
51
+ lastMissAt: import("zod").ZodNullable<import("zod").ZodNumber>;
52
+ lastActivityAt: import("zod").ZodNullable<import("zod").ZodNumber>;
53
+ totalHits: import("zod").ZodNumber;
54
+ totalMisses: import("zod").ZodNumber;
55
+ totalSets: import("zod").ZodNumber;
56
+ totalDeletes: import("zod").ZodNumber;
57
+ hitsSinceLastSet: import("zod").ZodNumber;
58
+ missesSinceLastSet: import("zod").ZodNumber;
59
+ deletesSinceLastSet: import("zod").ZodNumber;
60
+ avgTimeBetweenSetsMs: import("zod").ZodNullable<import("zod").ZodNumber>;
61
+ avgHitsBetweenSets: import("zod").ZodNullable<import("zod").ZodNumber>;
62
+ avgMissesBetweenSets: import("zod").ZodNullable<import("zod").ZodNumber>;
63
+ hitRate: import("zod").ZodNumber;
64
+ missRate: import("zod").ZodNumber;
65
+ }, import("zod/v4/core").$strip>>>;
66
+ tags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
67
+ tag: import("zod").ZodString;
68
+ approxCurrentSizeBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
69
+ totalHits: import("zod").ZodNumber;
70
+ totalMisses: import("zod").ZodNumber;
71
+ totalSets: import("zod").ZodNumber;
72
+ totalDeletes: import("zod").ZodNumber;
73
+ avgTimeBetweenSetsMs: import("zod").ZodNullable<import("zod").ZodNumber>;
74
+ avgHitsBetweenSets: import("zod").ZodNullable<import("zod").ZodNumber>;
75
+ avgMissesBetweenSets: import("zod").ZodNullable<import("zod").ZodNumber>;
76
+ hitRate: import("zod").ZodNumber;
77
+ missRate: import("zod").ZodNumber;
78
+ }, import("zod/v4/core").$strip>>>;
79
+ }, import("zod/v4/core").$strip>;
80
+ querySchema: import("zod").ZodObject<{
81
+ beforeDate: import("zod").ZodOptional<import("zod").ZodString>;
82
+ afterDate: import("zod").ZodOptional<import("zod").ZodString>;
83
+ orderBy: import("zod").ZodOptional<import("zod").ZodEnum<{
84
+ timestamp: "timestamp";
85
+ duration: "duration";
86
+ level: "level";
87
+ path: "path";
88
+ }>>;
89
+ orderDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
90
+ asc: "asc";
91
+ desc: "desc";
92
+ }>>;
93
+ searchQuery: import("zod").ZodOptional<import("zod").ZodString>;
94
+ groupsInclude: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
95
+ groupsExclude: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
96
+ tagsInclude: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
97
+ tagsExclude: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
98
+ keys: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
99
+ groupBy: import("zod").ZodDefault<import("zod").ZodEnum<{
100
+ key: "key";
101
+ tag: "tag";
102
+ both: "both";
103
+ }>>;
104
+ }, import("zod/v4/core").$strip>;
105
+ }, "queryExtensionSchema" | "outputMetaSchema"> & {
106
+ queryExtensionSchema: undefined;
107
+ outputMetaSchema: undefined;
108
+ }>, "querySchema" | "outputSchema" | "feed">> & {
109
+ feed?: boolean;
110
+ } & {
111
+ querySchema: import("zod").ZodObject<{
112
+ beforeDate: import("zod").ZodOptional<import("zod").ZodString>;
113
+ afterDate: import("zod").ZodOptional<import("zod").ZodString>;
114
+ orderBy: import("zod").ZodOptional<import("zod").ZodEnum<{
115
+ timestamp: "timestamp";
116
+ duration: "duration";
117
+ level: "level";
118
+ path: "path";
119
+ }>>;
120
+ orderDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
121
+ asc: "asc";
122
+ desc: "desc";
123
+ }>>;
124
+ searchQuery: import("zod").ZodOptional<import("zod").ZodString>;
125
+ groupsInclude: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
126
+ groupsExclude: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
127
+ tagsInclude: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
128
+ tagsExclude: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
129
+ keys: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
130
+ groupBy: import("zod").ZodDefault<import("zod").ZodEnum<{
131
+ key: "key";
132
+ tag: "tag";
133
+ both: "both";
134
+ }>>;
135
+ }, import("zod/v4/core").$strip>;
136
+ } & {
137
+ outputSchema: import("zod").ZodObject<{
138
+ out: import("zod").ZodObject<{
139
+ computedAt: import("zod").ZodNumber;
140
+ windowStart: import("zod").ZodNullable<import("zod").ZodNumber>;
141
+ windowEnd: import("zod").ZodNullable<import("zod").ZodNumber>;
142
+ groupBy: import("zod").ZodEnum<{
143
+ key: "key";
144
+ tag: "tag";
145
+ both: "both";
146
+ }>;
147
+ keys: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
148
+ key: import("zod").ZodString;
149
+ currentSizeBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
150
+ lastSetAt: import("zod").ZodNullable<import("zod").ZodNumber>;
151
+ lastDeleteAt: import("zod").ZodNullable<import("zod").ZodNumber>;
152
+ lastHitAt: import("zod").ZodNullable<import("zod").ZodNumber>;
153
+ lastMissAt: import("zod").ZodNullable<import("zod").ZodNumber>;
154
+ lastActivityAt: import("zod").ZodNullable<import("zod").ZodNumber>;
155
+ totalHits: import("zod").ZodNumber;
156
+ totalMisses: import("zod").ZodNumber;
157
+ totalSets: import("zod").ZodNumber;
158
+ totalDeletes: import("zod").ZodNumber;
159
+ hitsSinceLastSet: import("zod").ZodNumber;
160
+ missesSinceLastSet: import("zod").ZodNumber;
161
+ deletesSinceLastSet: import("zod").ZodNumber;
162
+ avgTimeBetweenSetsMs: import("zod").ZodNullable<import("zod").ZodNumber>;
163
+ avgHitsBetweenSets: import("zod").ZodNullable<import("zod").ZodNumber>;
164
+ avgMissesBetweenSets: import("zod").ZodNullable<import("zod").ZodNumber>;
165
+ hitRate: import("zod").ZodNumber;
166
+ missRate: import("zod").ZodNumber;
167
+ }, import("zod/v4/core").$strip>>>;
168
+ tags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
169
+ tag: import("zod").ZodString;
170
+ approxCurrentSizeBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
171
+ totalHits: import("zod").ZodNumber;
172
+ totalMisses: import("zod").ZodNumber;
173
+ totalSets: import("zod").ZodNumber;
174
+ totalDeletes: import("zod").ZodNumber;
175
+ avgTimeBetweenSetsMs: import("zod").ZodNullable<import("zod").ZodNumber>;
176
+ avgHitsBetweenSets: import("zod").ZodNullable<import("zod").ZodNumber>;
177
+ avgMissesBetweenSets: import("zod").ZodNullable<import("zod").ZodNumber>;
178
+ hitRate: import("zod").ZodNumber;
179
+ missRate: import("zod").ZodNumber;
180
+ }, import("zod/v4/core").$strip>>>;
181
+ }, import("zod/v4/core").$strip>;
182
+ meta: import("zod").ZodOptional<import("zod").ZodString>;
183
+ }, import("zod/v4/core").$strip>;
184
+ } & {
185
+ paramsSchema: undefined;
186
+ }>, "outputMetaSchema" | "bodySchema" | "querySchema" | "paramsSchema" | "outputSchema"> & {
187
+ bodySchema: import("@emeryld/rrroutes-contract").RouteSchema<unknown, unknown> | undefined;
188
+ querySchema: import("@emeryld/rrroutes-contract").RouteSchema<{
189
+ groupBy: "key" | "tag" | "both";
190
+ beforeDate?: string | undefined;
191
+ afterDate?: string | undefined;
192
+ orderBy?: "timestamp" | "duration" | "level" | "path" | undefined;
193
+ orderDirection?: "asc" | "desc" | undefined;
194
+ searchQuery?: string | undefined;
195
+ groupsInclude?: string[] | undefined;
196
+ groupsExclude?: string[] | undefined;
197
+ tagsInclude?: string[] | undefined;
198
+ tagsExclude?: string[] | undefined;
199
+ keys?: string[] | undefined;
200
+ }, {
201
+ beforeDate?: string | undefined;
202
+ afterDate?: string | undefined;
203
+ orderBy?: "timestamp" | "duration" | "level" | "path" | undefined;
204
+ orderDirection?: "asc" | "desc" | undefined;
205
+ searchQuery?: string | undefined;
206
+ groupsInclude?: string[] | undefined;
207
+ groupsExclude?: string[] | undefined;
208
+ tagsInclude?: string[] | undefined;
209
+ tagsExclude?: string[] | undefined;
210
+ keys?: string[] | undefined;
211
+ groupBy?: "key" | "tag" | "both" | undefined;
212
+ }>;
213
+ paramsSchema: undefined;
214
+ outputSchema: import("@emeryld/rrroutes-contract").RouteSchema<{
215
+ out: {
216
+ computedAt: number;
217
+ windowStart: number | null;
218
+ windowEnd: number | null;
219
+ groupBy: "key" | "tag" | "both";
220
+ keys?: {
221
+ key: string;
222
+ currentSizeBytes: number | null;
223
+ lastSetAt: number | null;
224
+ lastDeleteAt: number | null;
225
+ lastHitAt: number | null;
226
+ lastMissAt: number | null;
227
+ lastActivityAt: number | null;
228
+ totalHits: number;
229
+ totalMisses: number;
230
+ totalSets: number;
231
+ totalDeletes: number;
232
+ hitsSinceLastSet: number;
233
+ missesSinceLastSet: number;
234
+ deletesSinceLastSet: number;
235
+ avgTimeBetweenSetsMs: number | null;
236
+ avgHitsBetweenSets: number | null;
237
+ avgMissesBetweenSets: number | null;
238
+ hitRate: number;
239
+ missRate: number;
240
+ }[] | undefined;
241
+ tags?: {
242
+ tag: string;
243
+ approxCurrentSizeBytes: number | null;
244
+ totalHits: number;
245
+ totalMisses: number;
246
+ totalSets: number;
247
+ totalDeletes: number;
248
+ avgTimeBetweenSetsMs: number | null;
249
+ avgHitsBetweenSets: number | null;
250
+ avgMissesBetweenSets: number | null;
251
+ hitRate: number;
252
+ missRate: number;
253
+ }[] | undefined;
254
+ };
255
+ meta?: string | undefined;
256
+ }, {
257
+ out: {
258
+ computedAt: number;
259
+ windowStart: number | null;
260
+ windowEnd: number | null;
261
+ groupBy: "key" | "tag" | "both";
262
+ keys?: {
263
+ key: string;
264
+ currentSizeBytes: number | null;
265
+ lastSetAt: number | null;
266
+ lastDeleteAt: number | null;
267
+ lastHitAt: number | null;
268
+ lastMissAt: number | null;
269
+ lastActivityAt: number | null;
270
+ totalHits: number;
271
+ totalMisses: number;
272
+ totalSets: number;
273
+ totalDeletes: number;
274
+ hitsSinceLastSet: number;
275
+ missesSinceLastSet: number;
276
+ deletesSinceLastSet: number;
277
+ avgTimeBetweenSetsMs: number | null;
278
+ avgHitsBetweenSets: number | null;
279
+ avgMissesBetweenSets: number | null;
280
+ hitRate: number;
281
+ missRate: number;
282
+ }[] | undefined;
283
+ tags?: {
284
+ tag: string;
285
+ approxCurrentSizeBytes: number | null;
286
+ totalHits: number;
287
+ totalMisses: number;
288
+ totalSets: number;
289
+ totalDeletes: number;
290
+ avgTimeBetweenSetsMs: number | null;
291
+ avgHitsBetweenSets: number | null;
292
+ avgMissesBetweenSets: number | null;
293
+ hitRate: number;
294
+ missRate: number;
295
+ }[] | undefined;
296
+ };
297
+ meta?: string | undefined;
298
+ }>;
299
+ outputMetaSchema: undefined;
300
+ queryExtensionSchema: undefined;
301
+ }>>>, "paramsSchema"> & {
302
+ paramsSchema: undefined;
303
+ }>>, "paramsSchema"> & {
304
+ paramsSchema: undefined;
305
+ }>>, "paramsSchema"> & {
306
+ paramsSchema: undefined;
307
+ }>>;
308
+ }>>;
@@ -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;