@emeryld/rrroutes-openapi 2.3.0 → 2.3.1
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/README.md +3 -0
- package/dist/index.cjs +119 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.mjs +119 -9
- package/dist/index.mjs.map +1 -1
- package/dist/public/assets/docs.css +1 -1
- package/dist/public/assets/docs.js +18 -18
- package/dist/web/components/HelperEnumInput.d.ts +2 -1
- package/dist/web/components/PlaygroundOverlay.d.ts +68 -9
- package/dist/web/components/PresetsView.d.ts +6 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ type HelperEnumInputProps = {
|
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
allowCustom?: boolean;
|
|
7
7
|
maxSuggestions?: number;
|
|
8
|
+
excludeSelectedSuggestions?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export declare function HelperEnumInput({ value, onChange, suggestions, placeholder, allowCustom, maxSuggestions, }: HelperEnumInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function HelperEnumInput({ value, onChange, suggestions, placeholder, allowCustom, maxSuggestions, excludeSelectedSuggestions, }: HelperEnumInputProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -5,21 +5,74 @@ type QueryRow = {
|
|
|
5
5
|
key: string;
|
|
6
6
|
value: string;
|
|
7
7
|
};
|
|
8
|
+
type HeaderRow = {
|
|
9
|
+
id: string;
|
|
10
|
+
key: string;
|
|
11
|
+
value: string;
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
};
|
|
8
14
|
export type PlaygroundInputs = {
|
|
9
|
-
baseUrl: string;
|
|
10
15
|
pathParams: Record<string, string>;
|
|
11
16
|
queryRows: QueryRow[];
|
|
12
17
|
bodyText: string;
|
|
13
18
|
};
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
export type PlaygroundRequestSettings = {
|
|
20
|
+
baseUrl: string;
|
|
21
|
+
headers: HeaderRow[];
|
|
22
|
+
};
|
|
23
|
+
export type PlaygroundTab = {
|
|
24
|
+
id: string;
|
|
25
|
+
leafKey: string;
|
|
26
|
+
leaf: SerializableLeaf;
|
|
27
|
+
title: string;
|
|
28
|
+
label: string;
|
|
29
|
+
state: PlaygroundSessionState;
|
|
30
|
+
};
|
|
31
|
+
export type PlaygroundSessionState = {
|
|
32
|
+
lastRun: RunSnapshot | null;
|
|
33
|
+
showFullResponse: boolean;
|
|
34
|
+
logsExpanded: boolean;
|
|
35
|
+
runCardOpen: {
|
|
36
|
+
sent: boolean;
|
|
37
|
+
logs: boolean;
|
|
38
|
+
output: boolean;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
type RunSnapshot = {
|
|
42
|
+
url: string;
|
|
43
|
+
method: string;
|
|
44
|
+
pathParams: Record<string, string>;
|
|
45
|
+
query: Record<string, string>;
|
|
46
|
+
headers: Record<string, string>;
|
|
47
|
+
bodyText: string;
|
|
48
|
+
requestId?: string;
|
|
49
|
+
timestamp: number;
|
|
50
|
+
responseMeta: string;
|
|
51
|
+
responseBody: string;
|
|
52
|
+
};
|
|
53
|
+
export declare const createDefaultPlaygroundSessionState: () => PlaygroundSessionState;
|
|
54
|
+
export declare function createDefaultRequestSettings(baseUrlSuffix?: string): PlaygroundRequestSettings;
|
|
55
|
+
export declare function createDefaultPlaygroundInputs(leaf: SerializableLeaf): PlaygroundInputs;
|
|
56
|
+
export declare function createInputsFromPreset(leaf: SerializableLeaf, preset?: SerializablePresetOperation): PlaygroundInputs;
|
|
57
|
+
export declare function PlaygroundOverlay({ tabs, activeTabId, inputsByTab, onSelectTab, onInputsChange, onClearInputs, onCloseTab, onDuplicateTab, onCloseOverlay, baseUrl, onBaseUrlChange, headers, onHeadersChange, baseUrlSuffix, leafSuggestions, leafSelection, onLeafSelectionChange, onTabStateChange, }: {
|
|
58
|
+
tabs: PlaygroundTab[];
|
|
59
|
+
activeTabId: string | null;
|
|
60
|
+
inputsByTab: Record<string, PlaygroundInputs>;
|
|
61
|
+
onSelectTab: (tabId: string) => void;
|
|
62
|
+
onInputsChange: (tabId: string, state: PlaygroundInputs) => void;
|
|
63
|
+
onClearInputs: (tabId: string, next: PlaygroundInputs) => void;
|
|
64
|
+
onCloseTab: (tabId: string) => void;
|
|
65
|
+
onDuplicateTab: (tabId: string) => void;
|
|
66
|
+
onCloseOverlay: () => void;
|
|
67
|
+
baseUrl: string;
|
|
68
|
+
onBaseUrlChange: (next: string) => void;
|
|
69
|
+
headers: HeaderRow[];
|
|
70
|
+
onHeadersChange: (rows: HeaderRow[]) => void;
|
|
22
71
|
baseUrlSuffix?: string;
|
|
72
|
+
leafSuggestions: string[];
|
|
73
|
+
leafSelection: Set<string>;
|
|
74
|
+
onLeafSelectionChange: (next: Set<string>) => void;
|
|
75
|
+
onTabStateChange: (tabId: string, state: PlaygroundSessionState) => void;
|
|
23
76
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
24
77
|
export declare function PlaygroundPanel(props: PlaygroundPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
25
78
|
type PlaygroundPanelProps = {
|
|
@@ -31,5 +84,11 @@ type PlaygroundPanelProps = {
|
|
|
31
84
|
headingNote?: string;
|
|
32
85
|
exposeSendRef?: (send: (() => Promise<void>) | null) => void;
|
|
33
86
|
baseUrlSuffix?: string;
|
|
87
|
+
baseUrl: string;
|
|
88
|
+
onBaseUrlChange: (next: string) => void;
|
|
89
|
+
headers: HeaderRow[];
|
|
90
|
+
onHeadersChange: (rows: HeaderRow[]) => void;
|
|
91
|
+
sessionState: PlaygroundSessionState;
|
|
92
|
+
onSessionStateChange: (next: PlaygroundSessionState) => void;
|
|
34
93
|
};
|
|
35
94
|
export {};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { SerializablePreset } from '../../docs/presets.js';
|
|
2
2
|
import type { SerializableLeaf } from '../../docs/serializer.js';
|
|
3
|
+
import { type PlaygroundRequestSettings } from './PlaygroundOverlay.js';
|
|
3
4
|
type PresetsViewProps = {
|
|
4
5
|
presets: SerializablePreset[];
|
|
5
6
|
leaves: SerializableLeaf[];
|
|
6
7
|
baseUrlSuffix?: string;
|
|
8
|
+
baseUrl: string;
|
|
9
|
+
headers: PlaygroundRequestSettings['headers'];
|
|
10
|
+
onBaseUrlChange: (next: string) => void;
|
|
11
|
+
onHeadersChange: (rows: PlaygroundRequestSettings['headers']) => void;
|
|
7
12
|
onBackToRoutes: () => void;
|
|
8
13
|
};
|
|
9
|
-
export declare function PresetsView({ presets, leaves, baseUrlSuffix, onBackToRoutes }: PresetsViewProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function PresetsView({ presets, leaves, baseUrlSuffix, baseUrl, headers, onBaseUrlChange, onHeadersChange, onBackToRoutes, }: PresetsViewProps): import("react/jsx-runtime").JSX.Element;
|
|
10
15
|
export {};
|