@stainless-api/docs-ui 0.1.0-beta.67 → 0.1.0-beta.69
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-qxCW6sK2.js → breadcrumbs-DA4WgDhR.js} +2 -2
- package/dist/{cli-ByPDdxBS.js → cli-MlcHZWvQ.js} +14 -5
- package/dist/{component-CjdWk4ni.js → component-C7n1bZ-Z.js} +2 -2
- package/dist/{component-generics-BBuevgK_.d.ts → component-generics-zU0Pqx8m.d.ts} +2 -2
- package/dist/components/MaskedInput.d.ts +1 -1
- package/dist/components/breadcrumbs.js +2 -2
- package/dist/components/icons.d.ts +12 -12
- package/dist/components/index.d.ts +9 -9
- package/dist/components/index.js +6 -6
- package/dist/components/method.d.ts +1 -1
- package/dist/components/overview.d.ts +1 -1
- package/dist/components/overview.js +2 -2
- package/dist/components/primitives.d.ts +1 -1
- package/dist/components/primitives.js +1 -1
- package/dist/components/properties.d.ts +1 -1
- package/dist/components/sdk-sidebar.d.ts +1 -1
- package/dist/components/sdk-sidebar.js +1 -1
- package/dist/components/sdk.d.ts +1 -1
- package/dist/components/sdk.js +1 -1
- package/dist/components/snippets.d.ts +2 -2
- package/dist/components/stl-sidebar.d.ts +1 -1
- package/dist/{components-BPWzaaJS.js → components-Bu-V0Ani.js} +5 -5
- package/dist/contexts/component-generics.d.ts +1 -1
- package/dist/contexts/component-types.d.ts +10 -10
- package/dist/contexts/component.d.ts +13 -13
- package/dist/contexts/component.js +11 -11
- package/dist/contexts/docs.d.ts +1 -1
- package/dist/contexts/index.d.ts +14 -14
- package/dist/contexts/markdown.d.ts +1 -1
- package/dist/contexts/navigation.d.ts +1 -1
- package/dist/contexts/use-components.d.ts +9 -9
- package/dist/{docs-BhIfadtZ.d.ts → docs-C1hj7a7l.d.ts} +3 -3
- package/dist/{http-DwJsFd9q.js → http-Bg6D0bNX.js} +33 -8
- package/dist/{index-BGZwPcKG.d.ts → index-CCxFSaje.d.ts} +41 -39
- package/dist/{index-CU1fzYyr.d.ts → index-CaB6Jh8S.d.ts} +8 -8
- package/dist/index.d.ts +14 -14
- package/dist/index.js +12 -12
- package/dist/languages/cli.d.ts +10 -10
- package/dist/languages/cli.js +8 -8
- package/dist/languages/csharp.d.ts +10 -10
- package/dist/languages/go.d.ts +10 -10
- package/dist/languages/http.d.ts +10 -10
- package/dist/languages/http.js +7 -7
- package/dist/languages/index.d.ts +10 -10
- package/dist/languages/index.js +10 -10
- package/dist/languages/java.d.ts +10 -10
- package/dist/languages/python.d.ts +10 -10
- package/dist/languages/ruby.d.ts +10 -10
- package/dist/languages/ruby.js +1 -1
- package/dist/languages/terraform.d.ts +10 -10
- package/dist/languages/typescript.d.ts +10 -10
- package/dist/{languages-Doc82_aw.js → languages-kmF_JEqJ.js} +3 -3
- package/dist/markdown/index.d.ts +1 -1
- package/dist/markdown/index.js +11 -11
- package/dist/markdown/printer.js +11 -11
- package/dist/markdown/utils.d.ts +1 -1
- package/dist/{markdown-D83YEroZ.d.ts → markdown-Dvsw4Rrr.d.ts} +2 -2
- package/dist/{method-BZzpQ6yS.d.ts → method-DPnfsySL.d.ts} +6 -6
- package/dist/{navigation-CMc4Aqw5.d.ts → navigation-C7KdkOOQ.d.ts} +2 -2
- package/dist/{overview-CD8aZ-q6.d.ts → overview-CXNo7yhX.d.ts} +6 -6
- package/dist/{overview-FVLGi7mE.js → overview-DFwfIK6k.js} +3 -3
- package/dist/{primitives-WC1BbBHN.js → primitives-DJEqe_r1.js} +1 -1
- package/dist/{primitives-DhGxFYx6.d.ts → primitives-Dt0u9KhI.d.ts} +11 -11
- package/dist/{properties-Lb6C4q9N.d.ts → properties-BYmc18KM.d.ts} +5 -5
- package/dist/{routing-B7QoUwlD.js → routing-C64k4fmX.js} +4 -1
- package/dist/routing.js +1 -1
- package/dist/{ruby-CHdEJiJl.js → ruby-BncKp6hd.js} +1 -1
- package/dist/{sdk-PiHLvMdV.d.ts → sdk-7I25t5FC.d.ts} +14 -14
- package/dist/{sdk-CMMvOAdj.js → sdk-B69ZT1zY.js} +35 -3
- package/dist/{sdk-sidebar-Ck41RYV8.d.ts → sdk-sidebar-JyrSuu5b.d.ts} +2 -2
- package/dist/{sdk-sidebar-FL7e7_BM.js → sdk-sidebar-V_MTkVw8.js} +1 -1
- package/dist/{snippets-DoY3fghd.d.ts → snippets-DZM_ogqa.d.ts} +8 -8
- package/dist/spec.d.ts +2 -2
- package/dist/spec.js +2 -2
- package/dist/{stl-sidebar-CNGimF4q.d.ts → stl-sidebar-BR04ktwN.d.ts} +2 -2
- package/dist/styles/main.css +7 -0
- package/dist/styles.css +7 -0
- package/dist/{utils-KWHcUI-r.js → utils-DPbkW1Tz.js} +24 -2
- package/dist/utils.d.ts +9 -3
- package/dist/utils.js +2 -2
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as ID, d as Method, f as Model, g as SnippetLanguage, o as HasStainlessPath, t as BaseDeclaration } from "./index-CwjGm9zX.js";
|
|
2
2
|
import { t as DocsLanguage } from "./routing-Cm_9XJiQ.js";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime42 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/sdk.d.ts
|
|
7
7
|
type PropertyModelContextType = {
|
|
@@ -33,7 +33,7 @@ declare function SDKChildren({
|
|
|
33
33
|
paths,
|
|
34
34
|
expand,
|
|
35
35
|
depth
|
|
36
|
-
}: SDKChildrenProps):
|
|
36
|
+
}: SDKChildrenProps): react_jsx_runtime42.JSX.Element;
|
|
37
37
|
type SDKDeclarationProps = {
|
|
38
38
|
path: string;
|
|
39
39
|
expand?: boolean;
|
|
@@ -43,26 +43,26 @@ declare function SDKDeclaration({
|
|
|
43
43
|
path,
|
|
44
44
|
expand,
|
|
45
45
|
depth
|
|
46
|
-
}: SDKDeclarationProps):
|
|
46
|
+
}: SDKDeclarationProps): react_jsx_runtime42.JSX.Element;
|
|
47
47
|
type SDKConstraintsProps = {
|
|
48
48
|
constraints?: Record<string, any>;
|
|
49
49
|
};
|
|
50
50
|
declare function SDKConstraints({
|
|
51
51
|
constraints
|
|
52
|
-
}: SDKConstraintsProps):
|
|
52
|
+
}: SDKConstraintsProps): react_jsx_runtime42.JSX.Element | undefined;
|
|
53
53
|
type SDKIconProps = {
|
|
54
54
|
language: SnippetLanguage;
|
|
55
55
|
size?: number;
|
|
56
56
|
};
|
|
57
57
|
declare function SDKIcon({
|
|
58
58
|
language
|
|
59
|
-
}: SDKIconProps):
|
|
59
|
+
}: SDKIconProps): react_jsx_runtime42.JSX.Element | null;
|
|
60
60
|
type SDKRequestTitleProps = {
|
|
61
61
|
snippetLanguage: SnippetLanguage;
|
|
62
62
|
};
|
|
63
63
|
declare function SDKRequestTitle({
|
|
64
64
|
snippetLanguage
|
|
65
|
-
}: SDKRequestTitleProps):
|
|
65
|
+
}: SDKRequestTitleProps): react_jsx_runtime42.JSX.Element;
|
|
66
66
|
type SDKExampleProps = {
|
|
67
67
|
method: Partial<Method> & HasStainlessPath;
|
|
68
68
|
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
@@ -70,31 +70,31 @@ type SDKExampleProps = {
|
|
|
70
70
|
declare function SDKExample({
|
|
71
71
|
method,
|
|
72
72
|
transformRequestSnippet
|
|
73
|
-
}: SDKExampleProps):
|
|
73
|
+
}: SDKExampleProps): react_jsx_runtime42.JSX.Element;
|
|
74
74
|
type SDKMethodProps = {
|
|
75
75
|
method: Method;
|
|
76
76
|
transformRequestSnippet?: TransformRequestSnippetFn;
|
|
77
77
|
};
|
|
78
78
|
declare function SDKMethodHeader({
|
|
79
79
|
method
|
|
80
|
-
}: SDKMethodProps):
|
|
80
|
+
}: SDKMethodProps): react_jsx_runtime42.JSX.Element;
|
|
81
81
|
declare function useStreamingResponse(method: BaseDeclaration): ID | undefined;
|
|
82
82
|
declare function SDKMethodInfo({
|
|
83
83
|
method
|
|
84
|
-
}: SDKMethodProps):
|
|
84
|
+
}: SDKMethodProps): react_jsx_runtime42.JSX.Element;
|
|
85
85
|
declare function SDKMethodNotImplemented({
|
|
86
86
|
method
|
|
87
|
-
}: SDKMethodProps):
|
|
87
|
+
}: SDKMethodProps): react_jsx_runtime42.JSX.Element;
|
|
88
88
|
declare function SDKMethod({
|
|
89
89
|
method,
|
|
90
90
|
transformRequestSnippet
|
|
91
|
-
}: SDKMethodProps):
|
|
91
|
+
}: SDKMethodProps): react_jsx_runtime42.JSX.Element;
|
|
92
92
|
type SDKModelProps = {
|
|
93
93
|
model: Model;
|
|
94
94
|
};
|
|
95
95
|
declare function SDKModel({
|
|
96
96
|
model
|
|
97
|
-
}: SDKModelProps):
|
|
97
|
+
}: SDKModelProps): react_jsx_runtime42.JSX.Element | null;
|
|
98
98
|
type SDKReferenceProps = {
|
|
99
99
|
stainlessPath: string;
|
|
100
100
|
children?: React$1.ReactNode;
|
|
@@ -102,7 +102,7 @@ type SDKReferenceProps = {
|
|
|
102
102
|
declare function SDKReference({
|
|
103
103
|
stainlessPath,
|
|
104
104
|
children
|
|
105
|
-
}: SDKReferenceProps): string | number | bigint | boolean | 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> |
|
|
105
|
+
}: SDKReferenceProps): string | number | bigint | boolean | 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> | react_jsx_runtime42.JSX.Element | null | undefined;
|
|
106
106
|
type SDKLanguageBlockProps = {
|
|
107
107
|
language: DocsLanguage;
|
|
108
108
|
version: string;
|
|
@@ -117,6 +117,6 @@ declare function SDKLanguageBlock({
|
|
|
117
117
|
version,
|
|
118
118
|
install,
|
|
119
119
|
links
|
|
120
|
-
}: SDKLanguageBlockProps):
|
|
120
|
+
}: SDKLanguageBlockProps): react_jsx_runtime42.JSX.Element;
|
|
121
121
|
//#endregion
|
|
122
122
|
export { SDKSnippetLanguagesType as C, useStreamingResponse as D, useReferenceNesting as E, SDKSnippetLanguages as S, usePropertyModel as T, SDKModel as _, SDKChildren as a, SDKRequestTitle as b, SDKDeclaration as c, SDKLanguageBlock as d, SDKMethod as f, SDKMethodProps as g, SDKMethodNotImplemented 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, SDKModelProps as v, TransformRequestSnippetFn as w, SDKRequestTitleProps as x, SDKReference as y };
|
|
@@ -3,7 +3,7 @@ import { n as useNavigation } from "./navigation-aoYZ_tl4.js";
|
|
|
3
3
|
import { n as useLanguageComponents } from "./contexts-CVj20VV4.js";
|
|
4
4
|
import { t as useComponents } from "./use-components-BUz3GbO4.js";
|
|
5
5
|
import { t as style_default } from "./style-HpXpcJ9v.js";
|
|
6
|
-
import { l as getLanguageSnippet, p as parseStainlessPath, s as generateRoute, t as LanguageNames } from "./routing-
|
|
6
|
+
import { l as getLanguageSnippet, p as parseStainlessPath, s as generateRoute, t as LanguageNames } from "./routing-C64k4fmX.js";
|
|
7
7
|
import { a as JavaIcon, c as PythonIcon, d as TypescriptIcon, i as GoIcon, l as RubyIcon, n as CSharpIcon, o as KotlinIcon, r as CurlIcon, s as PowershellIcon, t as CLIIcon, u as TerraformIcon } from "./icons-BYKn5X8E.js";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -46,10 +46,42 @@ function SDKChildren({ paths, expand, depth }) {
|
|
|
46
46
|
}, i))
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
+
function normalizeDeclaration(raw, http) {
|
|
50
|
+
console.log({
|
|
51
|
+
raw,
|
|
52
|
+
http
|
|
53
|
+
});
|
|
54
|
+
if (raw.kind === "JavaDeclProperty" && raw.type.kind === "JavaTypeString" && raw.constraints?.format === "binary") return {
|
|
55
|
+
...raw,
|
|
56
|
+
type: {
|
|
57
|
+
kind: "JavaTypeReference",
|
|
58
|
+
typeName: "InputStream"
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
if (http?.kind === "HttpDeclProperty" && http.type.kind === "HttpTypeString" && http.constraints?.format === "binary") switch (raw.kind) {
|
|
62
|
+
case "CLISchemaProperty":
|
|
63
|
+
case "CLIFlag":
|
|
64
|
+
case "HttpDeclProperty": return {
|
|
65
|
+
...raw,
|
|
66
|
+
type: {
|
|
67
|
+
kind: "HttpTypeBinary",
|
|
68
|
+
contentType: []
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
case "RubyDeclProperty": return {
|
|
72
|
+
...raw,
|
|
73
|
+
type: {
|
|
74
|
+
kind: "RubyTypeBinary",
|
|
75
|
+
contentType: []
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return raw;
|
|
80
|
+
}
|
|
49
81
|
function SDKDeclaration({ path, expand, depth = 0 }) {
|
|
50
82
|
const Lang = useLanguageComponents();
|
|
51
83
|
const Docs = useComponents();
|
|
52
|
-
const decl = useDeclaration(path, true);
|
|
84
|
+
const decl = normalizeDeclaration(useDeclaration(path, true), useDeclaration(path.replace(/ > \(schema\)$/, "") + " > (schema)", false, "http"));
|
|
53
85
|
const settings = useSettings();
|
|
54
86
|
const model = usePropertyModel();
|
|
55
87
|
const nesting = useReferenceNesting();
|
|
@@ -107,7 +139,7 @@ function SDKDeclaration({ path, expand, depth = 0 }) {
|
|
|
107
139
|
function SDKConstraints({ constraints }) {
|
|
108
140
|
if (constraints) return /* @__PURE__ */ jsx("div", {
|
|
109
141
|
className: style_default.PropertyConstraints,
|
|
110
|
-
children: Object.entries(constraints).map(([name, value]) => /* @__PURE__ */ jsxs("div", {
|
|
142
|
+
children: Object.entries(constraints).map(([name, value]) => name === "format" && value === "binary" ? null : /* @__PURE__ */ jsxs("div", {
|
|
111
143
|
className: style_default.PropertyConstraint,
|
|
112
144
|
children: [/* @__PURE__ */ jsx("span", {
|
|
113
145
|
className: style_default.PropertyConstraintName,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as Resource } from "./index-CwjGm9zX.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime41 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/sdk-sidebar.d.ts
|
|
5
5
|
type SDKSidebarProps = {
|
|
@@ -10,6 +10,6 @@ type SDKSidebarProps = {
|
|
|
10
10
|
*/
|
|
11
11
|
declare function SDKSidebar({
|
|
12
12
|
resources
|
|
13
|
-
}: SDKSidebarProps):
|
|
13
|
+
}: SDKSidebarProps): react_jsx_runtime41.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { SDKSidebarProps as n, SDKSidebar as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useNavigation } from "./navigation-aoYZ_tl4.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as isResourceEmpty } from "./utils-DPbkW1Tz.js";
|
|
3
3
|
import { t as StlSidebar } from "./stl-sidebar-WtimNrk1.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as Method, o as HasStainlessPath } from "./index-CwjGm9zX.js";
|
|
2
|
-
import { w as TransformRequestSnippetFn } from "./sdk-
|
|
2
|
+
import { w as TransformRequestSnippetFn } from "./sdk-7I25t5FC.js";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime55 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/snippets.d.ts
|
|
7
7
|
type SnippetCodeProps = {
|
|
@@ -12,7 +12,7 @@ type SnippetCodeProps = {
|
|
|
12
12
|
declare function SnippetCode({
|
|
13
13
|
content,
|
|
14
14
|
language
|
|
15
|
-
}: SnippetCodeProps):
|
|
15
|
+
}: SnippetCodeProps): react_jsx_runtime55.JSX.Element;
|
|
16
16
|
type SnippetProps = {
|
|
17
17
|
method: Partial<Method> & HasStainlessPath;
|
|
18
18
|
requestTitle?: React$1.ReactNode;
|
|
@@ -25,29 +25,29 @@ type SnippetContainerProps = {
|
|
|
25
25
|
};
|
|
26
26
|
declare function SnippetContainer({
|
|
27
27
|
children
|
|
28
|
-
}: SnippetContainerProps):
|
|
28
|
+
}: SnippetContainerProps): react_jsx_runtime55.JSX.Element;
|
|
29
29
|
type SnippetRequestContainerProps = {
|
|
30
30
|
children?: React$1.ReactNode;
|
|
31
31
|
signature?: string;
|
|
32
32
|
};
|
|
33
33
|
declare function SnippetRequestContainer({
|
|
34
34
|
children
|
|
35
|
-
}: SnippetRequestContainerProps):
|
|
35
|
+
}: SnippetRequestContainerProps): react_jsx_runtime55.JSX.Element;
|
|
36
36
|
declare function Snippet({
|
|
37
37
|
requestTitle,
|
|
38
38
|
method,
|
|
39
39
|
transformRequestSnippet
|
|
40
|
-
}: SnippetProps):
|
|
40
|
+
}: SnippetProps): react_jsx_runtime55.JSX.Element | null;
|
|
41
41
|
declare function SnippetButtons({
|
|
42
42
|
content
|
|
43
43
|
}: {
|
|
44
44
|
content: string;
|
|
45
|
-
}):
|
|
45
|
+
}): react_jsx_runtime55.JSX.Element;
|
|
46
46
|
declare function SnippetFooter(): React$1.ReactNode;
|
|
47
47
|
declare function SnippetResponse({
|
|
48
48
|
responses
|
|
49
49
|
}: {
|
|
50
50
|
responses: Method['exampleResponses'];
|
|
51
|
-
}):
|
|
51
|
+
}): react_jsx_runtime55.JSX.Element | null;
|
|
52
52
|
//#endregion
|
|
53
53
|
export { SnippetContainer as a, SnippetProps as c, SnippetResponse as d, SnippetCodeProps as i, SnippetRequestContainer as l, SnippetButtons as n, SnippetContainerProps as o, SnippetCode as r, SnippetFooter as s, Snippet as t, SnippetRequestContainerProps as u };
|
package/dist/spec.d.ts
CHANGED
|
@@ -36,13 +36,13 @@ declare function generateNavigation(resource: Partial<Resource>): {
|
|
|
36
36
|
declare function generateSpecForResource(spec: Spec, name: string, lang: DocsLanguage, transforms: SpecTransforms): Partial<Spec>;
|
|
37
37
|
declare function transform(spec: Spec, transforms: SpecTransforms): {
|
|
38
38
|
name: string;
|
|
39
|
-
lang: "
|
|
39
|
+
lang: "cli" | "csharp" | "go" | "http" | "java" | "kotlin" | "node" | "php" | "python" | "ruby" | "terraform" | "typescript";
|
|
40
40
|
spec: Partial<Spec>;
|
|
41
41
|
}[];
|
|
42
42
|
declare function split(spec: Spec, transforms?: SpecTransforms): {
|
|
43
43
|
resources: ReturnType<typeof transform>;
|
|
44
44
|
navigation: {
|
|
45
|
-
languages: ("
|
|
45
|
+
languages: ("go" | "http" | "java" | "kotlin" | "node" | "python" | "ruby" | "terraform" | "typescript")[] | undefined;
|
|
46
46
|
resources: {
|
|
47
47
|
[k: string]: {
|
|
48
48
|
title: string | undefined;
|
package/dist/spec.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Languages } from "./routing-
|
|
2
|
-
import {
|
|
1
|
+
import { n as Languages } from "./routing-C64k4fmX.js";
|
|
2
|
+
import { i as isResourceEmpty } from "./utils-DPbkW1Tz.js";
|
|
3
3
|
|
|
4
4
|
//#region src/spec.ts
|
|
5
5
|
const defaultTransforms = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/stl-sidebar.d.ts
|
|
5
5
|
declare module 'react' {
|
|
@@ -53,6 +53,6 @@ type StlSidebarProps = {
|
|
|
53
53
|
declare function StlSidebar({
|
|
54
54
|
entries,
|
|
55
55
|
withStarlightRestoration
|
|
56
|
-
}: StlSidebarProps):
|
|
56
|
+
}: StlSidebarProps): react_jsx_runtime21.JSX.Element;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { StlSidebarProps as a, StlSidebarLink as i, StlSidebarEntry as n, StlSidebarTarget as o, StlSidebarGroup as r, StlSidebar as t };
|
package/dist/styles/main.css
CHANGED
|
@@ -489,6 +489,13 @@
|
|
|
489
489
|
display: flex;
|
|
490
490
|
gap: 0.5rem;
|
|
491
491
|
flex-direction: column;
|
|
492
|
+
|
|
493
|
+
h5 .stl-ui-badge {
|
|
494
|
+
vertical-align: bottom;
|
|
495
|
+
margin-left: 0.5em;
|
|
496
|
+
margin-top: -1px;
|
|
497
|
+
transform: translateY(1px);
|
|
498
|
+
}
|
|
492
499
|
}
|
|
493
500
|
|
|
494
501
|
.stldocs-method-content-column {
|
package/dist/styles.css
CHANGED
|
@@ -2319,6 +2319,13 @@ a.stl-ui-button {
|
|
|
2319
2319
|
display: flex;
|
|
2320
2320
|
gap: 0.5rem;
|
|
2321
2321
|
flex-direction: column;
|
|
2322
|
+
|
|
2323
|
+
h5 .stl-ui-badge {
|
|
2324
|
+
vertical-align: bottom;
|
|
2325
|
+
margin-left: 0.5em;
|
|
2326
|
+
margin-top: -1px;
|
|
2327
|
+
transform: translateY(1px);
|
|
2328
|
+
}
|
|
2322
2329
|
}
|
|
2323
2330
|
|
|
2324
2331
|
.stldocs-method-content-column {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-BN_g-Awi.js";
|
|
2
|
-
import { p as parseStainlessPath } from "./routing-
|
|
2
|
+
import { p as parseStainlessPath } from "./routing-C64k4fmX.js";
|
|
3
3
|
|
|
4
4
|
//#region src/utils.ts
|
|
5
5
|
var utils_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
flatResources: () => flatResources,
|
|
7
|
+
getBodyParams: () => getBodyParams,
|
|
7
8
|
getResourceFromSpec: () => getResourceFromSpec,
|
|
8
9
|
isResourceEmpty: () => isResourceEmpty
|
|
9
10
|
});
|
|
@@ -27,6 +28,27 @@ function getResourceFromSpec(stainlessPath, spec) {
|
|
|
27
28
|
function isResourceEmpty(resource) {
|
|
28
29
|
return !(Object.values(resource.methods).length > 0 || Object.values(resource.models).length > 0 || Object.values(resource.subresources).length > 0);
|
|
29
30
|
}
|
|
31
|
+
function getBodyParams(decl) {
|
|
32
|
+
if (!decl.bodyParamsChildren) return null;
|
|
33
|
+
const keys = Object.keys(decl.bodyParamsChildren);
|
|
34
|
+
if (keys.length > 1) console.warn("multiple bodyParams content types in " + decl.stainlessPath + ":", keys);
|
|
35
|
+
const jsonKey = keys.find((e) => /[/+]json(;|$)/.test(e));
|
|
36
|
+
if (jsonKey) return {
|
|
37
|
+
params: decl.bodyParamsChildren[jsonKey],
|
|
38
|
+
encoding: "json"
|
|
39
|
+
};
|
|
40
|
+
const formDataKey = keys.find((e) => /^multipart\/form-data(;|$)/.test(e));
|
|
41
|
+
if (formDataKey) return {
|
|
42
|
+
params: decl.bodyParamsChildren[formDataKey],
|
|
43
|
+
encoding: "form-data"
|
|
44
|
+
};
|
|
45
|
+
const firstKey = keys[0];
|
|
46
|
+
if (firstKey) return {
|
|
47
|
+
params: decl.bodyParamsChildren[firstKey],
|
|
48
|
+
encoding: "unknown"
|
|
49
|
+
};
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
30
52
|
|
|
31
53
|
//#endregion
|
|
32
|
-
export { utils_exports as i,
|
|
54
|
+
export { utils_exports as a, isResourceEmpty as i, getBodyParams as n, getResourceFromSpec as r, flatResources as t };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as Spec, m as Resource } from "./index-CwjGm9zX.js";
|
|
1
|
+
import { _ as Spec, c as ID, m as Resource, s as HttpAST } from "./index-CwjGm9zX.js";
|
|
2
2
|
|
|
3
3
|
//#region src/utils.d.ts
|
|
4
4
|
declare namespace utils_d_exports {
|
|
5
|
-
export { flatResources, getResourceFromSpec, isResourceEmpty };
|
|
5
|
+
export { AssertExhaustive, HttpBodyEncoding, flatResources, getBodyParams, getResourceFromSpec, isResourceEmpty };
|
|
6
6
|
}
|
|
7
7
|
declare function flatResources(resources: Record<string, Resource> | undefined, parents: Resource[]): {
|
|
8
8
|
resource: Resource;
|
|
@@ -10,5 +10,11 @@ declare function flatResources(resources: Record<string, Resource> | undefined,
|
|
|
10
10
|
}[];
|
|
11
11
|
declare function getResourceFromSpec(stainlessPath: string | string[], spec: Spec): Resource | null;
|
|
12
12
|
declare function isResourceEmpty(resource: Resource): boolean;
|
|
13
|
+
type HttpBodyEncoding = 'json' | 'form-data' | 'unknown';
|
|
14
|
+
declare function getBodyParams(decl: HttpAST.HttpDeclFunction): {
|
|
15
|
+
params: ID[];
|
|
16
|
+
encoding: HttpBodyEncoding;
|
|
17
|
+
} | null;
|
|
18
|
+
type AssertExhaustive<T extends never> = T;
|
|
13
19
|
//#endregion
|
|
14
|
-
export { flatResources, getResourceFromSpec, isResourceEmpty, utils_d_exports as t };
|
|
20
|
+
export { AssertExhaustive, HttpBodyEncoding, flatResources, getBodyParams, getResourceFromSpec, isResourceEmpty, utils_d_exports as t };
|
package/dist/utils.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as
|
|
1
|
+
import { i as isResourceEmpty, n as getBodyParams, r as getResourceFromSpec, t as flatResources } from "./utils-DPbkW1Tz.js";
|
|
2
2
|
|
|
3
|
-
export { flatResources, getResourceFromSpec, isResourceEmpty };
|
|
3
|
+
export { flatResources, getBodyParams, getResourceFromSpec, isResourceEmpty };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/docs-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"version": "0.1.0-beta.69",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@markdoc/markdoc": "^0.5.4",
|
|
18
18
|
"clsx": "^2.1.1",
|
|
19
|
-
"htmlparser2": "^10.
|
|
19
|
+
"htmlparser2": "^10.1.0",
|
|
20
20
|
"lucide-react": "^0.562.0",
|
|
21
21
|
"@stainless-api/ui-primitives": "0.1.0-beta.47"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "24.10.9",
|
|
25
|
-
"@types/react": "19.2.
|
|
25
|
+
"@types/react": "19.2.10",
|
|
26
26
|
"@types/react-dom": "^19.2.3",
|
|
27
27
|
"dotenv": "17.2.3",
|
|
28
|
-
"react": "^19.2.
|
|
29
|
-
"react-dom": "^19.2.
|
|
28
|
+
"react": "^19.2.4",
|
|
29
|
+
"react-dom": "^19.2.4",
|
|
30
30
|
"tsdown": "^0.20.0",
|
|
31
31
|
"typescript": "5.9.3",
|
|
32
32
|
"@stainless/eslint-config": "0.1.0-beta.1",
|