@emeryld/rrroutes-openapi 2.2.22 → 2.2.23
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.
- package/dist/docs/LeafDocsPage.d.ts +25 -1
- package/dist/docs/docs.d.ts +2 -1
- package/dist/docs/presets.d.ts +14 -0
- package/dist/index.cjs +90 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +31 -3
- package/dist/index.mjs +90 -6
- package/dist/index.mjs.map +1 -1
- package/dist/public/assets/docs.css +1 -1
- package/dist/public/assets/docs.js +14 -12
- package/dist/web/app.d.ts +4 -1
- package/dist/web/components/EndpointCard.d.ts +2 -1
- package/dist/web/components/HistoryView.d.ts +6 -0
- package/dist/web/components/PlaygroundOverlay.d.ts +29 -1
- package/dist/web/components/PresetsView.d.ts +9 -0
- package/dist/web/historyStore.d.ts +63 -0
- package/package.json +1 -1
package/dist/web/app.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { SerializablePreset } from '../docs/presets.js';
|
|
1
2
|
import type { SerializableLeaf } from '../docs/serializer.js';
|
|
2
|
-
export declare function DocsApp({ initialLeaves }: {
|
|
3
|
+
export declare function DocsApp({ initialLeaves, presets, basePath, }: {
|
|
3
4
|
initialLeaves: SerializableLeaf[];
|
|
5
|
+
presets: SerializablePreset[];
|
|
6
|
+
basePath?: string;
|
|
4
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,7 @@ type Props = {
|
|
|
4
4
|
expanded: boolean;
|
|
5
5
|
onToggle: () => void;
|
|
6
6
|
onTry: () => void;
|
|
7
|
+
onHistory: () => void;
|
|
7
8
|
};
|
|
8
|
-
export declare function EndpointCard({ leaf, expanded, onToggle, onTry }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function EndpointCard({ leaf, expanded, onToggle, onTry, onHistory }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type HistoryFilters } from '../historyStore.js';
|
|
2
|
+
type HistoryViewProps = {
|
|
3
|
+
onFiltersChange?: (next: HistoryFilters) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function HistoryView({ onFiltersChange }: HistoryViewProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,5 +1,33 @@
|
|
|
1
|
+
import type { SerializablePresetOperation } from '../../docs/presets.js';
|
|
1
2
|
import type { SerializableLeaf } from '../../docs/serializer.js';
|
|
2
|
-
|
|
3
|
+
type QueryRow = {
|
|
4
|
+
id: string;
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
8
|
+
export type PlaygroundInputs = {
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
pathParams: Record<string, string>;
|
|
11
|
+
queryRows: QueryRow[];
|
|
12
|
+
bodyText: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function createDefaultPlaygroundInputs(leaf: SerializableLeaf): PlaygroundInputs;
|
|
15
|
+
export declare function createInputsFromPreset(leaf: SerializableLeaf, preset?: SerializablePresetOperation): PlaygroundInputs;
|
|
16
|
+
export declare function PlaygroundOverlay({ leaf, onClose, inputs, onInputsChange, onClearInputs, }: {
|
|
3
17
|
leaf: SerializableLeaf | null;
|
|
4
18
|
onClose: () => void;
|
|
19
|
+
inputs?: PlaygroundInputs;
|
|
20
|
+
onInputsChange: (state: PlaygroundInputs) => void;
|
|
21
|
+
onClearInputs: (next: PlaygroundInputs) => void;
|
|
5
22
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
export declare function PlaygroundPanel(props: PlaygroundPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
type PlaygroundPanelProps = {
|
|
25
|
+
leaf: SerializableLeaf;
|
|
26
|
+
inputs?: PlaygroundInputs;
|
|
27
|
+
onInputsChange: (state: PlaygroundInputs) => void;
|
|
28
|
+
onClearInputs: (next: PlaygroundInputs) => void;
|
|
29
|
+
onClose?: () => void;
|
|
30
|
+
headingNote?: string;
|
|
31
|
+
exposeSendRef?: (send: (() => Promise<void>) | null) => void;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SerializablePreset } from '../../docs/presets.js';
|
|
2
|
+
import type { SerializableLeaf } from '../../docs/serializer.js';
|
|
3
|
+
type PresetsViewProps = {
|
|
4
|
+
presets: SerializablePreset[];
|
|
5
|
+
leaves: SerializableLeaf[];
|
|
6
|
+
onBackToRoutes: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function PresetsView({ presets, leaves, onBackToRoutes }: PresetsViewProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type HistoryEntry = {
|
|
3
|
+
id: string;
|
|
4
|
+
timestamp: number;
|
|
5
|
+
method: string;
|
|
6
|
+
path: string;
|
|
7
|
+
fullUrl: string;
|
|
8
|
+
params: Record<string, string>;
|
|
9
|
+
query: Record<string, string>;
|
|
10
|
+
body: string;
|
|
11
|
+
output: string;
|
|
12
|
+
status?: number;
|
|
13
|
+
durationMs: number;
|
|
14
|
+
error?: string;
|
|
15
|
+
};
|
|
16
|
+
export type HistoryInput = Omit<HistoryEntry, 'id' | 'timestamp'>;
|
|
17
|
+
export type HistoryFilters = {
|
|
18
|
+
methods: Set<string>;
|
|
19
|
+
path: string;
|
|
20
|
+
minDurationMs: number | null;
|
|
21
|
+
maxDurationMs: number | null;
|
|
22
|
+
onlyErrors: boolean;
|
|
23
|
+
sortBy: HistorySortKey;
|
|
24
|
+
sortDir: HistorySortDirection;
|
|
25
|
+
};
|
|
26
|
+
export type HistorySeed = Partial<HistoryEntry> & {
|
|
27
|
+
method: string;
|
|
28
|
+
path: string;
|
|
29
|
+
fullUrl: string;
|
|
30
|
+
durationMs: number;
|
|
31
|
+
timestamp?: number;
|
|
32
|
+
};
|
|
33
|
+
type HistoryContextValue = {
|
|
34
|
+
entries: HistoryEntry[];
|
|
35
|
+
addEntry: (entry: HistoryInput) => void;
|
|
36
|
+
clearHistory: () => void;
|
|
37
|
+
filters: HistoryFilters;
|
|
38
|
+
setFilters: (next: HistoryFilters) => void;
|
|
39
|
+
updateFilters: (partial: Partial<HistoryFilters>) => void;
|
|
40
|
+
statsByRoute: Map<string, EndpointHistoryStats>;
|
|
41
|
+
};
|
|
42
|
+
export declare function HistoryProvider({ children, initialEntries, }: {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
initialEntries?: HistorySeed[];
|
|
45
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function useHistoryStore(): HistoryContextValue;
|
|
47
|
+
export declare function filtersToSearchParams(filters: HistoryFilters): URLSearchParams;
|
|
48
|
+
export declare function filtersFromSearchParams(params: URLSearchParams): Partial<HistoryFilters> | undefined;
|
|
49
|
+
export declare function defaultHistoryFiltersState(): HistoryFilters;
|
|
50
|
+
export declare function mergeHistoryFilters(base: HistoryFilters, partial?: Partial<HistoryFilters>): HistoryFilters;
|
|
51
|
+
export declare function normalizeHistorySeedEntries(seeds?: HistorySeed[]): HistoryEntry[];
|
|
52
|
+
export type EndpointHistoryStats = {
|
|
53
|
+
total: number;
|
|
54
|
+
successRate: number;
|
|
55
|
+
avgDuration: number;
|
|
56
|
+
p95Duration: number;
|
|
57
|
+
lastStatus?: number;
|
|
58
|
+
lastDuration?: number;
|
|
59
|
+
};
|
|
60
|
+
export type HistorySortKey = 'timestamp' | 'path' | 'duration';
|
|
61
|
+
export type HistorySortDirection = 'asc' | 'desc';
|
|
62
|
+
export declare function historyKey(method: string, path: string): string;
|
|
63
|
+
export {};
|