@emeryld/rrroutes-openapi 2.5.20 → 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 (62) hide show
  1. package/dist/index.cjs +4 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.mjs +4 -1
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/public/assets/docs.js +101 -120
  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 +4 -4
  12. package/dist/web/v2/components/cache/CacheLink.d.ts +8 -0
  13. package/dist/web/v2/components/cache/CacheTraceDetailModal.d.ts +6 -0
  14. package/dist/web/v2/components/cache/cacheInsightsUtils.d.ts +54 -0
  15. package/dist/web/v2/components/cache/cacheStateUtils.d.ts +9 -0
  16. package/dist/web/v2/components/cache/cacheUtils.d.ts +27 -4
  17. package/dist/web/v2/components/endpoints/EndpointDetailPanel.d.ts +3 -5
  18. package/dist/web/v2/components/feedback/EmptyState.d.ts +1 -2
  19. package/dist/web/v2/components/feedback/ErrorState.d.ts +1 -2
  20. package/dist/web/v2/components/feedback/LoadingState.d.ts +1 -2
  21. package/dist/web/v2/components/feedback/StateHandler.d.ts +13 -0
  22. package/dist/web/v2/components/feeds/FeedPagination.d.ts +4 -6
  23. package/dist/web/v2/components/feeds/FeedSortableTable.d.ts +30 -0
  24. package/dist/web/v2/components/feeds/tableColumns.d.ts +12 -0
  25. package/dist/web/v2/components/filters/BaseFilterBar.d.ts +4 -4
  26. package/dist/web/v2/components/filters/OptionPicker.d.ts +9 -0
  27. package/dist/web/v2/components/history/BucketRequestsModal.d.ts +6 -0
  28. package/dist/web/v2/components/history/RequestDetailContent.d.ts +1 -7
  29. package/dist/web/v2/components/history/RequestDetailModal.d.ts +2 -6
  30. package/dist/web/v2/components/layout/CardSection.d.ts +3 -2
  31. package/dist/web/v2/components/layout/TabbedPage.d.ts +8 -0
  32. package/dist/web/v2/components/logs/LogGroupDetailModal.d.ts +3 -6
  33. package/dist/web/v2/components/primitives/SortableTable.d.ts +14 -20
  34. package/dist/web/v2/components/primitives/TableCells.d.ts +10 -0
  35. package/dist/web/v2/components/registries/RegistryListEditor.d.ts +21 -0
  36. package/dist/web/v2/components/requests/timeline/RequestTimeline.d.ts +2 -10
  37. package/dist/web/v2/components/requests/timeline/RequestTimelineFilters.d.ts +9 -3
  38. package/dist/web/v2/components/requests/timeline/RequestTimelineRow.d.ts +1 -8
  39. package/dist/web/v2/components/schema/SchemaTreeView.d.ts +1 -1
  40. package/dist/web/v2/components/sockets/SocketEventDetailModal.d.ts +1 -4
  41. package/dist/web/v2/components/stats/ChartRow.d.ts +12 -0
  42. package/dist/web/v2/components/stats/SummaryStats.d.ts +10 -0
  43. package/dist/web/v2/components/tags/CacheStateChip.d.ts +7 -0
  44. package/dist/web/v2/components/tags/LogLevelChip.d.ts +2 -1
  45. package/dist/web/v2/hooks/useInfiniteItems.d.ts +16 -0
  46. package/dist/web/v2/hooks/useOptions.d.ts +6 -0
  47. package/dist/web/v2/hooks/useQueryState.d.ts +1 -7
  48. package/dist/web/v2/pages/SettingsPage.d.ts +1 -0
  49. package/dist/web/v2/registries/genericRegistry.d.ts +14 -0
  50. package/dist/web/v2/registries/optionRegistries.d.ts +12 -0
  51. package/dist/web/v2/stores/modalStore.d.ts +41 -0
  52. package/dist/web/v2/types/types.requestLog.d.ts +22 -0
  53. package/dist/web/v2/utils/dates.d.ts +1 -0
  54. package/package.json +5 -7
  55. package/dist/web/v2/components/cache/CacheTraceChart.d.ts +0 -6
  56. package/dist/web/v2/components/cache/cacheChartRegistry.d.ts +0 -1
  57. package/dist/web/v2/components/endpoints/EndpointVolumeChart.d.ts +0 -8
  58. package/dist/web/v2/components/history/RequestTable.d.ts +0 -11
  59. package/dist/web/v2/components/logs/LogsTable.d.ts +0 -11
  60. package/dist/web/v2/components/requests/timeline/RequestTimelineEventMiniCard.d.ts +0 -13
  61. package/dist/web/v2/components/sockets/SocketEventsTable.d.ts +0 -12
  62. 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 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 {};
@@ -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.20",
3
+ "version": "2.5.21",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -17,21 +17,19 @@
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",
25
25
  "@mui/icons-material": "^7.3.6",
26
26
  "@mui/material": "^7.3.6",
27
27
  "@tanstack/react-query": "^5.90.12",
28
- "chart.js": "^4.5.1",
29
28
  "react": "^18.3.1",
30
- "react-chartjs-2": "^5.3.1",
31
29
  "react-dom": "^18.3.1",
32
- "react-router-dom": "^7.10.1",
30
+ "react-router-dom": "^7.11.0",
33
31
  "recharts": "^3.6.0",
34
- "socket.io-client": "^4.8.1",
32
+ "socket.io-client": "^4.8.3",
35
33
  "zod": "^4.2.1"
36
34
  },
37
35
  "peerDependencies": {
@@ -1,6 +0,0 @@
1
- import type { ChartData } from 'chart.js';
2
- import '../cache/cacheChartRegistry.js';
3
- export type CacheTraceChartProps = {
4
- data: ChartData<'bar' | 'line'> | null;
5
- };
6
- export default function CacheTraceChart({ data }: CacheTraceChartProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -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,11 +0,0 @@
1
- import type { RequestLogType } from '../../types/types.requestLog.js';
2
- import { type SortDirection } from '../primitives/SortableTable.js';
3
- type RequestTableProps = {
4
- requests: RequestLogType[];
5
- sortBy?: string | null;
6
- sortDirection?: SortDirection;
7
- onSortChange?: (newSortBy: string | null, newSortDirection: SortDirection) => void;
8
- onSelect: (request: RequestLogType, index: number) => void;
9
- };
10
- export default function RequestTable({ requests, onSelect, sortBy, sortDirection, onSortChange, }: RequestTableProps): import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,11 +0,0 @@
1
- import type { LogType } from '../../types/types.log.js';
2
- import { type SortDirection } from '../primitives/SortableTable.js';
3
- type LogsTableProps = {
4
- logs: LogType[];
5
- sortBy?: string | null;
6
- sortDirection?: SortDirection;
7
- onSortChange?: (newSortBy: string | null, newSortDirection: SortDirection) => void;
8
- onSelect?: (log: LogType) => void;
9
- };
10
- export default function LogsTable({ logs, onSelect, sortBy, sortDirection, onSortChange, }: LogsTableProps): import("react/jsx-runtime").JSX.Element;
11
- 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,12 +0,0 @@
1
- import type { SocketEventType } from '../../types/types.socket.js';
2
- import { type SortDirection } from '../primitives/SortableTable.js';
3
- type SocketEventsTableProps = {
4
- events: SocketEventType[];
5
- onSelect?: (event: SocketEventType, ordered: SocketEventType[]) => void;
6
- onOpenGroup?: (groupId: string, event: SocketEventType) => void;
7
- sortBy?: string | null;
8
- sortDirection?: SortDirection;
9
- onSortChange?: (newSortBy: string | null, newSortDirection: SortDirection) => void;
10
- };
11
- export default function SocketEventsTable({ events, onSelect, onOpenGroup, sortBy, sortDirection, onSortChange, }: SocketEventsTableProps): import("react/jsx-runtime").JSX.Element;
12
- 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;