@emeryld/rrroutes-openapi 2.5.18 → 2.5.21

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.
Files changed (65) hide show
  1. package/dist/index.cjs +5 -2
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.mjs +5 -2
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/public/assets/docs.js +95 -97
  6. package/dist/web/v2/components/cache/CacheGroupModal.d.ts +6 -0
  7. package/dist/web/v2/components/cache/CacheGroupsSection.d.ts +1 -0
  8. package/dist/web/v2/components/cache/CacheGroupsTable.d.ts +7 -0
  9. package/dist/web/v2/components/cache/CacheKeyDetailModal.d.ts +6 -0
  10. package/dist/web/v2/components/cache/CacheKeyTimelineChart.d.ts +6 -0
  11. package/dist/web/v2/components/cache/CacheKeysChart.d.ts +6 -0
  12. package/dist/web/v2/components/cache/CacheKeysSection.d.ts +1 -0
  13. package/dist/web/v2/components/cache/CacheLink.d.ts +8 -0
  14. package/dist/web/v2/components/cache/CacheTraceDetailModal.d.ts +6 -0
  15. package/dist/web/v2/components/cache/CacheTraceSection.d.ts +1 -0
  16. package/dist/web/v2/components/cache/cacheInsightsUtils.d.ts +54 -0
  17. package/dist/web/v2/components/cache/cacheStateUtils.d.ts +9 -0
  18. package/dist/web/v2/components/cache/cacheUtils.d.ts +33 -0
  19. package/dist/web/v2/components/endpoints/EndpointDetailPanel.d.ts +3 -5
  20. package/dist/web/v2/components/feedback/EmptyState.d.ts +1 -2
  21. package/dist/web/v2/components/feedback/ErrorState.d.ts +1 -2
  22. package/dist/web/v2/components/feedback/LoadingState.d.ts +1 -2
  23. package/dist/web/v2/components/feedback/StateHandler.d.ts +13 -0
  24. package/dist/web/v2/components/feeds/FeedPagination.d.ts +4 -6
  25. package/dist/web/v2/components/feeds/FeedSortableTable.d.ts +30 -0
  26. package/dist/web/v2/components/feeds/tableColumns.d.ts +12 -0
  27. package/dist/web/v2/components/filters/BaseFilterBar.d.ts +4 -4
  28. package/dist/web/v2/components/filters/OptionPicker.d.ts +9 -0
  29. package/dist/web/v2/components/history/BucketRequestsModal.d.ts +6 -0
  30. package/dist/web/v2/components/history/RequestDetailContent.d.ts +1 -7
  31. package/dist/web/v2/components/history/RequestDetailModal.d.ts +2 -6
  32. package/dist/web/v2/components/layout/CardSection.d.ts +3 -2
  33. package/dist/web/v2/components/layout/TabbedPage.d.ts +8 -0
  34. package/dist/web/v2/components/logs/LogGroupDetailModal.d.ts +3 -6
  35. package/dist/web/v2/components/primitives/SortableTable.d.ts +23 -0
  36. package/dist/web/v2/components/primitives/TableCells.d.ts +10 -0
  37. package/dist/web/v2/components/registries/RegistryListEditor.d.ts +21 -0
  38. package/dist/web/v2/components/requests/timeline/RequestTimeline.d.ts +2 -10
  39. package/dist/web/v2/components/requests/timeline/RequestTimelineFilters.d.ts +9 -3
  40. package/dist/web/v2/components/requests/timeline/RequestTimelineRow.d.ts +1 -8
  41. package/dist/web/v2/components/schema/SchemaTreeView.d.ts +1 -1
  42. package/dist/web/v2/components/sockets/SocketEventDetailModal.d.ts +1 -4
  43. package/dist/web/v2/components/stats/ChartRow.d.ts +12 -0
  44. package/dist/web/v2/components/stats/SummaryStats.d.ts +10 -0
  45. package/dist/web/v2/components/tags/CacheOperationChip.d.ts +5 -2
  46. package/dist/web/v2/components/tags/CacheStateChip.d.ts +7 -0
  47. package/dist/web/v2/components/tags/LogLevelChip.d.ts +2 -1
  48. package/dist/web/v2/hooks/useInfiniteItems.d.ts +16 -0
  49. package/dist/web/v2/hooks/useOptions.d.ts +6 -0
  50. package/dist/web/v2/hooks/useQueryState.d.ts +1 -7
  51. package/dist/web/v2/pages/CacheLogsPage.d.ts +1 -0
  52. package/dist/web/v2/pages/SettingsPage.d.ts +1 -0
  53. package/dist/web/v2/registries/genericRegistry.d.ts +14 -0
  54. package/dist/web/v2/registries/optionRegistries.d.ts +12 -0
  55. package/dist/web/v2/stores/modalStore.d.ts +41 -0
  56. package/dist/web/v2/types/types.cacheLog.d.ts +6 -0
  57. package/dist/web/v2/types/types.requestLog.d.ts +22 -0
  58. package/dist/web/v2/utils/dates.d.ts +1 -0
  59. package/package.json +6 -6
  60. package/dist/web/v2/components/endpoints/EndpointVolumeChart.d.ts +0 -8
  61. package/dist/web/v2/components/history/RequestTable.d.ts +0 -7
  62. package/dist/web/v2/components/logs/LogsTable.d.ts +0 -7
  63. package/dist/web/v2/components/requests/timeline/RequestTimelineEventMiniCard.d.ts +0 -13
  64. package/dist/web/v2/components/sockets/SocketEventsTable.d.ts +0 -8
  65. package/dist/web/v2/registries/logLevelRegistry.d.ts +0 -27
@@ -0,0 +1,6 @@
1
+ import { Registry } from '../registries/genericRegistry';
2
+ export type SetOption<T, O> = (item: T) => O[] | O | undefined;
3
+ export type OptionKey<O> = (option: O) => string | number;
4
+ export declare function useOptions<T, O>(items: T[], getOption: SetOption<T, O>, optionKey?: OptionKey<O>): O[];
5
+ export declare function useRegistryOptions<T, O>(items: T[], getOption: SetOption<T, O>, registry: Registry<O[]>, optionKey?: OptionKey<O>): O[];
6
+ export declare function getRandomColorFromString(input: string): string;
@@ -1,7 +1 @@
1
- type UseQueryStateOptions<T> = {
2
- defaultValue: T;
3
- serialize?: (value: T) => string | null;
4
- deserialize?: (value: string) => T;
5
- };
6
- export declare function useQueryState<T>(key: string, options: UseQueryStateOptions<T>): [T, (next: T | ((prev: T) => T)) => void];
7
- export {};
1
+ export declare function useQueryState<T extends Record<string, any>>(key: string, defaultValue: T): [T, (next: T | ((prev: T) => T)) => void];
@@ -0,0 +1 @@
1
+ export default function CacheLogsPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function SettingsPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export type RegistryConfig<T> = {
2
+ storageKey: string;
3
+ version?: number;
4
+ initialState: T;
5
+ /** Optional migration or validation logic after loading from storage */
6
+ onLoad?: (stored: T) => T;
7
+ };
8
+ export type Registry<T> = {
9
+ getState: () => T;
10
+ setState: (updater: ((prev: T) => T) | T, persistChange?: boolean) => void;
11
+ subscribe: (listener: () => void) => () => void;
12
+ useRegistry: <R = T>(selector?: (state: T) => R) => R;
13
+ };
14
+ export declare function createRegistry<T>(config: RegistryConfig<T>): Registry<T>;
@@ -0,0 +1,12 @@
1
+ export declare const statusRegistry: import("./genericRegistry").Registry<number[]>;
2
+ export declare const endpointRegistry: import("./genericRegistry").Registry<{
3
+ encodedId: string;
4
+ path: string;
5
+ method: string;
6
+ displayId: string;
7
+ }[]>;
8
+ export declare const levelRegistry: import("./genericRegistry").Registry<{
9
+ color: string;
10
+ value: string;
11
+ }[]>;
12
+ export declare const endpointTagRegistry: import("./genericRegistry").Registry<string[]>;
@@ -0,0 +1,41 @@
1
+ import { ReactNode } from 'react';
2
+ import type { MethodType } from '../types/types.base.js';
3
+ import type { CacheTraceType } from '../types/types.cacheLog.js';
4
+ import type { LogType } from '../types/types.log.js';
5
+ import type { SocketEventType } from '../types/types.socket.js';
6
+ export type BucketRequestSummary = {
7
+ id: string;
8
+ method: MethodType;
9
+ path: string;
10
+ status: number;
11
+ durationMs: number;
12
+ createdAt: number;
13
+ requestSize?: number;
14
+ responseSize?: number;
15
+ };
16
+ export type BucketRequestsPayload = {
17
+ label: string;
18
+ requests: BucketRequestSummary[];
19
+ };
20
+ type ModalContextValue = {
21
+ openRequestDetail: (args: {
22
+ requestId: string;
23
+ allowReplay?: boolean;
24
+ }) => void;
25
+ openLogGroupDetail: (args: {
26
+ groupId?: string;
27
+ baseQuery: Record<string, unknown>;
28
+ triggerLog?: LogType;
29
+ }) => void;
30
+ openSocketEventDetail: (event: SocketEventType) => void;
31
+ openCacheGroup: (groupId: string) => void;
32
+ openCacheKeyDetail: (cacheKey: string) => void;
33
+ openCacheTraceDetail: (trace: CacheTraceType) => void;
34
+ openBucketRequests: (bucket: BucketRequestsPayload) => void;
35
+ closeModal: () => void;
36
+ };
37
+ export declare function ModalProvider({ children }: {
38
+ children: ReactNode;
39
+ }): import("react/jsx-runtime").JSX.Element;
40
+ export declare function useModal(): ModalContextValue;
41
+ export {};
@@ -6,6 +6,7 @@ export declare const cacheLogSchema: z.ZodObject<{
6
6
  id: z.ZodString;
7
7
  name: z.ZodString;
8
8
  description: z.ZodOptional<z.ZodString>;
9
+ groupId: z.ZodOptional<z.ZodString>;
9
10
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
11
  createdAt: z.ZodNumber;
11
12
  updatedAt: z.ZodNumber;
@@ -110,6 +111,7 @@ export declare const cacheLeaves: readonly [{
110
111
  id: z.ZodString;
111
112
  name: z.ZodString;
112
113
  description: z.ZodOptional<z.ZodString>;
114
+ groupId: z.ZodOptional<z.ZodString>;
113
115
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
116
  createdAt: z.ZodNumber;
115
117
  updatedAt: z.ZodNumber;
@@ -159,6 +161,7 @@ export declare const cacheLeaves: readonly [{
159
161
  id: z.ZodString;
160
162
  name: z.ZodString;
161
163
  description: z.ZodOptional<z.ZodString>;
164
+ groupId: z.ZodOptional<z.ZodString>;
162
165
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
163
166
  createdAt: z.ZodNumber;
164
167
  updatedAt: z.ZodNumber;
@@ -206,6 +209,7 @@ export declare const cacheLeaves: readonly [{
206
209
  id: z.ZodString;
207
210
  name: z.ZodString;
208
211
  description: z.ZodOptional<z.ZodString>;
212
+ groupId: z.ZodOptional<z.ZodString>;
209
213
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
214
  createdAt: z.ZodNumber;
211
215
  updatedAt: z.ZodNumber;
@@ -263,6 +267,7 @@ export declare const cacheLeaves: readonly [{
263
267
  updatedAt: number;
264
268
  value: any;
265
269
  description?: string | undefined;
270
+ groupId?: string | undefined;
266
271
  tags?: string[] | undefined;
267
272
  size?: number | undefined;
268
273
  setAt?: number | undefined;
@@ -280,6 +285,7 @@ export declare const cacheLeaves: readonly [{
280
285
  updatedAt: number;
281
286
  value: any;
282
287
  description?: string | undefined;
288
+ groupId?: string | undefined;
283
289
  tags?: string[] | undefined;
284
290
  size?: number | undefined;
285
291
  setAt?: number | undefined;
@@ -31,6 +31,28 @@ export declare const requestSchema: z.ZodObject<{
31
31
  responseSize: z.ZodOptional<z.ZodNumber>;
32
32
  }, z.core.$strip>;
33
33
  export type RequestLogType = z.infer<typeof requestSchema>;
34
+ export declare const extraRequestQuery: z.ZodObject<{
35
+ methodsInclude: z.ZodOptional<z.ZodArray<z.ZodEnum<{
36
+ get: "get";
37
+ post: "post";
38
+ put: "put";
39
+ patch: "patch";
40
+ delete: "delete";
41
+ }>>>;
42
+ methodsExclude: z.ZodOptional<z.ZodArray<z.ZodEnum<{
43
+ get: "get";
44
+ post: "post";
45
+ put: "put";
46
+ patch: "patch";
47
+ delete: "delete";
48
+ }>>>;
49
+ statusesInclude: z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>;
50
+ statusesExclude: z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>;
51
+ path: z.ZodOptional<z.ZodString>;
52
+ endpointKeysInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
53
+ endpointKeysExclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
54
+ }, z.core.$strip>;
55
+ export type ExtraRequestQuery = z.infer<typeof extraRequestQuery>;
34
56
  export declare const requestQuerySchema: z.ZodObject<{
35
57
  beforeDate: z.ZodOptional<z.ZodString>;
36
58
  afterDate: z.ZodOptional<z.ZodString>;
@@ -2,4 +2,5 @@ export declare function nowIso(): string;
2
2
  export declare function formatTimestamp(value?: number | null): string;
3
3
  export declare function formatIsoDate(value?: number | null): string;
4
4
  export declare function formatDurationMs(value?: number | null): string;
5
+ export declare function formatDurationFriendly(value?: number | null): string;
5
6
  export declare function formatRelative(value?: number | null): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emeryld/rrroutes-openapi",
3
- "version": "2.5.18",
3
+ "version": "2.5.21",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -17,8 +17,8 @@
17
17
  "dist"
18
18
  ],
19
19
  "dependencies": {
20
- "@emeryld/rrroutes-client": "^2.5.2",
21
- "@emeryld/rrroutes-contract": "^2.5.0",
20
+ "@emeryld/rrroutes-client": "^2.5.3",
21
+ "@emeryld/rrroutes-contract": "^2.5.2",
22
22
  "@emotion/cache": "^11.14.0",
23
23
  "@emotion/react": "^11.14.0",
24
24
  "@emotion/styled": "^11.14.1",
@@ -27,10 +27,10 @@
27
27
  "@tanstack/react-query": "^5.90.12",
28
28
  "react": "^18.3.1",
29
29
  "react-dom": "^18.3.1",
30
- "react-router-dom": "^7.10.1",
30
+ "react-router-dom": "^7.11.0",
31
31
  "recharts": "^3.6.0",
32
- "socket.io-client": "^4.8.1",
33
- "zod": "^4.2.0"
32
+ "socket.io-client": "^4.8.3",
33
+ "zod": "^4.2.1"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "express": "^5.1.0"
@@ -1,8 +0,0 @@
1
- type EndpointVolumeChartProps = {
2
- data: {
3
- timestamp: number;
4
- count: number;
5
- }[];
6
- };
7
- export default function EndpointVolumeChart({ data, }: EndpointVolumeChartProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,7 +0,0 @@
1
- import type { RequestLogType } from '../../types/types.requestLog.js';
2
- type RequestTableProps = {
3
- requests: RequestLogType[];
4
- onSelect: (request: RequestLogType, index: number) => void;
5
- };
6
- export default function RequestTable({ requests, onSelect, }: RequestTableProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,7 +0,0 @@
1
- import type { LogType } from '../../types/types.log.js';
2
- type LogsTableProps = {
3
- logs: LogType[];
4
- onSelect?: (log: LogType) => void;
5
- };
6
- export default function LogsTable({ logs, onSelect }: LogsTableProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,13 +0,0 @@
1
- import type { CacheTraceType } from '../../../types/types.cacheLog.js';
2
- import type { LogType } from '../../../types/types.log.js';
3
- import type { SocketEventType } from '../../../types/types.socket.js';
4
- import type { RequestTimelineEvent } from './types.js';
5
- type MiniCardProps = {
6
- event: RequestTimelineEvent;
7
- onSelectCache?: (cache: CacheTraceType) => void;
8
- onSelectLog?: (log: LogType) => void;
9
- onSelectSocket?: (socket: SocketEventType) => void;
10
- onSelectCacheKey?: (key: string) => void;
11
- };
12
- export default function RequestTimelineEventMiniCard({ event, onSelectCache, onSelectLog, onSelectSocket, onSelectCacheKey, }: MiniCardProps): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,8 +0,0 @@
1
- import type { SocketEventType } from '../../types/types.socket.js';
2
- type SocketEventsTableProps = {
3
- events: SocketEventType[];
4
- onSelect?: (event: SocketEventType, ordered: SocketEventType[]) => void;
5
- onOpenGroup?: (groupId: string, event: SocketEventType) => void;
6
- };
7
- export default function SocketEventsTable({ events, onSelect, onOpenGroup, }: SocketEventsTableProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,27 +0,0 @@
1
- export type LogLevel = string;
2
- export type CssColor = string;
3
- export type SetColorMode = 'set' | 'override';
4
- export declare const DEFAULT_LEVEL_COLORS: {
5
- readonly info: "#42a5f5";
6
- readonly warning: "#ffa726";
7
- readonly error: "#ef5350";
8
- readonly debug: "#ab47bc";
9
- readonly trace: "#26a69a";
10
- };
11
- /** Non-react snapshot getters (use hooks below if you need reactivity). */
12
- export declare const getSeenLevels: () => string[];
13
- export declare const getLevelColor: (level: LogLevel, fallback?: CssColor) => string;
14
- export declare const getLevelColorMap: () => Readonly<Record<string, CssColor>>;
15
- /**
16
- * Tracks levels discovered from the API and persists them.
17
- * Levels are normalized to lower-case.
18
- */
19
- export declare const trackSeenLevels: (levels: Iterable<string>) => void;
20
- /**
21
- * Sets (or overrides) the color for a level.
22
- * - mode="set": only sets if no color exists yet
23
- * - mode="override": always replaces existing value
24
- */
25
- export declare const setLevelColor: (level: LogLevel, color: CssColor, mode?: SetColorMode) => boolean;
26
- export declare const useSeenLogLevels: () => string[];
27
- export declare const useLogLevelColor: (level: LogLevel, fallback?: CssColor) => CssColor;