@stainless-api/docs-ui 0.1.0-beta.3 → 0.1.0-beta.31
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/breadcrumbs-D2C-ipke.d.ts +20 -0
- package/dist/chunk-DsStOjWQ.js +13 -0
- package/dist/component-generics-CGwo6qAl.d.ts +30 -0
- package/dist/component-generics-D3ybuN5r.js +45 -0
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +15 -0
- package/dist/components/chat.d.ts +14 -0
- package/dist/components/chat.js +142 -0
- package/dist/components/icons.d.ts +50 -0
- package/dist/components/icons.js +3 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.js +15 -0
- package/dist/components/method.d.ts +2 -0
- package/dist/components/method.js +15 -0
- package/dist/components/overview.d.ts +2 -0
- package/dist/components/overview.js +15 -0
- package/dist/components/primitives.d.ts +2 -0
- package/dist/components/primitives.js +15 -0
- package/dist/components/properties.d.ts +2 -0
- package/dist/components/properties.js +15 -0
- package/dist/components/sdk.d.ts +3 -0
- package/dist/components/sdk.js +15 -0
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +15 -0
- package/dist/components/snippets.d.ts +4 -0
- package/dist/components/snippets.js +15 -0
- package/dist/contexts/component-generics.d.ts +2 -0
- package/dist/contexts/component-generics.js +3 -0
- package/dist/contexts/component-types.d.ts +17 -0
- package/dist/contexts/component-types.js +0 -0
- package/dist/contexts/component.d.ts +30 -0
- package/dist/contexts/component.js +15 -0
- package/dist/contexts/docs.d.ts +2 -0
- package/dist/contexts/docs.js +3 -0
- package/dist/contexts/index.d.ts +19 -0
- package/dist/contexts/index.js +15 -0
- package/dist/contexts/markdown.d.ts +2 -0
- package/dist/contexts/markdown.js +4 -0
- package/dist/contexts/navigation.d.ts +3 -0
- package/dist/contexts/navigation.js +3 -0
- package/dist/contexts/search.d.ts +4 -0
- package/dist/contexts/search.js +15 -0
- package/dist/contexts/use-components.d.ts +15 -0
- package/dist/contexts/use-components.js +4 -0
- package/dist/contexts-Bpupku3r.js +3804 -0
- package/dist/docs-C5sBbvz9.d.ts +46 -0
- package/dist/docs-CopwX9a7.js +54 -0
- package/dist/icons-yb-Jhkmg.js +753 -0
- package/dist/index-BZvOzjGA.d.ts +15 -0
- package/dist/index-Cwjt4PqJ.d.ts +240 -0
- package/dist/index-Cx9sLoAB.d.ts +14 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +15 -7542
- package/dist/languages/go.d.ts +12 -0
- package/dist/languages/go.js +15 -0
- package/dist/languages/http.d.ts +12 -0
- package/dist/languages/http.js +15 -0
- package/dist/languages/index.d.ts +12 -0
- package/dist/languages/index.js +15 -0
- package/dist/languages/java.d.ts +12 -0
- package/dist/languages/java.js +15 -0
- package/dist/languages/python.d.ts +12 -0
- package/dist/languages/python.js +15 -0
- package/dist/languages/ruby.d.ts +12 -0
- package/dist/languages/ruby.js +15 -0
- package/dist/languages/typescript.d.ts +12 -0
- package/dist/languages/typescript.js +15 -0
- package/dist/markdown/index.d.ts +12 -0
- package/dist/markdown/index.js +15 -0
- package/dist/markdown/md.d.ts +15 -0
- package/dist/markdown/md.js +3 -0
- package/dist/markdown/utils.d.ts +4 -0
- package/dist/markdown/utils.js +3 -0
- package/dist/markdown-CI4kbU64.js +44 -0
- package/dist/markdown-CswQW7Au.d.ts +22 -0
- package/dist/md-DxiV1_vy.js +41 -0
- package/dist/method-D0-gsw3H.d.ts +71 -0
- package/dist/navigation-Bc58Zt6l.d.ts +29 -0
- package/dist/navigation-CGr5_w6z.js +24 -0
- package/dist/overview-Ds69MW_g.d.ts +39 -0
- package/dist/pagefind-BaK1krMe.js +15 -0
- package/dist/primitives-DKSwbXPi.d.ts +99 -0
- package/dist/properties-4IkL0IVR.d.ts +46 -0
- package/dist/routing-8itEXLx6.js +189 -0
- package/dist/routing-ByeZ2P3d.d.ts +54 -0
- package/dist/routing.d.ts +2 -0
- package/dist/routing.js +3 -180
- package/dist/sdk-D1acaxlr.d.ts +119 -0
- package/dist/search/index.d.ts +26 -0
- package/dist/search/index.js +334 -0
- package/dist/search/providers/algolia.d.ts +24 -0
- package/dist/search/providers/algolia.js +15 -0
- package/dist/search/providers/fuse.d.ts +18 -0
- package/dist/search/providers/fuse.js +30 -0
- package/dist/search/providers/pagefind.d.ts +7 -0
- package/dist/search/providers/pagefind.js +3 -0
- package/dist/search/providers/walker.d.ts +9 -0
- package/dist/search/providers/walker.js +34 -0
- package/dist/search/types.d.ts +3 -0
- package/dist/search/types.js +3 -0
- package/dist/search-BwZ0UK72.d.ts +21 -0
- package/dist/sidebar-rqdLbjBO.d.ts +36 -0
- package/dist/snippets-Coq_j3S0.d.ts +46 -0
- package/dist/style-BEMLtSIK.d.ts +172 -0
- package/dist/style-CPgcT0Fw.js +173 -0
- package/dist/style.d.ts +2 -0
- package/dist/style.js +3 -0
- package/dist/styles/main.css +763 -736
- package/dist/styles/main.js +0 -0
- package/dist/styles/primitives.css +285 -464
- package/dist/styles/primitives.js +0 -0
- package/dist/styles/resets.css +31 -41
- package/dist/styles/resets.js +0 -0
- package/dist/styles/search.css +266 -248
- package/dist/styles/search.js +0 -0
- package/dist/styles/sidebar.css +59 -60
- package/dist/styles/sidebar.js +0 -0
- package/dist/styles/snippets.css +87 -88
- package/dist/styles/snippets.js +0 -0
- package/dist/styles/variables.css +87 -89
- package/dist/styles/variables.js +0 -0
- package/dist/types-BKUIuYYk.d.ts +83 -0
- package/dist/types-__XoFvJ_.js +34 -0
- package/dist/use-components-BHEwm0mE.js +7 -0
- package/dist/utils-2FmcHPHp.js +32 -0
- package/dist/utils-BCfb0F9R.js +30 -0
- package/dist/utils-D43p_yTd.d.ts +14 -0
- package/dist/utils-NYMx28lc.d.ts +21 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +4 -0
- package/package.json +78 -16
- package/dist/mcp.js +0 -16003
- package/src/components/breadcrumbs.tsx +0 -94
- package/src/components/chat.tsx +0 -154
- package/src/components/dropdown.tsx +0 -91
- package/src/components/icons.tsx +0 -584
- package/src/components/index.ts +0 -9
- package/src/components/method.tsx +0 -144
- package/src/components/overview.tsx +0 -159
- package/src/components/primitives.tsx +0 -284
- package/src/components/properties.tsx +0 -130
- package/src/components/scripts/dropdown.ts +0 -78
- package/src/components/sdk.tsx +0 -402
- package/src/components/sidebar.tsx +0 -99
- package/src/components/snippets.tsx +0 -179
- package/src/contexts/component-generics.tsx +0 -48
- package/src/contexts/component-types.tsx +0 -5
- package/src/contexts/component.tsx +0 -32
- package/src/contexts/docs.tsx +0 -75
- package/src/contexts/index.tsx +0 -17
- package/src/contexts/markdown.tsx +0 -43
- package/src/contexts/navigation.tsx +0 -44
- package/src/contexts/search.tsx +0 -28
- package/src/contexts/use-components.tsx +0 -4
- package/src/index.ts +0 -6
- package/src/languages/go.tsx +0 -281
- package/src/languages/http.tsx +0 -321
- package/src/languages/index.ts +0 -26
- package/src/languages/java.tsx +0 -358
- package/src/languages/python.tsx +0 -255
- package/src/languages/ruby.tsx +0 -320
- package/src/languages/typescript.tsx +0 -393
- package/src/markdown/index.ts +0 -107
- package/src/markdown/md.ts +0 -45
- package/src/markdown/utils.ts +0 -49
- package/src/routing.ts +0 -238
- package/src/search/form.tsx +0 -127
- package/src/search/index.tsx +0 -1
- package/src/search/indexer.ts +0 -246
- package/src/search/mcp.ts +0 -61
- package/src/search/printer.tsx +0 -86
- package/src/search/providers/algolia.ts +0 -88
- package/src/search/providers/fuse.ts +0 -19
- package/src/search/providers/pagefind.ts +0 -17
- package/src/search/providers/walker.ts +0 -30
- package/src/search/results.tsx +0 -181
- package/src/search/state.ts +0 -64
- package/src/search/types.ts +0 -116
- package/src/style.ts +0 -197
- package/src/styles/main.css +0 -993
- package/src/styles/primitives.css +0 -572
- package/src/styles/resets.css +0 -47
- package/src/styles/search.css +0 -342
- package/src/styles/sidebar.css +0 -87
- package/src/styles/snippets.css +0 -132
- package/src/styles/variables.css +0 -90
- package/src/utils.ts +0 -41
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime67 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/primitives.d.ts
|
|
6
|
+
type JoinProps = {
|
|
7
|
+
items: ReactNode[];
|
|
8
|
+
limit?: number;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
declare function Join({
|
|
12
|
+
items,
|
|
13
|
+
limit,
|
|
14
|
+
children
|
|
15
|
+
}: JoinProps): react_jsx_runtime67.JSX.Element[];
|
|
16
|
+
type ExpanderProps = {
|
|
17
|
+
id?: string;
|
|
18
|
+
open?: boolean;
|
|
19
|
+
summary: ReactNode;
|
|
20
|
+
virtual?: boolean;
|
|
21
|
+
muted?: boolean;
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
};
|
|
24
|
+
declare function Expander({
|
|
25
|
+
id,
|
|
26
|
+
open,
|
|
27
|
+
summary,
|
|
28
|
+
virtual,
|
|
29
|
+
muted,
|
|
30
|
+
children
|
|
31
|
+
}: ExpanderProps): react_jsx_runtime67.JSX.Element;
|
|
32
|
+
declare function VirtualExpander({
|
|
33
|
+
id,
|
|
34
|
+
open: isOpen,
|
|
35
|
+
muted,
|
|
36
|
+
summary,
|
|
37
|
+
children
|
|
38
|
+
}: Omit<ExpanderProps, 'virtual'>): react_jsx_runtime67.JSX.Element;
|
|
39
|
+
declare function Markdown({
|
|
40
|
+
content
|
|
41
|
+
}: {
|
|
42
|
+
content: string;
|
|
43
|
+
}): "" | react_jsx_runtime67.JSX.Element | undefined;
|
|
44
|
+
type BadgeProps = {
|
|
45
|
+
id: string;
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
};
|
|
48
|
+
declare function Badge({
|
|
49
|
+
id,
|
|
50
|
+
children
|
|
51
|
+
}: BadgeProps): react_jsx_runtime67.JSX.Element;
|
|
52
|
+
type TooltipProps = {
|
|
53
|
+
content: ReactNode;
|
|
54
|
+
children: ReactNode;
|
|
55
|
+
};
|
|
56
|
+
declare function Tooltip({
|
|
57
|
+
content,
|
|
58
|
+
children
|
|
59
|
+
}: TooltipProps): string | number | bigint | boolean | react_jsx_runtime67.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined;
|
|
60
|
+
type LinkProps = {
|
|
61
|
+
stainlessPath: string;
|
|
62
|
+
scroll?: boolean;
|
|
63
|
+
children?: ReactNode;
|
|
64
|
+
} & React$1.HTMLProps<HTMLAnchorElement>;
|
|
65
|
+
declare function Link({
|
|
66
|
+
stainlessPath,
|
|
67
|
+
scroll,
|
|
68
|
+
children,
|
|
69
|
+
...props
|
|
70
|
+
}: LinkProps): string | number | bigint | boolean | react_jsx_runtime67.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined;
|
|
71
|
+
type InputProps = {
|
|
72
|
+
left?: ReactNode;
|
|
73
|
+
right?: ReactNode;
|
|
74
|
+
} & React$1.InputHTMLAttributes<HTMLInputElement>;
|
|
75
|
+
declare const Input: React$1.ForwardRefExoticComponent<{
|
|
76
|
+
left?: ReactNode;
|
|
77
|
+
right?: ReactNode;
|
|
78
|
+
} & React$1.InputHTMLAttributes<HTMLInputElement> & React$1.RefAttributes<HTMLInputElement>>;
|
|
79
|
+
type ToggleButtonProps = {
|
|
80
|
+
children?: ReactNode;
|
|
81
|
+
selected?: boolean;
|
|
82
|
+
} & React$1.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
83
|
+
declare const ToggleButton: React$1.ForwardRefExoticComponent<{
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
selected?: boolean;
|
|
86
|
+
} & React$1.ButtonHTMLAttributes<HTMLButtonElement> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
87
|
+
type ListViewProps<TItem> = {
|
|
88
|
+
items: Array<TItem>;
|
|
89
|
+
itemDelegate: (item: TItem, selected: boolean) => React$1.ReactNode;
|
|
90
|
+
onSelectListItem?: (item: TItem) => void;
|
|
91
|
+
} & React$1.HTMLAttributes<HTMLDivElement>;
|
|
92
|
+
declare function ListView<TItem>({
|
|
93
|
+
items,
|
|
94
|
+
itemDelegate,
|
|
95
|
+
onSelectListItem,
|
|
96
|
+
...rest
|
|
97
|
+
}: ListViewProps<TItem>): react_jsx_runtime67.JSX.Element;
|
|
98
|
+
//#endregion
|
|
99
|
+
export { Join as a, ListViewProps as c, ToggleButtonProps as d, Tooltip as f, InputProps as i, Markdown as l, Expander as n, Link as o, VirtualExpander as p, Input as r, ListView as s, Badge as t, ToggleButton as u };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import * as react_jsx_runtime31 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/properties.d.ts
|
|
5
|
+
type PropertyToggleProps = {
|
|
6
|
+
target: string;
|
|
7
|
+
};
|
|
8
|
+
declare function PropertyToggle({
|
|
9
|
+
target
|
|
10
|
+
}: PropertyToggleProps): react_jsx_runtime31.JSX.Element;
|
|
11
|
+
type PropertyDescriptionProps = {
|
|
12
|
+
description?: string;
|
|
13
|
+
};
|
|
14
|
+
declare function PropertyDescription({
|
|
15
|
+
description
|
|
16
|
+
}: PropertyDescriptionProps): react_jsx_runtime31.JSX.Element | undefined;
|
|
17
|
+
type PropertyProps = {
|
|
18
|
+
id?: string;
|
|
19
|
+
name?: ReactNode;
|
|
20
|
+
typeName?: ReactNode;
|
|
21
|
+
badges?: ReactNode;
|
|
22
|
+
type?: ReactNode;
|
|
23
|
+
description?: string;
|
|
24
|
+
expand?: boolean;
|
|
25
|
+
deprecated?: boolean | string;
|
|
26
|
+
additional?: ReactNode;
|
|
27
|
+
declaration?: ReactNode;
|
|
28
|
+
constraints?: ReactNode;
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
};
|
|
31
|
+
declare function Property({
|
|
32
|
+
id,
|
|
33
|
+
name,
|
|
34
|
+
typeName,
|
|
35
|
+
badges,
|
|
36
|
+
type,
|
|
37
|
+
declaration,
|
|
38
|
+
description,
|
|
39
|
+
deprecated,
|
|
40
|
+
expand,
|
|
41
|
+
additional,
|
|
42
|
+
constraints,
|
|
43
|
+
children
|
|
44
|
+
}: PropertyProps): react_jsx_runtime31.JSX.Element;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { PropertyToggle as a, PropertyProps as i, PropertyDescription as n, PropertyToggleProps as o, PropertyDescriptionProps as r, Property as t };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { t as __export } from "./chunk-DsStOjWQ.js";
|
|
2
|
+
|
|
3
|
+
//#region src/routing.ts
|
|
4
|
+
var routing_exports = /* @__PURE__ */ __export({
|
|
5
|
+
LanguageNames: () => LanguageNames,
|
|
6
|
+
Languages: () => Languages,
|
|
7
|
+
SupportedLanguageSyntaxes: () => SupportedLanguageSyntaxes,
|
|
8
|
+
expandToElement: () => expandToElement,
|
|
9
|
+
findNavigationPath: () => findNavigationPath,
|
|
10
|
+
generateRoute: () => generateRoute,
|
|
11
|
+
generateRouteList: () => generateRouteList,
|
|
12
|
+
getLanguageSnippet: () => getLanguageSnippet,
|
|
13
|
+
getResource: () => getResource,
|
|
14
|
+
isSupportedLanguage: () => isSupportedLanguage,
|
|
15
|
+
parseRoute: () => parseRoute,
|
|
16
|
+
parseStainlessPath: () => parseStainlessPath,
|
|
17
|
+
scrollToPath: () => scrollToPath,
|
|
18
|
+
trimStainlessPath: () => trimStainlessPath,
|
|
19
|
+
updateHistory: () => updateHistory,
|
|
20
|
+
walkTree: () => walkTree
|
|
21
|
+
});
|
|
22
|
+
const Languages = [
|
|
23
|
+
"http",
|
|
24
|
+
"node",
|
|
25
|
+
"python",
|
|
26
|
+
"go",
|
|
27
|
+
"typescript",
|
|
28
|
+
"terraform",
|
|
29
|
+
"ruby",
|
|
30
|
+
"java",
|
|
31
|
+
"kotlin"
|
|
32
|
+
];
|
|
33
|
+
const SupportedLanguageSyntaxes = [
|
|
34
|
+
"http",
|
|
35
|
+
"javascript",
|
|
36
|
+
"python",
|
|
37
|
+
"go",
|
|
38
|
+
"typescript",
|
|
39
|
+
"terraform",
|
|
40
|
+
"ruby",
|
|
41
|
+
"java",
|
|
42
|
+
"kotlin"
|
|
43
|
+
];
|
|
44
|
+
const LanguageNames = {
|
|
45
|
+
http: "HTTP",
|
|
46
|
+
node: "TypeScript",
|
|
47
|
+
typescript: "TypeScript",
|
|
48
|
+
python: "Python",
|
|
49
|
+
go: "Go",
|
|
50
|
+
ruby: "Ruby",
|
|
51
|
+
java: "Java",
|
|
52
|
+
kotlin: "Kotlin",
|
|
53
|
+
terraform: "Terraform"
|
|
54
|
+
};
|
|
55
|
+
function getLanguageSnippet(language) {
|
|
56
|
+
return language === "http" ? "http.curl" : `${language}.default`;
|
|
57
|
+
}
|
|
58
|
+
function isSupportedLanguage(language) {
|
|
59
|
+
return Languages.includes(language);
|
|
60
|
+
}
|
|
61
|
+
const DefaultLanguage = "http";
|
|
62
|
+
const StainlessPathPattern = /(\(resource\) (?<resource>[^\s]+))( > (\(method\) (?<method>[^\s]+)|\(model\) (?<model>[^\s]+))?)?/;
|
|
63
|
+
function parseStainlessPath(stainlessPath) {
|
|
64
|
+
const match = stainlessPath.match(StainlessPathPattern);
|
|
65
|
+
if (!match?.groups) return null;
|
|
66
|
+
return {
|
|
67
|
+
resource: match.groups.resource?.split(".") ?? null,
|
|
68
|
+
method: match.groups.method ?? null,
|
|
69
|
+
model: match.groups.model ?? null,
|
|
70
|
+
routable: match.groups.model ? match[1] : match[0]
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function trimStainlessPath(stainlessPath) {
|
|
74
|
+
return stainlessPath.replace(/ > \([^\s]+\)$/, "");
|
|
75
|
+
}
|
|
76
|
+
function getResource(stainlessPath) {
|
|
77
|
+
return parseStainlessPath(stainlessPath)?.resource?.[0];
|
|
78
|
+
}
|
|
79
|
+
function parseRoute(basePath, route) {
|
|
80
|
+
if (!route.startsWith(basePath)) return {
|
|
81
|
+
stainlessPath: "",
|
|
82
|
+
language: DefaultLanguage
|
|
83
|
+
};
|
|
84
|
+
if (basePath && route.startsWith(basePath)) route = route.slice(basePath.length);
|
|
85
|
+
let stainlessPath = "";
|
|
86
|
+
let elements = route.slice(1).split("/");
|
|
87
|
+
let language = DefaultLanguage;
|
|
88
|
+
if (elements[0] && Languages.includes(elements[0])) {
|
|
89
|
+
language = elements[0];
|
|
90
|
+
elements = elements.slice(1);
|
|
91
|
+
}
|
|
92
|
+
while (elements.length > 0) switch (elements.shift()) {
|
|
93
|
+
case "resources":
|
|
94
|
+
stainlessPath += `(resource) ${elements.shift()}`;
|
|
95
|
+
break;
|
|
96
|
+
case "subresources":
|
|
97
|
+
stainlessPath += `.${elements.shift()}`;
|
|
98
|
+
break;
|
|
99
|
+
case "methods":
|
|
100
|
+
stainlessPath += ` > (method) ${elements.shift()}`;
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
stainlessPath,
|
|
105
|
+
language
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function generateRoute(basePath, language, stainlessPath) {
|
|
109
|
+
const parsedPath = parseStainlessPath(stainlessPath);
|
|
110
|
+
if (!parsedPath) return null;
|
|
111
|
+
const path = [basePath.endsWith("/") ? basePath.slice(0, -1) : basePath];
|
|
112
|
+
if (language && language !== DefaultLanguage) path.push(language);
|
|
113
|
+
const resources = parsedPath.resource.flatMap((name, index) => [index > 0 ? "subresources" : "resources", name]);
|
|
114
|
+
const resourcePath = parsedPath.model ? resources.slice(0, 2) : resources;
|
|
115
|
+
path.push(...resourcePath);
|
|
116
|
+
if (parsedPath.method) path.push("methods", parsedPath.method);
|
|
117
|
+
return stainlessPath.length > parsedPath.routable.length ? `${path.join("/")}#${encodeURIComponent(stainlessPath)}` : path.join("/");
|
|
118
|
+
}
|
|
119
|
+
function* walkResource(resource, path, includeModels) {
|
|
120
|
+
yield {
|
|
121
|
+
data: resource,
|
|
122
|
+
path
|
|
123
|
+
};
|
|
124
|
+
for (const data of Object.values(resource.methods)) yield {
|
|
125
|
+
data,
|
|
126
|
+
path: [
|
|
127
|
+
...path,
|
|
128
|
+
"methods",
|
|
129
|
+
data.name
|
|
130
|
+
]
|
|
131
|
+
};
|
|
132
|
+
if (includeModels) for (const data of Object.values(resource.models)) yield {
|
|
133
|
+
data,
|
|
134
|
+
path: [
|
|
135
|
+
...path,
|
|
136
|
+
"models",
|
|
137
|
+
data.name
|
|
138
|
+
]
|
|
139
|
+
};
|
|
140
|
+
for (const data of Object.values(resource.subresources ?? {})) yield* walkResource(data, [
|
|
141
|
+
...path,
|
|
142
|
+
"subresources",
|
|
143
|
+
data.name
|
|
144
|
+
]);
|
|
145
|
+
}
|
|
146
|
+
function* walkTree(spec, includeModels) {
|
|
147
|
+
for (const data of Object.values(spec.resources)) yield* walkResource(data, ["resources", data.name], includeModels);
|
|
148
|
+
}
|
|
149
|
+
function generateRouteList({ spec, languages, excludeLanguages = [] }) {
|
|
150
|
+
const entries = Array.from(walkTree(spec));
|
|
151
|
+
return (languages ?? spec.docs?.languages ?? ["http"]).filter((lang) => Languages.includes(lang) && lang !== "terraform").filter((lang) => !excludeLanguages?.includes(lang)).flatMap((language) => entries.map(({ path, data: { title, kind, stainlessPath } }) => ({
|
|
152
|
+
title,
|
|
153
|
+
kind,
|
|
154
|
+
language,
|
|
155
|
+
stainlessPath,
|
|
156
|
+
slug: (language === "http" ? path : [language, ...path]).join("/")
|
|
157
|
+
})));
|
|
158
|
+
}
|
|
159
|
+
function findNavigationPath(items, target) {
|
|
160
|
+
for (const item of Object.values(items)) {
|
|
161
|
+
if (item.stainlessPath === target) return [item.stainlessPath];
|
|
162
|
+
if (item.kind === "http_method") continue;
|
|
163
|
+
const path = findNavigationPath([...Object.values(item.methods ?? {}), ...Object.values(item.subresources ?? {})], target);
|
|
164
|
+
if (path) return [item.stainlessPath, ...path];
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function expandToElement(el) {
|
|
168
|
+
while (el) {
|
|
169
|
+
if (el instanceof HTMLDetailsElement) el.open = true;
|
|
170
|
+
el = el.parentElement;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function scrollToPath(stainlessPath) {
|
|
174
|
+
const el = document.getElementById(stainlessPath);
|
|
175
|
+
if (el) {
|
|
176
|
+
expandToElement(el);
|
|
177
|
+
el.scrollIntoView({ behavior: "smooth" });
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function updateHistory(basePath, language, stainlessPath) {
|
|
181
|
+
const path = generateRoute(basePath, language, stainlessPath);
|
|
182
|
+
window.history.pushState({
|
|
183
|
+
stainlessPath,
|
|
184
|
+
language
|
|
185
|
+
}, "", path);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
//#endregion
|
|
189
|
+
export { walkTree as _, findNavigationPath as a, getLanguageSnippet as c, parseRoute as d, parseStainlessPath as f, updateHistory as g, trimStainlessPath as h, expandToElement as i, getResource as l, scrollToPath as m, Languages as n, generateRoute as o, routing_exports as p, SupportedLanguageSyntaxes as r, generateRouteList as s, LanguageNames as t, isSupportedLanguage as u };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as SDKJSON from "@stainless/sdk-json";
|
|
2
|
+
|
|
3
|
+
//#region src/routing.d.ts
|
|
4
|
+
declare namespace routing_d_exports {
|
|
5
|
+
export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
|
|
6
|
+
}
|
|
7
|
+
declare const Languages: readonly ["http", "node", "python", "go", "typescript", "terraform", "ruby", "java", "kotlin"];
|
|
8
|
+
declare const SupportedLanguageSyntaxes: string[];
|
|
9
|
+
type DocsLanguage = (typeof Languages)[number];
|
|
10
|
+
declare const LanguageNames: Record<DocsLanguage, string>;
|
|
11
|
+
declare function getLanguageSnippet(language: DocsLanguage): "node.default" | "go.default" | "python.default" | "terraform.default" | "http.curl" | "typescript.default" | "ruby.default" | "java.default" | "kotlin.default";
|
|
12
|
+
declare function isSupportedLanguage(language: string): language is DocsLanguage;
|
|
13
|
+
type ParsedStainlessPath = ReturnType<typeof parseStainlessPath>;
|
|
14
|
+
declare function parseStainlessPath(stainlessPath: string): {
|
|
15
|
+
resource: string[] | null;
|
|
16
|
+
method: string | null;
|
|
17
|
+
model: string | null;
|
|
18
|
+
routable: string | undefined;
|
|
19
|
+
} | null;
|
|
20
|
+
declare function trimStainlessPath(stainlessPath: string): string;
|
|
21
|
+
declare function getResource(stainlessPath: string): string | undefined;
|
|
22
|
+
declare function parseRoute(basePath: string, route: string): {
|
|
23
|
+
stainlessPath: string;
|
|
24
|
+
language: DocsLanguage;
|
|
25
|
+
};
|
|
26
|
+
declare function generateRoute(basePath: string, language: string, stainlessPath: string): string | null;
|
|
27
|
+
type SpecTreeEntry = {
|
|
28
|
+
data: SDKJSON.Method | SDKJSON.Resource | SDKJSON.Model;
|
|
29
|
+
path: string[];
|
|
30
|
+
};
|
|
31
|
+
declare function walkTree(spec: SDKJSON.Spec, includeModels?: boolean): Generator<SpecTreeEntry, void, any>;
|
|
32
|
+
type RouteEntry = {
|
|
33
|
+
title: string;
|
|
34
|
+
kind: SpecTreeEntry['data']['kind'];
|
|
35
|
+
language: DocsLanguage;
|
|
36
|
+
stainlessPath: string;
|
|
37
|
+
slug: string;
|
|
38
|
+
};
|
|
39
|
+
declare function generateRouteList({
|
|
40
|
+
spec,
|
|
41
|
+
languages,
|
|
42
|
+
excludeLanguages
|
|
43
|
+
}: {
|
|
44
|
+
spec: SDKJSON.Spec;
|
|
45
|
+
languages?: DocsLanguage[];
|
|
46
|
+
excludeLanguages?: DocsLanguage[];
|
|
47
|
+
}): RouteEntry[];
|
|
48
|
+
type ResourceOrMethod = SDKJSON.Resource | SDKJSON.Method;
|
|
49
|
+
declare function findNavigationPath(items: ResourceOrMethod[], target: string): string[] | undefined;
|
|
50
|
+
declare function expandToElement(el: HTMLElement | null): void;
|
|
51
|
+
declare function scrollToPath(stainlessPath: string): void;
|
|
52
|
+
declare function updateHistory(basePath: string, language: DocsLanguage, stainlessPath: string): void;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { routing_d_exports as _, RouteEntry as a, updateHistory as b, expandToElement as c, generateRouteList as d, getLanguageSnippet as f, parseStainlessPath as g, parseRoute as h, ParsedStainlessPath as i, findNavigationPath as l, isSupportedLanguage as m, LanguageNames as n, SpecTreeEntry as o, getResource as p, Languages as r, SupportedLanguageSyntaxes as s, DocsLanguage as t, generateRoute as u, scrollToPath as v, walkTree as x, trimStainlessPath as y };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as RouteEntry, b as updateHistory, c as expandToElement, d as generateRouteList, f as getLanguageSnippet, g as parseStainlessPath, h as parseRoute, i as ParsedStainlessPath, l as findNavigationPath, m as isSupportedLanguage, n as LanguageNames, o as SpecTreeEntry, p as getResource, r as Languages, s as SupportedLanguageSyntaxes, t as DocsLanguage, u as generateRoute, v as scrollToPath, x as walkTree, y as trimStainlessPath } from "./routing-ByeZ2P3d.js";
|
|
2
|
+
export { DocsLanguage, LanguageNames, Languages, ParsedStainlessPath, RouteEntry, SpecTreeEntry, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
|
package/dist/routing.js
CHANGED
|
@@ -1,180 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"node",
|
|
5
|
-
"python",
|
|
6
|
-
"go",
|
|
7
|
-
"typescript",
|
|
8
|
-
"terraform",
|
|
9
|
-
"ruby",
|
|
10
|
-
"java",
|
|
11
|
-
"kotlin"
|
|
12
|
-
];
|
|
13
|
-
var SupportedLanguageSyntaxes = [
|
|
14
|
-
"http",
|
|
15
|
-
"javascript",
|
|
16
|
-
"python",
|
|
17
|
-
"go",
|
|
18
|
-
"typescript",
|
|
19
|
-
"terraform",
|
|
20
|
-
"ruby",
|
|
21
|
-
"java",
|
|
22
|
-
"kotlin"
|
|
23
|
-
];
|
|
24
|
-
var LanguageNames = {
|
|
25
|
-
http: "HTTP",
|
|
26
|
-
node: "TypeScript",
|
|
27
|
-
typescript: "TypeScript",
|
|
28
|
-
python: "Python",
|
|
29
|
-
go: "Go",
|
|
30
|
-
ruby: "Ruby",
|
|
31
|
-
java: "Java",
|
|
32
|
-
kotlin: "Kotlin",
|
|
33
|
-
terraform: "Terraform"
|
|
34
|
-
};
|
|
35
|
-
function getLanguageSnippet(language) {
|
|
36
|
-
return language === "http" ? "http.curl" : `${language}.default`;
|
|
37
|
-
}
|
|
38
|
-
function isSupportedLanguage(language) {
|
|
39
|
-
return Languages.includes(language);
|
|
40
|
-
}
|
|
41
|
-
var DefaultLanguage = "http";
|
|
42
|
-
var StainlessPathPattern = /(\(resource\) (?<resource>[^\s]+))( > (\(method\) (?<method>[^\s]+)|\(model\) (?<model>[^\s]+))?)?/;
|
|
43
|
-
function parseStainlessPath(stainlessPath) {
|
|
44
|
-
const match = stainlessPath.match(StainlessPathPattern);
|
|
45
|
-
if (!match) return null;
|
|
46
|
-
return {
|
|
47
|
-
resource: match.groups.resource.split("."),
|
|
48
|
-
method: match.groups.method ?? null,
|
|
49
|
-
model: match.groups.model ?? null,
|
|
50
|
-
routable: match.groups.model ? match[1] : match[0]
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function trimStainlessPath(stainlessPath) {
|
|
54
|
-
return stainlessPath.replace(/ > \([^\s]+\)$/, "");
|
|
55
|
-
}
|
|
56
|
-
function getResource(stainlessPath) {
|
|
57
|
-
const parsed = parseStainlessPath(stainlessPath);
|
|
58
|
-
return parsed?.resource[0];
|
|
59
|
-
}
|
|
60
|
-
function parseRoute(basePath, route) {
|
|
61
|
-
if (!route.startsWith(basePath)) return { stainlessPath: "", language: DefaultLanguage };
|
|
62
|
-
if (basePath && route.startsWith(basePath)) route = route.slice(basePath.length);
|
|
63
|
-
let stainlessPath = "";
|
|
64
|
-
let elements = route.slice(1).split("/");
|
|
65
|
-
let language = DefaultLanguage;
|
|
66
|
-
if (elements[0] && Languages.includes(elements[0])) {
|
|
67
|
-
language = elements[0];
|
|
68
|
-
elements = elements.slice(1);
|
|
69
|
-
}
|
|
70
|
-
while (elements.length > 0) {
|
|
71
|
-
const element = elements.shift();
|
|
72
|
-
switch (element) {
|
|
73
|
-
case "resources":
|
|
74
|
-
stainlessPath += `(resource) ${elements.shift()}`;
|
|
75
|
-
break;
|
|
76
|
-
case "subresources":
|
|
77
|
-
stainlessPath += `.${elements.shift()}`;
|
|
78
|
-
break;
|
|
79
|
-
case "methods":
|
|
80
|
-
stainlessPath += ` > (method) ${elements.shift()}`;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return { stainlessPath, language };
|
|
85
|
-
}
|
|
86
|
-
function generateRoute(basePath, language, stainlessPath) {
|
|
87
|
-
const parsedPath = parseStainlessPath(stainlessPath);
|
|
88
|
-
if (!parsedPath) return null;
|
|
89
|
-
const path = [basePath.endsWith("/") ? basePath.slice(0, -1) : basePath];
|
|
90
|
-
if (language && language !== DefaultLanguage) path.push(language);
|
|
91
|
-
const resources = parsedPath.resource.flatMap((name, index) => [
|
|
92
|
-
index > 0 ? "subresources" : "resources",
|
|
93
|
-
name
|
|
94
|
-
]);
|
|
95
|
-
const resourcePath = parsedPath.model ? resources.slice(0, 2) : resources;
|
|
96
|
-
path.push(...resourcePath);
|
|
97
|
-
if (parsedPath.method) path.push("methods", parsedPath.method);
|
|
98
|
-
return stainlessPath.length > parsedPath.routable.length ? `${path.join("/")}#${encodeURIComponent(stainlessPath)}` : path.join("/");
|
|
99
|
-
}
|
|
100
|
-
function* walkResource(resource, path, includeModels) {
|
|
101
|
-
yield { data: resource, path };
|
|
102
|
-
for (const data of Object.values(resource.methods)) {
|
|
103
|
-
yield { data, path: [...path, "methods", data.name] };
|
|
104
|
-
}
|
|
105
|
-
if (includeModels)
|
|
106
|
-
for (const data of Object.values(resource.models)) {
|
|
107
|
-
yield { data, path: [...path, "models", data.name] };
|
|
108
|
-
}
|
|
109
|
-
for (const data of Object.values(resource.subresources ?? {})) {
|
|
110
|
-
yield* walkResource(data, [...path, "subresources", data.name]);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
function* walkTree(spec, includeModels) {
|
|
114
|
-
for (const data of Object.values(spec.resources)) {
|
|
115
|
-
yield* walkResource(data, ["resources", data.name], includeModels);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
function generateRouteList({
|
|
119
|
-
spec,
|
|
120
|
-
languages,
|
|
121
|
-
excludeLanguages = []
|
|
122
|
-
}) {
|
|
123
|
-
const entries = Array.from(walkTree(spec));
|
|
124
|
-
const langs = languages ?? spec.docs?.languages ?? ["http"];
|
|
125
|
-
return langs.filter((lang) => Languages.includes(lang) && lang !== "terraform").filter((lang) => !excludeLanguages?.includes(lang)).flatMap(
|
|
126
|
-
(language) => entries.map(({ path, data: { title, kind, stainlessPath } }) => ({
|
|
127
|
-
title,
|
|
128
|
-
kind,
|
|
129
|
-
language,
|
|
130
|
-
stainlessPath,
|
|
131
|
-
slug: (language === "http" ? path : [language, ...path]).join("/")
|
|
132
|
-
}))
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
function findNavigationPath(items, target) {
|
|
136
|
-
for (const item of Object.values(items)) {
|
|
137
|
-
if (item.stainlessPath === target) return [item.stainlessPath];
|
|
138
|
-
if (item.kind === "http_method") continue;
|
|
139
|
-
const path = findNavigationPath(
|
|
140
|
-
[...Object.values(item.methods ?? {}), ...Object.values(item.subresources ?? {})],
|
|
141
|
-
target
|
|
142
|
-
);
|
|
143
|
-
if (path) return [item.stainlessPath, ...path];
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
function expandToElement(el) {
|
|
147
|
-
while (el) {
|
|
148
|
-
if (el.tagName === "DETAILS") el["open"] = true;
|
|
149
|
-
el = el.parentElement;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function scrollToPath(stainlessPath) {
|
|
153
|
-
const el = document.getElementById(stainlessPath);
|
|
154
|
-
if (el) {
|
|
155
|
-
expandToElement(el);
|
|
156
|
-
el.scrollIntoView({ behavior: "smooth" });
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function updateHistory(basePath, language, stainlessPath) {
|
|
160
|
-
const path = generateRoute(basePath, language, stainlessPath);
|
|
161
|
-
window.history.pushState({ stainlessPath, language }, "", path);
|
|
162
|
-
}
|
|
163
|
-
export {
|
|
164
|
-
LanguageNames,
|
|
165
|
-
Languages,
|
|
166
|
-
SupportedLanguageSyntaxes,
|
|
167
|
-
expandToElement,
|
|
168
|
-
findNavigationPath,
|
|
169
|
-
generateRoute,
|
|
170
|
-
generateRouteList,
|
|
171
|
-
getLanguageSnippet,
|
|
172
|
-
getResource,
|
|
173
|
-
isSupportedLanguage,
|
|
174
|
-
parseRoute,
|
|
175
|
-
parseStainlessPath,
|
|
176
|
-
scrollToPath,
|
|
177
|
-
trimStainlessPath,
|
|
178
|
-
updateHistory,
|
|
179
|
-
walkTree
|
|
180
|
-
};
|
|
1
|
+
import { _ as walkTree, a as findNavigationPath, c as getLanguageSnippet, d as parseRoute, f as parseStainlessPath, g as updateHistory, h as trimStainlessPath, i as expandToElement, l as getResource, m as scrollToPath, n as Languages, o as generateRoute, r as SupportedLanguageSyntaxes, s as generateRouteList, t as LanguageNames, u as isSupportedLanguage } from "./routing-8itEXLx6.js";
|
|
2
|
+
|
|
3
|
+
export { LanguageNames, Languages, SupportedLanguageSyntaxes, expandToElement, findNavigationPath, generateRoute, generateRouteList, getLanguageSnippet, getResource, isSupportedLanguage, parseRoute, parseStainlessPath, scrollToPath, trimStainlessPath, updateHistory, walkTree };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { t as DocsLanguage } from "./routing-ByeZ2P3d.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
4
|
+
import * as SDKJSON from "@stainless/sdk-json";
|
|
5
|
+
|
|
6
|
+
//#region src/components/sdk.d.ts
|
|
7
|
+
type PropertyModelContextType = {
|
|
8
|
+
modelPath?: string;
|
|
9
|
+
propertyPath?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const PropertyModelContext: React$1.Context<PropertyModelContextType>;
|
|
12
|
+
declare function usePropertyModel(): PropertyModelContextType;
|
|
13
|
+
type ReferenceNestingContextType = string[];
|
|
14
|
+
declare const ReferenceNestingContext: React$1.Context<ReferenceNestingContextType>;
|
|
15
|
+
declare function useReferenceNesting(): ReferenceNestingContextType;
|
|
16
|
+
type SDKSnippetLanguagesType = Record<SDKJSON.SnippetLanguage, {
|
|
17
|
+
name: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
}>;
|
|
20
|
+
declare const SDKSnippetLanguages: SDKSnippetLanguagesType;
|
|
21
|
+
type TransformRequestSnippetFn = ({
|
|
22
|
+
snippet,
|
|
23
|
+
language
|
|
24
|
+
}: {
|
|
25
|
+
snippet: string;
|
|
26
|
+
language: DocsLanguage;
|
|
27
|
+
}) => string;
|
|
28
|
+
type SDKChildrenProps = {
|
|
29
|
+
paths: SDKJSON.ID[];
|
|
30
|
+
expand?: boolean;
|
|
31
|
+
depth?: number;
|
|
32
|
+
};
|
|
33
|
+
declare function SDKChildren({
|
|
34
|
+
paths,
|
|
35
|
+
expand,
|
|
36
|
+
depth
|
|
37
|
+
}: SDKChildrenProps): react_jsx_runtime19.JSX.Element;
|
|
38
|
+
type SDKDeclarationProps = {
|
|
39
|
+
path: string;
|
|
40
|
+
expand?: boolean;
|
|
41
|
+
depth?: number;
|
|
42
|
+
};
|
|
43
|
+
declare function SDKDeclaration({
|
|
44
|
+
path,
|
|
45
|
+
expand,
|
|
46
|
+
depth
|
|
47
|
+
}: SDKDeclarationProps): react_jsx_runtime19.JSX.Element;
|
|
48
|
+
type SDKConstraintsProps = {
|
|
49
|
+
constraints?: Record<string, any>;
|
|
50
|
+
};
|
|
51
|
+
declare function SDKConstraints({
|
|
52
|
+
constraints
|
|
53
|
+
}: SDKConstraintsProps): react_jsx_runtime19.JSX.Element | undefined;
|
|
54
|
+
type SDKIconProps = {
|
|
55
|
+
language: SDKJSON.SnippetLanguage;
|
|
56
|
+
size?: number;
|
|
57
|
+
};
|
|
58
|
+
declare function SDKIcon({
|
|
59
|
+
language
|
|
60
|
+
}: SDKIconProps): react_jsx_runtime19.JSX.Element | null;
|
|
61
|
+
type SDKRequestTitleProps = {
|
|
62
|
+
snippetLanguage: SDKJSON.SnippetLanguage;
|
|
63
|
+
};
|
|
64
|
+
declare function SDKRequestTitle({
|
|
65
|
+
snippetLanguage
|
|
66
|
+
}: SDKRequestTitleProps): react_jsx_runtime19.JSX.Element;
|
|
67
|
+
type SDKExampleProps = {
|
|
68
|
+
method: SDKJSON.Method;
|
|
69
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
70
|
+
};
|
|
71
|
+
declare function SDKExample({
|
|
72
|
+
method,
|
|
73
|
+
transformRequestSnippet
|
|
74
|
+
}: SDKExampleProps): react_jsx_runtime19.JSX.Element;
|
|
75
|
+
type SDKMethodProps = {
|
|
76
|
+
method: SDKJSON.Method;
|
|
77
|
+
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
78
|
+
};
|
|
79
|
+
declare function SDKMethodHeader({
|
|
80
|
+
method
|
|
81
|
+
}: SDKMethodProps): react_jsx_runtime19.JSX.Element;
|
|
82
|
+
declare function SDKMethodInfo({
|
|
83
|
+
method
|
|
84
|
+
}: SDKMethodProps): react_jsx_runtime19.JSX.Element;
|
|
85
|
+
declare function SDKMethod({
|
|
86
|
+
method,
|
|
87
|
+
transformRequestSnippet
|
|
88
|
+
}: SDKMethodProps): react_jsx_runtime19.JSX.Element | undefined;
|
|
89
|
+
type SDKModelProps = {
|
|
90
|
+
model: SDKJSON.Model;
|
|
91
|
+
};
|
|
92
|
+
declare function SDKModel({
|
|
93
|
+
model
|
|
94
|
+
}: SDKModelProps): react_jsx_runtime19.JSX.Element | null;
|
|
95
|
+
type SDKReferenceProps = {
|
|
96
|
+
stainlessPath: string;
|
|
97
|
+
children?: React$1.ReactNode;
|
|
98
|
+
};
|
|
99
|
+
declare function SDKReference({
|
|
100
|
+
stainlessPath,
|
|
101
|
+
children
|
|
102
|
+
}: SDKReferenceProps): string | number | bigint | boolean | react_jsx_runtime19.JSX.Element | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined;
|
|
103
|
+
type SDKLanguageBlockProps = {
|
|
104
|
+
language: DocsLanguage;
|
|
105
|
+
version: string;
|
|
106
|
+
install: string;
|
|
107
|
+
links: {
|
|
108
|
+
repo: string;
|
|
109
|
+
docs: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
declare function SDKLanguageBlock({
|
|
113
|
+
language,
|
|
114
|
+
version,
|
|
115
|
+
install,
|
|
116
|
+
links
|
|
117
|
+
}: SDKLanguageBlockProps): react_jsx_runtime19.JSX.Element;
|
|
118
|
+
//#endregion
|
|
119
|
+
export { TransformRequestSnippetFn as C, SDKSnippetLanguagesType as S, useReferenceNesting as T, SDKModelProps as _, SDKChildren as a, SDKRequestTitleProps as b, SDKDeclaration as c, SDKLanguageBlock as d, SDKMethod as f, SDKModel as g, SDKMethodProps as h, ReferenceNestingContextType as i, SDKExample as l, SDKMethodInfo as m, PropertyModelContextType as n, SDKConstraints as o, SDKMethodHeader as p, ReferenceNestingContext as r, SDKConstraintsProps as s, PropertyModelContext as t, SDKIcon as u, SDKReference as v, usePropertyModel as w, SDKSnippetLanguages as x, SDKRequestTitle as y };
|