@scalar/api-client 2.2.44 → 2.2.47
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 +77 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +1 -2
- 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 +35 -30
- package/dist/components/AddressBar/index.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +5 -5
- 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 +70 -64
- package/dist/components/CodeInput/codeVariableWidget.d.ts +5 -5
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +2 -3
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +4 -4
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +10 -10
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandActionInput.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +46 -40
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteRequest.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +14 -14
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +1 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +1 -1
- package/dist/components/CommandPalette/index.d.ts +1 -1
- package/dist/components/ContextBar.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +6 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts +6 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +4 -4
- package/dist/components/DataTable/DataTableInput.vue2.js +22 -23
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +3 -3
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +39 -39
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
- package/dist/components/DataTable/index.d.ts +8 -8
- package/dist/components/EmptyState.vue.d.ts +3 -0
- package/dist/components/EmptyState.vue.d.ts.map +1 -0
- package/dist/components/EmptyState.vue.js +7 -0
- package/dist/components/EmptyState.vue2.js +31 -0
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +1 -1
- package/dist/components/HelpfulLink.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -1
- package/dist/components/HttpMethod/index.d.ts +1 -1
- package/dist/components/IconSelector.vue.d.ts +1 -1
- package/dist/components/IconSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +1 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +1 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +1 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +2 -2
- package/dist/components/ImportCollection/index.d.ts +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +3 -3
- package/dist/components/ScalarHotkey.vue.d.ts.map +1 -1
- package/dist/components/ScalarHotkey.vue.js +12 -7
- package/dist/components/ScreenReader.vue.d.ts.map +1 -1
- package/dist/components/Search/useSearch.d.ts +4 -2
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +63 -56
- package/dist/components/Search/useSearch.test.d.ts +2 -0
- package/dist/components/Search/useSearch.test.d.ts.map +1 -0
- package/dist/components/Server/ServerDropdown.test.d.ts +2 -0
- package/dist/components/Server/ServerDropdown.test.d.ts.map +1 -0
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +1 -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 +27 -28
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +2 -2
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts +2 -2
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts +2 -2
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js +9 -9
- package/dist/components/Server/index.d.ts +2 -2
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +19 -19
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +11 -11
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +19 -13
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +3 -3
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- 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 +5 -5
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +3 -3
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +9 -9
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +3 -3
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts +1 -1
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +74 -73
- package/dist/components/TopNav/TopNavItem.vue.d.ts +5 -5
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/hooks/index.d.ts +5 -4
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/useResponseBody.d.ts +18 -0
- package/dist/hooks/useResponseBody.d.ts.map +1 -0
- package/dist/hooks/useResponseBody.js +28 -0
- package/dist/hooks/useResponseBody.test.d.ts +2 -0
- package/dist/hooks/useResponseBody.test.d.ts.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/layouts/App/ApiClientApp.vue.d.ts +2 -2
- package/dist/layouts/App/create-api-client-app.d.ts +106 -66
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.test.d.ts +2 -0
- package/dist/layouts/App/create-api-client-app.test.d.ts.map +1 -0
- package/dist/layouts/App/index.d.ts +2 -2
- package/dist/layouts/Modal/create-api-client-modal.d.ts +215 -135
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.test.d.ts +2 -0
- package/dist/layouts/Modal/create-api-client-modal.test.d.ts.map +1 -0
- package/dist/layouts/Modal/index.d.ts +2 -2
- package/dist/layouts/Web/create-api-client-web.d.ts +106 -66
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.test.d.ts +2 -0
- package/dist/layouts/Web/create-api-client-web.test.d.ts.map +1 -0
- package/dist/layouts/Web/index.d.ts +2 -2
- package/dist/libs/create-client.d.ts +106 -66
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +56 -57
- package/dist/libs/env-helpers.test.d.ts +2 -0
- package/dist/libs/env-helpers.test.d.ts.map +1 -0
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/event-bus.test.d.ts +2 -0
- package/dist/libs/event-bus.test.d.ts.map +1 -0
- package/dist/libs/extractAttachmentFilename.test.d.ts +2 -0
- package/dist/libs/extractAttachmentFilename.test.d.ts.map +1 -0
- package/dist/libs/find-request.test.d.ts +2 -0
- package/dist/libs/find-request.test.d.ts.map +1 -0
- package/dist/libs/getOpenApiDocumentDetails.d.ts +1 -1
- package/dist/libs/getOpenApiDocumentDetails.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/importers/curl.js +1 -1
- package/dist/libs/importers/curl.test.d.ts +2 -0
- package/dist/libs/importers/curl.test.d.ts.map +1 -0
- package/dist/libs/importers/index.d.ts +1 -1
- package/dist/libs/index.d.ts +16 -16
- package/dist/libs/index.js +31 -33
- package/dist/libs/local-storage.d.ts +1 -1
- package/dist/libs/normalize-headers.test.d.ts +2 -0
- package/dist/libs/normalize-headers.test.d.ts.map +1 -0
- package/dist/libs/parse-curl.test.d.ts +2 -0
- package/dist/libs/parse-curl.test.d.ts.map +1 -0
- package/dist/libs/send-request/build-request-security.d.ts +17 -0
- package/dist/libs/send-request/build-request-security.d.ts.map +1 -0
- package/dist/libs/send-request/build-request-security.js +32 -0
- package/dist/libs/send-request/build-request-security.test.d.ts +2 -0
- package/dist/libs/send-request/build-request-security.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-auth.test.d.ts +2 -0
- package/dist/libs/send-request/create-fetch-auth.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-body.d.ts +18 -0
- package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-body.js +26 -0
- package/dist/libs/send-request/create-fetch-body.test.d.ts +2 -0
- package/dist/libs/send-request/create-fetch-body.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-headers.d.ts +4 -0
- package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-headers.js +11 -0
- package/dist/libs/send-request/create-fetch-headers.test.d.ts +2 -0
- package/dist/libs/send-request/create-fetch-headers.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-query-params.d.ts +4 -0
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -0
- package/dist/libs/send-request/create-fetch-query-params.js +10 -0
- package/dist/libs/send-request/create-fetch-query-params.test.d.ts +2 -0
- package/dist/libs/send-request/create-fetch-query-params.test.d.ts.map +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts +29 -0
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -0
- package/dist/libs/send-request/create-request-operation.js +111 -0
- package/dist/libs/send-request/create-request-operation.test.d.ts +171 -0
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -0
- package/dist/libs/send-request/decode-buffer.d.ts +3 -0
- package/dist/libs/send-request/decode-buffer.d.ts.map +1 -0
- package/dist/libs/send-request/decode-buffer.js +9 -0
- package/dist/libs/send-request/decode-buffer.test.d.ts +2 -0
- package/dist/libs/send-request/decode-buffer.test.d.ts.map +1 -0
- package/dist/libs/send-request/index.d.ts +2 -1
- package/dist/libs/send-request/index.d.ts.map +1 -1
- package/dist/libs/send-request/index.js +4 -6
- package/dist/libs/send-request/set-request-cookies.d.ts +1 -1
- package/dist/libs/send-request/set-request-cookies.d.ts.map +1 -1
- package/dist/libs/send-request/set-request-cookies.test.d.ts +2 -0
- package/dist/libs/send-request/set-request-cookies.test.d.ts.map +1 -0
- package/dist/libs/string-template.test.d.ts +2 -0
- package/dist/libs/string-template.test.d.ts.map +1 -0
- package/dist/router.d.ts +1 -1
- package/dist/routes.d.ts +27 -27
- package/dist/routes.js +4 -4
- package/dist/routes.test.d.ts +2 -0
- package/dist/routes.test.d.ts.map +1 -0
- package/dist/store/active-entities.d.ts +10 -6
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts +1 -1
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +17 -14
- package/dist/store/collections.test.d.ts +2 -0
- package/dist/store/collections.test.d.ts.map +1 -0
- package/dist/store/events.d.ts +7 -7
- package/dist/store/import-spec.d.ts +1 -1
- package/dist/store/index.d.ts +2 -2
- package/dist/store/request-example.d.ts +52 -52
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/request.test.d.ts +2 -0
- package/dist/store/request.test.d.ts.map +1 -0
- package/dist/store/requests.d.ts +1 -1
- package/dist/store/router-params.d.ts +1 -1
- package/dist/store/store.d.ts +103 -63
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +1 -1
- package/dist/store/workspace.d.ts +44 -4
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +13 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +46 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue2.js +4 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts +28 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +64 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +12 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +47 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +13 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +47 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts +2 -0
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/index.d.ts +5 -0
- package/dist/views/Components/CodeSnippet/index.d.ts.map +1 -0
- package/dist/views/Components/CodeSnippet/index.js +10 -0
- package/dist/views/Cookies/CookieModal.vue.d.ts +3 -3
- package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieModal.vue.js +2 -2
- package/dist/views/Cookies/CookieModal.vue2.js +11 -11
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +84 -76
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +127 -113
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +2 -2
- package/dist/views/Environment/EnvironmentColors.vue.d.ts +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +6 -6
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +2 -2
- package/dist/views/Request/Request.vue.d.ts +2 -2
- 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 +92 -86
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +4 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestBody.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/RequestBody.test.d.ts.map +1 -0
- 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 +105 -103
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +3 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +7 -0
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +141 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +70 -74
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +71 -62
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +8 -8
- 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 +60 -59
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts +6 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +20 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +6 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.js +17 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/index.d.ts +2 -1
- package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/index.js +4 -2
- package/dist/views/Request/RequestSidebar.vue.d.ts +5 -5
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +211 -193
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +18 -31
- 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 +134 -141
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +5 -5
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +120 -101
- package/dist/views/Request/RequestSubpageHeader.test.d.ts +2 -0
- package/dist/views/Request/RequestSubpageHeader.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +3 -3
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
- 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 +50 -64
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +3 -3
- 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 +27 -27
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts +2 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts.map +1 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +6 -0
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +38 -19
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +39 -57
- 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 +30 -28
- package/dist/views/Request/ResponseSection/index.d.ts +1 -1
- package/dist/views/Request/components/index.d.ts +1 -1
- package/dist/views/Request/consts/index.d.ts +3 -3
- package/dist/views/Request/handle-drag.d.ts +2 -2
- package/dist/views/Request/libs/auth.d.ts +1 -1
- package/dist/views/Request/libs/auth.test.d.ts +2 -0
- package/dist/views/Request/libs/auth.test.d.ts.map +1 -0
- package/dist/views/Request/libs/index.d.ts +2 -2
- package/dist/views/Request/libs/oauth2.d.ts +2 -2
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +7 -7
- package/dist/views/Request/libs/oauth2.test.d.ts +2 -0
- package/dist/views/Request/libs/oauth2.test.d.ts.map +1 -0
- package/dist/views/Request/libs/request.test.d.ts +2 -0
- package/dist/views/Request/libs/request.test.d.ts.map +1 -0
- package/dist/views/Request/libs/watch-mode.d.ts +2 -2
- package/dist/views/Request/libs/watch-mode.test.d.ts +2 -0
- package/dist/views/Request/libs/watch-mode.test.d.ts.map +1 -0
- package/dist/views/Request/types/sidebar-item.d.ts +2 -2
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue.d.ts.map +1 -1
- package/dist/views/Servers/Servers.vue2.js +86 -73
- package/dist/views/Servers/index.d.ts +1 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.js +6 -6
- package/package.json +21 -15
- package/dist/libs/send-request/send-request.d.ts +0 -51
- package/dist/libs/send-request/send-request.d.ts.map +0 -1
- package/dist/libs/send-request/send-request.js +0 -177
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as ae, computed as w, ref as te, watch as $, openBlock as g, createBlock as x, withCtx as
|
|
1
|
+
import { defineComponent as ae, computed as w, ref as te, watch as $, openBlock as g, createBlock as x, withCtx as f, createTextVNode as H, toDisplayString as _, createVNode as p, unref as m, createElementVNode as F, createCommentVNode as oe, createElementBlock as V, Fragment as ne, nextTick as le } from "vue";
|
|
2
2
|
import re from "../../../components/CodeInput/CodeInput.vue.js";
|
|
3
3
|
import ue from "../../../components/DataTable/DataTable.vue.js";
|
|
4
4
|
import ie from "../../../components/DataTable/DataTableHeader.vue.js";
|
|
5
5
|
import C from "../../../components/DataTable/DataTableRow.vue.js";
|
|
6
6
|
import de from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
7
|
import { useActiveEntities as se } from "../../../store/active-entities.js";
|
|
8
|
-
import { ScalarListbox as X, ScalarButton as
|
|
8
|
+
import { ScalarListbox as X, ScalarButton as T, ScalarIcon as P } from "@scalar/components";
|
|
9
9
|
import { requestExampleParametersSchema as Y } from "@scalar/oas-utils/entities/spec";
|
|
10
10
|
import { canMethodHaveBody as ce } from "@scalar/oas-utils/helpers";
|
|
11
11
|
import G from "./RequestTable.vue.js";
|
|
@@ -23,13 +23,13 @@ const ve = {
|
|
|
23
23
|
title: {}
|
|
24
24
|
},
|
|
25
25
|
setup(ye) {
|
|
26
|
-
const { activeRequest:
|
|
26
|
+
const { activeRequest: v, activeExample: o } = se(), { requestExampleMutators: i } = me(), Q = {
|
|
27
27
|
json: "json",
|
|
28
28
|
xml: "xml",
|
|
29
29
|
yaml: "yaml",
|
|
30
30
|
edn: "edn",
|
|
31
31
|
other: "html"
|
|
32
|
-
},
|
|
32
|
+
}, k = Object.entries({
|
|
33
33
|
multipartForm: "Multipart Form",
|
|
34
34
|
formUrlEncoded: "Form URL Encoded",
|
|
35
35
|
binaryFile: "Binary File",
|
|
@@ -42,13 +42,15 @@ const ve = {
|
|
|
42
42
|
}).map(([e, a]) => ({
|
|
43
43
|
id: e,
|
|
44
44
|
label: a
|
|
45
|
-
})),
|
|
46
|
-
var
|
|
47
|
-
return o.value ? o.value.body.activeBody === "formData" ? ((
|
|
45
|
+
})), U = w(() => {
|
|
46
|
+
var a, t, n, l;
|
|
47
|
+
return o.value ? o.value.body.activeBody === "formData" ? ((a = o.value.body.formData) == null ? void 0 : a.encoding) === "urlencoded" ? "formUrlEncoded" : "multipartForm" : o.value.body.activeBody === "binary" ? "binaryFile" : o.value.body.activeBody === "raw" && ((t = o.value.body.raw) != null && t.encoding) ? o.value.body.raw.encoding === "html" ? "other" : o.value.body.raw.encoding : Object.keys(
|
|
48
|
+
((l = (n = v.value) == null ? void 0 : n.requestBody) == null ? void 0 : l.content) || {}
|
|
49
|
+
)[0] || "none" : "none";
|
|
48
50
|
}), y = w({
|
|
49
|
-
get: () =>
|
|
50
|
-
(e) => e.id ===
|
|
51
|
-
) ??
|
|
51
|
+
get: () => k.find(
|
|
52
|
+
(e) => e.id === U.value
|
|
53
|
+
) ?? k[k.length - 1] ?? k[0],
|
|
52
54
|
set: (e) => {
|
|
53
55
|
e != null && e.id && W(e.id);
|
|
54
56
|
}
|
|
@@ -60,19 +62,19 @@ const ve = {
|
|
|
60
62
|
function N() {
|
|
61
63
|
console.log("deleteRow");
|
|
62
64
|
}
|
|
63
|
-
const
|
|
64
|
-
var
|
|
65
|
-
if (!
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
const c = [...
|
|
65
|
+
const j = (e, a, t) => {
|
|
66
|
+
var l, r, s, u, d, h, D;
|
|
67
|
+
if (!v.value || !o.value) return;
|
|
68
|
+
const n = b.value;
|
|
69
|
+
if (n.length > e) {
|
|
70
|
+
const c = [...n];
|
|
69
71
|
c[e] = {
|
|
70
72
|
...c[e],
|
|
71
|
-
value: ((
|
|
73
|
+
value: ((l = c[e]) == null ? void 0 : l.value) || "",
|
|
72
74
|
key: ((r = c[e]) == null ? void 0 : r.key) || "",
|
|
73
75
|
enabled: ((s = c[e]) == null ? void 0 : s.enabled) ?? !1,
|
|
74
76
|
[a]: t || ""
|
|
75
|
-
}, (((u = c[e]) == null ? void 0 : u.key) !== "" || ((d = c[e]) == null ? void 0 : d.value) !== "") && (c[e].enabled = !0), ((h = c[e]) == null ? void 0 : h.key) === "" && ((
|
|
77
|
+
}, (((u = c[e]) == null ? void 0 : u.key) !== "" || ((d = c[e]) == null ? void 0 : d.value) !== "") && (c[e].enabled = !0), ((h = c[e]) == null ? void 0 : h.key) === "" && ((D = c[e]) == null ? void 0 : D.value) === "" && c.splice(e, 1), i.edit(
|
|
76
78
|
o.value.uid,
|
|
77
79
|
"body.formData.value",
|
|
78
80
|
c
|
|
@@ -83,23 +85,23 @@ const ve = {
|
|
|
83
85
|
o.value.uid,
|
|
84
86
|
"body.formData.value",
|
|
85
87
|
c
|
|
86
|
-
),
|
|
88
|
+
), le(() => {
|
|
87
89
|
var A;
|
|
88
90
|
if (!R.value) return;
|
|
89
91
|
(A = R.value.querySelectorAll("input")[a === "key" ? 0 : 1]) == null || A.focus();
|
|
90
92
|
});
|
|
91
93
|
}
|
|
92
|
-
e ===
|
|
94
|
+
e === n.length - 1 && S();
|
|
93
95
|
}, b = w(
|
|
94
96
|
() => {
|
|
95
97
|
var e, a, t;
|
|
96
98
|
return ((t = (a = (e = o.value) == null ? void 0 : e.body) == null ? void 0 : a.formData) == null ? void 0 : t.value) ?? [];
|
|
97
99
|
}
|
|
98
|
-
),
|
|
100
|
+
), O = () => {
|
|
99
101
|
const e = b.value[b.value.length - 1];
|
|
100
|
-
(!e || e.key !== "" || e.value !== "") &&
|
|
101
|
-
},
|
|
102
|
-
if (!
|
|
102
|
+
(!e || e.key !== "" || e.value !== "") && S();
|
|
103
|
+
}, S = () => {
|
|
104
|
+
if (!v.value || !o.value) return;
|
|
103
105
|
const e = Y.parse({
|
|
104
106
|
enabled: !1
|
|
105
107
|
}), a = [...b.value, e];
|
|
@@ -112,18 +114,18 @@ const ve = {
|
|
|
112
114
|
encoding: "form-data"
|
|
113
115
|
});
|
|
114
116
|
}, q = (e, a) => {
|
|
115
|
-
if (!
|
|
117
|
+
if (!v.value || !o.value) return;
|
|
116
118
|
const t = b.value;
|
|
117
119
|
if (t.length > e) {
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
+
const n = [...t];
|
|
121
|
+
n[e] && (n[e].enabled = a), i.edit(
|
|
120
122
|
o.value.uid,
|
|
121
123
|
"body.formData.value",
|
|
122
|
-
|
|
124
|
+
n
|
|
123
125
|
);
|
|
124
126
|
}
|
|
125
127
|
}, L = (e) => {
|
|
126
|
-
!
|
|
128
|
+
!v.value || !o.value || i.edit(o.value.uid, "body.raw.value", e);
|
|
127
129
|
}, M = (e) => e === "multipartForm" ? {
|
|
128
130
|
activeBody: "formData",
|
|
129
131
|
encoding: "form-data",
|
|
@@ -159,7 +161,7 @@ const ve = {
|
|
|
159
161
|
} : { activeBody: "raw", encoding: void 0, header: void 0 }, W = (e) => {
|
|
160
162
|
var s, u;
|
|
161
163
|
if (!o.value) return;
|
|
162
|
-
const { activeBody: a, encoding: t, header:
|
|
164
|
+
const { activeBody: a, encoding: t, header: n } = M(e);
|
|
163
165
|
if (i.edit(
|
|
164
166
|
o.value.uid,
|
|
165
167
|
"body.activeBody",
|
|
@@ -178,40 +180,40 @@ const ve = {
|
|
|
178
180
|
const { raw: d, ...h } = o.value.body;
|
|
179
181
|
i.edit(o.value.uid, "body", h);
|
|
180
182
|
}
|
|
181
|
-
const
|
|
183
|
+
const l = [...o.value.parameters.headers], r = l.findIndex(
|
|
182
184
|
(d) => d.key.toLowerCase() === "content-type"
|
|
183
185
|
);
|
|
184
186
|
if (r >= 0)
|
|
185
|
-
|
|
186
|
-
else if (
|
|
187
|
-
const d =
|
|
188
|
-
d && d.key === "" && d.value === "" ?
|
|
187
|
+
n && l[r] ? l[r].value = n : l[r] && l.splice(r, 1);
|
|
188
|
+
else if (n) {
|
|
189
|
+
const d = l[l.length - 1];
|
|
190
|
+
d && d.key === "" && d.value === "" ? l.splice(l.length - 1, 0, {
|
|
189
191
|
key: "Content-Type",
|
|
190
|
-
value:
|
|
192
|
+
value: n,
|
|
191
193
|
enabled: !0
|
|
192
|
-
}) :
|
|
194
|
+
}) : l.push({
|
|
193
195
|
key: "Content-Type",
|
|
194
|
-
value:
|
|
196
|
+
value: n,
|
|
195
197
|
enabled: !0
|
|
196
198
|
});
|
|
197
199
|
}
|
|
198
200
|
i.edit(
|
|
199
201
|
o.value.uid,
|
|
200
202
|
"parameters.headers",
|
|
201
|
-
|
|
203
|
+
l
|
|
202
204
|
);
|
|
203
205
|
}, z = async (e) => {
|
|
204
206
|
const { open: a } = K({
|
|
205
207
|
onChange: async (t) => {
|
|
206
|
-
var
|
|
207
|
-
const
|
|
208
|
-
if (
|
|
208
|
+
var l, r;
|
|
209
|
+
const n = t == null ? void 0 : t[0];
|
|
210
|
+
if (n && v.value && o.value) {
|
|
209
211
|
const u = [...b.value];
|
|
210
212
|
u[e] = {
|
|
211
213
|
...u[e],
|
|
212
|
-
file:
|
|
213
|
-
value: ((
|
|
214
|
-
key: ((r = u[e]) == null ? void 0 : r.key) ||
|
|
214
|
+
file: n,
|
|
215
|
+
value: ((l = u[e]) == null ? void 0 : l.value) || n.name,
|
|
216
|
+
key: ((r = u[e]) == null ? void 0 : r.key) || n.name,
|
|
215
217
|
enabled: !0
|
|
216
218
|
}, i.edit(
|
|
217
219
|
o.value.uid,
|
|
@@ -226,10 +228,10 @@ const ve = {
|
|
|
226
228
|
a();
|
|
227
229
|
};
|
|
228
230
|
function I() {
|
|
229
|
-
!
|
|
231
|
+
!v.value || !o.value || i.edit(o.value.uid, "body.binary", void 0);
|
|
230
232
|
}
|
|
231
233
|
function J(e) {
|
|
232
|
-
if (!
|
|
234
|
+
if (!v.value || !o.value) return;
|
|
233
235
|
const t = [...b.value];
|
|
234
236
|
t[e] = {
|
|
235
237
|
...t[e],
|
|
@@ -247,7 +249,7 @@ const ve = {
|
|
|
247
249
|
const { open: e } = K({
|
|
248
250
|
onChange: async (a) => {
|
|
249
251
|
const t = a == null ? void 0 : a[0];
|
|
250
|
-
t &&
|
|
252
|
+
t && v.value && o.value && i.edit(
|
|
251
253
|
o.value.uid,
|
|
252
254
|
"body.binary",
|
|
253
255
|
t
|
|
@@ -261,7 +263,7 @@ const ve = {
|
|
|
261
263
|
$(
|
|
262
264
|
y,
|
|
263
265
|
(e) => {
|
|
264
|
-
["multipartForm", "formUrlEncoded"].includes((e == null ? void 0 : e.id) || "") &&
|
|
266
|
+
["multipartForm", "formUrlEncoded"].includes((e == null ? void 0 : e.id) || "") && O();
|
|
265
267
|
},
|
|
266
268
|
{ immediate: !0 }
|
|
267
269
|
), $(
|
|
@@ -271,32 +273,32 @@ const ve = {
|
|
|
271
273
|
},
|
|
272
274
|
() => {
|
|
273
275
|
var e;
|
|
274
|
-
(e =
|
|
275
|
-
|
|
276
|
-
) &&
|
|
276
|
+
(e = v.value) != null && e.method && ce(v.value.method) && W(U.value), ["multipartForm", "formUrlEncoded"].includes(
|
|
277
|
+
U.value
|
|
278
|
+
) && O();
|
|
277
279
|
},
|
|
278
280
|
{ immediate: !0 }
|
|
279
281
|
);
|
|
280
|
-
const
|
|
281
|
-
var
|
|
282
|
-
const e = (
|
|
283
|
-
return Object.entries(
|
|
282
|
+
const B = w(() => {
|
|
283
|
+
var l, r, s, u;
|
|
284
|
+
const e = (l = y.value) == null ? void 0 : l.id, { header: a } = M(e), t = ((s = (r = v.value) == null ? void 0 : r.requestBody) == null ? void 0 : s.content) || {}, n = a ? ((u = t[a]) == null ? void 0 : u.examples) || {} : {};
|
|
285
|
+
return Object.entries(n).map(([d, h]) => ({
|
|
284
286
|
id: d,
|
|
285
287
|
label: d,
|
|
286
288
|
value: h
|
|
287
289
|
}));
|
|
288
|
-
}),
|
|
290
|
+
}), E = w({
|
|
289
291
|
get: () => {
|
|
290
|
-
var
|
|
291
|
-
const e = ((
|
|
292
|
-
return
|
|
292
|
+
var n, l;
|
|
293
|
+
const e = ((l = (n = o.value) == null ? void 0 : n.body.raw) == null ? void 0 : l.value) ?? "{}", a = JSON.parse(e);
|
|
294
|
+
return B.value.find((r) => {
|
|
293
295
|
const s = r.value;
|
|
294
296
|
return JSON.stringify(s.value) === JSON.stringify(a);
|
|
295
|
-
}) ??
|
|
297
|
+
}) ?? B.value[0];
|
|
296
298
|
},
|
|
297
299
|
set: (e) => {
|
|
298
300
|
if (e != null && e.id) {
|
|
299
|
-
const a =
|
|
301
|
+
const a = B.value.find(
|
|
300
302
|
(t) => t.id === e.id
|
|
301
303
|
);
|
|
302
304
|
if (a) {
|
|
@@ -307,33 +309,33 @@ const ve = {
|
|
|
307
309
|
}
|
|
308
310
|
});
|
|
309
311
|
return (e, a) => (g(), x(de, null, {
|
|
310
|
-
title:
|
|
312
|
+
title: f(() => [
|
|
311
313
|
H(_(e.title), 1)
|
|
312
314
|
]),
|
|
313
|
-
default:
|
|
314
|
-
|
|
315
|
-
default:
|
|
316
|
-
|
|
317
|
-
default:
|
|
318
|
-
|
|
319
|
-
default:
|
|
320
|
-
|
|
315
|
+
default: f(() => [
|
|
316
|
+
p(ue, { columns: [""] }, {
|
|
317
|
+
default: f(() => [
|
|
318
|
+
p(C, null, {
|
|
319
|
+
default: f(() => [
|
|
320
|
+
p(ie, { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between !p-0" }, {
|
|
321
|
+
default: f(() => [
|
|
322
|
+
p(m(X), {
|
|
321
323
|
modelValue: y.value,
|
|
322
324
|
"onUpdate:modelValue": a[0] || (a[0] = (t) => y.value = t),
|
|
323
|
-
options: m(
|
|
325
|
+
options: m(k),
|
|
324
326
|
teleport: ""
|
|
325
327
|
}, {
|
|
326
|
-
default:
|
|
327
|
-
|
|
328
|
+
default: f(() => [
|
|
329
|
+
p(m(T), {
|
|
328
330
|
class: "flex gap-1.5 h-full px-3 text-c-2 font-normal hover:text-c-1 w-fit",
|
|
329
331
|
fullWidth: "",
|
|
330
332
|
variant: "ghost"
|
|
331
333
|
}, {
|
|
332
|
-
default:
|
|
334
|
+
default: f(() => {
|
|
333
335
|
var t;
|
|
334
336
|
return [
|
|
335
|
-
|
|
336
|
-
|
|
337
|
+
F("span", null, _((t = y.value) == null ? void 0 : t.label), 1),
|
|
338
|
+
p(m(P), {
|
|
337
339
|
icon: "ChevronDown",
|
|
338
340
|
size: "md"
|
|
339
341
|
})
|
|
@@ -344,25 +346,25 @@ const ve = {
|
|
|
344
346
|
]),
|
|
345
347
|
_: 1
|
|
346
348
|
}, 8, ["modelValue", "options"]),
|
|
347
|
-
|
|
349
|
+
B.value.length > 0 ? (g(), x(m(X), {
|
|
348
350
|
key: 0,
|
|
349
|
-
modelValue:
|
|
350
|
-
"onUpdate:modelValue": a[1] || (a[1] = (t) =>
|
|
351
|
-
options:
|
|
351
|
+
modelValue: E.value,
|
|
352
|
+
"onUpdate:modelValue": a[1] || (a[1] = (t) => E.value = t),
|
|
353
|
+
options: B.value,
|
|
352
354
|
side: "left",
|
|
353
355
|
teleport: ""
|
|
354
356
|
}, {
|
|
355
|
-
default:
|
|
356
|
-
|
|
357
|
+
default: f(() => [
|
|
358
|
+
p(m(T), {
|
|
357
359
|
class: "flex gap-1.5 h-full px-2 text-c-2 font-normal hover:text-c-1 w-fit",
|
|
358
360
|
fullWidth: "",
|
|
359
361
|
variant: "ghost"
|
|
360
362
|
}, {
|
|
361
|
-
default:
|
|
363
|
+
default: f(() => {
|
|
362
364
|
var t;
|
|
363
365
|
return [
|
|
364
|
-
|
|
365
|
-
|
|
366
|
+
F("span", null, _((t = E.value) == null ? void 0 : t.label), 1),
|
|
367
|
+
p(m(P), {
|
|
366
368
|
icon: "ChevronDown",
|
|
367
369
|
size: "md"
|
|
368
370
|
})
|
|
@@ -379,36 +381,36 @@ const ve = {
|
|
|
379
381
|
]),
|
|
380
382
|
_: 1
|
|
381
383
|
}),
|
|
382
|
-
|
|
383
|
-
default:
|
|
384
|
-
var t,
|
|
384
|
+
p(C, null, {
|
|
385
|
+
default: f(() => {
|
|
386
|
+
var t, n, l, r, s, u, d, h, D;
|
|
385
387
|
return [
|
|
386
388
|
((t = y.value) == null ? void 0 : t.id) === "none" ? (g(), V("div", ve, a[2] || (a[2] = [
|
|
387
|
-
|
|
388
|
-
]))) : ((
|
|
389
|
-
(
|
|
390
|
-
|
|
391
|
-
|
|
389
|
+
F("span", null, "No Body", -1)
|
|
390
|
+
]))) : ((n = y.value) == null ? void 0 : n.id) === "binaryFile" ? (g(), V("div", fe, [
|
|
391
|
+
(l = m(o)) != null && l.body.binary ? (g(), V(ne, { key: 0 }, [
|
|
392
|
+
F("span", pe, _(((r = m(o)) == null ? void 0 : r.body.binary).name), 1),
|
|
393
|
+
p(m(T), {
|
|
392
394
|
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 ml-1 shadow-none",
|
|
393
395
|
size: "sm",
|
|
394
396
|
variant: "outlined",
|
|
395
397
|
onClick: I
|
|
396
398
|
}, {
|
|
397
|
-
default:
|
|
399
|
+
default: f(() => a[3] || (a[3] = [
|
|
398
400
|
H(" Delete ")
|
|
399
401
|
])),
|
|
400
402
|
_: 1
|
|
401
403
|
})
|
|
402
|
-
], 64)) : (g(), x(m(
|
|
404
|
+
], 64)) : (g(), x(m(T), {
|
|
403
405
|
key: 1,
|
|
404
406
|
class: "bg-b-2 hover:bg-b-3 border-0 text-c-2 shadow-none",
|
|
405
407
|
size: "sm",
|
|
406
408
|
variant: "outlined",
|
|
407
409
|
onClick: ee
|
|
408
410
|
}, {
|
|
409
|
-
default:
|
|
410
|
-
a[4] || (a[4] =
|
|
411
|
-
|
|
411
|
+
default: f(() => [
|
|
412
|
+
a[4] || (a[4] = F("span", null, "Upload File", -1)),
|
|
413
|
+
p(m(P), {
|
|
412
414
|
class: "ml-1",
|
|
413
415
|
icon: "UploadSimple",
|
|
414
416
|
size: "xs",
|
|
@@ -428,7 +430,7 @@ const ve = {
|
|
|
428
430
|
onDeleteRow: N,
|
|
429
431
|
onRemoveFile: J,
|
|
430
432
|
onToggleRow: q,
|
|
431
|
-
onUpdateRow:
|
|
433
|
+
onUpdateRow: j,
|
|
432
434
|
onUploadFile: z
|
|
433
435
|
}, null, 8, ["items"])) : ((u = y.value) == null ? void 0 : u.id) == "formUrlEncoded" ? (g(), x(G, {
|
|
434
436
|
key: 3,
|
|
@@ -441,7 +443,7 @@ const ve = {
|
|
|
441
443
|
onDeleteRow: N,
|
|
442
444
|
onRemoveFile: J,
|
|
443
445
|
onToggleRow: q,
|
|
444
|
-
onUpdateRow:
|
|
446
|
+
onUpdateRow: j,
|
|
445
447
|
onUploadFile: z
|
|
446
448
|
}, null, 8, ["items"])) : (g(), x(re, {
|
|
447
449
|
key: 4,
|
|
@@ -450,14 +452,14 @@ const ve = {
|
|
|
450
452
|
language: Z.value,
|
|
451
453
|
lineNumbers: "",
|
|
452
454
|
lint: "",
|
|
453
|
-
modelValue: ((
|
|
455
|
+
modelValue: ((D = (h = (d = m(o)) == null ? void 0 : d.body) == null ? void 0 : h.raw) == null ? void 0 : D.value) ?? "",
|
|
454
456
|
"onUpdate:modelValue": L
|
|
455
457
|
}, null, 8, ["language", "modelValue"]))
|
|
456
458
|
];
|
|
457
459
|
}),
|
|
458
460
|
_: 1
|
|
459
461
|
}),
|
|
460
|
-
|
|
462
|
+
p(C)
|
|
461
463
|
]),
|
|
462
464
|
_: 1
|
|
463
465
|
})
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=RequestCodeExample.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestCodeExample.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestCodeExample.vue"],"names":[],"mappings":";AAsbA,wBAMG"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { defineComponent as S, computed as a, openBlock as w, createElementBlock as $, createVNode as s, withCtx as i, createTextVNode as g, createElementVNode as u, unref as c, toDisplayString as k } from "vue";
|
|
2
|
+
import K from "../../../components/DataTable/DataTable.vue.js";
|
|
3
|
+
import V from "../../../components/DataTable/DataTableRow.vue.js";
|
|
4
|
+
import E from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
5
|
+
import { useActiveEntities as H } from "../../../store/active-entities.js";
|
|
6
|
+
import { ScalarCombobox as R, ScalarButton as j, ScalarIcon as q } from "@scalar/components";
|
|
7
|
+
import { snippetz as B } from "@scalar/snippetz";
|
|
8
|
+
import { filterSecurityRequirements as D } from "./helpers/filter-security-requirements.js";
|
|
9
|
+
import N from "../../Components/CodeSnippet/CodeSnippet.vue.js";
|
|
10
|
+
import { useWorkspace as T } from "../../../store/store.js";
|
|
11
|
+
const U = { class: "w-full" }, W = { class: "flex flex-1 -mx-1" }, z = { class: "bg-b-1 border-t flex items-center justify-center overflow-hidden" }, Y = /* @__PURE__ */ S({
|
|
12
|
+
__name: "RequestCodeExample",
|
|
13
|
+
setup(I) {
|
|
14
|
+
const {
|
|
15
|
+
activeRequest: m,
|
|
16
|
+
activeExample: f,
|
|
17
|
+
activeServer: v,
|
|
18
|
+
activeCollection: p,
|
|
19
|
+
activeWorkspace: n
|
|
20
|
+
} = H(), { securitySchemes: _, workspaceMutators: y } = T(), h = a(
|
|
21
|
+
() => {
|
|
22
|
+
var e, t, l;
|
|
23
|
+
return D(
|
|
24
|
+
((e = m.value) == null ? void 0 : e.security) || ((t = p.value) == null ? void 0 : t.security) || [],
|
|
25
|
+
(l = p.value) == null ? void 0 : l.selectedSecuritySchemeUids,
|
|
26
|
+
_
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
), r = a(() => {
|
|
30
|
+
const e = {};
|
|
31
|
+
return {
|
|
32
|
+
options: B().clients().map((l) => ({
|
|
33
|
+
label: l.title,
|
|
34
|
+
options: l.clients.map((o) => (e[`${l.key},${o.client}`] = o.title, {
|
|
35
|
+
id: `${l.key},${o.client}`,
|
|
36
|
+
label: o.title
|
|
37
|
+
}))
|
|
38
|
+
})),
|
|
39
|
+
dict: e
|
|
40
|
+
};
|
|
41
|
+
}), d = a(() => {
|
|
42
|
+
var l, o;
|
|
43
|
+
const e = (l = n.value) == null ? void 0 : l.selectedHttpClient;
|
|
44
|
+
if (!e)
|
|
45
|
+
return ((o = r.value.options[0]) == null ? void 0 : o.options[0]) ?? {
|
|
46
|
+
id: "js,fetch",
|
|
47
|
+
label: "Fetch"
|
|
48
|
+
};
|
|
49
|
+
const t = `${e.targetKey},${e.clientKey}`;
|
|
50
|
+
return {
|
|
51
|
+
id: t,
|
|
52
|
+
label: r.value.dict[t] ?? "Unknown"
|
|
53
|
+
};
|
|
54
|
+
}), x = a(
|
|
55
|
+
() => {
|
|
56
|
+
var e, t;
|
|
57
|
+
return ((t = (e = n.value) == null ? void 0 : e.selectedHttpClient) == null ? void 0 : t.targetKey) ?? "js";
|
|
58
|
+
}
|
|
59
|
+
), b = a(
|
|
60
|
+
() => {
|
|
61
|
+
var e, t;
|
|
62
|
+
return ((t = (e = n.value) == null ? void 0 : e.selectedHttpClient) == null ? void 0 : t.clientKey) ?? "fetch";
|
|
63
|
+
}
|
|
64
|
+
), C = ({ id: e }) => {
|
|
65
|
+
const [t, l] = e.split(",");
|
|
66
|
+
!n.value || !t || !l || y.edit(n.value.uid, "selectedHttpClient", {
|
|
67
|
+
targetKey: t,
|
|
68
|
+
clientKey: l
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
return (e, t) => (w(), $("div", U, [
|
|
72
|
+
s(E, {
|
|
73
|
+
class: "group/preview -mt-0.25 w-full",
|
|
74
|
+
defaultOpen: !1,
|
|
75
|
+
hasIcon: !1
|
|
76
|
+
}, {
|
|
77
|
+
title: i(() => t[0] || (t[0] = [
|
|
78
|
+
g("Code Snippet")
|
|
79
|
+
])),
|
|
80
|
+
actions: i(() => [
|
|
81
|
+
u("div", W, [
|
|
82
|
+
s(c(R), {
|
|
83
|
+
modelValue: d.value,
|
|
84
|
+
options: r.value.options,
|
|
85
|
+
placement: "bottom-end",
|
|
86
|
+
"onUpdate:modelValue": C
|
|
87
|
+
}, {
|
|
88
|
+
default: i(() => [
|
|
89
|
+
s(c(j), {
|
|
90
|
+
class: "flex gap-1.5 h-full px-1.5 py-0.75 font-normal text-c-1 w-fit hover:bg-b-3",
|
|
91
|
+
fullWidth: "",
|
|
92
|
+
variant: "ghost"
|
|
93
|
+
}, {
|
|
94
|
+
default: i(() => {
|
|
95
|
+
var l;
|
|
96
|
+
return [
|
|
97
|
+
u("span", null, k((l = d.value) == null ? void 0 : l.label), 1),
|
|
98
|
+
s(c(q), {
|
|
99
|
+
icon: "ChevronDown",
|
|
100
|
+
size: "md"
|
|
101
|
+
})
|
|
102
|
+
];
|
|
103
|
+
}),
|
|
104
|
+
_: 1
|
|
105
|
+
})
|
|
106
|
+
]),
|
|
107
|
+
_: 1
|
|
108
|
+
}, 8, ["modelValue", "options"])
|
|
109
|
+
])
|
|
110
|
+
]),
|
|
111
|
+
default: i(() => [
|
|
112
|
+
s(K, { columns: [""] }, {
|
|
113
|
+
default: i(() => [
|
|
114
|
+
s(V, null, {
|
|
115
|
+
default: i(() => [
|
|
116
|
+
u("div", z, [
|
|
117
|
+
s(c(N), {
|
|
118
|
+
class: "px-3 py-1.5",
|
|
119
|
+
client: b.value,
|
|
120
|
+
example: c(f),
|
|
121
|
+
operation: c(m),
|
|
122
|
+
securitySchemes: h.value,
|
|
123
|
+
server: c(v),
|
|
124
|
+
target: x.value
|
|
125
|
+
}, null, 8, ["client", "example", "operation", "securitySchemes", "server", "target"])
|
|
126
|
+
])
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
})
|
|
130
|
+
]),
|
|
131
|
+
_: 1
|
|
132
|
+
})
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
})
|
|
136
|
+
]));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
export {
|
|
140
|
+
Y as default
|
|
141
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestParams.vue"],"names":[],"mappings":"AAsOA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAIlD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,cAAc,CAAC,YAAY,CAAC,CAAA;IAC5C,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,OAAO,CAAA;QAChB,KAAK,EAAE,gBAAgB,CAAA;KACxB,EAAE,CAAA;CACJ,CAAC;;AA8VF,wBAOG"}
|