@mintlify/msft-sdk 1.1.62 → 1.1.63
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/Response/DownloadFileButton.js +6 -5
- package/dist/api-playground/ApiPlayground/Response/ResponseBody/CodeResponseContent.js +13 -12
- package/dist/api-playground/ApiPlayground/Response/ResponsePlaceholder.js +8 -7
- package/dist/api-playground/ApiPlayground/Response/ResponseTable.js +3 -2
- package/dist/api-playground/ApiPlayground/Response/ResponseTopbar.js +9 -8
- package/dist/api-playground/ApiPlayground/Response/index.js +4 -3
- package/dist/api-playground/ApiPlayground/components/AdditionalPropertyButton.js +42 -21
- package/dist/api-playground/ApiPlayground/components/ParamFieldWrapper.js +13 -9
- package/dist/api-playground/ApiPlayground/components/PlaygroundModalWrapper.js +6 -5
- package/dist/api-playground/ApiPlayground/components/SendPill.js +3 -2
- package/dist/api-playground/ApiPlayground/components/TypeDropdown.js +6 -5
- package/dist/api-playground/EndpointFields/ParamFields/ExampleDescription.js +3 -2
- package/dist/api-playground/EndpointFields/components/Description.js +6 -5
- package/dist/api-playground/EndpointFields/components/OptionDropdown.js +9 -8
- package/dist/api-playground/EndpointFields/components/SectionHeading.js +8 -7
- package/dist/api-playground-2/ApiExamples.js +19 -20
- package/dist/api-playground-2/ApiFields.js +20 -247
- package/dist/api-playground-2/EndpointHeader.js +59 -47
- package/dist/api-playground-2/OperationPage.js +70 -66
- package/dist/api-playground-2/Playground.js +67 -83
- package/dist/api-playground-2/SchemaPage.js +22 -9
- package/dist/api-playground-2/components/EndpointFields/Body.js +40 -0
- package/dist/api-playground-2/components/EndpointFields/Parameters.js +90 -0
- package/dist/api-playground-2/components/EndpointFields/Response.js +146 -0
- package/dist/api-playground-2/components/EndpointFields/Security.js +88 -0
- package/dist/api-playground-2/components/EndpointFields/fields/ArrayParamField.js +93 -0
- package/dist/api-playground-2/components/EndpointFields/fields/Enum.js +29 -11
- package/dist/api-playground-2/components/EndpointFields/fields/ObjectParamField.js +145 -0
- package/dist/api-playground-2/components/EndpointFields/fields/PrimitiveParamField.js +60 -48
- package/dist/api-playground-2/components/EndpointFields/fields/SchemaField.js +230 -0
- package/dist/api-playground-2/components/Example/GeneratedRequestExample.js +93 -89
- package/dist/api-playground-2/components/Example/GeneratedResponseExample.js +18 -17
- package/dist/api-playground-2/components/Example/RequestExample.js +92 -93
- package/dist/api-playground-2/components/Example/ResponseExample.js +19 -15
- package/dist/api-playground-2/components/Request/ParameterSection.js +20 -18
- package/dist/api-playground-2/components/Request/SecuritySection.js +53 -43
- package/dist/api-playground-2/components/Request/inputs/ArrayInput.js +89 -40
- package/dist/api-playground-2/components/Request/inputs/DifferentiatedInput.js +12 -12
- package/dist/api-playground-2/components/Request/inputs/FileInput.js +16 -15
- package/dist/api-playground-2/components/Request/inputs/InputContainer.js +76 -57
- package/dist/api-playground-2/components/Request/inputs/NumberInput.js +10 -9
- package/dist/api-playground-2/components/Request/inputs/ObjectInput.js +98 -80
- package/dist/api-playground-2/components/Request/inputs/OneOfInput.js +55 -47
- package/dist/api-playground-2/components/Request/inputs/SelectInput.js +18 -17
- package/dist/api-playground-2/components/Request/inputs/StringInput.js +19 -18
- package/dist/api-playground-2/components/Request/inputs/TextInput.js +12 -11
- package/dist/api-playground-2/components/SendPillWrapper.js +35 -0
- package/dist/api-playground-2/contexts/ApiPlaygroundContext.js +3 -5
- package/dist/api-playground-2/generators/createCookies.js +23 -0
- package/dist/api-playground-2/generators/createHeaders.js +53 -36
- package/dist/api-playground-2/generators/createQueryString.js +30 -0
- package/dist/api-playground-2/generators/generateAuthPlaceholder.js +14 -0
- package/dist/api-playground-2/generators/generateInteractiveCodeSample.js +27 -25
- package/dist/api-playground-2/generators/generateRequest.js +47 -51
- package/dist/api-playground-2/generators/generateResponseExampleMap.js +15 -11
- package/dist/api-playground-2/generators/generateSnippetMap.js +13 -11
- package/dist/api-playground-2/hooks/useCopyPathWithInputs.js +11 -11
- package/dist/api-playground-2/hooks/useInitializeInputs.js +185 -88
- package/dist/api-playground-2/hooks/usePlaygroundInputsStore.js +70 -25
- package/dist/api-playground-2/hooks/useSelectedBaseUrl.js +13 -0
- package/dist/api-playground-2/hooks/useSelectedExample.js +10 -0
- package/dist/api-playground-2/hooks/useSelectedRequestBodyContentType.js +12 -0
- package/dist/api-playground-2/hooks/useSelectedResponseContentType.js +12 -0
- package/dist/api-playground-2/hooks/useSelectedSecurityOption.js +31 -0
- package/dist/api-playground-2/hooks/useSendPlaygroundRequest.js +114 -101
- package/dist/api-playground-2/schemaGraph/addApiReferenceDataFromMdxAndDocsConfig.js +23 -32
- package/dist/api-playground-2/schemaGraph/addTypeLabelsToSchema.js +50 -0
- package/dist/api-playground-2/schemaGraph/addUniqueKeysToSchema.js +40 -24
- package/dist/api-playground-2/schemaGraph/getExampleBodyInputs.js +94 -0
- package/dist/api-playground-2/schemaGraph/getSchemaGraphOperationData.js +56 -50
- package/dist/api-playground-2/schemaGraph/processExamples.js +117 -52
- package/dist/api-playground-2/schemaGraph/processSchema.js +10 -0
- package/dist/api-playground-2/schemaGraph/processSecurityOptions.js +58 -28
- package/dist/api-playground-2/schemaGraph/reduceCompositions.js +220 -181
- package/dist/api-playground-2/schemaGraph/resolveOperationWithDependencies.js +128 -89
- package/dist/api-playground-2/schemaGraph/resolveSchemaWithDependencies.js +15 -16
- package/dist/api-playground-2/schemaGraph/sortSchemaByRequired.js +14 -12
- package/dist/api-playground-2/schemaGraph/utils.js +185 -147
- package/dist/common/guards.js +11 -19
- package/dist/components/Api/Expandable.js +10 -9
- package/dist/components/Api/Param.js +11 -13
- package/dist/components/Api/dropdown-menu.js +10 -9
- package/dist/components/content-components/code-group.js +4 -4
- package/dist/contexts/EndpointLocationContext.js +3 -3
- package/dist/hooks/useApiParamFieldOption.js +10 -0
- package/dist/hooks/useEndpoint.js +3 -3
- package/dist/hooks/useKeyboardShortcut.js +13 -13
- package/dist/hooks/useSendPlaygroundRequest.js +14 -146
- package/dist/index.d.ts +65 -58
- package/dist/index.js +109 -111
- package/dist/openapi/generateTypeStringFromSchema.js +2 -31
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/api-playground/ApiPlayground/Request/BodySection.js +0 -64
- package/dist/api-playground/ApiPlayground/Request/ParameterSection.js +0 -32
- package/dist/api-playground/ApiPlayground/Request/PlaygroundModal.js +0 -201
- package/dist/api-playground/ApiPlayground/Request/SecuritySection.js +0 -146
- package/dist/api-playground/ApiPlayground/Request/ServerSection.js +0 -30
- package/dist/api-playground/ApiPlayground/Request/index.js +0 -43
- package/dist/api-playground/ApiPlayground/Request/inputs/ArrayInput.js +0 -93
- package/dist/api-playground/ApiPlayground/Request/inputs/DifferentiatedInput.js +0 -90
- package/dist/api-playground/ApiPlayground/Request/inputs/FileInput.js +0 -62
- package/dist/api-playground/ApiPlayground/Request/inputs/NullInput.js +0 -33
- package/dist/api-playground/ApiPlayground/Request/inputs/NumberInput.js +0 -61
- package/dist/api-playground/ApiPlayground/Request/inputs/ObjectChildren.js +0 -109
- package/dist/api-playground/ApiPlayground/Request/inputs/ObjectInput.js +0 -87
- package/dist/api-playground/ApiPlayground/Request/inputs/RecursiveInput.js +0 -61
- package/dist/api-playground/ApiPlayground/Request/inputs/SelectInput.js +0 -54
- package/dist/api-playground/ApiPlayground/Request/inputs/StringInput.js +0 -67
- package/dist/api-playground/ApiPlayground/Request/inputs/TextInput.js +0 -44
- package/dist/api-playground/ApiPlayground/components/EndpointsMenu.js +0 -42
- package/dist/api-playground/ApiPlayground/components/EndpointsMenuLink.js +0 -43
- package/dist/api-playground/ApiPlayground/components/EndpointsMenuSearch.js +0 -38
- package/dist/api-playground/ApiPlayground/components/InputContainer.js +0 -128
- package/dist/api-playground/ApiPlayground/components/InputSectionContainer.js +0 -59
- package/dist/api-playground/ApiPlayground/components/PathHeader.js +0 -162
- package/dist/api-playground/ApiPlayground/components/TrashButton.js +0 -26
- package/dist/api-playground/ApiPlayground/index.js +0 -67
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/Enum.js +0 -19
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/NumberMetadata.js +0 -18
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/StringMetadata.js +0 -28
- package/dist/api-playground/EndpointFields/ParamFields/PrimitiveParamField/index.js +0 -5
- package/dist/api-playground/EndpointFields/ParamFields/RecursiveParamField.js +0 -13
- package/dist/api-playground/EndpointFields/index.js +0 -7
- package/dist/api-playground-2/components/EndpointFields/EndpointSecurity.js +0 -87
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleArrayParamField.js +0 -89
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleObjectParamField.js +0 -121
- package/dist/api-playground-2/components/EndpointFields/fields/SimplePrimitiveParamField.js +0 -74
- package/dist/api-playground-2/components/EndpointFields/fields/SimpleSchemaField.js +0 -252
- package/dist/common/potentiallyParseOpenApiString.js +0 -24
- package/dist/common/replaceSlashIndex.js +0 -6
- package/dist/common/slugToTitle.js +0 -10
- package/dist/constants/prism-languages.js +0 -19
- package/dist/contexts/ApiPlaygroundInputsContext.js +0 -17
- package/dist/contexts/MDXContentContext.js +0 -17
- package/dist/hooks/useApiPlaygroundInputs.js +0 -6
- package/dist/hooks/useApiPlaygroundPrefillExamples.js +0 -39
- package/dist/hooks/useBaseUrlOptions.js +0 -18
- package/dist/hooks/useComponentSchemas.js +0 -9
- package/dist/hooks/useGenerateNextAdditionalProperties.js +0 -11
- package/dist/hooks/useGenerateNextItems.js +0 -11
- package/dist/hooks/useGenerateNextProperties.js +0 -11
- package/dist/hooks/useMDXContent.js +0 -6
- package/dist/hooks/useMDXContentController/useApiPlaygroundInputs.js +0 -9
- package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiBaseIndexCallback.js +0 -15
- package/dist/hooks/useMDXContentController/useMDXContentCallbacks/useSetApiPlaygroundInputsCallback.js +0 -15
- package/dist/hooks/usePlaygroundSchemaOptions.js +0 -42
- package/dist/hooks/usePrefilledInputs/index.js +0 -65
- package/dist/hooks/usePrefilledInputs/storedServerVariables.js +0 -29
- package/dist/hooks/useSecurityOption.js +0 -10
- package/dist/hooks/useSetDefaultValue.js +0 -63
- package/dist/openapi/filterEnums.js +0 -20
- package/dist/openapi/generateNextAdditionalProperties.js +0 -7
- package/dist/openapi/generateNextItems.js +0 -7
- package/dist/openapi/generateNextProperties.js +0 -23
- package/dist/openapi/generateOptionLabels.js +0 -20
- package/dist/openapi/generateSimpleLabels.js +0 -4
- package/dist/openapi/getAuthFilteredSchemaArray.js +0 -18
- package/dist/paths/isEqualIgnoringLeadingSlash.js +0 -21
- package/dist/paths/optionallyRemoveLeadingSlash.js +0 -6
- package/dist/paths/optionallyRemoveTrailingSlash.js +0 -6
- package/dist/utils/api-playground/defaults.js +0 -15
- package/dist/utils/api-playground/paramFieldDefaults.js +0 -10
- package/dist/utils/api-reference/getFilteredSecurityOptions.js +0 -4
- package/dist/utils/api-reference/getNextPropertiesByType.js +0 -5
- package/dist/utils/flattenObject.js +0 -10
|
@@ -2,10 +2,11 @@ import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as a } from "react";
|
|
3
3
|
import { CodeBlockTooltip as l } from "../../../components/content-components/code-group.js";
|
|
4
4
|
import { useSelectedLocale as s } from "../../../utils/locales/index.js";
|
|
5
|
-
import { CheckmarkCircleRegular as
|
|
5
|
+
import { CheckmarkCircleRegular as p, ArrowDownRegular as c } from "@fluentui/react-icons";
|
|
6
6
|
import "@mintlify/validation";
|
|
7
|
+
import "@sindresorhus/slugify";
|
|
7
8
|
import { cn as d } from "../../../utils/cn.js";
|
|
8
|
-
const
|
|
9
|
+
const C = ({ data: e }) => {
|
|
9
10
|
const [t, o] = a(!1), r = s(), n = () => {
|
|
10
11
|
o(!0), setTimeout(() => {
|
|
11
12
|
o(!1);
|
|
@@ -21,12 +22,12 @@ const x = ({ data: e }) => {
|
|
|
21
22
|
download: `api-response.${e.extension}`,
|
|
22
23
|
children: [
|
|
23
24
|
t ? /* @__PURE__ */ i(
|
|
24
|
-
|
|
25
|
+
p,
|
|
25
26
|
{
|
|
26
27
|
className: "mint:h-4 mint:w-4 mint:bg-primary mint:dark:bg-primary-light"
|
|
27
28
|
}
|
|
28
29
|
) : /* @__PURE__ */ i(
|
|
29
|
-
|
|
30
|
+
c,
|
|
30
31
|
{
|
|
31
32
|
className: d(
|
|
32
33
|
"mint:w-4 mint:h-4",
|
|
@@ -40,5 +41,5 @@ const x = ({ data: e }) => {
|
|
|
40
41
|
) : null;
|
|
41
42
|
};
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
C as DownloadButton
|
|
44
45
|
};
|
|
@@ -5,23 +5,24 @@ import "prismjs/components/prism-json.js";
|
|
|
5
5
|
import { MAX_PREVIEW_BYTES as p } from "../../../../constants/index.js";
|
|
6
6
|
import { useSelectedLocale as g } from "../../../../utils/locales/index.js";
|
|
7
7
|
import "@mintlify/validation";
|
|
8
|
+
import "@sindresorhus/slugify";
|
|
8
9
|
import { cn as d } from "../../../../utils/cn.js";
|
|
9
|
-
const
|
|
10
|
+
const j = ({ data: n }) => {
|
|
10
11
|
const a = g();
|
|
11
|
-
let t = !1, e =
|
|
12
|
-
const l =
|
|
12
|
+
let t = !1, e = n.content;
|
|
13
|
+
const l = n.content.length > p * 5;
|
|
13
14
|
try {
|
|
14
|
-
e = JSON.parse(
|
|
15
|
-
} catch (
|
|
16
|
-
console.error(
|
|
15
|
+
e = JSON.parse(n.content), t = !0;
|
|
16
|
+
} catch (r) {
|
|
17
|
+
console.error(r);
|
|
17
18
|
}
|
|
18
19
|
const s = c(() => {
|
|
19
20
|
if (t)
|
|
20
21
|
try {
|
|
21
|
-
const
|
|
22
|
-
return i.highlight(
|
|
23
|
-
} catch (
|
|
24
|
-
console.error("Failed to highlight code:",
|
|
22
|
+
const r = JSON.stringify(e, null, 2), m = i.languages.json || i.languages.plaintext;
|
|
23
|
+
return i.highlight(r, m, "json");
|
|
24
|
+
} catch (r) {
|
|
25
|
+
console.error("Failed to highlight code:", r);
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
28
|
}, [t, e]);
|
|
@@ -41,7 +42,7 @@ const b = ({ data: r }) => {
|
|
|
41
42
|
),
|
|
42
43
|
children: t && s !== void 0 ? /* @__PURE__ */ o("span", { suppressHydrationWarning: !0, dangerouslySetInnerHTML: { __html: s } }) : (
|
|
43
44
|
// Fallback: show prettified JSON (without syntax highlighting) when response is too large
|
|
44
|
-
/* @__PURE__ */ o("span", { suppressHydrationWarning: !0, children: t ? JSON.stringify(e, null, 2) :
|
|
45
|
+
/* @__PURE__ */ o("span", { suppressHydrationWarning: !0, children: t ? JSON.stringify(e, null, 2) : n.content })
|
|
45
46
|
)
|
|
46
47
|
}
|
|
47
48
|
)
|
|
@@ -49,5 +50,5 @@ const b = ({ data: r }) => {
|
|
|
49
50
|
);
|
|
50
51
|
};
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
+
j as CodeResponseContent
|
|
53
54
|
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import "@mintlify/validation";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import "@sindresorhus/slugify";
|
|
4
|
+
import { cn as n } from "../../../utils/cn.js";
|
|
5
|
+
const l = ({ message: e, icon: i }) => /* @__PURE__ */ t(
|
|
5
6
|
"div",
|
|
6
7
|
{
|
|
7
|
-
className:
|
|
8
|
+
className: n(
|
|
8
9
|
"mint:bg-response-body-auto",
|
|
9
10
|
"mint:rounded-b-xl mint:overflow-auto"
|
|
10
11
|
),
|
|
11
|
-
children: /* @__PURE__ */
|
|
12
|
-
|
|
12
|
+
children: /* @__PURE__ */ m("div", { className: "mint:pb-8 mint:pt-10 mint:px-6 mint:space-y-4 mint:flex mint:flex-col mint:items-center", children: [
|
|
13
|
+
i,
|
|
13
14
|
/* @__PURE__ */ t("div", { className: "mint:text-sm mint:text-center", children: e })
|
|
14
15
|
] })
|
|
15
16
|
}
|
|
16
17
|
);
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
l as ResponsePlaceholder
|
|
19
20
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import "@mintlify/validation";
|
|
3
|
+
import "@sindresorhus/slugify";
|
|
3
4
|
import { cn as r } from "../../../utils/cn.js";
|
|
4
|
-
const
|
|
5
|
+
const o = ({ data: m }) => /* @__PURE__ */ t("div", { className: "mint:w-full mint:rounded-b-xl mint:overflow-y-auto", children: /* @__PURE__ */ t("table", { className: "mint:table-fixed mint:pb-8 mint:w-full mint:pt-10", children: m.flatMap(([i, n]) => /* @__PURE__ */ e(
|
|
5
6
|
"tr",
|
|
6
7
|
{
|
|
7
8
|
className: r(
|
|
@@ -16,5 +17,5 @@ const s = ({ data: m }) => /* @__PURE__ */ t("div", { className: "mint:w-full mi
|
|
|
16
17
|
i
|
|
17
18
|
)) }) });
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
o as ResponseTable
|
|
20
21
|
};
|
|
@@ -2,14 +2,15 @@ import { jsxs as m, jsx as t, Fragment as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { useSelectedLocale as c } from "../../../utils/locales/index.js";
|
|
3
3
|
import { ChevronDownFilled as d, WarningRegular as p, ErrorCircleRegular as s, CheckmarkCircleRegular as g } from "@fluentui/react-icons";
|
|
4
4
|
import "@mintlify/validation";
|
|
5
|
+
import "@sindresorhus/slugify";
|
|
5
6
|
import { cn as i } from "../../../utils/cn.js";
|
|
6
7
|
import { responseSections as u } from "./index.js";
|
|
7
8
|
import { CopyFileToClipboardButton as x } from "./CopyFileToClipboardButton.js";
|
|
8
9
|
import { DownloadButton as f } from "./DownloadFileButton.js";
|
|
9
|
-
const
|
|
10
|
+
const D = ({
|
|
10
11
|
result: e,
|
|
11
12
|
selectedSection: n,
|
|
12
|
-
setSelectedSection:
|
|
13
|
+
setSelectedSection: o,
|
|
13
14
|
data: r
|
|
14
15
|
}) => /* @__PURE__ */ m("div", { className: "mint:flex mint:w-full mint:px-2 mint:py-1 mint:space-x-3 mint:items-center mint:rounded-t-2xl", children: [
|
|
15
16
|
/* @__PURE__ */ t("div", { className: "mint:flex mint:flex-1 mint:space-x-4 mint:items-center", children: /* @__PURE__ */ t(
|
|
@@ -24,7 +25,7 @@ const j = ({
|
|
|
24
25
|
b,
|
|
25
26
|
{
|
|
26
27
|
selectedSection: n,
|
|
27
|
-
setSelectedSection:
|
|
28
|
+
setSelectedSection: o
|
|
28
29
|
}
|
|
29
30
|
),
|
|
30
31
|
/* @__PURE__ */ t(f, { data: r }),
|
|
@@ -59,12 +60,12 @@ const j = ({
|
|
|
59
60
|
selectedSection: e,
|
|
60
61
|
setSelectedSection: n
|
|
61
62
|
}) => {
|
|
62
|
-
const
|
|
63
|
+
const o = c();
|
|
63
64
|
return /* @__PURE__ */ m("div", { className: "mint:relative", children: [
|
|
64
65
|
/* @__PURE__ */ t(
|
|
65
66
|
"select",
|
|
66
67
|
{
|
|
67
|
-
"aria-label":
|
|
68
|
+
"aria-label": o["aria.selectResponseSection"],
|
|
68
69
|
className: i(
|
|
69
70
|
"mint:pl-2.5 mint:pr-6 mint:py-1 mint:rounded-lg mint:text-xs mint:font-medium mint:border mint:cursor-pointer mint:focus:outline-0",
|
|
70
71
|
"mint:text-gray-600 mint:dark:text-gray-400 mint:border-standard mint:hover:bg-gray-50 mint:dark:hover:bg-white/[0.03]"
|
|
@@ -72,8 +73,8 @@ const j = ({
|
|
|
72
73
|
value: e,
|
|
73
74
|
onChange: (r) => n(r.target.value),
|
|
74
75
|
children: u.map((r) => {
|
|
75
|
-
var
|
|
76
|
-
return /* @__PURE__ */ t("option", { value: r, children: (((
|
|
76
|
+
var a;
|
|
77
|
+
return /* @__PURE__ */ t("option", { value: r, children: (((a = r[0]) == null ? void 0 : a.toUpperCase()) ?? "") + r.slice(1) }, r);
|
|
77
78
|
})
|
|
78
79
|
}
|
|
79
80
|
),
|
|
@@ -88,5 +89,5 @@ const j = ({
|
|
|
88
89
|
] });
|
|
89
90
|
};
|
|
90
91
|
export {
|
|
91
|
-
|
|
92
|
+
D as ResponseTopbar
|
|
92
93
|
};
|
|
@@ -3,12 +3,13 @@ import { extension as p } from "mime-types";
|
|
|
3
3
|
import { useState as c, useMemo as f } from "react";
|
|
4
4
|
import y from "../../../components/Api/ErrorBoundary.js";
|
|
5
5
|
import "@mintlify/validation";
|
|
6
|
+
import "@sindresorhus/slugify";
|
|
6
7
|
import { cn as d } from "../../../utils/cn.js";
|
|
7
8
|
import { ResponseBody as b } from "./ResponseBody/index.js";
|
|
8
9
|
import { ResponseError as g } from "./ResponseError.js";
|
|
9
10
|
import { ResponseHeaders as u } from "./ResponseHeaders.js";
|
|
10
11
|
import { ResponseTopbar as h } from "./ResponseTopbar.js";
|
|
11
|
-
const
|
|
12
|
+
const E = ["body", "headers"], H = ({
|
|
12
13
|
result: e,
|
|
13
14
|
className: t
|
|
14
15
|
}) => {
|
|
@@ -74,6 +75,6 @@ const D = ["body", "headers"], E = ({
|
|
|
74
75
|
return t === "image" || t === "audio" || t === "video" ? t : "other";
|
|
75
76
|
};
|
|
76
77
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
H as Response,
|
|
79
|
+
E as responseSections
|
|
79
80
|
};
|
|
@@ -1,44 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d } from "react";
|
|
3
|
+
import { AddRegular as u } from "@fluentui/react-icons";
|
|
3
4
|
import "@mintlify/validation";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
7
|
-
onAddKey:
|
|
8
|
-
existingKeys:
|
|
9
|
-
dataTestId:
|
|
5
|
+
import "@sindresorhus/slugify";
|
|
6
|
+
import { cn as y } from "../../../utils/cn.js";
|
|
7
|
+
const A = ({
|
|
8
|
+
onAddKey: i,
|
|
9
|
+
existingKeys: r,
|
|
10
|
+
dataTestId: n
|
|
10
11
|
}) => {
|
|
11
|
-
const [
|
|
12
|
-
return
|
|
12
|
+
const [a, o] = d(!1), [m, l] = d(""), s = r.includes(m), c = m.length > 0 && !s;
|
|
13
|
+
return a ? /* @__PURE__ */ e(
|
|
13
14
|
"input",
|
|
14
15
|
{
|
|
15
|
-
className:
|
|
16
|
+
className: y(
|
|
16
17
|
"mint:py-6 mint:flex-1 mint:bg-transparent mint:outline-0 mint:text-sm mint:text-gray-900 mint:dark:text-gray-100 mint:placeholder-gray-300 mint:dark:placeholder-white/30 mint:font-mono mint:font-medium",
|
|
17
|
-
|
|
18
|
+
s ? "mint:underline mint:decoration-wavy mint:decoration-red-400" : ""
|
|
18
19
|
),
|
|
19
20
|
placeholder: "Enter key of new property",
|
|
20
21
|
type: "text",
|
|
21
22
|
autoFocus: !0,
|
|
22
|
-
value:
|
|
23
|
+
value: m,
|
|
23
24
|
onBlur: () => {
|
|
24
|
-
|
|
25
|
+
l(""), o(!1);
|
|
25
26
|
},
|
|
26
|
-
onChange: (t) =>
|
|
27
|
+
onChange: (t) => l(t.target.value),
|
|
27
28
|
onKeyDown: (t) => {
|
|
28
|
-
(t.key === "Enter" || t.key === "Tab") &&
|
|
29
|
+
(t.key === "Enter" || t.key === "Tab") && c && i(t.currentTarget.value);
|
|
29
30
|
},
|
|
30
31
|
spellCheck: !1
|
|
31
32
|
}
|
|
32
|
-
) : /* @__PURE__ */
|
|
33
|
-
|
|
33
|
+
) : /* @__PURE__ */ e(
|
|
34
|
+
f,
|
|
34
35
|
{
|
|
35
36
|
className: "mint:py-5",
|
|
36
|
-
onClick: () =>
|
|
37
|
+
onClick: () => o((t) => !t),
|
|
37
38
|
label: "Add new property",
|
|
38
|
-
dataTestId:
|
|
39
|
+
dataTestId: n
|
|
39
40
|
}
|
|
40
41
|
);
|
|
41
42
|
};
|
|
43
|
+
function f({
|
|
44
|
+
className: i,
|
|
45
|
+
onClick: r,
|
|
46
|
+
label: n,
|
|
47
|
+
dataTestId: a
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ e("div", { className: i, children: /* @__PURE__ */ p(
|
|
50
|
+
"button",
|
|
51
|
+
{
|
|
52
|
+
"aria-label": n,
|
|
53
|
+
className: "mint:flex mint:text-playground-input mint:w-fit mint:items-center mint:gap-x-1.5 mint:py-1! mint:px-2! mint:hover:bg-gray-50 mint:dark:hover:bg-white/[0.03] mint:cursor-pointer",
|
|
54
|
+
onClick: r,
|
|
55
|
+
"data-testid": a,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ e(u, { className: "mint:h-3 mint:w-3" }),
|
|
58
|
+
/* @__PURE__ */ e("span", { className: "mint:text-gray-600 mint:dark:text-gray-200", children: n })
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
) });
|
|
62
|
+
}
|
|
42
63
|
export {
|
|
43
|
-
|
|
64
|
+
A as AdditionalPropertyButton
|
|
44
65
|
};
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
function
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../../../utils/cn.js";
|
|
3
|
+
function d({
|
|
4
4
|
paramId: r,
|
|
5
|
-
children:
|
|
6
|
-
|
|
5
|
+
children: a,
|
|
6
|
+
noBorder: e = !1,
|
|
7
|
+
className: m
|
|
7
8
|
}) {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ o(
|
|
9
10
|
"div",
|
|
10
11
|
{
|
|
11
|
-
className:
|
|
12
|
-
|
|
12
|
+
className: t(
|
|
13
|
+
m,
|
|
14
|
+
e ? "" : "mint:border-gray-100 mint:dark:border-gray-800 mint:border-b mint:last:border-b-0"
|
|
15
|
+
),
|
|
16
|
+
children: a
|
|
13
17
|
},
|
|
14
18
|
r
|
|
15
19
|
);
|
|
16
20
|
}
|
|
17
21
|
export {
|
|
18
|
-
|
|
22
|
+
d as ParamFieldWrapper
|
|
19
23
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { Transition as
|
|
1
|
+
import { jsx as i, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { Transition as a, TransitionChild as m } from "@headlessui/react";
|
|
3
3
|
import { Fragment as n } from "react";
|
|
4
4
|
import { createPortal as c } from "react-dom";
|
|
5
5
|
import { zIndex as l } from "../../../constants/zIndex.js";
|
|
6
6
|
import "@mintlify/validation";
|
|
7
|
+
import "@sindresorhus/slugify";
|
|
7
8
|
import { cn as d } from "../../../utils/cn.js";
|
|
8
|
-
const
|
|
9
|
+
const k = ({
|
|
9
10
|
isPlaygroundExpanded: e,
|
|
10
11
|
setIsPlaygroundExpanded: t,
|
|
11
12
|
children: o
|
|
12
13
|
}) => typeof window > "u" ? null : c(
|
|
13
|
-
/* @__PURE__ */ i(
|
|
14
|
+
/* @__PURE__ */ i(a, { show: e, as: n, children: /* @__PURE__ */ r("div", { className: d(l.Popup, "mint:fixed mint:inset-0 mint:overflow-y-auto mint:p-4 mint:sm:p-6 mint:md:p-12"), children: [
|
|
14
15
|
/* @__PURE__ */ i(
|
|
15
16
|
m,
|
|
16
17
|
{
|
|
@@ -54,5 +55,5 @@ const y = ({
|
|
|
54
55
|
document.body
|
|
55
56
|
);
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
+
k as PlaygroundModalWrapper
|
|
58
59
|
};
|
|
@@ -3,8 +3,9 @@ import { getMethodColor as h } from "../../../components/Api/colors.js";
|
|
|
3
3
|
import { useSelectedLocale as d } from "../../../utils/locales/index.js";
|
|
4
4
|
import { SpinnerIosRegular as u } from "@fluentui/react-icons";
|
|
5
5
|
import "@mintlify/validation";
|
|
6
|
+
import "@sindresorhus/slugify";
|
|
6
7
|
import { cn as v } from "../../../utils/cn.js";
|
|
7
|
-
const
|
|
8
|
+
const j = ({
|
|
8
9
|
label: e,
|
|
9
10
|
method: m,
|
|
10
11
|
onClick: o,
|
|
@@ -35,5 +36,5 @@ const L = ({
|
|
|
35
36
|
);
|
|
36
37
|
};
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
j as SendPill
|
|
39
40
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronDownFilled as c } from "@fluentui/react-icons";
|
|
3
|
-
import { DropdownMenu as
|
|
3
|
+
import { DropdownMenu as p, DropdownMenuTrigger as h, DropdownMenuContent as x, DropdownMenuItem as g } from "../../../components/Api/dropdown-menu.js";
|
|
4
4
|
import "@mintlify/validation";
|
|
5
|
+
import "@sindresorhus/slugify";
|
|
5
6
|
import { cn as f } from "../../../utils/cn.js";
|
|
6
7
|
function a(t) {
|
|
7
8
|
if (t)
|
|
8
9
|
return t.schema.deprecated ? `${t.label}, deprecated` : t.label;
|
|
9
10
|
}
|
|
10
|
-
const
|
|
11
|
+
const N = ({
|
|
11
12
|
options: t,
|
|
12
13
|
selectedIndex: r,
|
|
13
14
|
onSelectOption: o,
|
|
@@ -21,9 +22,9 @@ const D = ({
|
|
|
21
22
|
"mint:relative mint:flex mint:items-center mint:px-2 mint:py-0.5 mint:text-gray-600 mint:dark:text-gray-300 mint:hover:text-gray-950 mint:dark:hover:text-white mint:font-medium",
|
|
22
23
|
l
|
|
23
24
|
),
|
|
24
|
-
children: /* @__PURE__ */ m(
|
|
25
|
+
children: /* @__PURE__ */ m(p, { children: [
|
|
25
26
|
/* @__PURE__ */ e(
|
|
26
|
-
|
|
27
|
+
h,
|
|
27
28
|
{
|
|
28
29
|
disabled: !i,
|
|
29
30
|
className: "mint:font-mono mint:text-xs mint:text-gray-600 mint:dark:text-gray-300 mint:hover:text-gray-950 mint:dark:hover:text-white",
|
|
@@ -48,5 +49,5 @@ const D = ({
|
|
|
48
49
|
);
|
|
49
50
|
};
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
N as TypeDropdown
|
|
52
53
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "@mintlify/validation";
|
|
3
|
+
import "@sindresorhus/slugify";
|
|
3
4
|
import { cn as e } from "../../../utils/cn.js";
|
|
4
5
|
import { formatJSON as s } from "../../../utils/formatJSON.js";
|
|
5
6
|
import { Description as a } from "../components/Description.js";
|
|
@@ -14,7 +15,7 @@ ${s(t)}
|
|
|
14
15
|
}
|
|
15
16
|
);
|
|
16
17
|
}
|
|
17
|
-
const
|
|
18
|
+
const j = ({
|
|
18
19
|
schema: t
|
|
19
20
|
}) => {
|
|
20
21
|
const o = t.example, i = t.examples !== void 0 ? Array.isArray(t.examples) ? t.examples : [t.examples] : void 0;
|
|
@@ -46,5 +47,5 @@ const v = ({
|
|
|
46
47
|
);
|
|
47
48
|
};
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
j as ExampleDescription
|
|
50
51
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { MarkdownWithoutHeaders as
|
|
2
|
+
import { MarkdownWithoutHeaders as o, Markdown as e } from "../../../components/Api/Markdown.js";
|
|
3
3
|
import "@mintlify/validation";
|
|
4
|
+
import "@sindresorhus/slugify";
|
|
4
5
|
import { cn as t } from "../../../utils/cn.js";
|
|
5
|
-
const
|
|
6
|
+
const c = ({ markdown: n, className: i }) => /* @__PURE__ */ r("div", { className: t("mint:prose mint:prose-sm mint:prose-gray mint:dark:prose-invert mint:max-w-none mint:w-full mint:col-span-full", i), children: /* @__PURE__ */ r(e, { children: n }) }), d = ({
|
|
6
7
|
markdown: n,
|
|
7
8
|
className: i
|
|
8
|
-
}) => /* @__PURE__ */ r("div", { className: t("mint:prose mint:prose-sm mint:prose-gray mint:dark:prose-invert mint:max-w-none mint:w-full", i), children: /* @__PURE__ */ r(
|
|
9
|
+
}) => /* @__PURE__ */ r("div", { className: t("mint:prose mint:prose-sm mint:prose-gray mint:dark:prose-invert mint:max-w-none mint:w-full", i), children: /* @__PURE__ */ r(o, { children: n }) });
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
c as Description,
|
|
12
|
+
d as DescriptionWithoutHeaders
|
|
12
13
|
};
|
|
@@ -2,18 +2,19 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useSelectedLocale as s } from "../../../utils/locales/index.js";
|
|
3
3
|
import { Classes as d } from "../../../api-playground-2/types/index.js";
|
|
4
4
|
import "@mintlify/validation";
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import "@sindresorhus/slugify";
|
|
6
|
+
import { cn as n } from "../../../utils/cn.js";
|
|
7
|
+
const u = ({
|
|
7
8
|
options: r,
|
|
8
9
|
selectedIndex: a,
|
|
9
|
-
onSelectOption:
|
|
10
|
+
onSelectOption: i,
|
|
10
11
|
noBackground: o
|
|
11
12
|
}) => {
|
|
12
13
|
const l = s();
|
|
13
|
-
return /* @__PURE__ */ t("div", { className:
|
|
14
|
+
return /* @__PURE__ */ t("div", { className: n(d.OptionDropdown, "mint:inline-flex mint:relative mint:mr-0!"), children: /* @__PURE__ */ t(
|
|
14
15
|
"div",
|
|
15
16
|
{
|
|
16
|
-
className:
|
|
17
|
+
className: n(
|
|
17
18
|
"mint:font-mono mint:text-xs mint:font-medium mint:inline-block! mint:leading-4! mint:items-center mint:rounded-md mint:text-gray-600 mint:dark:text-gray-200 mint:py-0.5",
|
|
18
19
|
!o && "mint:bg-gray-100/50 mint:dark:bg-white/5"
|
|
19
20
|
),
|
|
@@ -22,14 +23,14 @@ const f = ({
|
|
|
22
23
|
{
|
|
23
24
|
"aria-label": l["aria.selectSchemaType"],
|
|
24
25
|
className: "mint:flex mint:bg-transparent mint:focus:outline-0 mint:cursor-pointer mint:text-start mint:pl-0 mint:pr-0 mint:hover:text-gray-950 mint:dark:hover:text-white",
|
|
25
|
-
onChange: (
|
|
26
|
+
onChange: (e) => i == null ? void 0 : i(e.target.selectedIndex),
|
|
26
27
|
value: a,
|
|
27
|
-
children: r.map((
|
|
28
|
+
children: r.map((e, m) => /* @__PURE__ */ t("option", { value: m, children: e }, m))
|
|
28
29
|
}
|
|
29
30
|
)
|
|
30
31
|
}
|
|
31
32
|
) });
|
|
32
33
|
};
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
u as OptionDropdown
|
|
35
36
|
};
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { jsxs as o, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { Classes as m } from "../../../api-playground-2/types/index.js";
|
|
3
3
|
import "@mintlify/validation";
|
|
4
|
+
import "@sindresorhus/slugify";
|
|
4
5
|
import { cn as e } from "../../../utils/cn.js";
|
|
5
6
|
import { Description as c } from "./Description.js";
|
|
6
7
|
import { OptionDropdown as p } from "./OptionDropdown.js";
|
|
7
|
-
const
|
|
8
|
+
const N = ({
|
|
8
9
|
title: a,
|
|
9
10
|
subtitle: r,
|
|
10
|
-
rightElement:
|
|
11
|
-
options:
|
|
11
|
+
rightElement: t,
|
|
12
|
+
options: n,
|
|
12
13
|
selectedIndex: s,
|
|
13
14
|
onSelectOption: d,
|
|
14
15
|
children: l
|
|
15
16
|
}) => /* @__PURE__ */ o("div", { className: e(m.APISectionHeading, "mint:flex mint:flex-col mint:gap-y-4 mint:w-full"), children: [
|
|
16
17
|
/* @__PURE__ */ o("div", { className: "mint:flex mint:items-baseline mint:border-b mint:pb-2.5 mint:border-gray-100 mint:dark:border-gray-800 mint:w-full", children: [
|
|
17
18
|
/* @__PURE__ */ i("h4", { className: e(m.APISectionHeadingTitle, "mint:flex-1 mint:mb-0"), children: a }),
|
|
18
|
-
|
|
19
|
+
n && n.length > 1 && /* @__PURE__ */ i(
|
|
19
20
|
p,
|
|
20
21
|
{
|
|
21
|
-
options:
|
|
22
|
+
options: n,
|
|
22
23
|
selectedIndex: s,
|
|
23
24
|
onSelectOption: d,
|
|
24
25
|
noBackground: !0
|
|
25
26
|
}
|
|
26
27
|
),
|
|
27
|
-
/* @__PURE__ */ i("div", { className: "mint:flex mint:items-center", children:
|
|
28
|
+
/* @__PURE__ */ i("div", { className: "mint:flex mint:items-center", children: t && (typeof t == "string" ? /* @__PURE__ */ i("div", { className: "mint:font-mono mint:px-2 mint:py-0.5 mint:text-xs mint:font-medium mint:text-gray-600 mint:dark:text-gray-300", children: t }) : t) })
|
|
28
29
|
] }),
|
|
29
30
|
l,
|
|
30
31
|
r && /* @__PURE__ */ i(
|
|
@@ -39,5 +40,5 @@ const v = ({
|
|
|
39
40
|
)
|
|
40
41
|
] });
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
+
N as SectionHeading
|
|
43
44
|
};
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import {
|
|
4
|
-
import { CodeExampleLabelContext as
|
|
5
|
-
import { ApiReferenceContext2 as
|
|
6
|
-
import
|
|
7
|
-
import { clsx as
|
|
8
|
-
import { RequestExample as
|
|
9
|
-
import { ResponseExample as
|
|
10
|
-
import { initialApiPlaygroundInputs as
|
|
11
|
-
const
|
|
12
|
-
const { apiReferenceData2:
|
|
13
|
-
() =>
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as f, useState as x, useMemo as u } from "react";
|
|
3
|
+
import { useDebouncedApiPlaygroundInputs as d } from "./hooks/usePlaygroundInputsStore.js";
|
|
4
|
+
import { CodeExampleLabelContext as h } from "../contexts/CodeExampleLabelContext.js";
|
|
5
|
+
import { ApiReferenceContext2 as g } from "../contexts/ConfigContext.js";
|
|
6
|
+
import R from "../components/Api/ErrorBoundary.js";
|
|
7
|
+
import { clsx as v } from "clsx";
|
|
8
|
+
import { RequestExample as C } from "./components/Example/RequestExample.js";
|
|
9
|
+
import { ResponseExample as D } from "./components/Example/ResponseExample.js";
|
|
10
|
+
import { initialApiPlaygroundInputs as E } from "./constants/index.js";
|
|
11
|
+
const q = ({ className: t, isModal: r = !1, apiReferenceData: m, noInputs: n = !1 }) => {
|
|
12
|
+
const { apiReferenceData2: a } = f(g), i = m || a, o = d(100), [p, s] = x(), l = u(
|
|
13
|
+
() => v(
|
|
14
14
|
"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
15
|
t
|
|
16
16
|
),
|
|
17
17
|
[t, r]
|
|
18
18
|
);
|
|
19
|
-
return /* @__PURE__ */ e(
|
|
19
|
+
return /* @__PURE__ */ e(h.Provider, { value: { selectedLabel: p, setSelectedLabel: s }, children: /* @__PURE__ */ e("div", { className: l, children: /* @__PURE__ */ c(R, { children: [
|
|
20
20
|
/* @__PURE__ */ e(
|
|
21
|
-
|
|
21
|
+
C,
|
|
22
22
|
{
|
|
23
|
-
selectedSecurityOptionIndex: s,
|
|
24
23
|
apiReferenceData: i,
|
|
25
|
-
inputs:
|
|
24
|
+
inputs: n ? E : o,
|
|
26
25
|
maxHeight: "mint:max-h-[40vh]"
|
|
27
26
|
}
|
|
28
27
|
),
|
|
29
|
-
/* @__PURE__ */ e(
|
|
28
|
+
/* @__PURE__ */ e(D, { apiReferenceData: i, maxHeight: "mint:max-h-[40vh]" })
|
|
30
29
|
] }) }) });
|
|
31
30
|
};
|
|
32
31
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
q as ApiExamples,
|
|
33
|
+
q as default
|
|
35
34
|
};
|