@scalar/api-client 2.38.3 → 2.39.0
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/CHANGELOG.md +20 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/assets/computer.ascii.virtual.js +6 -0
- package/dist/assets/computer.ascii.virtual.js.map +1 -0
- package/dist/assets/keycap.ascii.virtual.js +6 -0
- package/dist/assets/keycap.ascii.virtual.js.map +1 -0
- package/dist/assets/rabbit.ascii.virtual.js +6 -0
- package/dist/assets/rabbit.ascii.virtual.js.map +1 -0
- package/dist/assets/rabbitjump.ascii.virtual.js +6 -0
- package/dist/assets/rabbitjump.ascii.virtual.js.map +1 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +9 -0
- package/dist/components/AddressBar/AddressBar.vue.js.map +1 -0
- package/dist/components/AddressBar/AddressBar.vue.script.js +204 -0
- package/dist/components/AddressBar/AddressBar.vue.script.js.map +1 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.js +9 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.js.map +1 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.script.js +85 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.script.js.map +1 -0
- package/dist/components/AddressBar/httpStatusCodeColors.js +20 -0
- package/dist/components/AddressBar/httpStatusCodeColors.js.map +1 -0
- package/dist/components/AddressBar/index.d.ts +1 -1
- package/dist/components/AddressBar/index.js +1 -4
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +10 -0
- package/dist/components/CodeInput/CodeInput.vue.js.map +1 -0
- package/dist/components/CodeInput/CodeInput.vue.script.js +294 -0
- package/dist/components/CodeInput/CodeInput.vue.script.js.map +1 -0
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +135 -0
- package/dist/components/CodeInput/codeVariableWidget.js.map +1 -0
- package/dist/components/CodeInput/index.d.ts +1 -1
- package/dist/components/CodeInput/index.js +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +7 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.js.map +1 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.script.js +42 -0
- package/dist/components/CommandPalette/CommandActionForm.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.js +7 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.js.map +1 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.script.js +55 -0
- package/dist/components/CommandPalette/CommandActionInput.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.script.js +78 -0
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteExample.vue.script.js +104 -0
- package/dist/components/CommandPalette/CommandPaletteExample.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.script.js +181 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +9 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.script.js +108 -0
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.script.js +108 -0
- package/dist/components/CommandPalette/CommandPaletteServer.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.script.js +70 -0
- package/dist/components/CommandPalette/CommandPaletteTag.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +7 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js.map +1 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.script.js +49 -0
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +9 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.js.map +1 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.script.js +323 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +7 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.js.map +1 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.script.js +40 -0
- package/dist/components/CommandPalette/WatchModeToggle.vue.script.js.map +1 -0
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/CommandPalette/index.js +1 -2
- package/dist/components/DataTable/DataTable.vue.js +7 -0
- package/dist/components/DataTable/DataTable.vue.js.map +1 -0
- package/dist/components/DataTable/DataTable.vue.script.js +30 -0
- package/dist/components/DataTable/DataTable.vue.script.js.map +1 -0
- package/dist/components/DataTable/DataTableCell.vue.js +7 -0
- package/dist/components/DataTable/DataTableCell.vue.js.map +1 -0
- package/dist/components/DataTable/DataTableCell.vue.script.js +21 -0
- package/dist/components/DataTable/DataTableCell.vue.script.js.map +1 -0
- package/dist/components/DataTable/DataTableCheckbox.vue.js +7 -0
- package/dist/components/DataTable/DataTableCheckbox.vue.js.map +1 -0
- package/dist/components/DataTable/DataTableCheckbox.vue.script.js +43 -0
- package/dist/components/DataTable/DataTableCheckbox.vue.script.js.map +1 -0
- package/dist/components/DataTable/DataTableHeader.vue.js +7 -0
- package/dist/components/DataTable/DataTableHeader.vue.js.map +1 -0
- package/dist/components/DataTable/DataTableHeader.vue.script.js +20 -0
- package/dist/components/DataTable/DataTableHeader.vue.script.js.map +1 -0
- package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
- package/dist/components/DataTable/DataTableInput.vue.js +9 -0
- package/dist/components/DataTable/DataTableInput.vue.js.map +1 -0
- package/dist/components/DataTable/DataTableInput.vue.script.js +164 -0
- package/dist/components/DataTable/DataTableInput.vue.script.js.map +1 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.js +7 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.js.map +1 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.script.js +150 -0
- package/dist/components/DataTable/DataTableInputSelect.vue.script.js.map +1 -0
- package/dist/components/DataTable/DataTableRow.vue.js +13 -0
- package/dist/components/DataTable/DataTableRow.vue.js.map +1 -0
- package/dist/components/DataTable/DataTableText.vue.js +7 -0
- package/dist/components/DataTable/DataTableText.vue.js.map +1 -0
- package/dist/components/DataTable/DataTableText.vue.script.js +20 -0
- package/dist/components/DataTable/DataTableText.vue.script.js.map +1 -0
- package/dist/components/DataTable/index.d.ts +8 -8
- package/dist/components/DataTable/index.js +8 -5
- package/dist/components/EmptyState.vue.js +9 -0
- package/dist/components/EmptyState.vue.js.map +1 -0
- package/dist/components/EmptyState.vue.script.js +41 -0
- package/dist/components/EmptyState.vue.script.js.map +1 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +7 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js.map +1 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.script.js +111 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.script.js.map +1 -0
- package/dist/components/Form/Form.vue.js +7 -0
- package/dist/components/Form/Form.vue.js.map +1 -0
- package/dist/components/Form/Form.vue.script.js +82 -0
- package/dist/components/Form/Form.vue.script.js.map +1 -0
- package/dist/components/Form/LabelInput.vue.d.ts +1 -1
- package/dist/components/Form/LabelInput.vue.js +9 -0
- package/dist/components/Form/LabelInput.vue.js.map +1 -0
- package/dist/components/Form/LabelInput.vue.script.js +39 -0
- package/dist/components/Form/LabelInput.vue.script.js.map +1 -0
- package/dist/components/HelpfulLink.vue.js +7 -0
- package/dist/components/HelpfulLink.vue.js.map +1 -0
- package/dist/components/HelpfulLink.vue.script.js +21 -0
- package/dist/components/HelpfulLink.vue.script.js.map +1 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js +9 -0
- package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -0
- package/dist/components/HttpMethod/HttpMethod.vue.script.js +76 -0
- package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -0
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/HttpMethod/index.js +1 -1
- package/dist/components/IconSelector.vue.js +7 -0
- package/dist/components/IconSelector.vue.js.map +1 -0
- package/dist/components/IconSelector.vue.script.js +65 -0
- package/dist/components/IconSelector.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/DropEventListener.vue.js +7 -0
- package/dist/components/ImportCollection/DropEventListener.vue.js.map +1 -0
- package/dist/components/ImportCollection/DropEventListener.vue.script.js +91 -0
- package/dist/components/ImportCollection/DropEventListener.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +7 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js.map +1 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.script.js +102 -0
- package/dist/components/ImportCollection/ImportCollectionListener.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +8 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js.map +1 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.script.js +206 -0
- package/dist/components/ImportCollection/ImportCollectionModal.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.js +7 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.js.map +1 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.script.js +82 -0
- package/dist/components/ImportCollection/ImportNowButton.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +7 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.js.map +1 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.script.js +50 -0
- package/dist/components/ImportCollection/IntegrationLogo.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.js +7 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.js.map +1 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.script.js +31 -0
- package/dist/components/ImportCollection/PasteEventListener.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/PrefetchError.vue.js +7 -0
- package/dist/components/ImportCollection/PrefetchError.vue.js.map +1 -0
- package/dist/components/ImportCollection/PrefetchError.vue.script.js +32 -0
- package/dist/components/ImportCollection/PrefetchError.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +7 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js.map +1 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.script.js +21 -0
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +7 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js.map +1 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.script.js +114 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.script.js.map +1 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +109 -0
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js.map +1 -0
- package/dist/components/ImportCollection/index.d.ts +1 -1
- package/dist/components/ImportCollection/index.js +1 -1
- package/dist/components/ImportCollection/utils/get-openapi-version.js +26 -0
- package/dist/components/ImportCollection/utils/get-openapi-version.js.map +1 -0
- package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
- package/dist/components/ImportCollection/utils/import-collection.js +23 -0
- package/dist/components/ImportCollection/utils/import-collection.js.map +1 -0
- package/dist/components/ImportCollection/utils/is-document.js +12 -0
- package/dist/components/ImportCollection/utils/is-document.js.map +1 -0
- package/dist/components/ImportCollection/utils/is-url.js +14 -0
- package/dist/components/ImportCollection/utils/is-url.js.map +1 -0
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +13 -0
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js.map +1 -0
- package/dist/components/OpenApiClientButton.vue.js +9 -0
- package/dist/components/OpenApiClientButton.vue.js.map +1 -0
- package/dist/components/OpenApiClientButton.vue.script.js +58 -0
- package/dist/components/OpenApiClientButton.vue.script.js.map +1 -0
- package/dist/components/ScalarAsciiArt.vue.js +9 -0
- package/dist/components/ScalarAsciiArt.vue.js.map +1 -0
- package/dist/components/ScalarAsciiArt.vue.script.js +42 -0
- package/dist/components/ScalarAsciiArt.vue.script.js.map +1 -0
- package/dist/components/Search/useSearch.js +110 -0
- package/dist/components/Search/useSearch.js.map +1 -0
- package/dist/components/SectionFilter.vue.js +9 -0
- package/dist/components/SectionFilter.vue.js.map +1 -0
- package/dist/components/SectionFilter.vue.script.js +69 -0
- package/dist/components/SectionFilter.vue.script.js.map +1 -0
- package/dist/components/SectionFilterButton.vue.js +7 -0
- package/dist/components/SectionFilterButton.vue.js.map +1 -0
- package/dist/components/SectionFilterButton.vue.script.js +30 -0
- package/dist/components/SectionFilterButton.vue.script.js.map +1 -0
- package/dist/components/Server/ServerDropdown.vue.js +7 -0
- package/dist/components/Server/ServerDropdown.vue.js.map +1 -0
- package/dist/components/Server/ServerDropdown.vue.script.js +133 -0
- package/dist/components/Server/ServerDropdown.vue.script.js.map +1 -0
- package/dist/components/Server/ServerDropdownItem.vue.js +9 -0
- package/dist/components/Server/ServerDropdownItem.vue.js.map +1 -0
- package/dist/components/Server/ServerDropdownItem.vue.script.js +90 -0
- package/dist/components/Server/ServerDropdownItem.vue.script.js.map +1 -0
- package/dist/components/Server/ServerSelector.vue.js +7 -0
- package/dist/components/Server/ServerSelector.vue.js.map +1 -0
- package/dist/components/Server/ServerSelector.vue.script.js +87 -0
- package/dist/components/Server/ServerSelector.vue.script.js.map +1 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +7 -0
- package/dist/components/Server/ServerVariablesForm.vue.js.map +1 -0
- package/dist/components/Server/ServerVariablesForm.vue.script.js +64 -0
- package/dist/components/Server/ServerVariablesForm.vue.script.js.map +1 -0
- package/dist/components/Server/ServerVariablesSelect.vue.js +7 -0
- package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -0
- package/dist/components/Server/ServerVariablesSelect.vue.script.js +53 -0
- package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +1 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.js +7 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.script.js +34 -0
- package/dist/components/Server/ServerVariablesTextbox.vue.script.js.map +1 -0
- package/dist/components/Server/index.d.ts +3 -3
- package/dist/components/Server/index.js +3 -2
- package/dist/components/SideNav/DownloadAppButton.vue.js +9 -0
- package/dist/components/SideNav/DownloadAppButton.vue.js.map +1 -0
- package/dist/components/SideNav/DownloadAppButton.vue.script.js +31 -0
- package/dist/components/SideNav/DownloadAppButton.vue.script.js.map +1 -0
- package/dist/components/SideNav/SideHelp.vue.js +7 -0
- package/dist/components/SideNav/SideHelp.vue.js.map +1 -0
- package/dist/components/SideNav/SideHelp.vue.script.js +102 -0
- package/dist/components/SideNav/SideHelp.vue.script.js.map +1 -0
- package/dist/components/SideNav/SideNav.vue.js +7 -0
- package/dist/components/SideNav/SideNav.vue.js.map +1 -0
- package/dist/components/SideNav/SideNav.vue.script.js +80 -0
- package/dist/components/SideNav/SideNav.vue.script.js.map +1 -0
- package/dist/components/SideNav/SideNavGroup.vue.js +7 -0
- package/dist/components/SideNav/SideNavGroup.vue.js.map +1 -0
- package/dist/components/SideNav/SideNavGroup.vue.script.js +16 -0
- package/dist/components/SideNav/SideNavGroup.vue.script.js.map +1 -0
- package/dist/components/SideNav/SideNavLink.vue.js +7 -0
- package/dist/components/SideNav/SideNavLink.vue.js.map +1 -0
- package/dist/components/SideNav/SideNavLink.vue.script.js +32 -0
- package/dist/components/SideNav/SideNavLink.vue.script.js.map +1 -0
- package/dist/components/SideNav/SideNavRouterLink.vue.js +7 -0
- package/dist/components/SideNav/SideNavRouterLink.vue.js.map +1 -0
- package/dist/components/SideNav/SideNavRouterLink.vue.script.js +34 -0
- package/dist/components/SideNav/SideNavRouterLink.vue.script.js.map +1 -0
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +7 -0
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -0
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js +38 -0
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js.map +1 -0
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +7 -0
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js.map +1 -0
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.script.js +56 -0
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.script.js.map +1 -0
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +7 -0
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js.map +1 -0
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.script.js +31 -0
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.script.js.map +1 -0
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +7 -0
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -0
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js +41 -0
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.vue.js +9 -0
- package/dist/components/Sidebar/Sidebar.vue.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.vue.script.js +71 -0
- package/dist/components/Sidebar/Sidebar.vue.script.js.map +1 -0
- package/dist/components/Sidebar/SidebarButton.vue.js +7 -0
- package/dist/components/Sidebar/SidebarButton.vue.js.map +1 -0
- package/dist/components/Sidebar/SidebarButton.vue.script.js +36 -0
- package/dist/components/Sidebar/SidebarButton.vue.script.js.map +1 -0
- package/dist/components/Sidebar/SidebarList.vue.js +13 -0
- package/dist/components/Sidebar/SidebarList.vue.js.map +1 -0
- package/dist/components/Sidebar/SidebarListElement.vue.js +10 -0
- package/dist/components/Sidebar/SidebarListElement.vue.js.map +1 -0
- package/dist/components/Sidebar/SidebarListElement.vue.script.js +128 -0
- package/dist/components/Sidebar/SidebarListElement.vue.script.js.map +1 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +7 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.js.map +1 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.script.js +97 -0
- package/dist/components/Sidebar/SidebarListElementActions.vue.script.js.map +1 -0
- package/dist/components/Sidebar/SidebarToggle.vue.js +7 -0
- package/dist/components/Sidebar/SidebarToggle.vue.js.map +1 -0
- package/dist/components/Sidebar/SidebarToggle.vue.script.js +47 -0
- package/dist/components/Sidebar/SidebarToggle.vue.script.js.map +1 -0
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/TopNav/TopNav.vue.js +7 -0
- package/dist/components/TopNav/TopNav.vue.js.map +1 -0
- package/dist/components/TopNav/TopNav.vue.script.js +232 -0
- package/dist/components/TopNav/TopNav.vue.script.js.map +1 -0
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +9 -0
- package/dist/components/TopNav/TopNavItem.vue.js.map +1 -0
- package/dist/components/TopNav/TopNavItem.vue.script.js +129 -0
- package/dist/components/TopNav/TopNavItem.vue.script.js.map +1 -0
- package/dist/components/ViewLayout/ViewLayout.vue.js +7 -0
- package/dist/components/ViewLayout/ViewLayout.vue.js.map +1 -0
- package/dist/components/ViewLayout/ViewLayout.vue.script.js +16 -0
- package/dist/components/ViewLayout/ViewLayout.vue.script.js.map +1 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +7 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js.map +1 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.script.js +84 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.script.js.map +1 -0
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +13 -0
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js.map +1 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +7 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js.map +1 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.script.js +21 -0
- package/dist/components/ViewLayout/ViewLayoutSection.vue.script.js.map +1 -0
- package/dist/components/ViewLayout/index.d.ts +1 -1
- package/dist/components/ViewLayout/index.js +1 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +3 -6
- package/dist/constants.js +27 -0
- package/dist/constants.js.map +1 -0
- package/dist/data/httpHeaders.js +539 -0
- package/dist/data/httpHeaders.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/useClientConfig.js +10 -0
- package/dist/hooks/useClientConfig.js.map +1 -0
- package/dist/hooks/useFileDialog.js +33 -0
- package/dist/hooks/useFileDialog.js.map +1 -0
- package/dist/hooks/useLayout.js +13 -0
- package/dist/hooks/useLayout.js.map +1 -0
- package/dist/hooks/useResponseBody.js +32 -0
- package/dist/hooks/useResponseBody.js.map +1 -0
- package/dist/hooks/useSidebar.d.ts +1 -1
- package/dist/hooks/useSidebar.js +36 -0
- package/dist/hooks/useSidebar.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -7
- package/dist/layouts/App/ApiClientApp.vue.js +8 -0
- package/dist/layouts/App/ApiClientApp.vue.js.map +1 -0
- package/dist/layouts/App/ApiClientApp.vue.script.js +80 -0
- package/dist/layouts/App/ApiClientApp.vue.script.js.map +1 -0
- package/dist/layouts/App/MainLayout.vue.js +7 -0
- package/dist/layouts/App/MainLayout.vue.js.map +1 -0
- package/dist/layouts/App/MainLayout.vue.script.js +22 -0
- package/dist/layouts/App/MainLayout.vue.script.js.map +1 -0
- package/dist/layouts/App/create-api-client-app.d.ts +9 -9
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +36 -0
- package/dist/layouts/App/create-api-client-app.js.map +1 -0
- package/dist/layouts/App/hotkeys.js +74 -0
- package/dist/layouts/App/hotkeys.js.map +1 -0
- package/dist/layouts/App/index.d.ts +2 -2
- package/dist/layouts/App/index.js +2 -4
- package/dist/layouts/Modal/ApiClientModal.vue.js +7 -0
- package/dist/layouts/Modal/ApiClientModal.vue.js.map +1 -0
- package/dist/layouts/Modal/ApiClientModal.vue.script.js +41 -0
- package/dist/layouts/Modal/ApiClientModal.vue.script.js.map +1 -0
- package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +34 -0
- package/dist/layouts/Modal/create-api-client-modal.js.map +1 -0
- package/dist/layouts/Modal/index.d.ts +2 -2
- package/dist/layouts/Modal/index.js +1 -2
- package/dist/layouts/Web/ApiClientWeb.vue.js +8 -0
- package/dist/layouts/Web/ApiClientWeb.vue.js.map +1 -0
- package/dist/layouts/Web/ApiClientWeb.vue.script.js +68 -0
- package/dist/layouts/Web/ApiClientWeb.vue.script.js.map +1 -0
- package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +33 -0
- package/dist/layouts/Web/create-api-client-web.js.map +1 -0
- package/dist/layouts/Web/index.d.ts +2 -2
- package/dist/layouts/Web/index.js +2 -101
- package/dist/libs/create-client.d.ts +9 -9
- package/dist/libs/create-client.js +178 -0
- package/dist/libs/create-client.js.map +1 -0
- package/dist/libs/electron.js +9 -0
- package/dist/libs/electron.js.map +1 -0
- package/dist/libs/env-helpers.js +9 -0
- package/dist/libs/env-helpers.js.map +1 -0
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/environment-parser.js +19 -0
- package/dist/libs/environment-parser.js.map +1 -0
- package/dist/libs/errors.js +34 -0
- package/dist/libs/errors.js.map +1 -0
- package/dist/libs/event-bus.js +43 -0
- package/dist/libs/event-bus.js.map +1 -0
- package/dist/libs/extractAttachmentFilename.js +23 -0
- package/dist/libs/extractAttachmentFilename.js.map +1 -0
- package/dist/libs/find-request.js +40 -0
- package/dist/libs/find-request.js.map +1 -0
- package/dist/libs/formatters.js +36 -0
- package/dist/libs/formatters.js.map +1 -0
- package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
- package/dist/libs/get-request-uid-by-path-method.js +19 -0
- package/dist/libs/get-request-uid-by-path-method.js.map +1 -0
- package/dist/libs/getOpenApiDocumentDetails.js +45 -0
- package/dist/libs/getOpenApiDocumentDetails.js.map +1 -0
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/hot-keys.js +92 -0
- package/dist/libs/hot-keys.js.map +1 -0
- package/dist/libs/importers/curl.js +54 -0
- package/dist/libs/importers/curl.js.map +1 -0
- package/dist/libs/importers/index.d.ts +1 -1
- package/dist/libs/importers/index.js +1 -1
- package/dist/libs/index.d.ts +15 -15
- package/dist/libs/index.js +17 -5
- package/dist/libs/isUrl.js +12 -0
- package/dist/libs/isUrl.js.map +1 -0
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/local-storage.js +40 -0
- package/dist/libs/local-storage.js.map +1 -0
- package/dist/libs/normalize-headers.js +55 -0
- package/dist/libs/normalize-headers.js.map +1 -0
- package/dist/libs/parse-curl.js +106 -0
- package/dist/libs/parse-curl.js.map +1 -0
- package/dist/libs/postman.js +40 -0
- package/dist/libs/postman.js.map +1 -0
- package/dist/libs/send-request/build-request-security.js +41 -0
- package/dist/libs/send-request/build-request-security.js.map +1 -0
- package/dist/libs/send-request/create-fetch-body.js +44 -0
- package/dist/libs/send-request/create-fetch-body.js.map +1 -0
- package/dist/libs/send-request/create-fetch-headers.js +15 -0
- package/dist/libs/send-request/create-fetch-headers.js.map +1 -0
- package/dist/libs/send-request/create-fetch-query-params.js +43 -0
- package/dist/libs/send-request/create-fetch-query-params.js.map +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts +3 -3
- package/dist/libs/send-request/create-request-operation.js +172 -0
- package/dist/libs/send-request/create-request-operation.js.map +1 -0
- package/dist/libs/send-request/decode-buffer.js +13 -0
- package/dist/libs/send-request/decode-buffer.js.map +1 -0
- package/dist/libs/send-request/index.d.ts +3 -3
- package/dist/libs/send-request/index.js +3 -2
- package/dist/libs/send-request/set-request-cookies.js +82 -0
- package/dist/libs/send-request/set-request-cookies.js.map +1 -0
- package/dist/libs/string-template.js +64 -0
- package/dist/libs/string-template.js.map +1 -0
- package/dist/libs/validate-parameters.js +35 -0
- package/dist/libs/validate-parameters.js.map +1 -0
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/hooks/usePluginManager.js +16 -0
- package/dist/plugins/hooks/usePluginManager.js.map +1 -0
- package/dist/plugins/index.d.ts +2 -2
- package/dist/plugins/index.js +2 -1
- package/dist/plugins/plugin-manager.js +38 -0
- package/dist/plugins/plugin-manager.js.map +1 -0
- package/dist/routes.js +225 -0
- package/dist/routes.js.map +1 -0
- package/dist/store/active-entities.js +139 -0
- package/dist/store/active-entities.js.map +1 -0
- package/dist/store/collections.d.ts +1 -1
- package/dist/store/collections.js +76 -0
- package/dist/store/collections.js.map +1 -0
- package/dist/store/cookies.js +16 -0
- package/dist/store/cookies.js.map +1 -0
- package/dist/store/environment.d.ts +1 -1
- package/dist/store/environment.js +38 -0
- package/dist/store/environment.js.map +1 -0
- package/dist/store/events.d.ts +8 -8
- package/dist/store/events.js +17 -0
- package/dist/store/events.js.map +1 -0
- package/dist/store/import-spec.d.ts +2 -2
- package/dist/store/import-spec.js +56 -0
- package/dist/store/import-spec.js.map +1 -0
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +2 -1
- package/dist/store/request-example.d.ts +1 -1
- package/dist/store/request-example.js +43 -0
- package/dist/store/request-example.js.map +1 -0
- package/dist/store/requests.d.ts +1 -1
- package/dist/store/requests.js +104 -0
- package/dist/store/requests.js.map +1 -0
- package/dist/store/router-params.js +27 -0
- package/dist/store/router-params.js.map +1 -0
- package/dist/store/security-schemes.d.ts +1 -1
- package/dist/store/security-schemes.js +45 -0
- package/dist/store/security-schemes.js.map +1 -0
- package/dist/store/servers.d.ts +1 -1
- package/dist/store/servers.js +41 -0
- package/dist/store/servers.js.map +1 -0
- package/dist/store/store.d.ts +7 -7
- package/dist/store/store.js +180 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/tags.d.ts +1 -1
- package/dist/store/tags.js +54 -0
- package/dist/store/tags.js.map +1 -0
- package/dist/store/workspace.d.ts +1 -1
- package/dist/store/workspace.js +57 -0
- package/dist/store/workspace.js.map +1 -0
- package/dist/style.css +2793 -2639
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +7 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +302 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -0
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue.js +9 -0
- package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -0
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js +126 -0
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.js +58 -0
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +65 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +55 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +159 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +53 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.js +102 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +41 -0
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +17 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +20 -0
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +22 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +17 -0
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-example.js +41 -0
- package/dist/v2/blocks/operation-block/helpers/get-example.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +32 -0
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +15 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-server-url.js +18 -0
- package/dist/v2/blocks/operation-block/helpers/get-server-url.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js +80 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js +109 -0
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/response-cache.js +34 -0
- package/dist/v2/blocks/operation-block/helpers/response-cache.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +149 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +160 -0
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +34 -0
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js.map +1 -0
- package/dist/v2/blocks/operation-block/index.d.ts +4 -4
- package/dist/v2/blocks/operation-block/index.js +4 -19
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +7 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.script.js +52 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.script.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +7 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.script.js +33 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.script.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +9 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js +246 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/filter-clients-by-query.d.ts +9 -0
- package/dist/v2/blocks/operation-code-sample/helpers/filter-clients-by-query.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/filter-clients-by-query.js +37 -0
- package/dist/v2/blocks/operation-code-sample/helpers/filter-clients-by-query.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +55 -0
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +40 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +36 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +31 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +18 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +411 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +41 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js +18 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +106 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +112 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +216 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js +65 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +19 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts +7 -6
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +8 -2
- package/dist/v2/blocks/operation-code-sample/types.d.ts +7 -6
- package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +9 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +412 -0
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +9 -0
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +188 -0
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +7 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js +98 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +7 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +128 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +7 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +97 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +9 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js +113 -0
- package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +7 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +226 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +9 -0
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +68 -0
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +47 -0
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/files.js +11 -0
- package/dist/v2/blocks/request-block/helpers/files.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +61 -0
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +46 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-parameter-content.js +17 -0
- package/dist/v2/blocks/request-block/helpers/get-parameter-content.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js +14 -0
- package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +21 -0
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/group-by.js +15 -0
- package/dist/v2/blocks/request-block/helpers/group-by.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +20 -0
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.js.map +1 -0
- package/dist/v2/blocks/request-block/helpers/validate-parameter.js +49 -0
- package/dist/v2/blocks/request-block/helpers/validate-parameter.js.map +1 -0
- package/dist/v2/blocks/request-block/index.d.ts +1 -1
- package/dist/v2/blocks/request-block/index.js +1 -8
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +9 -0
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +204 -0
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/Headers.vue.js +7 -0
- package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js +77 -0
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +9 -0
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +90 -0
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +7 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +35 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +14 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +9 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +64 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +9 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js +49 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +7 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js +111 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +7 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js +25 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +8 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +50 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +7 -0
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +42 -0
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +9 -0
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +69 -0
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +9 -0
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +52 -0
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +7 -0
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -0
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +68 -0
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -0
- package/dist/v2/blocks/response-block/helpers/extract-filename.js +26 -0
- package/dist/v2/blocks/response-block/helpers/extract-filename.js.map +1 -0
- package/dist/v2/blocks/response-block/helpers/get-content-length.js +12 -0
- package/dist/v2/blocks/response-block/helpers/get-content-length.js.map +1 -0
- package/dist/v2/blocks/response-block/helpers/media-types.js +227 -0
- package/dist/v2/blocks/response-block/helpers/media-types.js.map +1 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +30 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js.map +1 -0
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +26 -0
- package/dist/v2/blocks/response-block/helpers/process-response-body.js.map +1 -0
- package/dist/v2/blocks/response-block/index.d.ts +1 -1
- package/dist/v2/blocks/response-block/index.js +1 -5
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +9 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +248 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +9 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +84 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +7 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +141 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +20 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +84 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/index.js +1 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +227 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js +48 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +285 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +9 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +71 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +8 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +141 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +89 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +95 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js +69 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +296 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +92 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +141 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +45 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +10 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +27 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +183 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +39 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +109 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +4 -4
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +3 -5
- package/dist/v2/components/callout/Callout.vue.js +9 -0
- package/dist/v2/components/callout/Callout.vue.js.map +1 -0
- package/dist/v2/components/callout/Callout.vue.script.js +35 -0
- package/dist/v2/components/callout/Callout.vue.script.js.map +1 -0
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +10 -0
- package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -0
- package/dist/v2/components/code-input/CodeInput.vue.script.js +380 -0
- package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -0
- package/dist/v2/components/code-input/code-variable-widget.js +132 -0
- package/dist/v2/components/code-input/code-variable-widget.js.map +1 -0
- package/dist/v2/components/code-input/index.d.ts +1 -1
- package/dist/v2/components/code-input/index.js +1 -1
- package/dist/v2/components/context-menu/ContextMenu.vue.d.ts +27 -0
- package/dist/v2/components/context-menu/ContextMenu.vue.d.ts.map +1 -0
- package/dist/v2/components/context-menu/ContextMenu.vue.js +8 -0
- package/dist/v2/components/context-menu/ContextMenu.vue.js.map +1 -0
- package/dist/v2/components/context-menu/ContextMenu.vue.script.js +53 -0
- package/dist/v2/components/context-menu/ContextMenu.vue.script.js.map +1 -0
- package/dist/v2/components/context-menu/index.d.ts +2 -0
- package/dist/v2/components/context-menu/index.d.ts.map +1 -0
- package/dist/v2/components/context-menu/index.js +2 -0
- package/dist/v2/components/data-table/DataTable.vue.js +7 -0
- package/dist/v2/components/data-table/DataTable.vue.js.map +1 -0
- package/dist/v2/components/data-table/DataTable.vue.script.js +30 -0
- package/dist/v2/components/data-table/DataTable.vue.script.js.map +1 -0
- package/dist/v2/components/data-table/DataTableCell.vue.js +7 -0
- package/dist/v2/components/data-table/DataTableCell.vue.js.map +1 -0
- package/dist/v2/components/data-table/DataTableCell.vue.script.js +21 -0
- package/dist/v2/components/data-table/DataTableCell.vue.script.js.map +1 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +7 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js +43 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +1 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.js +7 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.js.map +1 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.script.js +20 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.script.js.map +1 -0
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js +9 -0
- package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -0
- package/dist/v2/components/data-table/DataTableInput.vue.script.js +160 -0
- package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +7 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +161 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -0
- package/dist/v2/components/data-table/DataTableRow.vue.js +13 -0
- package/dist/v2/components/data-table/DataTableRow.vue.js.map +1 -0
- package/dist/v2/components/data-table/DataTableText.vue.js +7 -0
- package/dist/v2/components/data-table/DataTableText.vue.js.map +1 -0
- package/dist/v2/components/data-table/DataTableText.vue.script.js +20 -0
- package/dist/v2/components/data-table/DataTableText.vue.script.js.map +1 -0
- package/dist/v2/components/data-table/index.d.ts +8 -8
- package/dist/v2/components/data-table/index.js +8 -2
- package/dist/v2/components/forms/ConfirmationForm.vue.js +7 -0
- package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -0
- package/dist/v2/components/forms/ConfirmationForm.vue.script.js +40 -0
- package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +1 -0
- package/dist/v2/components/forms/index.d.ts +1 -1
- package/dist/v2/components/forms/index.js +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.js +7 -0
- package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -0
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js +79 -0
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -0
- package/dist/v2/components/layout/ValueEmitter.vue.js +7 -0
- package/dist/v2/components/layout/ValueEmitter.vue.js.map +1 -0
- package/dist/v2/components/layout/ValueEmitter.vue.script.js +18 -0
- package/dist/v2/components/layout/ValueEmitter.vue.script.js.map +1 -0
- package/dist/v2/components/layout/index.d.ts +1 -1
- package/dist/v2/components/layout/index.js +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.js +7 -0
- package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -0
- package/dist/v2/components/modals/DeleteModal.vue.script.js +36 -0
- package/dist/v2/components/modals/DeleteModal.vue.script.js.map +1 -0
- package/dist/v2/components/modals/ModalClientContainer.vue.js +9 -0
- package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -0
- package/dist/v2/components/modals/ModalClientContainer.vue.script.js +62 -0
- package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -0
- package/dist/v2/components/modals/index.d.ts +1 -1
- package/dist/v2/components/modals/index.js +1 -37
- package/dist/v2/components/resize/Resize.vue.js +10 -0
- package/dist/v2/components/resize/Resize.vue.js.map +1 -0
- package/dist/v2/components/resize/Resize.vue.script.js +52 -0
- package/dist/v2/components/resize/Resize.vue.script.js.map +1 -0
- package/dist/v2/components/resize/index.d.ts +2 -2
- package/dist/v2/components/resize/index.js +2 -1
- package/dist/v2/components/resize/use-split-resize.js +62 -0
- package/dist/v2/components/resize/use-split-resize.js.map +1 -0
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js +7 -0
- package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -0
- package/dist/v2/components/server/ServerDropdown.vue.script.js +95 -0
- package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -0
- package/dist/v2/components/server/ServerDropdownItem.vue.js +9 -0
- package/dist/v2/components/server/ServerDropdownItem.vue.js.map +1 -0
- package/dist/v2/components/server/ServerDropdownItem.vue.script.js +46 -0
- package/dist/v2/components/server/ServerDropdownItem.vue.script.js.map +1 -0
- package/dist/v2/components/server/index.d.ts +1 -1
- package/dist/v2/components/server/index.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +7 -0
- package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -0
- package/dist/v2/components/sidebar/Sidebar.vue.script.js +117 -0
- package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +7 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.script.js +52 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +1 -0
- package/dist/v2/components/sidebar/SidebarToggle.vue.js +7 -0
- package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -0
- package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +54 -0
- package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -0
- package/dist/v2/components/sidebar/index.d.ts +3 -3
- package/dist/v2/components/sidebar/index.js +3 -2
- package/dist/v2/constants.js +7 -0
- package/dist/v2/constants.js.map +1 -0
- package/dist/v2/features/app/App.vue.d.ts +4 -4
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +8 -0
- package/dist/v2/features/app/App.vue.js.map +1 -0
- package/dist/v2/features/app/App.vue.script.js +177 -0
- package/dist/v2/features/app/App.vue.script.js.map +1 -0
- package/dist/v2/features/app/app-events.js +242 -0
- package/dist/v2/features/app/app-events.js.map +1 -0
- package/dist/v2/features/app/app-state.d.ts +3 -1
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +629 -0
- package/dist/v2/features/app/app-state.js.map +1 -0
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +9 -0
- package/dist/v2/features/app/components/AppSidebar.vue.js.map +1 -0
- package/dist/v2/features/app/components/AppSidebar.vue.script.js +318 -0
- package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +1 -0
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +7 -0
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js.map +1 -0
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js +58 -0
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js.map +1 -0
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.js +9 -0
- package/dist/v2/features/app/components/DesktopTab.vue.js.map +1 -0
- package/dist/v2/features/app/components/DesktopTab.vue.script.js +121 -0
- package/dist/v2/features/app/components/DesktopTab.vue.script.js.map +1 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.js +7 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.js.map +1 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.script.js +75 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.script.js.map +1 -0
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +9 -0
- package/dist/v2/features/app/components/DownloadAppButton.vue.js.map +1 -0
- package/dist/v2/features/app/components/DownloadAppButton.vue.script.js +21 -0
- package/dist/v2/features/app/components/DownloadAppButton.vue.script.js.map +1 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +7 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js.map +1 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js +175 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue.script.js.map +1 -0
- package/dist/v2/features/app/components/SplashScreen.vue.js +9 -0
- package/dist/v2/features/app/components/SplashScreen.vue.js.map +1 -0
- package/dist/v2/features/app/components/SplashScreen.vue.script.js +20 -0
- package/dist/v2/features/app/components/SplashScreen.vue.script.js.map +1 -0
- package/dist/v2/features/app/components/index.d.ts +1 -1
- package/dist/v2/features/app/components/index.js +1 -9
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +8 -4
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +54 -0
- package/dist/v2/features/app/helpers/create-api-client-app.js.map +1 -0
- package/dist/v2/features/app/helpers/filter-workspaces.js +55 -0
- package/dist/v2/features/app/helpers/filter-workspaces.js.map +1 -0
- package/dist/v2/features/app/helpers/get-route-param.d.ts +1 -1
- package/dist/v2/features/app/helpers/get-route-param.js +12 -0
- package/dist/v2/features/app/helpers/get-route-param.js.map +1 -0
- package/dist/v2/features/app/helpers/group-workspaces.js +38 -0
- package/dist/v2/features/app/helpers/group-workspaces.js.map +1 -0
- package/dist/v2/features/app/helpers/routes.d.ts +9 -5
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +133 -0
- package/dist/v2/features/app/helpers/routes.js.map +1 -0
- package/dist/v2/features/app/hooks/use-document-watcher.js +168 -0
- package/dist/v2/features/app/hooks/use-document-watcher.js.map +1 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts +1 -1
- package/dist/v2/features/app/hooks/use-theme.js +94 -0
- package/dist/v2/features/app/hooks/use-theme.js.map +1 -0
- package/dist/v2/features/app/index.d.ts +8 -8
- package/dist/v2/features/app/index.js +7 -3161
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +8 -0
- package/dist/v2/features/collection/DocumentCollection.vue.js.map +1 -0
- package/dist/v2/features/collection/DocumentCollection.vue.script.js +339 -0
- package/dist/v2/features/collection/DocumentCollection.vue.script.js.map +1 -0
- package/dist/v2/features/collection/OperationCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.js +7 -0
- package/dist/v2/features/collection/OperationCollection.vue.js.map +1 -0
- package/dist/v2/features/collection/OperationCollection.vue.script.js +94 -0
- package/dist/v2/features/collection/OperationCollection.vue.script.js.map +1 -0
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +7 -0
- package/dist/v2/features/collection/WorkspaceCollection.vue.js.map +1 -0
- package/dist/v2/features/collection/WorkspaceCollection.vue.script.js +73 -0
- package/dist/v2/features/collection/WorkspaceCollection.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Authentication.vue.js +9 -0
- package/dist/v2/features/collection/components/Authentication.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Authentication.vue.script.js +166 -0
- package/dist/v2/features/collection/components/Authentication.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Cookies.vue.js +7 -0
- package/dist/v2/features/collection/components/Cookies.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Cookies.vue.script.js +57 -0
- package/dist/v2/features/collection/components/Cookies.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Editor/Editor.vue.js +9 -0
- package/dist/v2/features/collection/components/Editor/Editor.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/Editor.vue.script.js +360 -0
- package/dist/v2/features/collection/components/Editor/Editor.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js +7 -0
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.script.js +69 -0
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js +7 -0
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.script.js +91 -0
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js +22 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js +17 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js +17 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +34 -0
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js +18 -0
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js +36 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js.map +1 -0
- package/dist/v2/features/collection/components/Editor/index.d.ts +1 -1
- package/dist/v2/features/collection/components/Editor/index.js +1 -1
- package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Environment.vue.js +7 -0
- package/dist/v2/features/collection/components/Environment.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Environment.vue.script.js +60 -0
- package/dist/v2/features/collection/components/Environment.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Form.vue.js +7 -0
- package/dist/v2/features/collection/components/Form.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Form.vue.script.js +75 -0
- package/dist/v2/features/collection/components/Form.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/LabelInput.vue.js +9 -0
- package/dist/v2/features/collection/components/LabelInput.vue.js.map +1 -0
- package/dist/v2/features/collection/components/LabelInput.vue.script.js +38 -0
- package/dist/v2/features/collection/components/LabelInput.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Overview.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Overview.vue.js +9 -0
- package/dist/v2/features/collection/components/Overview.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Overview.vue.script.js +203 -0
- package/dist/v2/features/collection/components/Overview.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Servers.vue.js +7 -0
- package/dist/v2/features/collection/components/Servers.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Servers.vue.script.js +217 -0
- package/dist/v2/features/collection/components/Servers.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +7 -0
- package/dist/v2/features/collection/components/Settings.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Settings.vue.script.js +80 -0
- package/dist/v2/features/collection/components/Settings.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.js +9 -0
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.js.map +1 -0
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.script.js +136 -0
- package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
- package/dist/v2/features/collection/components/Tabs.vue.js +7 -0
- package/dist/v2/features/collection/components/Tabs.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Tabs.vue.script.js +53 -0
- package/dist/v2/features/collection/components/Tabs.vue.script.js.map +1 -0
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +19 -0
- package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js.map +1 -0
- package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js +9 -0
- package/dist/v2/features/command-palette/TheCommandPalette.vue.js.map +1 -0
- package/dist/v2/features/command-palette/TheCommandPalette.vue.script.js +189 -0
- package/dist/v2/features/command-palette/TheCommandPalette.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js +47 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.script.js +73 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.script.js +207 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +3 -23
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js +206 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +9 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.script.js +125 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.d.ts +30 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.script.js +151 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportPostman.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js +89 -0
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.script.js +226 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.script.js +126 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.d.ts +58 -0
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.js +9 -0
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.script.js +142 -0
- package/dist/v2/features/command-palette/components/PostmanImportPreview.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.d.ts +23 -0
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.js +9 -0
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.script.js +138 -0
- package/dist/v2/features/command-palette/components/PostmanRequestTreeRow.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +7 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js.map +1 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.script.js +39 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.script.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.js +29 -0
- package/dist/v2/features/command-palette/helpers/generate-unique-slug.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-merge-key.d.ts +11 -0
- package/dist/v2/features/command-palette/helpers/get-merge-key.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-merge-key.js +32 -0
- package/dist/v2/features/command-palette/helpers/get-merge-key.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +56 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +22 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +119 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +4 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +36 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js +70 -0
- package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.js +24 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js +71 -0
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.d.ts +11 -0
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.js +35 -0
- package/dist/v2/features/command-palette/helpers/postman-request-collisions.js.map +1 -0
- package/dist/v2/features/command-palette/helpers/postman-request-tree.d.ts +41 -0
- package/dist/v2/features/command-palette/helpers/postman-request-tree.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/postman-request-tree.js +139 -0
- package/dist/v2/features/command-palette/helpers/postman-request-tree.js.map +1 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +83 -12
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +207 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js.map +1 -0
- package/dist/v2/features/command-palette/index.d.ts +2 -2
- package/dist/v2/features/command-palette/index.js +2 -2
- package/dist/v2/features/editor/config.js +19 -0
- package/dist/v2/features/editor/config.js.map +1 -0
- package/dist/v2/features/editor/helpers/configure-language-support.js +48 -0
- package/dist/v2/features/editor/helpers/configure-language-support.js.map +1 -0
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.js +21 -0
- package/dist/v2/features/editor/helpers/ensure-monaco-environment.js.map +1 -0
- package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/create-json-model.js +31 -0
- package/dist/v2/features/editor/helpers/json/create-json-model.js.map +1 -0
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +22 -0
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js.map +1 -0
- package/dist/v2/features/editor/helpers/json/json-ast.js +32 -0
- package/dist/v2/features/editor/helpers/json/json-ast.js.map +1 -0
- package/dist/v2/features/editor/helpers/json/json-pointer-links.js +104 -0
- package/dist/v2/features/editor/helpers/json/json-pointer-links.js.map +1 -0
- package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js +27 -0
- package/dist/v2/features/editor/helpers/json/json-pointer-path.js.map +1 -0
- package/dist/v2/features/editor/helpers/range-to-whole-line.js +27 -0
- package/dist/v2/features/editor/helpers/range-to-whole-line.js.map +1 -0
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js +84 -0
- package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js.map +1 -0
- package/dist/v2/features/editor/helpers/theme/load-css-variables.js +41 -0
- package/dist/v2/features/editor/helpers/theme/load-css-variables.js.map +1 -0
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js +32 -0
- package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js.map +1 -0
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js +70 -0
- package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js.map +1 -0
- package/dist/v2/features/editor/hooks/use-editor-markers.js +37 -0
- package/dist/v2/features/editor/hooks/use-editor-markers.js.map +1 -0
- package/dist/v2/features/editor/hooks/use-editor.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-editor.js +133 -0
- package/dist/v2/features/editor/hooks/use-editor.js.map +1 -0
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js +45 -0
- package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js.map +1 -0
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +396 -0
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js.map +1 -0
- package/dist/v2/features/editor/index.d.ts +4 -4
- package/dist/v2/features/editor/index.js +4 -1
- package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js +51 -0
- package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js.map +1 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.js +7 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.script.js +96 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +1 -0
- package/dist/v2/features/environments/components/Environment.vue.js +7 -0
- package/dist/v2/features/environments/components/Environment.vue.js.map +1 -0
- package/dist/v2/features/environments/components/Environment.vue.script.js +65 -0
- package/dist/v2/features/environments/components/Environment.vue.script.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +7 -0
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js +158 -0
- package/dist/v2/features/environments/components/EnvironmentColors.vue.script.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +7 -0
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +97 -0
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +7 -0
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js +50 -0
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +7 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +113 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +9 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js +152 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +1 -0
- package/dist/v2/features/environments/index.d.ts +1 -1
- package/dist/v2/features/environments/index.js +1 -3
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +9 -0
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js.map +1 -0
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.script.js +186 -0
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.script.js.map +1 -0
- package/dist/v2/features/global-cookies/index.d.ts +1 -1
- package/dist/v2/features/global-cookies/index.js +1 -3
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.js +7 -0
- package/dist/v2/features/modal/Modal.vue.js.map +1 -0
- package/dist/v2/features/modal/Modal.vue.script.js +147 -0
- package/dist/v2/features/modal/Modal.vue.script.js.map +1 -0
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +100 -0
- package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -0
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +32 -0
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js.map +1 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +92 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js.map +1 -0
- package/dist/v2/features/modal/helpers/restore-workspace-state.js +51 -0
- package/dist/v2/features/modal/helpers/restore-workspace-state.js.map +1 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +142 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js.map +1 -0
- package/dist/v2/features/modal/index.d.ts +3 -3
- package/dist/v2/features/modal/index.js +3 -639
- package/dist/v2/features/modal/modal-events.d.ts +1 -1
- package/dist/v2/features/modal/modal-events.js +41 -0
- package/dist/v2/features/modal/modal-events.js.map +1 -0
- package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
- package/dist/v2/features/operation/Operation.vue.js +7 -0
- package/dist/v2/features/operation/Operation.vue.js.map +1 -0
- package/dist/v2/features/operation/Operation.vue.script.js +182 -0
- package/dist/v2/features/operation/Operation.vue.script.js.map +1 -0
- package/dist/v2/features/operation/helpers/combine-params.js +20 -0
- package/dist/v2/features/operation/helpers/combine-params.js.map +1 -0
- package/dist/v2/features/operation/helpers/get-security-requirements.js +17 -0
- package/dist/v2/features/operation/helpers/get-security-requirements.js.map +1 -0
- package/dist/v2/features/operation/helpers/get-selected-security.js +41 -0
- package/dist/v2/features/operation/helpers/get-selected-security.js.map +1 -0
- package/dist/v2/features/operation/helpers/get-selected-server.js +21 -0
- package/dist/v2/features/operation/helpers/get-selected-server.js.map +1 -0
- package/dist/v2/features/operation/index.d.ts +5 -5
- package/dist/v2/features/operation/index.js +5 -18
- package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
- package/dist/v2/features/search/helpers/create-fuse-instance.js +52 -0
- package/dist/v2/features/search/helpers/create-fuse-instance.js.map +1 -0
- package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
- package/dist/v2/features/search/helpers/create-search-index.js +76 -0
- package/dist/v2/features/search/helpers/create-search-index.js.map +1 -0
- package/dist/v2/features/search/hooks/use-search-index.js +31 -0
- package/dist/v2/features/search/hooks/use-search-index.js.map +1 -0
- package/dist/v2/features/search/index.d.ts +1 -1
- package/dist/v2/features/search/index.js +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +4 -0
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +7 -0
- package/dist/v2/features/settings/CollectionSettings.vue.js.map +1 -0
- package/dist/v2/features/settings/CollectionSettings.vue.script.js +229 -0
- package/dist/v2/features/settings/CollectionSettings.vue.script.js.map +1 -0
- package/dist/v2/features/settings/DocumentSettings.vue.js +7 -0
- package/dist/v2/features/settings/DocumentSettings.vue.js.map +1 -0
- package/dist/v2/features/settings/DocumentSettings.vue.script.js +92 -0
- package/dist/v2/features/settings/DocumentSettings.vue.script.js.map +1 -0
- package/dist/v2/features/settings/components/Appearance.vue.js +7 -0
- package/dist/v2/features/settings/components/Appearance.vue.js.map +1 -0
- package/dist/v2/features/settings/components/Appearance.vue.script.js +63 -0
- package/dist/v2/features/settings/components/Appearance.vue.script.js.map +1 -0
- package/dist/v2/features/settings/components/Section.vue.js +7 -0
- package/dist/v2/features/settings/components/Section.vue.js.map +1 -0
- package/dist/v2/features/settings/components/Section.vue.script.js +30 -0
- package/dist/v2/features/settings/components/Section.vue.script.js.map +1 -0
- package/dist/v2/features/settings/helpers/get-theme-colors.js +68 -0
- package/dist/v2/features/settings/helpers/get-theme-colors.js.map +1 -0
- package/dist/v2/features/settings/index.d.ts +2 -2
- package/dist/v2/features/settings/index.js +2 -1
- package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -1
- package/dist/v2/helpers/drag-handle-factory.js +258 -0
- package/dist/v2/helpers/drag-handle-factory.js.map +1 -0
- package/dist/v2/helpers/generate-location-id.js +25 -0
- package/dist/v2/helpers/generate-location-id.js.map +1 -0
- package/dist/v2/helpers/get-active-environment.js +19 -0
- package/dist/v2/helpers/get-active-environment.js.map +1 -0
- package/dist/v2/helpers/get-active-proxy-url.d.ts +1 -1
- package/dist/v2/helpers/get-active-proxy-url.js +26 -0
- package/dist/v2/helpers/get-active-proxy-url.js.map +1 -0
- package/dist/v2/helpers/get-servers.js +106 -0
- package/dist/v2/helpers/get-servers.js.map +1 -0
- package/dist/v2/helpers/get-tab-details.d.ts +1 -1
- package/dist/v2/helpers/get-tab-details.js +54 -0
- package/dist/v2/helpers/get-tab-details.js.map +1 -0
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +151 -0
- package/dist/v2/helpers/handle-hotkeys.js.map +1 -0
- package/dist/v2/helpers/index.d.ts +2 -2
- package/dist/v2/helpers/index.js +2 -2
- package/dist/v2/helpers/is-url.js +9 -0
- package/dist/v2/helpers/is-url.js.map +1 -0
- package/dist/v2/helpers/slugify.js +15 -0
- package/dist/v2/helpers/slugify.js.map +1 -0
- package/dist/v2/helpers/storage.d.ts +8 -0
- package/dist/v2/helpers/storage.d.ts.map +1 -1
- package/dist/v2/helpers/storage.js +37 -0
- package/dist/v2/helpers/storage.js.map +1 -0
- package/dist/v2/hooks/use-color-mode.js +72 -0
- package/dist/v2/hooks/use-color-mode.js.map +1 -0
- package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
- package/dist/v2/hooks/use-global-hot-keys.js +22 -0
- package/dist/v2/hooks/use-global-hot-keys.js.map +1 -0
- package/dist/v2/hooks/use-scroll-lock.js +58 -0
- package/dist/v2/hooks/use-scroll-lock.js.map +1 -0
- package/dist/v2/posthog.d.ts +3 -0
- package/dist/v2/posthog.d.ts.map +1 -0
- package/dist/v2/posthog.js +19 -0
- package/dist/v2/posthog.js.map +1 -0
- package/dist/v2/workspace-events.js +109 -0
- package/dist/v2/workspace-events.js.map +1 -0
- package/dist/views/Collection/Collection.vue.js +7 -0
- package/dist/views/Collection/Collection.vue.js.map +1 -0
- package/dist/views/Collection/Collection.vue.script.js +46 -0
- package/dist/views/Collection/Collection.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionAuthentication.vue.js +9 -0
- package/dist/views/Collection/CollectionAuthentication.vue.js.map +1 -0
- package/dist/views/Collection/CollectionAuthentication.vue.script.js +52 -0
- package/dist/views/Collection/CollectionAuthentication.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionCookies.vue.js +7 -0
- package/dist/views/Collection/CollectionCookies.vue.js.map +1 -0
- package/dist/views/Collection/CollectionCookies.vue.script.js +18 -0
- package/dist/views/Collection/CollectionCookies.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionEnvironment.vue.js +8 -0
- package/dist/views/Collection/CollectionEnvironment.vue.js.map +1 -0
- package/dist/views/Collection/CollectionEnvironment.vue.script.js +238 -0
- package/dist/views/Collection/CollectionEnvironment.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionInfoForm.vue.js +9 -0
- package/dist/views/Collection/CollectionInfoForm.vue.js.map +1 -0
- package/dist/views/Collection/CollectionInfoForm.vue.script.js +73 -0
- package/dist/views/Collection/CollectionInfoForm.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionNavigation.vue.js +7 -0
- package/dist/views/Collection/CollectionNavigation.vue.js.map +1 -0
- package/dist/views/Collection/CollectionNavigation.vue.script.js +75 -0
- package/dist/views/Collection/CollectionNavigation.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionOverview.vue.js +7 -0
- package/dist/views/Collection/CollectionOverview.vue.js.map +1 -0
- package/dist/views/Collection/CollectionOverview.vue.script.js +42 -0
- package/dist/views/Collection/CollectionOverview.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionScripts.vue.js +7 -0
- package/dist/views/Collection/CollectionScripts.vue.js.map +1 -0
- package/dist/views/Collection/CollectionScripts.vue.script.js +18 -0
- package/dist/views/Collection/CollectionScripts.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionServerForm.vue.js +7 -0
- package/dist/views/Collection/CollectionServerForm.vue.js.map +1 -0
- package/dist/views/Collection/CollectionServerForm.vue.script.js +76 -0
- package/dist/views/Collection/CollectionServerForm.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionServers.vue.js +7 -0
- package/dist/views/Collection/CollectionServers.vue.js.map +1 -0
- package/dist/views/Collection/CollectionServers.vue.script.js +95 -0
- package/dist/views/Collection/CollectionServers.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionSettings.vue.js +7 -0
- package/dist/views/Collection/CollectionSettings.vue.js.map +1 -0
- package/dist/views/Collection/CollectionSettings.vue.script.js +87 -0
- package/dist/views/Collection/CollectionSettings.vue.script.js.map +1 -0
- package/dist/views/Collection/CollectionSync.vue.js +7 -0
- package/dist/views/Collection/CollectionSync.vue.js.map +1 -0
- package/dist/views/Collection/CollectionSync.vue.script.js +18 -0
- package/dist/views/Collection/CollectionSync.vue.script.js.map +1 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.js +9 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.js.map +1 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.script.js +284 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.script.js.map +1 -0
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +1 -1
- package/dist/views/Collection/components/MarkdownInput.vue.js +9 -0
- package/dist/views/Collection/components/MarkdownInput.vue.js.map +1 -0
- package/dist/views/Collection/components/MarkdownInput.vue.script.js +92 -0
- package/dist/views/Collection/components/MarkdownInput.vue.script.js.map +1 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +7 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js.map +1 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.script.js +74 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.script.js.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +66 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +86 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +39 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js.map +1 -0
- package/dist/views/Components/CodeSnippet/index.d.ts +4 -4
- package/dist/views/Components/CodeSnippet/index.js +4 -2
- package/dist/views/Cookies/CookieForm.vue.js +7 -0
- package/dist/views/Cookies/CookieForm.vue.js.map +1 -0
- package/dist/views/Cookies/CookieForm.vue.script.js +50 -0
- package/dist/views/Cookies/CookieForm.vue.script.js.map +1 -0
- package/dist/views/Cookies/CookieModal.vue.js +9 -0
- package/dist/views/Cookies/CookieModal.vue.js.map +1 -0
- package/dist/views/Cookies/CookieModal.vue.script.js +83 -0
- package/dist/views/Cookies/CookieModal.vue.script.js.map +1 -0
- package/dist/views/Cookies/Cookies.vue.js +7 -0
- package/dist/views/Cookies/Cookies.vue.js.map +1 -0
- package/dist/views/Cookies/Cookies.vue.script.js +156 -0
- package/dist/views/Cookies/Cookies.vue.script.js.map +1 -0
- package/dist/views/Environment/Environment.vue.js +7 -0
- package/dist/views/Environment/Environment.vue.js.map +1 -0
- package/dist/views/Environment/Environment.vue.script.js +384 -0
- package/dist/views/Environment/Environment.vue.script.js.map +1 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.js +7 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.js.map +1 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.script.js +47 -0
- package/dist/views/Environment/EnvironmentColorModal.vue.script.js.map +1 -0
- package/dist/views/Environment/EnvironmentColors.vue.js +7 -0
- package/dist/views/Environment/EnvironmentColors.vue.js.map +1 -0
- package/dist/views/Environment/EnvironmentColors.vue.script.js +126 -0
- package/dist/views/Environment/EnvironmentColors.vue.script.js.map +1 -0
- package/dist/views/Environment/EnvironmentModal.vue.js +7 -0
- package/dist/views/Environment/EnvironmentModal.vue.js.map +1 -0
- package/dist/views/Environment/EnvironmentModal.vue.script.js +122 -0
- package/dist/views/Environment/EnvironmentModal.vue.script.js.map +1 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +7 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js.map +1 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.script.js +133 -0
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.script.js.map +1 -0
- package/dist/views/Environment/handle-drag.d.ts +1 -1
- package/dist/views/Environment/handle-drag.js +38 -0
- package/dist/views/Environment/handle-drag.js.map +1 -0
- package/dist/views/Request/Request.vue.d.ts +1 -1
- package/dist/views/Request/Request.vue.js +9 -0
- package/dist/views/Request/Request.vue.js.map +1 -0
- package/dist/views/Request/Request.vue.script.js +117 -0
- package/dist/views/Request/Request.vue.script.js.map +1 -0
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +9 -0
- package/dist/views/Request/RequestRoot.vue.js.map +1 -0
- package/dist/views/Request/RequestRoot.vue.script.js +158 -0
- package/dist/views/Request/RequestRoot.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.script.js +52 -0
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js +204 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.script.js +106 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +9 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.script.js +216 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +9 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.script.js +116 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.script.js +73 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.script.js +205 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +39 -0
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +3 -3
- package/dist/views/Request/RequestSection/RequestAuth/index.js +3 -3
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +9 -0
- package/dist/views/Request/RequestSection/RequestBody.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestBody.vue.script.js +477 -0
- package/dist/views/Request/RequestSection/RequestBody.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +9 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.script.js +187 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.script.js +180 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestPathParams.vue.script.js +115 -0
- package/dist/views/Request/RequestSection/RequestPathParams.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +9 -0
- package/dist/views/Request/RequestSection/RequestSection.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestSection.vue.script.js +297 -0
- package/dist/views/Request/RequestSection/RequestSection.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +9 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.script.js +266 -0
- package/dist/views/Request/RequestSection/RequestTable.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +9 -0
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js.map +1 -0
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.script.js +64 -0
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +38 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js.map +1 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.js +17 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.js.map +1 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +22 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.js.map +1 -0
- package/dist/views/Request/RequestSection/index.d.ts +2 -2
- package/dist/views/Request/RequestSection/index.js +2 -42
- package/dist/views/Request/RequestSidebar.vue.js +9 -0
- package/dist/views/Request/RequestSidebar.vue.js.map +1 -0
- package/dist/views/Request/RequestSidebar.vue.script.js +307 -0
- package/dist/views/Request/RequestSidebar.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +10 -0
- package/dist/views/Request/RequestSidebarItem.vue.js.map +1 -0
- package/dist/views/Request/RequestSidebarItem.vue.script.js +475 -0
- package/dist/views/Request/RequestSidebarItem.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -3
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +9 -0
- package/dist/views/Request/RequestSidebarItemMenu.vue.js.map +1 -0
- package/dist/views/Request/RequestSidebarItemMenu.vue.script.js +222 -0
- package/dist/views/Request/RequestSidebarItemMenu.vue.script.js.map +1 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +9 -0
- package/dist/views/Request/RequestSubpageHeader.vue.js.map +1 -0
- package/dist/views/Request/RequestSubpageHeader.vue.script.js +92 -0
- package/dist/views/Request/RequestSubpageHeader.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +7 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.script.js +77 -0
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +9 -0
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBody.vue.script.js +91 -0
- package/dist/views/Request/ResponseSection/ResponseBody.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.script.js +35 -0
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +14 -0
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +9 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.script.js +64 -0
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +9 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.script.js +54 -0
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.script.js +85 -0
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.script.js +25 -0
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +8 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.script.js +51 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.script.js +39 -0
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +9 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js +98 -0
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.script.js +77 -0
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +9 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.script.js +44 -0
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +7 -0
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js +64 -0
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +9 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.script.js +206 -0
- package/dist/views/Request/ResponseSection/ResponseSection.vue.script.js.map +1 -0
- package/dist/views/Request/ResponseSection/index.d.ts +2 -2
- package/dist/views/Request/ResponseSection/index.js +2 -6
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +7 -0
- package/dist/views/Request/components/WorkspaceDropdown.vue.js.map +1 -0
- package/dist/views/Request/components/WorkspaceDropdown.vue.script.js +182 -0
- package/dist/views/Request/components/WorkspaceDropdown.vue.script.js.map +1 -0
- package/dist/views/Request/components/index.d.ts +1 -1
- package/dist/views/Request/components/index.js +1 -1
- package/dist/views/Request/consts/index.d.ts +2 -2
- package/dist/views/Request/consts/index.js +2 -1
- package/dist/views/Request/consts/mediaTypes.js +231 -0
- package/dist/views/Request/consts/mediaTypes.js.map +1 -0
- package/dist/views/Request/consts/new-auth-options.js +90 -0
- package/dist/views/Request/consts/new-auth-options.js.map +1 -0
- package/dist/views/Request/handle-drag.d.ts +2 -2
- package/dist/views/Request/handle-drag.js +51 -0
- package/dist/views/Request/handle-drag.js.map +1 -0
- package/dist/views/Request/hooks/useOpenApiWatcher.js +96 -0
- package/dist/views/Request/hooks/useOpenApiWatcher.js.map +1 -0
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/auth.js +74 -0
- package/dist/views/Request/libs/auth.js.map +1 -0
- package/dist/views/Request/libs/index.d.ts +3 -3
- package/dist/views/Request/libs/index.js +3 -2
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/oauth2.js +178 -0
- package/dist/views/Request/libs/oauth2.js.map +1 -0
- package/dist/views/Request/libs/request.js +46 -0
- package/dist/views/Request/libs/request.js.map +1 -0
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/dist/views/Request/libs/watch-mode.js +375 -0
- package/dist/views/Request/libs/watch-mode.js.map +1 -0
- package/dist/views/Settings/Settings.vue.js +7 -0
- package/dist/views/Settings/Settings.vue.js.map +1 -0
- package/dist/views/Settings/Settings.vue.script.js +28 -0
- package/dist/views/Settings/Settings.vue.script.js.map +1 -0
- package/dist/views/Settings/SettingsGeneral.vue.js +7 -0
- package/dist/views/Settings/SettingsGeneral.vue.js.map +1 -0
- package/dist/views/Settings/SettingsGeneral.vue.script.js +241 -0
- package/dist/views/Settings/SettingsGeneral.vue.script.js.map +1 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.js +7 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.js.map +1 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.script.js +62 -0
- package/dist/views/Settings/components/SettingsAppearance.vue.script.js.map +1 -0
- package/dist/views/Settings/components/SettingsSection.vue.js +7 -0
- package/dist/views/Settings/components/SettingsSection.vue.js.map +1 -0
- package/dist/views/Settings/components/SettingsSection.vue.script.js +27 -0
- package/dist/views/Settings/components/SettingsSection.vue.script.js.map +1 -0
- package/package.json +20 -15
- package/dist/AddressBar-CX8xiYoe.js +0 -302
- package/dist/AddressBar-CX8xiYoe.js.map +0 -1
- package/dist/App-BpNPKHmM.js +0 -533
- package/dist/App-BpNPKHmM.js.map +0 -1
- package/dist/App-Ckirvnv1.js +0 -2510
- package/dist/App-Ckirvnv1.js.map +0 -1
- package/dist/CodeInput-BN7uw3Bh.js +0 -694
- package/dist/CodeInput-BN7uw3Bh.js.map +0 -1
- package/dist/CodeSnippet-D7Heh1nd.js +0 -218
- package/dist/CodeSnippet-D7Heh1nd.js.map +0 -1
- package/dist/Collection-ChAxs3rz.js +0 -219
- package/dist/Collection-ChAxs3rz.js.map +0 -1
- package/dist/CollectionAuthentication-BDpvv8cA.js +0 -56
- package/dist/CollectionAuthentication-BDpvv8cA.js.map +0 -1
- package/dist/CollectionCookies-DyjPPMdt.js +0 -19
- package/dist/CollectionCookies-DyjPPMdt.js.map +0 -1
- package/dist/CollectionEnvironment-dwisJ-h5.js +0 -514
- package/dist/CollectionEnvironment-dwisJ-h5.js.map +0 -1
- package/dist/CollectionOverview-CJ9-Vmei.js +0 -131
- package/dist/CollectionOverview-CJ9-Vmei.js.map +0 -1
- package/dist/CollectionScripts-CMNlBlby.js +0 -19
- package/dist/CollectionScripts-CMNlBlby.js.map +0 -1
- package/dist/CollectionServers-BWkIGwz4.js +0 -168
- package/dist/CollectionServers-BWkIGwz4.js.map +0 -1
- package/dist/CollectionSettings-CqUUYOym.js +0 -87
- package/dist/CollectionSettings-CqUUYOym.js.map +0 -1
- package/dist/CollectionSync-CAflc5yW.js +0 -19
- package/dist/CollectionSync-CAflc5yW.js.map +0 -1
- package/dist/CommandActionInput-TkcAx6E8.js +0 -97
- package/dist/CommandActionInput-TkcAx6E8.js.map +0 -1
- package/dist/CommandPalette-BiA0IgO8.js +0 -964
- package/dist/CommandPalette-BiA0IgO8.js.map +0 -1
- package/dist/CommandPaletteImport-Diu5dDIY.js +0 -622
- package/dist/CommandPaletteImport-Diu5dDIY.js.map +0 -1
- package/dist/Cookies-CNRSxP8J.js +0 -284
- package/dist/Cookies-CNRSxP8J.js.map +0 -1
- package/dist/DataTable-BqbZKW3K.js +0 -62
- package/dist/DataTable-BqbZKW3K.js.map +0 -1
- package/dist/DataTableHeader-DJVB0jCZ.js +0 -21
- package/dist/DataTableHeader-DJVB0jCZ.js.map +0 -1
- package/dist/DataTableInput-SkIUPlrB.js +0 -166
- package/dist/DataTableInput-SkIUPlrB.js.map +0 -1
- package/dist/DataTableRow-c3XveEUO.js +0 -57
- package/dist/DataTableRow-c3XveEUO.js.map +0 -1
- package/dist/DeleteSidebarListElement-C-p87d03.js +0 -78
- package/dist/DeleteSidebarListElement-C-p87d03.js.map +0 -1
- package/dist/EditSidebarListElement-CodWPnM6.js +0 -32
- package/dist/EditSidebarListElement-CodWPnM6.js.map +0 -1
- package/dist/Editor-BomsGWHx.js +0 -909
- package/dist/Editor-BomsGWHx.js.map +0 -1
- package/dist/EmptyState-Cnm7hGW5.js +0 -46
- package/dist/EmptyState-Cnm7hGW5.js.map +0 -1
- package/dist/Environment-D_CbZk0A.js +0 -416
- package/dist/Environment-D_CbZk0A.js.map +0 -1
- package/dist/EnvironmentModal-CcyqnPc2.js +0 -288
- package/dist/EnvironmentModal-CcyqnPc2.js.map +0 -1
- package/dist/Form-bA4bV_oA.js +0 -83
- package/dist/Form-bA4bV_oA.js.map +0 -1
- package/dist/HttpMethod-rnWEgC3T.js +0 -78
- package/dist/HttpMethod-rnWEgC3T.js.map +0 -1
- package/dist/IconSelector-BDC_GQXv.js +0 -67
- package/dist/IconSelector-BDC_GQXv.js.map +0 -1
- package/dist/ImportCollection-BIYMxB9Q.js +0 -804
- package/dist/ImportCollection-BIYMxB9Q.js.map +0 -1
- package/dist/IntegrationLogo-B9EDW8db.js +0 -51
- package/dist/IntegrationLogo-B9EDW8db.js.map +0 -1
- package/dist/MainLayout-oMIJ5QXF.js +0 -281
- package/dist/MainLayout-oMIJ5QXF.js.map +0 -1
- package/dist/Modal-DkOa_KK0.js +0 -67
- package/dist/Modal-DkOa_KK0.js.map +0 -1
- package/dist/ModalClientContainer-qHsZi4wQ.js +0 -65
- package/dist/ModalClientContainer-qHsZi4wQ.js.map +0 -1
- package/dist/Request-BWfYWyBa.js +0 -212
- package/dist/Request-BWfYWyBa.js.map +0 -1
- package/dist/RequestAuth-BU6ubH-c.js +0 -989
- package/dist/RequestAuth-BU6ubH-c.js.map +0 -1
- package/dist/RequestRoot-7xhK5_qr.js +0 -1611
- package/dist/RequestRoot-7xhK5_qr.js.map +0 -1
- package/dist/RequestSection-Bx8UHW-k.js +0 -1582
- package/dist/RequestSection-Bx8UHW-k.js.map +0 -1
- package/dist/ResponseSection-CLrgLMN_.js +0 -949
- package/dist/ResponseSection-CLrgLMN_.js.map +0 -1
- package/dist/ScalarAsciiArt-BjuSnj8e.js +0 -45
- package/dist/ScalarAsciiArt-BjuSnj8e.js.map +0 -1
- package/dist/SectionFilter-hrtoRLwj.js +0 -99
- package/dist/SectionFilter-hrtoRLwj.js.map +0 -1
- package/dist/Server-BS4zjUdO.js +0 -303
- package/dist/Server-BS4zjUdO.js.map +0 -1
- package/dist/ServerVariablesForm-BRZ9XC8o.js +0 -145
- package/dist/ServerVariablesForm-BRZ9XC8o.js.map +0 -1
- package/dist/Settings-BuLKHzRY.js +0 -347
- package/dist/Settings-BuLKHzRY.js.map +0 -1
- package/dist/Sidebar-Xl9_nFXX.js +0 -73
- package/dist/Sidebar-Xl9_nFXX.js.map +0 -1
- package/dist/SidebarButton-BAagdMDe.js +0 -37
- package/dist/SidebarButton-BAagdMDe.js.map +0 -1
- package/dist/SidebarListElement-BfTPiihc.js +0 -232
- package/dist/SidebarListElement-BfTPiihc.js.map +0 -1
- package/dist/TheCommandPalette-Dl9TAeke.js +0 -204
- package/dist/TheCommandPalette-Dl9TAeke.js.map +0 -1
- package/dist/ValueEmitter-QYkZ9Hdc.js +0 -20
- package/dist/ValueEmitter-QYkZ9Hdc.js.map +0 -1
- package/dist/ViewLayout-BOXN0IYo.js +0 -17
- package/dist/ViewLayout-BOXN0IYo.js.map +0 -1
- package/dist/ViewLayoutCollapse-CiTb-Uml.js +0 -86
- package/dist/ViewLayoutCollapse-CiTb-Uml.js.map +0 -1
- package/dist/ViewLayoutContent-CvMoJYPF.js +0 -13
- package/dist/ViewLayoutContent-CvMoJYPF.js.map +0 -1
- package/dist/ViewLayoutSection-mUqKbQry.js +0 -23
- package/dist/ViewLayoutSection-mUqKbQry.js.map +0 -1
- package/dist/WatchModeToggle-D_eAiTWJ.js +0 -41
- package/dist/WatchModeToggle-D_eAiTWJ.js.map +0 -1
- package/dist/_plugin-vue_export-helper-BmmBcIzD.js +0 -8
- package/dist/analytics-BZimCWcw.js +0 -7
- package/dist/analytics-BZimCWcw.js.map +0 -1
- package/dist/analytics.d.ts +0 -18
- package/dist/analytics.d.ts.map +0 -1
- package/dist/build-request-security-BQjNr2MD.js +0 -41
- package/dist/build-request-security-BQjNr2MD.js.map +0 -1
- package/dist/code-input-iq-moLxi.js +0 -775
- package/dist/code-input-iq-moLxi.js.map +0 -1
- package/dist/components-ChixwQhN.js +0 -61
- package/dist/components-ChixwQhN.js.map +0 -1
- package/dist/components-DfJHvSLM.js +0 -183
- package/dist/components-DfJHvSLM.js.map +0 -1
- package/dist/computer-D7VW3Ruy.js +0 -562
- package/dist/computer-D7VW3Ruy.js.map +0 -1
- package/dist/consts-CyGRb9dl.js +0 -318
- package/dist/consts-CyGRb9dl.js.map +0 -1
- package/dist/curl-nbw1OxbV.js +0 -54
- package/dist/curl-nbw1OxbV.js.map +0 -1
- package/dist/data-table-PL7e8NRO.js +0 -282
- package/dist/data-table-PL7e8NRO.js.map +0 -1
- package/dist/editor-BZ_J0eze.js +0 -466
- package/dist/editor-BZ_J0eze.js.map +0 -1
- package/dist/environments-ByLK9lnC.js +0 -592
- package/dist/environments-ByLK9lnC.js.map +0 -1
- package/dist/formatters-DOGXZq9R.js +0 -36
- package/dist/formatters-DOGXZq9R.js.map +0 -1
- package/dist/forms-CZX6cFDS.js +0 -42
- package/dist/forms-CZX6cFDS.js.map +0 -1
- package/dist/get-active-environment-CkxyQ1dM.js +0 -19
- package/dist/get-active-environment-CkxyQ1dM.js.map +0 -1
- package/dist/get-resolved-url-SybDPV0U.js +0 -85
- package/dist/get-resolved-url-SybDPV0U.js.map +0 -1
- package/dist/get-server-url-UVN-dx79.js +0 -32
- package/dist/get-server-url-UVN-dx79.js.map +0 -1
- package/dist/get-servers-B_WNlQWB.js +0 -106
- package/dist/get-servers-B_WNlQWB.js.map +0 -1
- package/dist/get-snippet-DBRUSfZ2.js +0 -39
- package/dist/get-snippet-DBRUSfZ2.js.map +0 -1
- package/dist/global-cookies-D3ZS9ON3.js +0 -184
- package/dist/global-cookies-D3ZS9ON3.js.map +0 -1
- package/dist/hooks/useAnalytics.d.ts +0 -19
- package/dist/hooks/useAnalytics.d.ts.map +0 -1
- package/dist/hooks-BvZxH4XB.js +0 -80
- package/dist/hooks-BvZxH4XB.js.map +0 -1
- package/dist/layout-BWiL7dfb.js +0 -81
- package/dist/layout-BWiL7dfb.js.map +0 -1
- package/dist/layouts/Web/index.js.map +0 -1
- package/dist/libs-spbv4P0g.js +0 -249
- package/dist/libs-spbv4P0g.js.map +0 -1
- package/dist/operation-block-DE-hoO03.js +0 -1674
- package/dist/operation-block-DE-hoO03.js.map +0 -1
- package/dist/operation-code-sample-xgx4qi2H.js +0 -1738
- package/dist/operation-code-sample-xgx4qi2H.js.map +0 -1
- package/dist/parse-curl-BtypQT3D.js +0 -106
- package/dist/parse-curl-BtypQT3D.js.map +0 -1
- package/dist/plugins-B52hCIyZ.js +0 -50
- package/dist/plugins-B52hCIyZ.js.map +0 -1
- package/dist/rabbitjump-CMZXAR6d.js +0 -9
- package/dist/rabbitjump-CMZXAR6d.js.map +0 -1
- package/dist/request-block-N7dPFyrG.js +0 -1466
- package/dist/request-block-N7dPFyrG.js.map +0 -1
- package/dist/resize-D2IYvVdh.js +0 -114
- package/dist/resize-D2IYvVdh.js.map +0 -1
- package/dist/response-block-DmkaDZYs.js +0 -1188
- package/dist/response-block-DmkaDZYs.js.map +0 -1
- package/dist/scalar-address-bar-block-BbysOhkE.js +0 -425
- package/dist/scalar-address-bar-block-BbysOhkE.js.map +0 -1
- package/dist/scalar-auth-selector-block-Bs79QOMA.js +0 -1889
- package/dist/scalar-auth-selector-block-Bs79QOMA.js.map +0 -1
- package/dist/search-CmsQQkjn.js +0 -151
- package/dist/search-CmsQQkjn.js.map +0 -1
- package/dist/send-request-BsTfRiBC.js +0 -348
- package/dist/send-request-BsTfRiBC.js.map +0 -1
- package/dist/server-tcI-OCyx.js +0 -140
- package/dist/server-tcI-OCyx.js.map +0 -1
- package/dist/set-request-cookies-BJJhsU4A.js +0 -88
- package/dist/set-request-cookies-BJJhsU4A.js.map +0 -1
- package/dist/settings-BKk_1lcH.js +0 -455
- package/dist/settings-BKk_1lcH.js.map +0 -1
- package/dist/sidebar-ceSbYmnt.js +0 -217
- package/dist/sidebar-ceSbYmnt.js.map +0 -1
- package/dist/store-DaPoVtIS.js +0 -1512
- package/dist/store-DaPoVtIS.js.map +0 -1
- package/dist/string-template-sS5PtY6T.js +0 -64
- package/dist/string-template-sS5PtY6T.js.map +0 -1
- package/dist/use-global-hot-keys-D8Ai8Qbm.js +0 -274
- package/dist/use-global-hot-keys-D8Ai8Qbm.js.map +0 -1
- package/dist/useSidebar-DLTwHDI-.js +0 -45
- package/dist/useSidebar-DLTwHDI-.js.map +0 -1
- package/dist/v2/components/modals/index.js.map +0 -1
- package/dist/v2/features/app/index.js.map +0 -1
- package/dist/v2/features/modal/index.js.map +0 -1
- package/dist/views/Request/RequestSection/index.js.map +0 -1
- package/dist/watch-mode-Dbaqd9bG.js +0 -375
- package/dist/watch-mode-Dbaqd9bG.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-allow-reserved-to-url.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.ts"],"sourcesContent":["/**\n * Reserved characters we can safely decode in query values when OpenAPI\n * `allowReserved` is enabled.\n *\n * We intentionally keep percent-encodings for characters that can break query\n * parsing (`#`, `&`, `=`, `?`, `[`, `]`) or change x-www-form-urlencoded\n * semantics (`+`).\n *\n * @see https://spec.openapis.org/oas/v3.1.0.html#fixed-fields-10\n */\nconst DECODABLE_RESERVED_CHARACTERS_BY_PERCENT_ENCODING: Record<string, string> = {\n '21': '!',\n '24': '$',\n '27': \"'\",\n '28': '(',\n '29': ')',\n '2A': '*',\n '2C': ',',\n '2F': '/',\n '3A': ':',\n '3B': ';',\n '40': '@',\n}\n\nconst decodeReservedCharacters = (value: string): string =>\n value.replace(\n /%([0-9A-Fa-f]{2})/g,\n (match, code: string) => DECODABLE_RESERVED_CHARACTERS_BY_PERCENT_ENCODING[code.toUpperCase()] ?? match,\n )\n\nconst decodeQueryKey = (key: string): string => {\n try {\n return decodeURIComponent(key.replaceAll('+', '%20'))\n } catch {\n return key\n }\n}\n\n/**\n * Decodes reserved character percent-encodings only for query keys marked with\n * OpenAPI's `allowReserved: true`.\n */\nexport const applyAllowReservedToUrl = (url: string, allowReservedQueryParameters: Set<string>): string => {\n if (allowReservedQueryParameters.size === 0) {\n return url\n }\n\n const queryStart = url.indexOf('?')\n if (queryStart === -1) {\n return url\n }\n\n const hashStart = url.indexOf('#', queryStart)\n const urlPrefix = url.slice(0, queryStart + 1)\n const query = hashStart === -1 ? url.slice(queryStart + 1) : url.slice(queryStart + 1, hashStart)\n const hash = hashStart === -1 ? '' : url.slice(hashStart)\n\n if (!query) {\n return url\n }\n\n const decodedQuery = query\n .split('&')\n .map((segment) => {\n if (!segment) {\n return segment\n }\n\n const equalsIndex = segment.indexOf('=')\n const rawKey = equalsIndex === -1 ? segment : segment.slice(0, equalsIndex)\n const key = decodeQueryKey(rawKey)\n\n if (!allowReservedQueryParameters.has(key) || equalsIndex === -1) {\n return segment\n }\n\n const rawValue = segment.slice(equalsIndex + 1)\n return `${rawKey}=${decodeReservedCharacters(rawValue)}`\n })\n .join('&')\n\n return `${urlPrefix}${decodedQuery}${hash}`\n}\n"],"mappings":";;;;;;;;;;;AAUA,IAAM,oDAA4E;CAChF,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACP;AAED,IAAM,4BAA4B,UAChC,MAAM,QACJ,uBACC,OAAO,SAAiB,kDAAkD,KAAK,aAAa,KAAK,MACnG;AAEH,IAAM,kBAAkB,QAAwB;AAC9C,KAAI;AACF,SAAO,mBAAmB,IAAI,WAAW,KAAK,MAAM,CAAC;SAC/C;AACN,SAAO;;;;;;;AAQX,IAAa,2BAA2B,KAAa,iCAAsD;AACzG,KAAI,6BAA6B,SAAS,EACxC,QAAO;CAGT,MAAM,aAAa,IAAI,QAAQ,IAAI;AACnC,KAAI,eAAe,GACjB,QAAO;CAGT,MAAM,YAAY,IAAI,QAAQ,KAAK,WAAW;CAC9C,MAAM,YAAY,IAAI,MAAM,GAAG,aAAa,EAAE;CAC9C,MAAM,QAAQ,cAAc,KAAK,IAAI,MAAM,aAAa,EAAE,GAAG,IAAI,MAAM,aAAa,GAAG,UAAU;CACjG,MAAM,OAAO,cAAc,KAAK,KAAK,IAAI,MAAM,UAAU;AAEzD,KAAI,CAAC,MACH,QAAO;AAuBT,QAAO,GAAG,YApBW,MAClB,MAAM,IAAI,CACV,KAAK,YAAY;AAChB,MAAI,CAAC,QACH,QAAO;EAGT,MAAM,cAAc,QAAQ,QAAQ,IAAI;EACxC,MAAM,SAAS,gBAAgB,KAAK,UAAU,QAAQ,MAAM,GAAG,YAAY;EAC3E,MAAM,MAAM,eAAe,OAAO;AAElC,MAAI,CAAC,6BAA6B,IAAI,IAAI,IAAI,gBAAgB,GAC5D,QAAO;AAIT,SAAO,GAAG,OAAO,GAAG,yBADH,QAAQ,MAAM,cAAc,EAAE,CACO;GACtD,CACD,KAAK,IAAI,GAEyB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { getSelectedBodyContentType } from "./get-selected-body-content-type.js";
|
|
2
|
+
import { getExampleFromBody } from "../../request-block/helpers/get-request-body-example.js";
|
|
3
|
+
import { replaceEnvVariables } from "@scalar/helpers/regex/replace-variables";
|
|
4
|
+
import { unpackProxyObject } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
5
|
+
//#region src/v2/blocks/operation-block/helpers/build-request-body.ts
|
|
6
|
+
var getMultipartEncodingContentType = (requestBody, bodyContentType, fieldName, replacedFieldName) => requestBody.content[bodyContentType]?.encoding?.[fieldName]?.contentType ?? requestBody.content[bodyContentType]?.encoding?.[replacedFieldName]?.contentType;
|
|
7
|
+
var serializeMultipartValue = (value, env) => {
|
|
8
|
+
if (typeof value === "string") return replaceEnvVariables(value, env);
|
|
9
|
+
return replaceEnvVariables(typeof value === "object" && value !== null ? JSON.stringify(unpackProxyObject(value)) : String(value), env);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Create the fetch request body
|
|
13
|
+
*/
|
|
14
|
+
var buildRequestBody = (requestBody, env = {}, exampleKey = "default") => {
|
|
15
|
+
if (!requestBody) return null;
|
|
16
|
+
/** Selected content type for the body from the dropdown, stored as x-scalar-selected-content-type */
|
|
17
|
+
const bodyContentType = getSelectedBodyContentType(requestBody, exampleKey);
|
|
18
|
+
if (!bodyContentType) return null;
|
|
19
|
+
/** An example value or generated example from the schema */
|
|
20
|
+
const example = getExampleFromBody(requestBody, bodyContentType, exampleKey);
|
|
21
|
+
if (!example) return null;
|
|
22
|
+
if ((bodyContentType === "multipart/form-data" || bodyContentType === "application/x-www-form-urlencoded") && Array.isArray(example.value)) {
|
|
23
|
+
const exampleValue = example.value.filter((item) => !item.isDisabled);
|
|
24
|
+
const form = bodyContentType === "multipart/form-data" ? new FormData() : new URLSearchParams();
|
|
25
|
+
exampleValue.forEach(({ name, value }) => {
|
|
26
|
+
if (!name) return;
|
|
27
|
+
const replacedName = replaceEnvVariables(name, env);
|
|
28
|
+
const partContentType = form instanceof FormData ? getMultipartEncodingContentType(requestBody, bodyContentType, name, replacedName) : void 0;
|
|
29
|
+
if (value instanceof File && form instanceof FormData) {
|
|
30
|
+
/**
|
|
31
|
+
* We need to unwrap the proxies to get the file name due to the
|
|
32
|
+
* "this" context in the proxy causing an illegal invocation error
|
|
33
|
+
*/
|
|
34
|
+
const unwrappedValue = unpackProxyObject(value);
|
|
35
|
+
const encodedValue = partContentType && partContentType !== unwrappedValue.type ? new File([unwrappedValue], unwrappedValue.name, {
|
|
36
|
+
type: partContentType,
|
|
37
|
+
lastModified: unwrappedValue.lastModified
|
|
38
|
+
}) : unwrappedValue;
|
|
39
|
+
form.append(replacedName, encodedValue, encodedValue.name);
|
|
40
|
+
} else if (value !== void 0 && value !== null) {
|
|
41
|
+
const serializedValue = serializeMultipartValue(value, env);
|
|
42
|
+
if (form instanceof FormData && partContentType) form.append(replacedName, new Blob([serializedValue], { type: partContentType }));
|
|
43
|
+
else form.append(replacedName, serializedValue);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return form;
|
|
47
|
+
}
|
|
48
|
+
if (bodyContentType === "application/x-www-form-urlencoded" && example.value !== null && typeof example.value === "object" && !Array.isArray(example.value)) {
|
|
49
|
+
const form = new URLSearchParams();
|
|
50
|
+
for (const [key, value] of Object.entries(example.value)) if (key && value !== void 0 && value !== null) {
|
|
51
|
+
const replacedKey = replaceEnvVariables(key, env);
|
|
52
|
+
const stringValue = typeof value === "string" ? value : String(value);
|
|
53
|
+
form.append(replacedKey, replaceEnvVariables(stringValue, env));
|
|
54
|
+
}
|
|
55
|
+
return form;
|
|
56
|
+
}
|
|
57
|
+
const exampleValue = example.value !== null && typeof example.value === "object" ? unpackProxyObject(example.value) : example.value;
|
|
58
|
+
if (exampleValue instanceof File) return exampleValue;
|
|
59
|
+
if (typeof exampleValue === "object") return replaceEnvVariables(JSON.stringify(exampleValue), env);
|
|
60
|
+
return typeof exampleValue === "string" ? replaceEnvVariables(exampleValue, env) : exampleValue;
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { buildRequestBody };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=build-request-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-request-body.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-body.ts"],"sourcesContent":["import { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport { unpackProxyObject } from '@scalar/workspace-store/helpers/unpack-proxy'\nimport type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/request-body'\n\nimport { getSelectedBodyContentType } from '@/v2/blocks/operation-block/helpers/get-selected-body-content-type'\nimport { getExampleFromBody } from '@/v2/blocks/request-block/helpers/get-request-body-example'\n\nconst getMultipartEncodingContentType = (\n requestBody: RequestBodyObject,\n bodyContentType: string,\n fieldName: string,\n replacedFieldName: string,\n) =>\n requestBody.content[bodyContentType]?.encoding?.[fieldName]?.contentType ??\n requestBody.content[bodyContentType]?.encoding?.[replacedFieldName]?.contentType\n\nconst serializeMultipartValue = (value: unknown, env: Record<string, string>) => {\n if (typeof value === 'string') {\n return replaceEnvVariables(value, env)\n }\n\n const serializedValue =\n typeof value === 'object' && value !== null ? JSON.stringify(unpackProxyObject(value)) : String(value)\n\n return replaceEnvVariables(serializedValue, env)\n}\n\n/**\n * Create the fetch request body\n */\nexport const buildRequestBody = (\n requestBody: RequestBodyObject | undefined,\n /** Environment variables flattened into a key-value object */\n env: Record<string, string> = {},\n /** The key of the current example */\n exampleKey = 'default',\n): BodyInit | null => {\n if (!requestBody) {\n return null\n }\n\n /** Selected content type for the body from the dropdown, stored as x-scalar-selected-content-type */\n const bodyContentType = getSelectedBodyContentType(requestBody, exampleKey)\n if (!bodyContentType) {\n return null\n }\n\n /** An example value or generated example from the schema */\n const example = getExampleFromBody(requestBody, bodyContentType, exampleKey)\n if (!example) {\n return null\n }\n\n // Form data - array format (from UI editor)\n if (\n (bodyContentType === 'multipart/form-data' || bodyContentType === 'application/x-www-form-urlencoded') &&\n Array.isArray(example.value)\n ) {\n const exampleValue = example.value.filter((item) => !item.isDisabled) as { name: string; value: unknown }[]\n const form = bodyContentType === 'multipart/form-data' ? new FormData() : new URLSearchParams()\n\n // Loop over all entries and add them to the form\n exampleValue.forEach(({ name, value }) => {\n if (!name) {\n return\n }\n const replacedName = replaceEnvVariables(name, env)\n const partContentType =\n form instanceof FormData\n ? getMultipartEncodingContentType(requestBody, bodyContentType, name, replacedName)\n : undefined\n\n // Handle file uploads\n if (value instanceof File && form instanceof FormData) {\n /**\n * We need to unwrap the proxies to get the file name due to the\n * \"this\" context in the proxy causing an illegal invocation error\n */\n const unwrappedValue = unpackProxyObject(value)\n const encodedValue =\n partContentType && partContentType !== unwrappedValue.type\n ? new File([unwrappedValue], unwrappedValue.name, {\n type: partContentType,\n lastModified: unwrappedValue.lastModified,\n })\n : unwrappedValue\n\n form.append(replacedName, encodedValue, encodedValue.name)\n }\n // Text and structured inputs\n else if (value !== undefined && value !== null) {\n const serializedValue = serializeMultipartValue(value, env)\n\n if (form instanceof FormData && partContentType) {\n form.append(replacedName, new Blob([serializedValue], { type: partContentType }))\n } else {\n form.append(replacedName, serializedValue)\n }\n }\n })\n\n return form\n }\n\n // Form data - object format (from schema examples)\n // When the example value is a plain object and content type is form-urlencoded,\n // convert to URLSearchParams instead of JSON stringifying\n if (\n bodyContentType === 'application/x-www-form-urlencoded' &&\n example.value !== null &&\n typeof example.value === 'object' &&\n !Array.isArray(example.value)\n ) {\n const form = new URLSearchParams()\n\n // Convert object properties to form fields\n for (const [key, value] of Object.entries(example.value)) {\n if (key && value !== undefined && value !== null) {\n const replacedKey = replaceEnvVariables(key, env)\n const stringValue = typeof value === 'string' ? value : String(value)\n form.append(replacedKey, replaceEnvVariables(stringValue, env))\n }\n }\n\n return form\n }\n\n const exampleValue =\n example.value !== null && typeof example.value === 'object' ? unpackProxyObject(example.value) : example.value\n\n if (exampleValue instanceof File) {\n return exampleValue\n }\n\n // Ensure we stringify the example value if it is an object\n if (typeof exampleValue === 'object') {\n return replaceEnvVariables(JSON.stringify(exampleValue), env)\n }\n\n // Return binary or string values\n return typeof exampleValue === 'string' ? replaceEnvVariables(exampleValue, env) : exampleValue\n}\n"],"mappings":";;;;;AAOA,IAAM,mCACJ,aACA,iBACA,WACA,sBAEA,YAAY,QAAQ,kBAAkB,WAAW,YAAY,eAC7D,YAAY,QAAQ,kBAAkB,WAAW,oBAAoB;AAEvE,IAAM,2BAA2B,OAAgB,QAAgC;AAC/E,KAAI,OAAO,UAAU,SACnB,QAAO,oBAAoB,OAAO,IAAI;AAMxC,QAAO,oBAFL,OAAO,UAAU,YAAY,UAAU,OAAO,KAAK,UAAU,kBAAkB,MAAM,CAAC,GAAG,OAAO,MAAM,EAE5D,IAAI;;;;;AAMlD,IAAa,oBACX,aAEA,MAA8B,EAAE,EAEhC,aAAa,cACO;AACpB,KAAI,CAAC,YACH,QAAO;;CAIT,MAAM,kBAAkB,2BAA2B,aAAa,WAAW;AAC3E,KAAI,CAAC,gBACH,QAAO;;CAIT,MAAM,UAAU,mBAAmB,aAAa,iBAAiB,WAAW;AAC5E,KAAI,CAAC,QACH,QAAO;AAIT,MACG,oBAAoB,yBAAyB,oBAAoB,wCAClE,MAAM,QAAQ,QAAQ,MAAM,EAC5B;EACA,MAAM,eAAe,QAAQ,MAAM,QAAQ,SAAS,CAAC,KAAK,WAAW;EACrE,MAAM,OAAO,oBAAoB,wBAAwB,IAAI,UAAU,GAAG,IAAI,iBAAiB;AAG/F,eAAa,SAAS,EAAE,MAAM,YAAY;AACxC,OAAI,CAAC,KACH;GAEF,MAAM,eAAe,oBAAoB,MAAM,IAAI;GACnD,MAAM,kBACJ,gBAAgB,WACZ,gCAAgC,aAAa,iBAAiB,MAAM,aAAa,GACjF,KAAA;AAGN,OAAI,iBAAiB,QAAQ,gBAAgB,UAAU;;;;;IAKrD,MAAM,iBAAiB,kBAAkB,MAAM;IAC/C,MAAM,eACJ,mBAAmB,oBAAoB,eAAe,OAClD,IAAI,KAAK,CAAC,eAAe,EAAE,eAAe,MAAM;KAC9C,MAAM;KACN,cAAc,eAAe;KAC9B,CAAC,GACF;AAEN,SAAK,OAAO,cAAc,cAAc,aAAa,KAAK;cAGnD,UAAU,KAAA,KAAa,UAAU,MAAM;IAC9C,MAAM,kBAAkB,wBAAwB,OAAO,IAAI;AAE3D,QAAI,gBAAgB,YAAY,gBAC9B,MAAK,OAAO,cAAc,IAAI,KAAK,CAAC,gBAAgB,EAAE,EAAE,MAAM,iBAAiB,CAAC,CAAC;QAEjF,MAAK,OAAO,cAAc,gBAAgB;;IAG9C;AAEF,SAAO;;AAMT,KACE,oBAAoB,uCACpB,QAAQ,UAAU,QAClB,OAAO,QAAQ,UAAU,YACzB,CAAC,MAAM,QAAQ,QAAQ,MAAM,EAC7B;EACA,MAAM,OAAO,IAAI,iBAAiB;AAGlC,OAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,QAAQ,MAAM,CACtD,KAAI,OAAO,UAAU,KAAA,KAAa,UAAU,MAAM;GAChD,MAAM,cAAc,oBAAoB,KAAK,IAAI;GACjD,MAAM,cAAc,OAAO,UAAU,WAAW,QAAQ,OAAO,MAAM;AACrE,QAAK,OAAO,aAAa,oBAAoB,aAAa,IAAI,CAAC;;AAInE,SAAO;;CAGT,MAAM,eACJ,QAAQ,UAAU,QAAQ,OAAO,QAAQ,UAAU,WAAW,kBAAkB,QAAQ,MAAM,GAAG,QAAQ;AAE3G,KAAI,wBAAwB,KAC1B,QAAO;AAIT,KAAI,OAAO,iBAAiB,SAC1B,QAAO,oBAAoB,KAAK,UAAU,aAAa,EAAE,IAAI;AAI/D,QAAO,OAAO,iBAAiB,WAAW,oBAAoB,cAAc,IAAI,GAAG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { filterGlobalCookie } from "./filter-global-cookies.js";
|
|
2
|
+
import { replaceEnvVariables } from "@scalar/helpers/regex/replace-variables";
|
|
3
|
+
import { xScalarCookieSchema } from "@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies";
|
|
4
|
+
import { coerceValue } from "@scalar/workspace-store/schemas/typebox-coerce";
|
|
5
|
+
//#region src/v2/blocks/operation-block/helpers/build-request-cookie-header.ts
|
|
6
|
+
var CUSTOM_COOKIE_HEADER_WARNING = "We're using a `X-Scalar-Cookie` custom header to the request. The proxy will forward this as a `Cookie` header. We do this to avoid the browser omitting the `Cookie` header for cross-origin requests for security reasons.";
|
|
7
|
+
var COOKIE_HEADER_WARNING = `We're trying to add a Cookie header, but browsers often omit them for cross-origin requests for various security reasons. If it's not working, that's probably why. Here are the requirements for it to work:
|
|
8
|
+
|
|
9
|
+
- The browser URL must be on the same domain as the server URL.
|
|
10
|
+
- The connection must be made over HTTPS.
|
|
11
|
+
`;
|
|
12
|
+
/**
|
|
13
|
+
* Generate a cookie header from the cookie params
|
|
14
|
+
*/
|
|
15
|
+
var getCookieHeader = (cookieParams, originalCookieHeader) => {
|
|
16
|
+
const cookieHeader = cookieParams.map((c) => `${c.name}=${c.value}`).join("; ");
|
|
17
|
+
if (originalCookieHeader && cookieHeader) return `${originalCookieHeader}; ${cookieHeader}`;
|
|
18
|
+
return originalCookieHeader || cookieHeader || "";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Build out the cookies header taking in global, param and security scheme cookies
|
|
22
|
+
*/
|
|
23
|
+
var buildRequestCookieHeader = ({ paramCookies, globalCookies, env, originalCookieHeader, url, useCustomCookieHeader, disabledGlobalCookies }) => {
|
|
24
|
+
/** Generate the cookie header */
|
|
25
|
+
const cookieHeader = getCookieHeader([...globalCookies.filter((cookie) => filterGlobalCookie({
|
|
26
|
+
cookie,
|
|
27
|
+
url,
|
|
28
|
+
disabledGlobalCookies
|
|
29
|
+
})).map((cookie) => {
|
|
30
|
+
return coerceValue(xScalarCookieSchema, {
|
|
31
|
+
...cookie,
|
|
32
|
+
name: replaceEnvVariables(cookie.name, env),
|
|
33
|
+
value: replaceEnvVariables(cookie.value, env)
|
|
34
|
+
});
|
|
35
|
+
}), ...paramCookies], originalCookieHeader ?? void 0);
|
|
36
|
+
if (cookieHeader) {
|
|
37
|
+
if (useCustomCookieHeader) {
|
|
38
|
+
console.warn(CUSTOM_COOKIE_HEADER_WARNING);
|
|
39
|
+
return {
|
|
40
|
+
name: "X-Scalar-Cookie",
|
|
41
|
+
value: cookieHeader
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
console.warn(COOKIE_HEADER_WARNING);
|
|
45
|
+
return {
|
|
46
|
+
name: "Cookie",
|
|
47
|
+
value: cookieHeader
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
};
|
|
52
|
+
//#endregion
|
|
53
|
+
export { buildRequestCookieHeader };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=build-request-cookie-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-request-cookie-header.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-cookie-header.ts"],"sourcesContent":["import { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport {\n type XScalarCookie,\n xScalarCookieSchema,\n} from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\nimport { filterGlobalCookie } from '@/v2/blocks/operation-block/helpers/filter-global-cookies'\n\nconst CUSTOM_COOKIE_HEADER_WARNING =\n \"We're using a `X-Scalar-Cookie` custom header to the request. The proxy will forward this as a `Cookie` header. We do this to avoid the browser omitting the `Cookie` header for cross-origin requests for security reasons.\"\nconst COOKIE_HEADER_WARNING = `We're trying to add a Cookie header, but browsers often omit them for cross-origin requests for various security reasons. If it's not working, that's probably why. Here are the requirements for it to work:\n\n - The browser URL must be on the same domain as the server URL.\n - The connection must be made over HTTPS.\n `\n\n/**\n * Generate a cookie header from the cookie params\n */\nexport const getCookieHeader = (cookieParams: XScalarCookie[], originalCookieHeader: string | undefined): string => {\n // Generate the cookie header from the cookie params\n const cookieHeader = cookieParams.map((c) => `${c.name}=${c.value}`).join('; ')\n\n // Merge with the original cookie header\n if (originalCookieHeader && cookieHeader) {\n return `${originalCookieHeader}; ${cookieHeader}`\n }\n\n // Return whichever one exists, or empty string if both are empty\n return originalCookieHeader || cookieHeader || ''\n}\n\n/**\n * Build out the cookies header taking in global, param and security scheme cookies\n */\nexport const buildRequestCookieHeader = ({\n paramCookies,\n globalCookies,\n env,\n originalCookieHeader,\n url,\n useCustomCookieHeader,\n disabledGlobalCookies,\n}: {\n /** Parsed/replaced cookies from the parameters and security schemes */\n paramCookies: XScalarCookie[]\n /** Raw global cookies from the workspace/document */\n globalCookies: XScalarCookie[]\n /** Environment variables flattened into a key-value object */\n env: Record<string, string>\n /** Cookie header that previously exists from the spec OR from the user */\n originalCookieHeader: string | undefined | null\n /** The url of the request used to filter global cookies by domain */\n url: string\n /**\n * If we are running in Electron or using the proxy, we need to add a custom header\n * that's then forwarded as a `Cookie` header.\n */\n useCustomCookieHeader: boolean\n /** The disabled global cookies for the current example */\n disabledGlobalCookies: Record<string, boolean>\n}): null | { name: string; value: string } => {\n /** Filter the global cookies by domain + parse */\n const filteredGlobalCookies = globalCookies\n .filter((cookie) => filterGlobalCookie({ cookie, url, disabledGlobalCookies }))\n .map((cookie) => {\n return coerceValue(xScalarCookieSchema, {\n ...cookie,\n name: replaceEnvVariables(cookie.name, env),\n value: replaceEnvVariables(cookie.value, env),\n })\n })\n\n /** Generate the cookie header */\n const cookieHeader = getCookieHeader([...filteredGlobalCookies, ...paramCookies], originalCookieHeader ?? undefined)\n\n if (cookieHeader) {\n // Add a custom header for the proxy (that's then forwarded as `Cookie`)\n if (useCustomCookieHeader) {\n console.warn(CUSTOM_COOKIE_HEADER_WARNING)\n return { name: 'X-Scalar-Cookie', value: cookieHeader }\n }\n\n // or stick to the original header (which might be removed by the browser)\n console.warn(COOKIE_HEADER_WARNING)\n return { name: 'Cookie', value: cookieHeader }\n }\n\n return null\n}\n"],"mappings":";;;;;AASA,IAAM,+BACJ;AACF,IAAM,wBAAwB;;;;;;;;AAS9B,IAAa,mBAAmB,cAA+B,yBAAqD;CAElH,MAAM,eAAe,aAAa,KAAK,MAAM,GAAG,EAAE,KAAK,GAAG,EAAE,QAAQ,CAAC,KAAK,KAAK;AAG/E,KAAI,wBAAwB,aAC1B,QAAO,GAAG,qBAAqB,IAAI;AAIrC,QAAO,wBAAwB,gBAAgB;;;;;AAMjD,IAAa,4BAA4B,EACvC,cACA,eACA,KACA,sBACA,KACA,uBACA,4BAmB4C;;CAa5C,MAAM,eAAe,gBAAgB,CAAC,GAXR,cAC3B,QAAQ,WAAW,mBAAmB;EAAE;EAAQ;EAAK;EAAuB,CAAC,CAAC,CAC9E,KAAK,WAAW;AACf,SAAO,YAAY,qBAAqB;GACtC,GAAG;GACH,MAAM,oBAAoB,OAAO,MAAM,IAAI;GAC3C,OAAO,oBAAoB,OAAO,OAAO,IAAI;GAC9C,CAAC;GACF,EAG4D,GAAG,aAAa,EAAE,wBAAwB,KAAA,EAAU;AAEpH,KAAI,cAAc;AAEhB,MAAI,uBAAuB;AACzB,WAAQ,KAAK,6BAA6B;AAC1C,UAAO;IAAE,MAAM;IAAmB,OAAO;IAAc;;AAIzD,UAAQ,KAAK,sBAAsB;AACnC,SAAO;GAAE,MAAM;GAAU,OAAO;GAAc;;AAGhD,QAAO"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { getExample } from "./get-example.js";
|
|
2
|
+
import { deSerializeParameter } from "./de-serialize-parameter.js";
|
|
3
|
+
import { isParamDisabled } from "../../request-block/helpers/is-param-disabled.js";
|
|
4
|
+
import { serializeContentValue, serializeDeepObjectStyle, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle } from "./serialize-parameter.js";
|
|
5
|
+
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
6
|
+
import { replaceEnvVariables } from "@scalar/helpers/regex/replace-variables";
|
|
7
|
+
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
8
|
+
import { xScalarCookieSchema } from "@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies";
|
|
9
|
+
import { coerceValue } from "@scalar/workspace-store/schemas/typebox-coerce";
|
|
10
|
+
import { isObject } from "@scalar/helpers/object/is-object";
|
|
11
|
+
//#region src/v2/blocks/operation-block/helpers/build-request-parameters.ts
|
|
12
|
+
/** Helper to get explode value with default */
|
|
13
|
+
var getExplode = (param, defaultValue) => "explode" in param && param.explode !== void 0 ? param.explode : defaultValue;
|
|
14
|
+
/**
|
|
15
|
+
* Converts the parameters into a set of headers, cookies and url params while
|
|
16
|
+
* replacing environment variables and extracting example values. Also builds up a record of the path
|
|
17
|
+
* parameters which can then be used to replace variables in the path.
|
|
18
|
+
* Also handles both content based and schema based parameters.
|
|
19
|
+
*
|
|
20
|
+
* @param parameters - Unfiltered parameters
|
|
21
|
+
* @param env - Environment variables flattened into a key-value object
|
|
22
|
+
* @param exampleKey - The key of the current example
|
|
23
|
+
* @returns A set of headers, cookies and url params
|
|
24
|
+
*/
|
|
25
|
+
var buildRequestParameters = (parameters = [], env = {}, exampleKey = "default") => {
|
|
26
|
+
const result = {
|
|
27
|
+
cookies: [],
|
|
28
|
+
headers: {},
|
|
29
|
+
pathVariables: {},
|
|
30
|
+
allowReservedQueryParameters: /* @__PURE__ */ new Set(),
|
|
31
|
+
urlParams: new URLSearchParams()
|
|
32
|
+
};
|
|
33
|
+
if (parameters.length === 0) return result;
|
|
34
|
+
for (const referencedParam of parameters) {
|
|
35
|
+
const param = getResolvedRef(referencedParam);
|
|
36
|
+
const example = getExample(param, exampleKey, void 0);
|
|
37
|
+
if (!example || isParamDisabled(param, example)) continue;
|
|
38
|
+
/** De-serialize the example value if it is a string and matches the schema type */
|
|
39
|
+
const deSerializedValue = deSerializeParameter(typeof example.value === "string" ? replaceEnvVariables(example.value, env) : example.value, param);
|
|
40
|
+
const paramName = replaceEnvVariables(param.name, env);
|
|
41
|
+
switch (param.in) {
|
|
42
|
+
case "header": {
|
|
43
|
+
if (paramName.toLowerCase() === "content-type" && deSerializedValue === "multipart/form-data") break;
|
|
44
|
+
/** Headers only support simple style according to OpenAPI 3.1.1 */
|
|
45
|
+
const serialized = serializeSimpleStyle(deSerializedValue, getExplode(param, false));
|
|
46
|
+
if (!isDefined(serialized)) break;
|
|
47
|
+
/** Headers can only be strings so we can cast numbers etc */
|
|
48
|
+
const serializedString = String(serialized);
|
|
49
|
+
if (result.headers[paramName]) result.headers[paramName] = `${result.headers[paramName]},${serializedString}`;
|
|
50
|
+
else result.headers[paramName] = serializedString;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
case "path": {
|
|
54
|
+
const serialized = serializeSimpleStyle(deSerializedValue, getExplode(param, false));
|
|
55
|
+
result.pathVariables[paramName] = encodeURIComponent(String(serialized));
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
case "query":
|
|
59
|
+
processQueryParameter(param, paramName, deSerializedValue, result.urlParams, result.allowReservedQueryParameters);
|
|
60
|
+
break;
|
|
61
|
+
case "cookie":
|
|
62
|
+
processCookieParameter(paramName, deSerializedValue, getExplode(param, true), result.cookies);
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
67
|
+
};
|
|
68
|
+
/** Ensure we only apply the correcet style to the correct types */
|
|
69
|
+
var getStyle = (param, replacedValue) => {
|
|
70
|
+
if (!("style" in param) || !param.style) return "form";
|
|
71
|
+
if (param.style === "deepObject") {
|
|
72
|
+
if (isObject(replacedValue)) return "deepObject";
|
|
73
|
+
return "form";
|
|
74
|
+
}
|
|
75
|
+
return param.style;
|
|
76
|
+
};
|
|
77
|
+
/** Whether the parameter allows reserved characters (from param or schema). */
|
|
78
|
+
var isAllowReserved = (param) => {
|
|
79
|
+
if ("allowReserved" in param && param.allowReserved !== void 0) return param.allowReserved;
|
|
80
|
+
if ("schema" in param && param.schema && typeof param.schema === "object" && "allowReserved" in param.schema) return param.schema.allowReserved === true;
|
|
81
|
+
return false;
|
|
82
|
+
};
|
|
83
|
+
/** When allowReserved is true, add keys to the set so reserved chars stay unescaped in the URL. */
|
|
84
|
+
var trackReservedKeys = (allowReservedQueryParameters, allowReserved, ...keys) => {
|
|
85
|
+
if (allowReserved) for (const key of keys) allowReservedQueryParameters.add(key);
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Helper function to process query parameters.
|
|
89
|
+
* Extracted to reduce complexity in main function.
|
|
90
|
+
*/
|
|
91
|
+
var processQueryParameter = (param, paramName, replacedValue, urlParams, allowReservedQueryParameters) => {
|
|
92
|
+
/** If the parameter should be exploded, defaults to true for form style */
|
|
93
|
+
const explodeParam = "explode" in param && param.explode !== void 0 ? param.explode : true;
|
|
94
|
+
const allowReserved = isAllowReserved(param);
|
|
95
|
+
/** Style of the parameter, defaults to form */
|
|
96
|
+
const style = getStyle(param, replacedValue);
|
|
97
|
+
if ("content" in param && param.content) {
|
|
98
|
+
const serializedValue = serializeContentValue(replacedValue, Object.keys(param.content)[0] ?? "application/json");
|
|
99
|
+
urlParams.set(paramName, serializedValue);
|
|
100
|
+
trackReservedKeys(allowReservedQueryParameters, allowReserved, paramName);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (style === "deepObject" && explodeParam) {
|
|
104
|
+
const entries = serializeDeepObjectStyle(paramName, replacedValue);
|
|
105
|
+
for (const entry of entries) {
|
|
106
|
+
urlParams.append(entry.key, entry.value);
|
|
107
|
+
trackReservedKeys(allowReservedQueryParameters, allowReserved, entry.key);
|
|
108
|
+
}
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (style === "spaceDelimited") {
|
|
112
|
+
const serialized = serializeSpaceDelimitedStyle(replacedValue);
|
|
113
|
+
const existingValue = urlParams.get(paramName);
|
|
114
|
+
urlParams.set(paramName, existingValue ? `${existingValue} ${serialized}` : serialized);
|
|
115
|
+
trackReservedKeys(allowReservedQueryParameters, allowReserved, paramName);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (style === "pipeDelimited") {
|
|
119
|
+
const serialized = serializePipeDelimitedStyle(replacedValue);
|
|
120
|
+
const existingValue = urlParams.get(paramName);
|
|
121
|
+
urlParams.set(paramName, existingValue ? `${existingValue}|${serialized}` : serialized);
|
|
122
|
+
trackReservedKeys(allowReservedQueryParameters, allowReserved, paramName);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const serialized = serializeFormStyle(replacedValue, explodeParam);
|
|
126
|
+
if (Array.isArray(serialized)) for (const entry of serialized) {
|
|
127
|
+
const key = entry.key || paramName;
|
|
128
|
+
urlParams.append(key, String(entry.value));
|
|
129
|
+
trackReservedKeys(allowReservedQueryParameters, allowReserved, key);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
urlParams.append(paramName, String(serialized));
|
|
133
|
+
trackReservedKeys(allowReservedQueryParameters, allowReserved, paramName);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Helper function to process cookie parameters.
|
|
138
|
+
* Extracted to reduce complexity in main function.
|
|
139
|
+
*/
|
|
140
|
+
var processCookieParameter = (paramName, replacedValue, explode, cookies) => {
|
|
141
|
+
const serialized = serializeFormStyleForCookies(replacedValue, explode);
|
|
142
|
+
if (Array.isArray(serialized)) for (const entry of serialized) {
|
|
143
|
+
const key = entry.key || paramName;
|
|
144
|
+
cookies.push(coerceValue(xScalarCookieSchema, {
|
|
145
|
+
name: key,
|
|
146
|
+
value: String(entry.value),
|
|
147
|
+
path: "/"
|
|
148
|
+
}));
|
|
149
|
+
}
|
|
150
|
+
else cookies.push(coerceValue(xScalarCookieSchema, {
|
|
151
|
+
name: paramName,
|
|
152
|
+
value: String(serialized),
|
|
153
|
+
path: "/"
|
|
154
|
+
}));
|
|
155
|
+
};
|
|
156
|
+
//#endregion
|
|
157
|
+
export { buildRequestParameters };
|
|
158
|
+
|
|
159
|
+
//# sourceMappingURL=build-request-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-request-parameters.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-parameters.ts"],"sourcesContent":["import { isDefined } from '@scalar/helpers/array/is-defined'\nimport { isObject } from '@scalar/helpers/object/is-object'\nimport { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n type XScalarCookie,\n xScalarCookieSchema,\n} from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\nimport type { ParameterObject, ReferenceType } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\nimport { deSerializeParameter } from '@/v2/blocks/operation-block/helpers/de-serialize-parameter'\nimport { isParamDisabled } from '@/v2/blocks/request-block/helpers/is-param-disabled'\n\nimport { getExample } from './get-example'\nimport {\n serializeContentValue,\n serializeDeepObjectStyle,\n serializeFormStyle,\n serializeFormStyleForCookies,\n serializePipeDelimitedStyle,\n serializeSimpleStyle,\n serializeSpaceDelimitedStyle,\n} from './serialize-parameter'\n\n/** Helper to get explode value with default */\nconst getExplode = (param: ParameterObject, defaultValue: boolean): boolean =>\n 'explode' in param && param.explode !== undefined ? param.explode : defaultValue\n\n/**\n * Converts the parameters into a set of headers, cookies and url params while\n * replacing environment variables and extracting example values. Also builds up a record of the path\n * parameters which can then be used to replace variables in the path.\n * Also handles both content based and schema based parameters.\n *\n * @param parameters - Unfiltered parameters\n * @param env - Environment variables flattened into a key-value object\n * @param exampleKey - The key of the current example\n * @returns A set of headers, cookies and url params\n */\nexport const buildRequestParameters = (\n /** All parameters */\n parameters: ReferenceType<ParameterObject>[] = [],\n /** Environment variables flattened into a key-value object */\n env: Record<string, string> = {},\n /** The key of the current example */\n exampleKey: string = 'default',\n): {\n cookies: XScalarCookie[]\n headers: Record<string, string>\n pathVariables: Record<string, string>\n allowReservedQueryParameters: Set<string>\n urlParams: URLSearchParams\n} => {\n const result = {\n cookies: [] as XScalarCookie[],\n headers: {} as Record<string, string>,\n pathVariables: {} as Record<string, string>,\n allowReservedQueryParameters: new Set<string>(),\n urlParams: new URLSearchParams(),\n }\n\n // Early return for empty parameters\n if (parameters.length === 0) {\n return result\n }\n\n // Second pass: process all parameters\n for (const referencedParam of parameters) {\n const param = getResolvedRef(referencedParam)\n const example = getExample(param, exampleKey, undefined)\n\n // Skip disabled examples\n if (!example || isParamDisabled(param, example)) {\n continue\n }\n\n /** Replace environment variables in the key and value */\n const replacedEnvValue = typeof example.value === 'string' ? replaceEnvVariables(example.value, env) : example.value\n\n /** De-serialize the example value if it is a string and matches the schema type */\n const deSerializedValue = deSerializeParameter(replacedEnvValue, param)\n const paramName = replaceEnvVariables(param.name, env)\n\n // Handle by parameter location\n switch (param.in) {\n case 'header': {\n // Filter out Content-Type header when it is multipart/form-data\n // The browser will automatically set this header with the proper boundary\n const lowerParamName = paramName.toLowerCase()\n if (lowerParamName === 'content-type' && deSerializedValue === 'multipart/form-data') {\n break\n }\n\n /** Headers only support simple style according to OpenAPI 3.1.1 */\n const serialized = serializeSimpleStyle(deSerializedValue, getExplode(param, false))\n\n // Remove undefined/null headers\n if (!isDefined(serialized)) {\n break\n }\n\n /** Headers can only be strings so we can cast numbers etc */\n const serializedString = String(serialized)\n\n // If the header already exists, append with comma\n if (result.headers[paramName]) {\n result.headers[paramName] = `${result.headers[paramName]},${serializedString}`\n } else {\n result.headers[paramName] = serializedString\n }\n break\n }\n\n case 'path': {\n // Path parameters use simple style by default\n const serialized = serializeSimpleStyle(deSerializedValue, getExplode(param, false))\n result.pathVariables[paramName] = encodeURIComponent(String(serialized))\n break\n }\n\n case 'query': {\n processQueryParameter(\n param,\n paramName,\n deSerializedValue,\n result.urlParams,\n result.allowReservedQueryParameters,\n )\n break\n }\n\n case 'cookie': {\n processCookieParameter(paramName, deSerializedValue, getExplode(param, true), result.cookies)\n break\n }\n }\n }\n\n return result\n}\n\n/** Ensure we only apply the correcet style to the correct types */\nconst getStyle = (param: ParameterObject, replacedValue: unknown): string => {\n if (!('style' in param) || !param.style) {\n return 'form'\n }\n\n // DeepObject can only apply to objects\n if (param.style === 'deepObject') {\n if (isObject(replacedValue)) {\n return 'deepObject'\n }\n return 'form'\n }\n\n return param.style\n}\n\n/** Whether the parameter allows reserved characters (from param or schema). */\nconst isAllowReserved = (param: ParameterObject): boolean => {\n if ('allowReserved' in param && param.allowReserved !== undefined) {\n return param.allowReserved\n }\n if ('schema' in param && param.schema && typeof param.schema === 'object' && 'allowReserved' in param.schema) {\n return (param.schema as { allowReserved?: boolean }).allowReserved === true\n }\n return false\n}\n\n/** When allowReserved is true, add keys to the set so reserved chars stay unescaped in the URL. */\nconst trackReservedKeys = (\n allowReservedQueryParameters: Set<string>,\n allowReserved: boolean,\n ...keys: string[]\n): void => {\n if (allowReserved) {\n for (const key of keys) {\n allowReservedQueryParameters.add(key)\n }\n }\n}\n\n/**\n * Helper function to process query parameters.\n * Extracted to reduce complexity in main function.\n */\nconst processQueryParameter = (\n param: ParameterObject,\n paramName: string,\n replacedValue: unknown,\n urlParams: URLSearchParams,\n allowReservedQueryParameters: Set<string>,\n): void => {\n /** If the parameter should be exploded, defaults to true for form style */\n const explodeParam = 'explode' in param && param.explode !== undefined ? param.explode : true\n const allowReserved = isAllowReserved(param)\n\n /** Style of the parameter, defaults to form */\n const style = getStyle(param, replacedValue)\n\n // Content type parameters should be serialized according to the parameter's own content type\n if ('content' in param && param.content) {\n // We grab the first for now but eventually we should support selecting the content type per parameter\n const paramContentType = Object.keys(param.content)[0] ?? 'application/json'\n const serializedValue = serializeContentValue(replacedValue, paramContentType)\n urlParams.set(paramName, serializedValue)\n trackReservedKeys(allowReservedQueryParameters, allowReserved, paramName)\n return\n }\n\n // Handle deepObject style\n if (style === 'deepObject' && explodeParam) {\n const entries = serializeDeepObjectStyle(paramName, replacedValue)\n for (const entry of entries) {\n urlParams.append(entry.key, entry.value)\n trackReservedKeys(allowReservedQueryParameters, allowReserved, entry.key)\n }\n return\n }\n\n // Handle spaceDelimited style\n if (style === 'spaceDelimited') {\n const serialized = serializeSpaceDelimitedStyle(replacedValue)\n const existingValue = urlParams.get(paramName)\n urlParams.set(paramName, existingValue ? `${existingValue} ${serialized}` : serialized)\n trackReservedKeys(allowReservedQueryParameters, allowReserved, paramName)\n return\n }\n\n // Handle pipeDelimited style\n if (style === 'pipeDelimited') {\n const serialized = serializePipeDelimitedStyle(replacedValue)\n const existingValue = urlParams.get(paramName)\n urlParams.set(paramName, existingValue ? `${existingValue}|${serialized}` : serialized)\n trackReservedKeys(allowReservedQueryParameters, allowReserved, paramName)\n return\n }\n\n // Handle form style (default)\n const serialized = serializeFormStyle(replacedValue, explodeParam)\n\n // If serialized is an array of key-value pairs (exploded object or array)\n if (Array.isArray(serialized)) {\n for (const entry of serialized) {\n // If key is empty, use paramName (for arrays)\n const key = entry.key || paramName\n urlParams.append(key, String(entry.value))\n trackReservedKeys(allowReservedQueryParameters, allowReserved, key)\n }\n } else {\n // Otherwise, convert to string for URLSearchParams\n urlParams.append(paramName, String(serialized))\n trackReservedKeys(allowReservedQueryParameters, allowReserved, paramName)\n }\n}\n\n/**\n * Helper function to process cookie parameters.\n * Extracted to reduce complexity in main function.\n */\nconst processCookieParameter = (\n paramName: string,\n replacedValue: unknown,\n explode: boolean,\n cookies: XScalarCookie[],\n): void => {\n // Cookies only support form style according to OpenAPI 3.1.1\n const serialized = serializeFormStyleForCookies(replacedValue, explode)\n\n // If serialized is an array of key-value pairs (exploded object or array)\n if (Array.isArray(serialized)) {\n for (const entry of serialized) {\n const key = entry.key || paramName\n cookies.push(\n coerceValue(xScalarCookieSchema, {\n name: key,\n value: String(entry.value),\n path: '/',\n }),\n )\n }\n } else {\n // Otherwise, convert to string for cookie value\n cookies.push(\n coerceValue(xScalarCookieSchema, {\n name: paramName,\n value: String(serialized),\n path: '/',\n }),\n )\n }\n}\n"],"mappings":";;;;;;;;;;;;AA0BA,IAAM,cAAc,OAAwB,iBAC1C,aAAa,SAAS,MAAM,YAAY,KAAA,IAAY,MAAM,UAAU;;;;;;;;;;;;AAatE,IAAa,0BAEX,aAA+C,EAAE,EAEjD,MAA8B,EAAE,EAEhC,aAAqB,cAOlB;CACH,MAAM,SAAS;EACb,SAAS,EAAE;EACX,SAAS,EAAE;EACX,eAAe,EAAE;EACjB,8CAA8B,IAAI,KAAa;EAC/C,WAAW,IAAI,iBAAiB;EACjC;AAGD,KAAI,WAAW,WAAW,EACxB,QAAO;AAIT,MAAK,MAAM,mBAAmB,YAAY;EACxC,MAAM,QAAQ,eAAe,gBAAgB;EAC7C,MAAM,UAAU,WAAW,OAAO,YAAY,KAAA,EAAU;AAGxD,MAAI,CAAC,WAAW,gBAAgB,OAAO,QAAQ,CAC7C;;EAOF,MAAM,oBAAoB,qBAHD,OAAO,QAAQ,UAAU,WAAW,oBAAoB,QAAQ,OAAO,IAAI,GAAG,QAAQ,OAG9C,MAAM;EACvE,MAAM,YAAY,oBAAoB,MAAM,MAAM,IAAI;AAGtD,UAAQ,MAAM,IAAd;GACE,KAAK,UAAU;AAIb,QADuB,UAAU,aAAa,KACvB,kBAAkB,sBAAsB,sBAC7D;;IAIF,MAAM,aAAa,qBAAqB,mBAAmB,WAAW,OAAO,MAAM,CAAC;AAGpF,QAAI,CAAC,UAAU,WAAW,CACxB;;IAIF,MAAM,mBAAmB,OAAO,WAAW;AAG3C,QAAI,OAAO,QAAQ,WACjB,QAAO,QAAQ,aAAa,GAAG,OAAO,QAAQ,WAAW,GAAG;QAE5D,QAAO,QAAQ,aAAa;AAE9B;;GAGF,KAAK,QAAQ;IAEX,MAAM,aAAa,qBAAqB,mBAAmB,WAAW,OAAO,MAAM,CAAC;AACpF,WAAO,cAAc,aAAa,mBAAmB,OAAO,WAAW,CAAC;AACxE;;GAGF,KAAK;AACH,0BACE,OACA,WACA,mBACA,OAAO,WACP,OAAO,6BACR;AACD;GAGF,KAAK;AACH,2BAAuB,WAAW,mBAAmB,WAAW,OAAO,KAAK,EAAE,OAAO,QAAQ;AAC7F;;;AAKN,QAAO;;;AAIT,IAAM,YAAY,OAAwB,kBAAmC;AAC3E,KAAI,EAAE,WAAW,UAAU,CAAC,MAAM,MAChC,QAAO;AAIT,KAAI,MAAM,UAAU,cAAc;AAChC,MAAI,SAAS,cAAc,CACzB,QAAO;AAET,SAAO;;AAGT,QAAO,MAAM;;;AAIf,IAAM,mBAAmB,UAAoC;AAC3D,KAAI,mBAAmB,SAAS,MAAM,kBAAkB,KAAA,EACtD,QAAO,MAAM;AAEf,KAAI,YAAY,SAAS,MAAM,UAAU,OAAO,MAAM,WAAW,YAAY,mBAAmB,MAAM,OACpG,QAAQ,MAAM,OAAuC,kBAAkB;AAEzE,QAAO;;;AAIT,IAAM,qBACJ,8BACA,eACA,GAAG,SACM;AACT,KAAI,cACF,MAAK,MAAM,OAAO,KAChB,8BAA6B,IAAI,IAAI;;;;;;AAS3C,IAAM,yBACJ,OACA,WACA,eACA,WACA,iCACS;;CAET,MAAM,eAAe,aAAa,SAAS,MAAM,YAAY,KAAA,IAAY,MAAM,UAAU;CACzF,MAAM,gBAAgB,gBAAgB,MAAM;;CAG5C,MAAM,QAAQ,SAAS,OAAO,cAAc;AAG5C,KAAI,aAAa,SAAS,MAAM,SAAS;EAGvC,MAAM,kBAAkB,sBAAsB,eADrB,OAAO,KAAK,MAAM,QAAQ,CAAC,MAAM,mBACoB;AAC9E,YAAU,IAAI,WAAW,gBAAgB;AACzC,oBAAkB,8BAA8B,eAAe,UAAU;AACzE;;AAIF,KAAI,UAAU,gBAAgB,cAAc;EAC1C,MAAM,UAAU,yBAAyB,WAAW,cAAc;AAClE,OAAK,MAAM,SAAS,SAAS;AAC3B,aAAU,OAAO,MAAM,KAAK,MAAM,MAAM;AACxC,qBAAkB,8BAA8B,eAAe,MAAM,IAAI;;AAE3E;;AAIF,KAAI,UAAU,kBAAkB;EAC9B,MAAM,aAAa,6BAA6B,cAAc;EAC9D,MAAM,gBAAgB,UAAU,IAAI,UAAU;AAC9C,YAAU,IAAI,WAAW,gBAAgB,GAAG,cAAc,GAAG,eAAe,WAAW;AACvF,oBAAkB,8BAA8B,eAAe,UAAU;AACzE;;AAIF,KAAI,UAAU,iBAAiB;EAC7B,MAAM,aAAa,4BAA4B,cAAc;EAC7D,MAAM,gBAAgB,UAAU,IAAI,UAAU;AAC9C,YAAU,IAAI,WAAW,gBAAgB,GAAG,cAAc,GAAG,eAAe,WAAW;AACvF,oBAAkB,8BAA8B,eAAe,UAAU;AACzE;;CAIF,MAAM,aAAa,mBAAmB,eAAe,aAAa;AAGlE,KAAI,MAAM,QAAQ,WAAW,CAC3B,MAAK,MAAM,SAAS,YAAY;EAE9B,MAAM,MAAM,MAAM,OAAO;AACzB,YAAU,OAAO,KAAK,OAAO,MAAM,MAAM,CAAC;AAC1C,oBAAkB,8BAA8B,eAAe,IAAI;;MAEhE;AAEL,YAAU,OAAO,WAAW,OAAO,WAAW,CAAC;AAC/C,oBAAkB,8BAA8B,eAAe,UAAU;;;;;;;AAQ7E,IAAM,0BACJ,WACA,eACA,SACA,YACS;CAET,MAAM,aAAa,6BAA6B,eAAe,QAAQ;AAGvE,KAAI,MAAM,QAAQ,WAAW,CAC3B,MAAK,MAAM,SAAS,YAAY;EAC9B,MAAM,MAAM,MAAM,OAAO;AACzB,UAAQ,KACN,YAAY,qBAAqB;GAC/B,MAAM;GACN,OAAO,OAAO,MAAM,MAAM;GAC1B,MAAM;GACP,CAAC,CACH;;KAIH,SAAQ,KACN,YAAY,qBAAqB;EAC/B,MAAM;EACN,OAAO,OAAO,WAAW;EACzB,MAAM;EACP,CAAC,CACH"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
|
|
2
2
|
import type { SecurityRequirementObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
-
import type { MergedSecuritySchemes } from '
|
|
4
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
3
|
+
import type { MergedSecuritySchemes } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/merge-security.js';
|
|
4
|
+
import type { SecuritySchemeObjectSecret } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
5
5
|
/**
|
|
6
6
|
* Get the selected security schemes from security requirements.
|
|
7
7
|
* Takes security requirement objects and resolves them to actual security scheme objects.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { encode } from "js-base64";
|
|
2
|
+
import { isDefined } from "@scalar/helpers/array/is-defined";
|
|
3
|
+
import { objectKeys } from "@scalar/helpers/object/object-keys";
|
|
4
|
+
import { replaceEnvVariables } from "@scalar/helpers/regex/replace-variables";
|
|
5
|
+
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
|
+
import { xScalarCookieSchema } from "@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies";
|
|
7
|
+
import { coerceValue } from "@scalar/workspace-store/schemas/typebox-coerce";
|
|
8
|
+
//#region src/v2/blocks/operation-block/helpers/build-request-security.ts
|
|
9
|
+
/**
|
|
10
|
+
* Get the selected security schemes from security requirements.
|
|
11
|
+
* Takes security requirement objects and resolves them to actual security scheme objects.
|
|
12
|
+
*/
|
|
13
|
+
var getSecuritySchemes = (securitySchemes, selectedSecurity) => selectedSecurity.flatMap((scheme) => objectKeys(scheme).flatMap((key) => {
|
|
14
|
+
const scheme = getResolvedRef(securitySchemes?.[key]);
|
|
15
|
+
if (scheme) return scheme;
|
|
16
|
+
return [];
|
|
17
|
+
})) ?? [];
|
|
18
|
+
/**
|
|
19
|
+
* Generates the headers, cookies and query params for selected security schemes
|
|
20
|
+
* In the future we can add customization for where the security is applied
|
|
21
|
+
*/
|
|
22
|
+
var buildRequestSecurity = (selectedSecuritySchemes, env = {}, emptyTokenPlaceholder = "") => {
|
|
23
|
+
const headers = {};
|
|
24
|
+
const cookies = [];
|
|
25
|
+
const urlParams = new URLSearchParams();
|
|
26
|
+
selectedSecuritySchemes.forEach((scheme) => {
|
|
27
|
+
if (scheme.type === "apiKey") {
|
|
28
|
+
const name = replaceEnvVariables(scheme.name, env);
|
|
29
|
+
const value = replaceEnvVariables(scheme["x-scalar-secret-token"], env) || emptyTokenPlaceholder;
|
|
30
|
+
if (scheme.in === "header") headers[name] = value;
|
|
31
|
+
if (scheme.in === "query") urlParams.append(name, value);
|
|
32
|
+
if (scheme.in === "cookie") cookies.push(coerceValue(xScalarCookieSchema, {
|
|
33
|
+
name,
|
|
34
|
+
value,
|
|
35
|
+
path: "/"
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
if (scheme.type === "http") if (scheme.scheme === "basic") {
|
|
39
|
+
const value = `${replaceEnvVariables(scheme["x-scalar-secret-username"], env)}:${replaceEnvVariables(scheme["x-scalar-secret-password"], env)}`;
|
|
40
|
+
headers["Authorization"] = `Basic ${value === ":" ? "username:password" : encode(value)}`;
|
|
41
|
+
} else headers["Authorization"] = `Bearer ${replaceEnvVariables(scheme["x-scalar-secret-token"], env) || emptyTokenPlaceholder}`;
|
|
42
|
+
if (scheme.type === "oauth2") headers["Authorization"] = `Bearer ${replaceEnvVariables(Object.values(scheme?.flows ?? {}).filter(isDefined).find((f) => f["x-scalar-secret-token"])?.["x-scalar-secret-token"] ?? "", env) || emptyTokenPlaceholder}`;
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
headers,
|
|
46
|
+
cookies,
|
|
47
|
+
urlParams
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { buildRequestSecurity, getSecuritySchemes };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=build-request-security.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-request-security.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request-security.ts"],"sourcesContent":["import { isDefined } from '@scalar/helpers/array/is-defined'\nimport { objectKeys } from '@scalar/helpers/object/object-keys'\nimport { replaceEnvVariables } from '@scalar/helpers/regex/replace-variables'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport {\n type XScalarCookie,\n xScalarCookieSchema,\n} from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\nimport type { SecurityRequirementObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { encode } from 'js-base64'\n\nimport type { MergedSecuritySchemes } from '@/v2/blocks/scalar-auth-selector-block/helpers/merge-security'\nimport type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types'\n\n/**\n * Get the selected security schemes from security requirements.\n * Takes security requirement objects and resolves them to actual security scheme objects.\n */\nexport const getSecuritySchemes = (\n securitySchemes: MergedSecuritySchemes,\n selectedSecurity: SecurityRequirementObject[],\n): SecuritySchemeObjectSecret[] =>\n selectedSecurity.flatMap((scheme) =>\n objectKeys(scheme).flatMap((key) => {\n const scheme = getResolvedRef(securitySchemes?.[key])\n if (scheme) {\n return scheme\n }\n\n return []\n }),\n ) ?? []\n\n/**\n * Generates the headers, cookies and query params for selected security schemes\n * In the future we can add customization for where the security is applied\n */\nexport const buildRequestSecurity = (\n /** Currently selected security for the current operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[],\n /** Environment variables flattened into a key-value object */\n env: Record<string, string> = {},\n /** Include this parameter to set the placeholder for empty tokens */\n emptyTokenPlaceholder = '',\n): { headers: Record<string, string>; cookies: XScalarCookie[]; urlParams: URLSearchParams } => {\n const headers: Record<string, string> = {}\n const cookies: XScalarCookie[] = []\n const urlParams = new URLSearchParams()\n\n selectedSecuritySchemes.forEach((scheme) => {\n // Api key\n if (scheme.type === 'apiKey') {\n const name = replaceEnvVariables(scheme.name, env)\n const value = replaceEnvVariables(scheme['x-scalar-secret-token'], env) || emptyTokenPlaceholder\n\n if (scheme.in === 'header') {\n headers[name] = value\n }\n if (scheme.in === 'query') {\n urlParams.append(name, value)\n }\n if (scheme.in === 'cookie') {\n cookies.push(\n coerceValue(xScalarCookieSchema, {\n name,\n value,\n path: '/',\n }),\n )\n }\n }\n\n // HTTP\n if (scheme.type === 'http') {\n if (scheme.scheme === 'basic') {\n const username = replaceEnvVariables(scheme['x-scalar-secret-username'], env)\n const password = replaceEnvVariables(scheme['x-scalar-secret-password'], env)\n const value = `${username}:${password}`\n\n headers['Authorization'] = `Basic ${value === ':' ? 'username:password' : encode(value)}`\n } else {\n const value = replaceEnvVariables(scheme['x-scalar-secret-token'], env)\n headers['Authorization'] = `Bearer ${value || emptyTokenPlaceholder}`\n }\n }\n\n // OAuth2\n if (scheme.type === 'oauth2') {\n const flows = Object.values(scheme?.flows ?? {})\n const token = replaceEnvVariables(\n flows.filter(isDefined).find((f) => f['x-scalar-secret-token'])?.['x-scalar-secret-token'] ?? '',\n env,\n )\n\n headers['Authorization'] = `Bearer ${token || emptyTokenPlaceholder}`\n }\n })\n\n return { headers, cookies, urlParams }\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,IAAa,sBACX,iBACA,qBAEA,iBAAiB,SAAS,WACxB,WAAW,OAAO,CAAC,SAAS,QAAQ;CAClC,MAAM,SAAS,eAAe,kBAAkB,KAAK;AACrD,KAAI,OACF,QAAO;AAGT,QAAO,EAAE;EACT,CACH,IAAI,EAAE;;;;;AAMT,IAAa,wBAEX,yBAEA,MAA8B,EAAE,EAEhC,wBAAwB,OACsE;CAC9F,MAAM,UAAkC,EAAE;CAC1C,MAAM,UAA2B,EAAE;CACnC,MAAM,YAAY,IAAI,iBAAiB;AAEvC,yBAAwB,SAAS,WAAW;AAE1C,MAAI,OAAO,SAAS,UAAU;GAC5B,MAAM,OAAO,oBAAoB,OAAO,MAAM,IAAI;GAClD,MAAM,QAAQ,oBAAoB,OAAO,0BAA0B,IAAI,IAAI;AAE3E,OAAI,OAAO,OAAO,SAChB,SAAQ,QAAQ;AAElB,OAAI,OAAO,OAAO,QAChB,WAAU,OAAO,MAAM,MAAM;AAE/B,OAAI,OAAO,OAAO,SAChB,SAAQ,KACN,YAAY,qBAAqB;IAC/B;IACA;IACA,MAAM;IACP,CAAC,CACH;;AAKL,MAAI,OAAO,SAAS,OAClB,KAAI,OAAO,WAAW,SAAS;GAG7B,MAAM,QAAQ,GAFG,oBAAoB,OAAO,6BAA6B,IAAI,CAEnD,GADT,oBAAoB,OAAO,6BAA6B,IAAI;AAG7E,WAAQ,mBAAmB,SAAS,UAAU,MAAM,sBAAsB,OAAO,MAAM;QAGvF,SAAQ,mBAAmB,UADb,oBAAoB,OAAO,0BAA0B,IAAI,IACzB;AAKlD,MAAI,OAAO,SAAS,SAOlB,SAAQ,mBAAmB,UALb,oBADA,OAAO,OAAO,QAAQ,SAAS,EAAE,CAAC,CAExC,OAAO,UAAU,CAAC,MAAM,MAAM,EAAE,yBAAyB,GAAG,4BAA4B,IAC9F,IACD,IAE6C;GAEhD;AAEF,QAAO;EAAE;EAAS;EAAS;EAAW"}
|
|
@@ -3,8 +3,8 @@ import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensi
|
|
|
3
3
|
import type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
|
|
4
4
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
5
5
|
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation';
|
|
6
|
-
import { type ErrorResponse } from '
|
|
7
|
-
import type { SecuritySchemeObjectSecret } from '
|
|
6
|
+
import { type ErrorResponse } from '../../../../libs/errors.js';
|
|
7
|
+
import type { SecuritySchemeObjectSecret } from '../../../../v2/blocks/scalar-auth-selector-block/helpers/secret-types';
|
|
8
8
|
/**
|
|
9
9
|
* Builds a fully configured Request object ready for execution.
|
|
10
10
|
*
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ERRORS, normalizeError } from "../../../../libs/errors.js";
|
|
2
|
+
import { isElectron } from "../../../../libs/electron.js";
|
|
3
|
+
import { buildRequestSecurity } from "./build-request-security.js";
|
|
4
|
+
import { getEnvironmentVariables } from "./get-environment-variables.js";
|
|
5
|
+
import { getResolvedUrl } from "./get-resolved-url.js";
|
|
6
|
+
import { getDefaultHeaders } from "../../request-block/helpers/get-default-headers.js";
|
|
7
|
+
import { buildRequestBody } from "./build-request-body.js";
|
|
8
|
+
import { buildRequestCookieHeader } from "./build-request-cookie-header.js";
|
|
9
|
+
import { buildRequestParameters } from "./build-request-parameters.js";
|
|
10
|
+
import { redirectToProxy, shouldUseProxy } from "@scalar/helpers/url/redirect-to-proxy";
|
|
11
|
+
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
12
|
+
import { canMethodHaveBody } from "@scalar/helpers/http/can-method-have-body";
|
|
13
|
+
//#region src/v2/blocks/operation-block/helpers/build-request.ts
|
|
14
|
+
/**
|
|
15
|
+
* Builds a fully configured Request object ready for execution.
|
|
16
|
+
*
|
|
17
|
+
* This function processes an OpenAPI operation and constructs a fetch-compatible
|
|
18
|
+
* Request by resolving environment variables, applying security schemes, building
|
|
19
|
+
* headers and cookies, handling proxy redirection, and preparing the request body.
|
|
20
|
+
*
|
|
21
|
+
* The function handles special cases like Electron environments and proxy usage
|
|
22
|
+
* where custom cookie headers are required.
|
|
23
|
+
*
|
|
24
|
+
* @returns A tuple containing either an error or the request object with an abort controller
|
|
25
|
+
*/
|
|
26
|
+
var buildRequest = ({ environment, exampleKey = "default", globalCookies, method, operation, path, proxyUrl, server, selectedSecuritySchemes }) => {
|
|
27
|
+
try {
|
|
28
|
+
const requestBody = getResolvedRef(operation.requestBody);
|
|
29
|
+
/** Flatten the environment variables array into a key-value object */
|
|
30
|
+
const env = getEnvironmentVariables(environment);
|
|
31
|
+
/** Build out the request parameters */
|
|
32
|
+
const params = buildRequestParameters(operation.parameters ?? [], env, exampleKey);
|
|
33
|
+
const security = buildRequestSecurity(selectedSecuritySchemes, env);
|
|
34
|
+
const defaultHeaders = getDefaultHeaders({
|
|
35
|
+
method,
|
|
36
|
+
operation,
|
|
37
|
+
exampleKey,
|
|
38
|
+
hideDisabledHeaders: true
|
|
39
|
+
}).filter((header) => !header.isOverridden).reduce((acc, header) => {
|
|
40
|
+
acc[header.name] = header.defaultValue;
|
|
41
|
+
return acc;
|
|
42
|
+
}, {});
|
|
43
|
+
const headers = new Headers({
|
|
44
|
+
...defaultHeaders,
|
|
45
|
+
...params.headers,
|
|
46
|
+
...security.headers
|
|
47
|
+
});
|
|
48
|
+
const urlParams = new URLSearchParams([...params.urlParams, ...security.urlParams]);
|
|
49
|
+
const body = canMethodHaveBody(method) ? buildRequestBody(requestBody, env, exampleKey) : null;
|
|
50
|
+
if (body && (body instanceof FormData || body instanceof URLSearchParams)) headers.delete("Content-Type");
|
|
51
|
+
/** Combine the server url, path and url params into a single url */
|
|
52
|
+
const url = getResolvedUrl({
|
|
53
|
+
environment,
|
|
54
|
+
server,
|
|
55
|
+
path,
|
|
56
|
+
pathVariables: params.pathVariables,
|
|
57
|
+
allowReservedQueryParameters: params.allowReservedQueryParameters,
|
|
58
|
+
urlParams
|
|
59
|
+
});
|
|
60
|
+
if (!url) throw ERRORS.URL_EMPTY;
|
|
61
|
+
const isUsingProxy = shouldUseProxy(proxyUrl, url);
|
|
62
|
+
const proxiedUrl = redirectToProxy(proxyUrl, url);
|
|
63
|
+
const userAgentHeader = headers.get("User-Agent");
|
|
64
|
+
if (isElectron() && userAgentHeader) headers.set("X-Scalar-User-Agent", userAgentHeader);
|
|
65
|
+
/** Build out the cookies header */
|
|
66
|
+
const cookiesHeader = buildRequestCookieHeader({
|
|
67
|
+
paramCookies: [...params.cookies, ...security.cookies],
|
|
68
|
+
globalCookies,
|
|
69
|
+
env,
|
|
70
|
+
originalCookieHeader: headers.get("Cookie"),
|
|
71
|
+
url,
|
|
72
|
+
useCustomCookieHeader: isElectron() || isUsingProxy,
|
|
73
|
+
disabledGlobalCookies: operation["x-scalar-disable-parameters"]?.["global-cookies"]?.[exampleKey] ?? {}
|
|
74
|
+
});
|
|
75
|
+
if (cookiesHeader) headers.set(cookiesHeader.name, cookiesHeader.value);
|
|
76
|
+
/** Controller to allow aborting the request */
|
|
77
|
+
const controller = new AbortController();
|
|
78
|
+
const isSseAcceptHeader = headers.get("Accept")?.toLowerCase().includes("text/event-stream") ?? false;
|
|
79
|
+
const requestCacheMode = isSseAcceptHeader ? "no-store" : "default";
|
|
80
|
+
if (isSseAcceptHeader) {
|
|
81
|
+
headers.set("Cache-Control", "no-cache");
|
|
82
|
+
headers.set("Pragma", "no-cache");
|
|
83
|
+
}
|
|
84
|
+
return [null, {
|
|
85
|
+
controller,
|
|
86
|
+
isUsingProxy,
|
|
87
|
+
request: new Request(proxiedUrl, {
|
|
88
|
+
method: method.toUpperCase(),
|
|
89
|
+
headers,
|
|
90
|
+
signal: controller.signal,
|
|
91
|
+
body,
|
|
92
|
+
cache: requestCacheMode
|
|
93
|
+
})
|
|
94
|
+
}];
|
|
95
|
+
} catch (error) {
|
|
96
|
+
return [normalizeError(error, ERRORS.BUILDING_REQUEST_FAILED), null];
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { buildRequest };
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=build-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-request.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/helpers/build-request.ts"],"sourcesContent":["import { canMethodHaveBody } from '@scalar/helpers/http/can-method-have-body'\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { redirectToProxy, shouldUseProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation'\n\nimport { isElectron } from '@/libs/electron'\nimport { ERRORS, type ErrorResponse, normalizeError } from '@/libs/errors'\nimport { getEnvironmentVariables } from '@/v2/blocks/operation-block/helpers/get-environment-variables'\nimport { getResolvedUrl } from '@/v2/blocks/operation-block/helpers/get-resolved-url'\nimport { getDefaultHeaders } from '@/v2/blocks/request-block/helpers/get-default-headers'\nimport type { SecuritySchemeObjectSecret } from '@/v2/blocks/scalar-auth-selector-block/helpers/secret-types'\n\nimport { buildRequestBody } from './build-request-body'\nimport { buildRequestCookieHeader } from './build-request-cookie-header'\nimport { buildRequestParameters } from './build-request-parameters'\nimport { buildRequestSecurity } from './build-request-security'\n\n/**\n * Builds a fully configured Request object ready for execution.\n *\n * This function processes an OpenAPI operation and constructs a fetch-compatible\n * Request by resolving environment variables, applying security schemes, building\n * headers and cookies, handling proxy redirection, and preparing the request body.\n *\n * The function handles special cases like Electron environments and proxy usage\n * where custom cookie headers are required.\n *\n * @returns A tuple containing either an error or the request object with an abort controller\n */\nexport const buildRequest = ({\n environment,\n exampleKey = 'default',\n globalCookies,\n method,\n operation,\n path,\n proxyUrl,\n server,\n selectedSecuritySchemes,\n}: {\n /** For environment variables in the inputs */\n environment: XScalarEnvironment\n /** The key of the current example */\n exampleKey: string\n /** Workspace + document cookies */\n globalCookies: XScalarCookie[]\n /** The HTTP method of the operation */\n method: HttpMethod\n /** The operation object */\n operation: OperationObject\n /** The path of the operation */\n path: string\n /** The proxy URL for cookie domain determination */\n proxyUrl: string\n /** The server object */\n server: ServerObject | null\n /** The selected security schemes for the current operation */\n selectedSecuritySchemes: SecuritySchemeObjectSecret[]\n}): ErrorResponse<{\n controller: AbortController\n request: Request\n isUsingProxy: boolean\n}> => {\n try {\n const requestBody = getResolvedRef(operation.requestBody)\n\n /** Flatten the environment variables array into a key-value object */\n const env = getEnvironmentVariables(environment)\n /** Build out the request parameters */\n const params = buildRequestParameters(operation.parameters ?? [], env, exampleKey)\n const security = buildRequestSecurity(selectedSecuritySchemes, env)\n\n // Combine the headers, cookies and url params\n const defaultHeaders = getDefaultHeaders({ method, operation, exampleKey, hideDisabledHeaders: true })\n .filter((header) => !header.isOverridden)\n .reduce(\n (acc, header) => {\n acc[header.name] = header.defaultValue\n return acc\n },\n {} as Record<string, string>,\n )\n const headers = new Headers({ ...defaultHeaders, ...params.headers, ...security.headers })\n const urlParams = new URLSearchParams([...params.urlParams, ...security.urlParams])\n\n // If the method can have a body, build the request body, otherwise set it to null\n const body = canMethodHaveBody(method) ? buildRequestBody(requestBody, env, exampleKey) : null\n\n if (body && (body instanceof FormData || body instanceof URLSearchParams)) {\n // Delete the Content-Type header so the browser will set it automatically based on the request body\n headers.delete('Content-Type')\n }\n\n /** Combine the server url, path and url params into a single url */\n const url = getResolvedUrl({\n environment,\n server,\n path,\n pathVariables: params.pathVariables,\n allowReservedQueryParameters: params.allowReservedQueryParameters,\n urlParams,\n })\n\n // Throw for no server or path\n if (!url) {\n throw ERRORS.URL_EMPTY\n }\n\n const isUsingProxy = shouldUseProxy(proxyUrl, url)\n const proxiedUrl = redirectToProxy(proxyUrl, url)\n\n // If we are running in Electron, we need to add a custom header\n // that's then forwarded as a `User-Agent` header.\n const userAgentHeader = headers.get('User-Agent')\n if (isElectron() && userAgentHeader) {\n headers.set('X-Scalar-User-Agent', userAgentHeader)\n }\n\n /** Build out the cookies header */\n const cookiesHeader = buildRequestCookieHeader({\n paramCookies: [...params.cookies, ...security.cookies],\n globalCookies,\n env,\n originalCookieHeader: headers.get('Cookie'),\n url,\n useCustomCookieHeader: isElectron() || isUsingProxy,\n disabledGlobalCookies: operation['x-scalar-disable-parameters']?.['global-cookies']?.[exampleKey] ?? {},\n })\n\n if (cookiesHeader) {\n headers.set(cookiesHeader.name, cookiesHeader.value)\n }\n\n /** Controller to allow aborting the request */\n const controller = new AbortController()\n const acceptHeader = headers.get('Accept')\n const isSseAcceptHeader = acceptHeader?.toLowerCase().includes('text/event-stream') ?? false\n const requestCacheMode: RequestCache = isSseAcceptHeader ? 'no-store' : 'default'\n\n if (isSseAcceptHeader) {\n headers.set('Cache-Control', 'no-cache')\n headers.set('Pragma', 'no-cache')\n }\n\n /** Build the js request object */\n const request = new Request(proxiedUrl, {\n /**\n * Ensure that all methods are uppercased (though only needed for patch)\n *\n * @see https://github.com/whatwg/fetch/issues/50\n */\n method: method.toUpperCase(),\n headers,\n signal: controller.signal,\n body,\n cache: requestCacheMode,\n })\n\n return [\n null,\n {\n controller,\n isUsingProxy,\n request,\n },\n ]\n } catch (error) {\n return [normalizeError(error, ERRORS.BUILDING_REQUEST_FAILED), null]\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAa,gBAAgB,EAC3B,aACA,aAAa,WACb,eACA,QACA,WACA,MACA,UACA,QACA,8BAwBI;AACJ,KAAI;EACF,MAAM,cAAc,eAAe,UAAU,YAAY;;EAGzD,MAAM,MAAM,wBAAwB,YAAY;;EAEhD,MAAM,SAAS,uBAAuB,UAAU,cAAc,EAAE,EAAE,KAAK,WAAW;EAClF,MAAM,WAAW,qBAAqB,yBAAyB,IAAI;EAGnE,MAAM,iBAAiB,kBAAkB;GAAE;GAAQ;GAAW;GAAY,qBAAqB;GAAM,CAAC,CACnG,QAAQ,WAAW,CAAC,OAAO,aAAa,CACxC,QACE,KAAK,WAAW;AACf,OAAI,OAAO,QAAQ,OAAO;AAC1B,UAAO;KAET,EAAE,CACH;EACH,MAAM,UAAU,IAAI,QAAQ;GAAE,GAAG;GAAgB,GAAG,OAAO;GAAS,GAAG,SAAS;GAAS,CAAC;EAC1F,MAAM,YAAY,IAAI,gBAAgB,CAAC,GAAG,OAAO,WAAW,GAAG,SAAS,UAAU,CAAC;EAGnF,MAAM,OAAO,kBAAkB,OAAO,GAAG,iBAAiB,aAAa,KAAK,WAAW,GAAG;AAE1F,MAAI,SAAS,gBAAgB,YAAY,gBAAgB,iBAEvD,SAAQ,OAAO,eAAe;;EAIhC,MAAM,MAAM,eAAe;GACzB;GACA;GACA;GACA,eAAe,OAAO;GACtB,8BAA8B,OAAO;GACrC;GACD,CAAC;AAGF,MAAI,CAAC,IACH,OAAM,OAAO;EAGf,MAAM,eAAe,eAAe,UAAU,IAAI;EAClD,MAAM,aAAa,gBAAgB,UAAU,IAAI;EAIjD,MAAM,kBAAkB,QAAQ,IAAI,aAAa;AACjD,MAAI,YAAY,IAAI,gBAClB,SAAQ,IAAI,uBAAuB,gBAAgB;;EAIrD,MAAM,gBAAgB,yBAAyB;GAC7C,cAAc,CAAC,GAAG,OAAO,SAAS,GAAG,SAAS,QAAQ;GACtD;GACA;GACA,sBAAsB,QAAQ,IAAI,SAAS;GAC3C;GACA,uBAAuB,YAAY,IAAI;GACvC,uBAAuB,UAAU,iCAAiC,oBAAoB,eAAe,EAAE;GACxG,CAAC;AAEF,MAAI,cACF,SAAQ,IAAI,cAAc,MAAM,cAAc,MAAM;;EAItD,MAAM,aAAa,IAAI,iBAAiB;EAExC,MAAM,oBADe,QAAQ,IAAI,SAAS,EACF,aAAa,CAAC,SAAS,oBAAoB,IAAI;EACvF,MAAM,mBAAiC,oBAAoB,aAAa;AAExE,MAAI,mBAAmB;AACrB,WAAQ,IAAI,iBAAiB,WAAW;AACxC,WAAQ,IAAI,UAAU,WAAW;;AAiBnC,SAAO,CACL,MACA;GACE;GACA;GACA,SAlBY,IAAI,QAAQ,YAAY;IAMtC,QAAQ,OAAO,aAAa;IAC5B;IACA,QAAQ,WAAW;IACnB;IACA,OAAO;IACR,CAAC;GAQC,CACF;UACM,OAAO;AACd,SAAO,CAAC,eAAe,OAAO,OAAO,wBAAwB,EAAE,KAAK"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
//#region src/v2/blocks/operation-block/helpers/de-serialize-parameter.ts
|
|
3
|
+
/** Helper that de-serializes the example value based on the parameter type */
|
|
4
|
+
var deSerializeParameter = (example, param) => {
|
|
5
|
+
if ("content" in param) return deSerializeContentExample(example, Object.keys(param.content ?? {})[0] ?? "");
|
|
6
|
+
if ("schema" in param) return deSerializeSchemaExample(example, param.schema);
|
|
7
|
+
return example;
|
|
8
|
+
};
|
|
9
|
+
/** De-serialize the example value based on the content type */
|
|
10
|
+
var deSerializeContentExample = (example, contentType) => {
|
|
11
|
+
if (typeof example === "string" && contentType.includes("json")) try {
|
|
12
|
+
return JSON.parse(example);
|
|
13
|
+
} catch {}
|
|
14
|
+
return example;
|
|
15
|
+
};
|
|
16
|
+
/** Create a set of all the types we wish to parse as JSON */
|
|
17
|
+
var parseableTypesSet = new Set([
|
|
18
|
+
"array",
|
|
19
|
+
"object",
|
|
20
|
+
"boolean",
|
|
21
|
+
"number",
|
|
22
|
+
"integer",
|
|
23
|
+
"null"
|
|
24
|
+
]);
|
|
25
|
+
/** De-serialize the example value based on the schema type */
|
|
26
|
+
var deSerializeSchemaExample = (example, schema) => {
|
|
27
|
+
const resolvedSchema = getResolvedRef(schema);
|
|
28
|
+
if (typeof example === "string" && resolvedSchema && "type" in resolvedSchema) {
|
|
29
|
+
const type = Array.isArray(resolvedSchema.type) ? resolvedSchema.type[0] : resolvedSchema.type;
|
|
30
|
+
if (type && parseableTypesSet.has(type)) try {
|
|
31
|
+
return JSON.parse(example);
|
|
32
|
+
} catch {
|
|
33
|
+
if (type === "array") return example.split(/,\s?/).filter((v) => v !== "");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return example;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { deSerializeParameter };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=de-serialize-parameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de-serialize-parameter.js","names":[],"sources":["../../../../../src/v2/blocks/operation-block/helpers/de-serialize-parameter.ts"],"sourcesContent":["import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n ParameterObject,\n ParameterWithSchemaObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\n\n/** Helper that de-serializes the example value based on the parameter type */\nexport const deSerializeParameter = (example: unknown, param: ParameterObject) => {\n if ('content' in param) {\n return deSerializeContentExample(example, Object.keys(param.content ?? {})[0] ?? '')\n }\n if ('schema' in param) {\n return deSerializeSchemaExample(example, param.schema)\n }\n\n return example\n}\n\n/** De-serialize the example value based on the content type */\nconst deSerializeContentExample = (example: unknown, contentType: string) => {\n if (typeof example === 'string' && contentType.includes('json')) {\n try {\n return JSON.parse(example)\n } catch {\n // Ignore the error and return the original example\n }\n }\n return example\n}\n\n/** Create a set of all the types we wish to parse as JSON */\nconst parseableTypesSet = new Set(['array', 'object', 'boolean', 'number', 'integer', 'null'])\n\n/** De-serialize the example value based on the schema type */\nconst deSerializeSchemaExample = (example: unknown, schema: ParameterWithSchemaObject['schema']) => {\n const resolvedSchema = getResolvedRef(schema)\n\n if (typeof example === 'string' && resolvedSchema && 'type' in resolvedSchema) {\n const type = Array.isArray(resolvedSchema.type) ? resolvedSchema.type[0] : resolvedSchema.type\n\n if (type && parseableTypesSet.has(type)) {\n try {\n return JSON.parse(example)\n } catch {\n // For array types, fall back to splitting comma-separated values.\n // Users commonly enter array values as \"foo,bar\" or \"foo, bar\" in the UI\n // text field, which is not valid JSON. Per the OpenAPI spec, the default\n // serialization for query array parameters is style=form + explode=true,\n // meaning each value should be sent as a separate query parameter.\n if (type === 'array') {\n return example.split(/,\\s?/).filter((v) => v !== '')\n }\n // Ignore the error and return the original example for other types\n }\n }\n }\n\n return example\n}\n"],"mappings":";;;AAOA,IAAa,wBAAwB,SAAkB,UAA2B;AAChF,KAAI,aAAa,MACf,QAAO,0BAA0B,SAAS,OAAO,KAAK,MAAM,WAAW,EAAE,CAAC,CAAC,MAAM,GAAG;AAEtF,KAAI,YAAY,MACd,QAAO,yBAAyB,SAAS,MAAM,OAAO;AAGxD,QAAO;;;AAIT,IAAM,6BAA6B,SAAkB,gBAAwB;AAC3E,KAAI,OAAO,YAAY,YAAY,YAAY,SAAS,OAAO,CAC7D,KAAI;AACF,SAAO,KAAK,MAAM,QAAQ;SACpB;AAIV,QAAO;;;AAIT,IAAM,oBAAoB,IAAI,IAAI;CAAC;CAAS;CAAU;CAAW;CAAU;CAAW;CAAO,CAAC;;AAG9F,IAAM,4BAA4B,SAAkB,WAAgD;CAClG,MAAM,iBAAiB,eAAe,OAAO;AAE7C,KAAI,OAAO,YAAY,YAAY,kBAAkB,UAAU,gBAAgB;EAC7E,MAAM,OAAO,MAAM,QAAQ,eAAe,KAAK,GAAG,eAAe,KAAK,KAAK,eAAe;AAE1F,MAAI,QAAQ,kBAAkB,IAAI,KAAK,CACrC,KAAI;AACF,UAAO,KAAK,MAAM,QAAQ;UACpB;AAMN,OAAI,SAAS,QACX,QAAO,QAAQ,MAAM,OAAO,CAAC,QAAQ,MAAM,MAAM,GAAG;;;AAO5D,QAAO"}
|