@scalar/api-client 2.2.50 → 2.2.52
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 +57 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +30 -30
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +22 -22
- package/dist/components/CodeInput/CodeInput.vue.d.ts +4 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +38 -38
- package/dist/components/CommandPalette/CommandActionForm.vue.js +2 -2
- package/dist/components/CommandPalette/CommandActionInput.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +13 -13
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +143 -114
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +59 -51
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +85 -82
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +2 -2
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +2 -2
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +11 -11
- package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue.d.ts +175 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +57 -48
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -1
- package/dist/components/DataTable/DataTableText.vue.js +1 -1
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EmptyState.vue2.js +4 -4
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +13 -13
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +56 -36
- package/dist/components/Form/LabelInput.vue.d.ts +14 -0
- package/dist/components/Form/LabelInput.vue.d.ts.map +1 -0
- package/dist/components/Form/LabelInput.vue.js +7 -0
- package/dist/components/Form/LabelInput.vue2.js +42 -0
- package/dist/components/HelpfulLink.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +3 -3
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue2.js +1 -1
- package/dist/components/IconSelector.vue.js +3 -3
- package/dist/components/ImportCollection/DropEventListener.vue.js +3 -3
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +8 -8
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +1 -1
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/PrefetchError.vue.js +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -15
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +2 -2
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +13 -13
- package/dist/components/ScalarAsciiArt.vue.js +3 -3
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +5 -13
- package/dist/components/Server/ServerDropdown.vue.d.ts +0 -1
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.js +40 -57
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +0 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +19 -20
- package/dist/components/Server/ServerSelector.vue.d.ts +12 -0
- package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerSelector.vue.js +85 -0
- package/dist/components/Server/ServerSelector.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.js +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -1
- package/dist/components/Server/index.d.ts +1 -0
- package/dist/components/Server/index.d.ts.map +1 -1
- package/dist/components/Server/index.js +6 -4
- package/dist/components/Server/types.d.ts.map +1 -1
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/components/SideNav/DownloadAppButton.vue.js +2 -2
- package/dist/components/SideNav/DownloadAppButton.vue2.js +6 -6
- package/dist/components/SideNav/SideHelp.vue.js +12 -12
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +73 -58
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +3 -3
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +2 -2
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +17 -28
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +12 -12
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +4 -4
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +3 -3
- package/dist/components/Sidebar/Sidebar.vue.d.ts +1 -4
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +34 -34
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +6 -6
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +36 -46
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +7 -7
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts +1 -8
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +20 -21
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +104 -85
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +16 -10
- package/dist/components/ViewLayout/ViewLayout.vue2.js +4 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +29 -29
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +20 -13
- package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +4 -0
- package/dist/constants.d.ts +16 -12
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +35 -6
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +5 -7
- package/dist/hooks/useFileDialog.d.ts +1 -1
- package/dist/hooks/useFileDialog.d.ts.map +1 -1
- package/dist/hooks/useFileDialog.js +1 -6
- package/dist/hooks/useResponseBody.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.js +3 -9
- package/dist/hooks/useSidebar.d.ts +19 -2
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +25 -9
- package/dist/hooks/useSidebar.test.d.ts +2 -0
- package/dist/hooks/useSidebar.test.d.ts.map +1 -0
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +41 -35
- package/dist/layouts/App/MainLayout.vue.js +4 -4
- package/dist/layouts/App/create-api-client-app.d.ts +207 -255
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +8 -8
- package/dist/layouts/Modal/create-api-client-modal.d.ts +414 -510
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +35 -29
- package/dist/layouts/Web/create-api-client-web.d.ts +207 -255
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +200 -248
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +79 -63
- package/dist/libs/errors.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.js +1 -3
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/getOpenApiDocumentDetails.d.ts.map +1 -1
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +2 -12
- package/dist/libs/isUrl.d.ts.map +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +1 -9
- package/dist/libs/normalize-headers.d.ts.map +1 -1
- package/dist/libs/normalize-headers.js +2 -6
- package/dist/libs/parse-curl.d.ts.map +1 -1
- package/dist/libs/parse-curl.js +1 -5
- package/dist/libs/postman.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
- package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-body.js +1 -2
- package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +6 -12
- package/dist/libs/send-request/create-request-operation.test.d.ts +0 -3
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/string-template.d.ts.map +1 -1
- package/dist/libs/string-template.js +1 -4
- package/dist/router.d.ts.map +1 -1
- package/dist/routes.d.ts +62 -14
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +93 -75
- package/dist/store/active-entities.d.ts +32 -32
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +43 -39
- package/dist/store/collections.d.ts +164 -164
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/cookies.d.ts.map +1 -1
- package/dist/store/cookies.js +1 -5
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/request-example.d.ts +2 -2
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +8 -8
- package/dist/store/store-context.d.ts.map +1 -1
- package/dist/store/store.d.ts +200 -248
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/tailwind/desktop-variants.d.ts.map +1 -1
- package/dist/types/vue.d.ts.map +1 -1
- package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
- package/dist/views/Collection/Collection.vue.js +4 -0
- package/dist/views/Collection/Collection.vue2.js +50 -0
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionAuthentication.vue.js +4 -0
- package/dist/views/Collection/CollectionAuthentication.vue2.js +16 -0
- package/dist/views/Collection/CollectionCookies.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionCookies.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionCookies.vue.js +4 -0
- package/dist/views/Collection/CollectionCookies.vue2.js +16 -0
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionEnvironment.vue.js +4 -0
- package/dist/views/Collection/CollectionEnvironment.vue2.js +16 -0
- package/dist/views/{Servers/Servers.vue.d.ts → Collection/CollectionInfoForm.vue.d.ts} +1 -1
- package/dist/views/Collection/CollectionInfoForm.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionInfoForm.vue.js +7 -0
- package/dist/views/Collection/CollectionInfoForm.vue2.js +70 -0
- package/dist/views/Collection/CollectionNavigation.vue.d.ts +6 -0
- package/dist/views/Collection/CollectionNavigation.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionNavigation.vue.js +142 -0
- package/dist/views/Collection/CollectionNavigation.vue2.js +4 -0
- package/dist/views/Collection/CollectionOverview.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionOverview.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionOverview.vue.js +4 -0
- package/dist/views/Collection/CollectionOverview.vue2.js +37 -0
- package/dist/views/Collection/CollectionScripts.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionScripts.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionScripts.vue.js +4 -0
- package/dist/views/Collection/CollectionScripts.vue2.js +16 -0
- package/dist/views/Collection/CollectionServerForm.vue.d.ts +10 -0
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionServerForm.vue.js +74 -0
- package/dist/views/Collection/CollectionServerForm.vue2.js +4 -0
- package/dist/views/{Servers/ServerForm.vue.d.ts → Collection/CollectionServers.vue.d.ts} +1 -1
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionServers.vue.js +4 -0
- package/dist/views/Collection/CollectionServers.vue2.js +124 -0
- package/dist/views/Collection/CollectionSettings.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionSettings.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionSettings.vue.js +7 -0
- package/dist/views/Collection/CollectionSettings.vue2.js +124 -0
- package/dist/views/Collection/CollectionSync.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionSync.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionSync.vue.js +4 -0
- package/dist/views/Collection/CollectionSync.vue2.js +16 -0
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +16 -0
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts.map +1 -0
- package/dist/views/Collection/components/MarkdownInput.vue.js +7 -0
- package/dist/views/Collection/components/MarkdownInput.vue2.js +95 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +7 -7
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +1 -3
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -5
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +1 -5
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +18 -23
- package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieModal.vue.js +1 -1
- package/dist/views/Cookies/CookieModal.vue2.js +7 -7
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +96 -78
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +125 -112
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentColorModal.vue.js +5 -5
- package/dist/views/Environment/EnvironmentColors.vue.js +8 -8
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +16 -16
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +2 -2
- package/dist/views/Request/Request.vue2.js +117 -170
- package/dist/views/Request/RequestRoot.vue.d.ts +13 -0
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestRoot.vue.js +7 -0
- package/dist/views/Request/RequestRoot.vue2.js +78 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +9 -9
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +5 -5
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +104 -89
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +5 -5
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +59 -65
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +22 -23
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +14 -14
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +6 -6
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +38 -38
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +34 -33
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +5 -5
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +2 -6
- package/dist/views/Request/RequestSidebar.vue.d.ts +3 -10
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +186 -188
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +290 -173
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +13 -13
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -4
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +51 -51
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +12 -12
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +8 -8
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +25 -26
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +7 -7
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +7 -7
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +12 -37
- package/dist/views/Request/libs/request.d.ts +4 -0
- package/dist/views/Request/libs/request.d.ts.map +1 -1
- package/dist/views/Request/libs/request.js +2 -1
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
- package/dist/views/Request/libs/watch-mode.js +63 -63
- package/dist/views/Request/types/sidebar-item.d.ts +1 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +8 -8
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +9 -11
- package/dist/views/Settings/components/SettingsAppearance.vue.js +6 -6
- package/dist/vitest.setup.d.ts +16 -0
- package/dist/vitest.setup.d.ts.map +1 -0
- package/package.json +16 -21
- package/dist/views/Servers/ServerForm.vue.d.ts.map +0 -1
- package/dist/views/Servers/ServerForm.vue.js +0 -39
- package/dist/views/Servers/ServerForm.vue2.js +0 -4
- package/dist/views/Servers/Servers.vue.d.ts.map +0 -1
- package/dist/views/Servers/Servers.vue.js +0 -4
- package/dist/views/Servers/Servers.vue2.js +0 -168
- package/dist/views/Servers/index.d.ts +0 -2
- package/dist/views/Servers/index.d.ts.map +0 -1
- package/dist/views/Servers/index.js +0 -4
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as R, ref as m, computed as h, onMounted as I, openBlock as r, createBlock as v, unref as l, withCtx as y, createElementVNode as c, normalizeStyle as x, createElementBlock as u, Fragment as P, renderList as T, normalizeClass as j, createTextVNode as b, toDisplayString as k, createVNode as q, createCommentVNode as g } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import G from "
|
|
6
|
-
import {
|
|
2
|
+
import { ScalarTeleport as D, ScalarIcon as V, ScalarButton as F } from "@scalar/components";
|
|
3
|
+
import { onClickOutside as K } from "@vueuse/core";
|
|
4
|
+
import O from "fuse.js";
|
|
5
|
+
import { useRouter as G } from "vue-router";
|
|
6
|
+
import { getEnvColor as L } from "../../libs/env-helpers.js";
|
|
7
7
|
import { parseEnvVariables as _ } from "../../libs/environment-parser.js";
|
|
8
8
|
const M = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "flex flex-col
|
|
11
|
-
}, Q = ["onClick"], $ = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis text-right
|
|
10
|
+
class: "gap-1/2 flex flex-col"
|
|
11
|
+
}, Q = ["onClick"], $ = { class: "flex items-center gap-1.5 whitespace-nowrap" }, H = { class: "w-20 overflow-hidden text-ellipsis whitespace-nowrap text-right" }, ne = /* @__PURE__ */ R({
|
|
12
12
|
__name: "EnvironmentVariableDropdown",
|
|
13
13
|
props: {
|
|
14
14
|
query: {},
|
|
@@ -18,7 +18,7 @@ const M = {
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["select"],
|
|
20
20
|
setup(C, { expose: S, emit: E }) {
|
|
21
|
-
const s = C, z = E, d = m(!0), p = m(null), n = m(0), f =
|
|
21
|
+
const s = C, z = E, d = m(!0), p = m(null), n = m(0), f = G(), A = () => {
|
|
22
22
|
if (!f) return;
|
|
23
23
|
const { currentRoute: t, push: o } = f, e = t.value.params.workspace;
|
|
24
24
|
o({
|
|
@@ -27,7 +27,7 @@ const M = {
|
|
|
27
27
|
workspace: e
|
|
28
28
|
}
|
|
29
29
|
}), d.value = !1;
|
|
30
|
-
}, B = new
|
|
30
|
+
}, B = new O(_(s.envVariables), {
|
|
31
31
|
keys: ["key", "value"]
|
|
32
32
|
}), i = h(() => {
|
|
33
33
|
const t = s.query;
|
|
@@ -60,13 +60,13 @@ const M = {
|
|
|
60
60
|
top: (((o = s.dropdownPosition) == null ? void 0 : o.top) ?? 0) + 5 + "px"
|
|
61
61
|
};
|
|
62
62
|
});
|
|
63
|
-
return
|
|
63
|
+
return K(
|
|
64
64
|
p,
|
|
65
65
|
() => {
|
|
66
66
|
d.value = !1;
|
|
67
67
|
},
|
|
68
68
|
{ ignore: [p] }
|
|
69
|
-
), (t, o) => d.value ? (r(), v(l(
|
|
69
|
+
), (t, o) => d.value ? (r(), v(l(D), {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "scalar-client"
|
|
72
72
|
}, {
|
|
@@ -74,13 +74,13 @@ const M = {
|
|
|
74
74
|
c("div", {
|
|
75
75
|
ref_key: "dropdownRef",
|
|
76
76
|
ref: p,
|
|
77
|
-
class: "fixed left-0 top-0 flex
|
|
77
|
+
class: "p-0.75 custom-scroll fixed left-0 top-0 flex max-h-[60svh] w-56 flex-col rounded border",
|
|
78
78
|
style: x(N.value)
|
|
79
79
|
}, [
|
|
80
80
|
i.value.length ? (r(), u("ul", M, [
|
|
81
81
|
(r(!0), u(P, null, T(i.value, (e, a) => (r(), u("li", {
|
|
82
82
|
key: e.key,
|
|
83
|
-
class: j(["
|
|
83
|
+
class: j(["font-code text-xxs hover:bg-b-2 flex h-8 cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": a === n.value }]),
|
|
84
84
|
onClick: (W) => w(e.key)
|
|
85
85
|
}, [
|
|
86
86
|
c("div", $, [
|
|
@@ -88,7 +88,7 @@ const M = {
|
|
|
88
88
|
key: 0,
|
|
89
89
|
class: "h-2.5 w-2.5 min-w-2.5 rounded-full",
|
|
90
90
|
style: x({
|
|
91
|
-
backgroundColor: l(
|
|
91
|
+
backgroundColor: l(L)(t.environment)
|
|
92
92
|
})
|
|
93
93
|
}, null, 4)) : (r(), v(l(V), {
|
|
94
94
|
key: 1,
|
|
@@ -99,7 +99,7 @@ const M = {
|
|
|
99
99
|
]),
|
|
100
100
|
c("span", H, k(e.value), 1)
|
|
101
101
|
], 10, Q))), 128))
|
|
102
|
-
])) : l(f) ? (r(), v(l(
|
|
102
|
+
])) : l(f) ? (r(), v(l(F), {
|
|
103
103
|
key: 1,
|
|
104
104
|
class: "font-code text-xxs hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
|
|
105
105
|
variant: "secondary",
|
|
@@ -114,7 +114,7 @@ const M = {
|
|
|
114
114
|
]),
|
|
115
115
|
_: 1
|
|
116
116
|
})) : g("", !0),
|
|
117
|
-
o[1] || (o[1] = c("div", { class: "
|
|
117
|
+
o[1] || (o[1] = c("div", { class: "-z-1 bg-b-1 brightness-lifted absolute inset-0 rounded shadow-lg" }, null, -1))
|
|
118
118
|
], 4)
|
|
119
119
|
]),
|
|
120
120
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cA0O8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA8UjE,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Request.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9a0ce942"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,213 +1,160 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import { useWorkspace as Ce } from "../../store/store.js";
|
|
21
|
-
import { useLayout as Ne } from "../../hooks/useLayout.js";
|
|
22
|
-
const ge = { class: "flex h-full" }, Be = { class: "flex flex-1 flex-col h-full" }, tt = /* @__PURE__ */ le({
|
|
1
|
+
import { defineComponent as Y, ref as I, computed as H, openBlock as l, createElementBlock as k, Fragment as Z, unref as e, normalizeClass as M, createElementVNode as ee, createVNode as v, isRef as te, withCtx as L, createBlock as p, createCommentVNode as N } from "vue";
|
|
2
|
+
import { useRouter as oe } from "vue-router";
|
|
3
|
+
import z from "../../components/EmptyState.vue.js";
|
|
4
|
+
import re from "../../components/ImportCurl/ImportCurlModal.vue.js";
|
|
5
|
+
import se from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
6
|
+
import ie from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
7
|
+
import { useSidebar as le } from "../../hooks/useSidebar.js";
|
|
8
|
+
import { importCurlCommand as ae } from "../../libs/importers/curl.js";
|
|
9
|
+
import { PathId as S } from "../../routes.js";
|
|
10
|
+
import { useActiveEntities as ne } from "../../store/active-entities.js";
|
|
11
|
+
import ue from "./RequestSection/RequestSection.vue.js";
|
|
12
|
+
import ce from "./RequestSubpageHeader.vue.js";
|
|
13
|
+
import me from "./ResponseSection/ResponseSection.vue.js";
|
|
14
|
+
import { useLayout as de } from "../../hooks/useLayout.js";
|
|
15
|
+
import { useWorkspace as ve } from "../../store/store.js";
|
|
16
|
+
const pe = { class: "flex h-full" }, fe = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "flex h-full flex-1 flex-col"
|
|
19
|
+
}, Be = /* @__PURE__ */ Y({
|
|
23
20
|
__name: "Request",
|
|
24
21
|
emits: ["newTab"],
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
activeCollection:
|
|
28
|
-
activeExample:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
activeWorkspaceCollections:
|
|
35
|
-
activeWorkspaceRequests:
|
|
36
|
-
} =
|
|
37
|
-
|
|
38
|
-
modalState: v,
|
|
39
|
-
requestHistory: T,
|
|
40
|
-
showSidebar: K,
|
|
41
|
-
securitySchemes: X,
|
|
42
|
-
requestMutators: Y,
|
|
43
|
-
serverMutators: Z,
|
|
44
|
-
servers: ee,
|
|
45
|
-
events: h
|
|
46
|
-
} = $, c = U(b !== "modal"), D = U(), e = U(), C = U(""), te = Ue(), oe = _(
|
|
47
|
-
() => T.findLast((r) => {
|
|
22
|
+
setup(ye) {
|
|
23
|
+
const { isSidebarOpen: c } = le(), { layout: h } = de(), {
|
|
24
|
+
activeCollection: a,
|
|
25
|
+
activeExample: f,
|
|
26
|
+
activeRequest: m,
|
|
27
|
+
activeWorkspace: n,
|
|
28
|
+
activeServer: q,
|
|
29
|
+
activeEnvVariables: x,
|
|
30
|
+
activeEnvironment: b,
|
|
31
|
+
activeWorkspaceCollections: D,
|
|
32
|
+
activeWorkspaceRequests: F
|
|
33
|
+
} = ne(), O = ve(), { modalState: u, requestHistory: $, requestMutators: j, serverMutators: A, servers: P } = O, t = I(), y = I(""), T = oe(), G = H(
|
|
34
|
+
() => $.findLast((s) => {
|
|
48
35
|
var o;
|
|
49
|
-
return
|
|
36
|
+
return s.request.uid === ((o = f.value) == null ? void 0 : o.uid);
|
|
50
37
|
})
|
|
51
|
-
),
|
|
52
|
-
ne(re.xl, (r) => c.value = r, {
|
|
53
|
-
immediate: b !== "modal"
|
|
54
|
-
});
|
|
55
|
-
const M = _(
|
|
38
|
+
), J = H(
|
|
56
39
|
() => {
|
|
57
|
-
var
|
|
58
|
-
return (
|
|
40
|
+
var s, o;
|
|
41
|
+
return (h === "modal" ? (s = a.value) == null ? void 0 : s.selectedSecuritySchemeUids : (o = m.value) == null ? void 0 : o.selectedSecuritySchemeUids) ?? [];
|
|
59
42
|
}
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return;
|
|
64
|
-
const r = typeof k.value == "object" ? k.value.value : "{}", o = he.parse(r);
|
|
65
|
-
o.error && console.error("INVALID ENVIRONMENT!");
|
|
66
|
-
const a = o.error || typeof o.data != "object" ? {} : o.data ?? {}, s = ((S = l.value) == null ? void 0 : S.cookies.map((N) => G[N]).filter(ke)) ?? [], x = ((y = (q = i.value) == null ? void 0 : q.info) == null ? void 0 : y.title) === "Drafts" ? void 0 : O.value, [d, p] = Ee({
|
|
67
|
-
request: u.value,
|
|
68
|
-
example: m.value,
|
|
69
|
-
selectedSecuritySchemeUids: M.value,
|
|
70
|
-
proxyUrl: ((n = l.value) == null ? void 0 : n.proxyUrl) ?? "",
|
|
71
|
-
environment: a,
|
|
72
|
-
globalCookies: s,
|
|
73
|
-
status: h.requestStatus,
|
|
74
|
-
securitySchemes: X,
|
|
75
|
-
server: x
|
|
76
|
-
});
|
|
77
|
-
if (d) {
|
|
78
|
-
I(d.message, "error");
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
D.value = p.controller;
|
|
82
|
-
const [f, w] = await p.sendRequest();
|
|
83
|
-
f ? I(f.message, "error") : T.push(w);
|
|
84
|
-
}, se = async () => {
|
|
85
|
-
var r;
|
|
86
|
-
return (r = D.value) == null ? void 0 : r.abort(Oe.REQUEST_ABORTED);
|
|
87
|
-
};
|
|
88
|
-
ue(() => {
|
|
89
|
-
h.executeRequest.on(A), h.cancelRequest.on(se);
|
|
90
|
-
}), be(), ce(() => h.executeRequest.off(A));
|
|
91
|
-
function ae({
|
|
92
|
-
requestName: r,
|
|
43
|
+
);
|
|
44
|
+
function K({
|
|
45
|
+
requestName: s,
|
|
93
46
|
collectionUid: o
|
|
94
47
|
}) {
|
|
95
|
-
var
|
|
96
|
-
if (!
|
|
97
|
-
const
|
|
98
|
-
(
|
|
48
|
+
var V, w, U, _, C, E, W;
|
|
49
|
+
if (!t.value) return;
|
|
50
|
+
const r = D.value.find(
|
|
51
|
+
(d) => d.uid === o
|
|
99
52
|
);
|
|
100
|
-
if (!
|
|
101
|
-
const
|
|
102
|
-
if (!
|
|
103
|
-
const
|
|
104
|
-
(
|
|
105
|
-
var
|
|
106
|
-
return
|
|
53
|
+
if (!r) return;
|
|
54
|
+
const i = ((V = r == null ? void 0 : r.info) == null ? void 0 : V.title) === "Drafts";
|
|
55
|
+
if (!i && t.value.servers) {
|
|
56
|
+
const d = Object.values(P).find(
|
|
57
|
+
(X) => {
|
|
58
|
+
var g, B;
|
|
59
|
+
return X.url === ((B = (g = t == null ? void 0 : t.value) == null ? void 0 : g.servers) == null ? void 0 : B[0]);
|
|
107
60
|
}
|
|
108
61
|
);
|
|
109
|
-
|
|
110
|
-
{ url:
|
|
111
|
-
|
|
62
|
+
d ? y.value = d.uid : y.value = A.add(
|
|
63
|
+
{ url: t.value.servers[0] ?? "/" },
|
|
64
|
+
r.uid
|
|
112
65
|
).uid;
|
|
113
66
|
}
|
|
114
|
-
const
|
|
67
|
+
const R = j.add(
|
|
115
68
|
{
|
|
116
|
-
summary:
|
|
117
|
-
path:
|
|
118
|
-
method: (
|
|
119
|
-
parameters: (
|
|
120
|
-
selectedServerUid:
|
|
121
|
-
requestBody: (
|
|
69
|
+
summary: s,
|
|
70
|
+
path: i ? (w = t == null ? void 0 : t.value) == null ? void 0 : w.url : (U = t == null ? void 0 : t.value) == null ? void 0 : U.path,
|
|
71
|
+
method: (_ = t == null ? void 0 : t.value) == null ? void 0 : _.method,
|
|
72
|
+
parameters: (C = t == null ? void 0 : t.value) == null ? void 0 : C.parameters,
|
|
73
|
+
selectedServerUid: i ? void 0 : y.value,
|
|
74
|
+
requestBody: (E = t == null ? void 0 : t.value) == null ? void 0 : E.requestBody
|
|
122
75
|
},
|
|
123
|
-
|
|
76
|
+
r.uid
|
|
124
77
|
);
|
|
125
|
-
|
|
78
|
+
R && ((W = n.value) != null && W.uid) && T.push({
|
|
126
79
|
name: "request",
|
|
127
80
|
params: {
|
|
128
|
-
[
|
|
129
|
-
[
|
|
130
|
-
[
|
|
81
|
+
[S.Workspace]: n.value.uid,
|
|
82
|
+
[S.Collection]: r.uid,
|
|
83
|
+
[S.Request]: R.uid
|
|
131
84
|
}
|
|
132
|
-
}),
|
|
85
|
+
}), u.hide();
|
|
133
86
|
}
|
|
134
|
-
function
|
|
135
|
-
|
|
87
|
+
function Q(s) {
|
|
88
|
+
t.value = ae(s), u.show();
|
|
136
89
|
}
|
|
137
|
-
return (
|
|
138
|
-
var
|
|
139
|
-
return
|
|
140
|
-
|
|
90
|
+
return (s, o) => {
|
|
91
|
+
var r;
|
|
92
|
+
return l(), k(Z, null, [
|
|
93
|
+
e(a) && e(n) ? (l(), k("div", {
|
|
141
94
|
key: 0,
|
|
142
|
-
class:
|
|
143
|
-
"!
|
|
95
|
+
class: M(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
|
|
96
|
+
"!mb-0 !mr-0 !border-0": e(h) === "modal"
|
|
144
97
|
}])
|
|
145
98
|
}, [
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
environment: t(k),
|
|
160
|
-
operation: t(u),
|
|
161
|
-
server: t(O),
|
|
162
|
-
workspace: t(l),
|
|
163
|
-
onHideModal: o[3] || (o[3] = () => t(v).hide()),
|
|
164
|
-
onImportCurl: ie
|
|
99
|
+
ee("div", pe, [
|
|
100
|
+
e(m) ? (l(), k("div", fe, [
|
|
101
|
+
v(ce, {
|
|
102
|
+
modelValue: e(c),
|
|
103
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => te(c) ? c.value = i : null),
|
|
104
|
+
collection: e(a),
|
|
105
|
+
envVariables: e(x),
|
|
106
|
+
environment: e(b),
|
|
107
|
+
operation: e(m),
|
|
108
|
+
server: e(q),
|
|
109
|
+
workspace: e(n),
|
|
110
|
+
onHideModal: o[1] || (o[1] = () => e(u).hide()),
|
|
111
|
+
onImportCurl: Q
|
|
165
112
|
}, null, 8, ["modelValue", "collection", "envVariables", "environment", "operation", "server", "workspace"]),
|
|
166
|
-
|
|
167
|
-
default:
|
|
168
|
-
|
|
113
|
+
v(se, null, {
|
|
114
|
+
default: L(() => [
|
|
115
|
+
e(f) ? (l(), p(ie, {
|
|
169
116
|
key: 0,
|
|
170
|
-
class:
|
|
117
|
+
class: M(["flex-1", [e(c) ? "sidebar-active-hide-layout" : ""]])
|
|
171
118
|
}, {
|
|
172
|
-
default:
|
|
173
|
-
var
|
|
119
|
+
default: L(() => {
|
|
120
|
+
var i;
|
|
174
121
|
return [
|
|
175
|
-
|
|
176
|
-
collection:
|
|
177
|
-
envVariables:
|
|
178
|
-
environment:
|
|
179
|
-
example:
|
|
180
|
-
operation:
|
|
181
|
-
selectedSecuritySchemeUids:
|
|
182
|
-
server:
|
|
183
|
-
workspace:
|
|
122
|
+
v(ue, {
|
|
123
|
+
collection: e(a),
|
|
124
|
+
envVariables: e(x),
|
|
125
|
+
environment: e(b),
|
|
126
|
+
example: e(f),
|
|
127
|
+
operation: e(m),
|
|
128
|
+
selectedSecuritySchemeUids: J.value,
|
|
129
|
+
server: e(q),
|
|
130
|
+
workspace: e(n)
|
|
184
131
|
}, null, 8, ["collection", "envVariables", "environment", "example", "operation", "selectedSecuritySchemeUids", "server", "workspace"]),
|
|
185
|
-
|
|
186
|
-
numWorkspaceRequests:
|
|
187
|
-
response: (
|
|
132
|
+
v(me, {
|
|
133
|
+
numWorkspaceRequests: e(F).length,
|
|
134
|
+
response: (i = G.value) == null ? void 0 : i.response
|
|
188
135
|
}, null, 8, ["numWorkspaceRequests", "response"])
|
|
189
136
|
];
|
|
190
137
|
}),
|
|
191
138
|
_: 1
|
|
192
|
-
}, 8, ["class"])) :
|
|
139
|
+
}, 8, ["class"])) : N("", !0)
|
|
193
140
|
]),
|
|
194
141
|
_: 1
|
|
195
142
|
})
|
|
196
|
-
])
|
|
143
|
+
])) : (l(), p(z, { key: 1 }))
|
|
197
144
|
])
|
|
198
|
-
], 2)) :
|
|
199
|
-
|
|
200
|
-
key:
|
|
201
|
-
collectionUid: ((
|
|
202
|
-
parsedCurl:
|
|
203
|
-
state:
|
|
204
|
-
onClose: o[
|
|
205
|
-
onImportCurl:
|
|
206
|
-
}, null, 8, ["collectionUid", "parsedCurl", "state"])) :
|
|
145
|
+
], 2)) : (l(), p(z, { key: 1 })),
|
|
146
|
+
t.value ? (l(), p(re, {
|
|
147
|
+
key: 2,
|
|
148
|
+
collectionUid: ((r = e(a)) == null ? void 0 : r.uid) ?? "",
|
|
149
|
+
parsedCurl: t.value,
|
|
150
|
+
state: e(u),
|
|
151
|
+
onClose: o[2] || (o[2] = (i) => e(u).hide()),
|
|
152
|
+
onImportCurl: K
|
|
153
|
+
}, null, 8, ["collectionUid", "parsedCurl", "state"])) : N("", !0)
|
|
207
154
|
], 64);
|
|
208
155
|
};
|
|
209
156
|
}
|
|
210
157
|
});
|
|
211
158
|
export {
|
|
212
|
-
|
|
159
|
+
Be as default
|
|
213
160
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
|
+
newTab: (item: {
|
|
3
|
+
name: string;
|
|
4
|
+
uid: string;
|
|
5
|
+
}) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
7
|
+
onNewTab?: (item: {
|
|
8
|
+
name: string;
|
|
9
|
+
uid: string;
|
|
10
|
+
}) => any;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=RequestRoot.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestRoot.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestRoot.vue"],"names":[],"mappings":";;cAoL8C,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AA4NjE,wBAMG"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineComponent as B, ref as D, computed as I, onMounted as J, onBeforeUnmount as W, openBlock as b, createElementBlock as j, normalizeClass as z, unref as c, createElementVNode as h, createBlock as L, createCommentVNode as M, createVNode as H } from "vue";
|
|
2
|
+
import { isDefined as Q } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import { safeJSON as $ } from "@scalar/object-utils/parse";
|
|
4
|
+
import { useToasts as F } from "@scalar/use-toasts";
|
|
5
|
+
import { RouterView as G } from "vue-router";
|
|
6
|
+
import { useActiveEntities as K } from "../../store/active-entities.js";
|
|
7
|
+
import { useOpenApiWatcher as P } from "./hooks/useOpenApiWatcher.js";
|
|
8
|
+
import X from "./RequestSidebar.vue.js";
|
|
9
|
+
import { createRequestOperation as Y } from "../../libs/send-request/create-request-operation.js";
|
|
10
|
+
import { ERRORS as Z } from "../../libs/errors.js";
|
|
11
|
+
import { useWorkspace as ee } from "../../store/store.js";
|
|
12
|
+
import { useLayout as te } from "../../hooks/useLayout.js";
|
|
13
|
+
const oe = { class: "flex h-full" }, re = { class: "flex h-full flex-1 flex-col" }, Se = /* @__PURE__ */ B({
|
|
14
|
+
__name: "RequestRoot",
|
|
15
|
+
emits: ["newTab"],
|
|
16
|
+
setup(se) {
|
|
17
|
+
const E = ee(), { toast: n } = F(), { layout: l } = te(), {
|
|
18
|
+
activeCollection: r,
|
|
19
|
+
activeExample: i,
|
|
20
|
+
activeEnvironment: u,
|
|
21
|
+
activeRequest: s,
|
|
22
|
+
activeWorkspace: m,
|
|
23
|
+
activeServer: N
|
|
24
|
+
} = K(), { cookies: k, requestHistory: _, showSidebar: O, securitySchemes: w, events: o } = E, f = D(), U = I(
|
|
25
|
+
() => {
|
|
26
|
+
var t, e;
|
|
27
|
+
return (l === "modal" ? (t = r.value) == null ? void 0 : t.selectedSecuritySchemeUids : (e = s.value) == null ? void 0 : e.selectedSecuritySchemeUids) ?? [];
|
|
28
|
+
}
|
|
29
|
+
), p = async () => {
|
|
30
|
+
var S, q, x, y;
|
|
31
|
+
if (!s.value || !i.value || !r.value)
|
|
32
|
+
return;
|
|
33
|
+
const t = typeof u.value == "object" ? u.value.value : "{}", e = $.parse(t);
|
|
34
|
+
e.error && console.error("INVALID ENVIRONMENT!");
|
|
35
|
+
const a = e.error || typeof e.data != "object" ? {} : e.data ?? {}, T = ((S = m.value) == null ? void 0 : S.cookies.map((A) => k[A]).filter(Q)) ?? [], V = ((x = (q = r.value) == null ? void 0 : q.info) == null ? void 0 : x.title) === "Drafts" ? void 0 : N.value, [v, d] = Y({
|
|
36
|
+
request: s.value,
|
|
37
|
+
example: i.value,
|
|
38
|
+
selectedSecuritySchemeUids: U.value,
|
|
39
|
+
proxyUrl: ((y = m.value) == null ? void 0 : y.proxyUrl) ?? "",
|
|
40
|
+
environment: a,
|
|
41
|
+
globalCookies: T,
|
|
42
|
+
status: o.requestStatus,
|
|
43
|
+
securitySchemes: w,
|
|
44
|
+
server: V
|
|
45
|
+
});
|
|
46
|
+
if (v) {
|
|
47
|
+
n(v.message, "error");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
f.value = d.controller;
|
|
51
|
+
const [R, g] = await d.sendRequest();
|
|
52
|
+
R ? n(R.message, "error") : _.push(JSON.parse(JSON.stringify(g)));
|
|
53
|
+
}, C = async () => {
|
|
54
|
+
var t;
|
|
55
|
+
return (t = f.value) == null ? void 0 : t.abort(Z.REQUEST_ABORTED);
|
|
56
|
+
};
|
|
57
|
+
return J(() => {
|
|
58
|
+
o.executeRequest.on(p), o.cancelRequest.on(C);
|
|
59
|
+
}), P(), W(() => o.executeRequest.off(p)), (t, e) => (b(), j("div", {
|
|
60
|
+
class: z(["bg-b-1 relative z-0 flex h-full flex-1 flex-col overflow-hidden pt-0", {
|
|
61
|
+
"!mb-0 !mr-0 !border-0": c(l) === "modal"
|
|
62
|
+
}])
|
|
63
|
+
}, [
|
|
64
|
+
h("div", oe, [
|
|
65
|
+
c(O) ? (b(), L(X, {
|
|
66
|
+
key: 0,
|
|
67
|
+
onNewTab: e[0] || (e[0] = (a) => t.$emit("newTab", a))
|
|
68
|
+
})) : M("", !0),
|
|
69
|
+
h("div", re, [
|
|
70
|
+
H(c(G))
|
|
71
|
+
])
|
|
72
|
+
])
|
|
73
|
+
], 2));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
Se as default
|
|
78
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { EnvVariable } from '../../../../store/active-entities';
|
|
2
1
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
2
|
import { type Collection, type Oauth2Flow, type SecuritySchemeOauth2, type Server } from '@scalar/oas-utils/entities/spec';
|
|
4
3
|
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
4
|
+
import type { EnvVariable } from '../../../../store/active-entities';
|
|
5
5
|
type __VLS_Props = {
|
|
6
6
|
collection: Collection;
|
|
7
7
|
environment: Environment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/OAuth2.vue"],"names":[],"mappings":"AAkQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,MAAM,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAS1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA4eF,wBAMG"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as b, openBlock as s, createElementBlock as V, Fragment as U, createVNode as a, unref as r, withCtx as o, mergeProps as m, createTextVNode as d, createElementVNode as $, createBlock as k, createCommentVNode as p } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { useLoadingState as C, ScalarButton as z } from "@scalar/components";
|
|
3
|
+
import { pkceOptions as P } from "@scalar/oas-utils/entities/spec";
|
|
4
|
+
import { useToasts as L } from "@scalar/use-toasts";
|
|
5
|
+
import { useWorkspace as R } from "../../../../store/store.js";
|
|
6
6
|
import B from "./OAuthScopesInput.vue.js";
|
|
7
7
|
import w from "./RequestAuthDataTableInput.vue.js";
|
|
8
8
|
import u from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
9
9
|
import { authorizeOauth2 as F } from "../../libs/oauth2.js";
|
|
10
|
-
const I = { class: "h-8
|
|
10
|
+
const I = { class: "flex h-8 items-center justify-self-end" }, A = { class: "border-t-1/2 flex h-8 w-full items-center justify-end" }, W = /* @__PURE__ */ b({
|
|
11
11
|
__name: "OAuth2",
|
|
12
12
|
props: {
|
|
13
13
|
collection: {},
|
|
@@ -19,7 +19,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, A = { class: "h-8
|
|
|
19
19
|
workspace: {}
|
|
20
20
|
},
|
|
21
21
|
setup(f) {
|
|
22
|
-
const y =
|
|
22
|
+
const y = C(), { toast: g } = L(), { securitySchemeMutators: S } = R(), n = (l, e) => S.edit(f.scheme.uid, l, e), T = async () => {
|
|
23
23
|
var t, v;
|
|
24
24
|
if (y.isLoading || !((t = f.collection) != null && t.uid)) return;
|
|
25
25
|
if (y.startLoading(), !f.server) {
|
|
@@ -60,7 +60,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, A = { class: "h-8
|
|
|
60
60
|
default: o(() => [
|
|
61
61
|
$("div", I, [
|
|
62
62
|
a(r(z), {
|
|
63
|
-
class: "
|
|
63
|
+
class: "mr-1 p-0 px-2 py-0.5",
|
|
64
64
|
loading: r(y),
|
|
65
65
|
size: "sm",
|
|
66
66
|
variant: "outlined",
|
|
@@ -184,7 +184,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, A = { class: "h-8
|
|
|
184
184
|
"x-usePkce" in l.flow ? (s(), k(r(u), { key: 3 }, {
|
|
185
185
|
default: o(() => [
|
|
186
186
|
a(w, m(i, {
|
|
187
|
-
enum: r(
|
|
187
|
+
enum: r(P),
|
|
188
188
|
modelValue: l.flow["x-usePkce"],
|
|
189
189
|
readOnly: "",
|
|
190
190
|
"onUpdate:modelValue": e[9] || (e[9] = (t) => n(
|
|
@@ -217,7 +217,7 @@ const I = { class: "h-8 flex items-center justify-self-end" }, A = { class: "h-8
|
|
|
217
217
|
default: o(() => [
|
|
218
218
|
$("div", A, [
|
|
219
219
|
a(r(z), {
|
|
220
|
-
class: "
|
|
220
|
+
class: "mr-1 p-0 px-2 py-0.5",
|
|
221
221
|
loading: r(y),
|
|
222
222
|
size: "sm",
|
|
223
223
|
variant: "outlined",
|