@redocly/openapi-docs 3.11.0-next.10 → 3.11.0-next.3
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/LICENSE.md +1 -1
- package/bin.js +4 -0
- package/dist/redocly-openapi-docs.min.js +10938 -11919
- package/lib/components/ApiInfo/ApiInfo.d.ts +1 -1
- package/lib/components/ApiInfo/ApiInfo.js +2 -1
- package/lib/components/ApiInfo/Metadata.d.ts +1 -1
- package/lib/components/ApiInfo/Metadata.js +2 -1
- package/lib/components/ApiInfo/index.d.ts +1 -1
- package/lib/components/ApiInfo/index.js +2 -1
- package/lib/components/ApiInfo/styled.d.ts +4 -4
- package/lib/components/ApiInfo/styled.js +9 -8
- package/lib/components/CallbackSamples/CallbackSamples.js +5 -4
- package/lib/components/CallbackSamples/index.d.ts +1 -1
- package/lib/components/CallbackSamples/index.js +2 -1
- package/lib/components/Callbacks/CallbackDetails.d.ts +1 -1
- package/lib/components/Callbacks/CallbackDetails.js +4 -3
- package/lib/components/Callbacks/CallbackOperation.d.ts +1 -1
- package/lib/components/Callbacks/CallbackOperation.js +4 -3
- package/lib/components/Callbacks/CallbackSummary.d.ts +1 -1
- package/lib/components/Callbacks/CallbackSummary.js +4 -3
- package/lib/components/Callbacks/CallbacksList.d.ts +1 -1
- package/lib/components/Callbacks/CallbacksList.js +2 -1
- package/lib/components/Callbacks/index.d.ts +3 -3
- package/lib/components/Callbacks/index.js +2 -1
- package/lib/components/Callbacks/styled.d.ts +3 -1
- package/lib/components/Callbacks/styled.js +3 -2
- package/lib/components/Content/Content.d.ts +1 -1
- package/lib/components/Content/Content.js +2 -1
- package/lib/components/Content/index.d.ts +1 -1
- package/lib/components/Content/index.js +2 -1
- package/lib/components/Content/useAutoScroll.js +2 -1
- package/lib/components/ContentItem/ContentItem.d.ts +1 -1
- package/lib/components/ContentItem/ContentItem.js +2 -1
- package/lib/components/ContentItem/index.d.ts +1 -1
- package/lib/components/ContentItem/index.js +2 -1
- package/lib/components/ContentItem/useIsExpanded.d.ts +1 -1
- package/lib/components/ContentItem/useIsExpanded.js +2 -1
- package/lib/components/ContentItems/ContentItems.d.ts +1 -1
- package/lib/components/ContentItems/ContentItems.js +2 -1
- package/lib/components/ContentItems/Items.js +2 -1
- package/lib/components/ContentItems/VirtualList.d.ts +1 -1
- package/lib/components/ContentItems/VirtualList.js +2 -1
- package/lib/components/ContentItems/helpers.d.ts +3 -3
- package/lib/components/ContentItems/helpers.js +2 -1
- package/lib/components/ContentItems/index.d.ts +1 -1
- package/lib/components/ContentItems/index.js +2 -1
- package/lib/components/ContentItems/useScrollOnRender.d.ts +1 -1
- package/lib/components/ContentItems/useScrollOnRender.js +2 -1
- package/lib/components/Discriminator/Discriminator.d.ts +1 -1
- package/lib/components/Discriminator/Discriminator.js +3 -2
- package/lib/components/Discriminator/index.d.ts +1 -1
- package/lib/components/Discriminator/index.js +2 -1
- package/lib/components/Download/DownloadSpecification.js +5 -4
- package/lib/components/Download/index.d.ts +1 -1
- package/lib/components/Download/index.js +2 -1
- package/lib/components/Download/types.js +2 -0
- package/lib/components/Download/useDownloadInfo.d.ts +1 -1
- package/lib/components/Download/useDownloadInfo.js +2 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.js +3 -2
- package/lib/components/ErrorBoundary/index.d.ts +1 -1
- package/lib/components/ErrorBoundary/index.js +2 -1
- package/lib/components/ExpandAllButton/ExpandAllButton.js +3 -2
- package/lib/components/ExpandAllButton/index.d.ts +1 -1
- package/lib/components/ExpandAllButton/index.js +2 -1
- package/lib/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
- package/lib/components/ExternalDocumentation/ExternalDocumentation.js +5 -4
- package/lib/components/ExternalDocumentation/index.d.ts +1 -1
- package/lib/components/ExternalDocumentation/index.js +2 -1
- package/lib/components/Language/LanguageDropdown.d.ts +1 -1
- package/lib/components/Language/LanguageDropdown.js +2 -1
- package/lib/components/Language/LanguageItem.d.ts +1 -1
- package/lib/components/Language/LanguageItem.js +2 -1
- package/lib/components/Language/LanguageList.d.ts +1 -1
- package/lib/components/Language/LanguageList.js +2 -1
- package/lib/components/Language/_tests_/LanguageDropdown.test.js +2 -1
- package/lib/components/Language/constants.js +2 -1
- package/lib/components/Language/index.d.ts +3 -3
- package/lib/components/Language/index.js +2 -1
- package/lib/components/Language/styled.d.ts +31 -8
- package/lib/components/Language/styled.js +12 -11
- package/lib/components/Markdown/Markdown.d.ts +1 -1
- package/lib/components/Markdown/Markdown.js +2 -1
- package/lib/components/Markdown/index.d.ts +2 -2
- package/lib/components/Markdown/index.js +2 -1
- package/lib/components/Markdown/types.js +2 -0
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +2 -1
- package/lib/components/MediaTypeSwitch/index.d.ts +1 -1
- package/lib/components/MediaTypeSwitch/index.js +2 -1
- package/lib/components/OperationItem/Description.d.ts +1 -1
- package/lib/components/OperationItem/Description.js +2 -1
- package/lib/components/OperationItem/OperationItem.d.ts +3 -1
- package/lib/components/OperationItem/OperationItem.js +6 -5
- package/lib/components/OperationItem/_tests_/OperationItem.test.js +2 -1
- package/lib/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.js +2 -1
- package/lib/components/OperationItem/index.d.ts +2 -2
- package/lib/components/OperationItem/index.js +2 -1
- package/lib/components/OperationItem/types.d.ts +1 -1
- package/lib/components/OperationItem/types.js +2 -0
- package/lib/components/Overlay.d.ts +1 -1
- package/lib/components/Overlay.js +4 -3
- package/lib/components/Overview/Overview.d.ts +1 -1
- package/lib/components/Overview/Overview.js +2 -1
- package/lib/components/Overview/index.d.ts +1 -1
- package/lib/components/Overview/index.js +2 -1
- package/lib/components/PageFooter/PageFooter.js +2 -1
- package/lib/components/PageFooter/index.d.ts +1 -1
- package/lib/components/PageFooter/index.js +2 -1
- package/lib/components/Panel/ResponsePanel.d.ts +3 -2
- package/lib/components/Panel/ResponsePanel.js +7 -6
- package/lib/components/Panel/Trigger.d.ts +1 -1
- package/lib/components/Panel/Trigger.js +3 -2
- package/lib/components/Panel/index.d.ts +2 -2
- package/lib/components/Panel/index.js +2 -1
- package/lib/components/PanelItem/PanelItem.js +2 -1
- package/lib/components/PanelItem/index.d.ts +2 -2
- package/lib/components/PanelItem/index.js +2 -1
- package/lib/components/PanelItem/styled.d.ts +16 -8
- package/lib/components/PanelItem/styled.js +10 -9
- package/lib/components/PayloadSamples/Example.d.ts +1 -1
- package/lib/components/PayloadSamples/Example.js +2 -1
- package/lib/components/PayloadSamples/ExampleValue.d.ts +1 -1
- package/lib/components/PayloadSamples/ExampleValue.js +2 -1
- package/lib/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
- package/lib/components/PayloadSamples/MediaTypeSamples.js +3 -2
- package/lib/components/PayloadSamples/PayloadSamples.d.ts +1 -1
- package/lib/components/PayloadSamples/PayloadSamples.js +2 -1
- package/lib/components/PayloadSamples/index.d.ts +5 -6
- package/lib/components/PayloadSamples/index.js +2 -1
- package/lib/components/PayloadSamples/styled.d.ts +4 -3
- package/lib/components/PayloadSamples/styled.js +5 -4
- package/lib/components/PayloadSamples/types.d.ts +3 -3
- package/lib/components/PayloadSamples/types.js +2 -0
- package/lib/components/PropertyDetails/DescriptionEnums.d.ts +1 -1
- package/lib/components/PropertyDetails/DescriptionEnums.js +4 -3
- package/lib/components/PropertyDetails/EnumValues.d.ts +1 -1
- package/lib/components/PropertyDetails/EnumValues.js +2 -1
- package/lib/components/PropertyDetails/Examples.d.ts +1 -1
- package/lib/components/PropertyDetails/Examples.js +2 -1
- package/lib/components/PropertyDetails/Extensions.d.ts +1 -1
- package/lib/components/PropertyDetails/Extensions.js +3 -2
- package/lib/components/PropertyDetails/FieldDetail.js +3 -2
- package/lib/components/PropertyDetails/FieldDetails.d.ts +1 -1
- package/lib/components/PropertyDetails/FieldDetails.js +7 -6
- package/lib/components/PropertyDetails/Pattern.js +2 -1
- package/lib/components/PropertyDetails/PlusCircleIcon.js +5 -4
- package/lib/components/PropertyDetails/PropertyDetails.d.ts +1 -1
- package/lib/components/PropertyDetails/PropertyDetails.js +3 -2
- package/lib/components/PropertyDetails/SchemaTypeInfo.js +3 -2
- package/lib/components/PropertyDetails/SimpleEnums.d.ts +1 -1
- package/lib/components/PropertyDetails/SimpleEnums.js +3 -2
- package/lib/components/PropertyDetails/cycleColorsByLevel.js +2 -1
- package/lib/components/PropertyDetails/index.d.ts +3 -3
- package/lib/components/PropertyDetails/index.js +2 -1
- package/lib/components/PropertyDetails/styled.d.ts +6 -6
- package/lib/components/PropertyDetails/styled.js +8 -7
- package/lib/components/PropertyDetails/types.d.ts +2 -3
- package/lib/components/PropertyDetails/types.js +2 -0
- package/lib/components/RedoclyOpenAPIDocs/Providers.d.ts +3 -2
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +2 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +3 -2
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +2 -1
- package/lib/components/RedoclyOpenAPIDocs/index.d.ts +4 -4
- package/lib/components/RedoclyOpenAPIDocs/index.js +2 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.d.ts +1 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.js +3 -2
- package/lib/components/RedoclyOpenAPIDocs/types.d.ts +3 -3
- package/lib/components/RedoclyOpenAPIDocs/types.js +2 -0
- package/lib/components/RedoclyOpenAPIDocs/utils.d.ts +4 -1
- package/lib/components/RedoclyOpenAPIDocs/utils.js +2 -1
- package/lib/components/RenderHook/RenderHook.d.ts +2 -2
- package/lib/components/RenderHook/RenderHook.js +2 -1
- package/lib/components/RenderHook/index.d.ts +1 -1
- package/lib/components/RenderHook/index.js +2 -1
- package/lib/components/Replay/EmbeddedReplay.d.ts +1 -1
- package/lib/components/Replay/EmbeddedReplay.js +4 -3
- package/lib/components/Replay/Replay.d.ts +1 -1
- package/lib/components/Replay/Replay.js +2 -1
- package/lib/components/Replay/index.d.ts +2 -2
- package/lib/components/Replay/index.js +2 -1
- package/lib/components/Replay/utils.d.ts +4 -4
- package/lib/components/Replay/utils.js +2 -1
- package/lib/components/Request/RequestDetails.d.ts +1 -1
- package/lib/components/Request/RequestDetails.js +3 -2
- package/lib/components/Request/types.js +2 -0
- package/lib/components/RequestParameters/Body.d.ts +1 -1
- package/lib/components/RequestParameters/Body.js +2 -1
- package/lib/components/RequestParameters/ParametersGroup.d.ts +1 -1
- package/lib/components/RequestParameters/ParametersGroup.js +5 -4
- package/lib/components/RequestParameters/RequestParameters.d.ts +1 -1
- package/lib/components/RequestParameters/RequestParameters.js +2 -1
- package/lib/components/RequestParameters/index.d.ts +2 -3
- package/lib/components/RequestParameters/index.js +2 -1
- package/lib/components/RequestSamples/CodeSample.d.ts +3 -3
- package/lib/components/RequestSamples/CodeSample.js +3 -2
- package/lib/components/RequestSamples/Example.d.ts +1 -1
- package/lib/components/RequestSamples/Example.js +2 -1
- package/lib/components/RequestSamples/RequestSamples.d.ts +2 -2
- package/lib/components/RequestSamples/RequestSamples.js +6 -5
- package/lib/components/RequestSamples/index.d.ts +2 -2
- package/lib/components/RequestSamples/index.js +2 -1
- package/lib/components/RequestSamples/useCodeSamples.d.ts +3 -3
- package/lib/components/RequestSamples/useCodeSamples.js +2 -1
- package/lib/components/ResponseSamples/ResponseSamples.d.ts +2 -2
- package/lib/components/ResponseSamples/ResponseSamples.js +2 -1
- package/lib/components/ResponseSamples/Summary.js +2 -1
- package/lib/components/ResponseSamples/index.d.ts +1 -1
- package/lib/components/ResponseSamples/index.js +2 -1
- package/lib/components/Responses/OperationResponseList.d.ts +3 -3
- package/lib/components/Responses/OperationResponseList.js +3 -2
- package/lib/components/Responses/ResponseDetails.d.ts +1 -1
- package/lib/components/Responses/ResponseDetails.js +2 -1
- package/lib/components/Responses/ResponseHeaders.d.ts +1 -1
- package/lib/components/Responses/ResponseHeaders.js +2 -1
- package/lib/components/Responses/index.d.ts +3 -5
- package/lib/components/Responses/index.js +2 -1
- package/lib/components/Responses/styled.d.ts +5 -5
- package/lib/components/Responses/styled.js +7 -6
- package/lib/components/Responses/types.d.ts +1 -1
- package/lib/components/Responses/types.js +2 -0
- package/lib/components/RightPanel/RightPanel.d.ts +1 -1
- package/lib/components/RightPanel/RightPanel.js +2 -1
- package/lib/components/RightPanel/index.d.ts +1 -1
- package/lib/components/RightPanel/index.js +2 -1
- package/lib/components/Samples/ExampleSwitch.d.ts +1 -1
- package/lib/components/Samples/ExampleSwitch.js +2 -1
- package/lib/components/Samples/index.d.ts +2 -2
- package/lib/components/Samples/index.js +2 -1
- package/lib/components/Samples/use-example-key.d.ts +1 -1
- package/lib/components/Samples/use-example-key.js +2 -1
- package/lib/components/Schema/ArraySchema.d.ts +1 -1
- package/lib/components/Schema/ArraySchema.js +2 -1
- package/lib/components/Schema/ObjectSchema.d.ts +1 -1
- package/lib/components/Schema/ObjectSchema.js +2 -1
- package/lib/components/Schema/OneOfSchema.d.ts +2 -11
- package/lib/components/Schema/OneOfSchema.js +4 -3
- package/lib/components/Schema/RecursiveSchema.d.ts +1 -1
- package/lib/components/Schema/RecursiveSchema.js +2 -1
- package/lib/components/Schema/Schema.d.ts +1 -1
- package/lib/components/Schema/Schema.js +3 -2
- package/lib/components/Schema/SubSchema.js +2 -1
- package/lib/components/Schema/helpers.d.ts +1 -1
- package/lib/components/Schema/helpers.js +2 -1
- package/lib/components/Schema/index.d.ts +5 -5
- package/lib/components/Schema/index.js +2 -1
- package/lib/components/Schema/types.d.ts +1 -7
- package/lib/components/Schema/types.js +2 -0
- package/lib/components/Schema/useOneOfLocationIdx.d.ts +1 -1
- package/lib/components/Schema/useOneOfLocationIdx.js +2 -1
- package/lib/components/SchemaDefinition/SchemaDefinition.js +3 -2
- package/lib/components/SchemaDefinition/index.d.ts +1 -1
- package/lib/components/SchemaDefinition/index.js +2 -1
- package/lib/components/SectionContent/SectionContent.d.ts +10 -3
- package/lib/components/SectionContent/SectionContent.js +7 -6
- package/lib/components/SectionContent/index.d.ts +1 -1
- package/lib/components/SectionContent/index.js +2 -1
- package/lib/components/SectionItem/SectionItem.d.ts +1 -1
- package/lib/components/SectionItem/SectionItem.js +2 -1
- package/lib/components/SectionItem/index.d.ts +1 -1
- package/lib/components/SectionItem/index.js +2 -1
- package/lib/components/Security/Divider.js +3 -2
- package/lib/components/Security/OAuthFlow.d.ts +1 -1
- package/lib/components/Security/OAuthFlow.js +2 -1
- package/lib/components/Security/OAuthScopes.d.ts +2 -2
- package/lib/components/Security/OAuthScopes.js +10 -9
- package/lib/components/Security/Security.d.ts +1 -1
- package/lib/components/Security/Security.js +2 -1
- package/lib/components/Security/SecurityButton.d.ts +1 -1
- package/lib/components/Security/SecurityButton.js +8 -7
- package/lib/components/Security/SecurityFlow.d.ts +1 -1
- package/lib/components/Security/SecurityFlow.js +5 -4
- package/lib/components/Security/SecurityModal.d.ts +1 -1
- package/lib/components/Security/SecurityModal.js +6 -5
- package/lib/components/Security/SecuritySchemeItem.js +5 -4
- package/lib/components/Security/helper.d.ts +1 -1
- package/lib/components/Security/helper.js +2 -1
- package/lib/components/Security/index.d.ts +1 -10
- package/lib/components/Security/index.js +2 -1
- package/lib/components/Security/styled.d.ts +2 -2
- package/lib/components/Security/styled.js +4 -3
- package/lib/components/SelectOrLabel/SelectOrLabel.d.ts +1 -1
- package/lib/components/SelectOrLabel/SelectOrLabel.js +3 -2
- package/lib/components/SelectOrLabel/index.d.ts +1 -1
- package/lib/components/SelectOrLabel/index.js +2 -1
- package/lib/components/ServerList/ServerList.d.ts +1 -1
- package/lib/components/ServerList/ServerList.js +11 -10
- package/lib/components/ServerList/index.d.ts +1 -1
- package/lib/components/ServerList/index.js +2 -1
- package/lib/components/ServerList/types.d.ts +1 -1
- package/lib/components/ServerList/types.js +2 -0
- package/lib/components/ServerListDropdown/ServerListDropdown.d.ts +1 -1
- package/lib/components/ServerListDropdown/ServerListDropdown.js +2 -1
- package/lib/components/ServerListDropdown/index.d.ts +1 -1
- package/lib/components/ServerListDropdown/index.js +2 -1
- package/lib/components/ServerListDropdown/styled.d.ts +5 -4
- package/lib/components/ServerListDropdown/styled.js +7 -6
- package/lib/components/SideMenu/SideMenu.d.ts +2 -2
- package/lib/components/SideMenu/SideMenu.js +3 -2
- package/lib/components/SideMenu/hooks/useMenuItems.d.ts +2 -2
- package/lib/components/SideMenu/hooks/useMenuItems.js +2 -1
- package/lib/components/SideMenu/index.d.ts +1 -1
- package/lib/components/SideMenu/index.js +2 -1
- package/lib/components/SideMenu/types.d.ts +1 -1
- package/lib/components/SideMenu/types.js +2 -0
- package/lib/components/StickySidebar/SidebarActions.js +3 -2
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +4 -3
- package/lib/components/StickySidebar/index.d.ts +1 -1
- package/lib/components/StickySidebar/index.js +2 -1
- package/lib/components/Tabs/Tabs.d.ts +1 -1
- package/lib/components/Tabs/Tabs.js +6 -5
- package/lib/components/Tabs/index.d.ts +2 -2
- package/lib/components/Tabs/index.js +2 -1
- package/lib/components/Tabs/useTabsState.d.ts +1 -1
- package/lib/components/Tabs/useTabsState.js +2 -1
- package/lib/components/TagItem/OperationNavigationItems.d.ts +1 -1
- package/lib/components/TagItem/OperationNavigationItems.js +5 -4
- package/lib/components/TagItem/OperationsNavigation.d.ts +1 -1
- package/lib/components/TagItem/OperationsNavigation.js +3 -2
- package/lib/components/TagItem/TagItem.d.ts +1 -1
- package/lib/components/TagItem/TagItem.js +8 -7
- package/lib/components/TagItem/index.d.ts +1 -1
- package/lib/components/TagItem/index.js +2 -1
- package/lib/components/TagItem/styled.d.ts +1 -1
- package/lib/components/TagItem/styled.js +3 -2
- package/lib/components/TagItem/types.d.ts +1 -1
- package/lib/components/TagItem/types.js +2 -0
- package/lib/components/ViewNested/ViewNested.js +8 -7
- package/lib/components/ViewNested/index.d.ts +1 -1
- package/lib/components/ViewNested/index.js +2 -1
- package/lib/components/common/Badges.d.ts +7 -3
- package/lib/components/common/Badges.js +5 -4
- package/lib/components/common/BodyContent/BodyContent.d.ts +1 -1
- package/lib/components/common/BodyContent/BodyContent.js +5 -4
- package/lib/components/common/BodyContent/index.d.ts +1 -1
- package/lib/components/common/BodyContent/index.js +2 -1
- package/lib/components/common/ClearButton/ClearButton.d.ts +1 -1
- package/lib/components/common/ClearButton/ClearButton.js +2 -1
- package/lib/components/common/ClearButton/index.d.ts +2 -2
- package/lib/components/common/ClearButton/index.js +2 -1
- package/lib/components/common/ClearButton/styled.d.ts +1 -1
- package/lib/components/common/ClearButton/styled.js +3 -2
- package/lib/components/common/ClearButton/types.js +2 -0
- package/lib/components/common/CodeBlockPanel.d.ts +2 -1
- package/lib/components/common/CodeBlockPanel.js +4 -3
- package/lib/components/common/ConstraintsView.js +3 -2
- package/lib/components/common/Dropdown/Dropdown.js +5 -4
- package/lib/components/common/Dropdown/index.d.ts +2 -2
- package/lib/components/common/Dropdown/index.js +2 -1
- package/lib/components/common/ExpandableExample/ExpandableExample.js +4 -3
- package/lib/components/common/ExpandableExample/index.d.ts +1 -1
- package/lib/components/common/ExpandableExample/index.js +2 -1
- package/lib/components/common/Extensions.js +3 -2
- package/lib/components/common/Fields/fields-layout.d.ts +14 -8
- package/lib/components/common/Fields/fields-layout.js +50 -57
- package/lib/components/common/Fields/fields.d.ts +38 -17
- package/lib/components/common/Fields/fields.js +18 -17
- package/lib/components/common/Fields/index.d.ts +2 -2
- package/lib/components/common/Fields/index.js +2 -1
- package/lib/components/common/LinkToField.d.ts +5 -2
- package/lib/components/common/LinkToField.js +7 -6
- package/lib/components/common/OperationItemTitle.d.ts +2 -2
- package/lib/components/common/OperationItemTitle.js +6 -5
- package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +1 -1
- package/lib/components/common/SchemaSelection/SchemaSelection.js +2 -1
- package/lib/components/common/SchemaSelection/index.d.ts +1 -1
- package/lib/components/common/SchemaSelection/index.js +2 -1
- package/lib/components/common/Select/Select.d.ts +1 -1
- package/lib/components/common/Select/Select.js +2 -1
- package/lib/components/common/Select/index.d.ts +2 -2
- package/lib/components/common/Select/index.js +2 -1
- package/lib/components/common/Select/styled.d.ts +22 -4
- package/lib/components/common/Select/styled.js +13 -12
- package/lib/components/common/Select/types.js +2 -0
- package/lib/components/common/Skeleton/LanguageListSkeleton.js +7 -6
- package/lib/components/common/Skeleton/Skeleton.d.ts +3 -1
- package/lib/components/common/Skeleton/Skeleton.js +6 -5
- package/lib/components/common/Skeleton/index.d.ts +1 -2
- package/lib/components/common/Skeleton/index.js +2 -1
- package/lib/components/common/headers.d.ts +1 -1
- package/lib/components/common/headers.js +3 -2
- package/lib/components/common/index.d.ts +14 -14
- package/lib/components/common/index.js +2 -1
- package/lib/components/common/linkify.d.ts +1 -1
- package/lib/components/common/linkify.js +5 -4
- package/lib/components/common/mixins.js +3 -2
- package/lib/components/common/panels.d.ts +17 -4
- package/lib/components/common/panels.js +28 -27
- package/lib/components/common/schema.d.ts +7 -4
- package/lib/components/common/schema.js +9 -8
- package/lib/components/common/styled.d.ts +7 -6
- package/lib/components/common/styled.js +8 -7
- package/lib/components/index.d.ts +23 -23
- package/lib/components/index.js +2 -1
- package/lib/components/pluggable/RedocExample.d.ts +1 -1
- package/lib/components/pluggable/RedocExample.js +2 -1
- package/lib/components/pluggable/RedocSchema.d.ts +2 -4
- package/lib/components/pluggable/RedocSchema.js +2 -1
- package/lib/components/pluggable/index.d.ts +2 -2
- package/lib/components/pluggable/index.js +2 -1
- package/lib/components/pluggable/styled.components.d.ts +7 -3
- package/lib/components/pluggable/styled.components.js +5 -4
- package/lib/constants.js +2 -1
- package/lib/empty.d.ts +2 -5
- package/lib/empty.js +2 -1
- package/lib/events/codeSampleCopy.d.ts +1 -1
- package/lib/events/codeSampleCopy.js +2 -1
- package/lib/events/creator.d.ts +1 -1
- package/lib/events/creator.js +2 -1
- package/lib/events/index.d.ts +8 -8
- package/lib/events/index.js +2 -1
- package/lib/events/languageSwitch.d.ts +1 -1
- package/lib/events/languageSwitch.js +2 -1
- package/lib/events/panelToggle.d.ts +1 -1
- package/lib/events/panelToggle.js +2 -1
- package/lib/events/serverSwitch.d.ts +1 -1
- package/lib/events/serverSwitch.js +2 -1
- package/lib/events/tryItOpen.d.ts +1 -1
- package/lib/events/tryItOpen.js +2 -1
- package/lib/events/tryItSent.d.ts +1 -1
- package/lib/events/tryItSent.js +2 -1
- package/lib/events/types.d.ts +1 -1
- package/lib/events/types.js +2 -1
- package/lib/hoc/types.d.ts +3 -3
- package/lib/hoc/types.js +2 -0
- package/lib/hoc/utils.js +2 -1
- package/lib/hoc/withRouter.d.ts +1 -1
- package/lib/hoc/withRouter.js +2 -1
- package/lib/hoc/withStore.d.ts +1 -1
- package/lib/hoc/withStore.js +2 -1
- package/lib/hooks/index.d.ts +8 -8
- package/lib/hooks/index.js +2 -1
- package/lib/hooks/useActivateExample.d.ts +1 -1
- package/lib/hooks/useActivateExample.js +2 -1
- package/lib/hooks/useActiveWithFallback.js +2 -1
- package/lib/hooks/useContentItems.d.ts +2 -2
- package/lib/hooks/useContentItems.js +2 -1
- package/lib/hooks/useLicense.d.ts +1 -1
- package/lib/hooks/useLicense.js +2 -1
- package/lib/hooks/usePerformanceMetrics.js +2 -1
- package/lib/hooks/useRouter.d.ts +1 -1
- package/lib/hooks/useRouter.js +2 -1
- package/lib/hooks/useTelemetry.js +2 -1
- package/lib/hooks/useTranslate.js +2 -1
- package/lib/hooks/useUppercase2LowercaseRedirect.js +2 -1
- package/lib/icons/CSharpIcon/CSharpIcon.d.ts +3 -1
- package/lib/icons/CSharpIcon/CSharpIcon.js +2 -1
- package/lib/icons/CSharpIcon/index.d.ts +1 -1
- package/lib/icons/CSharpIcon/index.js +2 -1
- package/lib/icons/CurlIcon/CurlIcon.d.ts +3 -1
- package/lib/icons/CurlIcon/CurlIcon.js +3 -2
- package/lib/icons/CurlIcon/index.d.ts +1 -1
- package/lib/icons/CurlIcon/index.js +2 -1
- package/lib/icons/GOIcon/GOIcon.d.ts +3 -1
- package/lib/icons/GOIcon/GOIcon.js +2 -1
- package/lib/icons/GOIcon/index.d.ts +1 -1
- package/lib/icons/GOIcon/index.js +2 -1
- package/lib/icons/JavaIcon/JavaIcon.d.ts +3 -1
- package/lib/icons/JavaIcon/JavaIcon.js +2 -1
- package/lib/icons/JavaIcon/index.d.ts +1 -1
- package/lib/icons/JavaIcon/index.js +2 -1
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +3 -1
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +2 -1
- package/lib/icons/JavaScriptIcon/index.d.ts +1 -1
- package/lib/icons/JavaScriptIcon/index.js +2 -1
- package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +3 -1
- package/lib/icons/NodeJSIcon/NodeJSIcon.js +2 -1
- package/lib/icons/NodeJSIcon/index.d.ts +1 -1
- package/lib/icons/NodeJSIcon/index.js +2 -1
- package/lib/icons/PHPIcon/PHPIcon.d.ts +3 -1
- package/lib/icons/PHPIcon/PHPIcon.js +2 -1
- package/lib/icons/PHPIcon/index.d.ts +1 -1
- package/lib/icons/PHPIcon/index.js +2 -1
- package/lib/icons/PayloadIcon/PayloadIcon.d.ts +3 -1
- package/lib/icons/PayloadIcon/PayloadIcon.js +2 -1
- package/lib/icons/PayloadIcon/index.d.ts +1 -1
- package/lib/icons/PayloadIcon/index.js +2 -1
- package/lib/icons/PythonIcon/PythonIcon.d.ts +3 -1
- package/lib/icons/PythonIcon/PythonIcon.js +2 -1
- package/lib/icons/PythonIcon/index.d.ts +1 -1
- package/lib/icons/PythonIcon/index.js +2 -1
- package/lib/icons/RIcon/RIcon.d.ts +3 -1
- package/lib/icons/RIcon/RIcon.js +2 -1
- package/lib/icons/RIcon/index.d.ts +1 -1
- package/lib/icons/RIcon/index.js +2 -1
- package/lib/icons/RubyIcon/RubyIcon.d.ts +3 -1
- package/lib/icons/RubyIcon/RubyIcon.js +2 -1
- package/lib/icons/RubyIcon/index.d.ts +1 -1
- package/lib/icons/RubyIcon/index.js +2 -1
- package/lib/index.d.ts +43 -52
- package/lib/index.js +2 -1
- package/lib/jotai/app.d.ts +2 -2
- package/lib/jotai/app.js +2 -1
- package/lib/jotai/operation.js +2 -1
- package/lib/jotai/replay.d.ts +1 -1
- package/lib/jotai/replay.js +2 -1
- package/lib/jotai/store.d.ts +1 -1
- package/lib/jotai/store.js +2 -1
- package/lib/jotai/use-write-atom.js +2 -1
- package/lib/models/callback.d.ts +3 -3
- package/lib/models/callback.js +2 -1
- package/lib/models/code-sample-options.d.ts +2 -2
- package/lib/models/code-sample-options.js +2 -0
- package/lib/models/example.d.ts +3 -3
- package/lib/models/example.js +2 -1
- package/lib/models/field.d.ts +3 -3
- package/lib/models/field.js +2 -1
- package/lib/models/group.d.ts +3 -3
- package/lib/models/group.js +2 -1
- package/lib/models/index.d.ts +15 -15
- package/lib/models/index.js +2 -1
- package/lib/models/mediaContent.d.ts +2 -2
- package/lib/models/mediaContent.js +2 -1
- package/lib/models/mediaType.d.ts +3 -3
- package/lib/models/mediaType.js +2 -1
- package/lib/models/operation.d.ts +3 -3
- package/lib/models/operation.js +2 -1
- package/lib/models/request.d.ts +3 -3
- package/lib/models/request.js +2 -1
- package/lib/models/response.d.ts +3 -3
- package/lib/models/response.js +2 -1
- package/lib/models/schema.d.ts +3 -3
- package/lib/models/schema.js +2 -2
- package/lib/models/security.d.ts +3 -3
- package/lib/models/security.js +2 -1
- package/lib/models/tab.js +2 -0
- package/lib/models/types.d.ts +4 -4
- package/lib/models/types.js +2 -0
- package/lib/services/OpenAPIParser.d.ts +3 -3
- package/lib/services/OpenAPIParser.js +2 -1
- package/lib/services/check.js +2 -1
- package/lib/services/code-samples/constants.d.ts +1 -1
- package/lib/services/code-samples/constants.js +2 -1
- package/lib/services/code-samples/generator.d.ts +3 -3
- package/lib/services/code-samples/generator.js +2 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.js +2 -3
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +2 -2
- package/lib/services/code-samples/httpsnippet/helpers/constants.js +2 -1
- package/lib/services/code-samples/httpsnippet/helpers/lodash-int.js +2 -1
- package/lib/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +2 -37
- package/lib/services/code-samples/httpsnippet/helpers/reducer.js +2 -1
- package/lib/services/code-samples/httpsnippet/helpers/shell.js +2 -1
- package/lib/services/code-samples/httpsnippet/helpers/string-utility.js +2 -1
- package/lib/services/code-samples/httpsnippet/index.d.ts +6 -12
- package/lib/services/code-samples/httpsnippet/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/__mocks__/mock.js +2 -146
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +2 -2
- package/lib/services/code-samples/httpsnippet/targets/csharp/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/csharp/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +2 -2
- package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/go/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/go/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/go/native.js +2 -3
- package/lib/services/code-samples/httpsnippet/targets/index.d.ts +12 -12
- package/lib/services/code-samples/httpsnippet/targets/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +2 -3
- package/lib/services/code-samples/httpsnippet/targets/java/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/java/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +2 -2
- package/lib/services/code-samples/httpsnippet/targets/java8/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/java8/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/node/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/node/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/php/curl.js +2 -5
- package/lib/services/code-samples/httpsnippet/targets/php/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/php/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/php/types.js +2 -0
- package/lib/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/php/utils.js +2 -5
- package/lib/services/code-samples/httpsnippet/targets/python/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/python/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/python/requests.js +2 -6
- package/lib/services/code-samples/httpsnippet/targets/r/httr.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/r/httr.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/r/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/r/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/r/utils.d.ts +3 -3
- package/lib/services/code-samples/httpsnippet/targets/r/utils.js +2 -6
- package/lib/services/code-samples/httpsnippet/targets/ruby/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/ruby/index.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/ruby/native.js +2 -1
- package/lib/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/shell/curl.js +2 -6
- package/lib/services/code-samples/httpsnippet/targets/shell/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/shell/index.js +2 -1
- package/lib/services/code-samples/index.d.ts +2 -2
- package/lib/services/code-samples/index.js +2 -1
- package/lib/services/code-samples/types.js +2 -0
- package/lib/services/config-options/helpers.js +2 -1
- package/lib/services/config-options/index.d.ts +2 -2
- package/lib/services/config-options/index.js +2 -1
- package/lib/services/config-options/normalizeOptions.d.ts +1 -1
- package/lib/services/config-options/normalizeOptions.js +2 -1
- package/lib/services/config-options/types.d.ts +5 -5
- package/lib/services/config-options/types.js +2 -0
- package/lib/services/history/helpers.d.ts +1 -1
- package/lib/services/history/helpers.js +2 -1
- package/lib/services/history/index.d.ts +1 -1
- package/lib/services/history/index.js +2 -1
- package/lib/services/index.d.ts +8 -8
- package/lib/services/index.js +2 -1
- package/lib/services/menu/builder.d.ts +3 -3
- package/lib/services/menu/builder.js +2 -1
- package/lib/services/menu/index.d.ts +1 -1
- package/lib/services/menu/index.js +2 -1
- package/lib/services/menu/markdown.d.ts +1 -1
- package/lib/services/menu/markdown.js +2 -1
- package/lib/services/menu/operation.d.ts +2 -2
- package/lib/services/menu/operation.js +2 -1
- package/lib/services/menu/tags.d.ts +5 -5
- package/lib/services/menu/tags.js +2 -1
- package/lib/services/types.d.ts +1 -1
- package/lib/services/types.js +2 -0
- package/lib/services/utils.js +2 -1
- package/lib/standalone.d.ts +19 -4
- package/lib/standalone.js +2 -1
- package/lib/types/app.js +2 -0
- package/lib/types/index.d.ts +3 -3
- package/lib/types/index.js +2 -1
- package/lib/types/open-api.js +2 -0
- package/lib/types/security.js +2 -0
- package/lib/utils/JsonPointer.js +2 -1
- package/lib/utils/areArraysEqual.js +2 -1
- package/lib/utils/argValuesHelpers.js +2 -1
- package/lib/utils/compose.js +2 -1
- package/lib/utils/configure-helpers.d.ts +1 -1
- package/lib/utils/configure-helpers.js +2 -1
- package/lib/utils/cookies.js +2 -1
- package/lib/utils/createParsedDocument.d.ts +2 -0
- package/lib/utils/createParsedDocument.js +2 -0
- package/lib/utils/debounce.js +2 -1
- package/lib/utils/debug.js +2 -1
- package/lib/utils/dom.js +2 -1
- package/lib/utils/environments.d.ts +1 -1
- package/lib/utils/environments.js +2 -1
- package/lib/utils/helpers.js +2 -12
- package/lib/utils/index.d.ts +23 -23
- package/lib/utils/index.js +2 -1
- package/lib/utils/isMobile.js +2 -1
- package/lib/utils/loadAndBundleSpec.d.ts +3 -2
- package/lib/utils/loadAndBundleSpec.js +2 -1
- package/lib/utils/local-storage.js +2 -1
- package/lib/utils/object.js +2 -1
- package/lib/utils/openapi.d.ts +4 -4
- package/lib/utils/openapi.js +2 -1
- package/lib/utils/parameters.js +2 -1
- package/lib/utils/path.js +2 -1
- package/lib/utils/queryString.js +2 -1
- package/lib/utils/replaceVariables.d.ts +1 -1
- package/lib/utils/replaceVariables.js +2 -1
- package/lib/utils/saveTextBeforeHeading.js +2 -1
- package/lib/utils/security-details.d.ts +1 -1
- package/lib/utils/security-details.js +2 -1
- package/lib/utils/session-storage.js +2 -1
- package/lib/utils/simplifyAstStructure.js +2 -1
- package/lib/utils/sort.js +2 -1
- package/lib/utils/string.js +2 -1
- package/lib/utils/test-utils.js +2 -1
- package/lib/utils/theme-helpers.js +4 -3
- package/lib-esm/components/ApiInfo/ApiInfo.d.ts +7 -0
- package/lib-esm/components/ApiInfo/ApiInfo.js +2 -0
- package/lib-esm/components/ApiInfo/Metadata.d.ts +9 -0
- package/lib-esm/components/ApiInfo/Metadata.js +2 -0
- package/lib-esm/components/ApiInfo/index.d.ts +1 -0
- package/lib-esm/components/ApiInfo/index.js +2 -0
- package/lib-esm/components/ApiInfo/styled.d.ts +4 -0
- package/lib-esm/components/ApiInfo/styled.js +27 -0
- package/lib-esm/components/CallbackSamples/CallbackSamples.d.ts +7 -0
- package/lib-esm/components/CallbackSamples/CallbackSamples.js +16 -0
- package/lib-esm/components/CallbackSamples/index.d.ts +1 -0
- package/lib-esm/components/CallbackSamples/index.js +2 -0
- package/lib-esm/components/Callbacks/CallbackDetails.d.ts +7 -0
- package/lib-esm/components/Callbacks/CallbackDetails.js +20 -0
- package/lib-esm/components/Callbacks/CallbackOperation.d.ts +8 -0
- package/lib-esm/components/Callbacks/CallbackOperation.js +15 -0
- package/lib-esm/components/Callbacks/CallbackSummary.d.ts +8 -0
- package/lib-esm/components/Callbacks/CallbackSummary.js +19 -0
- package/lib-esm/components/Callbacks/CallbacksList.d.ts +7 -0
- package/lib-esm/components/Callbacks/CallbacksList.js +2 -0
- package/lib-esm/components/Callbacks/index.d.ts +3 -0
- package/lib-esm/components/Callbacks/index.js +2 -0
- package/lib-esm/components/Callbacks/styled.d.ts +3 -0
- package/lib-esm/components/Callbacks/styled.js +8 -0
- package/lib-esm/components/Content/Content.d.ts +7 -0
- package/lib-esm/components/Content/Content.js +2 -0
- package/lib-esm/components/Content/index.d.ts +1 -0
- package/lib-esm/components/Content/index.js +2 -0
- package/lib-esm/components/Content/useAutoScroll.d.ts +3 -0
- package/lib-esm/components/Content/useAutoScroll.js +2 -0
- package/lib-esm/components/ContentItem/ContentItem.d.ts +11 -0
- package/lib-esm/components/ContentItem/ContentItem.js +2 -0
- package/lib-esm/components/ContentItem/index.d.ts +1 -0
- package/lib-esm/components/ContentItem/index.js +2 -0
- package/lib-esm/components/ContentItem/useIsExpanded.d.ts +5 -0
- package/lib-esm/components/ContentItem/useIsExpanded.js +2 -0
- package/lib-esm/components/ContentItems/ContentItems.d.ts +8 -0
- package/lib-esm/components/ContentItems/ContentItems.js +2 -0
- package/lib-esm/components/ContentItems/Items.d.ts +7 -0
- package/lib-esm/components/ContentItems/Items.js +2 -0
- package/lib-esm/components/ContentItems/VirtualList.d.ts +7 -0
- package/lib-esm/components/ContentItems/VirtualList.js +2 -0
- package/lib-esm/components/ContentItems/helpers.d.ts +10 -0
- package/lib-esm/components/ContentItems/helpers.js +2 -0
- package/lib-esm/components/ContentItems/index.d.ts +1 -0
- package/lib-esm/components/ContentItems/index.js +2 -0
- package/lib-esm/components/ContentItems/useScrollOnRender.d.ts +3 -0
- package/lib-esm/components/ContentItems/useScrollOnRender.js +2 -0
- package/lib-esm/components/Discriminator/Discriminator.d.ts +10 -0
- package/lib-esm/components/Discriminator/Discriminator.js +6 -0
- package/lib-esm/components/Discriminator/index.d.ts +1 -0
- package/lib-esm/components/Discriminator/index.js +2 -0
- package/lib-esm/components/Download/DownloadSpecification.d.ts +4 -0
- package/lib-esm/components/Download/DownloadSpecification.js +40 -0
- package/lib-esm/components/Download/index.d.ts +1 -0
- package/lib-esm/components/Download/index.js +2 -0
- package/lib-esm/components/Download/types.d.ts +15 -0
- package/lib-esm/components/Download/types.js +2 -0
- package/lib-esm/components/Download/useDownloadInfo.d.ts +2 -0
- package/lib-esm/components/Download/useDownloadInfo.js +2 -0
- package/lib-esm/components/ErrorBoundary/ErrorBoundary.d.ts +9 -0
- package/lib-esm/components/ErrorBoundary/ErrorBoundary.js +5 -0
- package/lib-esm/components/ErrorBoundary/index.d.ts +1 -0
- package/lib-esm/components/ErrorBoundary/index.js +2 -0
- package/lib-esm/components/ExpandAllButton/ExpandAllButton.d.ts +8 -0
- package/lib-esm/components/ExpandAllButton/ExpandAllButton.js +4 -0
- package/lib-esm/components/ExpandAllButton/index.d.ts +1 -0
- package/lib-esm/components/ExpandAllButton/index.js +2 -0
- package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.d.ts +7 -0
- package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.js +5 -0
- package/lib-esm/components/ExternalDocumentation/index.d.ts +1 -0
- package/lib-esm/components/ExternalDocumentation/index.js +2 -0
- package/lib-esm/components/Language/LanguageDropdown.d.ts +15 -0
- package/lib-esm/components/Language/LanguageDropdown.js +2 -0
- package/lib-esm/components/Language/LanguageItem.d.ts +11 -0
- package/lib-esm/components/Language/LanguageItem.js +2 -0
- package/lib-esm/components/Language/LanguageList.d.ts +10 -0
- package/lib-esm/components/Language/LanguageList.js +2 -0
- package/lib-esm/components/Language/_tests_/LanguageDropdown.test.d.ts +1 -0
- package/lib-esm/components/Language/_tests_/LanguageDropdown.test.js +2 -0
- package/lib-esm/components/Language/constants.d.ts +2 -0
- package/lib-esm/components/Language/constants.js +2 -0
- package/lib-esm/components/Language/index.d.ts +3 -0
- package/lib-esm/components/Language/index.js +2 -0
- package/lib-esm/components/Language/styled.d.ts +31 -0
- package/lib-esm/components/Language/styled.js +82 -0
- package/lib-esm/components/Markdown/Markdown.d.ts +3 -0
- package/lib-esm/components/Markdown/Markdown.js +2 -0
- package/lib-esm/components/Markdown/index.d.ts +2 -0
- package/lib-esm/components/Markdown/index.js +2 -0
- package/lib-esm/components/Markdown/types.d.ts +10 -0
- package/lib-esm/components/Markdown/types.js +2 -0
- package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +11 -0
- package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.js +2 -0
- package/lib-esm/components/MediaTypeSwitch/index.d.ts +1 -0
- package/lib-esm/components/MediaTypeSwitch/index.js +2 -0
- package/lib-esm/components/OperationItem/Description.d.ts +10 -0
- package/lib-esm/components/OperationItem/Description.js +2 -0
- package/lib-esm/components/OperationItem/OperationItem.d.ts +5 -0
- package/lib-esm/components/OperationItem/OperationItem.js +22 -0
- package/lib-esm/components/OperationItem/_tests_/OperationItem.test.d.ts +1 -0
- package/lib-esm/components/OperationItem/_tests_/OperationItem.test.js +2 -0
- package/lib-esm/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.d.ts +15 -0
- package/lib-esm/components/OperationItem/_tests_/__mocks__/mock-intersection-observer.js +2 -0
- package/lib-esm/components/OperationItem/index.d.ts +2 -0
- package/lib-esm/components/OperationItem/index.js +2 -0
- package/lib-esm/components/OperationItem/types.d.ts +4 -0
- package/lib-esm/components/OperationItem/types.js +2 -0
- package/lib-esm/components/Overlay.d.ts +6 -0
- package/lib-esm/components/Overlay.js +43 -0
- package/lib-esm/components/Overview/Overview.d.ts +9 -0
- package/lib-esm/components/Overview/Overview.js +2 -0
- package/lib-esm/components/Overview/index.d.ts +1 -0
- package/lib-esm/components/Overview/index.js +2 -0
- package/lib-esm/components/PageFooter/PageFooter.d.ts +2 -0
- package/lib-esm/components/PageFooter/PageFooter.js +2 -0
- package/lib-esm/components/PageFooter/index.d.ts +1 -0
- package/lib-esm/components/PageFooter/index.js +2 -0
- package/lib-esm/components/Panel/ResponsePanel.d.ts +3 -0
- package/lib-esm/components/Panel/ResponsePanel.js +25 -0
- package/lib-esm/components/Panel/Trigger.d.ts +1 -0
- package/lib-esm/components/Panel/Trigger.js +8 -0
- package/lib-esm/components/Panel/index.d.ts +2 -0
- package/lib-esm/components/Panel/index.js +2 -0
- package/lib-esm/components/PanelItem/PanelItem.d.ts +9 -0
- package/lib-esm/components/PanelItem/PanelItem.js +2 -0
- package/lib-esm/components/PanelItem/index.d.ts +2 -0
- package/lib-esm/components/PanelItem/index.js +2 -0
- package/lib-esm/components/PanelItem/styled.d.ts +16 -0
- package/lib-esm/components/PanelItem/styled.js +53 -0
- package/lib-esm/components/PayloadSamples/Example.d.ts +3 -0
- package/lib-esm/components/PayloadSamples/Example.js +2 -0
- package/lib-esm/components/PayloadSamples/ExampleValue.d.ts +2 -0
- package/lib-esm/components/PayloadSamples/ExampleValue.js +2 -0
- package/lib-esm/components/PayloadSamples/MediaTypeSamples.d.ts +2 -0
- package/lib-esm/components/PayloadSamples/MediaTypeSamples.js +4 -0
- package/lib-esm/components/PayloadSamples/PayloadSamples.d.ts +2 -0
- package/lib-esm/components/PayloadSamples/PayloadSamples.js +2 -0
- package/lib-esm/components/PayloadSamples/index.d.ts +5 -0
- package/lib-esm/components/PayloadSamples/index.js +2 -0
- package/lib-esm/components/PayloadSamples/styled.d.ts +4 -0
- package/lib-esm/components/PayloadSamples/styled.js +22 -0
- package/lib-esm/components/PayloadSamples/types.d.ts +25 -0
- package/lib-esm/components/PayloadSamples/types.js +2 -0
- package/lib-esm/components/PropertyDetails/DescriptionEnums.d.ts +4 -0
- package/lib-esm/components/PropertyDetails/DescriptionEnums.js +10 -0
- package/lib-esm/components/PropertyDetails/EnumValues.d.ts +2 -0
- package/lib-esm/components/PropertyDetails/EnumValues.js +2 -0
- package/lib-esm/components/PropertyDetails/Examples.d.ts +5 -0
- package/lib-esm/components/PropertyDetails/Examples.js +2 -0
- package/lib-esm/components/PropertyDetails/Extensions.d.ts +2 -0
- package/lib-esm/components/PropertyDetails/Extensions.js +4 -0
- package/lib-esm/components/PropertyDetails/FieldDetail.d.ts +7 -0
- package/lib-esm/components/PropertyDetails/FieldDetail.js +8 -0
- package/lib-esm/components/PropertyDetails/FieldDetails.d.ts +2 -0
- package/lib-esm/components/PropertyDetails/FieldDetails.js +40 -0
- package/lib-esm/components/PropertyDetails/Pattern.d.ts +6 -0
- package/lib-esm/components/PropertyDetails/Pattern.js +2 -0
- package/lib-esm/components/PropertyDetails/PlusCircleIcon.d.ts +7 -0
- package/lib-esm/components/PropertyDetails/PlusCircleIcon.js +11 -0
- package/lib-esm/components/PropertyDetails/PropertyDetails.d.ts +2 -0
- package/lib-esm/components/PropertyDetails/PropertyDetails.js +18 -0
- package/lib-esm/components/PropertyDetails/SchemaTypeInfo.d.ts +6 -0
- package/lib-esm/components/PropertyDetails/SchemaTypeInfo.js +16 -0
- package/lib-esm/components/PropertyDetails/SimpleEnums.d.ts +4 -0
- package/lib-esm/components/PropertyDetails/SimpleEnums.js +8 -0
- package/lib-esm/components/PropertyDetails/cycleColorsByLevel.d.ts +1 -0
- package/lib-esm/components/PropertyDetails/cycleColorsByLevel.js +2 -0
- package/lib-esm/components/PropertyDetails/index.d.ts +3 -0
- package/lib-esm/components/PropertyDetails/index.js +2 -0
- package/lib-esm/components/PropertyDetails/styled.d.ts +6 -0
- package/lib-esm/components/PropertyDetails/styled.js +23 -0
- package/lib-esm/components/PropertyDetails/types.d.ts +47 -0
- package/lib-esm/components/PropertyDetails/types.js +2 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/Providers.d.ts +4 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/Providers.js +2 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +4 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +2 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/index.d.ts +4 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/index.js +2 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.d.ts +1 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +22 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/types.d.ts +47 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/types.js +2 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/utils.d.ts +8 -0
- package/lib-esm/components/RedoclyOpenAPIDocs/utils.js +2 -0
- package/lib-esm/components/RenderHook/RenderHook.d.ts +8 -0
- package/lib-esm/components/RenderHook/RenderHook.js +2 -0
- package/lib-esm/components/RenderHook/index.d.ts +1 -0
- package/lib-esm/components/RenderHook/index.js +2 -0
- package/lib-esm/components/Replay/EmbeddedReplay.d.ts +9 -0
- package/lib-esm/components/Replay/EmbeddedReplay.js +11 -0
- package/lib-esm/components/Replay/Replay.d.ts +9 -0
- package/lib-esm/components/Replay/Replay.js +2 -0
- package/lib-esm/components/Replay/index.d.ts +2 -0
- package/lib-esm/components/Replay/index.js +2 -0
- package/lib-esm/components/Replay/utils.d.ts +42 -0
- package/lib-esm/components/Replay/utils.js +2 -0
- package/lib-esm/components/Request/RequestDetails.d.ts +2 -0
- package/lib-esm/components/Request/RequestDetails.js +4 -0
- package/lib-esm/components/Request/types.d.ts +10 -0
- package/lib-esm/components/Request/types.js +2 -0
- package/lib-esm/components/RequestParameters/Body.d.ts +9 -0
- package/lib-esm/components/RequestParameters/Body.js +2 -0
- package/lib-esm/components/RequestParameters/ParametersGroup.d.ts +8 -0
- package/lib-esm/components/RequestParameters/ParametersGroup.js +21 -0
- package/lib-esm/components/RequestParameters/RequestParameters.d.ts +9 -0
- package/lib-esm/components/RequestParameters/RequestParameters.js +2 -0
- package/lib-esm/components/RequestParameters/index.d.ts +2 -0
- package/lib-esm/components/RequestParameters/index.js +2 -0
- package/lib-esm/components/RequestSamples/CodeSample.d.ts +16 -0
- package/lib-esm/components/RequestSamples/CodeSample.js +10 -0
- package/lib-esm/components/RequestSamples/Example.d.ts +9 -0
- package/lib-esm/components/RequestSamples/Example.js +2 -0
- package/lib-esm/components/RequestSamples/RequestSamples.d.ts +10 -0
- package/lib-esm/components/RequestSamples/RequestSamples.js +13 -0
- package/lib-esm/components/RequestSamples/index.d.ts +2 -0
- package/lib-esm/components/RequestSamples/index.js +2 -0
- package/lib-esm/components/RequestSamples/useCodeSamples.d.ts +10 -0
- package/lib-esm/components/RequestSamples/useCodeSamples.js +2 -0
- package/lib-esm/components/ResponseSamples/ResponseSamples.d.ts +12 -0
- package/lib-esm/components/ResponseSamples/ResponseSamples.js +2 -0
- package/lib-esm/components/ResponseSamples/Summary.d.ts +5 -0
- package/lib-esm/components/ResponseSamples/Summary.js +2 -0
- package/lib-esm/components/ResponseSamples/index.d.ts +1 -0
- package/lib-esm/components/ResponseSamples/index.js +2 -0
- package/lib-esm/components/Responses/OperationResponseList.d.ts +16 -0
- package/lib-esm/components/Responses/OperationResponseList.js +5 -0
- package/lib-esm/components/Responses/ResponseDetails.d.ts +2 -0
- package/lib-esm/components/Responses/ResponseDetails.js +2 -0
- package/lib-esm/components/Responses/ResponseHeaders.d.ts +2 -0
- package/lib-esm/components/Responses/ResponseHeaders.js +2 -0
- package/lib-esm/components/Responses/index.d.ts +3 -0
- package/lib-esm/components/Responses/index.js +2 -0
- package/lib-esm/components/Responses/styled.d.ts +5 -0
- package/lib-esm/components/Responses/styled.js +23 -0
- package/lib-esm/components/Responses/types.d.ts +13 -0
- package/lib-esm/components/Responses/types.js +2 -0
- package/lib-esm/components/RightPanel/RightPanel.d.ts +5 -0
- package/lib-esm/components/RightPanel/RightPanel.js +2 -0
- package/lib-esm/components/RightPanel/index.d.ts +1 -0
- package/lib-esm/components/RightPanel/index.js +2 -0
- package/lib-esm/components/Samples/ExampleSwitch.d.ts +14 -0
- package/lib-esm/components/Samples/ExampleSwitch.js +2 -0
- package/lib-esm/components/Samples/index.d.ts +2 -0
- package/lib-esm/components/Samples/index.js +2 -0
- package/lib-esm/components/Samples/use-example-key.d.ts +6 -0
- package/lib-esm/components/Samples/use-example-key.js +2 -0
- package/lib-esm/components/Schema/ArraySchema.d.ts +2 -0
- package/lib-esm/components/Schema/ArraySchema.js +2 -0
- package/lib-esm/components/Schema/ObjectSchema.d.ts +2 -0
- package/lib-esm/components/Schema/ObjectSchema.js +2 -0
- package/lib-esm/components/Schema/OneOfSchema.d.ts +2 -0
- package/lib-esm/components/Schema/OneOfSchema.js +11 -0
- package/lib-esm/components/Schema/RecursiveSchema.d.ts +2 -0
- package/lib-esm/components/Schema/RecursiveSchema.js +2 -0
- package/lib-esm/components/Schema/Schema.d.ts +2 -0
- package/lib-esm/components/Schema/Schema.js +6 -0
- package/lib-esm/components/Schema/SubSchema.d.ts +14 -0
- package/lib-esm/components/Schema/SubSchema.js +2 -0
- package/lib-esm/components/Schema/helpers.d.ts +5 -0
- package/lib-esm/components/Schema/helpers.js +2 -0
- package/lib-esm/components/Schema/index.d.ts +5 -0
- package/lib-esm/components/Schema/index.js +2 -0
- package/lib-esm/components/Schema/types.d.ts +38 -0
- package/lib-esm/components/Schema/types.js +2 -0
- package/lib-esm/components/Schema/useOneOfLocationIdx.d.ts +2 -0
- package/lib-esm/components/Schema/useOneOfLocationIdx.js +2 -0
- package/lib-esm/components/SchemaDefinition/SchemaDefinition.d.ts +8 -0
- package/lib-esm/components/SchemaDefinition/SchemaDefinition.js +4 -0
- package/lib-esm/components/SchemaDefinition/index.d.ts +1 -0
- package/lib-esm/components/SchemaDefinition/index.js +2 -0
- package/lib-esm/components/SectionContent/SectionContent.d.ts +17 -0
- package/lib-esm/components/SectionContent/SectionContent.js +14 -0
- package/lib-esm/components/SectionContent/index.d.ts +1 -0
- package/lib-esm/components/SectionContent/index.js +2 -0
- package/lib-esm/components/SectionItem/SectionItem.d.ts +7 -0
- package/lib-esm/components/SectionItem/SectionItem.js +2 -0
- package/lib-esm/components/SectionItem/index.d.ts +1 -0
- package/lib-esm/components/SectionItem/index.js +2 -0
- package/lib-esm/components/Security/Divider.d.ts +3 -0
- package/lib-esm/components/Security/Divider.js +15 -0
- package/lib-esm/components/Security/OAuthFlow.d.ts +6 -0
- package/lib-esm/components/Security/OAuthFlow.js +2 -0
- package/lib-esm/components/Security/OAuthScopes.d.ts +13 -0
- package/lib-esm/components/Security/OAuthScopes.js +34 -0
- package/lib-esm/components/Security/Security.d.ts +7 -0
- package/lib-esm/components/Security/Security.js +2 -0
- package/lib-esm/components/Security/SecurityButton.d.ts +10 -0
- package/lib-esm/components/Security/SecurityButton.js +31 -0
- package/lib-esm/components/Security/SecurityFlow.d.ts +5 -0
- package/lib-esm/components/Security/SecurityFlow.js +17 -0
- package/lib-esm/components/Security/SecurityModal.d.ts +8 -0
- package/lib-esm/components/Security/SecurityModal.js +45 -0
- package/lib-esm/components/Security/SecuritySchemeItem.d.ts +7 -0
- package/lib-esm/components/Security/SecuritySchemeItem.js +21 -0
- package/lib-esm/components/Security/helper.d.ts +2 -0
- package/lib-esm/components/Security/helper.js +2 -0
- package/lib-esm/components/Security/index.d.ts +1 -0
- package/lib-esm/components/Security/index.js +2 -0
- package/lib-esm/components/Security/styled.d.ts +2 -0
- package/lib-esm/components/Security/styled.js +14 -0
- package/lib-esm/components/SelectOrLabel/SelectOrLabel.d.ts +7 -0
- package/lib-esm/components/SelectOrLabel/SelectOrLabel.js +8 -0
- package/lib-esm/components/SelectOrLabel/index.d.ts +1 -0
- package/lib-esm/components/SelectOrLabel/index.js +2 -0
- package/lib-esm/components/ServerList/ServerList.d.ts +3 -0
- package/lib-esm/components/ServerList/ServerList.js +60 -0
- package/lib-esm/components/ServerList/index.d.ts +1 -0
- package/lib-esm/components/ServerList/index.js +2 -0
- package/lib-esm/components/ServerList/types.d.ts +5 -0
- package/lib-esm/components/ServerList/types.js +2 -0
- package/lib-esm/components/ServerListDropdown/ServerListDropdown.d.ts +7 -0
- package/lib-esm/components/ServerListDropdown/ServerListDropdown.js +2 -0
- package/lib-esm/components/ServerListDropdown/index.d.ts +1 -0
- package/lib-esm/components/ServerListDropdown/index.js +2 -0
- package/lib-esm/components/ServerListDropdown/styled.d.ts +5 -0
- package/lib-esm/components/ServerListDropdown/styled.js +23 -0
- package/lib-esm/components/SideMenu/SideMenu.d.ts +8 -0
- package/lib-esm/components/SideMenu/SideMenu.js +4 -0
- package/lib-esm/components/SideMenu/hooks/useMenuItems.d.ts +7 -0
- package/lib-esm/components/SideMenu/hooks/useMenuItems.js +2 -0
- package/lib-esm/components/SideMenu/index.d.ts +1 -0
- package/lib-esm/components/SideMenu/index.js +2 -0
- package/lib-esm/components/SideMenu/types.d.ts +16 -0
- package/lib-esm/components/SideMenu/types.js +2 -0
- package/lib-esm/components/StickySidebar/SidebarActions.d.ts +1 -0
- package/lib-esm/components/StickySidebar/SidebarActions.js +6 -0
- package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.d.ts +9 -0
- package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.js +25 -0
- package/lib-esm/components/StickySidebar/index.d.ts +1 -0
- package/lib-esm/components/StickySidebar/index.js +2 -0
- package/lib-esm/components/Tabs/Tabs.d.ts +8 -0
- package/lib-esm/components/Tabs/Tabs.js +35 -0
- package/lib-esm/components/Tabs/index.d.ts +2 -0
- package/lib-esm/components/Tabs/index.js +2 -0
- package/lib-esm/components/Tabs/useTabsState.d.ts +11 -0
- package/lib-esm/components/Tabs/useTabsState.js +2 -0
- package/lib-esm/components/TagItem/OperationNavigationItems.d.ts +9 -0
- package/lib-esm/components/TagItem/OperationNavigationItems.js +37 -0
- package/lib-esm/components/TagItem/OperationsNavigation.d.ts +3 -0
- package/lib-esm/components/TagItem/OperationsNavigation.js +7 -0
- package/lib-esm/components/TagItem/TagItem.d.ts +9 -0
- package/lib-esm/components/TagItem/TagItem.js +23 -0
- package/lib-esm/components/TagItem/index.d.ts +1 -0
- package/lib-esm/components/TagItem/index.js +2 -0
- package/lib-esm/components/TagItem/styled.d.ts +1 -0
- package/lib-esm/components/TagItem/styled.js +6 -0
- package/lib-esm/components/TagItem/types.d.ts +5 -0
- package/lib-esm/components/TagItem/types.js +2 -0
- package/lib-esm/components/ViewNested/ViewNested.d.ts +13 -0
- package/lib-esm/components/ViewNested/ViewNested.js +35 -0
- package/lib-esm/components/ViewNested/index.d.ts +1 -0
- package/lib-esm/components/ViewNested/index.js +2 -0
- package/lib-esm/components/common/Badges.d.ts +13 -0
- package/lib-esm/components/common/Badges.js +19 -0
- package/lib-esm/components/common/BodyContent/BodyContent.d.ts +11 -0
- package/lib-esm/components/common/BodyContent/BodyContent.js +28 -0
- package/lib-esm/components/common/BodyContent/index.d.ts +1 -0
- package/lib-esm/components/common/BodyContent/index.js +2 -0
- package/lib-esm/components/common/ClearButton/ClearButton.d.ts +2 -0
- package/lib-esm/components/common/ClearButton/ClearButton.js +2 -0
- package/lib-esm/components/common/ClearButton/index.d.ts +2 -0
- package/lib-esm/components/common/ClearButton/index.js +2 -0
- package/lib-esm/components/common/ClearButton/styled.d.ts +1 -0
- package/lib-esm/components/common/ClearButton/styled.js +16 -0
- package/lib-esm/components/common/ClearButton/types.d.ts +6 -0
- package/lib-esm/components/common/ClearButton/types.js +2 -0
- package/lib-esm/components/common/CodeBlockPanel.d.ts +2 -0
- package/lib-esm/components/common/CodeBlockPanel.js +6 -0
- package/lib-esm/components/common/ConstraintsView.d.ts +4 -0
- package/lib-esm/components/common/ConstraintsView.js +4 -0
- package/lib-esm/components/common/Dropdown/Dropdown.d.ts +12 -0
- package/lib-esm/components/common/Dropdown/Dropdown.js +27 -0
- package/lib-esm/components/common/Dropdown/index.d.ts +2 -0
- package/lib-esm/components/common/Dropdown/index.js +2 -0
- package/lib-esm/components/common/ExpandableExample/ExpandableExample.d.ts +5 -0
- package/lib-esm/components/common/ExpandableExample/ExpandableExample.js +10 -0
- package/lib-esm/components/common/ExpandableExample/index.d.ts +1 -0
- package/lib-esm/components/common/ExpandableExample/index.js +2 -0
- package/lib-esm/components/common/Extensions.d.ts +6 -0
- package/lib-esm/components/common/Extensions.js +4 -0
- package/lib-esm/components/common/Fields/fields-layout.d.ts +15 -0
- package/lib-esm/components/common/Fields/fields-layout.js +223 -0
- package/lib-esm/components/common/Fields/fields.d.ts +38 -0
- package/lib-esm/components/common/Fields/fields.js +93 -0
- package/lib-esm/components/common/Fields/index.d.ts +2 -0
- package/lib-esm/components/common/Fields/index.js +2 -0
- package/lib-esm/components/common/LinkToField.d.ts +13 -0
- package/lib-esm/components/common/LinkToField.js +20 -0
- package/lib-esm/components/common/OperationItemTitle.d.ts +2 -0
- package/lib-esm/components/common/OperationItemTitle.js +33 -0
- package/lib-esm/components/common/SchemaSelection/SchemaSelection.d.ts +12 -0
- package/lib-esm/components/common/SchemaSelection/SchemaSelection.js +2 -0
- package/lib-esm/components/common/SchemaSelection/index.d.ts +1 -0
- package/lib-esm/components/common/SchemaSelection/index.js +2 -0
- package/lib-esm/components/common/Select/Select.d.ts +2 -0
- package/lib-esm/components/common/Select/Select.js +2 -0
- package/lib-esm/components/common/Select/index.d.ts +2 -0
- package/lib-esm/components/common/Select/index.js +2 -0
- package/lib-esm/components/common/Select/styled.d.ts +22 -0
- package/lib-esm/components/common/Select/styled.js +111 -0
- package/lib-esm/components/common/Select/types.d.ts +20 -0
- package/lib-esm/components/common/Select/types.js +2 -0
- package/lib-esm/components/common/Skeleton/LanguageListSkeleton.d.ts +4 -0
- package/lib-esm/components/common/Skeleton/LanguageListSkeleton.js +23 -0
- package/lib-esm/components/common/Skeleton/Skeleton.d.ts +5 -0
- package/lib-esm/components/common/Skeleton/Skeleton.js +33 -0
- package/lib-esm/components/common/Skeleton/index.d.ts +1 -0
- package/lib-esm/components/common/Skeleton/index.js +2 -0
- package/lib-esm/components/common/headers.d.ts +1 -0
- package/lib-esm/components/common/headers.js +8 -0
- package/lib-esm/components/common/index.d.ts +14 -0
- package/lib-esm/components/common/index.js +2 -0
- package/lib-esm/components/common/linkify.d.ts +10 -0
- package/lib-esm/components/common/linkify.js +21 -0
- package/lib-esm/components/common/mixins.d.ts +1 -0
- package/lib-esm/components/common/mixins.js +5 -0
- package/lib-esm/components/common/panels.d.ts +17 -0
- package/lib-esm/components/common/panels.js +123 -0
- package/lib-esm/components/common/schema.d.ts +7 -0
- package/lib-esm/components/common/schema.js +74 -0
- package/lib-esm/components/common/styled.d.ts +7 -0
- package/lib-esm/components/common/styled.js +59 -0
- package/lib-esm/components/index.d.ts +23 -0
- package/lib-esm/components/index.js +2 -0
- package/lib-esm/components/pluggable/RedocExample.d.ts +11 -0
- package/lib-esm/components/pluggable/RedocExample.js +2 -0
- package/lib-esm/components/pluggable/RedocSchema.d.ts +10 -0
- package/lib-esm/components/pluggable/RedocSchema.js +2 -0
- package/lib-esm/components/pluggable/index.d.ts +2 -0
- package/lib-esm/components/pluggable/index.js +2 -0
- package/lib-esm/components/pluggable/styled.components.d.ts +7 -0
- package/lib-esm/components/pluggable/styled.components.js +13 -0
- package/lib-esm/constants.d.ts +25 -0
- package/lib-esm/constants.js +2 -0
- package/lib-esm/empty.d.ts +2 -0
- package/lib-esm/empty.js +2 -0
- package/lib-esm/events/codeSampleCopy.d.ts +2 -0
- package/lib-esm/events/codeSampleCopy.js +2 -0
- package/lib-esm/events/creator.d.ts +2 -0
- package/lib-esm/events/creator.js +2 -0
- package/lib-esm/events/index.d.ts +8 -0
- package/lib-esm/events/index.js +2 -0
- package/lib-esm/events/languageSwitch.d.ts +2 -0
- package/lib-esm/events/languageSwitch.js +2 -0
- package/lib-esm/events/panelToggle.d.ts +2 -0
- package/lib-esm/events/panelToggle.js +2 -0
- package/lib-esm/events/serverSwitch.d.ts +2 -0
- package/lib-esm/events/serverSwitch.js +2 -0
- package/lib-esm/events/tryItOpen.d.ts +2 -0
- package/lib-esm/events/tryItOpen.js +2 -0
- package/lib-esm/events/tryItSent.d.ts +2 -0
- package/lib-esm/events/tryItSent.js +2 -0
- package/lib-esm/events/types.d.ts +83 -0
- package/lib-esm/events/types.js +2 -0
- package/lib-esm/hoc/types.d.ts +51 -0
- package/lib-esm/hoc/types.js +2 -0
- package/lib-esm/hoc/utils.d.ts +2 -0
- package/lib-esm/hoc/utils.js +2 -0
- package/lib-esm/hoc/withRouter.d.ts +3 -0
- package/lib-esm/hoc/withRouter.js +2 -0
- package/lib-esm/hoc/withStore.d.ts +3 -0
- package/lib-esm/hoc/withStore.js +2 -0
- package/lib-esm/hooks/index.d.ts +8 -0
- package/lib-esm/hooks/index.js +2 -0
- package/lib-esm/hooks/useActivateExample.d.ts +2 -0
- package/lib-esm/hooks/useActivateExample.js +2 -0
- package/lib-esm/hooks/useActiveWithFallback.d.ts +3 -0
- package/lib-esm/hooks/useActiveWithFallback.js +2 -0
- package/lib-esm/hooks/useContentItems.d.ts +12 -0
- package/lib-esm/hooks/useContentItems.js +2 -0
- package/lib-esm/hooks/useLicense.d.ts +5 -0
- package/lib-esm/hooks/useLicense.js +2 -0
- package/lib-esm/hooks/usePerformanceMetrics.d.ts +5 -0
- package/lib-esm/hooks/usePerformanceMetrics.js +2 -0
- package/lib-esm/hooks/useRouter.d.ts +13 -0
- package/lib-esm/hooks/useRouter.js +2 -0
- package/lib-esm/hooks/useTelemetry.d.ts +2 -0
- package/lib-esm/hooks/useTelemetry.js +2 -0
- package/lib-esm/hooks/useTranslate.d.ts +2 -0
- package/lib-esm/hooks/useTranslate.js +2 -0
- package/lib-esm/hooks/useUppercase2LowercaseRedirect.d.ts +1 -0
- package/lib-esm/hooks/useUppercase2LowercaseRedirect.js +2 -0
- package/lib-esm/icons/CSharpIcon/CSharpIcon.d.ts +4 -0
- package/lib-esm/icons/CSharpIcon/CSharpIcon.js +2 -0
- package/lib-esm/icons/CSharpIcon/index.d.ts +1 -0
- package/lib-esm/icons/CSharpIcon/index.js +2 -0
- package/lib-esm/icons/CurlIcon/CurlIcon.d.ts +6 -0
- package/lib-esm/icons/CurlIcon/CurlIcon.js +15 -0
- package/lib-esm/icons/CurlIcon/index.d.ts +1 -0
- package/lib-esm/icons/CurlIcon/index.js +2 -0
- package/lib-esm/icons/GOIcon/GOIcon.d.ts +4 -0
- package/lib-esm/icons/GOIcon/GOIcon.js +2 -0
- package/lib-esm/icons/GOIcon/index.d.ts +1 -0
- package/lib-esm/icons/GOIcon/index.js +2 -0
- package/lib-esm/icons/JavaIcon/JavaIcon.d.ts +4 -0
- package/lib-esm/icons/JavaIcon/JavaIcon.js +2 -0
- package/lib-esm/icons/JavaIcon/index.d.ts +1 -0
- package/lib-esm/icons/JavaIcon/index.js +2 -0
- package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.d.ts +4 -0
- package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.js +2 -0
- package/lib-esm/icons/JavaScriptIcon/index.d.ts +1 -0
- package/lib-esm/icons/JavaScriptIcon/index.js +2 -0
- package/lib-esm/icons/NodeJSIcon/NodeJSIcon.d.ts +4 -0
- package/lib-esm/icons/NodeJSIcon/NodeJSIcon.js +2 -0
- package/lib-esm/icons/NodeJSIcon/index.d.ts +1 -0
- package/lib-esm/icons/NodeJSIcon/index.js +2 -0
- package/lib-esm/icons/PHPIcon/PHPIcon.d.ts +4 -0
- package/lib-esm/icons/PHPIcon/PHPIcon.js +2 -0
- package/lib-esm/icons/PHPIcon/index.d.ts +1 -0
- package/lib-esm/icons/PHPIcon/index.js +2 -0
- package/lib-esm/icons/PayloadIcon/PayloadIcon.d.ts +4 -0
- package/lib-esm/icons/PayloadIcon/PayloadIcon.js +2 -0
- package/lib-esm/icons/PayloadIcon/index.d.ts +1 -0
- package/lib-esm/icons/PayloadIcon/index.js +2 -0
- package/lib-esm/icons/PythonIcon/PythonIcon.d.ts +4 -0
- package/lib-esm/icons/PythonIcon/PythonIcon.js +2 -0
- package/lib-esm/icons/PythonIcon/index.d.ts +1 -0
- package/lib-esm/icons/PythonIcon/index.js +2 -0
- package/lib-esm/icons/RIcon/RIcon.d.ts +4 -0
- package/lib-esm/icons/RIcon/RIcon.js +2 -0
- package/lib-esm/icons/RIcon/index.d.ts +1 -0
- package/lib-esm/icons/RIcon/index.js +2 -0
- package/lib-esm/icons/RubyIcon/RubyIcon.d.ts +4 -0
- package/lib-esm/icons/RubyIcon/RubyIcon.js +2 -0
- package/lib-esm/icons/RubyIcon/index.d.ts +1 -0
- package/lib-esm/icons/RubyIcon/index.js +2 -0
- package/lib-esm/index.d.ts +44 -0
- package/lib-esm/index.js +2 -0
- package/lib-esm/jotai/app.d.ts +51 -0
- package/lib-esm/jotai/app.js +2 -0
- package/lib-esm/jotai/operation.d.ts +37 -0
- package/lib-esm/jotai/operation.js +2 -0
- package/lib-esm/jotai/replay.d.ts +7 -0
- package/lib-esm/jotai/replay.js +2 -0
- package/lib-esm/jotai/store.d.ts +16 -0
- package/lib-esm/jotai/store.js +2 -0
- package/lib-esm/jotai/use-write-atom.d.ts +1 -0
- package/lib-esm/jotai/use-write-atom.js +2 -0
- package/lib-esm/models/callback.d.ts +5 -0
- package/lib-esm/models/callback.js +2 -0
- package/lib-esm/models/code-sample-options.d.ts +8 -0
- package/lib-esm/models/code-sample-options.js +2 -0
- package/lib-esm/models/example.d.ts +9 -0
- package/lib-esm/models/example.js +2 -0
- package/lib-esm/models/field.d.ts +7 -0
- package/lib-esm/models/field.js +2 -0
- package/lib-esm/models/group.d.ts +4 -0
- package/lib-esm/models/group.js +2 -0
- package/lib-esm/models/index.d.ts +15 -0
- package/lib-esm/models/index.js +2 -0
- package/lib-esm/models/mediaContent.d.ts +7 -0
- package/lib-esm/models/mediaContent.js +2 -0
- package/lib-esm/models/mediaType.d.ts +19 -0
- package/lib-esm/models/mediaType.js +2 -0
- package/lib-esm/models/operation.d.ts +20 -0
- package/lib-esm/models/operation.js +2 -0
- package/lib-esm/models/request.d.ts +12 -0
- package/lib-esm/models/request.js +2 -0
- package/lib-esm/models/response.d.ts +14 -0
- package/lib-esm/models/response.js +2 -0
- package/lib-esm/models/schema.d.ts +13 -0
- package/lib-esm/models/schema.js +2 -0
- package/lib-esm/models/security.d.ts +8 -0
- package/lib-esm/models/security.js +2 -0
- package/lib-esm/models/tab.d.ts +4 -0
- package/lib-esm/models/tab.js +2 -0
- package/lib-esm/models/types.d.ts +265 -0
- package/lib-esm/models/types.js +2 -0
- package/lib-esm/services/OpenAPIParser.d.ts +52 -0
- package/lib-esm/services/OpenAPIParser.js +2 -0
- package/lib-esm/services/check.d.ts +13 -0
- package/lib-esm/services/check.js +2 -0
- package/lib-esm/services/code-samples/constants.d.ts +2 -0
- package/lib-esm/services/code-samples/constants.js +2 -0
- package/lib-esm/services/code-samples/generator.d.ts +29 -0
- package/lib-esm/services/code-samples/generator.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/code-builder.d.ts +83 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/code-builder.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +28 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/constants.d.ts +24 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/constants.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/lodash-int.d.ts +5 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/lodash-int.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.d.ts +30 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/reducer.d.ts +1 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/reducer.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/shell.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/shell.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/string-utility.d.ts +7 -0
- package/lib-esm/services/code-samples/httpsnippet/helpers/string-utility.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/index.d.ts +47 -0
- package/lib-esm/services/code-samples/httpsnippet/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/__mocks__/mock.d.ts +3565 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/__mocks__/mock.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/csharp/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/csharp/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/csharpNewtonsoft/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/go/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/go/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/go/native.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/go/native.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/index.d.ts +115 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/java/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/java/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/java8/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/java8/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/index.d.ts +12 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/node/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/node/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/php/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/php/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/php/types.d.ts +11 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/php/types.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.d.ts +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/python/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/python/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.d.ts +4 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/r/httr.d.ts +4 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/r/httr.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/r/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/r/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/r/utils.d.ts +5 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/r/utils.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/ruby/index.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/ruby/index.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.d.ts +10 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.js +2 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/shell/index.d.ts +12 -0
- package/lib-esm/services/code-samples/httpsnippet/targets/shell/index.js +2 -0
- package/lib-esm/services/code-samples/index.d.ts +2 -0
- package/lib-esm/services/code-samples/index.js +2 -0
- package/lib-esm/services/code-samples/types.d.ts +72 -0
- package/lib-esm/services/code-samples/types.js +2 -0
- package/lib-esm/services/config-options/helpers.d.ts +3 -0
- package/lib-esm/services/config-options/helpers.js +2 -0
- package/lib-esm/services/config-options/index.d.ts +2 -0
- package/lib-esm/services/config-options/index.js +2 -0
- package/lib-esm/services/config-options/normalizeOptions.d.ts +3 -0
- package/lib-esm/services/config-options/normalizeOptions.js +2 -0
- package/lib-esm/services/config-options/types.d.ts +55 -0
- package/lib-esm/services/config-options/types.js +2 -0
- package/lib-esm/services/history/helpers.d.ts +5 -0
- package/lib-esm/services/history/helpers.js +2 -0
- package/lib-esm/services/history/index.d.ts +1 -0
- package/lib-esm/services/history/index.js +2 -0
- package/lib-esm/services/index.d.ts +8 -0
- package/lib-esm/services/index.js +2 -0
- package/lib-esm/services/menu/builder.d.ts +8 -0
- package/lib-esm/services/menu/builder.js +2 -0
- package/lib-esm/services/menu/index.d.ts +1 -0
- package/lib-esm/services/menu/index.js +2 -0
- package/lib-esm/services/menu/markdown.d.ts +8 -0
- package/lib-esm/services/menu/markdown.js +2 -0
- package/lib-esm/services/menu/operation.d.ts +10 -0
- package/lib-esm/services/menu/operation.js +2 -0
- package/lib-esm/services/menu/tags.d.ts +27 -0
- package/lib-esm/services/menu/tags.js +2 -0
- package/lib-esm/services/types.d.ts +123 -0
- package/lib-esm/services/types.js +2 -0
- package/lib-esm/services/utils.d.ts +18 -0
- package/lib-esm/services/utils.js +2 -0
- package/lib-esm/standalone.d.ts +24 -0
- package/lib-esm/standalone.js +2 -0
- package/lib-esm/types/app.d.ts +6 -0
- package/lib-esm/types/app.js +2 -0
- package/lib-esm/types/index.d.ts +3 -0
- package/lib-esm/types/index.js +2 -0
- package/lib-esm/types/open-api.d.ts +368 -0
- package/lib-esm/types/open-api.js +2 -0
- package/lib-esm/types/security.d.ts +11 -0
- package/lib-esm/types/security.js +2 -0
- package/lib-esm/utils/JsonPointer.d.ts +51 -0
- package/lib-esm/utils/JsonPointer.js +2 -0
- package/lib-esm/utils/areArraysEqual.d.ts +1 -0
- package/lib-esm/utils/areArraysEqual.js +2 -0
- package/lib-esm/utils/argValuesHelpers.d.ts +4 -0
- package/lib-esm/utils/argValuesHelpers.js +2 -0
- package/lib-esm/utils/compose.d.ts +1 -0
- package/lib-esm/utils/compose.js +2 -0
- package/lib-esm/utils/configure-helpers.d.ts +11 -0
- package/lib-esm/utils/configure-helpers.js +2 -0
- package/lib-esm/utils/cookies.d.ts +7 -0
- package/lib-esm/utils/cookies.js +2 -0
- package/lib-esm/utils/createParsedDocument.d.ts +2 -0
- package/lib-esm/utils/createParsedDocument.js +2 -0
- package/lib-esm/utils/debounce.d.ts +1 -0
- package/lib-esm/utils/debounce.js +2 -0
- package/lib-esm/utils/debug.d.ts +2 -0
- package/lib-esm/utils/debug.js +2 -0
- package/lib-esm/utils/dom.d.ts +7 -0
- package/lib-esm/utils/dom.js +2 -0
- package/lib-esm/utils/environments.d.ts +4 -0
- package/lib-esm/utils/environments.js +2 -0
- package/lib-esm/utils/helpers.d.ts +46 -0
- package/lib-esm/utils/helpers.js +2 -0
- package/lib-esm/utils/index.d.ts +23 -0
- package/lib-esm/utils/index.js +2 -0
- package/lib-esm/utils/isMobile.d.ts +5 -0
- package/lib-esm/utils/isMobile.js +2 -0
- package/lib-esm/utils/loadAndBundleSpec.d.ts +3 -0
- package/lib-esm/utils/loadAndBundleSpec.js +2 -0
- package/lib-esm/utils/local-storage.d.ts +2 -0
- package/lib-esm/utils/local-storage.js +2 -0
- package/lib-esm/utils/object.d.ts +3 -0
- package/lib-esm/utils/object.js +2 -0
- package/lib-esm/utils/openapi.d.ts +43 -0
- package/lib-esm/utils/openapi.js +2 -0
- package/lib-esm/utils/parameters.d.ts +2 -0
- package/lib-esm/utils/parameters.js +2 -0
- package/lib-esm/utils/path.d.ts +4 -0
- package/lib-esm/utils/path.js +2 -0
- package/lib-esm/utils/queryString.d.ts +9 -0
- package/lib-esm/utils/queryString.js +2 -0
- package/lib-esm/utils/replaceVariables.d.ts +2 -0
- package/lib-esm/utils/replaceVariables.js +2 -0
- package/lib-esm/utils/saveTextBeforeHeading.d.ts +7 -0
- package/lib-esm/utils/saveTextBeforeHeading.js +2 -0
- package/lib-esm/utils/security-details.d.ts +9 -0
- package/lib-esm/utils/security-details.js +2 -0
- package/lib-esm/utils/session-storage.d.ts +2 -0
- package/lib-esm/utils/session-storage.js +2 -0
- package/lib-esm/utils/simplifyAstStructure.d.ts +2 -0
- package/lib-esm/utils/simplifyAstStructure.js +2 -0
- package/lib-esm/utils/sort.d.ts +6 -0
- package/lib-esm/utils/sort.js +2 -0
- package/lib-esm/utils/string.d.ts +13 -0
- package/lib-esm/utils/string.js +2 -0
- package/lib-esm/utils/test-utils.d.ts +1 -0
- package/lib-esm/utils/test-utils.js +2 -0
- package/lib-esm/utils/theme-helpers.d.ts +3 -0
- package/lib-esm/utils/theme-helpers.js +4 -0
- package/package.json +47 -25
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.d.ts +0 -8
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +0 -1
- package/lib/styled-components.d.ts +0 -1
- package/lib/styled-components.js +0 -1
- package/lib/utils/convertSwagger2OpenAPI.d.ts +0 -2
- package/lib/utils/convertSwagger2OpenAPI.js +0 -1
- package/lib/utils/url.d.ts +0 -2
- package/lib/utils/url.js +0 -1
package/lib/models/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),__exportStar=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||__createBinding(t,e,r)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCallback=exports.getField=exports.getSchema=exports.getResponse=exports.getMediaType=exports.getMediaContent=exports.getActiveMediaType=exports.getExamples=exports.getRequestBody=exports.isPayloadSample=exports.getOperation=exports.getTagOrGroup=void 0,__exportStar(require("./code-sample-options"),exports);var group_1=require("./group");Object.defineProperty(exports,"getTagOrGroup",{enumerable:!0,get:function(){return group_1.getTagOrGroup}});var operation_1=require("./operation");Object.defineProperty(exports,"getOperation",{enumerable:!0,get:function(){return operation_1.getOperation}}),Object.defineProperty(exports,"isPayloadSample",{enumerable:!0,get:function(){return operation_1.isPayloadSample}});var request_1=require("./request");Object.defineProperty(exports,"getRequestBody",{enumerable:!0,get:function(){return request_1.getRequestBody}});var example_1=require("./example");Object.defineProperty(exports,"getExamples",{enumerable:!0,get:function(){return example_1.getExamples}});var mediaContent_1=require("./mediaContent");Object.defineProperty(exports,"getActiveMediaType",{enumerable:!0,get:function(){return mediaContent_1.getActiveMediaType}}),Object.defineProperty(exports,"getMediaContent",{enumerable:!0,get:function(){return mediaContent_1.getMediaContent}});var mediaType_1=require("./mediaType");Object.defineProperty(exports,"getMediaType",{enumerable:!0,get:function(){return mediaType_1.getMediaType}});var response_1=require("./response");Object.defineProperty(exports,"getResponse",{enumerable:!0,get:function(){return response_1.getResponse}});var schema_1=require("./schema");Object.defineProperty(exports,"getSchema",{enumerable:!0,get:function(){return schema_1.getSchema}});var field_1=require("./field");Object.defineProperty(exports,"getField",{enumerable:!0,get:function(){return field_1.getField}});var callback_1=require("./callback");Object.defineProperty(exports,"getCallback",{enumerable:!0,get:function(){return callback_1.getCallback}}),__exportStar(require("./security"),exports),__exportStar(require("./types"),exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { MediaContentModel, MediaContentModelInput } from './types
|
|
1
|
+
import type { MediaContentModel, MediaContentModelInput } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* MediaContent model ready to be sued by React components
|
|
4
4
|
* Contains multiple MediaTypes and keeps track of the currently active one
|
|
5
5
|
*/
|
|
6
6
|
export declare function getMediaContent({ parser, info, isRequestType, options, data: { operation, type, response, absolutePointer }, }: MediaContentModelInput): MediaContentModel;
|
|
7
|
-
export declare function getActiveMediaType(content: MediaContentModel, activeMimeName?: string): import("./types
|
|
7
|
+
export declare function getActiveMediaType(content: MediaContentModel, activeMimeName?: string): import("./types").MediaTypeModel;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMediaContent=getMediaContent,exports.getActiveMediaType=getActiveMediaType;const mediaType_1=require("./mediaType");function getMediaContent({parser:e,info:t,isRequestType:i,options:p,data:{operation:a,type:o,response:n,absolutePointer:s=""}}){const r=Object.keys(t).map((r=>(0,mediaType_1.getMediaType)(e,r,i,t[r],p,{operation:a,type:o,response:n,absolutePointer:s}))),d=r.filter((e=>!!e.examples||!!e.formExamples)).length>0;return{mediaTypes:r,isRequestType:i,hasSample:d,operation:a}}function getActiveMediaType(e,t){return t&&e.mediaTypes.find((e=>e.name===t))||e.mediaTypes[0]||{}}
|
|
2
|
+
//# sourceMappingURL=mediaContent.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OpenAPIMediaType } from '../types
|
|
2
|
-
import type { OpenAPIParser, Options } from '../services
|
|
3
|
-
import type { MediaTypeModel, ResponseModel, OperationModel } from './types
|
|
1
|
+
import type { OpenAPIMediaType } from '../types';
|
|
2
|
+
import type { OpenAPIParser, Options } from '../services';
|
|
3
|
+
import type { MediaTypeModel, ResponseModel, OperationModel } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* @param parser
|
|
6
6
|
* @param name
|
package/lib/models/mediaType.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,i,a){void 0===a&&(a=i);var r=Object.getOwnPropertyDescriptor(t,i);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,a,r)}:function(e,t,i,a){void 0===a&&(a=i),e[a]=t[i]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&__createBinding(t,e,i);return __setModuleDefault(t,e),t};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMediaType=getMediaType;const Sampler=__importStar(require("openapi-sampler")),schema_1=require("./schema"),utils_1=require("../utils"),example_1=require("./example");function generateExamples({parser:e,info:{encoding:t,schema:i},schema:a,mime:r,options:{isRequestType:n,onlyRequiredInSamples:s,generatedSamplesMaxDepth:o,format:l="json"}}){const p={skipReadOnly:n,skipWriteOnly:!n,skipNonRequired:n&&s,maxSampleDepth:o,quiet:!0,format:l};let m={};if(a&&a.oneOf)for(const i of a.oneOf){const n=Sampler.sample(i.rawSchema,p,e.definition);a.discriminatorProp&&"object"==typeof n&&n&&n[a.discriminatorProp]&&(n[a.discriminatorProp]=i.title),m[i.title]=(0,example_1.getExamples)({parser:e,infoOrRef:{value:n},mime:r,encoding:t})}else m=a?{default:(0,example_1.getExamples)({parser:e,infoOrRef:{value:Sampler.sample(i,p,e.definition)},mime:r,encoding:t})}:{default:{value:null,rawValue:"null"}};return m}function getMediaType(e,t,i,a,r,{operation:n,type:s,response:o,absolutePointer:l=""}){let p,m;const u=a.schema&&(0,schema_1.getSchema)({parser:e,schemaOrRef:a.schema,pointer:"",absolutePointer:utils_1.JsonPointer.join(l,["content",t,"schema"]),options:r,deps:{operation:n,type:s,response:o}}),{onlyRequiredInSamples:c,generatedSamplesMaxDepth:d}=r,{encoding:f,examples:_,example:g}=a;return r.unstable_skipSamples||(void 0!==_?p=(0,utils_1.mapValues)(_,(i=>(0,example_1.getExamples)({parser:e,infoOrRef:i,mime:t,encoding:f}))):void 0!==g?p={default:(0,example_1.getExamples)({parser:e,infoOrRef:{value:e.deref(g).resolved},mime:t,encoding:f})}:(0,utils_1.isJsonLike)(t)||(0,utils_1.isXmlLike)(t)?p=generateExamples({parser:e,info:a,schema:u,mime:t,options:{isRequestType:i,onlyRequiredInSamples:c,generatedSamplesMaxDepth:d,format:(0,utils_1.isXmlLike)(t)?"xml":"json"}}):((0,utils_1.isFormUrlEncoded)(t)||(0,utils_1.isMultipartFormData)(t))&&(m=generateExamples({parser:e,info:a,schema:u,mime:t,options:{isRequestType:i,onlyRequiredInSamples:c,generatedSamplesMaxDepth:d}}))),{examples:p,schema:u,name:t,isRequestType:i,formExamples:m,onlyRequiredInSamples:c,operation:n}}
|
|
2
|
+
//# sourceMappingURL=mediaType.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UserClaims } from '@redocly/theme';
|
|
2
|
-
import type { ExtendedOpenAPIOperation, Unstable_ExternalCodeSample, OpenAPIParser, Options } from '../services
|
|
3
|
-
import type { OpenAPIServer, OpenAPIXCodeSample } from '../types
|
|
4
|
-
import type { MediaContentModel, OperationModel, GroupModel } from './types
|
|
2
|
+
import type { ExtendedOpenAPIOperation, Unstable_ExternalCodeSample, OpenAPIParser, Options } from '../services';
|
|
3
|
+
import type { OpenAPIServer, OpenAPIXCodeSample } from '../types';
|
|
4
|
+
import type { MediaContentModel, OperationModel, GroupModel } from './types';
|
|
5
5
|
export interface Sample {
|
|
6
6
|
lang: string;
|
|
7
7
|
label?: string;
|
package/lib/models/operation.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isPayloadSample=isPayloadSample,exports.getOperation=getOperation,exports.mergeInMockServer=mergeInMockServer;const theme_1=require("@redocly/theme"),config_1=require("@redocly/config"),utils_1=require("../utils"),callback_1=require("./callback"),field_1=require("./field"),request_1=require("./request"),security_1=require("./security"),response_1=require("./response"),operation_1=require("../services/menu/operation");function isPayloadSample(e){return"Payload"===e.lang&&"requestBodyContent"in e}function getOperation(e,r,t,s,i,o,a){var n,l,u;const p=r.isWebhook,c={operationDefinition:r,parent:t,pointer:r.pointer,description:(0,utils_1.getValueFromMdParsedExtension)(r,"description"),externalDocs:r.externalDocs,deprecated:!!r.deprecated,httpVerb:r.httpVerb,operationId:r.operationId,path:r.pathName,isWebhook:p,isCallback:Boolean(null==o?void 0:o.isCallback),isEvent:(null==o?void 0:o.isCallback)||p,name:(0,utils_1.getOperationName)(r),defaultExampleName:r.defaultSampleName,[config_1.REDOCLY_TEAMS_RBAC]:r[config_1.REDOCLY_TEAMS_RBAC]||(null==t?void 0:t[config_1.REDOCLY_TEAMS_RBAC]),type:"operation",callbackId:null==o?void 0:o.id,href:i,get callbacks(){return Object.keys(r.callbacks||[]).map((o=>{var n;return(0,callback_1.getCallback)(e,o,null===(n=r.callbacks)||void 0===n?void 0:n[o],c.pointer,s,i,t,a)}))},get responses(){let t=!1;return Object.keys(r.responses||[]).filter((e=>"default"===e||("success"===(0,utils_1.getStatusCodeType)(e)&&(t=!0),(0,utils_1.isStatusCode)(e)))).map((i=>(0,response_1.getResponse)({parser:e,code:i,defaultAsError:t,infoOrRef:r.responses[i],options:s,isEvent:c.isEvent,operation:c})))},get parameters(){return processParameters(e,r,c,s,v)}};if(null==o?void 0:o.isCallback)c.security=(0,security_1.getSecurity)(r.security,e),c.servers=(0,utils_1.normalizeServers)("",r.servers||r.pathServers||[]),c.id=(0,theme_1.removeLeadingSlash)(i);else{c.id=(0,utils_1.getOperationId)(r,t),c.href=c.href||(0,operation_1.getHref)(c),c.security=(0,security_1.getSecurity)(r.security||e.definition.security,e);const i=r.servers||((null===(n=r.pathServers)||void 0===n?void 0:n.length)?r.pathServers:null)||e.definition.servers||[];c.servers=(0,utils_1.normalizeServers)(e.definitionUrl,mergeInMockServer(i,s.mockServer))}s.showExtensions&&(c.extensions=(0,utils_1.extractExtensions)(r,s.showExtensions)),c.requestBody=r.requestBody?(0,request_1.getRequestBody)({parser:e,infoOrRef:r.requestBody,options:s,operation:c,isEvent:c.isEvent}):void 0;const d=null===(l=c.requestBody)||void 0===l?void 0:l.content;c.payload={lang:"Payload",source:"",requestBodyContent:(null==d?void 0:d.hasSample)?d:void 0},c.definitionSamples=r["x-codeSamples"]||[],c.badges=(null===(u=r["x-badges"])||void 0===u?void 0:u.map((({name:e,color:r,position:t})=>({name:e,color:r||"var(--color-info-base)",position:t||"after"}))))||[],c.hasSamples=(null==d?void 0:d.hasSample)||c.definitionSamples.length>0,c.hideReplay=!0===r["x-hideReplay"];const m={userClaims:a,operation:{operationId:c.operationId,name:c.name,path:c.path,href:c.href,method:c.httpVerb},servers:c.servers},v=((0,theme_1.configure)(m)||{}).requestValues||{};return(0,utils_1.updateOperationWithRequestValues)(c,v),c}function processParameters(e,r,t,s,i){let o=(0,utils_1.mergeParams)(e,r.pathParameters,r.parameters,{pathPointer:utils_1.JsonPointer.dirName(t.pointer),operationPointer:t.pointer}).map((({paramOrRef:r,pointer:o})=>{const a=(0,field_1.getField)(e,r,o,s,{operation:t,type:"request"});return(0,utils_1.updateParametersWithUserValues)(a,i),a}));return s.sortRequiredPropsFirst&&(o=(0,utils_1.sortByRequired)(o)),(0,utils_1.sortByDeprecated)(o)}function mergeInMockServer(e,r){if(!r)return e;const t={url:r.url,description:r.description};switch(r.position){case"first":return[t,...e];case"last":return[...e,t];case"replace":return[t];default:return e}}
|
|
2
|
+
//# sourceMappingURL=operation.js.map
|
package/lib/models/request.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OpenAPIRequestBody, Referenced } from '../types
|
|
2
|
-
import type { OpenAPIParser, Options } from '../services
|
|
3
|
-
import type { RequestBodyModel, OperationModel } from './types
|
|
1
|
+
import type { OpenAPIRequestBody, Referenced } from '../types';
|
|
2
|
+
import type { OpenAPIParser, Options } from '../services';
|
|
3
|
+
import type { RequestBodyModel, OperationModel } from './types';
|
|
4
4
|
type GetRequestBodyInput = {
|
|
5
5
|
parser: OpenAPIParser;
|
|
6
6
|
infoOrRef: Referenced<OpenAPIRequestBody>;
|
package/lib/models/request.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getRequestBody=getRequestBody;const utils_1=require("../utils"),mediaContent_1=require("./mediaContent");function getRequestBody({parser:e,infoOrRef:t,options:o,isEvent:i,operation:n}){const{resolved:r}=e.deref(t),s=(0,utils_1.getValueFromMdParsedExtension)(r,"description")||"",u=r.required;let d;const a=!i,p=(0,utils_1.getContentWithLegacyExamples)(r);return void 0!==p&&(d=(0,mediaContent_1.getMediaContent)({parser:e,info:p,isRequestType:a,options:o,data:{operation:n,type:"request",absolutePointer:t.$ref||utils_1.JsonPointer.join(n.pointer,["requestBody"])}})),{description:s,required:u,content:d}}
|
|
2
|
+
//# sourceMappingURL=request.js.map
|
package/lib/models/response.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OpenAPIResponse, Referenced } from '../types
|
|
2
|
-
import type { OpenAPIParser, Options } from '../services
|
|
3
|
-
import type { ResponseModel, OperationModel } from './types
|
|
1
|
+
import type { OpenAPIResponse, Referenced } from '../types';
|
|
2
|
+
import type { OpenAPIParser, Options } from '../services';
|
|
3
|
+
import type { ResponseModel, OperationModel } from './types';
|
|
4
4
|
type ResponseProps = {
|
|
5
5
|
parser: OpenAPIParser;
|
|
6
6
|
code: string;
|
package/lib/models/response.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getResponse=getResponse;const utils_1=require("../utils"),field_1=require("./field"),mediaContent_1=require("./mediaContent");function getResponse({parser:e,code:t,defaultAsError:s,infoOrRef:o,options:n,isEvent:i,operation:r}){const a=!!i,{resolved:d}=e.deref(o),p={code:t};void 0!==d["x-summary"]?(p.summary=(0,utils_1.getValueFromMdParsedExtension)(d,"x-summary"),p.description=(0,utils_1.getValueFromMdParsedExtension)(d,"description")||""):(p.summary=(0,utils_1.getValueFromMdParsedExtension)(d,"description")||"",p.description=""),p.type=(0,utils_1.getStatusCodeType)(t,s);const u=d.headers,l=o.$ref||utils_1.JsonPointer.join((null==r?void 0:r.pointer)||"",["responses",t]);void 0!==u&&(p.headers=Object.keys(u).map((t=>{const s=u[t];return(0,field_1.getField)(e,Object.assign(Object.assign({},s),{name:t}),utils_1.JsonPointer.join(l,["headers",t]),n,{operation:r,type:"response",response:p})})));const c=(0,utils_1.getContentWithLegacyExamples)(d);return void 0!==c&&(p.content=(0,mediaContent_1.getMediaContent)({parser:e,info:c,isRequestType:a,options:n,data:{operation:r,type:"response",response:p,absolutePointer:l}})),p}
|
|
2
|
+
//# sourceMappingURL=response.js.map
|
package/lib/models/schema.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OpenAPISchema, Referenced } from '../types
|
|
2
|
-
import type { OpenAPIParser, Options } from '../services
|
|
3
|
-
import type { Deps, SchemaModel } from './types
|
|
1
|
+
import type { OpenAPISchema, Referenced } from '../types';
|
|
2
|
+
import type { OpenAPIParser, Options } from '../services';
|
|
3
|
+
import type { Deps, SchemaModel } from './types';
|
|
4
4
|
export declare function getSchema({ parser, schemaOrRef, pointer, options, isChild, baseRefsStack, deps, absolutePointer, }: {
|
|
5
5
|
parser: OpenAPIParser;
|
|
6
6
|
schemaOrRef: Referenced<OpenAPISchema>;
|
package/lib/models/schema.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";var __rest=this&&this.__rest||function(e,i){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&i.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)i.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(t[r[n]]=e[r[n]])}return t};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSchema=getSchema;const theme_1=require("@redocly/theme"),config_1=require("@redocly/config"),OpenAPIParser_1=require("../services/OpenAPIParser"),utils_1=require("../utils"),field_1=require("./field");function getSchema({parser:e,schemaOrRef:i,pointer:t,options:r,isChild:n=!1,baseRefsStack:s=[],deps:o,absolutePointer:a}){var l,p,d,c,f,m,u,y,O;const{resolved:h,refsStack:v}=e.deref(i,s,!0),b=i.$ref||t||a||"",g=(0,OpenAPIParser_1.pushRef)(v,b),P=e.mergeAllOf(h,b,g,i.$ref||a),x=P.type||(0,utils_1.detectType)(P),_={operationPointer:(null===(l=o.operation)||void 0===l?void 0:l.pointer)||a||"",schemaOrRef:i,isChild:n,typePrefix:"",pointer:b,absolutePointer:a,refsStack:g,rawSchema:h,type:x,isCircular:!!P["x-circular-ref"],isComplex:!!P["x-complex"],title:P.title||(0,utils_1.isNamedDefinition)(b)&&utils_1.JsonPointer.baseName(b)||"",description:(0,utils_1.getValueFromMdParsedExtension)(P,"description")||"",format:P.format,enum:P.enum||[],example:P.example,deprecated:!!P.deprecated,pattern:P.pattern,externalDocs:P.externalDocs,displayFormat:P.format,isPrimitive:(0,utils_1.isPrimitiveType)(P,x),constraints:(0,utils_1.humanizeConstraints)(P),default:P.default,readOnly:!!P.readOnly,writeOnly:!!P.writeOnly,const:P.const||"",contentEncoding:P.contentEncoding,contentMediaType:P.contentMediaType,minItems:P.minItems,maxItems:P.maxItems,nullable:P.nullable||P["x-nullable"],schema:P,displayType:"",items:void 0,extensions:void 0,oneOfType:"",discriminatorProp:void 0,oneOf:void 0,[config_1.REDOCLY_TEAMS_RBAC]:P[config_1.REDOCLY_TEAMS_RBAC],"x-enumDescriptions":(0,utils_1.getValueFromMdParsedExtension)(P,"x-enumDescriptions"),get fields(){if(!_.isCircular&&!_.isComplex&&(hasType(_,"object")||hasType(_,"array")&&hasArrayItems(P)))return buildFields(e,P,b,r,g,o)}};if((P.nullable||P["x-nullable"])&&(Array.isArray(_.type)&&!_.type.some((e=>null===e||"null"===e))?_.type=[..._.type,"null"]:Array.isArray(_.type)||null===_.type&&"null"===_.type||(_.type=[_.type,"null"])),_.displayType=Array.isArray(_.type)?_.type.map((e=>null===e?"null":e)).join(" or "):_.type,_.isCircular)return _;if(P.if&&P.then||P.if&&P.else){const{oneOf:i,oneOfType:t}=initConditionalOperators({schema:P,parser:e,pointer:b,options:r,deps:o,refsStack:g});return _.oneOf=i,_.oneOfType=t,_}if(!n&&void 0!==getDiscriminator(P)){const{oneOf:i,discriminatorProp:t}=initDiscriminator({schema:P,parser:e,deps:o,mergedSchema:P,options:r,pointer:b,refsStack:g});return _.oneOf=i,_.discriminatorProp=t,_}if(n&&Array.isArray(P.oneOf)&&P.oneOf.find((e=>e.$ref===b))&&delete P.oneOf,void 0!==P.oneOf){const{oneOf:i,displayType:t}=initOneOf({schemaOneOf:P.oneOf,parser:e,deps:o,options:r,pointer:b,refsStack:g,schema:P});return _.oneOfType="One of",i&&(_.oneOf=i),_.displayType=t,void 0!==P.anyOf&&console.warn(`oneOf and anyOf are not supported on the same level. Skipping anyOf at ${b}`),_}if(void 0!==P.anyOf){const{oneOf:i,displayType:t}=initOneOf({schemaOneOf:P.anyOf,parser:e,deps:o,options:r,pointer:b,refsStack:g,schema:P});return i&&(_.oneOf=i),_.displayType=t,_.oneOfType="Any of",_}if(hasType(_,"array")&&(P.items&&!hasArrayItems(P)&&(_.items=getSchema({parser:e,schemaOrRef:P.items,pointer:b+"/items",options:r,baseRefsStack:g,deps:o,absolutePointer:utils_1.JsonPointer.join(P.absolutePointer||"",["items"])})),_.displayType=P.prefixItems||Array.isArray(P.items)?"items":(0,utils_1.pluralizeType)((null===(p=_.items)||void 0===p?void 0:p.displayType)||_.displayType),_.displayFormat=(null===(d=_.items)||void 0===d?void 0:d.format)||"",_.typePrefix=(null===(c=_.items)||void 0===c?void 0:c.typePrefix)||"Array of ",_.title=_.title||(null===(f=_.items)||void 0===f?void 0:f.title)||"",_.isPrimitive=void 0!==(null===(m=_.items)||void 0===m?void 0:m.isPrimitive)?null===(u=_.items)||void 0===u?void 0:u.isPrimitive:_.isPrimitive,void 0===_.example&&void 0!==(null===(y=_.items)||void 0===y?void 0:y.example)&&(_.example=[_.items.example]),(null===(O=_.items)||void 0===O?void 0:O.isPrimitive)&&(_.enum=_.items.enum,_["x-enumDescriptions"]=(0,utils_1.getValueFromMdParsedExtension)(_.items,"x-enumDescriptions")),Array.isArray(_.type))){const e=_.type.filter((e=>"array"!==e));e.length&&(_.displayType+=` or ${e.join(" or ")}`)}return r.showExtensions&&(_.extensions=(0,utils_1.extractExtensions)(P,r.showExtensions)),_}function initDiscriminator({schema:e,parser:i,pointer:t,options:r,refsStack:n,deps:s,mergedSchema:o}){const a=getDiscriminator(e),l=null==a?void 0:a.propertyName,p=i.findDerived([...o["x-parentRefs"]||[],t]);if(e.oneOf)for(const i of e.oneOf){if(void 0===i.$ref)continue;const e=utils_1.JsonPointer.baseName(i.$ref);p[i.$ref]=e}const d=(null==a?void 0:a.mapping)||{};let c=(null==a?void 0:a["x-explicitMappingOnly"])||!1;0===Object.keys(d).length&&(c=!1);const f={};for(const e in d){const i=d[e];Array.isArray(f[i])?f[i].push(e):f[i]=[e]}const m=c?Object.assign({},f):Object.assign(Object.assign({},p),f);let u=[];for(const e of Object.keys(m)){const i=m[e];if(Array.isArray(i))for(const t of i)u.push({$ref:e,name:t});else u.push({$ref:e,name:i})}const y=Object.keys(d);0!==y.length&&(u=u.sort(((e,i)=>{const t=y.indexOf(e.name),r=y.indexOf(i.name);return t<0&&r<0?e.name.localeCompare(i.name):t<0?1:r<0?-1:t-r})));return{oneOf:u.map((({$ref:e,name:t},a)=>{const l=getSchema({parser:i,schemaOrRef:{$ref:e},pointer:e,options:r,isChild:!0,baseRefsStack:n.slice(0,-1),deps:Object.assign(Object.assign({},s),{parentFieldFullPath:s.parentFieldFullPath?s.parentFieldFullPath+"&d="+a:"&d="+a.toString()}),absolutePointer:o.absolutePointer});return l.title=t,l})),discriminatorProp:l}}function initOneOf({schemaOneOf:e,parser:i,refsStack:t,pointer:r,schema:n,options:s,deps:o}){const a=e.map(((e,a)=>{const{resolved:l,refsStack:p}=i.deref(e,t,!0),d=i.mergeAllOf(l,r+"/oneOf/"+a,p),c=(0,utils_1.isNamedDefinition)(e.$ref)&&!d.title?utils_1.JsonPointer.baseName(e.$ref):`${d.title||""}${d.const&&JSON.stringify(d.const)||""}`;return getSchema({parser:i,schemaOrRef:Object.assign(Object.assign({},d),{title:c,allOf:[Object.assign(Object.assign({},n),{oneOf:void 0,anyOf:void 0})],discriminator:l.allOf?void 0:d.discriminator}),pointer:e.$ref||r+"/oneOf/"+a,options:s,baseRefsStack:p,deps:Object.assign(Object.assign({},o),{parentFieldFullPath:o.parentFieldFullPath?o.parentFieldFullPath+"&oneOf="+a:"&oneOf="+a.toString()})})})),l=a.map((e=>{let i=e.typePrefix+(e.title?`${e.title} (${e.displayType})`:e.displayType);return i.indexOf(" or ")>-1&&(i=`(${i})`),i})).join(" or ");return{oneOf:a,displayType:l}}function initConditionalOperators({schema:e,parser:i,pointer:t,options:r,refsStack:n,deps:s}){const{if:o,else:a={},then:l={}}=e,p=__rest(e,["if","else","then"]);return{oneOf:[{allOf:[p,l,o],title:o&&o["x-displayName"]||(null==o?void 0:o.title)||"case 1"},{allOf:[p,a],title:a&&a["x-displayName"]||(null==a?void 0:a.title)||"case 2"}].map(((e,o)=>getSchema({parser:i,schemaOrRef:Object.assign({},e),pointer:t+"/oneOf/"+o,options:r,baseRefsStack:n,deps:Object.assign(Object.assign({},s),{parentFieldFullPath:s.parentFieldFullPath?s.parentFieldFullPath+"&oneOf="+o:"&oneOf="+o.toString()})}))),oneOfType:"One of"}}function normalizeField(e,i,t){return e||(console.warn(`Field "${i}" is invalid, skipping.\n Field must be an object but got ${typeof e} at "${t}"`),{})}function buildFields(e,i,t,r,n,s){let o=i.properties||(hasType(i,"array")?i.prefixItems||i.items:void 0)||{};const a=i.patternProperties||{},l=i.additionalProperties||i.unevaluatedProperties,p=i.prefixItems?i.items:i.additionalItems,d=i.default||{};let c=Object.keys(o).map((a=>{var l;const p=normalizeField(o[a],a,t),c=void 0!==i.required&&i.required.indexOf(a)>-1;return(0,field_1.getField)(e,{name:i.properties?a:`[${a}]`,required:c,schema:Object.assign(Object.assign({},p),{example:(null===(l=i.example)||void 0===l?void 0:l[a])||p.example,default:void 0===p.default&&d?d[a]:p.default})},t+"/properties/"+a,r,s,n,utils_1.JsonPointer.join(i.absolutePointer||"",["properties",a]))}));return r.sortRequiredPropsFirst&&(c=(0,utils_1.sortByRequired)(c,i.required)),c.push(...Object.keys(a).map((i=>{const o=normalizeField(a[i],i,t);return(0,field_1.getField)(e,{name:i,required:!1,schema:o,kind:"patternProperties"},`${t}/patternProperties/${i}`,r,s,n)}))),((0,theme_1.isObject)(l)||!0===l)&&c.push((0,field_1.getField)(e,{name:((0,theme_1.isObject)(l)&&l["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:!0===l?{}:l,kind:"additionalProperties"},t+"/additionalProperties",r,s,n,utils_1.JsonPointer.join(i.absolutePointer||"",["additionalProperties"]))),c.push(...buildAdditionalItems({parser:e,schema:p,fieldsCount:c.length,$ref:t,options:r,refsStack:n,deps:s})),(0,utils_1.sortByDeprecated)(c)}function buildAdditionalItems({parser:e,schema:i=!1,fieldsCount:t,$ref:r,options:n,refsStack:s,deps:o}){return"boolean"==typeof i?i?[(0,field_1.getField)(e,{name:`[${t}...]`,schema:{},kind:"additionalItems"},`${r}/additionalItems`,n,o,s)]:[]:Array.isArray(i)?[...i.map(((i,a)=>(0,field_1.getField)(e,{name:`[${t+a}]`,schema:i,kind:"additionalItems"},`${r}/additionalItems/${a}`,n,o,s)))]:(0,theme_1.isObject)(i)?[(0,field_1.getField)(e,{name:`[${t}...]`,schema:i,kind:"additionalItems"},`${r}/additionalItems`,n,o,s)]:[]}function getDiscriminator(e){return e.discriminator||e["x-discriminator"]}function hasType(e,i){return e.type===i||Array.isArray(e.type)&&e.type.includes(i)}function hasArrayItems(e){return Boolean(Array.isArray(e.items)||Array.isArray(e.prefixItems))}
|
|
2
|
+
//# sourceMappingURL=schema.js.map
|
package/lib/models/security.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OpenAPISecurityRequirement, OpenAPISecurityScheme, Referenced } from '../types
|
|
2
|
-
import type { OpenAPIParser } from '../services
|
|
3
|
-
import type { SecurityRequirement, SecurityScheme } from './types
|
|
1
|
+
import type { OpenAPISecurityRequirement, OpenAPISecurityScheme, Referenced } from '../types';
|
|
2
|
+
import type { OpenAPIParser } from '../services';
|
|
3
|
+
import type { SecurityRequirement, SecurityScheme } from './types';
|
|
4
4
|
export declare function getSecurity(requirements: OpenAPISecurityRequirement[] | undefined, parser: OpenAPIParser): SecurityRequirement[];
|
|
5
5
|
export declare function getSecurityScheme(parser: Partial<OpenAPIParser>, id: string, scheme: Referenced<OpenAPISecurityScheme>): SecurityScheme;
|
|
6
6
|
export declare function getSecuritySchemes({ parser, }: {
|
package/lib/models/security.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSecurity=getSecurity,exports.getSecurityScheme=getSecurityScheme,exports.getSecuritySchemes=getSecuritySchemes;const utils_1=require("../utils");function getSecurity(e=[],t){return e.map((e=>getSecurityRequirement({requirement:e,parser:t}))).filter((({schemes:e})=>e.length>0))}function getSecurityRequirement({requirement:e,parser:t}){const r=t.definition.components&&t.definition.components.securitySchemes||{};return{schemes:Object.keys(e||{}).map((i=>{const n=t.deref(r[i]).resolved,c=e[i]||[];if(n)return Object.assign(Object.assign({},n),{id:i,sectionId:i,scopes:c})})).filter(Boolean)}}function getSecurityScheme(e,t,r){if(!(null==e?void 0:e.deref))return{};const{resolved:i}=e.deref(r),n=t,c=i.type,s=(0,utils_1.getValueFromMdParsedExtension)(i,"description")||"";let o,u,a,m={};switch(i.type){case"apiKey":o={name:i.name,in:i.in};break;case"http":u={scheme:i.scheme,bearerFormat:i.bearerFormat};break;case"openIdConnect":a={connectUrl:i.openIdConnectUrl};break;case"oauth2":m=i.flows}return{id:t,sectionId:n,type:c,description:s,apiKey:o,http:u,flows:m,openId:a}}function getSecuritySchemes({parser:e}){var t,r;if(!e)return[];const i=(null===(r=null===(t=e.definition)||void 0===t?void 0:t.components)||void 0===r?void 0:r.securitySchemes)||{};return Object.keys(i).map((t=>getSecurityScheme(e,t,i[t])))}
|
|
2
|
+
//# sourceMappingURL=security.js.map
|
package/lib/models/tab.js
CHANGED
package/lib/models/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { REDOCLY_TEAMS_RBAC } from '@redocly/config';
|
|
2
2
|
import type { Node } from '@markdoc/markdoc';
|
|
3
|
-
import type { OpenAPISecurityScheme, OpenAPIEncoding, OpenAPIMediaType, OpenAPIParameterLocation, OpenAPIParameterStyle, OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample, OpenAPIXBadges, OpenAPISchema, Referenced, OpenAPIInfo } from '../types
|
|
4
|
-
import type { OpenAPIParser } from '../services/OpenAPIParser
|
|
5
|
-
import type { Options } from '../services/config-options
|
|
6
|
-
import type { ExtendedOpenAPIOperation, MenuItemGroupType, MenuItemType, MergedOpenAPISchema, Unstable_ExternalCodeSample } from '../services/types
|
|
3
|
+
import type { OpenAPISecurityScheme, OpenAPIEncoding, OpenAPIMediaType, OpenAPIParameterLocation, OpenAPIParameterStyle, OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample, OpenAPIXBadges, OpenAPISchema, Referenced, OpenAPIInfo } from '../types';
|
|
4
|
+
import type { OpenAPIParser } from '../services/OpenAPIParser';
|
|
5
|
+
import type { Options } from '../services/config-options';
|
|
6
|
+
import type { ExtendedOpenAPIOperation, MenuItemGroupType, MenuItemType, MergedOpenAPISchema, Unstable_ExternalCodeSample } from '../services/types';
|
|
7
7
|
export type ContentItemModel = GroupModel | OperationMenuItem;
|
|
8
8
|
export interface SecurityCredentials {
|
|
9
9
|
'x-defaultClientId'?: string;
|
package/lib/models/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OpenAPIRef, OpenAPIDefinition } from '../types
|
|
2
|
-
import type { MergedOpenAPISchema } from './types
|
|
3
|
-
import type { Options } from './config-options/types
|
|
1
|
+
import type { OpenAPIRef, OpenAPIDefinition } from '../types';
|
|
2
|
+
import type { MergedOpenAPISchema } from './types';
|
|
3
|
+
import type { Options } from './config-options/types';
|
|
4
4
|
/**
|
|
5
5
|
* Loads and keeps spec. Provides raw spec operations
|
|
6
6
|
*/
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var __rest=this&&this.__rest||function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.OpenAPIParser=void 0,exports.pushRef=pushRef,exports.concatRefStacks=concatRefStacks;const theme_1=require("@redocly/theme"),utils_1=require("../utils"),JsonPointer_1=require("../utils/JsonPointer"),normalizeOptions_1=require("./config-options/normalizeOptions");function pushRef(e,t){return t&&e[e.length-1]!==t?[...e,t]:e}function concatRefStacks(e,t){return t?e.concat(t):e}class OpenAPIParser{constructor(e,t,r=(0,normalizeOptions_1.normalizeOptions)({})){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"definitionUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowMergeRefs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"byRef",{enumerable:!0,configurable:!0,writable:!0,value:e=>{let t;if(this.definition){"#"!==e.charAt(0)&&(e="#"+e),e=(0,utils_1.tryDecodeURIComponent)(e);try{t=JsonPointer_1.JsonPointer.get(this.definition,e)}catch(e){}return t||{}}}}),this.definition=Object.assign({},e),this.validate(e),this.definition=e,this.allowMergeRefs=e.openapi.startsWith("3.1");const i=theme_1.IS_BROWSER?window.location.href:"";(0,theme_1.isString)(t)&&(this.definitionUrl=new URL(t,i).href)}validate(e){if((0,theme_1.isUndefined)(e.openapi))throw new Error("Document must be valid OpenAPI 3.0.0 definition")}isRef(e){return!!e&&(void 0!==e.$ref&&null!==e.$ref)}deref(e,t=[],r=!1,i=0){const n=null==e?void 0:e["x-refsStack"];if(t=concatRefStacks(t,n),i>5)return{resolved:Object.assign({},e,{"x-complex":!0}),refsStack:t};if(this.isRef(e)){const n=(0,utils_1.getDefinitionName)(e.$ref);if(n&&this.options.ignoreNamedSchemas.has(n))return{resolved:{type:"object",title:n},refsStack:t};let s=this.byRef(e.$ref);if(!s)throw new Error(`Failed to resolve $ref "${e.$ref}"`);if(t.includes(e.$ref))s=Object.assign({},s,{"x-circular-ref":!0});else if(this.isRef(s)){s=this.deref(s,t,r,i).resolved}return this.allowMergeRefs&&(s=this.mergeRefs(e,s,r)),{resolved:s,refsStack:pushRef(t,e.$ref)}}return{resolved:e,refsStack:concatRefStacks(t,n)}}mergeRefs(e,t,r){const{$ref:i}=e,n=__rest(e,["$ref"]),s=Object.keys(n);if(0===s.length)return t;if(r&&s.some((e=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly","x-complex"].includes(e)))){const e=n,{description:r,title:i,readOnly:s,writeOnly:o}=e;return{allOf:[{description:r,title:i,readOnly:s,writeOnly:o},t,__rest(e,["description","title","readOnly","writeOnly"])]}}return Object.assign(Object.assign({},t),n)}mergeAllOf(e,t,r,i="",n=0){var s;if(e["x-circular-ref"])return e;if(void 0===(e=this.hoistOneOfs(e)).allOf)return Object.assign({absolutePointer:i},e);let o=Object.assign(Object.assign({},e),{"x-parentRefs":[],absolutePointer:JsonPointer_1.JsonPointer.join(i,["allOf"]),allOf:void 0,title:0===n?e.title||(0,utils_1.getDefinitionName)(t):e.title});!(0,theme_1.isUndefined)(o.properties)&&(0,theme_1.isObject)(o.properties)&&(o.properties=Object.assign({},o.properties)),!(0,theme_1.isUndefined)(o.items)&&(0,theme_1.isObject)(o.items)&&(o.items=Object.assign({},o.items));const l=e.allOf.map(((e,t)=>{var s;const{resolved:l,refsStack:f}=this.deref(e,r,!0,n),a=e.$ref,c=a||JsonPointer_1.JsonPointer.join(i,[String(t)]);if(l["x-complex"])return{$ref:a,refsStack:pushRef(f,a),schema:{"x-complex":!0},absolutePointer:c};const p=this.mergeAllOf(l,a,f,c,n+1);return p["x-circular-ref"]&&p.allOf?void 0:(a&&(null===(s=o["x-parentRefs"])||void 0===s||s.push(...p["x-parentRefs"]||[],a)),{$ref:a,refsStack:pushRef(f,a),schema:p,absolutePointer:c})})).filter(Boolean);for(const[e,{schema:r,refsStack:i,absolutePointer:f}]of l.entries()){const l=r||{},{type:a,enum:c,properties:p,items:d,required:O,title:u,description:m,readOnly:h,writeOnly:y,oneOf:b,anyOf:_,"x-circular-ref":g,"x-complex":x}=l,j=__rest(l,["type","enum","properties","items","required","title","description","readOnly","writeOnly","oneOf","anyOf","x-circular-ref","x-complex"]);if(o.type===a||(0,theme_1.isUndefined)(o.type)||(0,theme_1.isUndefined)(a)||n){if((0,theme_1.isUndefined)(a)||(Array.isArray(a)&&Array.isArray(o.type)?o.type=[...a,...o.type]:o.type=a),(0,theme_1.isUndefined)(c)||(Array.isArray(c)&&Array.isArray(o.enum)?o.enum=Array.from(new Set([...c,...o.enum])):o.enum=c),!(0,theme_1.isUndefined)(p)&&(0,theme_1.isObject)(p)){o.properties=o.properties||{};for(const r in p){const l=concatRefStacks(i,null===(s=p[r])||void 0===s?void 0:s["x-refsStack"]);if(o.properties[r]){if(!g){const i=this.mergeAllOf({allOf:[o.properties[r],p[r]],"x-refsStack":l},t+"/properties/"+r,l,JsonPointer_1.JsonPointer.join(f,["allOf",String(e),"properties",r]),n+1);o.properties[r]=i}}else o.properties[r]=Object.assign(Object.assign({},p[r]),{absolutePointer:JsonPointer_1.JsonPointer.join(f,["properties",r]),"x-refsStack":l})}}if(!(0,theme_1.isUndefined)(d)&&!g&&!x){const e="boolean"==typeof o.items?{}:Object.assign({},o.items),s="boolean"==typeof r.items?{}:Object.assign({},r.items);o.items=this.mergeAllOf({allOf:[e,s]},t+"/items",i,"",n+1)}(0,theme_1.isUndefined)(b)||(o.oneOf=b),(0,theme_1.isUndefined)(_)||(o.anyOf=_),Array.isArray(O)&&(o.required=[...o.required||[],...O]),o=Object.assign(Object.assign(Object.assign({},o),{title:o.title||u,description:o.description||m,readOnly:(0,theme_1.isUndefined)(o.readOnly)?h:o.readOnly,writeOnly:(0,theme_1.isUndefined)(o.writeOnly)?y:o.writeOnly,"x-circular-ref":o["x-circular-ref"]||g,"x-complex":o["x-complex"]||x}),j)}}return o}findDerived(e){const t={},r=this.definition.components&&this.definition.components.schemas||{};for(const i in r){const{resolved:n}=this.deref(r[i]);!(0,theme_1.isUndefined)(n.allOf)&&n.allOf.find((t=>!(0,theme_1.isUndefined)(t.$ref)&&e.indexOf(t.$ref)>-1))&&(t["#/components/schemas/"+i]=[n["x-discriminator-value"]||i])}return t}hoistOneOfs(e){if((0,theme_1.isUndefined)(e.allOf))return e;const{allOf:t}=e,r=__rest(e,["allOf"]);for(let e=0;e<t.length;e++){const i=t[e],{oneOf:n}=i,s=__rest(i,["oneOf"]);if(n&&Array.isArray(n)){const i=t.slice(0,e),o=t.slice(e+1),l=Object.keys(s).length>0?[s]:[];return Object.assign(Object.assign({},r),{oneOf:n.map((e=>({allOf:[...i,...l,e,...o]})))})}}return e}}exports.OpenAPIParser=OpenAPIParser;
|
|
2
|
+
//# sourceMappingURL=OpenAPIParser.js.map
|
package/lib/services/check.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function s(t){try{a(o.next(t))}catch(t){r(t)}}function l(t){try{a(o.throw(t))}catch(t){r(t)}}function a(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,l)}a((o=o.apply(t,e||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0}),exports.isHostAllowed=isHostAllowed,exports.default=parse;const utils_1=require("./utils");function promisifyIECryptoRes(t){return"then"in t?t:new Promise((e=>{t.oncomplete=t=>{e(t.target.result)}}))}function str2ab(t){const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let e=0,o=t.length;e<o;e++)n[e]=t.charCodeAt(e);return e}const getKey=()=>{const t=str2ab(atob("undefined"!=typeof REDOCLY_PUBLIC_KEY?REDOCLY_PUBLIC_KEY:"MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMHjNir5fXx/ZXoaEeXQ5XyxbNJ4YJYczoCRdSkL6NLzw1FHnng5Vfcgk5+bvox9QRYRbuk84mA4f2NhywDbXKECAwEAAQ=="));return promisifyIECryptoRes(null===utils_1.cryptoLib||void 0===utils_1.cryptoLib?void 0:utils_1.cryptoLib.subtle.importKey("spki",t,{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},!0,["verify"]))};function textEncode(t){if(window.TextEncoder)return(new TextEncoder).encode(t);const e=unescape(encodeURIComponent(t)),n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n}function verify(t,e){return __awaiter(this,void 0,void 0,(function*(){return promisifyIECryptoRes(null===utils_1.cryptoLib||void 0===utils_1.cryptoLib?void 0:utils_1.cryptoLib.subtle.verify({name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},yield getKey(),str2ab(atob(e)),textEncode(t)))}))}function isHostAllowed(t,e){return!0===e||!(!Array.isArray(e)||"undefined"==typeof window)&&(!("localhost"!==t&&"127.0.0.1"!==t&&!t.endsWith(".localhost")&&!e.find((e=>e===t||t.endsWith("."+e))))||!!e.find((e=>{if(e.indexOf("*")!==e.lastIndexOf("*"))return;const[n,o]=e.split("*");return o&&t.startsWith(n)&&t.endsWith(o)&&o.split(".").length>2})))}function parse(t){return __awaiter(this,void 0,void 0,(function*(){if("development"===process.env.NODE_ENV)return{valid:!0,allowed:!0};const e=window.location.hostname;if(!t)return"localhost"===e||"127.0.0.1"===e||e.endsWith(".localhost")?{local:!0}:{};const[n,o]=t.split(".");let i;try{if(!(yield verify(atob(n),o)))return{valid:!1};i=JSON.parse(atob(n))}catch(t){return{valid:!1,cryptoMissing:!0}}return i.valid=!0,(!i.e||Date.now()/1e3>i.e)&&(i.expired=!0),i.allowed=isHostAllowed(e,i.h),i}))}
|
|
2
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Languages as LanguagesType } from './types
|
|
1
|
+
import type { Languages as LanguagesType } from './types';
|
|
2
2
|
export declare const Languages: Record<string, LanguagesType | 'Payload'>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Languages=void 0,exports.Languages={curl:"curl",JavaScript:"JavaScript",NodeJs:"Node.js",Python:"Python",Java:"Java",CSharp:"C#",PHP:"PHP",Go:"Go",Ruby:"Ruby",R:"R",Payload:"Payload"};
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { OperationModel } from '../../models
|
|
2
|
-
import type * as HAR from './har
|
|
3
|
-
import type { Languages } from './types
|
|
1
|
+
import type { OperationModel } from '../../models';
|
|
2
|
+
import type * as HAR from './har';
|
|
3
|
+
import type { Languages } from './types';
|
|
4
4
|
import type { TFunction } from '@redocly/theme';
|
|
5
5
|
export type CustomHAR = HAR.Request & {
|
|
6
6
|
securityOAuth2ExtraCalls?: HAR.Request[];
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import*as v from"openapi-sampler";import $ from"deepmerge";import{isObject as oe}from"@redocly/theme";import{areArraysEqual as ce,serializeParameterValue as P,getSecurityDetails as ie,getParameterValue as M,queryString as j,isArrayOfObjects as ue,deleteEmptyArrayItem as le}from"../../utils/index.js";import{normalizeMimeType as pe,arrayMergeStrategy as z}from"../utils.js";import{MediaTypes as m}from"../../constants.js";import{HTTPSnippet as me}from"./httpsnippet/index.js";import{getActiveMediaType as fe}from"../../models/mediaContent.js";import J from"./httpsnippet/helpers/string-utility.js";function de(t,a){return t.find(n=>{const u=n.schemes.map(c=>c.id);return ce(u,a||[])})}function ye(t,{exampleName:a="",skipOptionalParameters:n=!1,withOAuth2Call:u=!1,spec:c,generatedPayloadSamplesMaxDepth:r=8,pathParams:o={},properties:i={},activeMimeName:s=""},{environment:d,requestValues:k,activeSecuritySchemeIds:T}){const l=d.server,b=t.servers.find(e=>e.url===l)||t.servers[0],w=de(t.security,T),{securityHeaders:A,securityCookies:F,securityQueries:X,securityOAuth2ExtraCalls:K,basicAuth:Q}=he(w||t.security?.[0],u,d),p=t?.requestBody?.content&&fe(t.requestBody.content,s),O={skipNonRequired:n,skipReadOnly:!0,maxSampleDepth:r,quiet:!0},h=k;let q=!1;const H=t.parameters.filter(e=>e.in==="header").filter(e=>!(n&&!e.required)).map(e=>({name:e.name,value:h.header?.[e.name]||M("header",e.name)||e.serverValues?.[l]?.example||e.example||P(e,v.sample(e.schema.rawSchema,O,c))})).map(e=>(p?.name&&e.name.toLowerCase()==="content-type"&&(q=!0,e.value=p.name),e)).concat(A);!q&&p?.name&&H.unshift({name:"Content-Type",value:p?.name});const G=t.parameters.filter(e=>e.in==="cookie").filter(e=>!(n&&!e.required)).map(e=>j.parse(P(e,e.serverValues?.[l]?.example||e.example||v.sample(e.schema.rawSchema,O,c)))).reduce((e,_)=>{for(const[y,S]of Object.entries(_))e.push({name:y,value:String(h.cookie?.[y]||S)});return e},[]).concat(F),W=t.parameters.filter(e=>e.in==="query").filter(e=>!(n&&!e.required)).map(e=>j.parse(P(e,e.serverValues?.[l]?.example||e.example||v.sample(e.schema.rawSchema,O,c)))).reduce((e,_)=>{for(const[y,S]of Object.entries(_))e.push({name:y,value:ue(h.query?.[y])&&JSON.stringify(le(h.query?.[y]))||String(h.query?.[y]||S)});return e},[]).concat(X),Z=b?.url.replace(/\/$/,""),ee=t.path.replace(/^\//,""),te=`${Z}/${ee}`,re=t.parameters.filter(e=>e.in==="path").reduce((e,_)=>{const{in:y,name:S}=_;return e[S]=h.path?.[S]||_.serverValues?.[l]?.example||_.example||o[S]||M(y,S),e},{}),E=p?.name.toLowerCase(),I=E===m.MULTIPART||E===m.URL_ENCODED,R=I?p?.formExamples?.[a]:p?.examples?.[a],ae=I?p?.formExamples||{}:p?.examples||{},[U]=Object.values(ae),N=R?.serverValues?.[l]?.value||U?.serverValues?.[l]?.value,D=e=>!e||typeof e!="object"||!p?.schema?.rawSchema?null:v.sample(Oe(p.schema.rawSchema,e),{...O,format:"xml"},c),C=(()=>{if(h?.body)return h.body;if(E===m.XML){const e=D(N)||D(R?.value)||D(U?.value);if(e)return e;if(p?.schema)return v.sample(p.schema.rawSchema,{...O,format:"xml"},c)}else return N||R?.value||U?.value||p?.schema&&v.sample(p.schema.rawSchema,{...O,format:"json"},c);return""})();let g="",L=[];switch(pe(E)){case m.JSON:g=JSON.stringify(V(C,i));break;case m.XML:g=C;break;case m.URL_ENCODED:case m.MULTIPART:g=j.stringify(V(C,i)),L=Y(V(C,i));break;default:g=String(C||"")}const se=g?{mimeType:p?.name||m.OCTET_STREAM,text:g,params:L}:void 0,ne=t.responses.map(e=>e.code);return{method:t.httpVerb,url:te,httpVersion:"HTTP/1.1",cookies:G,headers:H,queryString:W,postData:se,headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:K,basicAuth:Q,pathParameters:re,serverVariables:d,allResponseCodes:ne}}const f={withImports:!0,withComments:!1},x={curl:{code:"shell",defaultTarget:"curl",defaultOptions:{...f,short:!0}},JavaScript:{code:"javascript",defaultTarget:"fetch",defaultOptions:{...f,withImports:!1}},"Node.js":{code:"node",defaultTarget:"fetch",defaultOptions:{...f}},Python:{code:"python",defaultTarget:"requests",defaultOptions:{...f}},"Java8+Apache":{code:"java8",defaultTarget:"apachehttp",defaultOptions:{...f}},Java:{code:"java",defaultTarget:"httpclient",defaultOptions:{...f}},"C#":{code:"csharp",defaultTarget:"httpclient",defaultOptions:{...f}},"C#+Newtonsoft":{code:"csharpNewtonsoft",defaultTarget:"httpclient",defaultOptions:{...f}},Go:{code:"go",defaultTarget:"http.DefaultClient",defaultOptions:{...f}},PHP:{code:"php",defaultTarget:"curl",defaultOptions:{...f}},Ruby:{code:"ruby",defaultTarget:"net::http",defaultOptions:{...f}},R:{code:"r",defaultTarget:"httr",defaultOptions:{...f}}};function Re({lang:t,operation:a,exampleName:n,pathParams:u,properties:c,options:r={},environment:o,translate:i}){try{const{skipOptionalParameters:s,withOAuth2Call:d,spec:k,generatedPayloadSamplesMaxDepth:T,store:l,activeMimeName:b}=r,w=ye(a,{exampleName:n,pathParams:u,properties:c,skipOptionalParameters:s,withOAuth2Call:d,spec:k,generatedPayloadSamplesMaxDepth:T,activeMimeName:b},{environment:o,requestValues:l.requestValues,activeSecuritySchemeIds:l.activeSecuritySchemeIds}),A=new me(w);return x[t]?A.convert(x[t].code,x[t].defaultTarget,{...x[t].defaultOptions,...r}):i("openapi.unsupportedLanguage","Language is not supported.")}catch(s){return console.error(s),i("openapi.failedToGenerateCodeSample","Failed to generate code sample.")}}function he(t,a,n){const u={securityHeaders:[],securityCookies:[],securityQueries:[],securityOAuth2ExtraCalls:[],basicAuth:void 0},c=n?.server;for(const r of t?.schemes||[]){const o=ie(r.id,n),i=c&&r.serverValues&&r.serverValues[c],s={access_token:i?.["x-defaultAccessToken"]||r["x-defaultAccessToken"],token_type:i?.["x-defaultTokenType"]||r["x-defaultTokenType"],client_id:i?.["x-defaultClientId"]||r["x-defaultClientId"],client_secret:i?.["x-defaultClientSecret"]||r["x-defaultClientSecret"]},d=i?.["x-defaultUsername"]||r["x-defaultUsername"],k=i?.["x-defaultPassword"]||r["x-defaultPassword"],T=i&&"scopes"in i?i.scopes||[]:r.scopes||[];switch(r.type){case"openIdConnect":u.securityHeaders?.push({name:"Authorization",value:s.access_token?`${s.token_type||"Bearer"} ${s.access_token}`:o.token?`${s.token_type||o.token.token_type||"Bearer"} ${o.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>"});break;case"oauth2":{const l=s.access_token?`${s.token_type||"Bearer"} ${s.access_token}`:o.token?`${o.token.token_type||"Bearer"} ${o.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>";r.flows.clientCredentials&&a?u.securityOAuth2ExtraCalls.push(_e(r.flows.clientCredentials,T,{...o,client_id:s.client_id||o.client_id,client_secret:s.client_secret||o.client_secret})):r.flows.password&&a&&u.securityOAuth2ExtraCalls.push(Se(r.flows.password,T,{...o,client_id:s.client_id||o.client_id,client_secret:s.client_secret||o.client_secret})),u.securityHeaders?.push({name:"Authorization",value:l});break}case"apiKey":{const l=s.access_token||o.raw||"YOUR_API_KEY_HERE";r.in==="header"&&u.securityHeaders?.push({name:r.name,value:l}),r.in==="cookie"&&u.securityCookies.push({name:r.name,value:l}),r.in==="query"&&u.securityQueries.push({name:r.name,value:l});break}case"http":if(r.scheme==="basic")u.basicAuth={username:d||o.username||`<${J.toSnakeCase("Username")}>`,password:k||o.password||`<${J.toSnakeCase("Password")}>`};else{const l=s?.access_token||o.token?.access_token||`<YOUR_${r.bearerFormat||"TOKEN"}_HERE>`;u.securityHeaders?.push({name:"Authorization",value:`${Te(r.scheme||"bearer")} ${l}`})}break}}return u}function Se(t,a,n){return{method:"POST",url:t.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:m.URL_ENCODED},{name:"Accept",value:m.JSON}],queryString:[],postData:{mimeType:m.URL_ENCODED,text:"",params:[{name:"grant_type",value:"password"},{name:"client_id",value:n.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:n.client_secret||"YOUR_CLIENT_SECRET"},{name:"username",value:n.username||"<username>"},{name:"password",value:n.password||"<password>"},a.length?{name:"scope",value:a.join(" ")}:void 0].filter(B)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function _e(t,a,n){return{method:"POST",url:t.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:m.URL_ENCODED},{name:"Accept",value:m.JSON}],queryString:[],postData:{mimeType:m.URL_ENCODED,text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:n.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:n.client_secret||"YOUR_CLIENT_SECRET"},a.length?{name:"scope",value:a.join(" ")}:void 0].filter(B)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function V(t,a){if(t){if(oe(t))return Object.keys(t).length>0&&Object.keys(a).length===0?t:$(t,a,{arrayMerge:z});try{return $(JSON.parse(t),a,{arrayMerge:z})}catch{return!1}}return!1}function Y(t,a=""){const n=[];for(const[u,c]of Object.entries(t)){const r=a?`${a}[${u}]`:u;if(typeof c=="object"&&c!==null)n.push(...Y(c,r));else{const o=Array.isArray(t)&&typeof c=="string"&&a?a:r;n.push({name:o,value:String(c)})}}return n}function B(t){return t!==void 0}function Te(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Oe(t,a){if(!t||typeof t!="object"||!a||typeof a!="object")return t;const n=JSON.parse(JSON.stringify(t));function u(c,r){if(!(!c||!r||typeof c!="object"||typeof r!="object")&&c.properties){for(const o in c.properties)if(r[o]!==void 0){const i=c.properties[o],s=r[o];if(i.type==="object"&&typeof s=="object"&&!Array.isArray(s))u(i,s);else if(i.type==="array"&&Array.isArray(s)&&s.length>0){const d=s[0];i.items&&i.items.properties&&u(i.items,d)}else i.example=s}}}return u(n,a),n}export{Te as capitalizeFirst,Re as getCodeSample,V as getDataRequest,B as isDefined};
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,a,s){void 0===s&&(s=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,s,r)}:function(e,t,a,s){void 0===s&&(s=a),e[s]=t[a]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&__createBinding(t,e,a);return __setModuleDefault(t,e),t},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCodeSample=getCodeSample,exports.getDataRequest=getDataRequest,exports.isDefined=isDefined,exports.capitalizeFirst=capitalizeFirst;const Sampler=__importStar(require("openapi-sampler")),deepmerge_1=__importDefault(require("deepmerge")),theme_1=require("@redocly/theme"),utils_1=require("../../utils"),utils_2=require("../utils"),constants_1=require("../../constants"),httpsnippet_1=require("./httpsnippet"),mediaContent_1=require("../../models/mediaContent"),string_utility_1=__importDefault(require("./httpsnippet/helpers/string-utility"));function getSelectedSecurityScheme(e,t){return e.find((e=>{const a=e.schemes.map((e=>e.id));return(0,utils_1.areArraysEqual)(a,t||[])}))}function mapOperationToHAR(e,{exampleName:t="",skipOptionalParameters:a=!1,withOAuth2Call:s=!1,spec:r,generatedPayloadSamplesMaxDepth:i=8,pathParams:n={},properties:l={},activeMimeName:o=""},{environment:u,requestValues:c,activeSecuritySchemeIds:d}){var p,m,v,f,_,h,y,g;const O=u.server,S=e.servers.find((e=>e.url===O))||e.servers[0],b=getSelectedSecurityScheme(e.security,d),{securityHeaders:T,securityCookies:C,securityQueries:j,securityOAuth2ExtraCalls:k,basicAuth:x}=getSecurityData(b||(null===(p=e.security)||void 0===p?void 0:p[0]),s,u),E=(null===(m=null==e?void 0:e.requestBody)||void 0===m?void 0:m.content)&&(0,mediaContent_1.getActiveMediaType)(e.requestBody.content,o),D={skipNonRequired:a,skipReadOnly:!0,maxSampleDepth:i,quiet:!0},A=c;let w=!1;const P=e.parameters.filter((e=>"header"===e.in)).filter((e=>!(a&&!e.required))).map((e=>{var t,a,s;return{name:e.name,value:(null===(t=A.header)||void 0===t?void 0:t[e.name])||(0,utils_1.getParameterValue)("header",e.name)||(null===(s=null===(a=e.serverValues)||void 0===a?void 0:a[O])||void 0===s?void 0:s.example)||e.example||(0,utils_1.serializeParameterValue)(e,Sampler.sample(e.schema.rawSchema,D,r))}})).map((e=>((null==E?void 0:E.name)&&"content-type"===e.name.toLowerCase()&&(w=!0,e.value=E.name),e))).concat(T);!w&&(null==E?void 0:E.name)&&P.unshift({name:"Content-Type",value:null==E?void 0:E.name});const q=e.parameters.filter((e=>"cookie"===e.in)).filter((e=>!(a&&!e.required))).map((e=>{var t,a;return utils_1.queryString.parse((0,utils_1.serializeParameterValue)(e,(null===(a=null===(t=e.serverValues)||void 0===t?void 0:t[O])||void 0===a?void 0:a.example)||e.example||Sampler.sample(e.schema.rawSchema,D,r)))})).reduce(((e,t)=>{var a;for(const[s,r]of Object.entries(t))e.push({name:s,value:String((null===(a=A.cookie)||void 0===a?void 0:a[s])||r)});return e}),[]).concat(C),M=e.parameters.filter((e=>"query"===e.in)).filter((e=>!(a&&!e.required))).map((e=>{var t,a;return utils_1.queryString.parse((0,utils_1.serializeParameterValue)(e,(null===(a=null===(t=e.serverValues)||void 0===t?void 0:t[O])||void 0===a?void 0:a.example)||e.example||Sampler.sample(e.schema.rawSchema,D,r)))})).reduce(((e,t)=>{var a,s,r;for(const[i,n]of Object.entries(t))e.push({name:i,value:(0,utils_1.isArrayOfObjects)(null===(a=A.query)||void 0===a?void 0:a[i])&&JSON.stringify((0,utils_1.deleteEmptyArrayItem)(null===(s=A.query)||void 0===s?void 0:s[i]))||String((null===(r=A.query)||void 0===r?void 0:r[i])||n)});return e}),[]).concat(j),R=`${null==S?void 0:S.url.replace(/\/$/,"")}/${e.path.replace(/^\//,"")}`,N=e.parameters.filter((e=>"path"===e.in)).reduce(((e,t)=>{var a,s,r;const{in:i,name:l}=t;return e[l]=(null===(a=A.path)||void 0===a?void 0:a[l])||(null===(r=null===(s=t.serverValues)||void 0===s?void 0:s[O])||void 0===r?void 0:r.example)||t.example||n[l]||(0,utils_1.getParameterValue)(i,l),e}),{}),H=null==E?void 0:E.name.toLowerCase(),U=H===constants_1.MediaTypes.MULTIPART||H===constants_1.MediaTypes.URL_ENCODED,V=U?null===(v=null==E?void 0:E.formExamples)||void 0===v?void 0:v[t]:null===(f=null==E?void 0:E.examples)||void 0===f?void 0:f[t],I=U?(null==E?void 0:E.formExamples)||{}:(null==E?void 0:E.examples)||{},[L]=Object.values(I),$=(null===(h=null===(_=null==V?void 0:V.serverValues)||void 0===_?void 0:_[O])||void 0===h?void 0:h.value)||(null===(g=null===(y=null==L?void 0:L.serverValues)||void 0===y?void 0:y[O])||void 0===g?void 0:g.value),z=e=>{var t;return e&&"object"==typeof e&&(null===(t=null==E?void 0:E.schema)||void 0===t?void 0:t.rawSchema)?Sampler.sample(populateXmlSchemaFields(E.schema.rawSchema,e),Object.assign(Object.assign({},D),{format:"xml"}),r):null},B=(()=>{if(null==A?void 0:A.body)return A.body;if(H!==constants_1.MediaTypes.XML)return $||(null==V?void 0:V.value)||(null==L?void 0:L.value)||(null==E?void 0:E.schema)&&Sampler.sample(E.schema.rawSchema,Object.assign(Object.assign({},D),{format:"json"}),r);{const e=z($)||z(null==V?void 0:V.value)||z(null==L?void 0:L.value);if(e)return e;if(null==E?void 0:E.schema)return Sampler.sample(E.schema.rawSchema,Object.assign(Object.assign({},D),{format:"xml"}),r)}return""})();let J="",Y=[];switch((0,utils_2.normalizeMimeType)(H)){case constants_1.MediaTypes.JSON:J=JSON.stringify(getDataRequest(B,l));break;case constants_1.MediaTypes.XML:J=B;break;case constants_1.MediaTypes.URL_ENCODED:case constants_1.MediaTypes.MULTIPART:J=utils_1.queryString.stringify(getDataRequest(B,l)),Y=objectToHarParams(getDataRequest(B,l));break;default:J=String(B||"")}const F=J?{mimeType:(null==E?void 0:E.name)||constants_1.MediaTypes.OCTET_STREAM,text:J,params:Y}:void 0,K=e.responses.map((e=>e.code));return{method:e.httpVerb,url:R,httpVersion:"HTTP/1.1",cookies:q,headers:P,queryString:M,postData:F,headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:k,basicAuth:x,pathParameters:N,serverVariables:u,allResponseCodes:K}}const defaultOptions={withImports:!0,withComments:!1},langToSnippetConfig={curl:{code:"shell",defaultTarget:"curl",defaultOptions:Object.assign(Object.assign({},defaultOptions),{short:!0})},JavaScript:{code:"javascript",defaultTarget:"fetch",defaultOptions:Object.assign(Object.assign({},defaultOptions),{withImports:!1})},"Node.js":{code:"node",defaultTarget:"fetch",defaultOptions:Object.assign({},defaultOptions)},Python:{code:"python",defaultTarget:"requests",defaultOptions:Object.assign({},defaultOptions)},"Java8+Apache":{code:"java8",defaultTarget:"apachehttp",defaultOptions:Object.assign({},defaultOptions)},Java:{code:"java",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},"C#":{code:"csharp",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},"C#+Newtonsoft":{code:"csharpNewtonsoft",defaultTarget:"httpclient",defaultOptions:Object.assign({},defaultOptions)},Go:{code:"go",defaultTarget:"http.DefaultClient",defaultOptions:Object.assign({},defaultOptions)},PHP:{code:"php",defaultTarget:"curl",defaultOptions:Object.assign({},defaultOptions)},Ruby:{code:"ruby",defaultTarget:"net::http",defaultOptions:Object.assign({},defaultOptions)},R:{code:"r",defaultTarget:"httr",defaultOptions:Object.assign({},defaultOptions)}};function getCodeSample({lang:e,operation:t,exampleName:a,pathParams:s,properties:r,options:i={},environment:n,translate:l}){try{const{skipOptionalParameters:o,withOAuth2Call:u,spec:c,generatedPayloadSamplesMaxDepth:d,store:p,activeMimeName:m}=i,v=mapOperationToHAR(t,{exampleName:a,pathParams:s,properties:r,skipOptionalParameters:o,withOAuth2Call:u,spec:c,generatedPayloadSamplesMaxDepth:d,activeMimeName:m},{environment:n,requestValues:p.requestValues,activeSecuritySchemeIds:p.activeSecuritySchemeIds}),f=new httpsnippet_1.HTTPSnippet(v);return langToSnippetConfig[e]?f.convert(langToSnippetConfig[e].code,langToSnippetConfig[e].defaultTarget,Object.assign(Object.assign({},langToSnippetConfig[e].defaultOptions),i)):l("openapi.unsupportedLanguage","Language is not supported.")}catch(e){return console.error(e),l("openapi.failedToGenerateCodeSample","Failed to generate code sample.")}}function getSecurityData(e,t,a){var s,r,i,n,l;const o={securityHeaders:[],securityCookies:[],securityQueries:[],securityOAuth2ExtraCalls:[],basicAuth:void 0},u=null==a?void 0:a.server;for(const c of(null==e?void 0:e.schemes)||[]){const e=(0,utils_1.getSecurityDetails)(c.id,a),d=u&&c.serverValues&&c.serverValues[u],p={access_token:(null==d?void 0:d["x-defaultAccessToken"])||c["x-defaultAccessToken"],token_type:(null==d?void 0:d["x-defaultTokenType"])||c["x-defaultTokenType"],client_id:(null==d?void 0:d["x-defaultClientId"])||c["x-defaultClientId"],client_secret:(null==d?void 0:d["x-defaultClientSecret"])||c["x-defaultClientSecret"]},m=(null==d?void 0:d["x-defaultUsername"])||c["x-defaultUsername"],v=(null==d?void 0:d["x-defaultPassword"])||c["x-defaultPassword"],f=d&&"scopes"in d?d.scopes||[]:c.scopes||[];switch(c.type){case"openIdConnect":null===(s=o.securityHeaders)||void 0===s||s.push({name:"Authorization",value:p.access_token?`${p.token_type||"Bearer"} ${p.access_token}`:e.token?`${p.token_type||e.token.token_type||"Bearer"} ${e.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>"});break;case"oauth2":{const a=p.access_token?`${p.token_type||"Bearer"} ${p.access_token}`:e.token?`${e.token.token_type||"Bearer"} ${e.token.access_token}`:"Bearer <YOUR_TOKEN_HERE>";c.flows.clientCredentials&&t?o.securityOAuth2ExtraCalls.push(getOAuth2ClientCredsCallHar(c.flows.clientCredentials,f,Object.assign(Object.assign({},e),{client_id:p.client_id||e.client_id,client_secret:p.client_secret||e.client_secret}))):c.flows.password&&t&&o.securityOAuth2ExtraCalls.push(getOAuth2PasswordCallHar(c.flows.password,f,Object.assign(Object.assign({},e),{client_id:p.client_id||e.client_id,client_secret:p.client_secret||e.client_secret}))),null===(r=o.securityHeaders)||void 0===r||r.push({name:"Authorization",value:a});break}case"apiKey":{const t=p.access_token||e.raw||"YOUR_API_KEY_HERE";"header"===c.in&&(null===(i=o.securityHeaders)||void 0===i||i.push({name:c.name,value:t})),"cookie"===c.in&&o.securityCookies.push({name:c.name,value:t}),"query"===c.in&&o.securityQueries.push({name:c.name,value:t});break}case"http":if("basic"===c.scheme)o.basicAuth={username:m||e.username||`<${string_utility_1.default.toSnakeCase("Username")}>`,password:v||e.password||`<${string_utility_1.default.toSnakeCase("Password")}>`};else{const t=(null==p?void 0:p.access_token)||(null===(n=e.token)||void 0===n?void 0:n.access_token)||`<YOUR_${c.bearerFormat||"TOKEN"}_HERE>`;null===(l=o.securityHeaders)||void 0===l||l.push({name:"Authorization",value:`${capitalizeFirst(c.scheme||"bearer")} ${t}`})}}}return o}function getOAuth2PasswordCallHar(e,t,a){return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:constants_1.MediaTypes.URL_ENCODED},{name:"Accept",value:constants_1.MediaTypes.JSON}],queryString:[],postData:{mimeType:constants_1.MediaTypes.URL_ENCODED,text:"",params:[{name:"grant_type",value:"password"},{name:"client_id",value:a.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:a.client_secret||"YOUR_CLIENT_SECRET"},{name:"username",value:a.username||"<username>"},{name:"password",value:a.password||"<password>"},t.length?{name:"scope",value:t.join(" ")}:void 0].filter(isDefined)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function getOAuth2ClientCredsCallHar(e,t,a){return{method:"POST",url:e.tokenUrl,httpVersion:"HTTP/1.1",headers:[{name:"Content-Type",value:constants_1.MediaTypes.URL_ENCODED},{name:"Accept",value:constants_1.MediaTypes.JSON}],queryString:[],postData:{mimeType:constants_1.MediaTypes.URL_ENCODED,text:"",params:[{name:"grant_type",value:"client_credentials"},{name:"client_id",value:a.client_id||"YOUR_CLIENT_ID"},{name:"client_secret",value:a.client_secret||"YOUR_CLIENT_SECRET"},t.length?{name:"scope",value:t.join(" ")}:void 0].filter(isDefined)},cookies:[],headersSize:-1,bodySize:-1,securityOAuth2ExtraCalls:[]}}function getDataRequest(e,t){if(e){if((0,theme_1.isObject)(e))return Object.keys(e).length>0&&0===Object.keys(t).length?e:(0,deepmerge_1.default)(e,t,{arrayMerge:utils_2.arrayMergeStrategy});try{return(0,deepmerge_1.default)(JSON.parse(e),t,{arrayMerge:utils_2.arrayMergeStrategy})}catch(e){return!1}}return!1}function objectToHarParams(e,t=""){const a=[];for(const[s,r]of Object.entries(e)){const i=t?`${t}[${s}]`:s;if("object"==typeof r&&null!==r)a.push(...objectToHarParams(r,i));else{const s=Array.isArray(e)&&"string"==typeof r&&t?t:i;a.push({name:s,value:String(r)})}}return a}function isDefined(e){return void 0!==e}function capitalizeFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}function populateXmlSchemaFields(e,t){if(!e||"object"!=typeof e||!t||"object"!=typeof t)return e;const a=JSON.parse(JSON.stringify(e));return function e(t,a){if(t&&a&&"object"==typeof t&&"object"==typeof a&&t.properties)for(const s in t.properties)if(void 0!==a[s]){const r=t.properties[s],i=a[s];if("object"!==r.type||"object"!=typeof i||Array.isArray(i))if("array"===r.type&&Array.isArray(i)&&i.length>0){const t=i[0];r.items&&r.items.properties&&e(r.items,t)}else r.example=i;else e(r,i)}}(a,t),a}
|
|
2
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OpenAPIServerVariable } from '../../../../types
|
|
2
|
-
import { VariableType } from './constants
|
|
1
|
+
import type { OpenAPIServerVariable } from '../../../../types';
|
|
2
|
+
import { VariableType } from './constants';
|
|
3
3
|
/**
|
|
4
4
|
* Helper object to format and aggragate lines of code.
|
|
5
5
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
`,this.capitalize=n,this.lang=s,this.langOptions={...u.default,...u[s]}}buildLine(e,t){let r="",n=2;if(typeof e=="string")n=1,t=e,e=0;else if(e===null)return null;for(;e;)r+=this.indentation,e--;const s=Array.prototype.slice.call(arguments,n,arguments.length);return s.unshift(r+t),S.format.apply(this,s)}unshift(...e){return this.code.unshift(this.buildLine.apply(this,e)),this}push(...e){return this.code.push(this.buildLine.apply(this,e)),this}blank(){return this.code.push(null),this}join(){return this.code.join(this.lineJoin)}clean(){this.code.splice(1)}var(e,t=c.CUSTOM){if(t===c.PATH){let r=this.variablesPrefix+e;switch(C.includes(r)&&(r=`${r}_path`),p[this.lang]){case l.UNDER_SCORES:r=o.toSnakeCase(r);break;case l.PASCAL_CASE:r=o.toPascalCase(r);break;case l.CAMEL_CASE:default:r=o.toCamelCase(r);break}return r}return this.variablesPrefix?this.variablesPrefix+(this.capitalize?o.toPascalCase(e):e):e}}export{h as CodeBuilder};
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(n,a,t,e){void 0===e&&(e=t);var i=Object.getOwnPropertyDescriptor(a,t);i&&!("get"in i?!a.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(n,e,i)}:function(n,a,t,e){void 0===e&&(e=t),n[e]=a[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(n,a){Object.defineProperty(n,"default",{enumerable:!0,value:a})}:function(n,a){n.default=a}),__importStar=this&&this.__importStar||function(n){if(n&&n.__esModule)return n;var a={};if(null!=n)for(var t in n)"default"!==t&&Object.prototype.hasOwnProperty.call(n,t)&&__createBinding(a,n,t);return __setModuleDefault(a,n),a},__importDefault=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeBuilder=void 0;const util=__importStar(require("util")),constants_1=require("./constants"),string_utility_1=__importDefault(require("./string-utility")),langToVarNameConvention={[constants_1.Lang.NODEJS]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.JAVASCRIPT]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.PYTHON]:constants_1.NamingVariableConventions.UNDER_SCORES,[constants_1.Lang.JAVA8]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.JAVA]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.CSHARP]:constants_1.NamingVariableConventions.PASCAL_CASE,[constants_1.Lang.CSHARPNEWTONSOFT]:constants_1.NamingVariableConventions.PASCAL_CASE,[constants_1.Lang.CURL]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.GO]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.PHP]:constants_1.NamingVariableConventions.CAMEL_CASE,[constants_1.Lang.RUBY]:constants_1.NamingVariableConventions.UNDER_SCORES,[constants_1.Lang.R]:constants_1.NamingVariableConventions.UNDER_SCORES},langOptions={default:{joinSymbol:"",variableWrapperFn:n=>n,stringLiteral:n=>n,variableDeclaration:n=>n,urlFieldName:"url"},[constants_1.Lang.CSHARP]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`var ${n} = "%s";`,urlFieldName:"fullUrl"},[constants_1.Lang.CSHARPNEWTONSOFT]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`var ${n} = "%s";`,urlFieldName:"fullUrl"},[constants_1.Lang.GO]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`${n} := "%s";`},[constants_1.Lang.JAVA]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`var ${n} = "%s";`,urlFieldName:"pathname"},[constants_1.Lang.JAVA8]:{joinSymbol:" + ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`String ${n} = "%s";`,urlFieldName:"fullUrl"},[constants_1.Lang.JAVASCRIPT]:{variableWrapperFn:n=>"${"+n+"}",variableDeclaration:n=>`const ${n} = '%s';`},[constants_1.Lang.NODEJS]:{variableWrapperFn:n=>"${"+n+"}",variableDeclaration:n=>`const ${n} = '%s';`},[constants_1.Lang.PHP]:{joinSymbol:" . ",stringLiteral:n=>`"${n}"`,variableDeclaration:n=>`const ${n} = "%s";`},[constants_1.Lang.PYTHON]:{stringLiteral:n=>`"${n}"`,joinSymbol:" + ",variableDeclaration:n=>`${n} = "%s"`},[constants_1.Lang.RUBY]:{joinSymbol:" + ",stringLiteral:n=>`'${n}'`,variableDeclaration:n=>`${n} = '%s'`},[constants_1.Lang.CURL]:{variableWrapperFn:(n,a)=>a||`{${n}}`,urlFieldName:"fullUrl",rawName:!0},[constants_1.Lang.R]:{joinSymbol:" %&% ",variableDeclaration:n=>`${n} = "%s"`,urlFieldName:"fullUrl",stringLiteral:n=>`"${n}"`,variableWrapperFn:n=>`${n}`}},reservedVariableNames=["response","request","requests","data","url","payload","main","accessToken","resp","Program","client","postData","App","httpClient","params","pathname","host","body","fetch","query"];class CodeBuilder{constructor({indentation:n,lineJoin:a="\n",variablesPrefix:t="",capitalize:e=!1,lang:i=constants_1.Lang.CURL}){Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"indentation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"variablesPrefix",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lineJoin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"capitalize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lang",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"langOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=[],this.indentation=n,this.variablesPrefix=t,this.lineJoin=a||"\n",this.capitalize=e,this.lang=i,this.langOptions=Object.assign(Object.assign({},langOptions.default),langOptions[i])}buildLine(n,a){let t="",e=2;if("string"==typeof n)e=1,a=n,n=0;else if(null===n)return null;for(;n;)t+=this.indentation,n--;const i=Array.prototype.slice.call(arguments,e,arguments.length);return i.unshift(t+a),util.format.apply(this,i)}unshift(...n){return this.code.unshift(this.buildLine.apply(this,n)),this}push(...n){return this.code.push(this.buildLine.apply(this,n)),this}blank(){return this.code.push(null),this}join(){return this.code.join(this.lineJoin)}clean(){this.code.splice(1)}var(n,a=constants_1.VariableType.CUSTOM){if(a===constants_1.VariableType.PATH){let a=this.variablesPrefix+n;switch(reservedVariableNames.includes(a)&&(a=`${a}_path`),langToVarNameConvention[this.lang]){case constants_1.NamingVariableConventions.UNDER_SCORES:a=string_utility_1.default.toSnakeCase(a);break;case constants_1.NamingVariableConventions.PASCAL_CASE:a=string_utility_1.default.toPascalCase(a);break;case constants_1.NamingVariableConventions.CAMEL_CASE:default:a=string_utility_1.default.toCamelCase(a)}return a}return this.variablesPrefix?this.variablesPrefix+(this.capitalize?string_utility_1.default.toPascalCase(n):n):n}}exports.CodeBuilder=CodeBuilder;
|
|
2
|
+
//# sourceMappingURL=code-builder.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SnippetRequest } from '../index
|
|
2
|
-
import type { CodeBuilder } from './code-builder
|
|
1
|
+
import type { SnippetRequest } from '../index';
|
|
2
|
+
import type { CodeBuilder } from './code-builder';
|
|
3
3
|
export declare function getPreserveTransformer({ body, authorizationHeader, }: {
|
|
4
4
|
body?: boolean;
|
|
5
5
|
authorizationHeader?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPreserveTransformer=getPreserveTransformer,exports.addIndentation=addIndentation,exports.parseUrlIntoOperands=parseUrlIntoOperands,exports.buildUrlExpression=buildUrlExpression,exports.printUrlVariablesDeclarations=printUrlVariablesDeclarations;const constants_1=require("./constants");function getPreserveTransformer({body:e,authorizationHeader:r}){return function(n,t,a){return e&&"body"===t&&"string"==typeof n.body?n.body:r&&"Authorization"===t&&"string"==typeof n.Authorization?n.Authorization:a}}function addIndentation(e,{level:r=0,indent:n=" ",firstLine:t=!0}={}){const a=n.repeat(r),s=e.replace(/(\r\n|\n|\r)/gm,`\n${a}`);return t?a.concat(s):s}function parseUrlIntoOperands(e,r){const n=Object.keys(r).map((r=>({name:r,idx:e.indexOf(`{${r}}`)}))).filter((({idx:e})=>e>-1)).sort(((e,r)=>e.idx-r.idx)),t=[];let a=0;for(const{name:r,idx:s}of n)s>a&&t.push({type:"string",value:e.substring(a,s)}),t.push({type:"variable",name:r}),a=s+r.length+2;return a<e.length&&t.push({type:"string",value:e.substring(a)}),t}function buildUrlExpression(e,r){const{joinSymbol:n,variableWrapperFn:t,stringLiteral:a,urlFieldName:s,rawName:i}=r.langOptions,{pathParameters:o={},serverVariables:l={}}=e,p=Object.assign(Object.assign({},o),l);return parseUrlIntoOperands(e[s]||"",p).map((e=>{if("variable"===e.type){const n=p[e.name],a=i?e.name:r.var(e.name,constants_1.VariableType.PATH);return t(a,n)}return a(e.value)})).join(n)}function printUrlVariablesDeclarations({pathParameters:e={},serverVariables:r={}},n,t){Object.entries(Object.assign(Object.assign({},e),r)).forEach((([e,r])=>{if("server"===e)return;const a=r||`YOUR_${e}_PARAMETER`,s=n.var(e,constants_1.VariableType.PATH);void 0!==t?n.push(t,n.langOptions.variableDeclaration(s),a):n.push(n.langOptions.variableDeclaration(s),a)}))}
|
|
2
|
+
//# sourceMappingURL=code-helpers.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
"use strict";var Lang,NamingVariableConventions,VariableType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.VariableType=exports.NamingVariableConventions=exports.Lang=void 0,function(a){a.NODEJS="Node.js",a.JAVASCRIPT="javascript",a.PYTHON="Python",a.JAVA8="Java8+Apache",a.JAVA="Java",a.CSHARP="C#",a.CSHARPNEWTONSOFT="C#+Newtonsoft",a.CURL="curl",a.GO="Go",a.PHP="PHP",a.RUBY="Ruby",a.R="R"}(Lang||(exports.Lang=Lang={})),function(a){a.UNDER_SCORES="under_scores",a.CAMEL_CASE="camelCase",a.PASCAL_CASE="PascalCase"}(NamingVariableConventions||(exports.NamingVariableConventions=NamingVariableConventions={})),function(a){a.IMPORT="import",a.CUSTOM="custom",a.PATH="path"}(VariableType||(exports.VariableType=VariableType={}));
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|