@redocly/openapi-docs 3.11.0-next.9 → 3.11.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/bin.js +4 -0
- package/dist/redocly-openapi-docs.min.js +10963 -11933
- 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 +9 -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 +4 -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 +24 -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 +126 -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 +48 -26
- 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/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
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.startCase=exports.snakeCase=exports.lowerCase=exports.camelCase=void 0;const rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboMarksExtendedRange="\\u1ab0-\\u1aff",rsComboMarksSupplementRange="\\u1dc0-\\u1dff",rsComboRange="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff",rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+"\\u2000-\\u206f"+rsSpaceRange,reQuotes=/['\u2019]/g,rsApos="['’]",rsBreak=`[${rsBreakRange}]`,rsCombo=`[${rsComboRange}]`,rsDigit="\\d",rsDingbat=`[${rsDingbatRange}]`,rsLower=`[${rsLowerRange}]`,rsMisc=`[^${rsAstralRange}${rsBreakRange+"\\d"+rsDingbatRange+rsLowerRange+rsUpperRange}]`,rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier=`(?:${rsCombo}|${rsFitz})`,rsNonAstral=`[^${rsAstralRange}]`,rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper=`[${rsUpperRange}]`,rsZWJ="\\u200d",rsMiscLower=`(?:${rsLower}|${rsMisc})`,rsMiscUpper=`(?:${rsUpper}|${rsMisc})`,rsOptContrLower="(?:['’](?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:['’](?:D|LL|M|RE|S|T|VE))?",reOptMod=`${rsModifier}?`,rsOptVar=`[${rsVarRange}]?`,rsOptJoin=`(?:${rsZWJ}(?:${[rsNonAstral,rsRegional,rsSurrPair].join("|")})${rsOptVar+reOptMod})*`,rsOrdLower="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsOrdUpper="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji=`(?:${[rsDingbat,rsRegional,rsSurrPair].join("|")})${rsSeq}`,reUnicodeWords=RegExp([`${rsUpper}?${rsLower}+${rsOptContrLower}(?=${[rsBreak,rsUpper,"$"].join("|")})`,`${rsMiscUpper}+${rsOptContrUpper}(?=${[rsBreak,rsUpper+rsMiscLower,"$"].join("|")})`,`${rsUpper}?${rsMiscLower}+${rsOptContrLower}`,`${rsUpper}+${rsOptContrUpper}`,rsOrdUpper,rsOrdLower,"\\d+",rsEmoji].join("|"),"g"),unicodeWords=r=>r.match(reUnicodeWords),reHasUnicode=RegExp(`[${rsZWJ+rsAstralRange+rsComboRange+rsVarRange}]`),hasUnicode=r=>reHasUnicode.test(r),rsAstral=`[${rsAstralRange}]`,rsNonAstralCombo=`${rsNonAstral}${rsCombo}?`,rsSymbol=`(?:${[rsNonAstralCombo,rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")})`,reUnicode=RegExp(`${rsFitz}(?=${rsFitz})|${rsSymbol+rsSeq}`,"g"),unicodeToArray=r=>r.match(reUnicode)||[],asciiToArray=r=>r.split(""),getTag=r=>{const e=Object.prototype.toString;return null==r?void 0===r?"[object Undefined]":"[object Null]":e.call(r)},isSymbol=r=>{const e=typeof r;return"symbol"==e||"object"===e&&null!=r&&"[object Symbol]"==getTag(r)},INFINITY=1/0,toString=r=>{if(null==r)return"";if("string"==typeof r)return r;if(Array.isArray(r))return`${r.map((r=>null==r?r:toString(r)))}`;if(isSymbol(r))return r.toString();const e=`${r}`;return"0"==e&&1/r==-Infinity?"-0":e},hasUnicodeWord=RegExp.prototype.test.bind(/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/),reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,asciiWords=r=>r.match(reAsciiWord),slice=(r,e,s)=>{let o=null==r?0:r.length;if(!o)return[];(e=null==e?0:e)<0&&(e=-e>o?0:o+e),(s=(s=void 0===s?o:s)>o?o:s)<0&&(s+=o),o=e>s?0:s-e>>>0,e>>>=0;let a=-1;const t=new Array(o);for(;++a<o;)t[a]=r[a+e];return t},words=r=>(hasUnicodeWord(r)?unicodeWords(r):asciiWords(r))||[],castSlice=(r,e)=>{const{length:s}=r;return!e&&s>=s?r:slice(r,e,s)},stringToArray=r=>hasUnicode(r)?unicodeToArray(r):asciiToArray(r),createCaseFirst=r=>e=>{if(!e)return"";const s=hasUnicode(e)?stringToArray(e):void 0,o=s?s[0]:e[0],a=s?castSlice(s,1).join(""):e.slice(1);return o[r]()+a},upperFirst=createCaseFirst("toUpperCase"),camelCase=r=>words(toString(r).replace(/['\u2019]/g,"")).reduce(((r,e,s)=>(e=e.toLowerCase(),r+(s?upperFirst(e):e))),"");exports.camelCase=camelCase;const lowerCase=r=>words(toString(r).replace(reQuotes,"")).reduce(((r,e,s)=>r+(s?" ":"")+e.toLowerCase()),"");exports.lowerCase=lowerCase;const snakeCase=r=>words(toString(r).replace(/['\u2019]/g,"")).reduce(((r,e,s)=>r+(s?"_":"")+e.toLowerCase()),"");exports.snakeCase=snakeCase;const startCase=r=>words(`${r}`.replace(/['\u2019]/g,"")).reduce(((r,e,s)=>r+(s?" ":"")+upperFirst(e)),"");exports.startCase=startCase;
|
|
2
|
+
//# sourceMappingURL=lodash-int.js.map
|
|
@@ -1,37 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const variablesPrefixserverVariable1 = 'serverVariable1Value';
|
|
4
|
-
const variablesPrefixserverVariable2 = 'serverVariable2Value';`,javascript:`const variablesPrefixpathParam1 = 'pathParam1Value';
|
|
5
|
-
const variablesPrefixpathParam2 = 'pathParam2Value';
|
|
6
|
-
const variablesPrefixserverVariable1 = 'serverVariable1Value';
|
|
7
|
-
const variablesPrefixserverVariable2 = 'serverVariable2Value';`,Python:`variables_prefixpath_param_1 = "pathParam1Value"
|
|
8
|
-
variables_prefixpath_param_2 = "pathParam2Value"
|
|
9
|
-
variables_prefixserver_variable_1 = "serverVariable1Value"
|
|
10
|
-
variables_prefixserver_variable_2 = "serverVariable2Value"`,"Java8+Apache":`String variablesPrefixpathParam1 = "pathParam1Value";
|
|
11
|
-
String variablesPrefixpathParam2 = "pathParam2Value";
|
|
12
|
-
String variablesPrefixserverVariable1 = "serverVariable1Value";
|
|
13
|
-
String variablesPrefixserverVariable2 = "serverVariable2Value";`,Java:`var variablesPrefixpathParam1 = "pathParam1Value";
|
|
14
|
-
var variablesPrefixpathParam2 = "pathParam2Value";
|
|
15
|
-
var variablesPrefixserverVariable1 = "serverVariable1Value";
|
|
16
|
-
var variablesPrefixserverVariable2 = "serverVariable2Value";`,"C#":`var VariablesPrefixpathParam1 = "pathParam1Value";
|
|
17
|
-
var VariablesPrefixpathParam2 = "pathParam2Value";
|
|
18
|
-
var VariablesPrefixserverVariable1 = "serverVariable1Value";
|
|
19
|
-
var VariablesPrefixserverVariable2 = "serverVariable2Value";`,"C#+Newtonsoft":`var VariablesPrefixpathParam1 = "pathParam1Value";
|
|
20
|
-
var VariablesPrefixpathParam2 = "pathParam2Value";
|
|
21
|
-
var VariablesPrefixserverVariable1 = "serverVariable1Value";
|
|
22
|
-
var VariablesPrefixserverVariable2 = "serverVariable2Value";`,curl:`variablesPrefixpathParam1 pathParam1Value
|
|
23
|
-
variablesPrefixpathParam2 pathParam2Value
|
|
24
|
-
variablesPrefixserverVariable1 serverVariable1Value
|
|
25
|
-
variablesPrefixserverVariable2 serverVariable2Value`,Go:`variablesPrefixpathParam1 := "pathParam1Value";
|
|
26
|
-
variablesPrefixpathParam2 := "pathParam2Value";
|
|
27
|
-
variablesPrefixserverVariable1 := "serverVariable1Value";
|
|
28
|
-
variablesPrefixserverVariable2 := "serverVariable2Value";`,PHP:`const variablesPrefixpathParam1 = "pathParam1Value";
|
|
29
|
-
const variablesPrefixpathParam2 = "pathParam2Value";
|
|
30
|
-
const variablesPrefixserverVariable1 = "serverVariable1Value";
|
|
31
|
-
const variablesPrefixserverVariable2 = "serverVariable2Value";`,Ruby:`variables_prefixpath_param_1 = 'pathParam1Value'
|
|
32
|
-
variables_prefixpath_param_2 = 'pathParam2Value'
|
|
33
|
-
variables_prefixserver_variable_1 = 'serverVariable1Value'
|
|
34
|
-
variables_prefixserver_variable_2 = 'serverVariable2Value'`,R:`variables_prefixpath_param_1 = "pathParam1Value"
|
|
35
|
-
variables_prefixpath_param_2 = "pathParam2Value"
|
|
36
|
-
variables_prefixserver_variable_1 = "serverVariable1Value"
|
|
37
|
-
variables_prefixserver_variable_2 = "serverVariable2Value"`},e={},i={"Node.js":"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",javascript:"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",Python:'"http://acme.com/" + variables_prefixpath_param_1 + "/" + variables_prefixpath_param_2 + "/" + variables_prefixserver_variable_1 + "/" + variables_prefixserver_variable_2',"Java8+Apache":'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',Java:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',"C#":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',"C#+Newtonsoft":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',curl:"http://acme.com/pathParam1Value/pathParam2Value/serverVariable1Value/serverVariable2Value",Go:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',PHP:'"http://acme.com/" . variablesPrefixpathParam1 . "/" . variablesPrefixpathParam2 . "/" . variablesPrefixserverVariable1 . "/" . variablesPrefixserverVariable2',Ruby:"'http://acme.com/' + variables_prefixpath_param_1 + '/' + variables_prefixpath_param_2 + '/' + variables_prefixserver_variable_1 + '/' + variables_prefixserver_variable_2",R:'"http://acme.com/" %&% variables_prefixpath_param_1 %&% "/" %&% variables_prefixpath_param_2 %&% "/" %&% variables_prefixserver_variable_1 %&% "/" %&% variables_prefixserver_variable_2'};export{e as buildUrlExpressionCases,i as buildUrlExpressionData,a as commonVariablesInput,r as printUrlVariablesDeclarationsOutput};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildUrlExpressionData=exports.buildUrlExpressionCases=exports.printUrlVariablesDeclarationsOutput=exports.commonVariablesInput=void 0,exports.commonVariablesInput={pathParameters:{pathParam1:"pathParam1Value",pathParam2:"pathParam2Value"},serverVariables:{serverVariable1:"serverVariable1Value",serverVariable2:"serverVariable2Value"}},exports.printUrlVariablesDeclarationsOutput={"Node.js":"const variablesPrefixpathParam1 = 'pathParam1Value';\nconst variablesPrefixpathParam2 = 'pathParam2Value';\nconst variablesPrefixserverVariable1 = 'serverVariable1Value';\nconst variablesPrefixserverVariable2 = 'serverVariable2Value';",javascript:"const variablesPrefixpathParam1 = 'pathParam1Value';\nconst variablesPrefixpathParam2 = 'pathParam2Value';\nconst variablesPrefixserverVariable1 = 'serverVariable1Value';\nconst variablesPrefixserverVariable2 = 'serverVariable2Value';",Python:'variables_prefixpath_param_1 = "pathParam1Value"\nvariables_prefixpath_param_2 = "pathParam2Value"\nvariables_prefixserver_variable_1 = "serverVariable1Value"\nvariables_prefixserver_variable_2 = "serverVariable2Value"',"Java8+Apache":'String variablesPrefixpathParam1 = "pathParam1Value";\nString variablesPrefixpathParam2 = "pathParam2Value";\nString variablesPrefixserverVariable1 = "serverVariable1Value";\nString variablesPrefixserverVariable2 = "serverVariable2Value";',Java:'var variablesPrefixpathParam1 = "pathParam1Value";\nvar variablesPrefixpathParam2 = "pathParam2Value";\nvar variablesPrefixserverVariable1 = "serverVariable1Value";\nvar variablesPrefixserverVariable2 = "serverVariable2Value";',"C#":'var VariablesPrefixpathParam1 = "pathParam1Value";\nvar VariablesPrefixpathParam2 = "pathParam2Value";\nvar VariablesPrefixserverVariable1 = "serverVariable1Value";\nvar VariablesPrefixserverVariable2 = "serverVariable2Value";',"C#+Newtonsoft":'var VariablesPrefixpathParam1 = "pathParam1Value";\nvar VariablesPrefixpathParam2 = "pathParam2Value";\nvar VariablesPrefixserverVariable1 = "serverVariable1Value";\nvar VariablesPrefixserverVariable2 = "serverVariable2Value";',curl:"variablesPrefixpathParam1 pathParam1Value\nvariablesPrefixpathParam2 pathParam2Value\nvariablesPrefixserverVariable1 serverVariable1Value\nvariablesPrefixserverVariable2 serverVariable2Value",Go:'variablesPrefixpathParam1 := "pathParam1Value";\nvariablesPrefixpathParam2 := "pathParam2Value";\nvariablesPrefixserverVariable1 := "serverVariable1Value";\nvariablesPrefixserverVariable2 := "serverVariable2Value";',PHP:'const variablesPrefixpathParam1 = "pathParam1Value";\nconst variablesPrefixpathParam2 = "pathParam2Value";\nconst variablesPrefixserverVariable1 = "serverVariable1Value";\nconst variablesPrefixserverVariable2 = "serverVariable2Value";',Ruby:"variables_prefixpath_param_1 = 'pathParam1Value'\nvariables_prefixpath_param_2 = 'pathParam2Value'\nvariables_prefixserver_variable_1 = 'serverVariable1Value'\nvariables_prefixserver_variable_2 = 'serverVariable2Value'",R:'variables_prefixpath_param_1 = "pathParam1Value"\nvariables_prefixpath_param_2 = "pathParam2Value"\nvariables_prefixserver_variable_1 = "serverVariable1Value"\nvariables_prefixserver_variable_2 = "serverVariable2Value"'},exports.buildUrlExpressionCases={},exports.buildUrlExpressionData={"Node.js":"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",javascript:"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",Python:'"http://acme.com/" + variables_prefixpath_param_1 + "/" + variables_prefixpath_param_2 + "/" + variables_prefixserver_variable_1 + "/" + variables_prefixserver_variable_2',"Java8+Apache":'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',Java:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',"C#":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',"C#+Newtonsoft":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',curl:"http://acme.com/pathParam1Value/pathParam2Value/serverVariable1Value/serverVariable2Value",Go:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',PHP:'"http://acme.com/" . variablesPrefixpathParam1 . "/" . variablesPrefixpathParam2 . "/" . variablesPrefixserverVariable1 . "/" . variablesPrefixserverVariable2',Ruby:"'http://acme.com/' + variables_prefixpath_param_1 + '/' + variables_prefixpath_param_2 + '/' + variables_prefixserver_variable_1 + '/' + variables_prefixserver_variable_2",R:'"http://acme.com/" %&% variables_prefixpath_param_1 %&% "/" %&% variables_prefixpath_param_2 %&% "/" %&% variables_prefixserver_variable_1 %&% "/" %&% variables_prefixserver_variable_2'};
|
|
2
|
+
//# sourceMappingURL=code-helpers-mock.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
"use strict";function default_1(e,a){if(void 0===e[a.name])return e[a.name]=a.value,e;if(e[a.name]instanceof Array)return e[a.name].push(a.value),e;const n=[e[a.name],a.value];return e[a.name]=n,e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=default_1;
|
|
2
|
+
//# sourceMappingURL=reducer.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const util_1=require("util");exports.default={quote:function(e){return/^[a-z0-9-_/.@%^=:]+$/i.test(e)?e:(0,util_1.format)("'%s'",e.replace(/'/g,"'\\''"))},escape:function(e){return e.replace(/\r/g,"\\r").replace(/\n/g,"\\n")}};
|
|
2
|
+
//# sourceMappingURL=shell.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const lodash_int_1=require("./lodash-int");class StringUtility{static toCamelCase(t){return(0,lodash_int_1.camelCase)(t)}static toTitleCase(t){return(0,lodash_int_1.startCase)((0,lodash_int_1.camelCase)(t))}static toPascalCase(t){return(0,lodash_int_1.startCase)((0,lodash_int_1.camelCase)(t)).replace(/ /g,"")}static toLowerCase(t){return(0,lodash_int_1.lowerCase)(t).replace(/ /g,"")}static toSnakeCase(t){return(0,lodash_int_1.snakeCase)(t)}}exports.default=StringUtility;
|
|
2
|
+
//# sourceMappingURL=string-utility.js.map
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import type { CustomHAR } from '
|
|
2
|
-
import type { PostData } from '../har
|
|
1
|
+
import type { CustomHAR } from '..';
|
|
2
|
+
import type { PostData } from '../har';
|
|
3
3
|
interface ParsedUrlQueryInput {
|
|
4
4
|
[key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null;
|
|
5
5
|
}
|
|
6
6
|
export type KeyValueAreStrings = {
|
|
7
7
|
[key in string]: string;
|
|
8
8
|
};
|
|
9
|
-
type QueryObj = {
|
|
10
|
-
[key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null;
|
|
11
|
-
};
|
|
12
|
-
type UriObject = URL & {
|
|
13
|
-
path: string;
|
|
14
|
-
queryObj: QueryObj;
|
|
15
|
-
query: QueryObj;
|
|
16
|
-
};
|
|
17
9
|
export interface SnippetRequest extends CustomHAR {
|
|
18
|
-
queryObj?:
|
|
10
|
+
queryObj?: {
|
|
11
|
+
[key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null;
|
|
12
|
+
};
|
|
19
13
|
headersObj: KeyValueAreStrings;
|
|
20
14
|
cookiesObj?: KeyValueAreStrings;
|
|
21
15
|
allHeaders: KeyValueAreStrings;
|
|
@@ -23,7 +17,7 @@ export interface SnippetRequest extends CustomHAR {
|
|
|
23
17
|
jsonObj?: GenericObject;
|
|
24
18
|
paramsObj?: ParsedUrlQueryInput;
|
|
25
19
|
};
|
|
26
|
-
uriObj
|
|
20
|
+
uriObj?: any;
|
|
27
21
|
pathParameters: KeyValueAreStrings;
|
|
28
22
|
serverVariables: Record<string, string>;
|
|
29
23
|
fullUrl?: string;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r);var s=Object.getOwnPropertyDescriptor(t,r);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,s)}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),__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 r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);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.HTTPSnippet=void 0;const url=__importStar(require("url")),utils_1=require("../../utils"),constants_1=require("../../../constants"),targets_1=__importDefault(require("./targets")),reducer_1=__importDefault(require("./helpers/reducer")),utils_2=require("../../../utils");class HTTPSnippet{constructor(e){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const t=Object.assign({},e);this.request=this.prepare(Object.assign(Object.assign({},t),{httpVersion:t.httpVersion||"HTTP/1.1",queryString:t.queryString||[],headers:t.headers||[],cookies:t.cookies||[],postData:t.postData?Object.assign(Object.assign({},t.postData),{jsonObj:void 0,paramsObj:void 0}):void 0,bodySize:0,headersSize:0,queryObj:{},headersObj:{},cookiesObj:{},allHeaders:{},uriObj:{},fullUrl:"",pathParameters:t.pathParameters||{},serverVariables:t.serverVariables||{}}))}prepare(e){var t;if(e.queryString&&e.queryString.length&&(e.queryObj=e.queryString.reduce(reducer_1.default,{})),e.headers&&e.headers.length){const t=/^HTTP\/2/;e.headersObj=e.headers.reduce((function(r,a){let s=a.name;return e.httpVersion.match(t)&&(s=s.toLowerCase()),r[s]=a.value,r}),{})}e.cookies&&e.cookies.length&&(e.cookiesObj=e.cookies.reduceRight((function(e,t){return e[t.name]=t.value,e}),{}));const r=e.cookies.map((function(e){return encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)}));if(r.length&&(e.allHeaders.cookie=r.join("; ")),e.postData)switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case"multipart/mixed":case"multipart/related":case constants_1.MediaTypes.MULTIPART:case"multipart/alternative":break;case constants_1.MediaTypes.URL_ENCODED:(null===(t=e.postData)||void 0===t?void 0:t.params)?(e.postData.paramsObj=e.postData.params.reduce(reducer_1.default,{}),e.postData.text=utils_2.queryString.stringify(e.postData.paramsObj)):e.postData.text="";break;case"text/json":case"text/x-json":case constants_1.MediaTypes.JSON:case"application/x-json":if(e.postData.text)try{e.postData.jsonObj=JSON.parse(e.postData.text)}catch(t){e.postData.mimeType="text/plain"}}return e.allHeaders=Object.assign(e.allHeaders,e.headersObj),e.uriObj=url.parse(e.url,!0,!0),e.queryObj=Object.assign(e.queryObj,e.uriObj.query),e.uriObj.query=null,e.uriObj.search=null,e.uriObj.path=e.uriObj.pathname=(0,utils_1.unescapeServerVariables)(e.uriObj.pathname),e.url=(0,utils_1.unescapeServerVariables)(url.format(e.uriObj)),e.uriObj.query=e.queryObj,e.uriObj.search=utils_2.queryString.stringify(e.queryObj),e.uriObj.search&&(e.uriObj.path=e.uriObj.pathname+"?"+e.uriObj.search),e.fullUrl=(0,utils_1.unescapeServerVariables)(url.format(e.uriObj)),e}convert(e,t,r){!r&&t&&(r=t);const a=this._matchTarget(e,t);if(a){const s=a(this.request,r,{target:e,client:t});return 1===s.length?s[0]:s}throw new Error("Cannot match target")}_matchTarget(e,t){return!!Object.prototype.hasOwnProperty.call(targets_1.default,e)&&("string"==typeof t&&"function"==typeof targets_1.default[e][t]?targets_1.default[e][t]:targets_1.default[e][targets_1.default[e].info.default])}}exports.HTTPSnippet=HTTPSnippet;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|