@emeryld/rrroutes-openapi 2.2.28 → 2.3.0

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,68 @@
1
+ import { type ReactNode } from 'react';
2
+ export type StatCard = {
3
+ label: string;
4
+ value: ReactNode;
5
+ hint?: string;
6
+ tone?: 'good' | 'warn' | 'bad';
7
+ };
8
+ export type ChartBarDatum = {
9
+ label: string;
10
+ value: number;
11
+ hint?: string;
12
+ tone?: 'good' | 'warn' | 'bad';
13
+ };
14
+ export type TimelinePoint = {
15
+ value: number;
16
+ label: string;
17
+ isError?: boolean;
18
+ status?: number;
19
+ timestamp: number;
20
+ };
21
+ export type BoxPlotDatum = {
22
+ label: string;
23
+ min: number;
24
+ q1: number;
25
+ median: number;
26
+ q3: number;
27
+ max: number;
28
+ sampleSize: number;
29
+ };
30
+ export declare function StatCards({ cards, onClick, toggleLabel, }: {
31
+ cards: StatCard[];
32
+ onClick?: () => void;
33
+ toggleLabel?: string;
34
+ }): import("react/jsx-runtime").JSX.Element;
35
+ export declare function AnalyticsPanel({ stats, graphs, collapsible, defaultOpen, }: {
36
+ stats: StatCard[];
37
+ graphs: ReactNode;
38
+ collapsible?: boolean;
39
+ defaultOpen?: boolean;
40
+ }): import("react/jsx-runtime").JSX.Element;
41
+ export declare function GraphCard({ title, subtitle, children, empty, className, }: {
42
+ title: string;
43
+ subtitle?: string;
44
+ children: ReactNode;
45
+ empty?: boolean;
46
+ className?: string;
47
+ }): import("react/jsx-runtime").JSX.Element;
48
+ export declare function BarChart({ data }: {
49
+ data: ChartBarDatum[];
50
+ }): import("react/jsx-runtime").JSX.Element;
51
+ export declare function LineChart({ points, width, height, formatY, formatX, }: {
52
+ points: TimelinePoint[];
53
+ width?: number;
54
+ height?: number;
55
+ formatY?: (value: number) => string;
56
+ formatX?: (timestamp: number) => string;
57
+ }): import("react/jsx-runtime").JSX.Element;
58
+ export declare function BoxPlotChart({ data }: {
59
+ data: BoxPlotDatum[];
60
+ }): import("react/jsx-runtime").JSX.Element;
61
+ export declare function GraphPlaceholder(): import("react/jsx-runtime").JSX.Element;
62
+ export declare function buildScaleTicks(max: number): number[];
63
+ export declare function buildTimelineTicks(points: TimelinePoint[]): {
64
+ index: number;
65
+ timestamp: number;
66
+ }[];
67
+ export declare function formatMs(value: number): string;
68
+ export declare function formatTime(ts: number): string;
@@ -0,0 +1,7 @@
1
+ import { type ReactNode } from 'react';
2
+ export declare function CopyablePre({ text, placeholder, actions, displayText, }: {
3
+ text?: string;
4
+ placeholder?: string;
5
+ actions?: ReactNode;
6
+ displayText?: string;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ type HelperEnumInputProps = {
2
+ value: Set<string>;
3
+ onChange: (next: Set<string>) => void;
4
+ suggestions?: string[];
5
+ placeholder?: string;
6
+ allowCustom?: boolean;
7
+ maxSuggestions?: number;
8
+ };
9
+ export declare function HelperEnumInput({ value, onChange, suggestions, placeholder, allowCustom, maxSuggestions, }: HelperEnumInputProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { LogEntry } from '../logsStore.js';
2
+ export declare function RequestLogsSection({ entryId, requestId, logs, expanded, onToggle, loading, error, }: {
3
+ entryId?: string;
4
+ requestId?: string;
5
+ logs: LogEntry[];
6
+ expanded: boolean;
7
+ onToggle: () => void;
8
+ loading: boolean;
9
+ error?: string;
10
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { ButtonHTMLAttributes, PropsWithChildren } from 'react';
2
+ type ButtonVariant = 'primary' | 'ghost' | 'pill' | 'link';
3
+ type ButtonProps = PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement> & {
4
+ variant?: ButtonVariant;
5
+ active?: boolean;
6
+ }>;
7
+ export declare function Button({ variant, active, className, type, children, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { HTMLAttributes, PropsWithChildren } from 'react';
2
+ type ClickableProps = PropsWithChildren<HTMLAttributes<any> & {
3
+ as?: keyof HTMLElementTagNameMap;
4
+ disabled?: boolean;
5
+ }>;
6
+ export declare function Clickable({ as: Component, disabled, className, onClick, children, ...rest }: ClickableProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes, PropsWithChildren } from 'react';
2
+ type TagVariant = 'chip' | 'status' | 'method';
3
+ type TagProps = PropsWithChildren<HTMLAttributes<HTMLSpanElement> & {
4
+ variant?: TagVariant;
5
+ tone?: 'error' | 'warn' | 'good';
6
+ method?: string;
7
+ }>;
8
+ export declare function Tag({ variant, tone, method, className, children, ...rest }: TagProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { HTMLAttributes, PropsWithChildren } from 'react';
2
+ type TextVariant = 'muted' | 'accent' | 'default';
3
+ type TextProps = PropsWithChildren<HTMLAttributes<HTMLElement> & {
4
+ as?: keyof HTMLElementTagNameMap;
5
+ variant?: TextVariant;
6
+ }>;
7
+ export declare function Text({ as: Component, variant, className, children, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ export { Button } from './Button.js';
2
+ export { Tag } from './Tag.js';
3
+ export { Text } from './Text.js';
4
+ export { Clickable } from './Clickable.js';
@@ -9,7 +9,7 @@ export type HistoryEntry = HistoryFeedEntry & {
9
9
  export type HistoryFilters = {
10
10
  methods: Set<string>;
11
11
  path: string;
12
- status: string;
12
+ statuses: Set<string>;
13
13
  text: string;
14
14
  from?: string;
15
15
  to?: string;
@@ -41,6 +41,7 @@ type HistoryContextValue = {
41
41
  page: HistoryPageState;
42
42
  setCursor: (cursor: string | null) => void;
43
43
  refresh: () => Promise<void>;
44
+ hasFilters: boolean;
44
45
  };
45
46
  export declare function HistoryProvider({ children, initialEntries, webhookPaths, }: {
46
47
  children: ReactNode;
@@ -2,7 +2,7 @@ import { type ReactNode } from 'react';
2
2
  import type { LogFeedEntry, LogType, WebhookPaths } from '../webhooks.js';
3
3
  export type LogEntry = LogFeedEntry & {
4
4
  tags: string[];
5
- metadata?: Record<string, unknown>;
5
+ metadata?: string;
6
6
  };
7
7
  export type LogFilters = {
8
8
  types: Set<LogType>;
@@ -33,6 +33,7 @@ type LogsContextValue = {
33
33
  page: LogsPageState;
34
34
  setCursor: (cursor: string | null) => void;
35
35
  refresh: () => Promise<void>;
36
+ hasFilters: boolean;
36
37
  };
37
38
  export declare function LogsProvider({ children, webhookPaths, initialEntries, }: {
38
39
  children: ReactNode;
@@ -44,7 +44,7 @@ export type LogFeedEntry = {
44
44
  timestamp: number;
45
45
  requestId?: string;
46
46
  tags?: string[];
47
- metadata?: Record<string, unknown>;
47
+ metadata?: string;
48
48
  };
49
49
  export type LogFeedQuery = {
50
50
  cursor?: string;
@@ -92,7 +92,7 @@ export declare const logFeedEntrySchema: z.ZodObject<{
92
92
  timestamp: z.ZodNumber;
93
93
  requestId: z.ZodOptional<z.ZodString>;
94
94
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
95
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
95
+ metadata: z.ZodOptional<z.ZodString>;
96
96
  }, z.core.$strip>;
97
97
  export declare const historyFeedQuerySchema: z.ZodObject<{
98
98
  cursor: z.ZodOptional<z.ZodString>;
@@ -173,7 +173,7 @@ export declare const logWebhookResponseSchema: z.ZodObject<{
173
173
  timestamp: z.ZodNumber;
174
174
  requestId: z.ZodOptional<z.ZodString>;
175
175
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
176
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
176
+ metadata: z.ZodOptional<z.ZodString>;
177
177
  }, z.core.$strip>>>;
178
178
  nextCursor: z.ZodOptional<z.ZodString>;
179
179
  prevCursor: z.ZodOptional<z.ZodString>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emeryld/rrroutes-openapi",
3
- "version": "2.2.28",
3
+ "version": "2.3.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",