@mintlify/msft-sdk 1.1.64 → 1.1.66
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/api-playground/ApiPlayground/components/PlaygroundModalWrapper.js +56 -52
- package/dist/api-playground-2/ApiExamples.js +21 -19
- package/dist/api-playground-2/OperationPage.js +64 -68
- package/dist/api-playground-2/Playground.js +5 -5
- package/dist/api-playground-2/components/Example/GeneratedRequestExample.js +105 -104
- package/dist/api-playground-2/components/Example/GeneratedResponseExample.js +6 -6
- package/dist/api-playground-2/components/Example/RequestExample.js +37 -37
- package/dist/api-playground-2/components/Request/InputSectionContainer.js +2 -2
- package/dist/api-playground-2/components/TypeDropdown.js +1 -1
- package/dist/components/Api/MethodPill.js +9 -8
- package/dist/components/apiPage.js +51 -40
- package/dist/components/content-components/code-block.js +9 -6
- package/dist/components/content-components/code-snippet.js +9 -6
- package/dist/components/docsPage.js +75 -61
- package/dist/components/nav-tree/index.js +2 -2
- package/dist/constants/snippetPresets.js +26 -35
- package/dist/index.d.ts +2 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,59 +1,63 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Transition as
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { Transition as c, TransitionChild as m } from "@headlessui/react";
|
|
3
3
|
import { Fragment as n } from "react";
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { zIndex as
|
|
4
|
+
import { createPortal as l } from "react-dom";
|
|
5
|
+
import { zIndex as d } from "../../../constants/zIndex.js";
|
|
6
6
|
import "@mintlify/validation";
|
|
7
7
|
import "@sindresorhus/slugify";
|
|
8
|
-
import { cn as
|
|
9
|
-
const
|
|
8
|
+
import { cn as s } from "../../../utils/cn.js";
|
|
9
|
+
const x = ({
|
|
10
10
|
isPlaygroundExpanded: e,
|
|
11
|
-
setIsPlaygroundExpanded:
|
|
11
|
+
setIsPlaygroundExpanded: i,
|
|
12
12
|
children: o
|
|
13
|
-
}) =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
)
|
|
13
|
+
}) => {
|
|
14
|
+
if (typeof window > "u") return null;
|
|
15
|
+
const r = document.querySelector(".mintlify-docs") ?? document.body;
|
|
16
|
+
return l(
|
|
17
|
+
/* @__PURE__ */ t(c, { show: e, as: n, children: /* @__PURE__ */ a("div", { className: s(d.Popup, "mint:fixed mint:z-100 mint:inset-0 mint:overflow-y-auto mint:p-4 mint:sm:p-6 mint:md:p-12"), children: [
|
|
18
|
+
/* @__PURE__ */ t(
|
|
19
|
+
m,
|
|
20
|
+
{
|
|
21
|
+
as: n,
|
|
22
|
+
enter: "mint:ease-out mint:duration-100",
|
|
23
|
+
enterFrom: "mint:opacity-0",
|
|
24
|
+
enterTo: "mint:opacity-100",
|
|
25
|
+
leave: "mint:ease-in mint:duration-50",
|
|
26
|
+
leaveFrom: "mint:opacity-100",
|
|
27
|
+
leaveTo: "mint:opacity-0",
|
|
28
|
+
children: /* @__PURE__ */ t(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: "mint:fixed mint:z-0 mint:inset-0 mint:bg-background-dark/20 mint:transition-opacity mint:backdrop-blur-sm",
|
|
32
|
+
onClick: () => i == null ? void 0 : i(!1)
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ t(
|
|
38
|
+
m,
|
|
39
|
+
{
|
|
40
|
+
as: n,
|
|
41
|
+
enter: "mint:ease-out mint:duration-100",
|
|
42
|
+
enterFrom: "mint:opacity-0 mint:scale-95",
|
|
43
|
+
enterTo: "mint:opacity-100 mint:scale-100",
|
|
44
|
+
leave: "mint:ease-in mint:duration-50",
|
|
45
|
+
leaveFrom: "mint:opacity-100 mint:scale-100",
|
|
46
|
+
leaveTo: "mint:opacity-0 mint:scale-95",
|
|
47
|
+
children: /* @__PURE__ */ t(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
"data-testid": "api-playground-modal",
|
|
51
|
+
className: "mint:relative mint:z-100 mint:flex mint:flex-col mint:mx-auto mint:max-w-screen-xl mint:transform mint:bg-background-light mint:dark:bg-background-dark mint:shadow-search mint:rounded-3xl mint:border-standard",
|
|
52
|
+
children: /* @__PURE__ */ t("div", { className: "mint:p-4", children: o })
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] }) }),
|
|
58
|
+
r
|
|
59
|
+
);
|
|
60
|
+
};
|
|
57
61
|
export {
|
|
58
|
-
|
|
62
|
+
x as PlaygroundModalWrapper
|
|
59
63
|
};
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as
|
|
2
|
+
import { useContext as x, useState as f, useMemo as u } from "react";
|
|
3
3
|
import { useDebouncedApiPlaygroundInputs as d } from "./hooks/usePlaygroundInputsStore.js";
|
|
4
|
-
import { CodeExampleLabelContext as
|
|
4
|
+
import { CodeExampleLabelContext as E } from "../contexts/CodeExampleLabelContext.js";
|
|
5
5
|
import { ApiReferenceContext2 as g } from "../contexts/ConfigContext.js";
|
|
6
|
-
import
|
|
7
|
-
import { clsx as
|
|
8
|
-
import { RequestExample as
|
|
9
|
-
import { ResponseExample as
|
|
10
|
-
import { initialApiPlaygroundInputs as
|
|
11
|
-
const
|
|
12
|
-
const { apiReferenceData2:
|
|
13
|
-
|
|
6
|
+
import D from "../components/Api/ErrorBoundary.js";
|
|
7
|
+
import { clsx as h } from "clsx";
|
|
8
|
+
import { RequestExample as R } from "./components/Example/RequestExample.js";
|
|
9
|
+
import { ResponseExample as A } from "./components/Example/ResponseExample.js";
|
|
10
|
+
import { initialApiPlaygroundInputs as C } from "./constants/index.js";
|
|
11
|
+
const j = ({ className: o, isModal: i = !1, apiReferenceData: a, noInputs: n = !1 }) => {
|
|
12
|
+
const { apiReferenceData2: m } = x(g), t = a || m, r = d(100), [p, l] = f();
|
|
13
|
+
console.log("[DEBUG] ApiExamples - Props apiReferenceData:", a), console.log("[DEBUG] ApiExamples - Context apiReferenceData2FromContext:", m), console.log("[DEBUG] ApiExamples - Final apiReferenceData2:", t), console.log("[DEBUG] ApiExamples - noInputs:", n), console.log("[DEBUG] ApiExamples - isModal:", i);
|
|
14
|
+
const s = u(
|
|
15
|
+
() => h(
|
|
14
16
|
"mint:w-full mint:xl:w-[28rem] mint:gap-6 mint:grid mint:grid-rows-[repeat(auto-fit,minmax(0,min-content))] mint:grid-rows mint:relative mint:max-h-[calc(100%-32px)] mint:min-h-[18rem]",
|
|
15
|
-
|
|
17
|
+
o
|
|
16
18
|
),
|
|
17
|
-
[
|
|
19
|
+
[o, i]
|
|
18
20
|
);
|
|
19
|
-
return /* @__PURE__ */ e(
|
|
21
|
+
return /* @__PURE__ */ e(E.Provider, { value: { selectedLabel: p, setSelectedLabel: l }, children: /* @__PURE__ */ e("div", { className: s, children: /* @__PURE__ */ c(D, { children: [
|
|
20
22
|
/* @__PURE__ */ e(
|
|
21
|
-
|
|
23
|
+
R,
|
|
22
24
|
{
|
|
23
|
-
apiReferenceData:
|
|
24
|
-
inputs: n ?
|
|
25
|
+
apiReferenceData: t,
|
|
26
|
+
inputs: n ? C : r,
|
|
25
27
|
maxHeight: "mint:max-h-[40vh]"
|
|
26
28
|
}
|
|
27
29
|
),
|
|
28
|
-
/* @__PURE__ */ e(
|
|
30
|
+
/* @__PURE__ */ e(A, { apiReferenceData: t, maxHeight: "mint:max-h-[40vh]" })
|
|
29
31
|
] }) }) });
|
|
30
32
|
};
|
|
31
33
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
j as ApiExamples,
|
|
35
|
+
j as default
|
|
34
36
|
};
|
|
@@ -1,96 +1,92 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { useSelectedBaseUrl as
|
|
4
|
-
import { SendPill as
|
|
5
|
-
import { PageContext as
|
|
6
|
-
import { useApiPlaygroundDisplay as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { ApiPlaygroundContext as k } from "./contexts/ApiPlaygroundContext.js";
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as P, useState as w, useEffect as b } from "react";
|
|
3
|
+
import { useSelectedBaseUrl as U } from "./hooks/useSelectedBaseUrl.js";
|
|
4
|
+
import { SendPill as v } from "../api-playground/ApiPlayground/components/SendPill.js";
|
|
5
|
+
import { PageContext as C } from "../contexts/ConfigContext.js";
|
|
6
|
+
import { useApiPlaygroundDisplay as E } from "../hooks/useApiPlaygroundDisplay.js";
|
|
7
|
+
import { ApiFields as I } from "./ApiFields.js";
|
|
8
|
+
import { EndpointHeader as S } from "./EndpointHeader.js";
|
|
9
|
+
import { Playground as k } from "./Playground.js";
|
|
10
|
+
import { ApiPlaygroundContext as A } from "./contexts/ApiPlaygroundContext.js";
|
|
12
11
|
import { Classes as B } from "./types/index.js";
|
|
13
|
-
import { cn as
|
|
14
|
-
const
|
|
12
|
+
import { cn as N } from "../utils/cn.js";
|
|
13
|
+
const z = ({
|
|
15
14
|
apiReferenceData: c,
|
|
16
|
-
operation:
|
|
17
|
-
children:
|
|
15
|
+
operation: u,
|
|
16
|
+
children: f
|
|
18
17
|
}) => {
|
|
19
|
-
const { path: g, method:
|
|
18
|
+
const { path: g, method: o, baseUrlOptions: i } = u, { pageMetadata: y } = P(C), d = E(), [s, l] = w(!1), m = d === "simple", { selectedBaseUrlIndex: h, setSelectedBaseUrlIndex: x, baseUrl: p } = U();
|
|
20
19
|
b(() => {
|
|
21
20
|
if (typeof window > "u") return;
|
|
22
21
|
new URLSearchParams(window.location.search).has("playground") && requestAnimationFrame(() => {
|
|
23
|
-
|
|
22
|
+
l(!0);
|
|
24
23
|
});
|
|
25
24
|
}, []);
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
|
|
25
|
+
const t = (a) => {
|
|
26
|
+
if (l(a), !(typeof window > "u"))
|
|
27
|
+
if (a) {
|
|
28
|
+
const e = new URL(window.location.href);
|
|
29
|
+
e.searchParams.set("playground", "open"), window.history.replaceState({}, "", e);
|
|
31
30
|
} else {
|
|
32
|
-
const
|
|
33
|
-
|
|
31
|
+
const e = new URL(window.location.href);
|
|
32
|
+
e.searchParams.delete("playground"), window.history.replaceState({}, "", e);
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
35
|
+
return /* @__PURE__ */ n(
|
|
36
|
+
A.Provider,
|
|
38
37
|
{
|
|
39
38
|
value: {
|
|
40
|
-
isPlaygroundExpanded:
|
|
41
|
-
setIsPlaygroundExpanded:
|
|
39
|
+
isPlaygroundExpanded: s,
|
|
40
|
+
setIsPlaygroundExpanded: t
|
|
42
41
|
},
|
|
43
42
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/* @__PURE__ */ e("div", { className: "mint:mt-8 mint:lg:mt-0 mint:flex mint:flex-col mint:gap-6 mint:xl:hidden mint:max-h-[30rem]", children: /* @__PURE__ */ e(C, { noInputs: !0 }) })
|
|
72
|
-
] }),
|
|
73
|
-
/* @__PURE__ */ t(
|
|
43
|
+
/* @__PURE__ */ n("div", { className: "mint:flex mint:flex-col mint:gap-8", id: "api-playground-2-operation-page", children: [
|
|
44
|
+
/* @__PURE__ */ r("div", { className: "mint:flex mint:items-center mint:gap-3 mint:border mint:border-gray-200 mint:dark:border-[#2d2d2d] mint:rounded-2xl mint:p-1.5", children: /* @__PURE__ */ n("div", { className: "mint:flex mint:items-center mint:gap-0 mint:flex-1 mint:bg-white mint:dark:bg-[#1a1a1a] mint:border mint:border-gray-200 mint:dark:border-[#2d2d2d] mint:rounded-2xl", children: [
|
|
45
|
+
/* @__PURE__ */ r(
|
|
46
|
+
S,
|
|
47
|
+
{
|
|
48
|
+
baseUrl: p,
|
|
49
|
+
baseUrlOptions: i,
|
|
50
|
+
selectedBaseUrlIndex: h,
|
|
51
|
+
setSelectedBaseUrlIndex: x,
|
|
52
|
+
display: d,
|
|
53
|
+
path: g,
|
|
54
|
+
method: o,
|
|
55
|
+
onBaseUrlChange: () => {
|
|
56
|
+
},
|
|
57
|
+
isInPlaygroundModal: !1
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
m ? null : /* @__PURE__ */ r(
|
|
61
|
+
v,
|
|
62
|
+
{
|
|
63
|
+
label: "Try it",
|
|
64
|
+
method: o,
|
|
65
|
+
onClick: () => t(!0)
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] }) }),
|
|
69
|
+
/* @__PURE__ */ n(
|
|
74
70
|
"div",
|
|
75
71
|
{
|
|
76
|
-
className:
|
|
72
|
+
className: N(
|
|
77
73
|
B.Content,
|
|
78
|
-
"relative"
|
|
74
|
+
"mint:relative"
|
|
79
75
|
),
|
|
80
76
|
children: [
|
|
81
|
-
|
|
82
|
-
/* @__PURE__ */
|
|
77
|
+
f,
|
|
78
|
+
/* @__PURE__ */ r(I, { pageMetadata: y })
|
|
83
79
|
]
|
|
84
80
|
}
|
|
85
81
|
)
|
|
86
82
|
] }),
|
|
87
|
-
!
|
|
88
|
-
|
|
83
|
+
!m && /* @__PURE__ */ r(
|
|
84
|
+
k,
|
|
89
85
|
{
|
|
90
|
-
isPlaygroundExpanded:
|
|
91
|
-
setIsPlaygroundExpanded:
|
|
86
|
+
isPlaygroundExpanded: s,
|
|
87
|
+
setIsPlaygroundExpanded: t,
|
|
92
88
|
baseUrl: p,
|
|
93
|
-
baseUrlOptions:
|
|
89
|
+
baseUrlOptions: i,
|
|
94
90
|
apiReferenceData: c
|
|
95
91
|
}
|
|
96
92
|
)
|
|
@@ -99,5 +95,5 @@ const J = ({
|
|
|
99
95
|
);
|
|
100
96
|
};
|
|
101
97
|
export {
|
|
102
|
-
|
|
98
|
+
z as OperationPage
|
|
103
99
|
};
|
|
@@ -6,8 +6,8 @@ import { Response as c } from "../api-playground/ApiPlayground/Response/index.js
|
|
|
6
6
|
import { ModalHeader as N } from "../api-playground/ApiPlayground/components/ModalHeader.js";
|
|
7
7
|
import { PlaygroundModalWrapper as b } from "../api-playground/ApiPlayground/components/PlaygroundModalWrapper.js";
|
|
8
8
|
import { useKeyboardShortcut as B } from "../hooks/useKeyboardShortcut.js";
|
|
9
|
-
import { ApiExamples as
|
|
10
|
-
import { EndpointHeader as
|
|
9
|
+
import { ApiExamples as k } from "./ApiExamples.js";
|
|
10
|
+
import { EndpointHeader as C } from "./EndpointHeader.js";
|
|
11
11
|
import { BodySection as w } from "./components/Request/BodySection.js";
|
|
12
12
|
import { ParameterSection as T } from "./components/Request/ParameterSection.js";
|
|
13
13
|
import { SecuritySection as q } from "./components/Request/SecuritySection.js";
|
|
@@ -44,8 +44,8 @@ const D = ({
|
|
|
44
44
|
setIsPlaygroundExpanded: r,
|
|
45
45
|
children: [
|
|
46
46
|
/* @__PURE__ */ i("div", { className: "mint:flex mint:items-center mint:justify-between mint:gap-x-2 mint:rounded-xl mint:p-1.5 mint:pr-0", children: [
|
|
47
|
-
/* @__PURE__ */ t("div", { className: "mint:flex-1 mint:bg-gray-100 dark:bg-white/5 mint:border-gray-200 mint:rounded-xl ", children: /* @__PURE__ */ t(
|
|
48
|
-
|
|
47
|
+
/* @__PURE__ */ t("div", { className: "mint:flex-1 mint:bg-gray-100 mint:dark:bg-white/5 mint:dark:border-gray-200 mint:rounded-xl ", children: /* @__PURE__ */ t(
|
|
48
|
+
C,
|
|
49
49
|
{
|
|
50
50
|
baseUrl: s,
|
|
51
51
|
baseUrlOptions: a,
|
|
@@ -105,7 +105,7 @@ const D = ({
|
|
|
105
105
|
),
|
|
106
106
|
children: [
|
|
107
107
|
n && /* @__PURE__ */ t(c, { result: n, className: "mint:hidden mint:lg:block mint:min-h-fit" }),
|
|
108
|
-
/* @__PURE__ */ t(
|
|
108
|
+
/* @__PURE__ */ t(k, { isModal: !0, "data-testid": "api-playground-request-example", className: "mint:xl:w-full" })
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
)
|
|
@@ -1,145 +1,146 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { generateRequest as
|
|
4
|
-
import { generateSnippet as
|
|
5
|
-
import { getFirstExampleValue as
|
|
6
|
-
import { CodeGroupSelect as
|
|
7
|
-
import { CodeSnippets as
|
|
8
|
-
import { langToPresetMap as
|
|
9
|
-
const
|
|
10
|
-
baseUrl:
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as j, useEffect as V } from "react";
|
|
3
|
+
import { generateRequest as S } from "../../generators/generateRequest.js";
|
|
4
|
+
import { generateSnippet as T } from "../../generators/generateSnippet.js";
|
|
5
|
+
import { getFirstExampleValue as g } from "../../schemaGraph/processExamples.js";
|
|
6
|
+
import { CodeGroupSelect as k } from "../../../components/content-components/CodeGroupSelect/index.js";
|
|
7
|
+
import { CodeSnippets as w } from "../../../components/content-components/code-snippets.js";
|
|
8
|
+
import { langToPresetMap as C } from "../../../constants/snippetPresets.js";
|
|
9
|
+
const z = ({
|
|
10
|
+
baseUrl: r,
|
|
11
11
|
apiReferenceData: t,
|
|
12
|
-
inputs:
|
|
13
|
-
requestExampleLanguages:
|
|
14
|
-
requiredOnly:
|
|
15
|
-
maxHeight:
|
|
16
|
-
selectedSecurityOptionIndex:
|
|
17
|
-
selectedRequestBodyContentTypeIndex:
|
|
12
|
+
inputs: e,
|
|
13
|
+
requestExampleLanguages: n,
|
|
14
|
+
requiredOnly: p,
|
|
15
|
+
maxHeight: o,
|
|
16
|
+
selectedSecurityOptionIndex: c,
|
|
17
|
+
selectedRequestBodyContentTypeIndex: l
|
|
18
18
|
}) => {
|
|
19
|
-
var
|
|
20
|
-
|
|
19
|
+
var u, s, G;
|
|
20
|
+
console.log("[DEBUG] GeneratedRequestExample - baseUrl:", r), console.log("[DEBUG] GeneratedRequestExample - apiReferenceData:", t), console.log("[DEBUG] GeneratedRequestExample - requestExampleLanguages:", n);
|
|
21
|
+
const m = (u = t.dependencies) == null ? void 0 : u.requestBody;
|
|
21
22
|
if (!m)
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
23
|
+
return console.log("[DEBUG] GeneratedRequestExample - No requestBody, using SingleRequest"), /* @__PURE__ */ h(
|
|
24
|
+
q,
|
|
24
25
|
{
|
|
25
26
|
apiReferenceData: t,
|
|
26
|
-
baseUrl:
|
|
27
|
-
inputs:
|
|
28
|
-
requestExampleLanguages:
|
|
29
|
-
requiredOnly:
|
|
30
|
-
maxHeight:
|
|
31
|
-
selectedSecurityOptionIndex:
|
|
27
|
+
baseUrl: r,
|
|
28
|
+
inputs: e,
|
|
29
|
+
requestExampleLanguages: n,
|
|
30
|
+
requiredOnly: p,
|
|
31
|
+
maxHeight: o,
|
|
32
|
+
selectedSecurityOptionIndex: c
|
|
32
33
|
}
|
|
33
34
|
);
|
|
34
|
-
const i =
|
|
35
|
+
const i = g(
|
|
35
36
|
m.content,
|
|
36
|
-
|
|
37
|
+
l
|
|
37
38
|
);
|
|
38
39
|
if (!i) return null;
|
|
39
|
-
const
|
|
40
|
-
([
|
|
41
|
-
contentType:
|
|
42
|
-
examples:
|
|
40
|
+
const a = Object.entries(m.content).map(
|
|
41
|
+
([B, x]) => ({
|
|
42
|
+
contentType: B,
|
|
43
|
+
examples: x.examples
|
|
43
44
|
})
|
|
44
|
-
),
|
|
45
|
-
return Object.keys(
|
|
46
|
-
|
|
45
|
+
), E = (s = a[l]) == null ? void 0 : s.examples, f = (G = a[l]) == null ? void 0 : G.contentType;
|
|
46
|
+
return Object.keys(E).length > 1 ? /* @__PURE__ */ h(
|
|
47
|
+
N,
|
|
47
48
|
{
|
|
48
49
|
apiReferenceData: t,
|
|
49
|
-
selectedBodyContentType:
|
|
50
|
-
baseUrl:
|
|
51
|
-
inputs:
|
|
52
|
-
examples:
|
|
53
|
-
requiredOnly:
|
|
54
|
-
maxHeight:
|
|
55
|
-
selectedSecurityOptionIndex:
|
|
50
|
+
selectedBodyContentType: f,
|
|
51
|
+
baseUrl: r,
|
|
52
|
+
inputs: e,
|
|
53
|
+
examples: E,
|
|
54
|
+
requiredOnly: p,
|
|
55
|
+
maxHeight: o,
|
|
56
|
+
selectedSecurityOptionIndex: c
|
|
56
57
|
}
|
|
57
|
-
) : /* @__PURE__ */
|
|
58
|
-
|
|
58
|
+
) : /* @__PURE__ */ h(
|
|
59
|
+
q,
|
|
59
60
|
{
|
|
60
61
|
apiReferenceData: t,
|
|
61
|
-
selectedBodyContentType:
|
|
62
|
-
baseUrl:
|
|
63
|
-
inputs:
|
|
62
|
+
selectedBodyContentType: f,
|
|
63
|
+
baseUrl: r,
|
|
64
|
+
inputs: e,
|
|
64
65
|
exampleValue: i,
|
|
65
|
-
requestExampleLanguages:
|
|
66
|
-
requiredOnly:
|
|
67
|
-
maxHeight:
|
|
68
|
-
selectedSecurityOptionIndex:
|
|
66
|
+
requestExampleLanguages: n,
|
|
67
|
+
requiredOnly: p,
|
|
68
|
+
maxHeight: o,
|
|
69
|
+
selectedSecurityOptionIndex: c
|
|
69
70
|
}
|
|
70
71
|
);
|
|
71
|
-
},
|
|
72
|
-
baseUrl:
|
|
72
|
+
}, q = ({
|
|
73
|
+
baseUrl: r,
|
|
73
74
|
apiReferenceData: t,
|
|
74
|
-
inputs:
|
|
75
|
-
selectedBodyContentType:
|
|
76
|
-
exampleValue:
|
|
77
|
-
requestExampleLanguages:
|
|
78
|
-
requiredOnly:
|
|
79
|
-
maxHeight:
|
|
75
|
+
inputs: e,
|
|
76
|
+
selectedBodyContentType: n,
|
|
77
|
+
exampleValue: p,
|
|
78
|
+
requestExampleLanguages: o,
|
|
79
|
+
requiredOnly: c,
|
|
80
|
+
maxHeight: l,
|
|
80
81
|
selectedSecurityOptionIndex: m
|
|
81
82
|
}) => {
|
|
82
|
-
const i =
|
|
83
|
-
baseUrl:
|
|
83
|
+
const i = S({
|
|
84
|
+
baseUrl: r,
|
|
84
85
|
apiReferenceData: t,
|
|
85
|
-
inputs:
|
|
86
|
-
selectedBodyContentType:
|
|
87
|
-
exampleData:
|
|
88
|
-
requiredOnly:
|
|
86
|
+
inputs: e,
|
|
87
|
+
selectedBodyContentType: n,
|
|
88
|
+
exampleData: p,
|
|
89
|
+
requiredOnly: c,
|
|
89
90
|
selectedSecurityOptionIndex: m
|
|
90
|
-
}),
|
|
91
|
-
const
|
|
92
|
-
return
|
|
93
|
-
}, []),
|
|
91
|
+
}), a = o == null ? void 0 : o.reduce((f, u) => {
|
|
92
|
+
const s = C[u];
|
|
93
|
+
return s && f.push(s), f;
|
|
94
|
+
}, []), E = T({
|
|
94
95
|
apiReferenceData: t,
|
|
95
|
-
pathInputs:
|
|
96
|
+
pathInputs: e.path,
|
|
96
97
|
request: i,
|
|
97
|
-
snippetPresets:
|
|
98
|
+
snippetPresets: a
|
|
98
99
|
});
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
},
|
|
101
|
-
baseUrl:
|
|
100
|
+
return /* @__PURE__ */ h(w, { snippets: E, dropdown: !0, maxHeight: l, showCopyButton: !1, noMargins: !0 });
|
|
101
|
+
}, N = ({
|
|
102
|
+
baseUrl: r,
|
|
102
103
|
apiReferenceData: t,
|
|
103
|
-
inputs:
|
|
104
|
-
selectedBodyContentType:
|
|
105
|
-
examples:
|
|
106
|
-
requiredOnly:
|
|
107
|
-
maxHeight:
|
|
108
|
-
selectedSecurityOptionIndex:
|
|
104
|
+
inputs: e,
|
|
105
|
+
selectedBodyContentType: n,
|
|
106
|
+
examples: p,
|
|
107
|
+
requiredOnly: o,
|
|
108
|
+
maxHeight: c,
|
|
109
|
+
selectedSecurityOptionIndex: l
|
|
109
110
|
}) => {
|
|
110
|
-
const [m, i] =
|
|
111
|
-
return
|
|
112
|
-
const
|
|
111
|
+
const [m, i] = j({}), [a, E] = j(null);
|
|
112
|
+
return V(() => {
|
|
113
|
+
const f = e.path, u = {};
|
|
113
114
|
try {
|
|
114
|
-
for (const [
|
|
115
|
-
if (!
|
|
116
|
-
const
|
|
117
|
-
baseUrl:
|
|
115
|
+
for (const [s, { value: G }] of Object.entries(p)) {
|
|
116
|
+
if (!G) continue;
|
|
117
|
+
const B = S({
|
|
118
|
+
baseUrl: r,
|
|
118
119
|
apiReferenceData: t,
|
|
119
|
-
inputs:
|
|
120
|
-
selectedBodyContentType:
|
|
121
|
-
exampleData:
|
|
122
|
-
requiredOnly:
|
|
123
|
-
selectedSecurityOptionIndex:
|
|
120
|
+
inputs: e,
|
|
121
|
+
selectedBodyContentType: n,
|
|
122
|
+
exampleData: G,
|
|
123
|
+
requiredOnly: o,
|
|
124
|
+
selectedSecurityOptionIndex: l
|
|
124
125
|
});
|
|
125
|
-
|
|
126
|
+
T({
|
|
126
127
|
apiReferenceData: t,
|
|
127
|
-
pathInputs:
|
|
128
|
-
request:
|
|
128
|
+
pathInputs: f,
|
|
129
|
+
request: B,
|
|
129
130
|
isMultipleRequest: !0
|
|
130
|
-
}).forEach((
|
|
131
|
-
|
|
132
|
-
...
|
|
133
|
-
[
|
|
131
|
+
}).forEach((M) => {
|
|
132
|
+
u[M.filename] = {
|
|
133
|
+
...u[M.filename],
|
|
134
|
+
[s]: M
|
|
134
135
|
};
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
|
-
i(
|
|
138
|
-
} catch (
|
|
139
|
-
console.error(
|
|
138
|
+
i(u);
|
|
139
|
+
} catch (s) {
|
|
140
|
+
console.error(s), E(s);
|
|
140
141
|
}
|
|
141
|
-
}, [
|
|
142
|
+
}, [r, t, e, n, p, o, l]), a || Object.keys(m).length === 0 ? null : /* @__PURE__ */ h(k, { snippets: m, maxHeight: c });
|
|
142
143
|
};
|
|
143
144
|
export {
|
|
144
|
-
|
|
145
|
+
z as GeneratedRequestExample
|
|
145
146
|
};
|