@camunda8/docusaurus-theme-openapi-docs 4.5.1
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/babel.config.js +35 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +81 -0
- package/lib/markdown/createDescription.d.ts +1 -0
- package/lib/markdown/createDescription.js +15 -0
- package/lib/markdown/schema.d.ts +3 -0
- package/lib/markdown/schema.js +154 -0
- package/lib/markdown/utils.d.ts +10 -0
- package/lib/markdown/utils.js +49 -0
- package/lib/markdown/utils.test.d.ts +1 -0
- package/lib/markdown/utils.test.js +43 -0
- package/lib/theme/ApiExplorer/Accept/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Accept/index.js +38 -0
- package/lib/theme/ApiExplorer/Accept/slice.d.ts +11 -0
- package/lib/theme/ApiExplorer/Accept/slice.js +22 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.d.ts +4 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +35 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +41 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +153 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +147 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +58 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.d.ts +14 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +248 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +59 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +51 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +110 -0
- package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
- package/lib/theme/ApiExplorer/Authorization/auth-types.js +28 -0
- package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Authorization/index.js +201 -0
- package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
- package/lib/theme/ApiExplorer/Authorization/slice.js +102 -0
- package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/Body/index.js +394 -0
- package/lib/theme/ApiExplorer/Body/json2xml.js +43 -0
- package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
- package/lib/theme/ApiExplorer/Body/slice.js +97 -0
- package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.d.ts +21 -0
- package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.js +8 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +11 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.js +435 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.d.ts +5 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.js +133 -0
- package/lib/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +505 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +15 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.js +283 -0
- package/lib/theme/ApiExplorer/ContentType/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ContentType/index.js +40 -0
- package/lib/theme/ApiExplorer/ContentType/slice.d.ts +11 -0
- package/lib/theme/ApiExplorer/ContentType/slice.js +22 -0
- package/lib/theme/ApiExplorer/Export/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Export/index.js +57 -0
- package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
- package/lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
- package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/FormFileUpload/index.js +178 -0
- package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/lib/theme/ApiExplorer/FormItem/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/FormItem/index.js +49 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
- package/lib/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
- package/lib/theme/ApiExplorer/FormSelect/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FormSelect/index.js +35 -0
- package/lib/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +11 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.js +80 -0
- package/lib/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/LiveEditor/index.js +176 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.js +86 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +230 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +71 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +97 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +72 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
- package/lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
- package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ParamOptions/index.js +233 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.js +25 -0
- package/lib/theme/ApiExplorer/Request/_Request.scss +129 -0
- package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Request/index.js +443 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.js +223 -0
- package/lib/theme/ApiExplorer/Response/_Response.scss +121 -0
- package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Response/index.js +207 -0
- package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
- package/lib/theme/ApiExplorer/Response/slice.js +51 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.js +519 -0
- package/lib/theme/ApiExplorer/Server/_Server.scss +26 -0
- package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Server/index.js +213 -0
- package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
- package/lib/theme/ApiExplorer/Server/slice.js +33 -0
- package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
- package/lib/theme/ApiExplorer/buildPostmanRequest.js +511 -0
- package/lib/theme/ApiExplorer/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/index.js +107 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +19 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.js +54 -0
- package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
- package/lib/theme/ApiExplorer/storage-utils.js +41 -0
- package/lib/theme/ApiItem/Layout/index.d.ts +3 -0
- package/lib/theme/ApiItem/Layout/index.js +121 -0
- package/lib/theme/ApiItem/Layout/styles.module.css +17 -0
- package/lib/theme/ApiItem/hooks.d.ts +12 -0
- package/lib/theme/ApiItem/hooks.js +13 -0
- package/lib/theme/ApiItem/index.d.ts +2 -0
- package/lib/theme/ApiItem/index.js +238 -0
- package/lib/theme/ApiItem/store.d.ts +58 -0
- package/lib/theme/ApiItem/store.js +53 -0
- package/lib/theme/ApiLogo/index.d.ts +2 -0
- package/lib/theme/ApiLogo/index.js +51 -0
- package/lib/theme/ApiTabs/_ApiTabs.scss +142 -0
- package/lib/theme/ApiTabs/index.d.ts +7 -0
- package/lib/theme/ApiTabs/index.js +275 -0
- package/lib/theme/ArrayBrackets/index.d.ts +3 -0
- package/lib/theme/ArrayBrackets/index.js +50 -0
- package/lib/theme/CodeSamples/_CodeSamples.scss +3 -0
- package/lib/theme/CodeSamples/index.d.ts +8 -0
- package/lib/theme/CodeSamples/index.js +27 -0
- package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
- package/lib/theme/DiscriminatorTabs/index.d.ts +3 -0
- package/lib/theme/DiscriminatorTabs/index.js +258 -0
- package/lib/theme/Markdown/Details/_Details.scss +122 -0
- package/lib/theme/Markdown/index.js +179 -0
- package/lib/theme/MimeTabs/_MimeTabs.scss +70 -0
- package/lib/theme/MimeTabs/index.d.ts +6 -0
- package/lib/theme/MimeTabs/index.js +286 -0
- package/lib/theme/OperationTabs/_OperationTabs.scss +72 -0
- package/lib/theme/OperationTabs/index.d.ts +3 -0
- package/lib/theme/OperationTabs/index.js +248 -0
- package/lib/theme/ParamsDetails/index.d.ts +6 -0
- package/lib/theme/ParamsDetails/index.js +93 -0
- package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/lib/theme/ParamsItem/index.d.ts +22 -0
- package/lib/theme/ParamsItem/index.js +281 -0
- package/lib/theme/RequestSchema/index.d.ts +15 -0
- package/lib/theme/RequestSchema/index.js +208 -0
- package/lib/theme/ResponseExamples/index.d.ts +18 -0
- package/lib/theme/ResponseExamples/index.js +213 -0
- package/lib/theme/ResponseHeaders/index.d.ts +13 -0
- package/lib/theme/ResponseHeaders/index.js +39 -0
- package/lib/theme/ResponseSchema/index.d.ts +15 -0
- package/lib/theme/ResponseSchema/index.js +165 -0
- package/lib/theme/Schema/index.d.ts +8 -0
- package/lib/theme/Schema/index.js +853 -0
- package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/lib/theme/SchemaItem/index.d.ts +12 -0
- package/lib/theme/SchemaItem/index.js +314 -0
- package/lib/theme/SchemaTabs/_SchemaTabs.scss +61 -0
- package/lib/theme/SchemaTabs/index.d.ts +3 -0
- package/lib/theme/SchemaTabs/index.js +255 -0
- package/lib/theme/SkeletonLoader/index.d.ts +6 -0
- package/lib/theme/SkeletonLoader/index.js +20 -0
- package/lib/theme/StatusCodes/index.d.ts +9 -0
- package/lib/theme/StatusCodes/index.js +90 -0
- package/lib/theme/styles.scss +215 -0
- package/lib/theme/translationIds.d.ts +83 -0
- package/lib/theme/translationIds.js +106 -0
- package/lib/types.d.ts +46 -0
- package/lib/types.js +8 -0
- package/package.json +85 -0
- package/src/index.ts +85 -0
- package/src/markdown/createDescription.ts +13 -0
- package/src/markdown/schema.ts +186 -0
- package/src/markdown/utils.test.ts +49 -0
- package/src/markdown/utils.ts +59 -0
- package/src/plugin-content-docs.d.ts +20 -0
- package/src/postman-code-generators.d.ts +9 -0
- package/src/react-magic-dropzone.d.ts +9 -0
- package/src/theme/ApiExplorer/Accept/index.tsx +36 -0
- package/src/theme/ApiExplorer/Accept/slice.ts +29 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.tsx +32 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.tsx +34 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.tsx +134 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.tsx +83 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.tsx +55 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.tsx +166 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.tsx +48 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.tsx +54 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/index.tsx +45 -0
- package/src/theme/ApiExplorer/Authorization/auth-types.ts +30 -0
- package/src/theme/ApiExplorer/Authorization/index.tsx +199 -0
- package/src/theme/ApiExplorer/Authorization/slice.ts +146 -0
- package/src/theme/ApiExplorer/Body/index.tsx +388 -0
- package/src/theme/ApiExplorer/Body/json2xml.d.ts +8 -0
- package/src/theme/ApiExplorer/Body/json2xml.js +43 -0
- package/src/theme/ApiExplorer/Body/slice.ts +133 -0
- package/src/theme/ApiExplorer/CodeSnippets/code-snippets-types.ts +57 -0
- package/src/theme/ApiExplorer/CodeSnippets/index.tsx +383 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
- package/src/theme/ApiExplorer/CodeSnippets/languages.ts +139 -0
- package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +505 -0
- package/src/theme/ApiExplorer/CodeTabs/index.tsx +261 -0
- package/src/theme/ApiExplorer/ContentType/index.tsx +38 -0
- package/src/theme/ApiExplorer/ContentType/slice.ts +29 -0
- package/src/theme/ApiExplorer/Export/index.tsx +47 -0
- package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
- package/src/theme/ApiExplorer/FloatingButton/index.tsx +29 -0
- package/src/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
- package/src/theme/ApiExplorer/FormFileUpload/index.tsx +124 -0
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/ApiExplorer/FormItem/index.tsx +40 -0
- package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/src/theme/ApiExplorer/FormMultiSelect/index.tsx +57 -0
- package/src/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
- package/src/theme/ApiExplorer/FormSelect/index.tsx +38 -0
- package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
- package/src/theme/ApiExplorer/FormTextInput/index.tsx +89 -0
- package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +122 -0
- package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +91 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +185 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +72 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +94 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +74 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
- package/src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
- package/src/theme/ApiExplorer/ParamOptions/index.tsx +154 -0
- package/src/theme/ApiExplorer/ParamOptions/slice.ts +37 -0
- package/src/theme/ApiExplorer/Request/_Request.scss +129 -0
- package/src/theme/ApiExplorer/Request/index.tsx +352 -0
- package/src/theme/ApiExplorer/Request/makeRequest.ts +255 -0
- package/src/theme/ApiExplorer/Response/_Response.scss +121 -0
- package/src/theme/ApiExplorer/Response/index.tsx +173 -0
- package/src/theme/ApiExplorer/Response/slice.ts +52 -0
- package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +375 -0
- package/src/theme/ApiExplorer/Server/_Server.scss +26 -0
- package/src/theme/ApiExplorer/Server/index.tsx +138 -0
- package/src/theme/ApiExplorer/Server/slice.ts +39 -0
- package/src/theme/ApiExplorer/buildPostmanRequest.ts +524 -0
- package/src/theme/ApiExplorer/index.tsx +52 -0
- package/src/theme/ApiExplorer/persistanceMiddleware.ts +73 -0
- package/src/theme/ApiExplorer/storage-utils.ts +39 -0
- package/src/theme/ApiItem/Layout/index.tsx +85 -0
- package/src/theme/ApiItem/Layout/styles.module.css +17 -0
- package/src/theme/ApiItem/hooks.ts +13 -0
- package/src/theme/ApiItem/index.tsx +222 -0
- package/src/theme/ApiItem/store.ts +51 -0
- package/src/theme/ApiLogo/index.tsx +52 -0
- package/src/theme/ApiTabs/_ApiTabs.scss +142 -0
- package/src/theme/ApiTabs/index.tsx +243 -0
- package/src/theme/ArrayBrackets/index.tsx +37 -0
- package/src/theme/CodeSamples/_CodeSamples.scss +3 -0
- package/src/theme/CodeSamples/index.tsx +26 -0
- package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
- package/src/theme/DiscriminatorTabs/index.tsx +229 -0
- package/src/theme/Markdown/Details/_Details.scss +122 -0
- package/src/theme/Markdown/index.d.ts +8 -0
- package/src/theme/Markdown/index.js +179 -0
- package/src/theme/MimeTabs/_MimeTabs.scss +70 -0
- package/src/theme/MimeTabs/index.tsx +257 -0
- package/src/theme/OperationTabs/_OperationTabs.scss +72 -0
- package/src/theme/OperationTabs/index.tsx +220 -0
- package/src/theme/ParamsDetails/index.tsx +90 -0
- package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/src/theme/ParamsItem/index.tsx +246 -0
- package/src/theme/RequestSchema/index.tsx +172 -0
- package/src/theme/ResponseExamples/index.tsx +209 -0
- package/src/theme/ResponseHeaders/index.tsx +49 -0
- package/src/theme/ResponseSchema/index.tsx +150 -0
- package/src/theme/Schema/index.tsx +938 -0
- package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/src/theme/SchemaItem/index.tsx +273 -0
- package/src/theme/SchemaTabs/_SchemaTabs.scss +61 -0
- package/src/theme/SchemaTabs/index.tsx +224 -0
- package/src/theme/SkeletonLoader/index.tsx +18 -0
- package/src/theme/StatusCodes/index.tsx +83 -0
- package/src/theme/styles.scss +215 -0
- package/src/theme/translationIds.ts +103 -0
- package/src/theme-classic.d.ts +80 -0
- package/src/theme-openapi.d.ts +20 -0
- package/src/types.ts +72 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* Copyright (c) Palo Alto Networks
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
* ========================================================================== */
|
|
8
|
+
var __importDefault =
|
|
9
|
+
(this && this.__importDefault) ||
|
|
10
|
+
function (mod) {
|
|
11
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
const react_1 = __importDefault(require("react"));
|
|
15
|
+
const Translate_1 = require("@docusaurus/Translate");
|
|
16
|
+
const FormItem_1 = __importDefault(require("@theme/ApiExplorer/FormItem"));
|
|
17
|
+
const FormSelect_1 = __importDefault(require("@theme/ApiExplorer/FormSelect"));
|
|
18
|
+
const FormTextInput_1 = __importDefault(
|
|
19
|
+
require("@theme/ApiExplorer/FormTextInput")
|
|
20
|
+
);
|
|
21
|
+
const hooks_1 = require("@theme/ApiItem/hooks");
|
|
22
|
+
const translationIds_1 = require("@theme/translationIds");
|
|
23
|
+
const slice_1 = require("./slice");
|
|
24
|
+
function Authorization() {
|
|
25
|
+
const data = (0, hooks_1.useTypedSelector)((state) => state.auth.data);
|
|
26
|
+
const options = (0, hooks_1.useTypedSelector)((state) => state.auth.options);
|
|
27
|
+
const selected = (0, hooks_1.useTypedSelector)(
|
|
28
|
+
(state) => state.auth.selected
|
|
29
|
+
);
|
|
30
|
+
const dispatch = (0, hooks_1.useTypedDispatch)();
|
|
31
|
+
if (selected === undefined) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const selectedAuth = options[selected];
|
|
35
|
+
const optionKeys = Object.keys(options);
|
|
36
|
+
return react_1.default.createElement(
|
|
37
|
+
"div",
|
|
38
|
+
null,
|
|
39
|
+
optionKeys.length > 1 &&
|
|
40
|
+
react_1.default.createElement(
|
|
41
|
+
FormItem_1.default,
|
|
42
|
+
{
|
|
43
|
+
label: (0, Translate_1.translate)({
|
|
44
|
+
id: translationIds_1.OPENAPI_AUTH.SECURITY_SCHEME,
|
|
45
|
+
message: "Security Scheme",
|
|
46
|
+
}),
|
|
47
|
+
},
|
|
48
|
+
react_1.default.createElement(FormSelect_1.default, {
|
|
49
|
+
options: optionKeys,
|
|
50
|
+
value: selected,
|
|
51
|
+
onChange: (e) => {
|
|
52
|
+
dispatch((0, slice_1.setSelectedAuth)(e.target.value));
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
),
|
|
56
|
+
selectedAuth.map((a) => {
|
|
57
|
+
if (a.type === "http" && a.scheme === "bearer") {
|
|
58
|
+
return react_1.default.createElement(
|
|
59
|
+
FormItem_1.default,
|
|
60
|
+
{
|
|
61
|
+
label: (0, Translate_1.translate)({
|
|
62
|
+
id: translationIds_1.OPENAPI_AUTH.BEARER_TOKEN,
|
|
63
|
+
message: "Bearer Token",
|
|
64
|
+
}),
|
|
65
|
+
key: a.key + "-bearer",
|
|
66
|
+
},
|
|
67
|
+
react_1.default.createElement(FormTextInput_1.default, {
|
|
68
|
+
placeholder: (0, Translate_1.translate)({
|
|
69
|
+
id: translationIds_1.OPENAPI_AUTH.BEARER_TOKEN,
|
|
70
|
+
message: "Bearer Token",
|
|
71
|
+
}),
|
|
72
|
+
password: true,
|
|
73
|
+
value: data[a.key].token ?? "",
|
|
74
|
+
onChange: (e) => {
|
|
75
|
+
const value = e.target.value;
|
|
76
|
+
dispatch(
|
|
77
|
+
(0, slice_1.setAuthData)({
|
|
78
|
+
scheme: a.key,
|
|
79
|
+
key: "token",
|
|
80
|
+
value: value ? value : undefined,
|
|
81
|
+
})
|
|
82
|
+
);
|
|
83
|
+
},
|
|
84
|
+
})
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
if (a.type === "oauth2") {
|
|
88
|
+
return react_1.default.createElement(
|
|
89
|
+
FormItem_1.default,
|
|
90
|
+
{
|
|
91
|
+
label: (0, Translate_1.translate)({
|
|
92
|
+
id: translationIds_1.OPENAPI_AUTH.BEARER_TOKEN,
|
|
93
|
+
message: "Bearer Token",
|
|
94
|
+
}),
|
|
95
|
+
key: a.key + "-oauth2",
|
|
96
|
+
},
|
|
97
|
+
react_1.default.createElement(FormTextInput_1.default, {
|
|
98
|
+
placeholder: (0, Translate_1.translate)({
|
|
99
|
+
id: translationIds_1.OPENAPI_AUTH.BEARER_TOKEN,
|
|
100
|
+
message: "Bearer Token",
|
|
101
|
+
}),
|
|
102
|
+
password: true,
|
|
103
|
+
value: data[a.key].token ?? "",
|
|
104
|
+
onChange: (e) => {
|
|
105
|
+
const value = e.target.value;
|
|
106
|
+
dispatch(
|
|
107
|
+
(0, slice_1.setAuthData)({
|
|
108
|
+
scheme: a.key,
|
|
109
|
+
key: "token",
|
|
110
|
+
value: value ? value : undefined,
|
|
111
|
+
})
|
|
112
|
+
);
|
|
113
|
+
},
|
|
114
|
+
})
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
if (a.type === "http" && a.scheme === "basic") {
|
|
118
|
+
return react_1.default.createElement(
|
|
119
|
+
react_1.default.Fragment,
|
|
120
|
+
{ key: a.key + "-basic" },
|
|
121
|
+
react_1.default.createElement(
|
|
122
|
+
FormItem_1.default,
|
|
123
|
+
{
|
|
124
|
+
label: (0, Translate_1.translate)({
|
|
125
|
+
id: translationIds_1.OPENAPI_AUTH.USERNAME,
|
|
126
|
+
message: "Username",
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
react_1.default.createElement(FormTextInput_1.default, {
|
|
130
|
+
placeholder: (0, Translate_1.translate)({
|
|
131
|
+
id: translationIds_1.OPENAPI_AUTH.USERNAME,
|
|
132
|
+
message: "Username",
|
|
133
|
+
}),
|
|
134
|
+
value: data[a.key].username ?? "",
|
|
135
|
+
onChange: (e) => {
|
|
136
|
+
const value = e.target.value;
|
|
137
|
+
dispatch(
|
|
138
|
+
(0, slice_1.setAuthData)({
|
|
139
|
+
scheme: a.key,
|
|
140
|
+
key: "username",
|
|
141
|
+
value: value ? value : undefined,
|
|
142
|
+
})
|
|
143
|
+
);
|
|
144
|
+
},
|
|
145
|
+
})
|
|
146
|
+
),
|
|
147
|
+
react_1.default.createElement(
|
|
148
|
+
FormItem_1.default,
|
|
149
|
+
{
|
|
150
|
+
label: (0, Translate_1.translate)({
|
|
151
|
+
id: translationIds_1.OPENAPI_AUTH.PASSWORD,
|
|
152
|
+
message: "Password",
|
|
153
|
+
}),
|
|
154
|
+
},
|
|
155
|
+
react_1.default.createElement(FormTextInput_1.default, {
|
|
156
|
+
placeholder: (0, Translate_1.translate)({
|
|
157
|
+
id: translationIds_1.OPENAPI_AUTH.PASSWORD,
|
|
158
|
+
message: "Password",
|
|
159
|
+
}),
|
|
160
|
+
password: true,
|
|
161
|
+
value: data[a.key].password ?? "",
|
|
162
|
+
onChange: (e) => {
|
|
163
|
+
const value = e.target.value;
|
|
164
|
+
dispatch(
|
|
165
|
+
(0, slice_1.setAuthData)({
|
|
166
|
+
scheme: a.key,
|
|
167
|
+
key: "password",
|
|
168
|
+
value: value ? value : undefined,
|
|
169
|
+
})
|
|
170
|
+
);
|
|
171
|
+
},
|
|
172
|
+
})
|
|
173
|
+
)
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
if (a.type === "apiKey") {
|
|
177
|
+
return react_1.default.createElement(
|
|
178
|
+
FormItem_1.default,
|
|
179
|
+
{ label: `${a.key}`, key: a.key + "-apikey" },
|
|
180
|
+
react_1.default.createElement(FormTextInput_1.default, {
|
|
181
|
+
placeholder: `${a.key}`,
|
|
182
|
+
password: true,
|
|
183
|
+
value: data[a.key].apiKey ?? "",
|
|
184
|
+
onChange: (e) => {
|
|
185
|
+
const value = e.target.value;
|
|
186
|
+
dispatch(
|
|
187
|
+
(0, slice_1.setAuthData)({
|
|
188
|
+
scheme: a.key,
|
|
189
|
+
key: "apiKey",
|
|
190
|
+
value: value ? value : undefined,
|
|
191
|
+
})
|
|
192
|
+
);
|
|
193
|
+
},
|
|
194
|
+
})
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
return null;
|
|
198
|
+
})
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
exports.default = Authorization;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PayloadAction } from "@reduxjs/toolkit";
|
|
2
|
+
import { SecurityRequirementObject, SecuritySchemeObject } from "@camunda8/docusaurus-plugin-openapi-docs/src/openapi/types";
|
|
3
|
+
import { ThemeConfig } from "@camunda8/docusaurus-theme-openapi-docs/src/types";
|
|
4
|
+
export declare function createAuth({ security, securitySchemes, options: opts, }: {
|
|
5
|
+
security?: SecurityRequirementObject[];
|
|
6
|
+
securitySchemes?: {
|
|
7
|
+
[key: string]: SecuritySchemeObject;
|
|
8
|
+
};
|
|
9
|
+
options?: ThemeConfig["api"];
|
|
10
|
+
}): AuthState;
|
|
11
|
+
export type Scheme = {
|
|
12
|
+
key: string;
|
|
13
|
+
scopes: string[];
|
|
14
|
+
} & SecuritySchemeObject;
|
|
15
|
+
export interface AuthState {
|
|
16
|
+
data: {
|
|
17
|
+
[scheme: string]: {
|
|
18
|
+
[key: string]: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
options: {
|
|
22
|
+
[key: string]: Scheme[];
|
|
23
|
+
};
|
|
24
|
+
selected?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const slice: import("@reduxjs/toolkit").Slice<AuthState, {
|
|
27
|
+
setAuthData: (state: import("immer").WritableDraft<AuthState>, action: PayloadAction<{
|
|
28
|
+
scheme: string;
|
|
29
|
+
key: string;
|
|
30
|
+
value?: string;
|
|
31
|
+
}>) => void;
|
|
32
|
+
setSelectedAuth: (state: import("immer").WritableDraft<AuthState>, action: PayloadAction<string>) => void;
|
|
33
|
+
}, "auth", "auth", import("@reduxjs/toolkit").SliceSelectors<AuthState>>;
|
|
34
|
+
export declare const setAuthData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
35
|
+
scheme: string;
|
|
36
|
+
key: string;
|
|
37
|
+
value?: string;
|
|
38
|
+
}, "auth/setAuthData">, setSelectedAuth: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "auth/setSelectedAuth">;
|
|
39
|
+
declare const _default: import("redux").Reducer<AuthState>;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* ============================================================================
|
|
3
|
+
* Copyright (c) Palo Alto Networks
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
* ========================================================================== */
|
|
8
|
+
var _a;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.setSelectedAuth = exports.setAuthData = exports.slice = void 0;
|
|
11
|
+
exports.createAuth = createAuth;
|
|
12
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
13
|
+
const storage_utils_1 = require("@theme/ApiExplorer/storage-utils");
|
|
14
|
+
const auth_types_1 = require("./auth-types");
|
|
15
|
+
// The global definitions
|
|
16
|
+
// "securitySchemes": {
|
|
17
|
+
// "BearerAuth": { "type": "http", "scheme": "BeAreR" },
|
|
18
|
+
// "BasicAuth": { "type": "http", "scheme": "basic" }
|
|
19
|
+
// },
|
|
20
|
+
// The operation level requirements
|
|
21
|
+
// "security": [
|
|
22
|
+
// { "BearerAuth": [] },
|
|
23
|
+
// { "BearerAuth": [], "BasicAuth": [] }
|
|
24
|
+
// ],
|
|
25
|
+
// SLICE_STATE
|
|
26
|
+
// data:
|
|
27
|
+
// BearerAuth:
|
|
28
|
+
// token=xxx
|
|
29
|
+
// BasicAuth:
|
|
30
|
+
// username=xxx
|
|
31
|
+
// password=xxx
|
|
32
|
+
//
|
|
33
|
+
// options:
|
|
34
|
+
// "BearerAuth": [{ key: "BearerAuth", scopes: [], ...rest }]
|
|
35
|
+
// "BearerAuth and BasicAuth": [{ key: "BearerAuth", scopes: [], ...rest }, { key: "BasicAuth", scopes: [], ...rest }]
|
|
36
|
+
//
|
|
37
|
+
// selected: "BearerAuth and BasicAuth"
|
|
38
|
+
// LOCAL_STORAGE
|
|
39
|
+
// hash(SLICE_STATE.options) -> "BearerAuth and BasicAuth"
|
|
40
|
+
// BearerAuth -> { token: xxx }
|
|
41
|
+
// BasicAuth -> { username: xxx, password: xxx }
|
|
42
|
+
function createAuth({ security, securitySchemes, options: opts }) {
|
|
43
|
+
const storage = (0, storage_utils_1.createStorage)("sessionStorage");
|
|
44
|
+
let data = {};
|
|
45
|
+
let options = {};
|
|
46
|
+
for (const option of security ?? []) {
|
|
47
|
+
const id = Object.keys(option).join(" and ");
|
|
48
|
+
for (const [schemeID, scopes] of Object.entries(option)) {
|
|
49
|
+
const scheme = securitySchemes?.[schemeID];
|
|
50
|
+
if (scheme) {
|
|
51
|
+
if (options[id] === undefined) {
|
|
52
|
+
options[id] = [];
|
|
53
|
+
}
|
|
54
|
+
const dataKeys = (0, auth_types_1.getAuthDataKeys)(scheme);
|
|
55
|
+
for (const key of dataKeys) {
|
|
56
|
+
if (data[schemeID] === undefined) {
|
|
57
|
+
data[schemeID] = {};
|
|
58
|
+
}
|
|
59
|
+
let persisted = undefined;
|
|
60
|
+
try {
|
|
61
|
+
persisted = JSON.parse(storage.getItem(schemeID) ?? "")[key];
|
|
62
|
+
} catch {}
|
|
63
|
+
data[schemeID][key] = persisted;
|
|
64
|
+
}
|
|
65
|
+
options[id].push({
|
|
66
|
+
...scheme,
|
|
67
|
+
key: schemeID,
|
|
68
|
+
scopes,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
let persisted = undefined;
|
|
74
|
+
try {
|
|
75
|
+
persisted =
|
|
76
|
+
storage.getItem((0, storage_utils_1.hashArray)(Object.keys(options))) ??
|
|
77
|
+
undefined;
|
|
78
|
+
} catch {}
|
|
79
|
+
return {
|
|
80
|
+
data,
|
|
81
|
+
options,
|
|
82
|
+
selected: persisted ?? Object.keys(options)[0],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
const initialState = {};
|
|
86
|
+
exports.slice = (0, toolkit_1.createSlice)({
|
|
87
|
+
name: "auth",
|
|
88
|
+
initialState,
|
|
89
|
+
reducers: {
|
|
90
|
+
setAuthData: (state, action) => {
|
|
91
|
+
const { scheme, key, value } = action.payload;
|
|
92
|
+
state.data[scheme][key] = value;
|
|
93
|
+
},
|
|
94
|
+
setSelectedAuth: (state, action) => {
|
|
95
|
+
state.selected = action.payload;
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
((_a = exports.slice.actions),
|
|
100
|
+
(exports.setAuthData = _a.setAuthData),
|
|
101
|
+
(exports.setSelectedAuth = _a.setSelectedAuth));
|
|
102
|
+
exports.default = exports.slice.reducer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { RequestBodyObject } from "@camunda8/docusaurus-plugin-openapi-docs/src/openapi/types";
|
|
3
|
+
export interface Props {
|
|
4
|
+
jsonRequestBodyExample: string;
|
|
5
|
+
requestBodyMetadata?: RequestBodyObject;
|
|
6
|
+
methods?: any;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function BodyWrap({ requestBodyMetadata, jsonRequestBodyExample, methods, required, }: Props): React.JSX.Element | null;
|
|
10
|
+
export default BodyWrap;
|