@mintlify/msft-sdk 1.1.61 → 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/generateSnippet.js +1 -1
- 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/httpsnippet/src/helpers/code-builder.js +27 -0
- package/dist/httpsnippet/src/helpers/escape.js +11 -0
- package/dist/httpsnippet/src/helpers/headers.js +13 -0
- package/dist/httpsnippet/src/helpers/reducer.js +7 -0
- package/dist/httpsnippet/src/helpers/shell.js +5 -0
- package/dist/httpsnippet/src/helpers/url-format.js +35 -0
- package/dist/httpsnippet/src/helpers/url-parse.js +76 -0
- package/dist/httpsnippet/src/index.js +157 -0
- package/dist/httpsnippet/src/targets/c/libcurl/client.js +22 -0
- package/dist/httpsnippet/src/targets/c/target.js +15 -0
- package/dist/httpsnippet/src/targets/clojure/clj_http/client.js +120 -0
- package/dist/httpsnippet/src/targets/clojure/target.js +14 -0
- package/dist/httpsnippet/src/targets/csharp/httpclient/client.js +76 -0
- package/dist/httpsnippet/src/targets/csharp/restsharp/client.js +63 -0
- package/dist/httpsnippet/src/targets/csharp/target.js +17 -0
- package/dist/httpsnippet/src/targets/go/native/client.js +24 -0
- package/dist/httpsnippet/src/targets/go/target.js +15 -0
- package/dist/httpsnippet/src/targets/http/http1.1/client.js +34 -0
- package/dist/httpsnippet/src/targets/http/target.js +14 -0
- package/dist/httpsnippet/src/targets/index.js +43 -0
- package/dist/httpsnippet/src/targets/java/asynchttp/client.js +23 -0
- package/dist/httpsnippet/src/targets/java/nethttp/client.js +28 -0
- package/dist/httpsnippet/src/targets/java/okhttp/client.js +23 -0
- package/dist/httpsnippet/src/targets/java/target.js +20 -0
- package/dist/httpsnippet/src/targets/java/unirest/client.js +23 -0
- package/dist/httpsnippet/src/targets/javascript/axios/client.js +50 -0
- package/dist/httpsnippet/src/targets/javascript/fetch/client.js +61 -0
- package/dist/httpsnippet/src/targets/javascript/jquery/client.js +51 -0
- package/dist/httpsnippet/src/targets/javascript/target.js +20 -0
- package/dist/httpsnippet/src/targets/javascript/xhr/client.js +49 -0
- package/dist/httpsnippet/src/targets/json/native/client.js +39 -0
- package/dist/httpsnippet/src/targets/json/target.js +14 -0
- package/dist/httpsnippet/src/targets/kotlin/okhttp/client.js +23 -0
- package/dist/httpsnippet/src/targets/kotlin/target.js +14 -0
- package/dist/httpsnippet/src/targets/node/axios/client.js +40 -0
- package/dist/httpsnippet/src/targets/node/fetch/client.js +68 -0
- package/dist/httpsnippet/src/targets/node/native/client.js +45 -0
- package/dist/httpsnippet/src/targets/node/target.js +19 -0
- package/dist/httpsnippet/src/targets/objc/helpers.js +27 -0
- package/dist/httpsnippet/src/targets/objc/nsurlsession/client.js +63 -0
- package/dist/httpsnippet/src/targets/objc/target.js +14 -0
- package/dist/httpsnippet/src/targets/ocaml/cohttp/client.js +32 -0
- package/dist/httpsnippet/src/targets/ocaml/target.js +14 -0
- package/dist/httpsnippet/src/targets/php/curl/client.js +85 -0
- package/dist/httpsnippet/src/targets/php/guzzle/client.js +57 -0
- package/dist/httpsnippet/src/targets/php/helpers.js +65 -0
- package/dist/httpsnippet/src/targets/php/http1/client.js +28 -0
- package/dist/httpsnippet/src/targets/php/http2/client.js +55 -0
- package/dist/httpsnippet/src/targets/php/target.js +21 -0
- package/dist/httpsnippet/src/targets/powershell/common.js +19 -0
- package/dist/httpsnippet/src/targets/powershell/restmethod/client.js +14 -0
- package/dist/httpsnippet/src/targets/powershell/target.js +16 -0
- package/dist/httpsnippet/src/targets/powershell/webrequest/client.js +14 -0
- package/dist/httpsnippet/src/targets/python/helpers.js +33 -0
- package/dist/httpsnippet/src/targets/python/requests/client.js +74 -0
- package/dist/httpsnippet/src/targets/python/target.js +15 -0
- package/dist/httpsnippet/src/targets/r/httr/client.js +46 -0
- package/dist/httpsnippet/src/targets/r/target.js +14 -0
- package/dist/httpsnippet/src/targets/ruby/native/client.js +37 -0
- package/dist/httpsnippet/src/targets/ruby/target.js +14 -0
- package/dist/httpsnippet/src/targets/shell/curl/client.js +92 -0
- package/dist/httpsnippet/src/targets/shell/httpie/client.js +56 -0
- package/dist/httpsnippet/src/targets/shell/target.js +19 -0
- package/dist/httpsnippet/src/targets/shell/wget/client.js +30 -0
- package/dist/httpsnippet/src/targets/swift/helpers.js +38 -0
- package/dist/httpsnippet/src/targets/swift/target.js +14 -0
- package/dist/httpsnippet/src/targets/swift/urlsession/client.js +59 -0
- 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 +17 -4
- 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
|
@@ -1,127 +1,111 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { ApiExamples as
|
|
10
|
-
import { EndpointHeader as
|
|
11
|
-
import { BodySection as
|
|
12
|
-
import { ParameterSection as
|
|
13
|
-
import { SecuritySection as
|
|
14
|
-
import { ServerSection as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const xt = ({
|
|
22
|
-
isPlaygroundExpanded: l,
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S } from "react";
|
|
3
|
+
import { useSelectedBaseUrl as v } from "./hooks/useSelectedBaseUrl.js";
|
|
4
|
+
import { useSelectedExample as I } from "./hooks/useSelectedExample.js";
|
|
5
|
+
import { Response as c } from "../api-playground/ApiPlayground/Response/index.js";
|
|
6
|
+
import { ModalHeader as N } from "../api-playground/ApiPlayground/components/ModalHeader.js";
|
|
7
|
+
import { PlaygroundModalWrapper as b } from "../api-playground/ApiPlayground/components/PlaygroundModalWrapper.js";
|
|
8
|
+
import { useKeyboardShortcut as B } from "../hooks/useKeyboardShortcut.js";
|
|
9
|
+
import { ApiExamples as C } from "./ApiExamples.js";
|
|
10
|
+
import { EndpointHeader as k } from "./EndpointHeader.js";
|
|
11
|
+
import { BodySection as w } from "./components/Request/BodySection.js";
|
|
12
|
+
import { ParameterSection as T } from "./components/Request/ParameterSection.js";
|
|
13
|
+
import { SecuritySection as q } from "./components/Request/SecuritySection.js";
|
|
14
|
+
import { ServerSection as M } from "./components/Request/ServerSection.js";
|
|
15
|
+
import { SendPillWrapper as j } from "./components/SendPillWrapper.js";
|
|
16
|
+
import { useInitializeInputs as E } from "./hooks/useInitializeInputs.js";
|
|
17
|
+
import { useSelectedRequestBodyContentType as P } from "./hooks/useSelectedRequestBodyContentType.js";
|
|
18
|
+
import { cn as U } from "../utils/cn.js";
|
|
19
|
+
const D = ({
|
|
20
|
+
isPlaygroundExpanded: o,
|
|
23
21
|
setIsPlaygroundExpanded: r,
|
|
24
|
-
baseUrl:
|
|
25
|
-
baseUrlOptions:
|
|
22
|
+
baseUrl: s,
|
|
23
|
+
baseUrlOptions: a,
|
|
26
24
|
apiReferenceData: e
|
|
27
25
|
}) => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
G({
|
|
26
|
+
const { selectedBaseUrlIndex: m, setSelectedBaseUrlIndex: p } = v(), { selectedRequestBodyContentTypeIndex: l, setSelectedRequestBodyContentTypeIndex: u } = P(), [n, g] = S(), { selectedExampleIndex: y } = I();
|
|
27
|
+
if (E({
|
|
31
28
|
apiReferenceData: e,
|
|
32
|
-
selectedBaseUrlIndex:
|
|
33
|
-
selectedExampleIndex:
|
|
34
|
-
selectedRequestBodyContentTypeIndex:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
baseUrl: d,
|
|
39
|
-
contentType: L(e, m),
|
|
40
|
-
setResult: S,
|
|
41
|
-
setIsSending: C
|
|
42
|
-
}), N = F({
|
|
43
|
-
path: ((a = e.operation) == null ? void 0 : a.path) ?? "",
|
|
44
|
-
baseUrl: d
|
|
45
|
-
}), b = async () => {
|
|
46
|
-
await j(N) === "success" && (c(!0), setTimeout(() => {
|
|
47
|
-
c(!1);
|
|
48
|
-
}, 2e3));
|
|
49
|
-
};
|
|
50
|
-
if (M({
|
|
29
|
+
selectedBaseUrlIndex: m,
|
|
30
|
+
selectedExampleIndex: y,
|
|
31
|
+
selectedRequestBodyContentTypeIndex: l,
|
|
32
|
+
locallyStoredCredentials: void 0,
|
|
33
|
+
serverInputs: void 0
|
|
34
|
+
}), B({
|
|
51
35
|
key: "Escape",
|
|
52
|
-
callback:
|
|
36
|
+
callback: o ? () => r(!1) : void 0,
|
|
53
37
|
isSingleKey: !0
|
|
54
38
|
}), !e.operation) return null;
|
|
55
|
-
const { path:
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
|
|
39
|
+
const { path: f, method: d, title: x, description: h } = e.operation;
|
|
40
|
+
return /* @__PURE__ */ i(
|
|
41
|
+
b,
|
|
58
42
|
{
|
|
59
|
-
isPlaygroundExpanded:
|
|
43
|
+
isPlaygroundExpanded: o,
|
|
60
44
|
setIsPlaygroundExpanded: r,
|
|
61
45
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
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: [
|
|
63
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(
|
|
64
|
-
|
|
48
|
+
k,
|
|
65
49
|
{
|
|
66
|
-
|
|
67
|
-
baseUrlOptions:
|
|
68
|
-
selectedBaseUrlIndex:
|
|
69
|
-
setSelectedBaseUrlIndex:
|
|
70
|
-
}),
|
|
71
|
-
isCopiedActive: f,
|
|
50
|
+
baseUrl: s,
|
|
51
|
+
baseUrlOptions: a,
|
|
52
|
+
selectedBaseUrlIndex: m,
|
|
53
|
+
setSelectedBaseUrlIndex: p,
|
|
72
54
|
display: "interactive",
|
|
73
|
-
path:
|
|
74
|
-
method:
|
|
55
|
+
path: f,
|
|
56
|
+
method: d,
|
|
75
57
|
onBaseUrlChange: () => {
|
|
76
58
|
},
|
|
77
59
|
isInPlaygroundModal: !0
|
|
78
60
|
}
|
|
79
61
|
) }),
|
|
80
62
|
/* @__PURE__ */ t(
|
|
81
|
-
|
|
63
|
+
j,
|
|
82
64
|
{
|
|
65
|
+
apiReferenceData: e,
|
|
66
|
+
baseUrl: s,
|
|
67
|
+
selectedRequestBodyContentTypeIndex: l,
|
|
68
|
+
setResult: g,
|
|
83
69
|
label: "Send",
|
|
84
|
-
method:
|
|
85
|
-
isSending: I,
|
|
86
|
-
onClick: v,
|
|
70
|
+
method: d,
|
|
87
71
|
className: "mint:w-20"
|
|
88
72
|
}
|
|
89
73
|
)
|
|
90
74
|
] }),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */ t(
|
|
94
|
-
|
|
95
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ i("div", { className: "mint:grid mint:grid-cols-1 mint:lg:grid-cols-5 mint:gap-x-8 mint:gap-y-6 mint:mt-5 mint:relative", children: [
|
|
76
|
+
/* @__PURE__ */ i("div", { className: "mint:col-span-1 mint:lg:col-span-3", children: [
|
|
77
|
+
/* @__PURE__ */ t(N, { title: x, description: h }),
|
|
78
|
+
n && /* @__PURE__ */ t(c, { result: n, className: "mint:mt-6 mint:block mint:lg:hidden" }),
|
|
79
|
+
/* @__PURE__ */ i("div", { className: "mint:space-y-2 mint:mt-6", children: [
|
|
96
80
|
/* @__PURE__ */ t(
|
|
97
|
-
|
|
81
|
+
M,
|
|
98
82
|
{
|
|
99
83
|
apiReferenceData: e,
|
|
100
|
-
selectedBaseUrlIndex:
|
|
84
|
+
selectedBaseUrlIndex: m
|
|
101
85
|
}
|
|
102
86
|
),
|
|
103
|
-
/* @__PURE__ */ t(
|
|
104
|
-
/* @__PURE__ */ t(
|
|
87
|
+
/* @__PURE__ */ t(q, { apiReferenceData: e }),
|
|
88
|
+
/* @__PURE__ */ t(T, { apiReferenceData: e }),
|
|
105
89
|
/* @__PURE__ */ t(
|
|
106
|
-
|
|
90
|
+
w,
|
|
107
91
|
{
|
|
108
92
|
apiReferenceData: e,
|
|
109
|
-
selectedContentTypeIndex:
|
|
110
|
-
setSelectedContentTypeIndex:
|
|
93
|
+
selectedContentTypeIndex: l,
|
|
94
|
+
setSelectedContentTypeIndex: u
|
|
111
95
|
}
|
|
112
96
|
)
|
|
113
97
|
] })
|
|
114
98
|
] }),
|
|
115
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ i(
|
|
116
100
|
"div",
|
|
117
101
|
{
|
|
118
|
-
className:
|
|
102
|
+
className: U(
|
|
119
103
|
"mint:p-px mint:col-span-1 mint:lg:col-span-2 mint:lg:space-y-6 mint:lg:flex mint:lg:sticky mint:lg:top-0 mint:lg:self-start mint:lg:h-[calc(100vh-5.5rem)]",
|
|
120
|
-
|
|
104
|
+
n && "mint:lg:flex-col mint:overflow-y-auto mint:lg:-top-12 mint:lg:h-screen"
|
|
121
105
|
),
|
|
122
106
|
children: [
|
|
123
|
-
|
|
124
|
-
/* @__PURE__ */ t(
|
|
107
|
+
n && /* @__PURE__ */ t(c, { result: n, className: "mint:hidden mint:lg:block mint:min-h-fit" }),
|
|
108
|
+
/* @__PURE__ */ t(C, { isModal: !0, "data-testid": "api-playground-request-example", className: "mint:xl:w-full" })
|
|
125
109
|
]
|
|
126
110
|
}
|
|
127
111
|
)
|
|
@@ -131,5 +115,5 @@ const xt = ({
|
|
|
131
115
|
);
|
|
132
116
|
};
|
|
133
117
|
export {
|
|
134
|
-
|
|
118
|
+
D as Playground
|
|
135
119
|
};
|
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { SchemaField as r } from "./components/EndpointFields/fields/SchemaField.js";
|
|
3
|
+
import { Classes as s } from "./types/index.js";
|
|
4
|
+
import { cn as l } from "../utils/cn.js";
|
|
5
|
+
const d = ({
|
|
6
|
+
apiReferenceData: m,
|
|
7
|
+
children: t
|
|
7
8
|
}) => {
|
|
8
|
-
const e =
|
|
9
|
-
return e ? /* @__PURE__ */
|
|
9
|
+
const e = m.schemaData;
|
|
10
|
+
return e ? /* @__PURE__ */ a("div", { className: "mint:flex mint:flex-col mint:gap-8", id: "api-playground-2-schema-page", children: /* @__PURE__ */ i(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: l(
|
|
14
|
+
s.Content,
|
|
15
|
+
"relative"
|
|
16
|
+
),
|
|
17
|
+
children: [
|
|
18
|
+
t,
|
|
19
|
+
/* @__PURE__ */ a(r, { schema: e, fieldType: "schema", displayFlattened: !0 })
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
) }) : null;
|
|
10
23
|
};
|
|
11
24
|
export {
|
|
12
|
-
|
|
25
|
+
d as SchemaPage
|
|
13
26
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs as y, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Classes as f } from "../../types/index.js";
|
|
3
|
+
import { SectionHeading as p } from "../../../api-playground/EndpointFields/components/SectionHeading.js";
|
|
4
|
+
import { SchemaField as B } from "./fields/SchemaField.js";
|
|
5
|
+
import { useSelectedRequestBodyContentType as S } from "../../hooks/useSelectedRequestBodyContentType.js";
|
|
6
|
+
import { cn as x } from "../../../utils/cn.js";
|
|
7
|
+
const O = ({ apiReferenceData: o }) => {
|
|
8
|
+
var r, m;
|
|
9
|
+
const { selectedRequestBodyContentTypeIndex: c, setSelectedRequestBodyContentTypeIndex: a } = S(), e = (r = o.dependencies) == null ? void 0 : r.requestBody, i = e == null ? void 0 : e.description, t = Object.keys((e == null ? void 0 : e.content) ?? {}), u = Object.fromEntries(
|
|
10
|
+
t.map((n) => {
|
|
11
|
+
var l;
|
|
12
|
+
return [n, (l = e == null ? void 0 : e.content[n]) == null ? void 0 : l.schema];
|
|
13
|
+
}).filter((n) => n[1] !== void 0)
|
|
14
|
+
), h = (m = o.dependencies) == null ? void 0 : m.schemas, d = Object.values(u)[c];
|
|
15
|
+
return d === void 0 ? null : /* @__PURE__ */ y("div", { className: x(f.APISection), children: [
|
|
16
|
+
t.length > 1 ? /* @__PURE__ */ s(
|
|
17
|
+
p,
|
|
18
|
+
{
|
|
19
|
+
title: "Body",
|
|
20
|
+
options: t,
|
|
21
|
+
selectedIndex: c,
|
|
22
|
+
onSelectOption: a,
|
|
23
|
+
subtitle: i
|
|
24
|
+
}
|
|
25
|
+
) : /* @__PURE__ */ s(p, { title: "Body", rightElement: t[0], subtitle: i }),
|
|
26
|
+
/* @__PURE__ */ s(
|
|
27
|
+
B,
|
|
28
|
+
{
|
|
29
|
+
schema: d,
|
|
30
|
+
fieldType: "body",
|
|
31
|
+
displayFlattened: !0,
|
|
32
|
+
omitPadding: !0,
|
|
33
|
+
schemas: h
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
O as Body
|
|
40
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsxs as h, Fragment as p, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as l } from "react";
|
|
3
|
+
import { Classes as u } from "../../types/index.js";
|
|
4
|
+
import { isSchemaObject as f } from "../../schemaGraph/utils.js";
|
|
5
|
+
import { SectionHeading as y } from "../../../api-playground/EndpointFields/components/SectionHeading.js";
|
|
6
|
+
import { SchemaField as j } from "./fields/SchemaField.js";
|
|
7
|
+
import { cn as P } from "../../../utils/cn.js";
|
|
8
|
+
const E = ({ apiReferenceData: t }) => {
|
|
9
|
+
var m, e;
|
|
10
|
+
const i = l(() => {
|
|
11
|
+
var r;
|
|
12
|
+
return ((r = t.dependencies) == null ? void 0 : r.parameters) ?? {};
|
|
13
|
+
}, [(m = t.dependencies) == null ? void 0 : m.parameters]), s = (e = t.dependencies) == null ? void 0 : e.schemas, o = l(() => {
|
|
14
|
+
const r = {
|
|
15
|
+
header: {},
|
|
16
|
+
path: {},
|
|
17
|
+
query: {},
|
|
18
|
+
cookie: {}
|
|
19
|
+
};
|
|
20
|
+
return Object.entries(i).forEach(([x, a]) => {
|
|
21
|
+
const d = a.in;
|
|
22
|
+
d in r && r[d] && (r[d][a.name] = a);
|
|
23
|
+
}), r;
|
|
24
|
+
}, [i]);
|
|
25
|
+
return /* @__PURE__ */ h(p, { children: [
|
|
26
|
+
/* @__PURE__ */ n(
|
|
27
|
+
c,
|
|
28
|
+
{
|
|
29
|
+
title: "Headers",
|
|
30
|
+
parameters: o.header ?? {},
|
|
31
|
+
schemas: s
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
/* @__PURE__ */ n(
|
|
35
|
+
c,
|
|
36
|
+
{
|
|
37
|
+
title: "Path Parameters",
|
|
38
|
+
parameters: o.path ?? {},
|
|
39
|
+
schemas: s
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ n(
|
|
43
|
+
c,
|
|
44
|
+
{
|
|
45
|
+
title: "Query Parameters",
|
|
46
|
+
parameters: o.query ?? {},
|
|
47
|
+
schemas: s
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ n(
|
|
51
|
+
c,
|
|
52
|
+
{
|
|
53
|
+
title: "Cookies",
|
|
54
|
+
parameters: o.cookie ?? {},
|
|
55
|
+
schemas: s
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] });
|
|
59
|
+
}, c = ({
|
|
60
|
+
parameters: t,
|
|
61
|
+
title: i,
|
|
62
|
+
schemas: s
|
|
63
|
+
}) => {
|
|
64
|
+
if (Object.keys(t).length === 0)
|
|
65
|
+
return null;
|
|
66
|
+
const o = Object.entries(t).map(([m, e]) => {
|
|
67
|
+
if (!e.schema || !f(e.schema)) return null;
|
|
68
|
+
const r = e.description ?? e.schema.description;
|
|
69
|
+
return /* @__PURE__ */ n(
|
|
70
|
+
j,
|
|
71
|
+
{
|
|
72
|
+
schema: { ...e.schema, description: r },
|
|
73
|
+
fieldType: "parameter",
|
|
74
|
+
name: e.name,
|
|
75
|
+
style: e.style,
|
|
76
|
+
explode: e.explode,
|
|
77
|
+
required: e.required,
|
|
78
|
+
schemas: s
|
|
79
|
+
},
|
|
80
|
+
e.name
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
return /* @__PURE__ */ h("div", { className: P(u.APISection), children: [
|
|
84
|
+
/* @__PURE__ */ n(y, { title: i }),
|
|
85
|
+
o
|
|
86
|
+
] });
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
E as Parameters
|
|
90
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { jsxs as _, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as V, useRef as W, useMemo as y, useEffect as X, useCallback as H } from "react";
|
|
3
|
+
import { SchemaField as L } from "./fields/SchemaField.js";
|
|
4
|
+
import { isSchemaObject as f, generateSchemaOptionLabels as Y } from "../../schemaGraph/utils.js";
|
|
5
|
+
import { Classes as Z } from "../../types/index.js";
|
|
6
|
+
import { SectionHeading as D } from "../../../api-playground/EndpointFields/components/SectionHeading.js";
|
|
7
|
+
import { useSelectedResponseContentType as tt } from "../../hooks/useSelectedResponseContentType.js";
|
|
8
|
+
import { TypeDropdown as U } from "../../../api-playground/ApiPlayground/components/TypeDropdown.js";
|
|
9
|
+
import { orNullTypeString as et } from "../../../openapi/generateTypeStringFromSchema.js";
|
|
10
|
+
import { InfoPill as nt } from "../../../components/Api/Param.js";
|
|
11
|
+
import { cn as T } from "../../../utils/cn.js";
|
|
12
|
+
import { Tabs as st } from "../../../components/content-components/tabs/tabs.js";
|
|
13
|
+
import { Tab as ot } from "../../../components/content-components/tabs/tab.js";
|
|
14
|
+
const Tt = ({ apiReferenceData: s }) => {
|
|
15
|
+
var j, k, A, N;
|
|
16
|
+
const [r, l] = V(0), { selectedResponseContentTypeIndex: p, setSelectedResponseContentTypeIndex: m } = tt(), x = W(s.operation), d = y(() => {
|
|
17
|
+
var t;
|
|
18
|
+
return ((t = s.dependencies) == null ? void 0 : t.responses) ?? {};
|
|
19
|
+
}, [(j = s.dependencies) == null ? void 0 : j.responses]), b = (k = s.dependencies) == null ? void 0 : k.schemas, n = y(() => {
|
|
20
|
+
var e;
|
|
21
|
+
const t = (e = s.operation) == null ? void 0 : e.responses;
|
|
22
|
+
return t ? Object.entries(t).map(([g, u]) => {
|
|
23
|
+
const c = d[u];
|
|
24
|
+
return [g, (c == null ? void 0 : c.content) ?? {}];
|
|
25
|
+
}) : [];
|
|
26
|
+
}, [d, (A = s.operation) == null ? void 0 : A.responses]);
|
|
27
|
+
X(() => {
|
|
28
|
+
x.current !== s.operation ? (x.current = s.operation, l(0)) : r >= n.length && n.length > 0 && l(0);
|
|
29
|
+
}, [s.operation, n.length, r]);
|
|
30
|
+
const a = y(() => {
|
|
31
|
+
const t = n[r];
|
|
32
|
+
return !t || !t[1] ? [] : Object.entries(t[1]);
|
|
33
|
+
}, [n, r]), q = H(
|
|
34
|
+
(t) => {
|
|
35
|
+
l(t);
|
|
36
|
+
const e = n[t];
|
|
37
|
+
e && e[1] && p >= Object.entries(e[1]).length && m(0);
|
|
38
|
+
},
|
|
39
|
+
[
|
|
40
|
+
n,
|
|
41
|
+
p,
|
|
42
|
+
l,
|
|
43
|
+
m
|
|
44
|
+
]
|
|
45
|
+
), B = H(
|
|
46
|
+
(t) => {
|
|
47
|
+
m(t);
|
|
48
|
+
},
|
|
49
|
+
[m]
|
|
50
|
+
), {
|
|
51
|
+
contentType: C,
|
|
52
|
+
schema: v,
|
|
53
|
+
description: G
|
|
54
|
+
} = y(() => {
|
|
55
|
+
var P, z;
|
|
56
|
+
const t = a[p];
|
|
57
|
+
if (!t)
|
|
58
|
+
return { contentType: void 0, schema: void 0, description: void 0 };
|
|
59
|
+
const [e, g] = t, u = g.schema, c = n[r], $ = c ? String(c[0]) : void 0, F = $ ? (z = (P = s.operation) == null ? void 0 : P.responses) == null ? void 0 : z[$] : void 0, S = F ? d[F] : void 0, M = S == null ? void 0 : S.description;
|
|
60
|
+
return e === "_mintlify/placeholder" ? {
|
|
61
|
+
schema: u,
|
|
62
|
+
contentType: "",
|
|
63
|
+
description: M
|
|
64
|
+
} : {
|
|
65
|
+
schema: u,
|
|
66
|
+
contentType: e,
|
|
67
|
+
description: M
|
|
68
|
+
};
|
|
69
|
+
}, [
|
|
70
|
+
a,
|
|
71
|
+
p,
|
|
72
|
+
n,
|
|
73
|
+
r,
|
|
74
|
+
d,
|
|
75
|
+
(N = s.operation) == null ? void 0 : N.responses
|
|
76
|
+
]);
|
|
77
|
+
if (!v) return null;
|
|
78
|
+
let o = [v];
|
|
79
|
+
o.some((t) => f(t) && t.type === "null") && (o = o.filter(
|
|
80
|
+
(t) => !f(t) || t.type !== "null"
|
|
81
|
+
));
|
|
82
|
+
const h = Y(o), J = n.map(([t, e]) => ({
|
|
83
|
+
label: String(t),
|
|
84
|
+
schema: e
|
|
85
|
+
})), K = a.filter(([t]) => t !== "_mintlify/placeholder").map(([t, e]) => ({
|
|
86
|
+
label: String(t),
|
|
87
|
+
schema: e
|
|
88
|
+
})), O = n[0] ? `${n[0][0]}` : "", w = C === "" ? "" : `${C}`, Q = `${O}${O && w ? " - " : ""}${w}`, E = n.length > 1, I = a.length > 1, R = E || I;
|
|
89
|
+
return /* @__PURE__ */ _("div", { className: T(Z.APISection), children: [
|
|
90
|
+
/* @__PURE__ */ i(
|
|
91
|
+
D,
|
|
92
|
+
{
|
|
93
|
+
title: "Response",
|
|
94
|
+
subtitle: G,
|
|
95
|
+
rightElement: R ? /* @__PURE__ */ _("div", { className: "mint:flex mint:items-center mint:gap-x-3 mint:font-mono mint:text-xs", children: [
|
|
96
|
+
/* @__PURE__ */ i(
|
|
97
|
+
U,
|
|
98
|
+
{
|
|
99
|
+
onSelectOption: q,
|
|
100
|
+
options: J,
|
|
101
|
+
selectedIndex: r,
|
|
102
|
+
className: T(
|
|
103
|
+
"mint:bg-transparent mint:dark:bg-transparent",
|
|
104
|
+
E && "mint:hover:text-zinc-950 mint:dark:hover:text-white mint:transition-all"
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ i(
|
|
109
|
+
U,
|
|
110
|
+
{
|
|
111
|
+
onSelectOption: B,
|
|
112
|
+
options: K,
|
|
113
|
+
selectedIndex: p,
|
|
114
|
+
className: T(
|
|
115
|
+
"mint:bg-transparent mint:dark:bg-transparent",
|
|
116
|
+
I && "mint:hover:text-zinc-950 mint:dark:hover:text-white mint:transition-all"
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
] }) : Q,
|
|
121
|
+
children: h[0] && h[0].includes(et) && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(nt, { className: "mint:max-w-fit mint:text-xs mint:font-medium mint:font-mono mint:break-words", children: h[0] }) })
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
o.length > 1 ? /* @__PURE__ */ i(st, { children: o.map((t, e) => /* @__PURE__ */ i(ot, { title: h[e] ?? "", children: f(t) && /* @__PURE__ */ i(
|
|
125
|
+
L,
|
|
126
|
+
{
|
|
127
|
+
schema: t,
|
|
128
|
+
fieldType: "response",
|
|
129
|
+
displayFlattened: !0,
|
|
130
|
+
schemas: b
|
|
131
|
+
}
|
|
132
|
+
) }, e)) }) : o[0] && f(o[0]) && /* @__PURE__ */ i(
|
|
133
|
+
L,
|
|
134
|
+
{
|
|
135
|
+
schema: o[0],
|
|
136
|
+
fieldType: "response",
|
|
137
|
+
displayFlattened: !0,
|
|
138
|
+
omitPadding: !0,
|
|
139
|
+
schemas: b
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
] });
|
|
143
|
+
};
|
|
144
|
+
export {
|
|
145
|
+
Tt as Response
|
|
146
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx as o, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { useSelectedSecurityOption as S } from "../../hooks/useSelectedSecurityOption.js";
|
|
3
|
+
import { SectionHeading as O } from "../../../api-playground/EndpointFields/components/SectionHeading.js";
|
|
4
|
+
import { Classes as h } from "../../types/index.js";
|
|
5
|
+
import { cn as g } from "../../../utils/cn.js";
|
|
6
|
+
import { PrimitiveParamField as r } from "./fields/PrimitiveParamField.js";
|
|
7
|
+
const P = ({ apiReferenceData: d }) => {
|
|
8
|
+
var a;
|
|
9
|
+
const { selectedSecurityOptionIndex: s, setSelectedSecurityOptionIndex: u } = S(), p = (a = d.dependencies) == null ? void 0 : a.processedSecurityOptions;
|
|
10
|
+
if (!p) return null;
|
|
11
|
+
const l = p[s];
|
|
12
|
+
if (!l) return null;
|
|
13
|
+
const e = [];
|
|
14
|
+
if (l.schemes.forEach(({ scheme: t, schema: i, name: n }) => {
|
|
15
|
+
if (t.type === "apiKey" && "name" in t && "in" in t)
|
|
16
|
+
e.push(
|
|
17
|
+
/* @__PURE__ */ o(
|
|
18
|
+
r,
|
|
19
|
+
{
|
|
20
|
+
fieldType: "authorization",
|
|
21
|
+
schema: i,
|
|
22
|
+
typeOptions: ["string"],
|
|
23
|
+
name: n,
|
|
24
|
+
location: t.in
|
|
25
|
+
},
|
|
26
|
+
`${t.in}:${t.name}`
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
else if (t.type === "http" && "scheme" in t)
|
|
30
|
+
if (t.scheme === "basic") {
|
|
31
|
+
const f = { ...i, type: "string" };
|
|
32
|
+
e.push(
|
|
33
|
+
/* @__PURE__ */ o(
|
|
34
|
+
r,
|
|
35
|
+
{
|
|
36
|
+
fieldType: "authorization",
|
|
37
|
+
schema: f,
|
|
38
|
+
typeOptions: ["string"],
|
|
39
|
+
name: n,
|
|
40
|
+
location: "header"
|
|
41
|
+
},
|
|
42
|
+
`header:${i.title}`
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
} else t.scheme === "bearer" && e.push(
|
|
46
|
+
/* @__PURE__ */ o(
|
|
47
|
+
r,
|
|
48
|
+
{
|
|
49
|
+
fieldType: "authorization",
|
|
50
|
+
schema: i,
|
|
51
|
+
typeOptions: ["string"],
|
|
52
|
+
name: n,
|
|
53
|
+
location: "header"
|
|
54
|
+
},
|
|
55
|
+
`header:${i.title}`
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
else t.type === "oauth2" && e.push(
|
|
59
|
+
/* @__PURE__ */ o(
|
|
60
|
+
r,
|
|
61
|
+
{
|
|
62
|
+
fieldType: "authorization",
|
|
63
|
+
schema: i,
|
|
64
|
+
typeOptions: ["string"],
|
|
65
|
+
name: n,
|
|
66
|
+
location: "header"
|
|
67
|
+
},
|
|
68
|
+
`header:${i.title}`
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
}), e.length === 0) return null;
|
|
72
|
+
const c = p.map((t) => t.title);
|
|
73
|
+
return /* @__PURE__ */ y("div", { className: g(h.APISection), children: [
|
|
74
|
+
/* @__PURE__ */ o(
|
|
75
|
+
O,
|
|
76
|
+
{
|
|
77
|
+
title: "Authorizations",
|
|
78
|
+
options: c,
|
|
79
|
+
selectedIndex: s,
|
|
80
|
+
onSelectOption: u
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
e
|
|
84
|
+
] });
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
P as Security
|
|
88
|
+
};
|