@scalar/api-client 2.8.0 → 2.9.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 +90 -0
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +9 -10
- package/dist/components/CodeInput/CodeInput.vue2.js +5 -5
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +3 -3
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +3 -3
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +18 -20
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +2 -2
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +13 -14
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +3 -3
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +3 -3
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +22 -24
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +1 -1
- package/dist/components/DataTable/DataTableInput.vue2.js +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +8 -9
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +8 -10
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/IconSelector.vue.js +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +12 -12
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +8 -8
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +14 -16
- package/dist/components/ImportCollection/PasteEventListener.vue.js +1 -1
- package/dist/components/ImportCollection/PrefetchError.vue.js +2 -2
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +5 -7
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +3 -3
- package/dist/components/OpenApiClientButton.vue2.js +1 -1
- package/dist/components/Server/ServerSelector.vue.js +1 -2
- package/dist/components/SideNav/SideHelp.vue.js +13 -19
- package/dist/components/SideNav/SideNav.vue.js +4 -5
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +4 -5
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +2 -2
- package/dist/components/Sidebar/Sidebar.vue2.js +1 -1
- package/dist/components/TopNav/TopNav.vue.js +8 -10
- package/dist/components/TopNav/TopNavItem.vue2.js +8 -12
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +9 -11
- package/dist/hooks/useClientConfig.d.ts +9 -6
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -15
- package/dist/layouts/App/create-api-client-app.d.ts +3644 -3643
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +24 -18
- package/dist/layouts/Modal/create-api-client-modal.d.ts +5 -8089
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +28 -46
- package/dist/layouts/Modal/index.d.ts +2 -2
- package/dist/layouts/Modal/index.d.ts.map +1 -1
- package/dist/layouts/Modal/index.js +2 -5
- package/dist/layouts/Web/create-api-client-web.d.ts +20 -20
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +15 -12
- package/dist/libs/create-client.d.ts +25 -25
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +23 -23
- package/dist/libs/find-request.d.ts +2 -2
- package/dist/libs/postman.d.ts +1 -1
- package/dist/libs/postman.d.ts.map +1 -1
- package/dist/libs/postman.js +12 -12
- package/dist/libs/send-request/create-request-operation.js +8 -8
- package/dist/libs/send-request/create-request-operation.test.d.ts +2 -2
- package/dist/libs/validate-parameters.d.ts +10 -2
- package/dist/libs/validate-parameters.d.ts.map +1 -1
- package/dist/libs/validate-parameters.js +13 -6
- package/dist/plugins/plugin-manager.d.ts +1 -1
- package/dist/routes.d.ts +3 -184
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +6 -6
- package/dist/store/active-entities.d.ts +3 -3
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +2 -2
- package/dist/store/requests.d.ts +22 -22
- package/dist/store/router-params.d.ts.map +1 -1
- package/dist/store/store.d.ts +20 -20
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +8 -6
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +5 -5
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +3 -3
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +3 -4
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +7 -8
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +44 -55
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +16 -18
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +41 -46
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +3 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +201 -187
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +8 -10
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +2 -3
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +2 -4
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +14 -16
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +3 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +3 -3
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +87 -85
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +10 -11
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +4 -5
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +3 -3
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +5 -5
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +9 -10
- package/dist/v2/components/TempReplaceMe.vue.d.ts +3 -0
- package/dist/v2/components/TempReplaceMe.vue.d.ts.map +1 -0
- package/dist/v2/components/TempReplaceMe.vue.js +12 -0
- package/dist/v2/components/resize/Resize.vue.d.ts +20 -0
- package/dist/v2/components/resize/Resize.vue.d.ts.map +1 -0
- package/dist/v2/components/resize/Resize.vue.js +8 -0
- package/dist/v2/components/resize/Resize.vue2.js +36 -0
- package/dist/v2/components/resize/index.d.ts +3 -0
- package/dist/v2/components/resize/index.d.ts.map +1 -0
- package/dist/v2/components/resize/index.js +4 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +39 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -0
- package/dist/v2/components/sidebar/Sidebar.vue.js +95 -0
- package/dist/v2/components/sidebar/Sidebar.vue2.js +4 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +13 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +63 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue2.js +4 -0
- package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts +10 -0
- package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts.map +1 -0
- package/dist/v2/components/sidebar/SidebarToggle.vue.js +52 -0
- package/dist/v2/components/sidebar/SidebarToggle.vue2.js +4 -0
- package/dist/v2/components/sidebar/index.d.ts +4 -0
- package/dist/v2/components/sidebar/index.d.ts.map +1 -0
- package/dist/v2/components/sidebar/index.js +8 -0
- package/dist/v2/features/app/App.vue.d.ts +16 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -0
- package/dist/v2/features/app/App.vue.js +72 -0
- package/dist/v2/features/app/App.vue3.js +5 -0
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +30 -0
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/AppSidebar.vue.js +7 -0
- package/dist/v2/features/app/components/AppSidebar.vue2.js +117 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +3 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.js +14 -0
- package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts +3 -0
- package/dist/v2/features/app/components/DownloadAppButton.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/DownloadAppButton.vue.js +7 -0
- package/dist/v2/features/app/components/DownloadAppButton.vue2.js +19 -0
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts +16 -0
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/WebTopNav.vue.js +28 -0
- package/dist/v2/features/app/components/WebTopNav.vue2.js +4 -0
- package/dist/v2/features/app/components/index.d.ts +2 -0
- package/dist/v2/features/app/components/index.d.ts.map +1 -0
- package/dist/v2/features/app/components/index.js +5 -0
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +25 -0
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -0
- package/dist/v2/features/app/helpers/create-api-client-app.js +21 -0
- package/dist/v2/features/app/helpers/routes.d.ts +103 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -0
- package/dist/v2/features/app/helpers/routes.js +115 -0
- package/dist/v2/features/app/index.d.ts +2 -0
- package/dist/v2/features/app/index.d.ts.map +1 -0
- package/dist/v2/features/app/index.js +4 -0
- package/dist/v2/features/collection/DocumentCollection.test.d.ts +2 -0
- package/dist/v2/features/collection/DocumentCollection.test.d.ts.map +1 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts +12 -0
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/DocumentCollection.vue.js +4 -0
- package/dist/v2/features/collection/DocumentCollection.vue2.js +82 -0
- package/dist/v2/features/collection/WorkspaceCollection.test.d.ts +2 -0
- package/dist/v2/features/collection/WorkspaceCollection.test.d.ts.map +1 -0
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +10 -0
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +4 -0
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +38 -0
- package/dist/v2/features/collection/components/Authentication.test.d.ts +2 -0
- package/dist/v2/features/collection/components/Authentication.test.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +48 -0
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Authentication.vue.js +7 -0
- package/dist/v2/features/collection/components/Authentication.vue2.js +50 -0
- package/dist/v2/features/collection/components/Cookies.vue.d.ts +3 -0
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Cookies.vue.js +9 -0
- package/dist/v2/features/collection/components/Environment.test.d.ts +2 -0
- package/dist/v2/features/collection/components/Environment.test.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Environment.vue.d.ts +89 -0
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Environment.vue.js +4 -0
- package/dist/v2/features/collection/components/Environment.vue2.js +34 -0
- package/dist/v2/features/collection/components/Form.vue.d.ts +29 -0
- package/dist/v2/features/collection/components/Form.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Form.vue.js +83 -0
- package/dist/v2/features/collection/components/Form.vue2.js +4 -0
- package/dist/v2/features/collection/components/LabelInput.test.d.ts +2 -0
- package/dist/v2/features/collection/components/LabelInput.test.d.ts.map +1 -0
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts +10 -0
- package/dist/v2/features/collection/components/LabelInput.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/LabelInput.vue.js +7 -0
- package/dist/v2/features/collection/components/LabelInput.vue2.js +29 -0
- package/dist/v2/features/collection/components/Overview.test.d.ts +2 -0
- package/dist/v2/features/collection/components/Overview.test.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Overview.vue.d.ts +14 -0
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Overview.vue.js +4 -0
- package/dist/v2/features/collection/components/Overview.vue2.js +91 -0
- package/dist/v2/features/collection/components/Servers.test.d.ts +2 -0
- package/dist/v2/features/collection/components/Servers.test.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Servers.vue.d.ts +33 -0
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Servers.vue.js +4 -0
- package/dist/v2/features/collection/components/Servers.vue2.js +120 -0
- package/dist/v2/features/collection/components/Settings.test.d.ts +2 -0
- package/dist/v2/features/collection/components/Settings.test.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Settings.vue.d.ts +17 -0
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Settings.vue.js +7 -0
- package/dist/v2/features/collection/components/Settings.vue2.js +100 -0
- package/dist/v2/features/collection/components/Tabs.test.d.ts +2 -0
- package/dist/v2/features/collection/components/Tabs.test.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Tabs.vue.d.ts +6 -0
- package/dist/v2/features/collection/components/Tabs.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Tabs.vue.js +46 -0
- package/dist/v2/features/collection/components/Tabs.vue2.js +4 -0
- package/dist/v2/features/environments/Environments.test.d.ts +2 -0
- package/dist/v2/features/environments/Environments.test.d.ts.map +1 -0
- package/dist/v2/features/environments/Environments.vue.d.ts +31 -0
- package/dist/v2/features/environments/Environments.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/Environments.vue.js +65 -0
- package/dist/v2/features/environments/Environments.vue2.js +4 -0
- package/dist/v2/features/environments/EnvironmentsList.test.d.ts +2 -0
- package/dist/v2/features/environments/EnvironmentsList.test.d.ts.map +1 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts +98 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/EnvironmentsList.vue.js +114 -0
- package/dist/v2/features/environments/EnvironmentsList.vue2.js +4 -0
- package/dist/v2/features/environments/components/Environment.test.d.ts +2 -0
- package/dist/v2/features/environments/components/Environment.test.d.ts.map +1 -0
- package/dist/v2/features/environments/components/Environment.vue.d.ts +70 -0
- package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/components/Environment.vue.js +104 -0
- package/dist/v2/features/environments/components/Environment.vue2.js +4 -0
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts +20 -0
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.js +48 -0
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue2.js +4 -0
- package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts +2 -0
- package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts +10 -0
- package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +97 -0
- package/dist/v2/features/environments/components/EnvironmentColors.vue2.js +4 -0
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts +19 -0
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +63 -0
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue2.js +4 -0
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +14 -0
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +53 -0
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue2.js +4 -0
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts +18 -0
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.js +35 -0
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue2.js +4 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts +2 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts +23 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +7 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +122 -0
- package/dist/v2/features/environments/index.d.ts +5 -0
- package/dist/v2/features/environments/index.d.ts.map +1 -0
- package/dist/v2/features/environments/index.js +6 -0
- package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts +2 -0
- package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts.map +1 -0
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts +25 -0
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -0
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +7 -0
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +156 -0
- package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts +2 -0
- package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts.map +1 -0
- package/dist/v2/features/global-cookies/components/GlobalCookies.vue.d.ts +32 -0
- package/dist/v2/features/global-cookies/components/GlobalCookies.vue.d.ts.map +1 -0
- package/dist/v2/features/global-cookies/components/GlobalCookies.vue.js +7 -0
- package/dist/v2/features/global-cookies/components/GlobalCookies.vue2.js +58 -0
- package/dist/v2/features/global-cookies/index.d.ts +2 -0
- package/dist/v2/features/global-cookies/index.d.ts.map +1 -0
- package/dist/v2/features/global-cookies/index.js +4 -0
- package/dist/v2/features/modal/Modal.vue.d.ts +16 -0
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -0
- package/dist/v2/features/modal/Modal.vue.js +7 -0
- package/dist/v2/features/modal/Modal.vue2.js +81 -0
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +53 -0
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -0
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -0
- package/dist/v2/features/modal/index.d.ts +2 -0
- package/dist/v2/features/modal/index.d.ts.map +1 -0
- package/dist/v2/features/modal/index.js +4 -0
- package/dist/v2/features/operation/Operation.test.d.ts +2 -0
- package/dist/v2/features/operation/Operation.test.d.ts.map +1 -0
- package/dist/v2/features/operation/Operation.vue.d.ts +79 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -0
- package/dist/v2/features/operation/Operation.vue.js +124 -0
- package/dist/v2/features/operation/Operation.vue2.js +4 -0
- package/dist/v2/features/operation/components/Header.test.d.ts +2 -0
- package/dist/v2/features/operation/components/Header.test.d.ts.map +1 -0
- package/dist/v2/features/operation/components/Header.vue.d.ts +85 -0
- package/dist/v2/features/operation/components/Header.vue.d.ts.map +1 -0
- package/dist/v2/features/operation/components/Header.vue.js +7 -0
- package/dist/v2/features/operation/components/Header.vue2.js +97 -0
- package/dist/v2/features/operation/index.d.ts +3 -0
- package/dist/v2/features/operation/index.d.ts.map +1 -0
- package/dist/v2/features/operation/index.js +4 -0
- package/dist/v2/features/settings/Settings.test.d.ts +2 -0
- package/dist/v2/features/settings/Settings.test.d.ts.map +1 -0
- package/dist/v2/features/settings/Settings.vue.d.ts +22 -0
- package/dist/v2/features/settings/Settings.vue.d.ts.map +1 -0
- package/dist/v2/features/settings/Settings.vue.js +268 -0
- package/dist/v2/features/settings/Settings.vue2.js +4 -0
- package/dist/v2/features/settings/components/Appearance.vue.d.ts +10 -0
- package/dist/v2/features/settings/components/Appearance.vue.d.ts.map +1 -0
- package/dist/v2/features/settings/components/Appearance.vue.js +88 -0
- package/dist/v2/features/settings/components/Appearance.vue2.js +4 -0
- package/dist/v2/features/settings/components/Section.vue.d.ts +14 -0
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -0
- package/dist/v2/features/settings/components/Section.vue.js +24 -0
- package/dist/v2/features/settings/components/Section.vue2.js +4 -0
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +9 -0
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -0
- package/dist/v2/features/settings/helpers/get-theme-colors.js +17 -0
- package/dist/v2/features/settings/index.d.ts +2 -0
- package/dist/v2/features/settings/index.d.ts.map +1 -0
- package/dist/v2/features/settings/index.js +4 -0
- package/dist/v2/hooks/use-document-watcher.d.ts +28 -0
- package/dist/v2/hooks/use-document-watcher.d.ts.map +1 -0
- package/dist/v2/hooks/use-document-watcher.test.d.ts +2 -0
- package/dist/v2/hooks/use-document-watcher.test.d.ts.map +1 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts +8 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -0
- package/dist/v2/hooks/use-workspace-client-events.js +13 -0
- package/dist/v2/plugins.d.ts +44 -0
- package/dist/v2/plugins.d.ts.map +1 -0
- package/dist/v2/types/layout.d.ts +10 -0
- package/dist/v2/types/layout.d.ts.map +1 -0
- package/dist/views/Collection/Collection.vue2.js +6 -6
- package/dist/views/Collection/CollectionCookies.vue2.js +3 -3
- package/dist/views/Collection/CollectionEnvironment.vue2.js +12 -13
- package/dist/views/Collection/CollectionScripts.vue2.js +3 -3
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServerForm.vue.js +42 -62
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServers.vue2.js +43 -50
- package/dist/views/Collection/CollectionSettings.vue.js +2 -2
- package/dist/views/Collection/CollectionSettings.vue2.js +5 -6
- package/dist/views/Collection/CollectionSync.vue2.js +3 -3
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +10 -12
- package/dist/views/Collection/components/MarkdownInput.vue2.js +2 -4
- package/dist/views/Cookies/CookieModal.vue2.js +6 -6
- package/dist/views/Cookies/Cookies.vue2.js +6 -6
- package/dist/views/Environment/Environment.vue2.js +5 -6
- package/dist/views/Environment/EnvironmentModal.vue.js +13 -14
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +8 -9
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestRoot.vue.js +2 -2
- package/dist/views/Request/RequestRoot.vue2.js +79 -80
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +10 -11
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +44 -55
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +10 -12
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +39 -44
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +96 -78
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +3 -3
- package/dist/views/Request/RequestSection/RequestParams.vue.js +2 -3
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +55 -55
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +15 -17
- package/dist/views/Request/RequestSidebar.vue2.js +7 -8
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +31 -32
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +13 -16
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +11 -13
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +4 -5
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +4 -5
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +4 -4
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +11 -13
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +7 -8
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +11 -14
- package/dist/views/Request/libs/oauth2.d.ts +1 -1
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +40 -42
- package/dist/views/Settings/components/SettingsAppearance.vue.js +8 -11
- package/package.json +52 -27
- package/dist/hooks/useKeyMap.d.ts +0 -2
- package/dist/hooks/useKeyMap.d.ts.map +0 -1
- package/dist/hooks/useKeyMap.js +0 -9
- package/dist/router.d.ts +0 -8
- package/dist/router.d.ts.map +0 -1
- package/dist/router.js +0 -20
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as K, computed as v, ref as Q, watch as L, createBlock as y, openBlock as f, withCtx as d, createVNode as s, createCommentVNode as Z, unref as c, createElementVNode as g, toDisplayString as
|
|
2
|
-
import { ScalarListbox as W, ScalarButton as
|
|
1
|
+
import { defineComponent as K, computed as v, ref as Q, watch as L, createBlock as y, openBlock as f, withCtx as d, createVNode as s, createCommentVNode as Z, unref as c, createElementVNode as g, toDisplayString as k, createElementBlock as V, Fragment as I, createTextVNode as M, nextTick as _ } from "vue";
|
|
2
|
+
import { ScalarListbox as W, ScalarButton as w, ScalarIcon as F } from "@scalar/components";
|
|
3
3
|
import { requestExampleParametersSchema as z } from "@scalar/oas-utils/entities/spec";
|
|
4
4
|
import { canMethodHaveBody as ee } from "@scalar/oas-utils/helpers";
|
|
5
5
|
import ae from "../../../components/CodeInput/CodeInput.vue.js";
|
|
@@ -16,7 +16,7 @@ const ie = {
|
|
|
16
16
|
}, re = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "flex items-center justify-center overflow-hidden border-t p-1.5"
|
|
19
|
-
}, de = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" },
|
|
19
|
+
}, de = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, we = /* @__PURE__ */ K({
|
|
20
20
|
__name: "RequestBody",
|
|
21
21
|
props: {
|
|
22
22
|
example: {},
|
|
@@ -48,18 +48,18 @@ const ie = {
|
|
|
48
48
|
label: a
|
|
49
49
|
})), B = v(() => {
|
|
50
50
|
const { activeBody: e, formData: a, raw: t } = l.example.body;
|
|
51
|
-
return e === "formData" ? a?.encoding === "urlencoded" ? "formUrlEncoded" : "multipartForm" : e === "binary" ? "binaryFile" : e === "raw" && t?.encoding ? t.encoding === "html" ? "other" : t.encoding : Object.keys(l.operation.requestBody?.content || {})[0] || "none";
|
|
51
|
+
return e === "formData" ? a?.encoding === "urlencoded" ? "formUrlEncoded" : "multipartForm" : e === "binary" ? "binaryFile" : e === "raw" && t?.encoding ? t.encoding === "html" || t.encoding === "text" ? "other" : t.encoding : Object.keys(l.operation.requestBody?.content || {})[0] || "none";
|
|
52
52
|
}), u = v({
|
|
53
53
|
get: () => b.find(
|
|
54
54
|
(e) => e.id === B.value
|
|
55
55
|
) ?? b[b.length - 1] ?? b[0],
|
|
56
56
|
set: (e) => {
|
|
57
|
-
e?.id &&
|
|
57
|
+
e?.id && N(e.id);
|
|
58
58
|
}
|
|
59
59
|
}), x = Q(null), H = v(() => {
|
|
60
60
|
const e = u.value?.id;
|
|
61
61
|
return $[e] ?? "plaintext";
|
|
62
|
-
}),
|
|
62
|
+
}), C = (e) => {
|
|
63
63
|
const a = m.value;
|
|
64
64
|
if (a.length > e) {
|
|
65
65
|
const t = [...a];
|
|
@@ -69,7 +69,7 @@ const ie = {
|
|
|
69
69
|
t
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
},
|
|
72
|
+
}, U = (e, a, t) => {
|
|
73
73
|
const o = m.value;
|
|
74
74
|
if (o.length > e) {
|
|
75
75
|
const n = [...o];
|
|
@@ -92,11 +92,11 @@ const ie = {
|
|
|
92
92
|
x.value.querySelectorAll("input")[a === "key" ? 0 : 1]?.focus();
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
e === o.length - 1 &&
|
|
95
|
+
e === o.length - 1 && j();
|
|
96
96
|
}, m = v(() => l.example.body.formData?.value ?? []), D = () => {
|
|
97
97
|
const e = m.value[m.value.length - 1];
|
|
98
|
-
(!e || e.key !== "" || e.value !== "") &&
|
|
99
|
-
},
|
|
98
|
+
(!e || e.key !== "" || e.value !== "") && j();
|
|
99
|
+
}, j = () => {
|
|
100
100
|
const e = z.parse({
|
|
101
101
|
enabled: !1
|
|
102
102
|
}), a = [...m.value, e];
|
|
@@ -114,40 +114,60 @@ const ie = {
|
|
|
114
114
|
o
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
|
-
}, P = (e) => i.edit(l.example.uid, "body.raw.value", e),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
117
|
+
}, P = (e) => i.edit(l.example.uid, "body.raw.value", e), O = (e) => {
|
|
118
|
+
if (e === "multipartForm")
|
|
119
|
+
return {
|
|
120
|
+
activeBody: "formData",
|
|
121
|
+
encoding: "form-data",
|
|
122
|
+
header: "multipart/form-data"
|
|
123
|
+
};
|
|
124
|
+
if (e === "formUrlEncoded")
|
|
125
|
+
return {
|
|
126
|
+
activeBody: "formData",
|
|
127
|
+
encoding: "urlencoded",
|
|
128
|
+
header: "application/x-www-form-urlencoded"
|
|
129
|
+
};
|
|
130
|
+
if (e === "binaryFile")
|
|
131
|
+
return {
|
|
132
|
+
activeBody: "binary",
|
|
133
|
+
encoding: void 0,
|
|
134
|
+
header: "application/octet-stream"
|
|
135
|
+
};
|
|
136
|
+
if (e === "json")
|
|
137
|
+
return {
|
|
138
|
+
activeBody: "raw",
|
|
139
|
+
encoding: "json",
|
|
140
|
+
header: Object.keys(l.operation.requestBody?.content ?? {}).find((o) => o.includes("json") || o.endsWith("+json")) || "application/json"
|
|
141
|
+
};
|
|
142
|
+
if (e === "xml")
|
|
143
|
+
return {
|
|
144
|
+
activeBody: "raw",
|
|
145
|
+
encoding: "xml",
|
|
146
|
+
header: "application/xml"
|
|
147
|
+
};
|
|
148
|
+
if (e === "yaml")
|
|
149
|
+
return {
|
|
150
|
+
activeBody: "raw",
|
|
151
|
+
encoding: "yaml",
|
|
152
|
+
header: "application/yaml"
|
|
153
|
+
};
|
|
154
|
+
if (e === "edn")
|
|
155
|
+
return {
|
|
156
|
+
activeBody: "raw",
|
|
157
|
+
encoding: "edn",
|
|
158
|
+
header: "application/edn"
|
|
159
|
+
};
|
|
160
|
+
if (e === "other") {
|
|
161
|
+
const t = Object.keys(l.operation.requestBody?.content ?? {}).find((o) => o.startsWith("text/"));
|
|
162
|
+
return {
|
|
163
|
+
activeBody: "raw",
|
|
164
|
+
encoding: t ? "text" : "html",
|
|
165
|
+
header: t ?? "application/html"
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
return { activeBody: "raw", encoding: void 0, header: void 0 };
|
|
169
|
+
}, N = (e) => {
|
|
170
|
+
const { activeBody: a, encoding: t, header: o } = O(e);
|
|
151
171
|
if (i.edit(l.example.uid, "body.activeBody", a), t && a === "raw")
|
|
152
172
|
i.edit(l.example.uid, "body.raw", {
|
|
153
173
|
encoding: t,
|
|
@@ -180,9 +200,9 @@ const ie = {
|
|
|
180
200
|
});
|
|
181
201
|
}
|
|
182
202
|
i.edit(l.example.uid, "parameters.headers", n);
|
|
183
|
-
}, S =
|
|
203
|
+
}, S = (e) => {
|
|
184
204
|
const { open: a } = A({
|
|
185
|
-
onChange:
|
|
205
|
+
onChange: (t) => {
|
|
186
206
|
const o = t?.[0];
|
|
187
207
|
if (o) {
|
|
188
208
|
const r = [...m.value];
|
|
@@ -210,7 +230,7 @@ const ie = {
|
|
|
210
230
|
}
|
|
211
231
|
function Y() {
|
|
212
232
|
const { open: e } = A({
|
|
213
|
-
onChange:
|
|
233
|
+
onChange: (a) => {
|
|
214
234
|
const t = a?.[0];
|
|
215
235
|
t && i.edit(l.example.uid, "body.binary", t);
|
|
216
236
|
},
|
|
@@ -228,20 +248,20 @@ const ie = {
|
|
|
228
248
|
), L(
|
|
229
249
|
() => l.example.uid,
|
|
230
250
|
() => {
|
|
231
|
-
l.operation.method && ee(l.operation.method) &&
|
|
251
|
+
l.operation.method && ee(l.operation.method) && N(B.value), ["multipartForm", "formUrlEncoded"].includes(
|
|
232
252
|
B.value
|
|
233
253
|
) && D();
|
|
234
254
|
},
|
|
235
255
|
{ immediate: !0 }
|
|
236
256
|
);
|
|
237
257
|
const h = v(() => {
|
|
238
|
-
const e = u.value?.id, { header: a } =
|
|
258
|
+
const e = u.value?.id, { header: a } = O(e), t = l.operation.requestBody?.content || {}, o = a ? t[a]?.examples || {} : {};
|
|
239
259
|
return Object.entries(o).map(([n, r]) => ({
|
|
240
260
|
id: n,
|
|
241
261
|
label: n,
|
|
242
262
|
value: r
|
|
243
263
|
}));
|
|
244
|
-
}),
|
|
264
|
+
}), T = v({
|
|
245
265
|
get: () => {
|
|
246
266
|
const e = l.example.body.raw?.value ?? "{}", a = JSON.parse(e);
|
|
247
267
|
return h.value.find((o) => {
|
|
@@ -261,7 +281,7 @@ const ie = {
|
|
|
261
281
|
});
|
|
262
282
|
return (e, a) => (f(), y(oe, null, {
|
|
263
283
|
title: d(() => [
|
|
264
|
-
M(
|
|
284
|
+
M(k(e.title), 1)
|
|
265
285
|
]),
|
|
266
286
|
default: d(() => [
|
|
267
287
|
s(te, {
|
|
@@ -280,13 +300,13 @@ const ie = {
|
|
|
280
300
|
teleport: ""
|
|
281
301
|
}, {
|
|
282
302
|
default: d(() => [
|
|
283
|
-
s(c(
|
|
303
|
+
s(c(w), {
|
|
284
304
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
|
|
285
305
|
variant: "ghost"
|
|
286
306
|
}, {
|
|
287
307
|
default: d(() => [
|
|
288
|
-
g("span", null,
|
|
289
|
-
s(c(
|
|
308
|
+
g("span", null, k(u.value?.label), 1),
|
|
309
|
+
s(c(F), {
|
|
290
310
|
icon: "ChevronDown",
|
|
291
311
|
size: "md"
|
|
292
312
|
})
|
|
@@ -298,21 +318,21 @@ const ie = {
|
|
|
298
318
|
}, 8, ["modelValue", "options"]),
|
|
299
319
|
h.value.length > 0 ? (f(), y(c(W), {
|
|
300
320
|
key: 0,
|
|
301
|
-
modelValue:
|
|
302
|
-
"onUpdate:modelValue": a[1] || (a[1] = (t) =>
|
|
321
|
+
modelValue: T.value,
|
|
322
|
+
"onUpdate:modelValue": a[1] || (a[1] = (t) => T.value = t),
|
|
303
323
|
options: h.value,
|
|
304
324
|
side: "left",
|
|
305
325
|
teleport: ""
|
|
306
326
|
}, {
|
|
307
327
|
default: d(() => [
|
|
308
|
-
s(c(
|
|
328
|
+
s(c(w), {
|
|
309
329
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-2 font-normal",
|
|
310
330
|
fullWidth: "",
|
|
311
331
|
variant: "ghost"
|
|
312
332
|
}, {
|
|
313
333
|
default: d(() => [
|
|
314
|
-
g("span", null,
|
|
315
|
-
s(c(
|
|
334
|
+
g("span", null, k(T.value?.label), 1),
|
|
335
|
+
s(c(F), {
|
|
316
336
|
icon: "ChevronDown",
|
|
317
337
|
size: "md"
|
|
318
338
|
})
|
|
@@ -330,24 +350,23 @@ const ie = {
|
|
|
330
350
|
}),
|
|
331
351
|
s(R, null, {
|
|
332
352
|
default: d(() => [
|
|
333
|
-
u.value?.id === "none" ? (f(),
|
|
353
|
+
u.value?.id === "none" ? (f(), V("div", ie, [...a[2] || (a[2] = [
|
|
334
354
|
g("span", null, "No Body", -1)
|
|
335
|
-
]))) : u.value?.id === "binaryFile" ? (f(),
|
|
336
|
-
e.example.body.binary ? (f(),
|
|
337
|
-
g("span", de,
|
|
338
|
-
s(c(
|
|
355
|
+
])])) : u.value?.id === "binaryFile" ? (f(), V("div", re, [
|
|
356
|
+
e.example.body.binary ? (f(), V(I, { key: 0 }, [
|
|
357
|
+
g("span", de, k(e.example.body.binary.name), 1),
|
|
358
|
+
s(c(w), {
|
|
339
359
|
class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
|
|
340
360
|
size: "sm",
|
|
341
361
|
variant: "outlined",
|
|
342
362
|
onClick: X
|
|
343
363
|
}, {
|
|
344
|
-
default: d(() => a[3] || (a[3] = [
|
|
345
|
-
M(" Delete ")
|
|
346
|
-
])),
|
|
347
|
-
_: 1
|
|
348
|
-
__: [3]
|
|
364
|
+
default: d(() => [...a[3] || (a[3] = [
|
|
365
|
+
M(" Delete ", -1)
|
|
366
|
+
])]),
|
|
367
|
+
_: 1
|
|
349
368
|
})
|
|
350
|
-
], 64)) : (f(), y(c(
|
|
369
|
+
], 64)) : (f(), y(c(w), {
|
|
351
370
|
key: 1,
|
|
352
371
|
class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
|
|
353
372
|
size: "sm",
|
|
@@ -356,15 +375,14 @@ const ie = {
|
|
|
356
375
|
}, {
|
|
357
376
|
default: d(() => [
|
|
358
377
|
a[4] || (a[4] = g("span", null, "Upload File", -1)),
|
|
359
|
-
s(c(
|
|
378
|
+
s(c(F), {
|
|
360
379
|
class: "ml-1",
|
|
361
380
|
icon: "Upload",
|
|
362
381
|
size: "xs",
|
|
363
382
|
thickness: "2.5"
|
|
364
383
|
})
|
|
365
384
|
]),
|
|
366
|
-
_: 1
|
|
367
|
-
__: [4]
|
|
385
|
+
_: 1
|
|
368
386
|
}))
|
|
369
387
|
])) : u.value?.id == "multipartForm" ? (f(), y(J, {
|
|
370
388
|
key: 2,
|
|
@@ -377,10 +395,10 @@ const ie = {
|
|
|
377
395
|
items: m.value,
|
|
378
396
|
showUploadButton: "",
|
|
379
397
|
workspace: e.workspace,
|
|
380
|
-
onDeleteRow:
|
|
398
|
+
onDeleteRow: C,
|
|
381
399
|
onRemoveFile: q,
|
|
382
400
|
onToggleRow: E,
|
|
383
|
-
onUpdateRow:
|
|
401
|
+
onUpdateRow: U,
|
|
384
402
|
onUploadFile: S
|
|
385
403
|
}, null, 8, ["envVariables", "environment", "items", "workspace"])) : u.value?.id == "formUrlEncoded" ? (f(), y(J, {
|
|
386
404
|
key: 3,
|
|
@@ -393,10 +411,10 @@ const ie = {
|
|
|
393
411
|
items: m.value,
|
|
394
412
|
showUploadButton: "",
|
|
395
413
|
workspace: e.workspace,
|
|
396
|
-
onDeleteRow:
|
|
414
|
+
onDeleteRow: C,
|
|
397
415
|
onRemoveFile: q,
|
|
398
416
|
onToggleRow: E,
|
|
399
|
-
onUpdateRow:
|
|
417
|
+
onUpdateRow: U,
|
|
400
418
|
onUploadFile: S
|
|
401
419
|
}, null, 8, ["envVariables", "environment", "items", "workspace"])) : (f(), y(ae, {
|
|
402
420
|
key: 4,
|
|
@@ -424,5 +442,5 @@ const ie = {
|
|
|
424
442
|
}
|
|
425
443
|
});
|
|
426
444
|
export {
|
|
427
|
-
|
|
445
|
+
we as default
|
|
428
446
|
};
|
|
@@ -99,9 +99,9 @@ const q = { class: "w-full" }, M = { class: "flex flex-1" }, P = { class: "bg-b-
|
|
|
99
99
|
class: "group/preview w-full border-b-0",
|
|
100
100
|
defaultOpen: !1
|
|
101
101
|
}, {
|
|
102
|
-
title: c(() => t[0] || (t[0] = [
|
|
103
|
-
H("Code Snippet")
|
|
104
|
-
])),
|
|
102
|
+
title: c(() => [...t[0] || (t[0] = [
|
|
103
|
+
H("Code Snippet", -1)
|
|
104
|
+
])]),
|
|
105
105
|
actions: c(() => [
|
|
106
106
|
x("div", M, [
|
|
107
107
|
i(u(j), {
|
|
@@ -110,11 +110,10 @@ const G = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
|
|
|
110
110
|
onClick: M($, ["stop"])
|
|
111
111
|
}, {
|
|
112
112
|
default: i(() => [
|
|
113
|
-
a[0] || (a[0] = P(" Clear ")),
|
|
113
|
+
a[0] || (a[0] = P(" Clear ", -1)),
|
|
114
114
|
f("span", U, "All " + R(e.title), 1)
|
|
115
115
|
]),
|
|
116
|
-
_: 1
|
|
117
|
-
__: [0]
|
|
116
|
+
_: 1
|
|
118
117
|
})
|
|
119
118
|
]),
|
|
120
119
|
_: 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e85e2882"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as D, computed as v, useId as
|
|
1
|
+
import { defineComponent as D, computed as v, useId as g, ref as M, watch as S, createBlock as d, openBlock as r, withCtx as c, createElementVNode as y, withDirectives as s, createCommentVNode as k, createElementBlock as f, createVNode as i, unref as l, vShow as m, Fragment as K, renderList as L, resolveDynamicComponent as Q, toDisplayString as $ } from "vue";
|
|
2
2
|
import { ScalarErrorBoundary as C } from "@scalar/components";
|
|
3
3
|
import { canMethodHaveBody as b, isDefined as j, REGEX as R } from "@scalar/oas-utils/helpers";
|
|
4
4
|
import F from "../../../components/SectionFilter.vue.js";
|
|
5
5
|
import T from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
6
6
|
import { matchesDomain as W } from "../../../libs/send-request/set-request-cookies.js";
|
|
7
7
|
import z from "./RequestBody.vue.js";
|
|
8
|
-
import
|
|
8
|
+
import w from "./RequestParams.vue.js";
|
|
9
9
|
import G from "./RequestPathParams.vue.js";
|
|
10
10
|
import X from "./RequestAuth/RequestAuth.vue.js";
|
|
11
11
|
import J from "./RequestCodeExample.vue.js";
|
|
12
12
|
import { usePluginManager as Y } from "../../../plugins/hooks/usePluginManager.js";
|
|
13
13
|
import { useWorkspace as Z } from "../../../store/store.js";
|
|
14
14
|
import { useLayout as x } from "../../../hooks/useLayout.js";
|
|
15
|
-
const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, ee = ["for"], ae = ["id", "placeholder", "value"],
|
|
15
|
+
const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, ee = ["for"], ae = ["id", "placeholder", "value"], oe = {
|
|
16
16
|
key: 2,
|
|
17
17
|
class: "text-c-1 flex h-8 items-center"
|
|
18
|
-
},
|
|
18
|
+
}, le = ["id", "role"], be = /* @__PURE__ */ D({
|
|
19
19
|
__name: "RequestSection",
|
|
20
20
|
props: {
|
|
21
21
|
collection: {},
|
|
@@ -28,37 +28,37 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
28
28
|
server: {},
|
|
29
29
|
workspace: {}
|
|
30
30
|
},
|
|
31
|
-
setup(
|
|
31
|
+
setup(o) {
|
|
32
32
|
const O = [
|
|
33
33
|
"Auth",
|
|
34
|
-
"
|
|
34
|
+
"Path Parameters",
|
|
35
35
|
"Cookies",
|
|
36
36
|
"Headers",
|
|
37
37
|
"Query",
|
|
38
38
|
"Body"
|
|
39
39
|
// 'Scripts',
|
|
40
|
-
], { requestMutators:
|
|
40
|
+
], { requestMutators: P, cookies: B, securitySchemes: V } = Z(), { layout: u } = x(), A = v(() => {
|
|
41
41
|
const e = /* @__PURE__ */ new Set(["All", ...O]);
|
|
42
|
-
return
|
|
43
|
-
}),
|
|
42
|
+
return o.example.parameters.path.length || e.delete("Path Parameters"), b(o.operation.method ?? "get") || e.delete("Body"), h.value && e.delete("Auth"), [...e];
|
|
43
|
+
}), n = v(
|
|
44
44
|
() => Object.fromEntries(
|
|
45
|
-
|
|
45
|
+
A.value.map((e) => [e, g()])
|
|
46
46
|
)
|
|
47
|
-
),
|
|
48
|
-
() =>
|
|
47
|
+
), h = v(
|
|
48
|
+
() => u === "modal" && !o.operation.security && !Object.keys(V ?? {}).length
|
|
49
49
|
), a = M("All");
|
|
50
50
|
S(
|
|
51
|
-
() =>
|
|
51
|
+
() => o.operation,
|
|
52
52
|
(e) => {
|
|
53
53
|
a.value === "Body" && e && !b(e.method) && (a.value = "All");
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
56
|
const E = (e) => {
|
|
57
57
|
const t = e.target;
|
|
58
|
-
|
|
58
|
+
P.edit(o.operation.uid, "summary", t.value);
|
|
59
59
|
}, H = v(
|
|
60
|
-
() => (
|
|
61
|
-
(e) => W(
|
|
60
|
+
() => (o.workspace.cookies ?? []).map((e) => B[e]).filter(j).filter((e) => e.name).filter(
|
|
61
|
+
(e) => W(o.server?.url || o.operation.path, e.domain)
|
|
62
62
|
).map((e) => ({
|
|
63
63
|
key: e.name,
|
|
64
64
|
value: e.value,
|
|
@@ -70,52 +70,52 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
70
70
|
},
|
|
71
71
|
enabled: !0
|
|
72
72
|
}))
|
|
73
|
-
), N = () =>
|
|
73
|
+
), N = () => o.operation.summary ? o.operation.summary : o.operation.path.replace(R.PROTOCOL, "") ? o.operation.path.replace(R.PROTOCOL, "") : "Request Name", q = g(), I = Y().getViewComponents("request.section"), U = (e, t) => P.edit(o.operation.uid, e, t);
|
|
74
74
|
return S(
|
|
75
|
-
() =>
|
|
75
|
+
() => h.value,
|
|
76
76
|
(e) => {
|
|
77
77
|
e && a.value === "Auth" && (a.value = "All");
|
|
78
78
|
}
|
|
79
|
-
), (e, t) => (
|
|
79
|
+
), (e, t) => (r(), d(T, {
|
|
80
80
|
"aria-label": `Request: ${e.operation.summary}`
|
|
81
81
|
}, {
|
|
82
82
|
title: c(() => [
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
y("div", _, [
|
|
84
|
+
l(u) !== "modal" ? (r(), f("label", {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
|
|
87
|
-
for:
|
|
87
|
+
for: l(q)
|
|
88
88
|
}, null, 8, ee)) : k("", !0),
|
|
89
|
-
|
|
89
|
+
l(u) !== "modal" ? (r(), f("input", {
|
|
90
90
|
key: 1,
|
|
91
|
-
id:
|
|
91
|
+
id: l(q),
|
|
92
92
|
class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
|
|
93
93
|
placeholder: N(),
|
|
94
94
|
value: e.operation.summary,
|
|
95
95
|
onInput: E
|
|
96
|
-
}, null, 40, ae)) : (
|
|
96
|
+
}, null, 40, ae)) : (r(), f("span", oe, $(e.operation.summary), 1))
|
|
97
97
|
]),
|
|
98
98
|
i(F, {
|
|
99
99
|
modelValue: a.value,
|
|
100
100
|
"onUpdate:modelValue": t[0] || (t[0] = (p) => a.value = p),
|
|
101
|
-
filterIds:
|
|
102
|
-
filters:
|
|
101
|
+
filterIds: n.value,
|
|
102
|
+
filters: A.value
|
|
103
103
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
104
104
|
]),
|
|
105
105
|
default: c(() => [
|
|
106
|
-
|
|
107
|
-
id:
|
|
106
|
+
y("div", {
|
|
107
|
+
id: n.value.All,
|
|
108
108
|
class: "request-section-content custom-scroll relative flex flex-1 flex-col",
|
|
109
109
|
role: a.value === "All" ? "tabpanel" : "none"
|
|
110
110
|
}, [
|
|
111
|
-
e.collection && e.workspace && (
|
|
111
|
+
e.collection && e.workspace && (l(u) !== "modal" || Object.keys(l(V) ?? {}).length) ? s((r(), d(X, {
|
|
112
112
|
key: 0,
|
|
113
|
-
id:
|
|
113
|
+
id: n.value.Auth,
|
|
114
114
|
class: "request-section-content-auth",
|
|
115
115
|
collection: e.collection,
|
|
116
116
|
envVariables: e.envVariables,
|
|
117
117
|
environment: e.environment,
|
|
118
|
-
isReadOnly:
|
|
118
|
+
isReadOnly: l(u) === "modal",
|
|
119
119
|
layout: "client",
|
|
120
120
|
operation: e.operation,
|
|
121
121
|
role: a.value === "All" ? "none" : "tabpanel",
|
|
@@ -125,12 +125,12 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
125
125
|
workspace: e.workspace
|
|
126
126
|
}, null, 8, ["id", "collection", "envVariables", "environment", "isReadOnly", "operation", "role", "selectedSecuritySchemeUids", "server", "workspace"])), [
|
|
127
127
|
[
|
|
128
|
-
|
|
129
|
-
!
|
|
128
|
+
m,
|
|
129
|
+
!h.value && (a.value === "All" || a.value === "Auth")
|
|
130
130
|
]
|
|
131
131
|
]) : k("", !0),
|
|
132
132
|
s(i(G, {
|
|
133
|
-
id:
|
|
133
|
+
id: n.value["Path Parameters"],
|
|
134
134
|
class: "request-section-content-path-params",
|
|
135
135
|
envVariables: e.envVariables,
|
|
136
136
|
environment: e.environment,
|
|
@@ -139,16 +139,16 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
139
139
|
operation: e.operation,
|
|
140
140
|
paramKey: "path",
|
|
141
141
|
role: a.value === "All" ? "none" : "tabpanel",
|
|
142
|
-
title: "
|
|
142
|
+
title: "Path Parameters",
|
|
143
143
|
workspace: e.workspace
|
|
144
144
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
145
145
|
[
|
|
146
|
-
|
|
147
|
-
(a.value === "All" || a.value === "
|
|
146
|
+
m,
|
|
147
|
+
(a.value === "All" || a.value === "Path Parameters") && e.example.parameters.path.length
|
|
148
148
|
]
|
|
149
149
|
]),
|
|
150
|
-
s(i(
|
|
151
|
-
id:
|
|
150
|
+
s(i(w, {
|
|
151
|
+
id: n.value.Cookies,
|
|
152
152
|
class: "request-section-content-cookies",
|
|
153
153
|
envVariables: e.envVariables,
|
|
154
154
|
environment: e.environment,
|
|
@@ -162,10 +162,10 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
162
162
|
title: "Cookies",
|
|
163
163
|
workspace: e.workspace
|
|
164
164
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "readOnlyEntries", "role", "workspace"]), [
|
|
165
|
-
[
|
|
165
|
+
[m, a.value === "All" || a.value === "Cookies"]
|
|
166
166
|
]),
|
|
167
|
-
s(i(
|
|
168
|
-
id:
|
|
167
|
+
s(i(w, {
|
|
168
|
+
id: n.value.Headers,
|
|
169
169
|
class: "request-section-content-headers",
|
|
170
170
|
envVariables: e.envVariables,
|
|
171
171
|
environment: e.environment,
|
|
@@ -178,10 +178,10 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
178
178
|
title: "Headers",
|
|
179
179
|
workspace: e.workspace
|
|
180
180
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
181
|
-
[
|
|
181
|
+
[m, a.value === "All" || a.value === "Headers"]
|
|
182
182
|
]),
|
|
183
|
-
s(i(
|
|
184
|
-
id:
|
|
183
|
+
s(i(w, {
|
|
184
|
+
id: n.value.Query,
|
|
185
185
|
class: "request-section-content-query",
|
|
186
186
|
envVariables: e.envVariables,
|
|
187
187
|
environment: e.environment,
|
|
@@ -194,11 +194,11 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
194
194
|
title: "Query Parameters",
|
|
195
195
|
workspace: e.workspace
|
|
196
196
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
197
|
-
[
|
|
197
|
+
[m, a.value === "All" || a.value === "Query"]
|
|
198
198
|
]),
|
|
199
|
-
e.operation.method && (a.value === "All" || a.value === "Body") &&
|
|
199
|
+
e.operation.method && (a.value === "All" || a.value === "Body") && l(b)(e.operation.method) ? (r(), d(z, {
|
|
200
200
|
key: 1,
|
|
201
|
-
id:
|
|
201
|
+
id: n.value.Body,
|
|
202
202
|
class: "request-section-content-body",
|
|
203
203
|
envVariables: e.envVariables,
|
|
204
204
|
environment: e.environment,
|
|
@@ -208,21 +208,21 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
208
208
|
title: "Body",
|
|
209
209
|
workspace: e.workspace
|
|
210
210
|
}, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"])) : k("", !0),
|
|
211
|
-
(
|
|
211
|
+
(r(!0), f(K, null, L(l(I), (p) => (r(), d(l(C), {
|
|
212
212
|
key: p.component
|
|
213
213
|
}, {
|
|
214
214
|
default: c(() => [
|
|
215
|
-
s((
|
|
215
|
+
s((r(), d(Q(p.component), {
|
|
216
216
|
operation: e.operation,
|
|
217
217
|
"onUpdate:operation": U
|
|
218
218
|
}, null, 40, ["operation"])), [
|
|
219
|
-
[
|
|
219
|
+
[m, a.value === "All" || a.value === p.title]
|
|
220
220
|
])
|
|
221
221
|
]),
|
|
222
222
|
_: 2
|
|
223
223
|
}, 1024))), 128)),
|
|
224
|
-
t[1] || (t[1] =
|
|
225
|
-
i(
|
|
224
|
+
t[1] || (t[1] = y("div", { class: "flex flex-grow" }, null, -1)),
|
|
225
|
+
i(l(C), null, {
|
|
226
226
|
default: c(() => [
|
|
227
227
|
i(J, {
|
|
228
228
|
class: "request-section-content-code-example -mt-1/2 border-t",
|
|
@@ -236,7 +236,7 @@ const _ = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
236
236
|
]),
|
|
237
237
|
_: 1
|
|
238
238
|
})
|
|
239
|
-
], 8,
|
|
239
|
+
], 8, le)
|
|
240
240
|
]),
|
|
241
241
|
_: 1
|
|
242
242
|
}, 8, ["aria-label"]));
|