@redocly/reference-docs 2.12.5 → 2.13.2
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/bin/cli/commands/redocly-docs-cli.min.js +94 -89
- package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +1 -1
- package/dist/console.redocly-reference-docs.min.js +122 -113
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-reference-docs.min.js +834 -833
- package/lib/components/Endpoint/Endpoint.d.ts +2 -2
- package/lib/components/Endpoint/ServerList.d.ts +2 -2
- package/lib/components/Endpoint/Summary.d.ts +3 -3
- package/lib/components/NextSectionButton.d.ts +2 -2
- package/lib/components/Overlay.d.ts +1 -1
- package/lib/components/Panel/PanelComponent.d.ts +2 -1
- package/lib/components/ProProviders.d.ts +2 -2
- package/lib/components/RedoclyReferenceDocs.d.ts +3 -3
- package/lib/components/Samples/ExampleSwitch.d.ts +1 -1
- package/lib/components/Samples/ExampleSwitch.js +1 -1
- package/lib/components/Samples/SamplesTabs.d.ts +1 -1
- package/lib/components/Samples/SamplesTabs.js +1 -1
- package/lib/components/Samples/use-example-key.d.ts +1 -1
- package/lib/components/Search/MenuItemProSearch.d.ts +2 -2
- package/lib/components/Search/MenuItemProSearch.js +1 -1
- package/lib/components/Search/ProSearchBox.d.ts +5 -5
- package/lib/components/Search/SearchField.d.ts +1 -1
- package/lib/components/StoreProvider.d.ts +3 -2
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +1 -1
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +2 -2
- package/lib/components/VersionSwitcher.d.ts +2 -2
- package/lib/components/common/Checkbox.d.ts +3 -1
- package/lib/components/common/Checkbox.js +1 -1
- package/lib/components/common/CheckboxList.d.ts +3 -2
- package/lib/components/common/CheckboxList.js +1 -1
- package/lib/components/common/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/common/Dropdown/types.d.ts +1 -1
- package/lib/components/common/FileUpload/helper.d.ts +1 -1
- package/lib/components/common/TextField.d.ts +1 -1
- package/lib/components/console/ActionPanel.d.ts +2 -2
- package/lib/components/console/AuthPanel.d.ts +4 -4
- package/lib/components/console/CodemirrorInput.d.ts +1 -1
- package/lib/components/console/Console.d.ts +6 -6
- package/lib/components/console/OAuth2Flow.d.ts +8 -5
- package/lib/components/console/OAuth2Flow.js +1 -1
- package/lib/components/console/OAuth2TokenInput.d.ts +1 -1
- package/lib/components/console/OpenIDConnect.d.ts +3 -3
- package/lib/components/console/OperationParameters.d.ts +1 -1
- package/lib/components/console/RequestBody.d.ts +2 -2
- package/lib/components/console/RequestBody.js +1 -1
- package/lib/components/console/RequestBodyForm.d.ts +5 -2
- package/lib/components/console/RequestBodyForm.js +1 -1
- package/lib/components/console/ResponseBody.d.ts +1 -1
- package/lib/components/console/ResponsePanel.d.ts +1 -1
- package/lib/components/console/ServerDropdown.d.ts +1 -1
- package/lib/components/console/utils.d.ts +1 -1
- package/lib/components/pluggable/RedocExample.d.ts +2 -2
- package/lib/components/pluggable/RedocRequestBody.d.ts +1 -1
- package/lib/components/pluggable/RedocResponse.d.ts +1 -1
- package/lib/components/pluggable/RedocSchema.d.ts +2 -2
- package/lib/components/pluggable/styled.components.d.ts +1 -1
- package/lib/components/styled.elements.d.ts +3 -2
- package/lib/models/code-sample-options.d.ts +1 -1
- package/lib/redoc-lib/src/common-elements/LinkToField.d.ts +2 -2
- package/lib/redoc-lib/src/common-elements/Tooltip.d.ts +1 -1
- package/lib/redoc-lib/src/common-elements/linkify.d.ts +3 -2
- package/lib/redoc-lib/src/common-elements/perfect-scrollbar.d.ts +3 -2
- package/lib/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +1 -1
- package/lib/redoc-lib/src/components/ApiLogo/ApiLogo.d.ts +1 -1
- package/lib/redoc-lib/src/components/ApiLogo/styled.elements.d.ts +1 -1
- package/lib/redoc-lib/src/components/CallbackSamples/CallbackReqSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/CallbackSamples/CallbackSamples.d.ts +2 -2
- package/lib/redoc-lib/src/components/Callbacks/CallbackDetails.d.ts +1 -1
- package/lib/redoc-lib/src/components/Callbacks/CallbackOperation.d.ts +1 -1
- package/lib/redoc-lib/src/components/Callbacks/CallbackSummary.d.ts +2 -2
- package/lib/redoc-lib/src/components/Callbacks/CallbacksList.d.ts +1 -1
- package/lib/redoc-lib/src/components/ContentItems/ContentItems.d.ts +3 -3
- package/lib/redoc-lib/src/components/DownloadButton/DownloadButton.d.ts +1 -1
- package/lib/redoc-lib/src/components/DropdownOrLabel/DropdownOrLabel.d.ts +1 -1
- package/lib/redoc-lib/src/components/ErrorBoundary.d.ts +2 -1
- package/lib/redoc-lib/src/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
- package/lib/redoc-lib/src/components/Fields/Field.d.ts +3 -3
- package/lib/redoc-lib/src/components/Fields/FieldDetails.d.ts +1 -1
- package/lib/redoc-lib/src/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +1 -1
- package/lib/redoc-lib/src/components/Markdown/AdvancedMarkdown.d.ts +3 -3
- package/lib/redoc-lib/src/components/Markdown/SanitizedMdBlock.d.ts +1 -1
- package/lib/redoc-lib/src/components/Markdown/styled.elements.d.ts +1 -1
- package/lib/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
- package/lib/redoc-lib/src/components/Operation/Operation.d.ts +1 -1
- package/lib/redoc-lib/src/components/OptionsProvider.d.ts +1 -1
- package/lib/redoc-lib/src/components/Parameters/ParametersGroup.d.ts +1 -1
- package/lib/redoc-lib/src/components/PayloadSamples/Example.d.ts +1 -1
- package/lib/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.js +1 -1
- package/lib/redoc-lib/src/components/PayloadSamples/PayloadSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/PayloadSamples/exernalExampleHook.d.ts +1 -1
- package/lib/redoc-lib/src/components/RequestSamples/CodeSample.d.ts +2 -2
- package/lib/redoc-lib/src/components/RequestSamples/RequestSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/RequestSamples/languageSwitchEvent.d.ts +3 -2
- package/lib/redoc-lib/src/components/RequestSamples/useCodeSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/Responses/Response.d.ts +1 -1
- package/lib/redoc-lib/src/components/Responses/ResponseDetails.d.ts +1 -1
- package/lib/redoc-lib/src/components/Responses/ResponseHeaders.d.ts +1 -1
- package/lib/redoc-lib/src/components/Responses/ResponseSummary.d.ts +2 -2
- package/lib/redoc-lib/src/components/Responses/ResponsesList.d.ts +1 -1
- package/lib/redoc-lib/src/components/Schema/ArraySchema.d.ts +1 -1
- package/lib/redoc-lib/src/components/Schema/DiscriminatorDropdown.d.ts +2 -2
- package/lib/redoc-lib/src/components/Schema/ObjectSchema.d.ts +1 -1
- package/lib/redoc-lib/src/components/Schema/OneOfSchema.d.ts +1 -1
- package/lib/redoc-lib/src/components/Schema/Schema.d.ts +1 -1
- package/lib/redoc-lib/src/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
- package/lib/redoc-lib/src/components/SearchBox/SearchBox.d.ts +3 -3
- package/lib/redoc-lib/src/components/SecurityRequirement/SecurityRequirement.d.ts +1 -1
- package/lib/redoc-lib/src/components/SecuritySchemes/SecuritySchemes.d.ts +2 -2
- package/lib/redoc-lib/src/components/SideMenu/MenuItem.d.ts +3 -3
- package/lib/redoc-lib/src/components/SideMenu/MenuItem.js +1 -1
- package/lib/redoc-lib/src/components/SideMenu/SideMenu.d.ts +3 -3
- package/lib/redoc-lib/src/components/SourceCode/SourceCode.d.ts +2 -2
- package/lib/redoc-lib/src/components/StickySidebar/StickyResponsiveSidebar.d.ts +3 -2
- package/lib/redoc-lib/src/components/StoreBuilder.d.ts +1 -1
- package/lib/redoc-lib/src/components/helper.d.ts +1 -1
- package/lib/redoc-lib/src/services/MarkdownRenderer.d.ts +3 -3
- package/lib/redoc-lib/src/services/MenuBuilder.d.ts +3 -3
- package/lib/redoc-lib/src/services/MenuBuilder.js +1 -1
- package/lib/redoc-lib/src/services/OpenAPIParser.d.ts +1 -1
- package/lib/redoc-lib/src/services/RedocNormalizedOptions.d.ts +5 -5
- package/lib/redoc-lib/src/services/ScrollService.d.ts +1 -1
- package/lib/redoc-lib/src/services/SpecStore.d.ts +3 -3
- package/lib/redoc-lib/src/services/models/ApiInfo.d.ts +2 -2
- package/lib/redoc-lib/src/services/models/Callback.d.ts +3 -3
- package/lib/redoc-lib/src/services/models/Example.d.ts +3 -2
- package/lib/redoc-lib/src/services/models/Example.js +1 -1
- package/lib/redoc-lib/src/services/models/Field.d.ts +5 -4
- package/lib/redoc-lib/src/services/models/Group.model.d.ts +4 -4
- package/lib/redoc-lib/src/services/models/MediaContent.d.ts +5 -5
- package/lib/redoc-lib/src/services/models/MediaType.d.ts +5 -5
- package/lib/redoc-lib/src/services/models/Operation.d.ts +8 -8
- package/lib/redoc-lib/src/services/models/RequestBody.d.ts +4 -4
- package/lib/redoc-lib/src/services/models/Response.d.ts +4 -4
- package/lib/redoc-lib/src/services/models/Schema.d.ts +5 -5
- package/lib/redoc-lib/src/services/models/SecurityRequirement.d.ts +2 -2
- package/lib/redoc-lib/src/services/models/SecuritySchemes.d.ts +2 -2
- package/lib/redoc-lib/src/services/models/Webhook.d.ts +3 -3
- package/lib/redoc-lib/src/styled-components.d.ts +2 -2
- package/lib/redoc-lib/src/types/open-api.d.ts +2 -2
- package/lib/redoc-lib/src/utils/helpers.d.ts +3 -1
- package/lib/redoc-lib/src/utils/helpers.js +1 -1
- package/lib/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
- package/lib/redoc-lib/src/utils/media-css.d.ts +1 -1
- package/lib/redoc-lib/src/utils/openapi.d.ts +3 -3
- package/lib/services/OAuth2.d.ts +0 -7
- package/lib/services/OAuth2.js +1 -1
- package/lib/services/ProMenu.d.ts +2 -2
- package/lib/services/ProStore.d.ts +13 -26
- package/lib/services/ProStore.js +1 -1
- package/lib/services/SearchStore.d.ts +3 -2
- package/lib/services/VersionedSpecStore.d.ts +3 -2
- package/lib/services/code-samples/generator.d.ts +3 -3
- package/lib/services/code-samples/generator.js +1 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/index.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
- package/lib/services/extendTheme.d.ts +2 -2
- package/lib/services/history/FakeHistoryService.d.ts +2 -2
- package/lib/services/history/ProHashHistoryService.d.ts +2 -2
- package/lib/services/history/PushStateHistoryService.d.ts +3 -2
- package/lib/services/history/helpers.d.ts +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.js +1 -1
- package/lib/services/types.d.ts +24 -0
- package/lib/services/types.js +2 -0
- package/lib/services/utils.d.ts +8 -1
- package/lib/services/utils.js +1 -1
- package/lib/standalone.d.ts +3 -3
- package/lib/utils.js +1 -1
- package/lib-esm/components/Endpoint/Endpoint.d.ts +2 -2
- package/lib-esm/components/Endpoint/ServerList.d.ts +2 -2
- package/lib-esm/components/Endpoint/Summary.d.ts +3 -3
- package/lib-esm/components/NextSectionButton.d.ts +2 -2
- package/lib-esm/components/Overlay.d.ts +1 -1
- package/lib-esm/components/Panel/PanelComponent.d.ts +2 -1
- package/lib-esm/components/ProProviders.d.ts +2 -2
- package/lib-esm/components/RedoclyReferenceDocs.d.ts +3 -3
- package/lib-esm/components/Samples/ExampleSwitch.d.ts +1 -1
- package/lib-esm/components/Samples/ExampleSwitch.js +1 -1
- package/lib-esm/components/Samples/SamplesTabs.d.ts +1 -1
- package/lib-esm/components/Samples/SamplesTabs.js +1 -1
- package/lib-esm/components/Samples/use-example-key.d.ts +1 -1
- package/lib-esm/components/Search/MenuItemProSearch.d.ts +2 -2
- package/lib-esm/components/Search/MenuItemProSearch.js +1 -1
- package/lib-esm/components/Search/ProSearchBox.d.ts +5 -5
- package/lib-esm/components/Search/SearchField.d.ts +1 -1
- package/lib-esm/components/StoreProvider.d.ts +3 -2
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +1 -1
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +2 -2
- package/lib-esm/components/VersionSwitcher.d.ts +2 -2
- package/lib-esm/components/common/Checkbox.d.ts +3 -1
- package/lib-esm/components/common/Checkbox.js +1 -1
- package/lib-esm/components/common/CheckboxList.d.ts +3 -2
- package/lib-esm/components/common/CheckboxList.js +1 -1
- package/lib-esm/components/common/Dropdown/Dropdown.d.ts +1 -1
- package/lib-esm/components/common/Dropdown/types.d.ts +1 -1
- package/lib-esm/components/common/FileUpload/helper.d.ts +1 -1
- package/lib-esm/components/common/TextField.d.ts +1 -1
- package/lib-esm/components/console/ActionPanel.d.ts +2 -2
- package/lib-esm/components/console/AuthPanel.d.ts +4 -4
- package/lib-esm/components/console/CodemirrorInput.d.ts +1 -1
- package/lib-esm/components/console/Console.d.ts +6 -6
- package/lib-esm/components/console/OAuth2Flow.d.ts +8 -5
- package/lib-esm/components/console/OAuth2Flow.js +1 -1
- package/lib-esm/components/console/OAuth2TokenInput.d.ts +1 -1
- package/lib-esm/components/console/OpenIDConnect.d.ts +3 -3
- package/lib-esm/components/console/OperationParameters.d.ts +1 -1
- package/lib-esm/components/console/RequestBody.d.ts +2 -2
- package/lib-esm/components/console/RequestBody.js +1 -1
- package/lib-esm/components/console/RequestBodyForm.d.ts +5 -2
- package/lib-esm/components/console/RequestBodyForm.js +1 -1
- package/lib-esm/components/console/ResponseBody.d.ts +1 -1
- package/lib-esm/components/console/ResponsePanel.d.ts +1 -1
- package/lib-esm/components/console/ServerDropdown.d.ts +1 -1
- package/lib-esm/components/console/utils.d.ts +1 -1
- package/lib-esm/components/pluggable/RedocExample.d.ts +2 -2
- package/lib-esm/components/pluggable/RedocRequestBody.d.ts +1 -1
- package/lib-esm/components/pluggable/RedocResponse.d.ts +1 -1
- package/lib-esm/components/pluggable/RedocSchema.d.ts +2 -2
- package/lib-esm/components/pluggable/styled.components.d.ts +1 -1
- package/lib-esm/components/styled.elements.d.ts +3 -2
- package/lib-esm/models/code-sample-options.d.ts +1 -1
- package/lib-esm/redoc-lib/src/common-elements/LinkToField.d.ts +2 -2
- package/lib-esm/redoc-lib/src/common-elements/Tooltip.d.ts +1 -1
- package/lib-esm/redoc-lib/src/common-elements/linkify.d.ts +3 -2
- package/lib-esm/redoc-lib/src/common-elements/perfect-scrollbar.d.ts +3 -2
- package/lib-esm/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/ApiLogo/ApiLogo.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/ApiLogo/styled.elements.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/CallbackSamples/CallbackReqSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/CallbackSamples/CallbackSamples.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Callbacks/CallbackDetails.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Callbacks/CallbackOperation.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Callbacks/CallbackSummary.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Callbacks/CallbacksList.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/ContentItems/ContentItems.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/DownloadButton/DownloadButton.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/DropdownOrLabel/DropdownOrLabel.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/ErrorBoundary.d.ts +2 -1
- package/lib-esm/redoc-lib/src/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Fields/Field.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/Fields/FieldDetails.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Markdown/AdvancedMarkdown.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/Markdown/SanitizedMdBlock.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Markdown/styled.elements.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Operation/Operation.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/OptionsProvider.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Parameters/ParametersGroup.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/PayloadSamples/Example.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.js +1 -1
- package/lib-esm/redoc-lib/src/components/PayloadSamples/PayloadSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/PayloadSamples/exernalExampleHook.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/RequestSamples/CodeSample.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/RequestSamples/RequestSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/RequestSamples/languageSwitchEvent.d.ts +3 -2
- package/lib-esm/redoc-lib/src/components/RequestSamples/useCodeSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Responses/Response.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Responses/ResponseDetails.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Responses/ResponseHeaders.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Responses/ResponseSummary.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Responses/ResponsesList.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/ArraySchema.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/DiscriminatorDropdown.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Schema/ObjectSchema.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/OneOfSchema.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/Schema.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/SearchBox/SearchBox.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/SecurityRequirement/SecurityRequirement.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/SecuritySchemes/SecuritySchemes.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/SideMenu/MenuItem.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/SideMenu/MenuItem.js +1 -1
- package/lib-esm/redoc-lib/src/components/SideMenu/SideMenu.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/SourceCode/SourceCode.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/StickySidebar/StickyResponsiveSidebar.d.ts +3 -2
- package/lib-esm/redoc-lib/src/components/StoreBuilder.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/helper.d.ts +1 -1
- package/lib-esm/redoc-lib/src/services/MarkdownRenderer.d.ts +3 -3
- package/lib-esm/redoc-lib/src/services/MenuBuilder.d.ts +3 -3
- package/lib-esm/redoc-lib/src/services/MenuBuilder.js +1 -1
- package/lib-esm/redoc-lib/src/services/OpenAPIParser.d.ts +1 -1
- package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.d.ts +5 -5
- package/lib-esm/redoc-lib/src/services/ScrollService.d.ts +1 -1
- package/lib-esm/redoc-lib/src/services/SpecStore.d.ts +3 -3
- package/lib-esm/redoc-lib/src/services/models/ApiInfo.d.ts +2 -2
- package/lib-esm/redoc-lib/src/services/models/Callback.d.ts +3 -3
- package/lib-esm/redoc-lib/src/services/models/Example.d.ts +3 -2
- package/lib-esm/redoc-lib/src/services/models/Example.js +1 -1
- package/lib-esm/redoc-lib/src/services/models/Field.d.ts +5 -4
- package/lib-esm/redoc-lib/src/services/models/Group.model.d.ts +4 -4
- package/lib-esm/redoc-lib/src/services/models/MediaContent.d.ts +5 -5
- package/lib-esm/redoc-lib/src/services/models/MediaType.d.ts +5 -5
- package/lib-esm/redoc-lib/src/services/models/Operation.d.ts +8 -8
- package/lib-esm/redoc-lib/src/services/models/RequestBody.d.ts +4 -4
- package/lib-esm/redoc-lib/src/services/models/Response.d.ts +4 -4
- package/lib-esm/redoc-lib/src/services/models/Schema.d.ts +5 -5
- package/lib-esm/redoc-lib/src/services/models/SecurityRequirement.d.ts +2 -2
- package/lib-esm/redoc-lib/src/services/models/SecuritySchemes.d.ts +2 -2
- package/lib-esm/redoc-lib/src/services/models/Webhook.d.ts +3 -3
- package/lib-esm/redoc-lib/src/styled-components.d.ts +2 -2
- package/lib-esm/redoc-lib/src/types/open-api.d.ts +2 -2
- package/lib-esm/redoc-lib/src/utils/helpers.d.ts +3 -1
- package/lib-esm/redoc-lib/src/utils/helpers.js +1 -1
- package/lib-esm/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
- package/lib-esm/redoc-lib/src/utils/media-css.d.ts +1 -1
- package/lib-esm/redoc-lib/src/utils/openapi.d.ts +3 -3
- package/lib-esm/services/OAuth2.d.ts +0 -7
- package/lib-esm/services/OAuth2.js +1 -1
- package/lib-esm/services/ProMenu.d.ts +2 -2
- package/lib-esm/services/ProStore.d.ts +13 -26
- package/lib-esm/services/ProStore.js +1 -1
- package/lib-esm/services/SearchStore.d.ts +3 -2
- package/lib-esm/services/VersionedSpecStore.d.ts +3 -2
- package/lib-esm/services/code-samples/generator.d.ts +3 -3
- package/lib-esm/services/code-samples/generator.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/index.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
- package/lib-esm/services/extendTheme.d.ts +2 -2
- package/lib-esm/services/history/FakeHistoryService.d.ts +2 -2
- package/lib-esm/services/history/ProHashHistoryService.d.ts +2 -2
- package/lib-esm/services/history/PushStateHistoryService.d.ts +3 -2
- package/lib-esm/services/history/helpers.d.ts +1 -1
- package/lib-esm/services/index.d.ts +1 -0
- package/lib-esm/services/index.js +1 -1
- package/lib-esm/services/types.d.ts +24 -0
- package/lib-esm/services/types.js +2 -0
- package/lib-esm/services/utils.d.ts +8 -1
- package/lib-esm/services/utils.js +1 -1
- package/lib-esm/standalone.d.ts +3 -3
- package/lib-esm/utils.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
import { marked } from 'marked';
|
|
3
|
-
import { ProStore } from '../../../services/ProStore';
|
|
4
|
-
import { RedocNormalizedOptions } from './RedocNormalizedOptions';
|
|
3
|
+
import type { ProStore } from '../../../services/ProStore';
|
|
4
|
+
import type { RedocNormalizedOptions } from './RedocNormalizedOptions';
|
|
5
5
|
export declare const LEGACY_REGEXP = "^ {0,3}<!-- ReDoc-Inject:\\s+?<({component}).*?/?>\\s+?-->\\s*$";
|
|
6
6
|
export declare const MDX_COMPONENT_REGEXP: string;
|
|
7
7
|
export declare const COMPONENT_REGEXP: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OpenAPIOperation, OpenAPIParameter, OpenAPITag, Referenced, OpenAPIServer } from '../types';
|
|
1
|
+
import type { OpenAPIOperation, OpenAPIParameter, OpenAPITag, Referenced, OpenAPIServer } from '../types';
|
|
2
2
|
import { GroupModel, OperationModel } from './models';
|
|
3
|
-
import { OpenAPIParser } from './OpenAPIParser';
|
|
4
|
-
import { RedocProNormalizedOptions } from '../../../services';
|
|
3
|
+
import type { OpenAPIParser } from './OpenAPIParser';
|
|
4
|
+
import type { RedocProNormalizedOptions } from '../../../services';
|
|
5
5
|
export declare type TagInfo = OpenAPITag & {
|
|
6
6
|
operations: ExtendedOpenAPIOperation[];
|
|
7
7
|
used?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MenuBuilder=exports.GROUP_DEPTH=void 0;var tslib_1=require("tslib"),utils_1=require("../utils"),MarkdownRenderer_1=require("./MarkdownRenderer"),models_1=require("./models");exports.GROUP_DEPTH=0;var MenuBuilder=function(){function e(){}return Object.defineProperty(e,"buildStructure",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var a=r.definition,n=[],i=e.getTagsWithOperations(r);return n.push.apply(n,e.addMarkdownItems(a.info.description||"",void 0,1,t)),a["x-tagGroups"]&&a["x-tagGroups"].length>0?n.push.apply(n,e.getTagGroupsItems(r,void 0,a["x-tagGroups"],i,t)):n.push.apply(n,e.getTagsItems(r,i,void 0,void 0,t)),n}}),Object.defineProperty(e,"addMarkdownItems",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r,t,a){var n=new MarkdownRenderer_1.MarkdownRenderer(a).extractHeadings(e||"");n.length&&r&&r.description&&(r.description=MarkdownRenderer_1.MarkdownRenderer.getTextBeforeHading(r.description,n[0].name));var i=function(e,r,t){return void 0===t&&(t=1),r.map((function(r){var a=new models_1.GroupModel("section",r,e);return a.depth=t,r.items&&(a.items=i(a,r.items,t+1)),MarkdownRenderer_1.MarkdownRenderer.containsComponent(a.description||"",utils_1.SECURITY_DEFINITIONS_COMPONENT_NAME)&&(0,utils_1.setSecuritySchemePrefix)(a.id+"/"),a}))};return i(r,n,t)}}),Object.defineProperty(e,"getTagGroupsItems",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t,a,n,i){for(var o=[],s=0,l=a;s<l.length;s++){var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MenuBuilder=exports.GROUP_DEPTH=void 0;var tslib_1=require("tslib"),utils_1=require("../utils"),MarkdownRenderer_1=require("./MarkdownRenderer"),models_1=require("./models");exports.GROUP_DEPTH=0;var MenuBuilder=function(){function e(){}return Object.defineProperty(e,"buildStructure",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t){var a=r.definition,n=[],i=e.getTagsWithOperations(r);return n.push.apply(n,e.addMarkdownItems(a.info.description||"",void 0,1,t)),a["x-tagGroups"]&&a["x-tagGroups"].length>0?n.push.apply(n,e.getTagGroupsItems(r,void 0,a["x-tagGroups"],i,t)):n.push.apply(n,e.getTagsItems(r,i,void 0,void 0,t)),n}}),Object.defineProperty(e,"addMarkdownItems",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r,t,a){var n=new MarkdownRenderer_1.MarkdownRenderer(a).extractHeadings(e||"");n.length&&r&&r.description&&(r.description=MarkdownRenderer_1.MarkdownRenderer.getTextBeforeHading(r.description,n[0].name));var i=function(e,r,t){return void 0===t&&(t=1),r.map((function(r){var a=new models_1.GroupModel("section",r,e);return a.depth=t,r.items&&(a.items=i(a,r.items,t+1)),MarkdownRenderer_1.MarkdownRenderer.containsComponent(a.description||"",utils_1.SECURITY_DEFINITIONS_COMPONENT_NAME)&&(0,utils_1.setSecuritySchemePrefix)(a.id+"/"),a}))};return i(r,n,t)}}),Object.defineProperty(e,"getTagGroupsItems",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t,a,n,i){for(var o=[],s=0,l=a;s<l.length;s++){var u=l[s],d=new models_1.GroupModel("group",u,t);d.depth=exports.GROUP_DEPTH,d.items=e.getTagsItems(r,n,d,u,i),o.push(d)}return o}}),Object.defineProperty(e,"getTagsItems",{enumerable:!1,configurable:!0,writable:!0,value:function(r,t,a,n,i){var o;if(o=void 0===n?Object.keys(t):n.tags,!Array.isArray(o))return console.warn("Unexpected values of tags. Check tags or x-tagGroups in your definition."),[];for(var s=[],l=0,u=o.map((function(e){return t[e]?(t[e].used=!0,t[e]):(console.warn('Non-existing tag "'+e+'" is added to the group "'+(null==n?void 0:n.name)+'"'),null)}));l<u.length;l++){var d=u[l];if(d){var p=new models_1.GroupModel("tag",d,a);if(p.depth=exports.GROUP_DEPTH+1,""!==d.name)p.items=(0,tslib_1.__spreadArray)((0,tslib_1.__spreadArray)([],e.addMarkdownItems(d.description||"",p,p.depth+1,i),!0),this.getOperationsItems(r,p,d,p.depth+1,i),!0),s.push(p);else{var g=(0,tslib_1.__spreadArray)((0,tslib_1.__spreadArray)([],e.addMarkdownItems(d.description||"",p,p.depth+1,i),!0),this.getOperationsItems(r,void 0,d,p.depth+1,i),!0);s.push.apply(s,g)}}}return i.sortTagsAlphabetically&&s.sort((0,utils_1.alphabeticallyByProp)("name")),s}}),Object.defineProperty(e,"getOperationsItems",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r,t,a,n){if(0===t.operations.length)return[];for(var i=[],o=0,s=t.operations;o<s.length;o++){var l=s[o],u=new models_1.OperationModel(e,l,r,n);u.depth=a,i.push(u)}return n.sortOperationsAlphabetically&&i.sort((0,utils_1.alphabeticallyByProp)("name")),i}}),Object.defineProperty(e,"getTagsWithOperations",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var r={},t=e.definition,a=t["x-webhooks"]||t.webhooks,n=0,i=t.tags||[];n<i.length;n++){var o=i[n];r[o.name]=(0,tslib_1.__assign)((0,tslib_1.__assign)({},o),{operations:[]})}function s(e,t,a){for(var n,i=0,o=Object.keys(t||{});i<o.length;i++)for(var l=o[i],u=t[l],d=0,p=Object.keys(u).filter(utils_1.isOperationName);d<p.length;d++){var g=p[d],c=u[g];if(u.$ref){var _=e.deref(u);s(e,((n={})[l]=_,n),a)}else{var h=null==c?void 0:c.tags;h&&h.length||(h=[""]);for(var b=0,f=h;b<f.length;b++){var m=f[b],v=r[m];void 0===v&&(v={name:m,operations:[]},r[m]=v),v["x-traitTag"]||v.operations.push((0,tslib_1.__assign)((0,tslib_1.__assign)({},c),{pathName:l,pointer:utils_1.JsonPointer.compile(["paths",l,g]),httpVerb:g,pathParameters:u.parameters||[],pathServers:u.servers,isWebhook:!!a}))}}}}return t.paths&&s(e,t.paths),a&&s(e,a,!0),r}}),e}();exports.MenuBuilder=MenuBuilder;
|
|
2
2
|
//# sourceMappingURL=MenuBuilder.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenAPIRef, OpenAPISchema, OpenAPIDefinition, Referenced } from '../types';
|
|
1
|
+
import type { OpenAPIRef, OpenAPISchema, OpenAPIDefinition, Referenced } from '../types';
|
|
2
2
|
import { RedocNormalizedOptions } from './RedocNormalizedOptions';
|
|
3
3
|
export declare type MergedOpenAPISchema = OpenAPISchema & {
|
|
4
4
|
parentRefs?: string[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { OperationModel, Sample } from '.';
|
|
3
|
-
import { ResolvedThemeInterface, ThemeInterface } from '../theme';
|
|
4
|
-
import { LabelsConfigRaw } from './Labels';
|
|
5
|
-
import { MDXComponentMeta } from './MarkdownRenderer';
|
|
6
|
-
import { Server } from '../types';
|
|
2
|
+
import type { OperationModel, Sample } from '.';
|
|
3
|
+
import type { ResolvedThemeInterface, ThemeInterface } from '../theme';
|
|
4
|
+
import type { LabelsConfigRaw } from './Labels';
|
|
5
|
+
import type { MDXComponentMeta } from './MarkdownRenderer';
|
|
6
|
+
import type { Server } from '../types';
|
|
7
7
|
import type { OAuth2 } from '../../../services/OAuth2';
|
|
8
8
|
import type { ProStore } from '../../../services';
|
|
9
9
|
export declare type Unstable_ExternalCodeSample = Sample & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OpenAPIExternalDocumentation, OpenAPIDefinition } from '../types';
|
|
2
|
-
import { ContentItemModel } from './MenuBuilder';
|
|
1
|
+
import type { OpenAPIExternalDocumentation, OpenAPIDefinition } from '../types';
|
|
2
|
+
import type { ContentItemModel } from './MenuBuilder';
|
|
3
3
|
import { ApiInfoModel, SecuritySchemesModel, WebhookModel } from './models';
|
|
4
4
|
import { OpenAPIParser } from './OpenAPIParser';
|
|
5
|
-
import { RedocProNormalizedOptions } from '../../../services';
|
|
5
|
+
import type { RedocProNormalizedOptions } from '../../../services';
|
|
6
6
|
/**
|
|
7
7
|
* Store that contains all the specification related information in the form of tree
|
|
8
8
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OpenAPIContact, OpenAPIInfo, OpenAPILicense } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
1
|
+
import type { OpenAPIContact, OpenAPIInfo, OpenAPILicense } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
export declare class ApiInfoModel implements OpenAPIInfo {
|
|
4
4
|
private parser;
|
|
5
5
|
title: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OpenAPICallback, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
1
|
+
import type { OpenAPICallback, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
import { OperationModel } from './Operation';
|
|
4
|
-
import { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
4
|
+
import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
5
5
|
export declare class CallbackModel {
|
|
6
6
|
expanded: boolean;
|
|
7
7
|
name: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { OpenAPIEncoding, OpenAPIExample, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
1
|
+
import type { OpenAPIEncoding, OpenAPIExample, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
export declare class ExampleModel {
|
|
4
4
|
mime: string;
|
|
5
5
|
value: any;
|
|
6
|
+
rawValue: any;
|
|
6
7
|
summary?: string;
|
|
7
8
|
description?: string;
|
|
8
9
|
externalValueUrl?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExampleModel=void 0;var url_1=require("url"),utils_1=require("../../utils"),externalExamplesCache={},ExampleModel=function(){function e(e,r,t
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExampleModel=void 0;var url_1=require("url"),utils_1=require("../../utils"),externalExamplesCache={},ExampleModel=function(){function e(e,r,l,t){Object.defineProperty(this,"mime",{enumerable:!0,configurable:!0,writable:!0,value:l}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rawValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"summary",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalValueUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0});var a=e.deref(r);this.rawValue=a.value,this.value=a.value,this.summary=a.summary,this.description=a.description,a.externalValue&&(this.externalValueUrl=(0,url_1.resolve)(e.definitionUrl||"",a.externalValue)),e.exitRef(r),(0,utils_1.isFormUrlEncoded)(l)&&this.value&&"object"==typeof this.value&&(this.value=(0,utils_1.urlFormEncodePayload)(this.value,t))}return Object.defineProperty(e.prototype,"getExternalValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.externalValueUrl?(this.externalValueUrl in externalExamplesCache||(externalExamplesCache[this.externalValueUrl]=fetch(this.externalValueUrl).then((function(r){return r.text().then((function(l){if(!r.ok)return Promise.reject(new Error(l));if(!(0,utils_1.isJsonLike)(e))return l;try{return JSON.parse(l)}catch(e){return l}}))}))),externalExamplesCache[this.externalValueUrl]):Promise.resolve(void 0)}}),e}();exports.ExampleModel=ExampleModel;
|
|
2
2
|
//# sourceMappingURL=Example.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { OpenAPIParameter, OpenAPIParameterLocation, OpenAPIParameterStyle, Referenced } from '../../types';
|
|
2
|
-
import { RedocProNormalizedOptions } from '../../../../services';
|
|
3
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
4
|
-
import {
|
|
1
|
+
import type { OpenAPIParameter, OpenAPIParameterLocation, OpenAPIParameterStyle, Referenced } from '../../types';
|
|
2
|
+
import type { RedocProNormalizedOptions } from '../../../../services';
|
|
3
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
4
|
+
import type { Deps } from './Schema';
|
|
5
|
+
import { SchemaModel } from './Schema';
|
|
5
6
|
import { ExampleModel } from './Example';
|
|
6
7
|
/**
|
|
7
8
|
* Field or Parameter model ready to be used by components
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OpenAPIExternalDocumentation, OpenAPITag } from '../../types';
|
|
2
|
-
import { MarkdownHeading } from '../MarkdownRenderer';
|
|
3
|
-
import { ContentItemModel } from '../MenuBuilder';
|
|
4
|
-
import { IMenuItem, MenuItemGroupType } from '../MenuStore';
|
|
1
|
+
import type { OpenAPIExternalDocumentation, OpenAPITag } from '../../types';
|
|
2
|
+
import type { MarkdownHeading } from '../MarkdownRenderer';
|
|
3
|
+
import type { ContentItemModel } from '../MenuBuilder';
|
|
4
|
+
import type { IMenuItem, MenuItemGroupType } from '../MenuStore';
|
|
5
5
|
/**
|
|
6
6
|
* Operations Group model ready to be used by components
|
|
7
7
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OpenAPIMediaType } from '../../types';
|
|
1
|
+
import type { OpenAPIMediaType } from '../../types';
|
|
2
2
|
import { MediaTypeModel } from './MediaType';
|
|
3
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
4
|
-
import { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
5
|
-
import { OperationModel } from './Operation';
|
|
6
|
-
import { ResponseModel } from './Response';
|
|
3
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
4
|
+
import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
5
|
+
import type { OperationModel } from './Operation';
|
|
6
|
+
import type { ResponseModel } from './Response';
|
|
7
7
|
/**
|
|
8
8
|
* MediaContent model ready to be sued by React components
|
|
9
9
|
* Contains multiple MediaTypes and keeps track of the currently active one
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { OpenAPIMediaType } from '../../types';
|
|
2
|
-
import { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
1
|
+
import type { OpenAPIMediaType } from '../../types';
|
|
2
|
+
import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
3
3
|
import { SchemaModel } from './Schema';
|
|
4
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
4
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
5
5
|
import { ExampleModel } from './Example';
|
|
6
|
-
import { OperationModel } from './Operation';
|
|
7
|
-
import { ResponseModel } from './Response';
|
|
6
|
+
import type { OperationModel } from './Operation';
|
|
7
|
+
import type { ResponseModel } from './Response';
|
|
8
8
|
export declare class MediaTypeModel {
|
|
9
9
|
options: RedocProNormalizedOptions;
|
|
10
10
|
examples?: {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { IMenuItem } from '../MenuStore';
|
|
2
|
-
import { GroupModel } from './Group.model';
|
|
1
|
+
import type { IMenuItem } from '../MenuStore';
|
|
2
|
+
import type { GroupModel } from './Group.model';
|
|
3
3
|
import { SecurityRequirementModel } from './SecurityRequirement';
|
|
4
|
-
import { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample, Server } from '../../types';
|
|
5
|
-
import { ContentItemModel, ExtendedOpenAPIOperation } from '../MenuBuilder';
|
|
6
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
7
|
-
import { Unstable_ExternalCodeSample } from '../RedocNormalizedOptions';
|
|
4
|
+
import type { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample, Server } from '../../types';
|
|
5
|
+
import type { ContentItemModel, ExtendedOpenAPIOperation } from '../MenuBuilder';
|
|
6
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
7
|
+
import type { Unstable_ExternalCodeSample } from '../RedocNormalizedOptions';
|
|
8
8
|
import { CallbackModel } from './Callback';
|
|
9
9
|
import { FieldModel } from './Field';
|
|
10
|
-
import { MediaContentModel } from './MediaContent';
|
|
10
|
+
import type { MediaContentModel } from './MediaContent';
|
|
11
11
|
import { RequestBodyModel } from './RequestBody';
|
|
12
12
|
import { ResponseModel } from './Response';
|
|
13
|
-
import { RedocProNormalizedOptions } from '../../../../services';
|
|
13
|
+
import type { RedocProNormalizedOptions } from '../../../../services';
|
|
14
14
|
export interface Sample {
|
|
15
15
|
lang: string;
|
|
16
16
|
label?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OpenAPIRequestBody, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
3
|
-
import { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
1
|
+
import type { OpenAPIRequestBody, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
|
+
import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
4
4
|
import { MediaContentModel } from './MediaContent';
|
|
5
|
-
import { OperationModel } from './Operation';
|
|
5
|
+
import type { OperationModel } from './Operation';
|
|
6
6
|
declare type RequestBodyProps = {
|
|
7
7
|
parser: OpenAPIParser;
|
|
8
8
|
infoOrRef: Referenced<OpenAPIRequestBody>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OpenAPIResponse, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
3
|
-
import { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
1
|
+
import type { OpenAPIResponse, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
|
+
import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
|
|
4
4
|
import { FieldModel } from './Field';
|
|
5
5
|
import { MediaContentModel } from './MediaContent';
|
|
6
|
-
import { OperationModel } from './Operation';
|
|
6
|
+
import type { OperationModel } from './Operation';
|
|
7
7
|
declare type ResponseProps = {
|
|
8
8
|
parser: OpenAPIParser;
|
|
9
9
|
code: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
3
|
-
import { RedocProNormalizedOptions } from '../../../../services';
|
|
1
|
+
import type { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
|
+
import type { RedocProNormalizedOptions } from '../../../../services';
|
|
4
4
|
import { FieldModel } from './Field';
|
|
5
|
-
import { MergedOpenAPISchema, ResponseModel } from '../';
|
|
6
|
-
import { OperationModel } from './Operation';
|
|
5
|
+
import type { MergedOpenAPISchema, ResponseModel } from '../';
|
|
6
|
+
import type { OperationModel } from './Operation';
|
|
7
7
|
export declare type Deps = {
|
|
8
8
|
parentFieldFullPath?: string;
|
|
9
9
|
operation?: OperationModel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
1
|
+
import type { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
export interface SecurityScheme extends OpenAPISecurityScheme {
|
|
4
4
|
id: string;
|
|
5
5
|
sectionId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OpenAPISecurityScheme, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
1
|
+
import type { OpenAPISecurityScheme, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
export declare class SecuritySchemeModel {
|
|
4
4
|
id: string;
|
|
5
5
|
sectionId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OpenAPIPath, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
1
|
+
import type { OpenAPIPath, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
import { OperationModel } from './Operation';
|
|
4
|
-
import { RedocProNormalizedOptions } from '../../../../services';
|
|
4
|
+
import type { RedocProNormalizedOptions } from '../../../../services';
|
|
5
5
|
export declare class WebhookModel {
|
|
6
6
|
operations: OperationModel[];
|
|
7
7
|
constructor(parser: OpenAPIParser, options: RedocProNormalizedOptions, infoOrRef?: Referenced<OpenAPIPath>);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as styledComponents from 'styled-components';
|
|
2
|
-
import { ResolvedThemeInterface, MediaValue } from './theme';
|
|
3
|
-
import { ProTheme } from '../../services/extendTheme';
|
|
2
|
+
import type { ResolvedThemeInterface, MediaValue } from './theme';
|
|
3
|
+
import type { ProTheme } from '../../services/extendTheme';
|
|
4
4
|
export type { ResolvedThemeInterface, MediaValue };
|
|
5
5
|
declare const styled: styledComponents.ThemedStyledInterface<ProTheme>, css: styledComponents.ThemedCssFunction<ProTheme>, createGlobalStyle: <P extends object = {}>(first: TemplateStringsArray | styledComponents.CSSObject | styledComponents.InterpolationFunction<styledComponents.ThemedStyledProps<P, ProTheme>>, ...interpolations: styledComponents.Interpolation<styledComponents.ThemedStyledProps<P, ProTheme>>[]) => styledComponents.GlobalStyleComponent<P, ProTheme>, keyframes: (strings: TemplateStringsArray | styledComponents.CSSKeyframes, ...interpolations: styledComponents.SimpleInterpolation[]) => styledComponents.Keyframes, ThemeProvider: styledComponents.ThemeProviderComponent<ProTheme, ProTheme>;
|
|
6
6
|
export { css, createGlobalStyle, keyframes, ThemeProvider };
|
|
@@ -20,7 +20,9 @@ export declare function flattenByProp<T extends GenericObject, P extends keyof T
|
|
|
20
20
|
export declare function stripTrailingSlash(path: string): string;
|
|
21
21
|
export declare function isNumeric(value: unknown): value is number;
|
|
22
22
|
export declare function appendToMdHeading(md: string, heading: string, content: string): string;
|
|
23
|
-
export declare const mergeObjects: (target: GenericObject, ...sources: GenericObject[]) =>
|
|
23
|
+
export declare const mergeObjects: (target: GenericObject, ...sources: GenericObject[]) => GenericObject;
|
|
24
|
+
export declare const isObject: (item: unknown) => item is "object";
|
|
25
|
+
export declare const isMergeableObject: (item: unknown) => boolean;
|
|
24
26
|
/**
|
|
25
27
|
* slugify() returns empty string when failed to slugify.
|
|
26
28
|
* so try to return minimum slugified-string with failed one which keeps original value
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSchemaTitle=exports.sanitizeItemId=exports.unescapeHTMLChars=exports.removeQueryString=exports.titleize=exports.getBasePath=exports.resolveUrl=exports.isAbsoluteUrl=exports.safeSlugify=exports.mergeObjects=exports.appendToMdHeading=exports.isNumeric=exports.stripTrailingSlash=exports.flattenByProp=exports.mapValues=exports.mapWithLast=void 0;var tslib_1=require("tslib"),slugify_1=(0,tslib_1.__importDefault)(require("slugify")),url_1=require("url"),media_css_1=require("./media-css"),openapi_1=require("./openapi"),JsonPointer_1=(0,tslib_1.__importDefault)(require("./JsonPointer"));function mapWithLast(e,r){for(var t=[],s=0;s<e.length-1;s++)t.push(r(e[s],!1));return 0!==e.length&&t.push(r(e[e.length-1],!0)),t}function mapValues(e,r){var t={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=r(e[s],s,e));return t}function flattenByProp(e,r){var t=[],s=function(e){for(var i=0,n=e;i<n.length;i++){var a=n[i];t.push(a),a[r]&&s(a[r])}};return s(e),t}function stripTrailingSlash(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function isNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}function appendToMdHeading(e,r,t){var s=new RegExp("(^|\\n)#\\s?"+r+"\\s*\\n","i"),i=new RegExp("((\\n|^)#\\s*"+r+"\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)","i");if(s.test(e))return e.replace(i,"$1\n\n"+t+"\n$4");var n=""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n";return""+e+n+"# "+r+"\n\n"+t}exports.mapWithLast=mapWithLast,exports.mapValues=mapValues,exports.flattenByProp=flattenByProp,exports.stripTrailingSlash=stripTrailingSlash,exports.isNumeric=isNumeric,exports.appendToMdHeading=appendToMdHeading;var mergeObjects=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if(!r.length)return e;var s=r.shift();return void 0===s?e:(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSchemaTitle=exports.sanitizeItemId=exports.unescapeHTMLChars=exports.removeQueryString=exports.titleize=exports.getBasePath=exports.resolveUrl=exports.isAbsoluteUrl=exports.safeSlugify=exports.isMergeableObject=exports.isObject=exports.mergeObjects=exports.appendToMdHeading=exports.isNumeric=exports.stripTrailingSlash=exports.flattenByProp=exports.mapValues=exports.mapWithLast=void 0;var tslib_1=require("tslib"),slugify_1=(0,tslib_1.__importDefault)(require("slugify")),url_1=require("url"),media_css_1=require("./media-css"),openapi_1=require("./openapi"),JsonPointer_1=(0,tslib_1.__importDefault)(require("./JsonPointer"));function mapWithLast(e,r){for(var t=[],s=0;s<e.length-1;s++)t.push(r(e[s],!1));return 0!==e.length&&t.push(r(e[e.length-1],!0)),t}function mapValues(e,r){var t={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=r(e[s],s,e));return t}function flattenByProp(e,r){var t=[],s=function(e){for(var i=0,n=e;i<n.length;i++){var a=n[i];t.push(a),a[r]&&s(a[r])}};return s(e),t}function stripTrailingSlash(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function isNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}function appendToMdHeading(e,r,t){var s=new RegExp("(^|\\n)#\\s?"+r+"\\s*\\n","i"),i=new RegExp("((\\n|^)#\\s*"+r+"\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)","i");if(s.test(e))return e.replace(i,"$1\n\n"+t+"\n$4");var n=""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n";return""+e+n+"# "+r+"\n\n"+t}exports.mapWithLast=mapWithLast,exports.mapValues=mapValues,exports.flattenByProp=flattenByProp,exports.stripTrailingSlash=stripTrailingSlash,exports.isNumeric=isNumeric,exports.appendToMdHeading=appendToMdHeading;var mergeObjects=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if(!r.length)return e;var s=r.shift();return void 0===s?e:((0,exports.isMergeableObject)(e)&&(0,exports.isMergeableObject)(s)&&Object.keys(s).forEach((function(r){var t;(0,exports.isMergeableObject)(s[r])?(e[r]||(e[r]={}),["string","number"].includes(typeof e[r])&&(s[r][media_css_1.ZERO_BREAKPOINT]||0===s[r][media_css_1.ZERO_BREAKPOINT]||console.warn('Theme resolver: using default value of "'+e[r]+'" for "'+r+'". This is not recommended. Prefer adding default value by providing "'+media_css_1.ZERO_BREAKPOINT+'" property to '+JSON.stringify(s[r])+"."),e[r]=((t={})[media_css_1.ZERO_BREAKPOINT]=e[r],t)),(0,exports.mergeObjects)(e[r],s[r])):e[r]=s[r]})),exports.mergeObjects.apply(void 0,(0,tslib_1.__spreadArray)([e],r,!1)))};exports.mergeObjects=mergeObjects;var isObject=function(e){return null!==e&&"object"==typeof e};exports.isObject=isObject;var isMergeableObject=function(e){return(0,exports.isObject)(e)&&!Array.isArray(e)};function safeSlugify(e){return(0,slugify_1.default)(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function isAbsoluteUrl(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}function resolveUrl(e,r){var t;if(r.startsWith("//"))t=""+((0,url_1.parse)(e).protocol||"https:")+r;else if(isAbsoluteUrl(r))t=r;else if(r.startsWith("/")){var s=(0,url_1.parse)(e);t=(0,url_1.format)((0,tslib_1.__assign)((0,tslib_1.__assign)({},s),{pathname:r}))}else t=stripTrailingSlash(e)+"/"+r;return stripTrailingSlash(t)}function getBasePath(e){try{return parseURL(e).pathname}catch(r){return e}}function titleize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function removeQueryString(e){try{var r=parseURL(e);return r.search="",r.toString()}catch(r){return e}}function parseURL(e){return"undefined"==typeof URL?new(require("url").URL)(e):new URL(e)}function unescapeHTMLChars(e){return e.replace(/&#(\d+);/g,(function(e,r){return String.fromCharCode(parseInt(r,10))})).replace(/&/g,"&")}function sanitizeItemId(e){return e&&e.replace(/#/g,"_")}function getSchemaTitle(e,r){return r||(0,openapi_1.isNamedDefinition)(e)&&JsonPointer_1.default.baseName(e)||""}exports.isMergeableObject=isMergeableObject,exports.safeSlugify=safeSlugify,exports.isAbsoluteUrl=isAbsoluteUrl,exports.resolveUrl=resolveUrl,exports.getBasePath=getBasePath,exports.titleize=titleize,exports.removeQueryString=removeQueryString,exports.unescapeHTMLChars=unescapeHTMLChars,exports.sanitizeItemId=sanitizeItemId,exports.getSchemaTitle=getSchemaTitle;
|
|
2
2
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Document } from '@redocly/openapi-core';
|
|
1
|
+
import type { Document } from '@redocly/openapi-core';
|
|
2
2
|
import type { OpenAPIDefinition } from '../types';
|
|
3
3
|
export declare function loadAndBundleDefinition(specUrlOrObject: GenericObject | string): Promise<OpenAPIDefinition>;
|
|
4
4
|
export declare function createParsedDocument(specUrlOrObject: GenericObject | string): Document;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FieldModel } from '../services/models';
|
|
2
|
-
import { OpenAPIParser } from '../services/OpenAPIParser';
|
|
3
|
-
import { OpenAPIEncoding, OpenAPIMediaType, OpenAPIOperation, OpenAPIParameter, OpenAPIParameterStyle, OpenAPISchema, OpenAPIServer, Referenced, OpenAPIResponse, OpenAPIRequestBody } from '../types';
|
|
1
|
+
import type { FieldModel } from '../services/models';
|
|
2
|
+
import type { OpenAPIParser } from '../services/OpenAPIParser';
|
|
3
|
+
import type { OpenAPIEncoding, OpenAPIMediaType, OpenAPIOperation, OpenAPIParameter, OpenAPIParameterStyle, OpenAPISchema, OpenAPIServer, Referenced, OpenAPIResponse, OpenAPIRequestBody } from '../types';
|
|
4
4
|
export declare function isStatusCode(statusCode: string): boolean;
|
|
5
5
|
export declare function getStatusCodeType(statusCode: string | number, defaultAsError?: boolean): string;
|
|
6
6
|
export declare function isOperationName(key: string): boolean;
|
package/lib/services/OAuth2.d.ts
CHANGED
|
@@ -38,11 +38,4 @@ export declare const oauth2Instance: OAuth2;
|
|
|
38
38
|
export interface OAuthState {
|
|
39
39
|
randomStr: string;
|
|
40
40
|
}
|
|
41
|
-
export declare function randString(len?: number): string;
|
|
42
|
-
/**
|
|
43
|
-
* Returns base-64 encoded ASCII string from a stringified JSON object
|
|
44
|
-
*/
|
|
45
|
-
export declare function encodeState<T extends GenericObject = GenericObject>(params: T): string;
|
|
46
|
-
export declare function sha256(str: string): Promise<ArrayBuffer | undefined>;
|
|
47
|
-
export declare function base64UrlEncode(arrayBuff?: ArrayBuffer): string | undefined;
|
|
48
41
|
export declare function deriveCodeChallenge(codeVerifier: string): Promise<string | undefined>;
|
package/lib/services/OAuth2.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.deriveCodeChallenge=exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.deriveCodeChallenge=exports.oauth2Instance=exports.OAuth2=void 0;var tslib_1=require("tslib"),qs=(0,tslib_1.__importStar)(require("querystring")),utils_1=require("./utils"),DEFAULT_OAUTH2_REDIRECT_PAGE="/oauth2-redirect.html",OAuth2=function(){function e(){}return Object.defineProperty(e,"authorizeImplicit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=t.authorizationUrl,a=t.clientId,i=t.scopes,n=t.extraParams,s=void 0===n?{}:n,o=t.routingBasePath,c=t.redirectUri,l=t.successCallback,u=t.errorCallback,d=(0,utils_1.encodeState)({date:(new Date).toString()}),h=new URL(r),_="/"===o?"":o,b=""+window.location.origin+_+DEFAULT_OAUTH2_REDIRECT_PAGE;for(var p in h.searchParams.set("client_id",a),h.searchParams.set("redirect_uri",c||b),h.searchParams.set("response_type","token"),h.searchParams.set("state",d),Array.isArray(i)&&h.searchParams.set("scope",i.join(" ")),s)h.searchParams.set(p,s[p]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:r,clientId:a,scopes:i},state:d,successCallback:function(t){l(t),e.clearRedirectData("implicit")},errorCallback:function(t){u(t),e.clearRedirectData("implicit")}},window.open(h.toString())}}),Object.defineProperty(e,"authorizeAuthorizationCode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this,a=t.authorizationUrl,i=t.tokenUrl,n=t.clientId,s=t.clientSecret,o=t.codeVerifier,c=t.codeChallenge,l=t.scopes,u=t.extraParams,d=void 0===u?{}:u,h=t.routingBasePath,_=t.redirectUri,b=t.successCallback,p=t.errorCallback,f=new URL(a),w="/"===h?"":h,v=""+window.location.origin+w+DEFAULT_OAUTH2_REDIRECT_PAGE,C=(0,utils_1.encodeState)({date:(new Date).toString()});for(var g in f.searchParams.set("client_id",n),f.searchParams.set("redirect_uri",_||v),f.searchParams.set("response_type","code"),f.searchParams.set("state",C),Array.isArray(l)&&f.searchParams.set("scope",l.join(" ")),c&&(f.searchParams.set("code_challenge",c),f.searchParams.set("code_challenge_method","S256")),d)f.searchParams.set(g,d[g]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:a,clientId:n,scopes:l},state:C,successCallback:function(t){var a=t.auth_code;return(0,tslib_1.__awaiter)(r,void 0,void 0,(function(){var t;return(0,tslib_1.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,fetch(i,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:qs.stringify((0,tslib_1.__assign)((0,tslib_1.__assign)((0,tslib_1.__assign)({client_id:n,client_secret:s},o&&{code_verifier:o}),{code:a,grant_type:"authorization_code",redirect_uri:_||v}),d))})];case 1:return[4,handleResponseCallback(r.sent(),b,p)];case 2:return r.sent(),[3,4];case 3:return t=r.sent(),p(t),[3,4];case 4:return e.clearRedirectData("authorizationCode"),[2]}}))}))},errorCallback:function(t){p(t),e.clearRedirectData("authorizationCode")}},window.open(f.toString())}}),Object.defineProperty(e,"clearRedirectData",{enumerable:!1,configurable:!0,writable:!0,value:function(e){window.redirectOAuth2={flow:e,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:function(){},errorCallback:function(){}}}}),Object.defineProperty(e,"authorizeClientCredentials",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.tokenUrl,r=e.clientId,a=e.clientSecret,i=e.scopes,n=void 0===i?[]:i,s=e.extraParams,o=void 0===s?{}:s,c=e.successCallback,l=e.errorCallback;return(0,tslib_1.__awaiter)(this,void 0,void 0,(function(){var e;return(0,tslib_1.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:qs.stringify((0,tslib_1.__assign)({client_id:r,client_secret:a,grant_type:"client_credentials",scope:Array.isArray(n)?n.join(" "):void 0},o))})];case 1:return[4,handleResponseCallback(i.sent(),c,l)];case 2:return i.sent(),[3,4];case 3:return e=i.sent(),l(e),[3,4];case 4:return[2]}}))}))}}),e}();function handleResponseCallback(e,t,r){return(0,tslib_1.__awaiter)(this,void 0,void 0,(function(){var a,i,n,s,o,c;return(0,tslib_1.__generator)(this,(function(l){switch(l.label){case 0:return e.ok?[4,e.json()]:[3,2];case 1:return a=l.sent(),t(a),[3,7];case 2:return i=r,n=Error.bind,(e.headers.get("Content-Type")||"").indexOf("json")>-1?(c=(o=JSON).stringify,[4,e.json()]):[3,4];case 3:return s=c.apply(o,[l.sent()]),[3,6];case 4:return[4,e.text()];case 5:s=l.sent(),l.label=6;case 6:i.apply(void 0,[new(n.apply(Error,[void 0,s]))]),l.label=7;case 7:return[2]}}))}))}function deriveCodeChallenge(e){return(0,tslib_1.__awaiter)(this,void 0,void 0,(function(){var t;return(0,tslib_1.__generator)(this,(function(r){switch(r.label){case 0:return t=utils_1.base64UrlEncode,[4,(0,utils_1.sha256)(e)];case 1:return[2,t.apply(void 0,[r.sent()])]}}))}))}exports.OAuth2=OAuth2,exports.oauth2Instance=new OAuth2,exports.deriveCodeChallenge=deriveCodeChallenge;
|
|
2
2
|
//# sourceMappingURL=OAuth2.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IMenuItem, ScrollService, HistoryService, MenuItemType, SchemaModel, SpecStore } from '../redoc-lib';
|
|
2
|
-
import { RedocProNormalizedOptions } from './ProStore';
|
|
1
|
+
import type { IMenuItem, ScrollService, HistoryService, MenuItemType, SchemaModel, SpecStore } from '../redoc-lib';
|
|
2
|
+
import type { RedocProNormalizedOptions } from './ProStore';
|
|
3
3
|
import { VersionedSpecStore } from './VersionedSpecStore';
|
|
4
4
|
export declare type ExtendedMenuItem = Omit<IMenuItem, 'type'> & {
|
|
5
5
|
type: MenuItemType | 'spec';
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
import { IValueDidChange } from 'mobx';
|
|
2
|
-
import { ContentItemModel, IMenuItem,
|
|
1
|
+
import type { IValueDidChange } from 'mobx';
|
|
2
|
+
import type { ContentItemModel, IMenuItem, OpenAPIDefinition, OpenAPIExternalDocumentation, OperationModel, RedocRawOptions, SearchStore } from '../redoc-lib';
|
|
3
|
+
import { MarkerService, RedocNormalizedOptions, SpecStore } from '../redoc-lib';
|
|
3
4
|
import { ProMenu } from './ProMenu';
|
|
4
|
-
import { SearchResultMeta } from './SearchStore';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { LicenseInfo } from './check';
|
|
8
|
-
import { CodeSamplesConfig, Languages } from './code-samples/';
|
|
9
|
-
import { Events
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export declare type RedocProTheme = RedocRawOptions['theme'] & ThemeExtension;
|
|
14
|
-
export declare type MarkdownItemsPagination = 'none' | 'section';
|
|
15
|
-
export declare type Pagination = 'none' | 'section' | 'item';
|
|
16
|
-
export declare type ExternalLink = ExternalLinkLink | ExternalLinkSeparator;
|
|
17
|
-
export declare type ExternalLinkLink = {
|
|
18
|
-
label: string;
|
|
19
|
-
link: string;
|
|
20
|
-
target?: string;
|
|
21
|
-
separatorLine?: boolean;
|
|
22
|
-
};
|
|
23
|
-
export declare type ExternalLinkSeparator = {
|
|
24
|
-
separator?: string;
|
|
25
|
-
separatorLine?: boolean;
|
|
26
|
-
};
|
|
5
|
+
import type { SearchResultMeta } from './SearchStore';
|
|
6
|
+
import type { SpecVersions } from './VersionedSpecStore';
|
|
7
|
+
import { VersionedSpecStore } from './VersionedSpecStore';
|
|
8
|
+
import type { LicenseInfo } from './check';
|
|
9
|
+
import type { CodeSamplesConfig, Languages } from './code-samples/';
|
|
10
|
+
import type { Events } from './store-types';
|
|
11
|
+
import { LayoutVariant } from './store-types';
|
|
12
|
+
import type { ExternalLink, MarkdownItemsPagination, Normalized, Pagination, RedocProTheme } from './types';
|
|
13
|
+
import { SideNavStyle } from './types';
|
|
27
14
|
export declare type RedocProUserOptionsExt = {
|
|
28
15
|
licenseKey?: string;
|
|
29
16
|
searchMode?: 'default' | 'path-only';
|
|
@@ -31,7 +18,7 @@ export declare type RedocProUserOptionsExt = {
|
|
|
31
18
|
searchTagTitleBoost?: number | string;
|
|
32
19
|
searchFieldLevelBoost?: number | string;
|
|
33
20
|
searchAutoExpand?: boolean;
|
|
34
|
-
sideNavStyle?:
|
|
21
|
+
sideNavStyle?: SideNavStyle;
|
|
35
22
|
showConsole?: boolean;
|
|
36
23
|
hideLogo?: boolean;
|
|
37
24
|
whiteLabel?: boolean;
|