@scalar/api-client 2.43.0 → 3.0.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 +34 -0
- package/README.md +82 -74
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +3 -3
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.script.js +3 -2
- package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -1
- package/dist/components/IconSelector.vue.script.js +1 -1
- package/dist/components/Server/index.d.ts +0 -2
- package/dist/components/Server/index.d.ts.map +1 -1
- package/dist/components/Server/index.js +1 -3
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts +2 -2
- package/dist/hooks/{useFileDialog.d.ts → use-file-dialog.d.ts} +3 -2
- package/dist/hooks/use-file-dialog.d.ts.map +1 -0
- package/dist/hooks/{useFileDialog.js → use-file-dialog.js} +2 -2
- package/dist/hooks/use-file-dialog.js.map +1 -0
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -5
- package/dist/monacoeditorwork/editor.worker.bundle.js +222 -366
- package/dist/monacoeditorwork/json.worker.bundle.js +388 -501
- package/dist/monacoeditorwork/yaml.worker.bundle.js +14567 -22937
- package/dist/style.css +6031 -7687
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +4 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +13 -10
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -0
- package/dist/{components → v2/blocks/operation-block/components}/OpenApiClientButton.vue.js +3 -3
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -0
- package/dist/{components → v2/blocks/operation-block/components}/OpenApiClientButton.vue.script.js +6 -7
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +3 -3
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/response-cache.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/response-cache.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/response-cache.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +2 -2
- package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
- package/dist/v2/blocks/operation-block/index.d.ts +1 -0
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.js +2 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js.map +1 -1
- package/dist/{views/Components/CodeSnippet → v2/blocks/operation-code-sample}/helpers/get-snippet.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-snippet.d.ts.map +1 -0
- package/dist/{views/Components/CodeSnippet → v2/blocks/operation-code-sample}/helpers/get-snippet.js +2 -3
- package/dist/v2/blocks/operation-code-sample/helpers/get-snippet.js.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +4 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +6 -6
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js +11 -13
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +2 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +9 -9
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +3 -3
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/get-content-length.d.ts +1 -1
- package/dist/v2/blocks/response-block/helpers/get-content-length.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/get-content-length.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js +10 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/process-response-body.d.ts +1 -2
- package/dist/v2/blocks/response-block/helpers/process-response-body.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
- package/dist/v2/blocks/response-block/helpers/process-response-body.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +8 -3
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +4 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +31 -6
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +6 -8
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +5 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +6 -3
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +3 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +4 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +3 -3
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.d.ts +11 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js +18 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js.map +1 -0
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +4 -3
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.script.js +8 -0
- package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
- package/dist/{views/Collection/CollectionNavigation.vue.d.ts → v2/components/code-input/PillTooltipHost.vue.d.ts} +3 -2
- package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts.map +1 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.js +7 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +40 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts +1 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -1
- package/dist/v2/components/code-input/code-variable-widget.js +33 -20
- package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
- package/dist/v2/components/code-input/pill-context.d.ts +11 -0
- package/dist/v2/components/code-input/pill-context.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +3 -3
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js +5 -2
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.d.ts +2 -2
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts +2 -2
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.script.js +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/app/App.vue.script.js +1 -1
- package/dist/v2/features/app/app-state.js +6 -6
- package/dist/v2/features/app/components/AppSidebar.vue.script.js +2 -2
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js.map +1 -1
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js +4 -4
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.script.js.map +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts +4 -4
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.js +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.js.map +1 -1
- package/dist/v2/features/app/components/DesktopTab.vue.script.js +2 -2
- package/dist/v2/features/app/components/DesktopTab.vue.script.js.map +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts +2 -2
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +11 -5
- package/dist/v2/features/app/helpers/routes.js.map +1 -1
- package/dist/v2/features/app/index.js +2 -2
- package/dist/v2/features/collection/DocumentCollection.vue.script.js +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.script.js +1 -1
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +1 -1
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.d.ts +16 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js +220 -0
- package/dist/v2/features/collection/components/Runner/components/Runner.vue.script.js.map +1 -0
- package/dist/{components/Sidebar/SidebarButton.vue.d.ts → v2/features/collection/components/Runner/components/RunnerCard.vue.d.ts} +8 -6
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.script.js +45 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerCard.vue.script.js.map +1 -0
- package/dist/{components/Form/LabelInput.vue.d.ts → v2/features/collection/components/Runner/components/RunnerOrderItem.vue.d.ts} +12 -8
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.script.js +73 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerOrderItem.vue.script.js.map +1 -0
- package/dist/{components/AddressBar/AddressBarHistory.vue.d.ts → v2/features/collection/components/Runner/components/RunnerResultRow.vue.d.ts} +11 -5
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.script.js +124 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResultRow.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.d.ts +17 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.script.js +126 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerResults.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.d.ts +18 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.script.js +180 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTree.vue.script.js.map +1 -0
- package/dist/{components/Sidebar/Actions/EditSidebarListElement.vue.d.ts → v2/features/collection/components/Runner/components/RunnerTreeExample.vue.d.ts} +6 -5
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.script.js +44 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeExample.vue.script.js.map +1 -0
- package/dist/{components/DataTable/DataTableText.vue.d.ts → v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.d.ts} +6 -4
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.script.js +53 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeGroup.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.d.ts +23 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.js +7 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.script.js +75 -0
- package/dist/v2/features/collection/components/Runner/components/RunnerTreeOperation.vue.script.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/index.d.ts +3 -0
- package/dist/v2/features/collection/components/Runner/hooks/index.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts +73 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js +190 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-execution.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.d.ts +46 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.js +114 -0
- package/dist/v2/features/collection/components/Runner/hooks/use-runner-selection.js.map +1 -0
- package/dist/v2/features/collection/components/Runner/index.d.ts +2 -0
- package/dist/v2/features/collection/components/Runner/index.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Tabs.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Tabs.vue.js.map +1 -1
- package/dist/v2/features/collection/components/Tabs.vue.script.js +3 -2
- package/dist/v2/features/collection/components/Tabs.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/TheCommandPalette.vue.script.js +2 -2
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js +3 -3
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.script.js +1 -1
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +1 -1
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js.map +1 -1
- package/dist/{libs → v2/features/command-palette/helpers}/parse-curl.d.ts +2 -2
- package/dist/v2/features/command-palette/helpers/parse-curl.d.ts.map +1 -0
- package/dist/{libs → v2/features/command-palette/helpers}/parse-curl.js +1 -1
- package/dist/v2/features/command-palette/helpers/parse-curl.js.map +1 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +1 -1
- package/dist/v2/features/command-palette/index.d.ts +2 -0
- package/dist/v2/features/command-palette/index.d.ts.map +1 -1
- package/dist/v2/features/command-palette/index.js +3 -1
- package/dist/v2/features/editor/helpers/configure-language-support.js +3 -3
- package/dist/v2/features/editor/helpers/configure-language-support.js.map +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts.map +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +1 -1
- package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js.map +1 -1
- package/dist/v2/features/editor/helpers/json/json-ast.d.ts +1 -1
- package/dist/v2/features/editor/helpers/json/json-ast.d.ts.map +1 -1
- package/dist/v2/features/editor/helpers/json/json-ast.js +1 -1
- package/dist/v2/features/editor/helpers/json/json-ast.js.map +1 -1
- package/dist/v2/features/editor/helpers/theme/load-css-variables.d.ts +1 -1
- package/dist/v2/features/editor/hooks/use-editor-markers.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +4 -4
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts +5 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +70 -13
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +8 -3
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.script.js +1 -1
- package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +4 -3
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +12 -3
- package/dist/v2/features/modal/helpers/create-api-client-modal.js.map +1 -1
- package/dist/v2/features/modal/helpers/types.d.ts +8 -0
- package/dist/v2/features/modal/helpers/types.d.ts.map +1 -0
- package/dist/v2/features/modal/index.d.ts +1 -0
- package/dist/v2/features/modal/index.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +3 -3
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue.script.js +3 -1
- package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.script.js +1 -1
- package/dist/v2/features/settings/components/Appearance.vue.d.ts +2 -2
- package/dist/v2/helpers/safe-run.d.ts +10 -0
- package/dist/v2/helpers/safe-run.d.ts.map +1 -0
- package/dist/v2/helpers/safe-run.js +19 -0
- package/dist/v2/helpers/safe-run.js.map +1 -0
- package/package.json +146 -169
- package/dist/assets/keycap.ascii.virtual.js +0 -6
- package/dist/assets/keycap.ascii.virtual.js.map +0 -1
- package/dist/components/AddressBar/AddressBar.vue.d.ts +0 -20
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +0 -1
- package/dist/components/AddressBar/AddressBar.vue.js +0 -9
- package/dist/components/AddressBar/AddressBar.vue.js.map +0 -1
- package/dist/components/AddressBar/AddressBar.vue.script.js +0 -204
- package/dist/components/AddressBar/AddressBar.vue.script.js.map +0 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +0 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +0 -9
- package/dist/components/AddressBar/AddressBarHistory.vue.js.map +0 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.script.js +0 -85
- package/dist/components/AddressBar/AddressBarHistory.vue.script.js.map +0 -1
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts +0 -22
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts.map +0 -1
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -20
- package/dist/components/AddressBar/httpStatusCodeColors.js.map +0 -1
- package/dist/components/AddressBar/index.d.ts +0 -2
- package/dist/components/AddressBar/index.d.ts.map +0 -1
- package/dist/components/AddressBar/index.js +0 -2
- package/dist/components/CodeInput/CodeInput.vue.d.ts +0 -101
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +0 -1
- package/dist/components/CodeInput/CodeInput.vue.js +0 -10
- package/dist/components/CodeInput/CodeInput.vue.js.map +0 -1
- package/dist/components/CodeInput/CodeInput.vue.script.js +0 -294
- package/dist/components/CodeInput/CodeInput.vue.script.js.map +0 -1
- package/dist/components/CodeInput/codeVariableWidget.d.ts +0 -17
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +0 -1
- package/dist/components/CodeInput/codeVariableWidget.js +0 -135
- package/dist/components/CodeInput/codeVariableWidget.js.map +0 -1
- package/dist/components/CodeInput/index.d.ts +0 -2
- package/dist/components/CodeInput/index.d.ts.map +0 -1
- package/dist/components/CodeInput/index.js +0 -2
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +0 -31
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +0 -7
- package/dist/components/CommandPalette/CommandActionForm.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.script.js +0 -42
- package/dist/components/CommandPalette/CommandActionForm.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts +0 -15
- package/dist/components/CommandPalette/CommandActionInput.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.js +0 -7
- package/dist/components/CommandPalette/CommandActionInput.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandActionInput.vue.script.js +0 -55
- package/dist/components/CommandPalette/CommandActionInput.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts +0 -10
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.script.js +0 -78
- package/dist/components/CommandPalette/CommandPaletteCollection.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts +0 -16
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.script.js +0 -104
- package/dist/components/CommandPalette/CommandPaletteExample.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts +0 -10
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.script.js +0 -181
- package/dist/components/CommandPalette/CommandPaletteImport.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts +0 -20
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +0 -9
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.script.js +0 -108
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts +0 -16
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.script.js +0 -108
- package/dist/components/CommandPalette/CommandPaletteServer.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts +0 -10
- package/dist/components/CommandPalette/CommandPaletteTag.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteTag.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteTag.vue.script.js +0 -70
- package/dist/components/CommandPalette/CommandPaletteTag.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts +0 -10
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +0 -7
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js.map +0 -1
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.script.js +0 -49
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +0 -217
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +0 -9
- package/dist/components/CommandPalette/TheCommandPalette.vue.js.map +0 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.script.js +0 -323
- package/dist/components/CommandPalette/TheCommandPalette.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts +0 -14
- package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +0 -7
- package/dist/components/CommandPalette/WatchModeToggle.vue.js.map +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.script.js +0 -40
- package/dist/components/CommandPalette/WatchModeToggle.vue.script.js.map +0 -1
- package/dist/components/CommandPalette/index.d.ts +0 -2
- package/dist/components/CommandPalette/index.d.ts.map +0 -1
- package/dist/components/CommandPalette/index.js +0 -2
- package/dist/components/DataTable/DataTable.vue.d.ts +0 -23
- package/dist/components/DataTable/DataTable.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTable.vue.js +0 -7
- package/dist/components/DataTable/DataTable.vue.js.map +0 -1
- package/dist/components/DataTable/DataTable.vue.script.js +0 -30
- package/dist/components/DataTable/DataTable.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts +0 -20
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableCell.vue.js +0 -7
- package/dist/components/DataTable/DataTableCell.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableCell.vue.script.js +0 -21
- package/dist/components/DataTable/DataTableCell.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts +0 -15
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +0 -7
- package/dist/components/DataTable/DataTableCheckbox.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.script.js +0 -43
- package/dist/components/DataTable/DataTableCheckbox.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableHeader.vue.d.ts +0 -14
- package/dist/components/DataTable/DataTableHeader.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableHeader.vue.js +0 -7
- package/dist/components/DataTable/DataTableHeader.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableHeader.vue.script.js +0 -20
- package/dist/components/DataTable/DataTableHeader.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts +0 -54
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableInput.vue.js +0 -9
- package/dist/components/DataTable/DataTableInput.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableInput.vue.script.js +0 -164
- package/dist/components/DataTable/DataTableInput.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts +0 -17
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +0 -7
- package/dist/components/DataTable/DataTableInputSelect.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.script.js +0 -150
- package/dist/components/DataTable/DataTableInputSelect.vue.script.js.map +0 -1
- package/dist/components/DataTable/DataTableRow.vue.d.ts +0 -14
- package/dist/components/DataTable/DataTableRow.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableRow.vue.js +0 -13
- package/dist/components/DataTable/DataTableRow.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +0 -1
- package/dist/components/DataTable/DataTableText.vue.js +0 -7
- package/dist/components/DataTable/DataTableText.vue.js.map +0 -1
- package/dist/components/DataTable/DataTableText.vue.script.js +0 -20
- package/dist/components/DataTable/DataTableText.vue.script.js.map +0 -1
- package/dist/components/DataTable/index.d.ts +0 -9
- package/dist/components/DataTable/index.d.ts.map +0 -1
- package/dist/components/DataTable/index.js +0 -9
- package/dist/components/EmptyState.vue.d.ts +0 -4
- package/dist/components/EmptyState.vue.d.ts.map +0 -1
- package/dist/components/EmptyState.vue.js +0 -9
- package/dist/components/EmptyState.vue.js.map +0 -1
- package/dist/components/EmptyState.vue.script.js +0 -41
- package/dist/components/EmptyState.vue.script.js.map +0 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +0 -4
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +0 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +0 -7
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js.map +0 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.script.js +0 -111
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.script.js.map +0 -1
- package/dist/components/Form/Form.vue.d.ts +0 -26
- package/dist/components/Form/Form.vue.d.ts.map +0 -1
- package/dist/components/Form/Form.vue.js +0 -7
- package/dist/components/Form/Form.vue.js.map +0 -1
- package/dist/components/Form/Form.vue.script.js +0 -82
- package/dist/components/Form/Form.vue.script.js.map +0 -1
- package/dist/components/Form/LabelInput.vue.d.ts.map +0 -1
- package/dist/components/Form/LabelInput.vue.js +0 -9
- package/dist/components/Form/LabelInput.vue.js.map +0 -1
- package/dist/components/Form/LabelInput.vue.script.js +0 -39
- package/dist/components/Form/LabelInput.vue.script.js.map +0 -1
- package/dist/components/HttpMethod/index.js +0 -2
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts +0 -8
- package/dist/components/ImportCollection/DropEventListener.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/DropEventListener.vue.js +0 -7
- package/dist/components/ImportCollection/DropEventListener.vue.js.map +0 -1
- package/dist/components/ImportCollection/DropEventListener.vue.script.js +0 -91
- package/dist/components/ImportCollection/DropEventListener.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts +0 -14
- package/dist/components/ImportCollection/ImportCollectionListener.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js +0 -7
- package/dist/components/ImportCollection/ImportCollectionListener.vue.js.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionListener.vue.script.js +0 -102
- package/dist/components/ImportCollection/ImportCollectionListener.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts +0 -13
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +0 -8
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js.map +0 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.script.js +0 -206
- package/dist/components/ImportCollection/ImportCollectionModal.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts +0 -13
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +0 -7
- package/dist/components/ImportCollection/ImportNowButton.vue.js.map +0 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.script.js +0 -82
- package/dist/components/ImportCollection/ImportNowButton.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts +0 -8
- package/dist/components/ImportCollection/PasteEventListener.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.js +0 -7
- package/dist/components/ImportCollection/PasteEventListener.vue.js.map +0 -1
- package/dist/components/ImportCollection/PasteEventListener.vue.script.js +0 -31
- package/dist/components/ImportCollection/PasteEventListener.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts +0 -7
- package/dist/components/ImportCollection/PrefetchError.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/PrefetchError.vue.js +0 -7
- package/dist/components/ImportCollection/PrefetchError.vue.js.map +0 -1
- package/dist/components/ImportCollection/PrefetchError.vue.script.js +0 -32
- package/dist/components/ImportCollection/PrefetchError.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts +0 -8
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +0 -7
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js.map +0 -1
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.script.js +0 -21
- package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts +0 -4
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +0 -7
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js.map +0 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.script.js +0 -114
- package/dist/components/ImportCollection/WorkspaceSelector.vue.script.js.map +0 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +0 -39
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +0 -1
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +0 -109
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js.map +0 -1
- package/dist/components/ImportCollection/index.d.ts +0 -2
- package/dist/components/ImportCollection/index.d.ts.map +0 -1
- package/dist/components/ImportCollection/index.js +0 -2
- package/dist/components/ImportCollection/utils/get-openapi-version.d.ts +0 -5
- package/dist/components/ImportCollection/utils/get-openapi-version.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/get-openapi-version.js +0 -26
- package/dist/components/ImportCollection/utils/get-openapi-version.js.map +0 -1
- package/dist/components/ImportCollection/utils/import-collection.d.ts +0 -12
- package/dist/components/ImportCollection/utils/import-collection.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/import-collection.js +0 -23
- package/dist/components/ImportCollection/utils/import-collection.js.map +0 -1
- package/dist/components/ImportCollection/utils/is-document.d.ts +0 -3
- package/dist/components/ImportCollection/utils/is-document.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/is-document.js +0 -12
- package/dist/components/ImportCollection/utils/is-document.js.map +0 -1
- package/dist/components/ImportCollection/utils/is-url.d.ts +0 -5
- package/dist/components/ImportCollection/utils/is-url.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/is-url.js +0 -14
- package/dist/components/ImportCollection/utils/is-url.js.map +0 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +0 -6
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +0 -13
- package/dist/components/ImportCollection/utils/workspace-store-is-empty.js.map +0 -1
- package/dist/components/OpenApiClientButton.vue.d.ts.map +0 -1
- package/dist/components/OpenApiClientButton.vue.js.map +0 -1
- package/dist/components/OpenApiClientButton.vue.script.js.map +0 -1
- package/dist/components/Search/useSearch.d.ts +0 -33
- package/dist/components/Search/useSearch.d.ts.map +0 -1
- package/dist/components/Search/useSearch.js +0 -110
- package/dist/components/Search/useSearch.js.map +0 -1
- package/dist/components/Server/ServerDropdown.vue.d.ts +0 -12
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +0 -1
- package/dist/components/Server/ServerDropdown.vue.js +0 -7
- package/dist/components/Server/ServerDropdown.vue.js.map +0 -1
- package/dist/components/Server/ServerDropdown.vue.script.js +0 -133
- package/dist/components/Server/ServerDropdown.vue.script.js.map +0 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +0 -19
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +0 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +0 -9
- package/dist/components/Server/ServerDropdownItem.vue.js.map +0 -1
- package/dist/components/Server/ServerDropdownItem.vue.script.js +0 -90
- package/dist/components/Server/ServerDropdownItem.vue.script.js.map +0 -1
- package/dist/components/Server/ServerSelector.vue.d.ts +0 -17
- package/dist/components/Server/ServerSelector.vue.d.ts.map +0 -1
- package/dist/components/Server/ServerSelector.vue.js +0 -7
- package/dist/components/Server/ServerSelector.vue.js.map +0 -1
- package/dist/components/Server/ServerSelector.vue.script.js +0 -87
- package/dist/components/Server/ServerSelector.vue.script.js.map +0 -1
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts +0 -4
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +0 -1
- package/dist/components/SideNav/DownloadAppButton.vue.js +0 -9
- package/dist/components/SideNav/DownloadAppButton.vue.js.map +0 -1
- package/dist/components/SideNav/DownloadAppButton.vue.script.js +0 -31
- package/dist/components/SideNav/DownloadAppButton.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideHelp.vue.d.ts +0 -4
- package/dist/components/SideNav/SideHelp.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideHelp.vue.js +0 -7
- package/dist/components/SideNav/SideHelp.vue.js.map +0 -1
- package/dist/components/SideNav/SideHelp.vue.script.js +0 -102
- package/dist/components/SideNav/SideHelp.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideNav.vue.d.ts +0 -4
- package/dist/components/SideNav/SideNav.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideNav.vue.js +0 -7
- package/dist/components/SideNav/SideNav.vue.js.map +0 -1
- package/dist/components/SideNav/SideNav.vue.script.js +0 -80
- package/dist/components/SideNav/SideNav.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideNavGroup.vue.d.ts +0 -14
- package/dist/components/SideNav/SideNavGroup.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideNavGroup.vue.js +0 -7
- package/dist/components/SideNav/SideNavGroup.vue.js.map +0 -1
- package/dist/components/SideNav/SideNavGroup.vue.script.js +0 -16
- package/dist/components/SideNav/SideNavGroup.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideNavLink.vue.d.ts +0 -23
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideNavLink.vue.js +0 -7
- package/dist/components/SideNav/SideNavLink.vue.js.map +0 -1
- package/dist/components/SideNav/SideNavLink.vue.script.js +0 -32
- package/dist/components/SideNav/SideNavLink.vue.script.js.map +0 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +0 -21
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +0 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +0 -7
- package/dist/components/SideNav/SideNavRouterLink.vue.js.map +0 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.script.js +0 -34
- package/dist/components/SideNav/SideNavRouterLink.vue.script.js.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts +0 -14
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +0 -7
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.script.js +0 -56
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.script.js.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +0 -7
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js.map +0 -1
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.script.js +0 -31
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.script.js.map +0 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts +0 -23
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/Sidebar.vue.js +0 -9
- package/dist/components/Sidebar/Sidebar.vue.js.map +0 -1
- package/dist/components/Sidebar/Sidebar.vue.script.js +0 -71
- package/dist/components/Sidebar/Sidebar.vue.script.js.map +0 -1
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +0 -7
- package/dist/components/Sidebar/SidebarButton.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarButton.vue.script.js +0 -36
- package/dist/components/Sidebar/SidebarButton.vue.script.js.map +0 -1
- package/dist/components/Sidebar/SidebarList.vue.d.ts +0 -14
- package/dist/components/Sidebar/SidebarList.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarList.vue.js +0 -13
- package/dist/components/Sidebar/SidebarList.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +0 -44
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +0 -10
- package/dist/components/Sidebar/SidebarListElement.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarListElement.vue.script.js +0 -128
- package/dist/components/Sidebar/SidebarListElement.vue.script.js.map +0 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts +0 -21
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +0 -7
- package/dist/components/Sidebar/SidebarListElementActions.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.script.js +0 -97
- package/dist/components/Sidebar/SidebarListElementActions.vue.script.js.map +0 -1
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts +0 -4
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +0 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +0 -7
- package/dist/components/Sidebar/SidebarToggle.vue.js.map +0 -1
- package/dist/components/Sidebar/SidebarToggle.vue.script.js +0 -47
- package/dist/components/Sidebar/SidebarToggle.vue.script.js.map +0 -1
- package/dist/components/Sidebar/index.d.ts +0 -2
- package/dist/components/Sidebar/index.d.ts.map +0 -1
- package/dist/components/Sidebar/index.js +0 -2
- package/dist/components/TopNav/TopNav.vue.d.ts +0 -10
- package/dist/components/TopNav/TopNav.vue.d.ts.map +0 -1
- package/dist/components/TopNav/TopNav.vue.js +0 -7
- package/dist/components/TopNav/TopNav.vue.js.map +0 -1
- package/dist/components/TopNav/TopNav.vue.script.js +0 -232
- package/dist/components/TopNav/TopNav.vue.script.js.map +0 -1
- package/dist/components/TopNav/TopNavItem.vue.d.ts +0 -24
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +0 -1
- package/dist/components/TopNav/TopNavItem.vue.js +0 -9
- package/dist/components/TopNav/TopNavItem.vue.js.map +0 -1
- package/dist/components/TopNav/TopNavItem.vue.script.js +0 -129
- package/dist/components/TopNav/TopNavItem.vue.script.js.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts +0 -33
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +0 -7
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.script.js +0 -84
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.script.js.map +0 -1
- package/dist/components/ViewLayout/index.d.ts +0 -2
- package/dist/components/ViewLayout/index.d.ts.map +0 -1
- package/dist/components/ViewLayout/index.js +0 -2
- package/dist/components/index.d.ts +0 -4
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -4
- package/dist/constants.d.ts +0 -26
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -27
- package/dist/constants.js.map +0 -1
- package/dist/data/httpHeaders.d.ts +0 -7
- package/dist/data/httpHeaders.d.ts.map +0 -1
- package/dist/data/httpHeaders.js +0 -539
- package/dist/data/httpHeaders.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -5
- package/dist/hooks/useClientConfig.d.ts +0 -198
- package/dist/hooks/useClientConfig.d.ts.map +0 -1
- package/dist/hooks/useClientConfig.js +0 -23
- package/dist/hooks/useClientConfig.js.map +0 -1
- package/dist/hooks/useFileDialog.d.ts.map +0 -1
- package/dist/hooks/useFileDialog.js.map +0 -1
- package/dist/hooks/useLayout.d.ts +0 -17
- package/dist/hooks/useLayout.d.ts.map +0 -1
- package/dist/hooks/useLayout.js +0 -13
- package/dist/hooks/useLayout.js.map +0 -1
- package/dist/hooks/useResponseBody.d.ts +0 -19
- package/dist/hooks/useResponseBody.d.ts.map +0 -1
- package/dist/hooks/useResponseBody.js +0 -32
- package/dist/hooks/useResponseBody.js.map +0 -1
- package/dist/hooks/useSidebar.d.ts +0 -26
- package/dist/hooks/useSidebar.d.ts.map +0 -1
- package/dist/hooks/useSidebar.js +0 -36
- package/dist/hooks/useSidebar.js.map +0 -1
- package/dist/layouts/App/ApiClientApp.vue.d.ts +0 -14
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +0 -1
- package/dist/layouts/App/ApiClientApp.vue.js +0 -8
- package/dist/layouts/App/ApiClientApp.vue.js.map +0 -1
- package/dist/layouts/App/ApiClientApp.vue.script.js +0 -80
- package/dist/layouts/App/ApiClientApp.vue.script.js.map +0 -1
- package/dist/layouts/App/MainLayout.vue.d.ts +0 -14
- package/dist/layouts/App/MainLayout.vue.d.ts.map +0 -1
- package/dist/layouts/App/MainLayout.vue.js +0 -7
- package/dist/layouts/App/MainLayout.vue.js.map +0 -1
- package/dist/layouts/App/MainLayout.vue.script.js +0 -22
- package/dist/layouts/App/MainLayout.vue.script.js.map +0 -1
- package/dist/layouts/App/create-api-client-app.d.ts +0 -4059
- package/dist/layouts/App/create-api-client-app.d.ts.map +0 -1
- package/dist/layouts/App/create-api-client-app.js +0 -36
- package/dist/layouts/App/create-api-client-app.js.map +0 -1
- package/dist/layouts/App/hotkeys.d.ts +0 -6
- package/dist/layouts/App/hotkeys.d.ts.map +0 -1
- package/dist/layouts/App/hotkeys.js +0 -74
- package/dist/layouts/App/hotkeys.js.map +0 -1
- package/dist/layouts/App/index.d.ts +0 -3
- package/dist/layouts/App/index.d.ts.map +0 -1
- package/dist/layouts/App/index.js +0 -3
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts +0 -4
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +0 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +0 -7
- package/dist/layouts/Modal/ApiClientModal.vue.js.map +0 -1
- package/dist/layouts/Modal/ApiClientModal.vue.script.js +0 -41
- package/dist/layouts/Modal/ApiClientModal.vue.script.js.map +0 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +0 -12
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +0 -1
- package/dist/layouts/Modal/create-api-client-modal.js +0 -34
- package/dist/layouts/Modal/create-api-client-modal.js.map +0 -1
- package/dist/layouts/Modal/index.d.ts +0 -3
- package/dist/layouts/Modal/index.d.ts.map +0 -1
- package/dist/layouts/Modal/index.js +0 -2
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts +0 -4
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +0 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +0 -8
- package/dist/layouts/Web/ApiClientWeb.vue.js.map +0 -1
- package/dist/layouts/Web/ApiClientWeb.vue.script.js +0 -68
- package/dist/layouts/Web/ApiClientWeb.vue.script.js.map +0 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +0 -4056
- package/dist/layouts/Web/create-api-client-web.d.ts.map +0 -1
- package/dist/layouts/Web/create-api-client-web.js +0 -33
- package/dist/layouts/Web/create-api-client-web.js.map +0 -1
- package/dist/layouts/Web/index.d.ts +0 -3
- package/dist/layouts/Web/index.d.ts.map +0 -1
- package/dist/layouts/Web/index.js +0 -3
- package/dist/libs/create-client.d.ts +0 -4127
- package/dist/libs/create-client.d.ts.map +0 -1
- package/dist/libs/create-client.js +0 -178
- package/dist/libs/create-client.js.map +0 -1
- package/dist/libs/electron.d.ts +0 -5
- package/dist/libs/electron.d.ts.map +0 -1
- package/dist/libs/electron.js +0 -9
- package/dist/libs/electron.js.map +0 -1
- package/dist/libs/env-helpers.d.ts +0 -17
- package/dist/libs/env-helpers.d.ts.map +0 -1
- package/dist/libs/env-helpers.js +0 -9
- package/dist/libs/env-helpers.js.map +0 -1
- package/dist/libs/environment-parser.d.ts +0 -8
- package/dist/libs/environment-parser.d.ts.map +0 -1
- package/dist/libs/environment-parser.js +0 -19
- package/dist/libs/environment-parser.js.map +0 -1
- package/dist/libs/errors.d.ts +0 -23
- package/dist/libs/errors.d.ts.map +0 -1
- package/dist/libs/errors.js +0 -34
- package/dist/libs/errors.js.map +0 -1
- package/dist/libs/event-bus.d.ts +0 -41
- package/dist/libs/event-bus.d.ts.map +0 -1
- package/dist/libs/event-bus.js +0 -43
- package/dist/libs/event-bus.js.map +0 -1
- package/dist/libs/extractAttachmentFilename.d.ts +0 -5
- package/dist/libs/extractAttachmentFilename.d.ts.map +0 -1
- package/dist/libs/extractAttachmentFilename.js +0 -23
- package/dist/libs/extractAttachmentFilename.js.map +0 -1
- package/dist/libs/find-request.d.ts +0 -75
- package/dist/libs/find-request.d.ts.map +0 -1
- package/dist/libs/find-request.js +0 -40
- package/dist/libs/find-request.js.map +0 -1
- package/dist/libs/get-request-uid-by-path-method.d.ts +0 -7
- package/dist/libs/get-request-uid-by-path-method.d.ts.map +0 -1
- package/dist/libs/get-request-uid-by-path-method.js +0 -19
- package/dist/libs/get-request-uid-by-path-method.js.map +0 -1
- package/dist/libs/getOpenApiDocumentDetails.d.ts +0 -10
- package/dist/libs/getOpenApiDocumentDetails.d.ts.map +0 -1
- package/dist/libs/getOpenApiDocumentDetails.js +0 -45
- package/dist/libs/getOpenApiDocumentDetails.js.map +0 -1
- package/dist/libs/hot-keys.d.ts +0 -35
- package/dist/libs/hot-keys.d.ts.map +0 -1
- package/dist/libs/hot-keys.js +0 -92
- package/dist/libs/hot-keys.js.map +0 -1
- package/dist/libs/importers/curl.d.ts +0 -27
- package/dist/libs/importers/curl.d.ts.map +0 -1
- package/dist/libs/importers/curl.js +0 -54
- package/dist/libs/importers/curl.js.map +0 -1
- package/dist/libs/importers/index.d.ts +0 -2
- package/dist/libs/importers/index.d.ts.map +0 -1
- package/dist/libs/importers/index.js +0 -2
- package/dist/libs/index.d.ts +0 -15
- package/dist/libs/index.d.ts.map +0 -1
- package/dist/libs/index.js +0 -17
- package/dist/libs/isUrl.d.ts +0 -3
- package/dist/libs/isUrl.d.ts.map +0 -1
- package/dist/libs/isUrl.js +0 -12
- package/dist/libs/isUrl.js.map +0 -1
- package/dist/libs/local-storage.d.ts +0 -9
- package/dist/libs/local-storage.d.ts.map +0 -1
- package/dist/libs/local-storage.js +0 -40
- package/dist/libs/local-storage.js.map +0 -1
- package/dist/libs/normalize-headers.d.ts +0 -14
- package/dist/libs/normalize-headers.d.ts.map +0 -1
- package/dist/libs/normalize-headers.js +0 -56
- package/dist/libs/normalize-headers.js.map +0 -1
- package/dist/libs/parse-curl.d.ts.map +0 -1
- package/dist/libs/parse-curl.js.map +0 -1
- package/dist/libs/postman.d.ts +0 -11
- package/dist/libs/postman.d.ts.map +0 -1
- package/dist/libs/postman.js +0 -40
- package/dist/libs/postman.js.map +0 -1
- package/dist/libs/send-request/build-request-security.d.ts +0 -19
- package/dist/libs/send-request/build-request-security.d.ts.map +0 -1
- package/dist/libs/send-request/build-request-security.js +0 -41
- package/dist/libs/send-request/build-request-security.js.map +0 -1
- package/dist/libs/send-request/create-fetch-body.d.ts +0 -18
- package/dist/libs/send-request/create-fetch-body.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-body.js +0 -44
- package/dist/libs/send-request/create-fetch-body.js.map +0 -1
- package/dist/libs/send-request/create-fetch-headers.d.ts +0 -4
- package/dist/libs/send-request/create-fetch-headers.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-headers.js +0 -15
- package/dist/libs/send-request/create-fetch-headers.js.map +0 -1
- package/dist/libs/send-request/create-fetch-query-params.d.ts +0 -11
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-query-params.js +0 -43
- package/dist/libs/send-request/create-fetch-query-params.js.map +0 -1
- package/dist/libs/send-request/create-request-operation.d.ts +0 -32
- package/dist/libs/send-request/create-request-operation.d.ts.map +0 -1
- package/dist/libs/send-request/create-request-operation.js +0 -172
- package/dist/libs/send-request/create-request-operation.js.map +0 -1
- package/dist/libs/send-request/decode-buffer.d.ts +0 -3
- package/dist/libs/send-request/decode-buffer.d.ts.map +0 -1
- package/dist/libs/send-request/decode-buffer.js +0 -13
- package/dist/libs/send-request/decode-buffer.js.map +0 -1
- package/dist/libs/send-request/index.d.ts +0 -4
- package/dist/libs/send-request/index.d.ts.map +0 -1
- package/dist/libs/send-request/index.js +0 -4
- package/dist/libs/send-request/set-request-cookies.d.ts +0 -27
- package/dist/libs/send-request/set-request-cookies.d.ts.map +0 -1
- package/dist/libs/send-request/set-request-cookies.js +0 -82
- package/dist/libs/send-request/set-request-cookies.js.map +0 -1
- package/dist/libs/string-template.d.ts +0 -21
- package/dist/libs/string-template.d.ts.map +0 -1
- package/dist/libs/string-template.js +0 -64
- package/dist/libs/string-template.js.map +0 -1
- package/dist/libs/validate-parameters.d.ts +0 -14
- package/dist/libs/validate-parameters.d.ts.map +0 -1
- package/dist/libs/validate-parameters.js +0 -35
- package/dist/libs/validate-parameters.js.map +0 -1
- package/dist/plugins/hooks/usePluginManager.d.ts +0 -8
- package/dist/plugins/hooks/usePluginManager.d.ts.map +0 -1
- package/dist/plugins/hooks/usePluginManager.js +0 -16
- package/dist/plugins/hooks/usePluginManager.js.map +0 -1
- package/dist/plugins/index.d.ts +0 -3
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/index.js +0 -3
- package/dist/plugins/plugin-manager.d.ts +0 -34
- package/dist/plugins/plugin-manager.d.ts.map +0 -1
- package/dist/plugins/plugin-manager.js +0 -38
- package/dist/plugins/plugin-manager.js.map +0 -1
- package/dist/routes.d.ts +0 -19
- package/dist/routes.d.ts.map +0 -1
- package/dist/routes.js +0 -225
- package/dist/routes.js.map +0 -1
- package/dist/store/active-entities.d.ts +0 -387
- package/dist/store/active-entities.d.ts.map +0 -1
- package/dist/store/active-entities.js +0 -139
- package/dist/store/active-entities.js.map +0 -1
- package/dist/store/collections.d.ts +0 -625
- package/dist/store/collections.d.ts.map +0 -1
- package/dist/store/collections.js +0 -76
- package/dist/store/collections.js.map +0 -1
- package/dist/store/cookies.d.ts +0 -69
- package/dist/store/cookies.d.ts.map +0 -1
- package/dist/store/cookies.js +0 -16
- package/dist/store/cookies.js.map +0 -1
- package/dist/store/environment.d.ts +0 -75
- package/dist/store/environment.d.ts.map +0 -1
- package/dist/store/environment.js +0 -38
- package/dist/store/environment.js.map +0 -1
- package/dist/store/events.d.ts +0 -35
- package/dist/store/events.d.ts.map +0 -1
- package/dist/store/events.js +0 -17
- package/dist/store/events.js.map +0 -1
- package/dist/store/import-spec.d.ts +0 -38
- package/dist/store/import-spec.d.ts.map +0 -1
- package/dist/store/import-spec.js +0 -56
- package/dist/store/import-spec.js.map +0 -1
- package/dist/store/index.d.ts +0 -3
- package/dist/store/index.d.ts.map +0 -1
- package/dist/store/index.js +0 -3
- package/dist/store/request-example.d.ts +0 -1022
- package/dist/store/request-example.d.ts.map +0 -1
- package/dist/store/request-example.js +0 -43
- package/dist/store/request-example.js.map +0 -1
- package/dist/store/requests.d.ts +0 -675
- package/dist/store/requests.d.ts.map +0 -1
- package/dist/store/requests.js +0 -104
- package/dist/store/requests.js.map +0 -1
- package/dist/store/router-params.d.ts +0 -18
- package/dist/store/router-params.d.ts.map +0 -1
- package/dist/store/router-params.js +0 -27
- package/dist/store/router-params.js.map +0 -1
- package/dist/store/security-schemes.d.ts +0 -942
- package/dist/store/security-schemes.d.ts.map +0 -1
- package/dist/store/security-schemes.js +0 -45
- package/dist/store/security-schemes.js.map +0 -1
- package/dist/store/servers.d.ts +0 -122
- package/dist/store/servers.d.ts.map +0 -1
- package/dist/store/servers.js +0 -41
- package/dist/store/servers.js.map +0 -1
- package/dist/store/store-context.d.ts +0 -26
- package/dist/store/store-context.d.ts.map +0 -1
- package/dist/store/store.d.ts +0 -4055
- package/dist/store/store.d.ts.map +0 -1
- package/dist/store/store.js +0 -180
- package/dist/store/store.js.map +0 -1
- package/dist/store/tags.d.ts +0 -176
- package/dist/store/tags.d.ts.map +0 -1
- package/dist/store/tags.js +0 -54
- package/dist/store/tags.js.map +0 -1
- package/dist/store/workspace.d.ts +0 -232
- package/dist/store/workspace.d.ts.map +0 -1
- package/dist/store/workspace.js +0 -57
- package/dist/store/workspace.js.map +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -0
- package/dist/views/Collection/Collection.vue.d.ts +0 -4
- package/dist/views/Collection/Collection.vue.d.ts.map +0 -1
- package/dist/views/Collection/Collection.vue.js +0 -7
- package/dist/views/Collection/Collection.vue.js.map +0 -1
- package/dist/views/Collection/Collection.vue.script.js +0 -46
- package/dist/views/Collection/Collection.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionAuthentication.vue.js +0 -9
- package/dist/views/Collection/CollectionAuthentication.vue.js.map +0 -1
- package/dist/views/Collection/CollectionAuthentication.vue.script.js +0 -52
- package/dist/views/Collection/CollectionAuthentication.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionCookies.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionCookies.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionCookies.vue.js +0 -7
- package/dist/views/Collection/CollectionCookies.vue.js.map +0 -1
- package/dist/views/Collection/CollectionCookies.vue.script.js +0 -18
- package/dist/views/Collection/CollectionCookies.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionEnvironment.vue.js +0 -8
- package/dist/views/Collection/CollectionEnvironment.vue.js.map +0 -1
- package/dist/views/Collection/CollectionEnvironment.vue.script.js +0 -238
- package/dist/views/Collection/CollectionEnvironment.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionInfoForm.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionInfoForm.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionInfoForm.vue.js +0 -9
- package/dist/views/Collection/CollectionInfoForm.vue.js.map +0 -1
- package/dist/views/Collection/CollectionInfoForm.vue.script.js +0 -73
- package/dist/views/Collection/CollectionInfoForm.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionNavigation.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionNavigation.vue.js +0 -7
- package/dist/views/Collection/CollectionNavigation.vue.js.map +0 -1
- package/dist/views/Collection/CollectionNavigation.vue.script.js +0 -75
- package/dist/views/Collection/CollectionNavigation.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionOverview.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionOverview.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionOverview.vue.js +0 -7
- package/dist/views/Collection/CollectionOverview.vue.js.map +0 -1
- package/dist/views/Collection/CollectionOverview.vue.script.js +0 -42
- package/dist/views/Collection/CollectionOverview.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionScripts.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionScripts.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionScripts.vue.js +0 -7
- package/dist/views/Collection/CollectionScripts.vue.js.map +0 -1
- package/dist/views/Collection/CollectionScripts.vue.script.js +0 -18
- package/dist/views/Collection/CollectionScripts.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionServerForm.vue.d.ts +0 -11
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionServerForm.vue.js +0 -7
- package/dist/views/Collection/CollectionServerForm.vue.js.map +0 -1
- package/dist/views/Collection/CollectionServerForm.vue.script.js +0 -76
- package/dist/views/Collection/CollectionServerForm.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionServers.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionServers.vue.js +0 -7
- package/dist/views/Collection/CollectionServers.vue.js.map +0 -1
- package/dist/views/Collection/CollectionServers.vue.script.js +0 -95
- package/dist/views/Collection/CollectionServers.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionSettings.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionSettings.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionSettings.vue.js +0 -7
- package/dist/views/Collection/CollectionSettings.vue.js.map +0 -1
- package/dist/views/Collection/CollectionSettings.vue.script.js +0 -87
- package/dist/views/Collection/CollectionSettings.vue.script.js.map +0 -1
- package/dist/views/Collection/CollectionSync.vue.d.ts +0 -4
- package/dist/views/Collection/CollectionSync.vue.d.ts.map +0 -1
- package/dist/views/Collection/CollectionSync.vue.js +0 -7
- package/dist/views/Collection/CollectionSync.vue.js.map +0 -1
- package/dist/views/Collection/CollectionSync.vue.script.js +0 -18
- package/dist/views/Collection/CollectionSync.vue.script.js.map +0 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +0 -14
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +0 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.js +0 -9
- package/dist/views/Collection/components/EnvironmentForm.vue.js.map +0 -1
- package/dist/views/Collection/components/EnvironmentForm.vue.script.js +0 -284
- package/dist/views/Collection/components/EnvironmentForm.vue.script.js.map +0 -1
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +0 -17
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts.map +0 -1
- package/dist/views/Collection/components/MarkdownInput.vue.js +0 -9
- package/dist/views/Collection/components/MarkdownInput.vue.js.map +0 -1
- package/dist/views/Collection/components/MarkdownInput.vue.script.js +0 -92
- package/dist/views/Collection/components/MarkdownInput.vue.script.js.map +0 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +0 -16
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +0 -7
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js.map +0 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.script.js +0 -74
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.script.js.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts +0 -28
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +0 -66
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +0 -16
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +0 -86
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js.map +0 -1
- package/dist/views/Components/CodeSnippet/index.d.ts +0 -5
- package/dist/views/Components/CodeSnippet/index.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/index.js +0 -5
- package/dist/views/Cookies/CookieForm.vue.d.ts +0 -4
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +0 -1
- package/dist/views/Cookies/CookieForm.vue.js +0 -7
- package/dist/views/Cookies/CookieForm.vue.js.map +0 -1
- package/dist/views/Cookies/CookieForm.vue.script.js +0 -50
- package/dist/views/Cookies/CookieForm.vue.script.js.map +0 -1
- package/dist/views/Cookies/CookieModal.vue.d.ts +0 -22
- package/dist/views/Cookies/CookieModal.vue.d.ts.map +0 -1
- package/dist/views/Cookies/CookieModal.vue.js +0 -9
- package/dist/views/Cookies/CookieModal.vue.js.map +0 -1
- package/dist/views/Cookies/CookieModal.vue.script.js +0 -83
- package/dist/views/Cookies/CookieModal.vue.script.js.map +0 -1
- package/dist/views/Cookies/CookieRaw.vue.d.ts +0 -4
- package/dist/views/Cookies/CookieRaw.vue.d.ts.map +0 -1
- package/dist/views/Cookies/Cookies.vue.d.ts +0 -4
- package/dist/views/Cookies/Cookies.vue.d.ts.map +0 -1
- package/dist/views/Cookies/Cookies.vue.js +0 -7
- package/dist/views/Cookies/Cookies.vue.js.map +0 -1
- package/dist/views/Cookies/Cookies.vue.script.js +0 -156
- package/dist/views/Cookies/Cookies.vue.script.js.map +0 -1
- package/dist/views/Environment/Environment.vue.d.ts +0 -4
- package/dist/views/Environment/Environment.vue.d.ts.map +0 -1
- package/dist/views/Environment/Environment.vue.js +0 -7
- package/dist/views/Environment/Environment.vue.js.map +0 -1
- package/dist/views/Environment/Environment.vue.script.js +0 -384
- package/dist/views/Environment/Environment.vue.script.js.map +0 -1
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts +0 -15
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +0 -1
- package/dist/views/Environment/EnvironmentColorModal.vue.js +0 -7
- package/dist/views/Environment/EnvironmentColorModal.vue.js.map +0 -1
- package/dist/views/Environment/EnvironmentColorModal.vue.script.js +0 -47
- package/dist/views/Environment/EnvironmentColorModal.vue.script.js.map +0 -1
- package/dist/views/Environment/EnvironmentColors.vue.d.ts +0 -14
- package/dist/views/Environment/EnvironmentColors.vue.d.ts.map +0 -1
- package/dist/views/Environment/EnvironmentColors.vue.js +0 -7
- package/dist/views/Environment/EnvironmentColors.vue.js.map +0 -1
- package/dist/views/Environment/EnvironmentColors.vue.script.js +0 -126
- package/dist/views/Environment/EnvironmentColors.vue.script.js.map +0 -1
- package/dist/views/Environment/EnvironmentModal.vue.d.ts +0 -27
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +0 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +0 -7
- package/dist/views/Environment/EnvironmentModal.vue.js.map +0 -1
- package/dist/views/Environment/EnvironmentModal.vue.script.js +0 -122
- package/dist/views/Environment/EnvironmentModal.vue.script.js.map +0 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +0 -22
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +0 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +0 -7
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js.map +0 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.script.js +0 -133
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.script.js.map +0 -1
- package/dist/views/Environment/handle-drag.d.ts +0 -13
- package/dist/views/Environment/handle-drag.d.ts.map +0 -1
- package/dist/views/Environment/handle-drag.js +0 -38
- package/dist/views/Environment/handle-drag.js.map +0 -1
- package/dist/views/Request/Request.vue.d.ts +0 -21
- package/dist/views/Request/Request.vue.d.ts.map +0 -1
- package/dist/views/Request/Request.vue.js +0 -9
- package/dist/views/Request/Request.vue.js.map +0 -1
- package/dist/views/Request/Request.vue.script.js +0 -117
- package/dist/views/Request/Request.vue.script.js.map +0 -1
- package/dist/views/Request/RequestRoot.vue.d.ts +0 -14
- package/dist/views/Request/RequestRoot.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestRoot.vue.js +0 -9
- package/dist/views/Request/RequestRoot.vue.js.map +0 -1
- package/dist/views/Request/RequestRoot.vue.script.js +0 -158
- package/dist/views/Request/RequestRoot.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts +0 -22
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.script.js +0 -52
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +0 -31
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js +0 -214
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +0 -10
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.script.js +0 -106
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +0 -222
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.script.js +0 -216
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +0 -220
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.script.js +0 -116
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +0 -43
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.script.js +0 -73
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +0 -31
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.script.js +0 -205
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +0 -9
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +0 -39
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -4
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.js +0 -4
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +0 -16
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestBody.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.script.js +0 -477
- package/dist/views/Request/RequestSection/RequestBody.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +0 -15
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.script.js +0 -187
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +0 -25
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestParams.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.script.js +0 -180
- package/dist/views/Request/RequestSection/RequestParams.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +0 -18
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +0 -7
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.script.js +0 -115
- package/dist/views/Request/RequestSection/RequestPathParams.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +0 -20
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestSection.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.script.js +0 -297
- package/dist/views/Request/RequestSection/RequestSection.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +0 -47
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestTable.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.script.js +0 -266
- package/dist/views/Request/RequestSection/RequestTable.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts +0 -8
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +0 -9
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js.map +0 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.script.js +0 -64
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts +0 -6
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +0 -38
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js.map +0 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts +0 -6
- package/dist/views/Request/RequestSection/helpers/getting-started.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.js +0 -17
- package/dist/views/Request/RequestSection/helpers/getting-started.js.map +0 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +0 -8
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +0 -22
- package/dist/views/Request/RequestSection/helpers/update-scheme.js.map +0 -1
- package/dist/views/Request/RequestSection/index.d.ts +0 -3
- package/dist/views/Request/RequestSection/index.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/index.js +0 -3
- package/dist/views/Request/RequestSidebar.vue.d.ts +0 -16
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSidebar.vue.js +0 -9
- package/dist/views/Request/RequestSidebar.vue.js.map +0 -1
- package/dist/views/Request/RequestSidebar.vue.script.js +0 -307
- package/dist/views/Request/RequestSidebar.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts +0 -43
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +0 -10
- package/dist/views/Request/RequestSidebarItem.vue.js.map +0 -1
- package/dist/views/Request/RequestSidebarItem.vue.script.js +0 -475
- package/dist/views/Request/RequestSidebarItem.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +0 -16
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +0 -9
- package/dist/views/Request/RequestSidebarItemMenu.vue.js.map +0 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.script.js +0 -222
- package/dist/views/Request/RequestSidebarItemMenu.vue.script.js.map +0 -1
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +0 -22
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +0 -9
- package/dist/views/Request/RequestSubpageHeader.vue.js.map +0 -1
- package/dist/views/Request/RequestSubpageHeader.vue.script.js +0 -92
- package/dist/views/Request/RequestSubpageHeader.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts +0 -12
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +0 -7
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.script.js +0 -77
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts +0 -14
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.script.js +0 -91
- package/dist/views/Request/ResponseSection/ResponseBody.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts +0 -9
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.script.js +0 -35
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts +0 -14
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +0 -14
- package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +0 -11
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.script.js +0 -64
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts +0 -9
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.script.js +0 -54
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.d.ts +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.script.js +0 -85
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts +0 -11
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.script.js +0 -25
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts +0 -13
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +0 -8
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.script.js +0 -51
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts +0 -11
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.script.js +0 -39
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts +0 -12
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js +0 -98
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts +0 -12
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.script.js +0 -77
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts +0 -4
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.script.js +0 -44
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts +0 -8
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +0 -7
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js +0 -64
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +0 -15
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +0 -9
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.script.js +0 -206
- package/dist/views/Request/ResponseSection/ResponseSection.vue.script.js.map +0 -1
- package/dist/views/Request/ResponseSection/index.d.ts +0 -3
- package/dist/views/Request/ResponseSection/index.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/index.js +0 -3
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts +0 -4
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +0 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +0 -7
- package/dist/views/Request/components/WorkspaceDropdown.vue.js.map +0 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.script.js +0 -182
- package/dist/views/Request/components/WorkspaceDropdown.vue.script.js.map +0 -1
- package/dist/views/Request/components/index.d.ts +0 -2
- package/dist/views/Request/components/index.d.ts.map +0 -1
- package/dist/views/Request/components/index.js +0 -2
- package/dist/views/Request/consts/index.d.ts +0 -3
- package/dist/views/Request/consts/index.d.ts.map +0 -1
- package/dist/views/Request/consts/index.js +0 -3
- package/dist/views/Request/consts/mediaTypes.d.ts +0 -20
- package/dist/views/Request/consts/mediaTypes.d.ts.map +0 -1
- package/dist/views/Request/consts/mediaTypes.js +0 -231
- package/dist/views/Request/consts/mediaTypes.js.map +0 -1
- package/dist/views/Request/consts/new-auth-options.d.ts +0 -107
- package/dist/views/Request/consts/new-auth-options.d.ts.map +0 -1
- package/dist/views/Request/consts/new-auth-options.js +0 -90
- package/dist/views/Request/consts/new-auth-options.js.map +0 -1
- package/dist/views/Request/handle-drag.d.ts +0 -9
- package/dist/views/Request/handle-drag.d.ts.map +0 -1
- package/dist/views/Request/handle-drag.js +0 -51
- package/dist/views/Request/handle-drag.js.map +0 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts +0 -9
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +0 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +0 -96
- package/dist/views/Request/hooks/useOpenApiWatcher.js.map +0 -1
- package/dist/views/Request/libs/auth.d.ts +0 -27
- package/dist/views/Request/libs/auth.d.ts.map +0 -1
- package/dist/views/Request/libs/auth.js +0 -74
- package/dist/views/Request/libs/auth.js.map +0 -1
- package/dist/views/Request/libs/index.d.ts +0 -4
- package/dist/views/Request/libs/index.d.ts.map +0 -1
- package/dist/views/Request/libs/index.js +0 -4
- package/dist/views/Request/libs/oauth2.d.ts +0 -43
- package/dist/views/Request/libs/oauth2.d.ts.map +0 -1
- package/dist/views/Request/libs/oauth2.js +0 -178
- package/dist/views/Request/libs/oauth2.js.map +0 -1
- package/dist/views/Request/libs/request.d.ts +0 -21
- package/dist/views/Request/libs/request.d.ts.map +0 -1
- package/dist/views/Request/libs/request.js +0 -46
- package/dist/views/Request/libs/request.js.map +0 -1
- package/dist/views/Request/libs/watch-mode.d.ts +0 -60
- package/dist/views/Request/libs/watch-mode.d.ts.map +0 -1
- package/dist/views/Request/libs/watch-mode.js +0 -375
- package/dist/views/Request/libs/watch-mode.js.map +0 -1
- package/dist/views/Request/types/index.d.ts +0 -2
- package/dist/views/Request/types/index.d.ts.map +0 -1
- package/dist/views/Request/types/index.js +0 -0
- package/dist/views/Request/types/sidebar-item.d.ts +0 -30
- package/dist/views/Request/types/sidebar-item.d.ts.map +0 -1
- package/dist/views/Settings/Settings.vue.d.ts +0 -5
- package/dist/views/Settings/Settings.vue.d.ts.map +0 -1
- package/dist/views/Settings/Settings.vue.js +0 -7
- package/dist/views/Settings/Settings.vue.js.map +0 -1
- package/dist/views/Settings/Settings.vue.script.js +0 -28
- package/dist/views/Settings/Settings.vue.script.js.map +0 -1
- package/dist/views/Settings/SettingsGeneral.vue.d.ts +0 -4
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +0 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +0 -7
- package/dist/views/Settings/SettingsGeneral.vue.js.map +0 -1
- package/dist/views/Settings/SettingsGeneral.vue.script.js +0 -241
- package/dist/views/Settings/SettingsGeneral.vue.script.js.map +0 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts +0 -4
- package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +0 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.js +0 -7
- package/dist/views/Settings/components/SettingsAppearance.vue.js.map +0 -1
- package/dist/views/Settings/components/SettingsAppearance.vue.script.js +0 -62
- package/dist/views/Settings/components/SettingsAppearance.vue.script.js.map +0 -1
- package/dist/views/Settings/components/SettingsSection.vue.d.ts +0 -15
- package/dist/views/Settings/components/SettingsSection.vue.d.ts.map +0 -1
- package/dist/views/Settings/components/SettingsSection.vue.js +0 -7
- package/dist/views/Settings/components/SettingsSection.vue.js.map +0 -1
- package/dist/views/Settings/components/SettingsSection.vue.script.js +0 -27
- package/dist/views/Settings/components/SettingsSection.vue.script.js.map +0 -1
- /package/dist/{components → v2/blocks/operation-block/components}/OpenApiClientButton.vue.d.ts +0 -0
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthDataTable.vue.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type {\n ApiReferenceEvents,\n AuthMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { MergedSecuritySchemes } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { SecuritySchemeOption } from '@/v2/blocks/scalar-auth-selector-block/helpers/security-scheme'\nimport { DataTable } from '@/v2/components/data-table'\n\nimport RequestAuthTab from './RequestAuthTab.vue'\n\nconst {\n environment,\n isStatic,\n selectedSchemeOptions,\n activeAuthIndex,\n securitySchemes = {},\n server,\n eventBus,\n meta,\n} = defineProps<{\n /** The current environment configuration */\n environment: XScalarEnvironment\n /** Controls border display for static (non-collapsible) layouts */\n isStatic: boolean\n /** Available authentication scheme options */\n selectedSchemeOptions: SecuritySchemeOption[]\n /** Index of the currently active authentication tab */\n activeAuthIndex: number\n /** Proxy URL */\n proxyUrl: string\n /** OpenAPI security scheme definitions */\n securitySchemes: MergedSecuritySchemes\n /** Current server configuration */\n server: ServerObject | null\n /** Event bus for authentication updates */\n eventBus: WorkspaceEventBus\n /** Metadata for authentication context */\n meta: AuthMeta\n}>()\n\n/** Currently selected authentication scheme based on the active tab index */\nconst activeScheme = computed<SecuritySchemeOption | undefined>(\n () => selectedSchemeOptions[activeAuthIndex],\n)\n\n/**\n * Whether to display multiple authentication tabs.\n * Only shows tabs when there are 2 or more schemes available.\n */\nconst shouldShowTabs = computed<boolean>(() => selectedSchemeOptions.length > 1)\n\n/** Handles authentication tab selection */\nconst handleTabChange = (index: number) =>\n eventBus.emit('auth:update:active-index', {\n index,\n meta,\n })\n\n/** Handles updates to OAuth scope selection */\nconst handleScopesUpdate = (\n params: Omit<ApiReferenceEvents['auth:update:selected-scopes'], 'meta'>,\n): void =>\n eventBus.emit('auth:update:selected-scopes', {\n ...params,\n meta,\n })\n\n/** Determines if a tab is currently active */\nconst isTabActive = (index: number): boolean => activeAuthIndex === index\n\n/** Expose the active scheme for parent component access */\ndefineExpose({\n activeScheme,\n})\n</script>\n\n<template>\n <form @submit.prevent>\n <!-- Authentication Tabs -->\n <div\n v-if=\"shouldShowTabs\"\n class=\"box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-
|
|
1
|
+
{"version":3,"file":"RequestAuthDataTable.vue.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type {\n ApiReferenceEvents,\n AuthMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { MergedSecuritySchemes } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { OAuth2Options } from '@/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue'\nimport type { SecuritySchemeOption } from '@/v2/blocks/scalar-auth-selector-block/helpers/security-scheme'\nimport { DataTable } from '@/v2/components/data-table'\n\nimport RequestAuthTab from './RequestAuthTab.vue'\n\nconst {\n environment,\n isStatic,\n selectedSchemeOptions,\n activeAuthIndex,\n securitySchemes = {},\n server,\n eventBus,\n meta,\n options,\n} = defineProps<{\n /** The current environment configuration */\n environment: XScalarEnvironment\n /** Controls border display for static (non-collapsible) layouts */\n isStatic: boolean\n /** Available authentication scheme options */\n selectedSchemeOptions: SecuritySchemeOption[]\n /** Index of the currently active authentication tab */\n activeAuthIndex: number\n /** Proxy URL */\n proxyUrl: string\n /** OpenAPI security scheme definitions */\n securitySchemes: MergedSecuritySchemes\n /** Current server configuration */\n server: ServerObject | null\n /** Event bus for authentication updates */\n eventBus: WorkspaceEventBus\n /** Metadata for authentication context */\n meta: AuthMeta\n /** Any config options required for the OAuth2 flow */\n options?: OAuth2Options\n}>()\n\n/** Currently selected authentication scheme based on the active tab index */\nconst activeScheme = computed<SecuritySchemeOption | undefined>(\n () => selectedSchemeOptions[activeAuthIndex],\n)\n\n/**\n * Whether to display multiple authentication tabs.\n * Only shows tabs when there are 2 or more schemes available.\n */\nconst shouldShowTabs = computed<boolean>(() => selectedSchemeOptions.length > 1)\n\n/** Handles authentication tab selection */\nconst handleTabChange = (index: number) =>\n eventBus.emit('auth:update:active-index', {\n index,\n meta,\n })\n\n/** Handles updates to OAuth scope selection */\nconst handleScopesUpdate = (\n params: Omit<ApiReferenceEvents['auth:update:selected-scopes'], 'meta'>,\n): void =>\n eventBus.emit('auth:update:selected-scopes', {\n ...params,\n meta,\n })\n\n/** Determines if a tab is currently active */\nconst isTabActive = (index: number): boolean => activeAuthIndex === index\n\n/** Expose the active scheme for parent component access */\ndefineExpose({\n activeScheme,\n})\n</script>\n\n<template>\n <form @submit.prevent>\n <!-- Authentication Tabs -->\n <div\n v-if=\"shouldShowTabs\"\n class=\"box-content flex flex-wrap gap-x-2.5 overflow-hidden border-x border-t px-3\"\n :class=\"{ 'border-x-0': !isStatic }\"\n data-testid=\"auth-tabs\">\n <div\n v-for=\"(option, index) in selectedSchemeOptions\"\n :key=\"option.id\"\n class=\"relative z-1 -mb-[var(--scalar-border-width)] flex h-8\">\n <button\n class=\"floating-bg relative cursor-pointer border-b border-transparent py-1 text-sm font-medium transition-colors\"\n :class=\"isTabActive(index) ? 'text-c-1' : 'text-c-3'\"\n type=\"button\"\n @click=\"handleTabChange(index)\">\n <span class=\"relative z-10 font-medium whitespace-nowrap\">\n {{ option.label }}\n </span>\n </button>\n\n <!-- Active Tab Indicator -->\n <div\n v-if=\"isTabActive(index)\"\n class=\"absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 z-1 h-px w-full -translate-x-1/2 bg-current\" />\n </div>\n </div>\n\n <!-- Active Authentication Scheme Content -->\n <DataTable\n v-if=\"activeScheme\"\n class=\"flex-1\"\n :class=\"{ 'bg-b-1 rounded-b-lg border-x border-b': isStatic }\"\n :columns=\"['']\"\n presentational>\n <RequestAuthTab\n :environment\n :eventBus\n :isStatic\n :options\n :proxyUrl\n :securitySchemes\n :selectedSecuritySchemas=\"activeScheme.value\"\n :server\n @update:selectedScopes=\"handleScopesUpdate\" />\n </DataTable>\n\n <!-- Empty State -->\n <div\n v-else\n class=\"bg-b-1 text-c-3 flex min-h-16 items-center justify-center border-t px-4 text-sm\"\n :class=\"{ 'min-h-[calc(4rem+0.5px)] rounded-b-lg border': isStatic }\">\n No authentication selected\n </div>\n </form>\n</template>\n"],"mappings":""}
|
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js
CHANGED
|
@@ -19,7 +19,8 @@ var RequestAuthDataTable_vue_vue_type_script_setup_true_lang_default = /* @__PUR
|
|
|
19
19
|
securitySchemes: { default: () => ({}) },
|
|
20
20
|
server: {},
|
|
21
21
|
eventBus: {},
|
|
22
|
-
meta: {}
|
|
22
|
+
meta: {},
|
|
23
|
+
options: {}
|
|
23
24
|
},
|
|
24
25
|
setup(__props, { expose: __expose }) {
|
|
25
26
|
/** Currently selected authentication scheme based on the active tab index */
|
|
@@ -46,7 +47,7 @@ var RequestAuthDataTable_vue_vue_type_script_setup_true_lang_default = /* @__PUR
|
|
|
46
47
|
return (_ctx, _cache) => {
|
|
47
48
|
return openBlock(), createElementBlock("form", { onSubmit: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"])) }, [shouldShowTabs.value ? (openBlock(), createElementBlock("div", {
|
|
48
49
|
key: 0,
|
|
49
|
-
class: normalizeClass(["box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-
|
|
50
|
+
class: normalizeClass(["box-content flex flex-wrap gap-x-2.5 overflow-hidden border-x border-t px-3", { "border-x-0": !__props.isStatic }]),
|
|
50
51
|
"data-testid": "auth-tabs"
|
|
51
52
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.selectedSchemeOptions, (option, index) => {
|
|
52
53
|
return openBlock(), createElementBlock("div", {
|
|
@@ -59,7 +60,7 @@ var RequestAuthDataTable_vue_vue_type_script_setup_true_lang_default = /* @__PUR
|
|
|
59
60
|
}, [createElementVNode("span", _hoisted_2, toDisplayString(option.label), 1)], 10, _hoisted_1), isTabActive(index) ? (openBlock(), createElementBlock("div", _hoisted_3)) : createCommentVNode("", true)]);
|
|
60
61
|
}), 128))], 2)) : createCommentVNode("", true), activeScheme.value ? (openBlock(), createBlock(unref(DataTable_default), {
|
|
61
62
|
key: 1,
|
|
62
|
-
class: normalizeClass(["flex-1", { "bg-b-1 rounded-b-lg border border-
|
|
63
|
+
class: normalizeClass(["flex-1", { "bg-b-1 rounded-b-lg border-x border-b": __props.isStatic }]),
|
|
63
64
|
columns: [""],
|
|
64
65
|
presentational: ""
|
|
65
66
|
}, {
|
|
@@ -67,6 +68,7 @@ var RequestAuthDataTable_vue_vue_type_script_setup_true_lang_default = /* @__PUR
|
|
|
67
68
|
environment: __props.environment,
|
|
68
69
|
eventBus: __props.eventBus,
|
|
69
70
|
isStatic: __props.isStatic,
|
|
71
|
+
options: __props.options,
|
|
70
72
|
proxyUrl: __props.proxyUrl,
|
|
71
73
|
securitySchemes: __props.securitySchemes,
|
|
72
74
|
selectedSecuritySchemas: activeScheme.value.value,
|
|
@@ -76,6 +78,7 @@ var RequestAuthDataTable_vue_vue_type_script_setup_true_lang_default = /* @__PUR
|
|
|
76
78
|
"environment",
|
|
77
79
|
"eventBus",
|
|
78
80
|
"isStatic",
|
|
81
|
+
"options",
|
|
79
82
|
"proxyUrl",
|
|
80
83
|
"securitySchemes",
|
|
81
84
|
"selectedSecuritySchemas",
|
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthDataTable.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type {\n ApiReferenceEvents,\n AuthMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { MergedSecuritySchemes } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { SecuritySchemeOption } from '@/v2/blocks/scalar-auth-selector-block/helpers/security-scheme'\nimport { DataTable } from '@/v2/components/data-table'\n\nimport RequestAuthTab from './RequestAuthTab.vue'\n\nconst {\n environment,\n isStatic,\n selectedSchemeOptions,\n activeAuthIndex,\n securitySchemes = {},\n server,\n eventBus,\n meta,\n} = defineProps<{\n /** The current environment configuration */\n environment: XScalarEnvironment\n /** Controls border display for static (non-collapsible) layouts */\n isStatic: boolean\n /** Available authentication scheme options */\n selectedSchemeOptions: SecuritySchemeOption[]\n /** Index of the currently active authentication tab */\n activeAuthIndex: number\n /** Proxy URL */\n proxyUrl: string\n /** OpenAPI security scheme definitions */\n securitySchemes: MergedSecuritySchemes\n /** Current server configuration */\n server: ServerObject | null\n /** Event bus for authentication updates */\n eventBus: WorkspaceEventBus\n /** Metadata for authentication context */\n meta: AuthMeta\n}>()\n\n/** Currently selected authentication scheme based on the active tab index */\nconst activeScheme = computed<SecuritySchemeOption | undefined>(\n () => selectedSchemeOptions[activeAuthIndex],\n)\n\n/**\n * Whether to display multiple authentication tabs.\n * Only shows tabs when there are 2 or more schemes available.\n */\nconst shouldShowTabs = computed<boolean>(() => selectedSchemeOptions.length > 1)\n\n/** Handles authentication tab selection */\nconst handleTabChange = (index: number) =>\n eventBus.emit('auth:update:active-index', {\n index,\n meta,\n })\n\n/** Handles updates to OAuth scope selection */\nconst handleScopesUpdate = (\n params: Omit<ApiReferenceEvents['auth:update:selected-scopes'], 'meta'>,\n): void =>\n eventBus.emit('auth:update:selected-scopes', {\n ...params,\n meta,\n })\n\n/** Determines if a tab is currently active */\nconst isTabActive = (index: number): boolean => activeAuthIndex === index\n\n/** Expose the active scheme for parent component access */\ndefineExpose({\n activeScheme,\n})\n</script>\n\n<template>\n <form @submit.prevent>\n <!-- Authentication Tabs -->\n <div\n v-if=\"shouldShowTabs\"\n class=\"box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-
|
|
1
|
+
{"version":3,"file":"RequestAuthDataTable.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type {\n ApiReferenceEvents,\n AuthMeta,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport type { MergedSecuritySchemes } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { computed } from 'vue'\n\nimport type { OAuth2Options } from '@/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue'\nimport type { SecuritySchemeOption } from '@/v2/blocks/scalar-auth-selector-block/helpers/security-scheme'\nimport { DataTable } from '@/v2/components/data-table'\n\nimport RequestAuthTab from './RequestAuthTab.vue'\n\nconst {\n environment,\n isStatic,\n selectedSchemeOptions,\n activeAuthIndex,\n securitySchemes = {},\n server,\n eventBus,\n meta,\n options,\n} = defineProps<{\n /** The current environment configuration */\n environment: XScalarEnvironment\n /** Controls border display for static (non-collapsible) layouts */\n isStatic: boolean\n /** Available authentication scheme options */\n selectedSchemeOptions: SecuritySchemeOption[]\n /** Index of the currently active authentication tab */\n activeAuthIndex: number\n /** Proxy URL */\n proxyUrl: string\n /** OpenAPI security scheme definitions */\n securitySchemes: MergedSecuritySchemes\n /** Current server configuration */\n server: ServerObject | null\n /** Event bus for authentication updates */\n eventBus: WorkspaceEventBus\n /** Metadata for authentication context */\n meta: AuthMeta\n /** Any config options required for the OAuth2 flow */\n options?: OAuth2Options\n}>()\n\n/** Currently selected authentication scheme based on the active tab index */\nconst activeScheme = computed<SecuritySchemeOption | undefined>(\n () => selectedSchemeOptions[activeAuthIndex],\n)\n\n/**\n * Whether to display multiple authentication tabs.\n * Only shows tabs when there are 2 or more schemes available.\n */\nconst shouldShowTabs = computed<boolean>(() => selectedSchemeOptions.length > 1)\n\n/** Handles authentication tab selection */\nconst handleTabChange = (index: number) =>\n eventBus.emit('auth:update:active-index', {\n index,\n meta,\n })\n\n/** Handles updates to OAuth scope selection */\nconst handleScopesUpdate = (\n params: Omit<ApiReferenceEvents['auth:update:selected-scopes'], 'meta'>,\n): void =>\n eventBus.emit('auth:update:selected-scopes', {\n ...params,\n meta,\n })\n\n/** Determines if a tab is currently active */\nconst isTabActive = (index: number): boolean => activeAuthIndex === index\n\n/** Expose the active scheme for parent component access */\ndefineExpose({\n activeScheme,\n})\n</script>\n\n<template>\n <form @submit.prevent>\n <!-- Authentication Tabs -->\n <div\n v-if=\"shouldShowTabs\"\n class=\"box-content flex flex-wrap gap-x-2.5 overflow-hidden border-x border-t px-3\"\n :class=\"{ 'border-x-0': !isStatic }\"\n data-testid=\"auth-tabs\">\n <div\n v-for=\"(option, index) in selectedSchemeOptions\"\n :key=\"option.id\"\n class=\"relative z-1 -mb-[var(--scalar-border-width)] flex h-8\">\n <button\n class=\"floating-bg relative cursor-pointer border-b border-transparent py-1 text-sm font-medium transition-colors\"\n :class=\"isTabActive(index) ? 'text-c-1' : 'text-c-3'\"\n type=\"button\"\n @click=\"handleTabChange(index)\">\n <span class=\"relative z-10 font-medium whitespace-nowrap\">\n {{ option.label }}\n </span>\n </button>\n\n <!-- Active Tab Indicator -->\n <div\n v-if=\"isTabActive(index)\"\n class=\"absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 z-1 h-px w-full -translate-x-1/2 bg-current\" />\n </div>\n </div>\n\n <!-- Active Authentication Scheme Content -->\n <DataTable\n v-if=\"activeScheme\"\n class=\"flex-1\"\n :class=\"{ 'bg-b-1 rounded-b-lg border-x border-b': isStatic }\"\n :columns=\"['']\"\n presentational>\n <RequestAuthTab\n :environment\n :eventBus\n :isStatic\n :options\n :proxyUrl\n :securitySchemes\n :selectedSecuritySchemas=\"activeScheme.value\"\n :server\n @update:selectedScopes=\"handleScopesUpdate\" />\n </DataTable>\n\n <!-- Empty State -->\n <div\n v-else\n class=\"bg-b-1 text-c-3 flex min-h-16 items-center justify-center border-t px-4 text-sm\"\n :class=\"{ 'min-h-[calc(4rem+0.5px)] rounded-b-lg border': isStatic }\">\n No authentication selected\n </div>\n </form>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,eAAe,eACb,QAAA,sBAAsB,QAAA,iBAC9B;;;;;EAMA,MAAM,iBAAiB,eAAwB,QAAA,sBAAsB,SAAS,EAAC;;EAG/E,MAAM,mBAAmB,UACvB,QAAA,SAAS,KAAK,4BAA4B;GACxC;GACA,MAAG,QAAA;GACJ,CAAA;;EAGH,MAAM,sBACJ,WAEA,QAAA,SAAS,KAAK,+BAA+B;GAC3C,GAAG;GACH,MAAG,QAAA;GACJ,CAAA;;EAGH,MAAM,eAAe,UAA2B,QAAA,oBAAoB;;AAGpE,WAAa,EACX,cACD,CAAA;;uBAIC,mBAsDO,QAAA,EAtDA,UAAM,OAAA,OAAA,OAAA,KAAA,oBAAP,IAAe,CAAA,UAAA,CAAA,GAAA,EAAA,CAGX,eAAA,SAAA,WAAA,EADR,mBAwBM,OAAA;;IAtBJ,OAAK,eAAA,CAAC,+EAA6E,EAAA,cAAA,CAC1D,QAAA,UAAQ,CAAA,CAAA;IACjC,eAAY;yBACZ,mBAkBM,UAAA,MAAA,WAjBsB,QAAA,wBAAlB,QAAQ,UAAK;wBADvB,mBAkBM,OAAA;KAhBH,KAAK,OAAO;KACb,OAAM;QACN,mBAQS,UAAA;KAPP,OAAK,eAAA,CAAC,8GACE,YAAY,MAAK,GAAA,aAAA,WAAA,CAAA;KACzB,MAAK;KACJ,UAAK,WAAE,gBAAgB,MAAK;QAC7B,mBAEO,QAFP,YAEO,gBADF,OAAO,MAAK,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA,EAMX,YAAY,MAAK,IAAA,WAAA,EADzB,mBAEwH,OAFxH,WAEwH,IAAA,mBAAA,IAAA,KAAA,CAAA,CAAA;mDAMpH,aAAA,SAAA,WAAA,EADR,YAgBY,MAAA,kBAAA,EAAA;;IAdV,OAAK,eAAA,CAAC,UAAQ,EAAA,yCACqC,QAAA,UAAQ,CAAA,CAAA;IAC1D,SAAS,CAAA,GAAI;IACd,gBAAA;;2BAUgD,CAThD,YASgD,wBAAA;KAR7C,aAAA,QAAA;KACA,UAAA,QAAA;KACA,UAAA,QAAA;KACA,SAAA,QAAA;KACA,UAAA,QAAA;KACA,iBAAA,QAAA;KACA,yBAAyB,aAAA,MAAa;KACtC,QAAA,QAAA;KACA,2BAAuB;;;;;;;;;;;;qCAI5B,mBAKM,OAAA;;IAHJ,OAAK,eAAA,CAAC,mFAAiF,EAAA,gDAC7B,QAAA,UAAQ,CAAA,CAAA;MAAI,gCAExE,EAAA,EAAA,EAAA,GAAA"}
|
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
24
24
|
inputFocus: () => any;
|
|
25
25
|
inputBlur: () => any;
|
|
26
26
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
-
onSelectVariable?: ((value: string) => any) | undefined;
|
|
28
27
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
28
|
+
onSelectVariable?: ((value: string) => any) | undefined;
|
|
29
29
|
onInputFocus?: (() => any) | undefined;
|
|
30
30
|
onInputBlur?: (() => any) | undefined;
|
|
31
31
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,6 +2,7 @@ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
|
2
2
|
import type { MergedSecuritySchemes } from '@scalar/workspace-store/request-example';
|
|
3
3
|
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
4
4
|
import type { SecurityRequirementObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
5
|
+
import { type OAuth2Options } from './OAuth2.vue.js';
|
|
5
6
|
type __VLS_Props = {
|
|
6
7
|
/** Current environment configuration */
|
|
7
8
|
environment: XScalarEnvironment;
|
|
@@ -17,6 +18,8 @@ type __VLS_Props = {
|
|
|
17
18
|
server: ServerObject | null;
|
|
18
19
|
/** Event bus for authentication updates */
|
|
19
20
|
eventBus: WorkspaceEventBus;
|
|
21
|
+
/** Any config options required for the OAuth2 flow */
|
|
22
|
+
options?: OAuth2Options;
|
|
20
23
|
};
|
|
21
24
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
25
|
"update:selectedScopes": (payload: Omit<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"AA8XA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,KAAK,EACV,qBAAqB,EAEtB,MAAM,yCAAyC,CAAA;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAEV,yBAAyB,EACzB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAe,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAA;AAUzD,KAAK,WAAW,GAAG;IACjB,wCAAwC;IACxC,WAAW,EAAE,kBAAkB,CAAA;IAC/B,yFAAyF;IACzF,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,+BAA+B;IAC/B,uBAAuB,EAAE,yBAAyB,CAAA;IAClD,oGAAoG;IACpG,eAAe,EAAE,qBAAqB,CAAA;IACtC,mCAAmC;IACnC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,2CAA2C;IAC3C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,uDAAuD;IACvD,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,CAAC;AAyoBF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthTab.vue.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdownSummary } from '@scalar/components'\nimport type {\n SecretsApiKey,\n SecretsHttp,\n} from '@scalar/workspace-store/entities/auth'\nimport type {\n ApiReferenceEvents,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n MergedSecuritySchemes,\n SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n ApiKeyObject,\n SecurityRequirementObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { capitalize, computed, ref } from 'vue'\n\nimport { DataTableCell, DataTableRow } from '@/v2/components/data-table'\n\nimport OAuth2 from './OAuth2.vue'\nimport OpenIDConnect from './OpenIDConnect.vue'\nimport RequestAuthDataTableInput from './RequestAuthDataTableInput.vue'\n\ntype SecurityItem = {\n scheme: SecuritySchemeObjectSecret | undefined\n name: string\n scopes: string[]\n}\n\nconst {\n environment,\n isStatic,\n proxyUrl,\n selectedSecuritySchemas,\n securitySchemes,\n server,\n eventBus,\n} = defineProps<{\n /** Current environment configuration */\n environment: XScalarEnvironment\n /** Controls the display of certain borders which are used when we are non-collapsible */\n isStatic: boolean\n /** Proxy URL */\n proxyUrl: string\n /** Selected security schemes*/\n selectedSecuritySchemas: SecurityRequirementObject\n /** Merged security schemes from the document and the config together with the auth store secrets */\n securitySchemes: MergedSecuritySchemes\n /** Current server configuration */\n server: ServerObject | null\n /** Event bus for authentication updates */\n eventBus: WorkspaceEventBus\n}>()\n\nconst emits = defineEmits<{\n (\n e: 'update:selectedScopes',\n payload: Omit<ApiReferenceEvents['auth:update:selected-scopes'], 'meta'>,\n ): void\n}>()\n\n/**\n * Resolves security schemes from the OpenAPI document and combines them with their selected scopes.\n * Each item includes the scheme definition, name, and associated scopes.\n */\nconst security = computed<SecurityItem[]>(() =>\n Object.entries(selectedSecuritySchemas).map(([name, scopes = []]) => ({\n scheme: getResolvedRef(securitySchemes[name]),\n name,\n scopes,\n })),\n)\n\n/** Tracks which OAuth2 flow is currently active when multiple flows are available. */\nconst activeFlow = ref<string>('')\n\n/** Keeps the selected flow in sync with currently available flow keys. */\nconst selectedFlow = computed<string>(() => {\n const authFlowKeys = security.value.flatMap(({ scheme }) => {\n if (scheme?.type !== 'oauth2' && scheme?.type !== 'openIdConnect') {\n return []\n }\n\n return Object.keys(scheme.flows ?? {})\n })\n\n return authFlowKeys.includes(activeFlow.value) ? activeFlow.value : ''\n})\n\nconst setActiveFlow = (flow: string): void => {\n activeFlow.value = flow\n}\n\n/** Determines if multiple auth schemes are configured, which affects the UI layout. */\nconst hasMultipleSchemes = computed<boolean>(() => security.value.length > 1)\n\n/**\n * Generates a human-readable label for the security scheme.\n * Intentionally omits the description here — it is rendered separately as\n * rich text via ScalarMarkdownSummary so markdown formatting is preserved.\n */\nconst generateLabel = (\n name: string,\n scheme: SecuritySchemeObjectSecret,\n): string => {\n const capitalizedName = capitalize(name)\n\n switch (scheme.type) {\n case 'apiKey':\n return `${capitalizedName}: ${scheme.in}`\n\n case 'openIdConnect':\n case 'oauth2': {\n const firstFlow = Object.keys(scheme.flows ?? {})[0]\n const currentFlow = selectedFlow.value || firstFlow\n if (!currentFlow) {\n return capitalizedName\n }\n return `${capitalizedName}: ${currentFlow}`\n }\n\n case 'http':\n return `${capitalizedName}: ${scheme.scheme}`\n\n default:\n return capitalizedName\n }\n}\n\n/**\n * Determines if an OAuth2 flow tab should be active.\n * The first flow is active by default if no flow is explicitly selected.\n */\nconst isFlowActive = (flowKey: string, index: number): boolean =>\n selectedFlow.value === flowKey || (index === 0 && !selectedFlow.value)\n\n/** Computes the container class for static display mode. */\nconst getStaticBorderClass = (): string | false => isStatic && 'border-t'\n\nconst handleHttpSecretsUpdate = (\n payload: Omit<Partial<SecretsHttp>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme-secrets', {\n payload: { type: 'http', ...payload },\n name,\n })\n\nconst handleApiKeySecretsUpdate = (\n payload: Omit<Partial<SecretsApiKey>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme-secrets', {\n payload: { type: 'apiKey', ...payload },\n name,\n })\n\nconst handleApiKeySecuritySchemeUpdate = (\n payload: Omit<Partial<ApiKeyObject>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme', {\n payload: { type: 'apiKey', ...payload },\n name,\n })\n\n/** Handles scope selection updates for OAuth2 */\nconst handleScopesUpdate = (\n name: string,\n event: { scopes: string[] },\n): void => {\n emits('update:selectedScopes', {\n id: Object.keys(selectedSecuritySchemas),\n name,\n ...event,\n })\n}\n\n/**\n * Computes dynamic classes for OAuth2 flow tabs based on active state.\n */\nconst getFlowTabClasses = (flowKey: string, index: number): string => {\n const baseClasses =\n 'floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium'\n const activeClasses = '!text-c-1 !rounded-none border-b !border-current'\n\n return isFlowActive(flowKey, index)\n ? `${baseClasses} ${activeClasses} ${isStatic ? 'opacity-100' : ''}`\n : baseClasses\n}\n</script>\n<template>\n <template\n v-for=\"{ scheme, name, scopes } in security\"\n :key=\"name\">\n <!--\n Header row for AND'ed schemes: label (bold) and description (rich text) are\n combined.\n -->\n <DataTableRow v-if=\"hasMultipleSchemes && scheme\">\n <DataTableCell\n :aria-label=\"generateLabel(name, scheme)\"\n class=\"max-h-[auto]\">\n <div class=\"bg-b-1 min-w-0 flex-1 px-3 py-1.25\">\n <p class=\"text-c-1 leading-5.5 font-medium\">\n {{ generateLabel(name, scheme) }}\n </p>\n <ScalarMarkdownSummary\n v-if=\"scheme.description\"\n class=\"auth-description text-c-2 w-full\"\n :value=\"scheme.description\" />\n </div>\n </DataTableCell>\n </DataTableRow>\n\n <!-- Description: shown for single auth schemes with descriptions -->\n <DataTableRow v-if=\"scheme?.description && !hasMultipleSchemes\">\n <DataTableCell\n :aria-label=\"scheme.description\"\n class=\"max-h-[auto]\">\n <ScalarMarkdownSummary\n class=\"auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25\"\n :value=\"scheme.description\" />\n </DataTableCell>\n </DataTableRow>\n\n <!-- HTTP Authentication -->\n <template v-if=\"scheme?.type === 'http'\">\n <!-- Bearer Token -->\n <DataTableRow v-if=\"scheme.scheme === 'bearer'\">\n <RequestAuthDataTableInput\n :containerClass=\"getStaticBorderClass()\"\n :environment\n :modelValue=\"scheme['x-scalar-secret-token']\"\n placeholder=\"Token\"\n type=\"password\"\n @update:modelValue=\"\n (v) => handleHttpSecretsUpdate({ 'x-scalar-secret-token': v }, name)\n \">\n Bearer Token\n </RequestAuthDataTableInput>\n </DataTableRow>\n\n <!-- HTTP Basic Authentication -->\n <template v-else-if=\"scheme?.scheme === 'basic'\">\n <DataTableRow>\n <RequestAuthDataTableInput\n class=\"text-c-2\"\n :environment\n :modelValue=\"scheme['x-scalar-secret-username']\"\n placeholder=\"janedoe\"\n required\n @update:modelValue=\"\n (v) =>\n handleHttpSecretsUpdate({ 'x-scalar-secret-username': v }, name)\n \">\n Username\n </RequestAuthDataTableInput>\n </DataTableRow>\n <DataTableRow>\n <RequestAuthDataTableInput\n :environment\n :modelValue=\"scheme['x-scalar-secret-password']\"\n placeholder=\"********\"\n type=\"password\"\n @update:modelValue=\"\n (v) =>\n handleHttpSecretsUpdate({ 'x-scalar-secret-password': v }, name)\n \">\n Password\n </RequestAuthDataTableInput>\n </DataTableRow>\n </template>\n </template>\n\n <!-- API Key Authentication -->\n <template v-else-if=\"scheme?.type === 'apiKey'\">\n <DataTableRow>\n <RequestAuthDataTableInput\n :containerClass=\"getStaticBorderClass()\"\n :environment\n :modelValue=\"scheme.name\"\n placeholder=\"api-key\"\n @update:modelValue=\"\n (v) => handleApiKeySecuritySchemeUpdate({ name: v }, name)\n \">\n Name\n </RequestAuthDataTableInput>\n </DataTableRow>\n <DataTableRow>\n <RequestAuthDataTableInput\n :environment\n :modelValue=\"scheme['x-scalar-secret-token']\"\n placeholder=\"QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT\"\n type=\"password\"\n @update:modelValue=\"\n (v) =>\n handleApiKeySecretsUpdate({ 'x-scalar-secret-token': v }, name)\n \">\n Value\n </RequestAuthDataTableInput>\n </DataTableRow>\n </template>\n\n <!-- OAuth 2.0 / OpenID Connect Authentication -->\n <template\n v-else-if=\"scheme?.type === 'oauth2' || scheme?.type === 'openIdConnect'\">\n <!-- OpenID Connect -->\n <OpenIDConnect\n v-if=\"\n scheme?.type === 'openIdConnect' &&\n !Object.keys(scheme.flows ?? {}).length\n \"\n :environment\n :eventBus\n :getStaticBorderClass\n :name\n :proxyUrl\n :scheme />\n\n <!-- Flow selector tabs: shown when multiple flows are available -->\n <DataTableRow v-if=\"Object.keys(scheme.flows ?? {}).length > 1\">\n <div class=\"flex min-h-8 border-t text-base\">\n <div class=\"flex h-8 max-w-full gap-2.5 overflow-x-auto px-3\">\n <button\n v-for=\"(_, key, ind) in scheme.flows\"\n :key=\"key\"\n :class=\"getFlowTabClasses(key, ind)\"\n type=\"button\"\n @click=\"setActiveFlow(key)\">\n <span class=\"relative z-10\">{{ key }}</span>\n </button>\n </div>\n </div>\n </DataTableRow>\n\n <!-- OAuth2 flow configuration -->\n <template\n v-for=\"(_flow, key, ind) in scheme.flows\"\n :key=\"key\">\n <OAuth2\n v-if=\"scheme.flows && isFlowActive(key, ind)\"\n :environment\n :eventBus\n :flows=\"scheme.flows\"\n :name=\"name\"\n :proxyUrl\n :scheme\n :selectedScopes=\"scopes\"\n :server=\"server\"\n :type=\"key\"\n @update:selectedScopes=\"(event) => handleScopesUpdate(name, event)\" />\n </template>\n </template>\n\n <!-- Scheme is missing type -->\n <div\n v-else\n class=\"text-c-3 flex items-center justify-center border-t p-4 px-4 text-center text-xs text-balance\">\n The security scheme is missing a type, please double check your OpenAPI\n document or Authentication Configuration\n </div>\n </template>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"RequestAuthTab.vue.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdownSummary } from '@scalar/components'\nimport type {\n SecretsApiKey,\n SecretsHttp,\n} from '@scalar/workspace-store/entities/auth'\nimport type {\n ApiReferenceEvents,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n MergedSecuritySchemes,\n SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n ApiKeyObject,\n SecurityRequirementObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { capitalize, computed, ref } from 'vue'\n\nimport { DataTableCell, DataTableRow } from '@/v2/components/data-table'\n\nimport OAuth2, { type OAuth2Options } from './OAuth2.vue'\nimport OpenIDConnect from './OpenIDConnect.vue'\nimport RequestAuthDataTableInput from './RequestAuthDataTableInput.vue'\n\ntype SecurityItem = {\n scheme: SecuritySchemeObjectSecret | undefined\n name: string\n scopes: string[]\n}\n\nconst {\n environment,\n isStatic,\n proxyUrl,\n selectedSecuritySchemas,\n securitySchemes,\n server,\n eventBus,\n options,\n} = defineProps<{\n /** Current environment configuration */\n environment: XScalarEnvironment\n /** Controls the display of certain borders which are used when we are non-collapsible */\n isStatic: boolean\n /** Proxy URL */\n proxyUrl: string\n /** Selected security schemes*/\n selectedSecuritySchemas: SecurityRequirementObject\n /** Merged security schemes from the document and the config together with the auth store secrets */\n securitySchemes: MergedSecuritySchemes\n /** Current server configuration */\n server: ServerObject | null\n /** Event bus for authentication updates */\n eventBus: WorkspaceEventBus\n /** Any config options required for the OAuth2 flow */\n options?: OAuth2Options\n}>()\n\nconst emits = defineEmits<{\n (\n e: 'update:selectedScopes',\n payload: Omit<ApiReferenceEvents['auth:update:selected-scopes'], 'meta'>,\n ): void\n}>()\n\n/**\n * Resolves security schemes from the OpenAPI document and combines them with their selected scopes.\n * Each item includes the scheme definition, name, and associated scopes.\n */\nconst security = computed<SecurityItem[]>(() =>\n Object.entries(selectedSecuritySchemas).map(([name, scopes = []]) => ({\n scheme: getResolvedRef(securitySchemes[name]),\n name,\n scopes,\n })),\n)\n\n/** Tracks which OAuth2 flow is currently active when multiple flows are available. */\nconst activeFlow = ref<string>('')\n\n/** Keeps the selected flow in sync with currently available flow keys. */\nconst selectedFlow = computed<string>(() => {\n const authFlowKeys = security.value.flatMap(({ scheme }) => {\n if (scheme?.type !== 'oauth2' && scheme?.type !== 'openIdConnect') {\n return []\n }\n\n return Object.keys(scheme.flows ?? {})\n })\n\n return authFlowKeys.includes(activeFlow.value) ? activeFlow.value : ''\n})\n\nconst setActiveFlow = (flow: string): void => {\n activeFlow.value = flow\n}\n\n/** Determines if multiple auth schemes are configured, which affects the UI layout. */\nconst hasMultipleSchemes = computed<boolean>(() => security.value.length > 1)\n\n/**\n * Generates a human-readable label for the security scheme.\n * Intentionally omits the description here — it is rendered separately as\n * rich text via ScalarMarkdownSummary so markdown formatting is preserved.\n */\nconst generateLabel = (\n name: string,\n scheme: SecuritySchemeObjectSecret,\n): string => {\n const capitalizedName = capitalize(name)\n\n switch (scheme.type) {\n case 'apiKey':\n return `${capitalizedName}: ${scheme.in}`\n\n case 'openIdConnect':\n case 'oauth2': {\n const firstFlow = Object.keys(scheme.flows ?? {})[0]\n const currentFlow = selectedFlow.value || firstFlow\n if (!currentFlow) {\n return capitalizedName\n }\n return `${capitalizedName}: ${currentFlow}`\n }\n\n case 'http':\n return `${capitalizedName}: ${scheme.scheme}`\n\n default:\n return capitalizedName\n }\n}\n\n/**\n * Determines if an OAuth2 flow tab should be active.\n * The first flow is active by default if no flow is explicitly selected.\n */\nconst isFlowActive = (flowKey: string, index: number): boolean =>\n selectedFlow.value === flowKey || (index === 0 && !selectedFlow.value)\n\n/** Computes the container class for static display mode. */\nconst getStaticBorderClass = (): string | false => isStatic && 'border-t'\n\nconst handleHttpSecretsUpdate = (\n payload: Omit<Partial<SecretsHttp>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme-secrets', {\n payload: { type: 'http', ...payload },\n name,\n })\n\nconst handleApiKeySecretsUpdate = (\n payload: Omit<Partial<SecretsApiKey>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme-secrets', {\n payload: { type: 'apiKey', ...payload },\n name,\n })\n\nconst handleApiKeySecuritySchemeUpdate = (\n payload: Omit<Partial<ApiKeyObject>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme', {\n payload: { type: 'apiKey', ...payload },\n name,\n })\n\n/** Handles scope selection updates for OAuth2 */\nconst handleScopesUpdate = (\n name: string,\n event: { scopes: string[] },\n): void => {\n emits('update:selectedScopes', {\n id: Object.keys(selectedSecuritySchemas),\n name,\n ...event,\n })\n}\n\n/**\n * Computes dynamic classes for OAuth2 flow tabs based on active state.\n */\nconst getFlowTabClasses = (flowKey: string, index: number): string => {\n const baseClasses =\n 'floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium'\n const activeClasses = '!text-c-1 !rounded-none border-b !border-current'\n\n return isFlowActive(flowKey, index)\n ? `${baseClasses} ${activeClasses} ${isStatic ? 'opacity-100' : ''}`\n : baseClasses\n}\n</script>\n<template>\n <template\n v-for=\"{ scheme, name, scopes } in security\"\n :key=\"name\">\n <!--\n Header row for AND'ed schemes: label (bold) and description (rich text) are\n combined.\n -->\n <DataTableRow v-if=\"hasMultipleSchemes && scheme\">\n <DataTableCell\n :aria-label=\"generateLabel(name, scheme)\"\n class=\"max-h-[auto]\">\n <div class=\"bg-b-1 min-w-0 flex-1 px-3 py-1.25\">\n <p class=\"text-c-1 leading-5.5 font-medium\">\n {{ generateLabel(name, scheme) }}\n </p>\n <ScalarMarkdownSummary\n v-if=\"scheme.description\"\n class=\"auth-description text-c-2 w-full\"\n :value=\"scheme.description\" />\n </div>\n </DataTableCell>\n </DataTableRow>\n\n <!-- Description: shown for single auth schemes with descriptions -->\n <DataTableRow v-if=\"scheme?.description && !hasMultipleSchemes\">\n <DataTableCell\n :aria-label=\"scheme.description\"\n class=\"max-h-[auto]\">\n <ScalarMarkdownSummary\n class=\"auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25\"\n :value=\"scheme.description\" />\n </DataTableCell>\n </DataTableRow>\n\n <!-- HTTP Authentication -->\n <template v-if=\"scheme?.type === 'http'\">\n <!-- Bearer Token -->\n <DataTableRow v-if=\"scheme.scheme === 'bearer'\">\n <RequestAuthDataTableInput\n :containerClass=\"getStaticBorderClass()\"\n :environment\n :modelValue=\"scheme['x-scalar-secret-token']\"\n placeholder=\"Token\"\n type=\"password\"\n @update:modelValue=\"\n (v) => handleHttpSecretsUpdate({ 'x-scalar-secret-token': v }, name)\n \">\n Bearer Token\n </RequestAuthDataTableInput>\n </DataTableRow>\n\n <!-- HTTP Basic Authentication -->\n <template v-else-if=\"scheme?.scheme === 'basic'\">\n <DataTableRow>\n <RequestAuthDataTableInput\n class=\"text-c-2\"\n :environment\n :modelValue=\"scheme['x-scalar-secret-username']\"\n placeholder=\"janedoe\"\n required\n @update:modelValue=\"\n (v) =>\n handleHttpSecretsUpdate({ 'x-scalar-secret-username': v }, name)\n \">\n Username\n </RequestAuthDataTableInput>\n </DataTableRow>\n <DataTableRow>\n <RequestAuthDataTableInput\n :environment\n :modelValue=\"scheme['x-scalar-secret-password']\"\n placeholder=\"********\"\n type=\"password\"\n @update:modelValue=\"\n (v) =>\n handleHttpSecretsUpdate({ 'x-scalar-secret-password': v }, name)\n \">\n Password\n </RequestAuthDataTableInput>\n </DataTableRow>\n </template>\n </template>\n\n <!-- API Key Authentication -->\n <template v-else-if=\"scheme?.type === 'apiKey'\">\n <DataTableRow>\n <RequestAuthDataTableInput\n :containerClass=\"getStaticBorderClass()\"\n :environment\n :modelValue=\"scheme.name\"\n placeholder=\"api-key\"\n @update:modelValue=\"\n (v) => handleApiKeySecuritySchemeUpdate({ name: v }, name)\n \">\n Name\n </RequestAuthDataTableInput>\n </DataTableRow>\n <DataTableRow>\n <RequestAuthDataTableInput\n :environment\n :modelValue=\"scheme['x-scalar-secret-token']\"\n placeholder=\"QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT\"\n type=\"password\"\n @update:modelValue=\"\n (v) =>\n handleApiKeySecretsUpdate({ 'x-scalar-secret-token': v }, name)\n \">\n Value\n </RequestAuthDataTableInput>\n </DataTableRow>\n </template>\n\n <!-- OAuth 2.0 / OpenID Connect Authentication -->\n <template\n v-else-if=\"scheme?.type === 'oauth2' || scheme?.type === 'openIdConnect'\">\n <!-- OpenID Connect -->\n <OpenIDConnect\n v-if=\"\n scheme?.type === 'openIdConnect' &&\n !Object.keys(scheme.flows ?? {}).length\n \"\n :environment\n :eventBus\n :getStaticBorderClass\n :name\n :proxyUrl\n :scheme />\n\n <!-- Flow selector tabs: shown when multiple flows are available -->\n <DataTableRow v-if=\"Object.keys(scheme.flows ?? {}).length > 1\">\n <div class=\"flex min-h-8 border-t text-base\">\n <div class=\"flex h-8 max-w-full gap-2.5 overflow-x-auto px-3\">\n <button\n v-for=\"(_, key, ind) in scheme.flows\"\n :key=\"key\"\n :class=\"getFlowTabClasses(key, ind)\"\n type=\"button\"\n @click=\"setActiveFlow(key)\">\n <span class=\"relative z-10\">{{ key }}</span>\n </button>\n </div>\n </div>\n </DataTableRow>\n\n <!-- OAuth2 flow configuration -->\n <template\n v-for=\"(_flow, key, ind) in scheme.flows\"\n :key=\"key\">\n <OAuth2\n v-if=\"scheme.flows && isFlowActive(key, ind)\"\n :environment\n :eventBus\n :flows=\"scheme.flows\"\n :name\n :options\n :proxyUrl\n :scheme\n :selectedScopes=\"scopes\"\n :server\n :type=\"key\"\n @update:selectedScopes=\"(event) => handleScopesUpdate(name, event)\" />\n </template>\n </template>\n\n <!-- Scheme is missing type -->\n <div\n v-else\n class=\"text-c-3 flex items-center justify-center border-t p-4 px-4 text-center text-xs text-balance\">\n The security scheme is missing a type, please double check your OpenAPI\n document or Authentication Configuration\n </div>\n </template>\n</template>\n"],"mappings":""}
|
|
@@ -26,7 +26,8 @@ var RequestAuthTab_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
26
26
|
selectedSecuritySchemas: {},
|
|
27
27
|
securitySchemes: {},
|
|
28
28
|
server: {},
|
|
29
|
-
eventBus: {}
|
|
29
|
+
eventBus: {},
|
|
30
|
+
options: {}
|
|
30
31
|
},
|
|
31
32
|
emits: ["update:selectedScopes"],
|
|
32
33
|
setup(__props, { emit: __emit }) {
|
|
@@ -265,6 +266,7 @@ var RequestAuthTab_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
265
266
|
eventBus: __props.eventBus,
|
|
266
267
|
flows: scheme.flows,
|
|
267
268
|
name,
|
|
269
|
+
options: __props.options,
|
|
268
270
|
proxyUrl: __props.proxyUrl,
|
|
269
271
|
scheme,
|
|
270
272
|
selectedScopes: scopes,
|
|
@@ -276,6 +278,7 @@ var RequestAuthTab_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
276
278
|
"eventBus",
|
|
277
279
|
"flows",
|
|
278
280
|
"name",
|
|
281
|
+
"options",
|
|
279
282
|
"proxyUrl",
|
|
280
283
|
"scheme",
|
|
281
284
|
"selectedScopes",
|
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthTab.vue.script.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdownSummary } from '@scalar/components'\nimport type {\n SecretsApiKey,\n SecretsHttp,\n} from '@scalar/workspace-store/entities/auth'\nimport type {\n ApiReferenceEvents,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n MergedSecuritySchemes,\n SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n ApiKeyObject,\n SecurityRequirementObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { capitalize, computed, ref } from 'vue'\n\nimport { DataTableCell, DataTableRow } from '@/v2/components/data-table'\n\nimport OAuth2 from './OAuth2.vue'\nimport OpenIDConnect from './OpenIDConnect.vue'\nimport RequestAuthDataTableInput from './RequestAuthDataTableInput.vue'\n\ntype SecurityItem = {\n scheme: SecuritySchemeObjectSecret | undefined\n name: string\n scopes: string[]\n}\n\nconst {\n environment,\n isStatic,\n proxyUrl,\n selectedSecuritySchemas,\n securitySchemes,\n server,\n eventBus,\n} = defineProps<{\n /** Current environment configuration */\n environment: XScalarEnvironment\n /** Controls the display of certain borders which are used when we are non-collapsible */\n isStatic: boolean\n /** Proxy URL */\n proxyUrl: string\n /** Selected security schemes*/\n selectedSecuritySchemas: SecurityRequirementObject\n /** Merged security schemes from the document and the config together with the auth store secrets */\n securitySchemes: MergedSecuritySchemes\n /** Current server configuration */\n server: ServerObject | null\n /** Event bus for authentication updates */\n eventBus: WorkspaceEventBus\n}>()\n\nconst emits = defineEmits<{\n (\n e: 'update:selectedScopes',\n payload: Omit<ApiReferenceEvents['auth:update:selected-scopes'], 'meta'>,\n ): void\n}>()\n\n/**\n * Resolves security schemes from the OpenAPI document and combines them with their selected scopes.\n * Each item includes the scheme definition, name, and associated scopes.\n */\nconst security = computed<SecurityItem[]>(() =>\n Object.entries(selectedSecuritySchemas).map(([name, scopes = []]) => ({\n scheme: getResolvedRef(securitySchemes[name]),\n name,\n scopes,\n })),\n)\n\n/** Tracks which OAuth2 flow is currently active when multiple flows are available. */\nconst activeFlow = ref<string>('')\n\n/** Keeps the selected flow in sync with currently available flow keys. */\nconst selectedFlow = computed<string>(() => {\n const authFlowKeys = security.value.flatMap(({ scheme }) => {\n if (scheme?.type !== 'oauth2' && scheme?.type !== 'openIdConnect') {\n return []\n }\n\n return Object.keys(scheme.flows ?? {})\n })\n\n return authFlowKeys.includes(activeFlow.value) ? activeFlow.value : ''\n})\n\nconst setActiveFlow = (flow: string): void => {\n activeFlow.value = flow\n}\n\n/** Determines if multiple auth schemes are configured, which affects the UI layout. */\nconst hasMultipleSchemes = computed<boolean>(() => security.value.length > 1)\n\n/**\n * Generates a human-readable label for the security scheme.\n * Intentionally omits the description here — it is rendered separately as\n * rich text via ScalarMarkdownSummary so markdown formatting is preserved.\n */\nconst generateLabel = (\n name: string,\n scheme: SecuritySchemeObjectSecret,\n): string => {\n const capitalizedName = capitalize(name)\n\n switch (scheme.type) {\n case 'apiKey':\n return `${capitalizedName}: ${scheme.in}`\n\n case 'openIdConnect':\n case 'oauth2': {\n const firstFlow = Object.keys(scheme.flows ?? {})[0]\n const currentFlow = selectedFlow.value || firstFlow\n if (!currentFlow) {\n return capitalizedName\n }\n return `${capitalizedName}: ${currentFlow}`\n }\n\n case 'http':\n return `${capitalizedName}: ${scheme.scheme}`\n\n default:\n return capitalizedName\n }\n}\n\n/**\n * Determines if an OAuth2 flow tab should be active.\n * The first flow is active by default if no flow is explicitly selected.\n */\nconst isFlowActive = (flowKey: string, index: number): boolean =>\n selectedFlow.value === flowKey || (index === 0 && !selectedFlow.value)\n\n/** Computes the container class for static display mode. */\nconst getStaticBorderClass = (): string | false => isStatic && 'border-t'\n\nconst handleHttpSecretsUpdate = (\n payload: Omit<Partial<SecretsHttp>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme-secrets', {\n payload: { type: 'http', ...payload },\n name,\n })\n\nconst handleApiKeySecretsUpdate = (\n payload: Omit<Partial<SecretsApiKey>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme-secrets', {\n payload: { type: 'apiKey', ...payload },\n name,\n })\n\nconst handleApiKeySecuritySchemeUpdate = (\n payload: Omit<Partial<ApiKeyObject>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme', {\n payload: { type: 'apiKey', ...payload },\n name,\n })\n\n/** Handles scope selection updates for OAuth2 */\nconst handleScopesUpdate = (\n name: string,\n event: { scopes: string[] },\n): void => {\n emits('update:selectedScopes', {\n id: Object.keys(selectedSecuritySchemas),\n name,\n ...event,\n })\n}\n\n/**\n * Computes dynamic classes for OAuth2 flow tabs based on active state.\n */\nconst getFlowTabClasses = (flowKey: string, index: number): string => {\n const baseClasses =\n 'floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium'\n const activeClasses = '!text-c-1 !rounded-none border-b !border-current'\n\n return isFlowActive(flowKey, index)\n ? `${baseClasses} ${activeClasses} ${isStatic ? 'opacity-100' : ''}`\n : baseClasses\n}\n</script>\n<template>\n <template\n v-for=\"{ scheme, name, scopes } in security\"\n :key=\"name\">\n <!--\n Header row for AND'ed schemes: label (bold) and description (rich text) are\n combined.\n -->\n <DataTableRow v-if=\"hasMultipleSchemes && scheme\">\n <DataTableCell\n :aria-label=\"generateLabel(name, scheme)\"\n class=\"max-h-[auto]\">\n <div class=\"bg-b-1 min-w-0 flex-1 px-3 py-1.25\">\n <p class=\"text-c-1 leading-5.5 font-medium\">\n {{ generateLabel(name, scheme) }}\n </p>\n <ScalarMarkdownSummary\n v-if=\"scheme.description\"\n class=\"auth-description text-c-2 w-full\"\n :value=\"scheme.description\" />\n </div>\n </DataTableCell>\n </DataTableRow>\n\n <!-- Description: shown for single auth schemes with descriptions -->\n <DataTableRow v-if=\"scheme?.description && !hasMultipleSchemes\">\n <DataTableCell\n :aria-label=\"scheme.description\"\n class=\"max-h-[auto]\">\n <ScalarMarkdownSummary\n class=\"auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25\"\n :value=\"scheme.description\" />\n </DataTableCell>\n </DataTableRow>\n\n <!-- HTTP Authentication -->\n <template v-if=\"scheme?.type === 'http'\">\n <!-- Bearer Token -->\n <DataTableRow v-if=\"scheme.scheme === 'bearer'\">\n <RequestAuthDataTableInput\n :containerClass=\"getStaticBorderClass()\"\n :environment\n :modelValue=\"scheme['x-scalar-secret-token']\"\n placeholder=\"Token\"\n type=\"password\"\n @update:modelValue=\"\n (v) => handleHttpSecretsUpdate({ 'x-scalar-secret-token': v }, name)\n \">\n Bearer Token\n </RequestAuthDataTableInput>\n </DataTableRow>\n\n <!-- HTTP Basic Authentication -->\n <template v-else-if=\"scheme?.scheme === 'basic'\">\n <DataTableRow>\n <RequestAuthDataTableInput\n class=\"text-c-2\"\n :environment\n :modelValue=\"scheme['x-scalar-secret-username']\"\n placeholder=\"janedoe\"\n required\n @update:modelValue=\"\n (v) =>\n handleHttpSecretsUpdate({ 'x-scalar-secret-username': v }, name)\n \">\n Username\n </RequestAuthDataTableInput>\n </DataTableRow>\n <DataTableRow>\n <RequestAuthDataTableInput\n :environment\n :modelValue=\"scheme['x-scalar-secret-password']\"\n placeholder=\"********\"\n type=\"password\"\n @update:modelValue=\"\n (v) =>\n handleHttpSecretsUpdate({ 'x-scalar-secret-password': v }, name)\n \">\n Password\n </RequestAuthDataTableInput>\n </DataTableRow>\n </template>\n </template>\n\n <!-- API Key Authentication -->\n <template v-else-if=\"scheme?.type === 'apiKey'\">\n <DataTableRow>\n <RequestAuthDataTableInput\n :containerClass=\"getStaticBorderClass()\"\n :environment\n :modelValue=\"scheme.name\"\n placeholder=\"api-key\"\n @update:modelValue=\"\n (v) => handleApiKeySecuritySchemeUpdate({ name: v }, name)\n \">\n Name\n </RequestAuthDataTableInput>\n </DataTableRow>\n <DataTableRow>\n <RequestAuthDataTableInput\n :environment\n :modelValue=\"scheme['x-scalar-secret-token']\"\n placeholder=\"QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT\"\n type=\"password\"\n @update:modelValue=\"\n (v) =>\n handleApiKeySecretsUpdate({ 'x-scalar-secret-token': v }, name)\n \">\n Value\n </RequestAuthDataTableInput>\n </DataTableRow>\n </template>\n\n <!-- OAuth 2.0 / OpenID Connect Authentication -->\n <template\n v-else-if=\"scheme?.type === 'oauth2' || scheme?.type === 'openIdConnect'\">\n <!-- OpenID Connect -->\n <OpenIDConnect\n v-if=\"\n scheme?.type === 'openIdConnect' &&\n !Object.keys(scheme.flows ?? {}).length\n \"\n :environment\n :eventBus\n :getStaticBorderClass\n :name\n :proxyUrl\n :scheme />\n\n <!-- Flow selector tabs: shown when multiple flows are available -->\n <DataTableRow v-if=\"Object.keys(scheme.flows ?? {}).length > 1\">\n <div class=\"flex min-h-8 border-t text-base\">\n <div class=\"flex h-8 max-w-full gap-2.5 overflow-x-auto px-3\">\n <button\n v-for=\"(_, key, ind) in scheme.flows\"\n :key=\"key\"\n :class=\"getFlowTabClasses(key, ind)\"\n type=\"button\"\n @click=\"setActiveFlow(key)\">\n <span class=\"relative z-10\">{{ key }}</span>\n </button>\n </div>\n </div>\n </DataTableRow>\n\n <!-- OAuth2 flow configuration -->\n <template\n v-for=\"(_flow, key, ind) in scheme.flows\"\n :key=\"key\">\n <OAuth2\n v-if=\"scheme.flows && isFlowActive(key, ind)\"\n :environment\n :eventBus\n :flows=\"scheme.flows\"\n :name=\"name\"\n :proxyUrl\n :scheme\n :selectedScopes=\"scopes\"\n :server=\"server\"\n :type=\"key\"\n @update:selectedScopes=\"(event) => handleScopesUpdate(name, event)\" />\n </template>\n </template>\n\n <!-- Scheme is missing type -->\n <div\n v-else\n class=\"text-c-3 flex items-center justify-center border-t p-4 px-4 text-center text-xs text-balance\">\n The security scheme is missing a type, please double check your OpenAPI\n document or Authentication Configuration\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,MAAM,QAAQ;;;;;EAWd,MAAM,WAAW,eACf,OAAO,QAAQ,QAAA,wBAAwB,CAAC,KAAK,CAAC,MAAM,SAAS,EAAE,OAAO;GACpE,QAAQ,eAAe,QAAA,gBAAgB,MAAM;GAC7C;GACA;GACD,EAAE,CACL;;EAGA,MAAM,aAAa,IAAY,GAAE;;EAGjC,MAAM,eAAe,eAAuB;AAS1C,UARqB,SAAS,MAAM,SAAS,EAAE,aAAa;AAC1D,QAAI,QAAQ,SAAS,YAAY,QAAQ,SAAS,gBAChD,QAAO,EAAC;AAGV,W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js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarMarkdownSummary } from '@scalar/components'\nimport type {\n SecretsApiKey,\n SecretsHttp,\n} from '@scalar/workspace-store/entities/auth'\nimport type {\n ApiReferenceEvents,\n WorkspaceEventBus,\n} from '@scalar/workspace-store/events'\nimport { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref'\nimport type {\n MergedSecuritySchemes,\n SecuritySchemeObjectSecret,\n} from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport type {\n ApiKeyObject,\n SecurityRequirementObject,\n ServerObject,\n} from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { capitalize, computed, ref } from 'vue'\n\nimport { DataTableCell, DataTableRow } from '@/v2/components/data-table'\n\nimport OAuth2, { type OAuth2Options } from './OAuth2.vue'\nimport OpenIDConnect from './OpenIDConnect.vue'\nimport RequestAuthDataTableInput from './RequestAuthDataTableInput.vue'\n\ntype SecurityItem = {\n scheme: SecuritySchemeObjectSecret | undefined\n name: string\n scopes: string[]\n}\n\nconst {\n environment,\n isStatic,\n proxyUrl,\n selectedSecuritySchemas,\n securitySchemes,\n server,\n eventBus,\n options,\n} = defineProps<{\n /** Current environment configuration */\n environment: XScalarEnvironment\n /** Controls the display of certain borders which are used when we are non-collapsible */\n isStatic: boolean\n /** Proxy URL */\n proxyUrl: string\n /** Selected security schemes*/\n selectedSecuritySchemas: SecurityRequirementObject\n /** Merged security schemes from the document and the config together with the auth store secrets */\n securitySchemes: MergedSecuritySchemes\n /** Current server configuration */\n server: ServerObject | null\n /** Event bus for authentication updates */\n eventBus: WorkspaceEventBus\n /** Any config options required for the OAuth2 flow */\n options?: OAuth2Options\n}>()\n\nconst emits = defineEmits<{\n (\n e: 'update:selectedScopes',\n payload: Omit<ApiReferenceEvents['auth:update:selected-scopes'], 'meta'>,\n ): void\n}>()\n\n/**\n * Resolves security schemes from the OpenAPI document and combines them with their selected scopes.\n * Each item includes the scheme definition, name, and associated scopes.\n */\nconst security = computed<SecurityItem[]>(() =>\n Object.entries(selectedSecuritySchemas).map(([name, scopes = []]) => ({\n scheme: getResolvedRef(securitySchemes[name]),\n name,\n scopes,\n })),\n)\n\n/** Tracks which OAuth2 flow is currently active when multiple flows are available. */\nconst activeFlow = ref<string>('')\n\n/** Keeps the selected flow in sync with currently available flow keys. */\nconst selectedFlow = computed<string>(() => {\n const authFlowKeys = security.value.flatMap(({ scheme }) => {\n if (scheme?.type !== 'oauth2' && scheme?.type !== 'openIdConnect') {\n return []\n }\n\n return Object.keys(scheme.flows ?? {})\n })\n\n return authFlowKeys.includes(activeFlow.value) ? activeFlow.value : ''\n})\n\nconst setActiveFlow = (flow: string): void => {\n activeFlow.value = flow\n}\n\n/** Determines if multiple auth schemes are configured, which affects the UI layout. */\nconst hasMultipleSchemes = computed<boolean>(() => security.value.length > 1)\n\n/**\n * Generates a human-readable label for the security scheme.\n * Intentionally omits the description here — it is rendered separately as\n * rich text via ScalarMarkdownSummary so markdown formatting is preserved.\n */\nconst generateLabel = (\n name: string,\n scheme: SecuritySchemeObjectSecret,\n): string => {\n const capitalizedName = capitalize(name)\n\n switch (scheme.type) {\n case 'apiKey':\n return `${capitalizedName}: ${scheme.in}`\n\n case 'openIdConnect':\n case 'oauth2': {\n const firstFlow = Object.keys(scheme.flows ?? {})[0]\n const currentFlow = selectedFlow.value || firstFlow\n if (!currentFlow) {\n return capitalizedName\n }\n return `${capitalizedName}: ${currentFlow}`\n }\n\n case 'http':\n return `${capitalizedName}: ${scheme.scheme}`\n\n default:\n return capitalizedName\n }\n}\n\n/**\n * Determines if an OAuth2 flow tab should be active.\n * The first flow is active by default if no flow is explicitly selected.\n */\nconst isFlowActive = (flowKey: string, index: number): boolean =>\n selectedFlow.value === flowKey || (index === 0 && !selectedFlow.value)\n\n/** Computes the container class for static display mode. */\nconst getStaticBorderClass = (): string | false => isStatic && 'border-t'\n\nconst handleHttpSecretsUpdate = (\n payload: Omit<Partial<SecretsHttp>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme-secrets', {\n payload: { type: 'http', ...payload },\n name,\n })\n\nconst handleApiKeySecretsUpdate = (\n payload: Omit<Partial<SecretsApiKey>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme-secrets', {\n payload: { type: 'apiKey', ...payload },\n name,\n })\n\nconst handleApiKeySecuritySchemeUpdate = (\n payload: Omit<Partial<ApiKeyObject>, 'type'>,\n name: string,\n): void =>\n eventBus.emit('auth:update:security-scheme', {\n payload: { type: 'apiKey', ...payload },\n name,\n })\n\n/** Handles scope selection updates for OAuth2 */\nconst handleScopesUpdate = (\n name: string,\n event: { scopes: string[] },\n): void => {\n emits('update:selectedScopes', {\n id: Object.keys(selectedSecuritySchemas),\n name,\n ...event,\n })\n}\n\n/**\n * Computes dynamic classes for OAuth2 flow tabs based on active state.\n */\nconst getFlowTabClasses = (flowKey: string, index: number): string => {\n const baseClasses =\n 'floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium'\n const activeClasses = '!text-c-1 !rounded-none border-b !border-current'\n\n return isFlowActive(flowKey, index)\n ? `${baseClasses} ${activeClasses} ${isStatic ? 'opacity-100' : ''}`\n : baseClasses\n}\n</script>\n<template>\n <template\n v-for=\"{ scheme, name, scopes } in security\"\n :key=\"name\">\n <!--\n Header row for AND'ed schemes: label (bold) and description (rich text) are\n combined.\n -->\n <DataTableRow v-if=\"hasMultipleSchemes && scheme\">\n <DataTableCell\n :aria-label=\"generateLabel(name, scheme)\"\n class=\"max-h-[auto]\">\n <div class=\"bg-b-1 min-w-0 flex-1 px-3 py-1.25\">\n <p class=\"text-c-1 leading-5.5 font-medium\">\n {{ generateLabel(name, scheme) }}\n </p>\n <ScalarMarkdownSummary\n v-if=\"scheme.description\"\n class=\"auth-description text-c-2 w-full\"\n :value=\"scheme.description\" />\n </div>\n </DataTableCell>\n </DataTableRow>\n\n <!-- Description: shown for single auth schemes with descriptions -->\n <DataTableRow v-if=\"scheme?.description && !hasMultipleSchemes\">\n <DataTableCell\n :aria-label=\"scheme.description\"\n class=\"max-h-[auto]\">\n <ScalarMarkdownSummary\n class=\"auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25\"\n :value=\"scheme.description\" />\n </DataTableCell>\n </DataTableRow>\n\n <!-- HTTP Authentication -->\n <template v-if=\"scheme?.type === 'http'\">\n <!-- Bearer Token -->\n <DataTableRow v-if=\"scheme.scheme === 'bearer'\">\n <RequestAuthDataTableInput\n :containerClass=\"getStaticBorderClass()\"\n :environment\n :modelValue=\"scheme['x-scalar-secret-token']\"\n placeholder=\"Token\"\n type=\"password\"\n @update:modelValue=\"\n (v) => handleHttpSecretsUpdate({ 'x-scalar-secret-token': v }, name)\n \">\n Bearer Token\n </RequestAuthDataTableInput>\n </DataTableRow>\n\n <!-- HTTP Basic Authentication -->\n <template v-else-if=\"scheme?.scheme === 'basic'\">\n <DataTableRow>\n <RequestAuthDataTableInput\n class=\"text-c-2\"\n :environment\n :modelValue=\"scheme['x-scalar-secret-username']\"\n placeholder=\"janedoe\"\n required\n @update:modelValue=\"\n (v) =>\n handleHttpSecretsUpdate({ 'x-scalar-secret-username': v }, name)\n \">\n Username\n </RequestAuthDataTableInput>\n </DataTableRow>\n <DataTableRow>\n <RequestAuthDataTableInput\n :environment\n :modelValue=\"scheme['x-scalar-secret-password']\"\n placeholder=\"********\"\n type=\"password\"\n @update:modelValue=\"\n (v) =>\n handleHttpSecretsUpdate({ 'x-scalar-secret-password': v }, name)\n \">\n Password\n </RequestAuthDataTableInput>\n </DataTableRow>\n </template>\n </template>\n\n <!-- API Key Authentication -->\n <template v-else-if=\"scheme?.type === 'apiKey'\">\n <DataTableRow>\n <RequestAuthDataTableInput\n :containerClass=\"getStaticBorderClass()\"\n :environment\n :modelValue=\"scheme.name\"\n placeholder=\"api-key\"\n @update:modelValue=\"\n (v) => handleApiKeySecuritySchemeUpdate({ name: v }, name)\n \">\n Name\n </RequestAuthDataTableInput>\n </DataTableRow>\n <DataTableRow>\n <RequestAuthDataTableInput\n :environment\n :modelValue=\"scheme['x-scalar-secret-token']\"\n placeholder=\"QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT\"\n type=\"password\"\n @update:modelValue=\"\n (v) =>\n handleApiKeySecretsUpdate({ 'x-scalar-secret-token': v }, name)\n \">\n Value\n </RequestAuthDataTableInput>\n </DataTableRow>\n </template>\n\n <!-- OAuth 2.0 / OpenID Connect Authentication -->\n <template\n v-else-if=\"scheme?.type === 'oauth2' || scheme?.type === 'openIdConnect'\">\n <!-- OpenID Connect -->\n <OpenIDConnect\n v-if=\"\n scheme?.type === 'openIdConnect' &&\n !Object.keys(scheme.flows ?? {}).length\n \"\n :environment\n :eventBus\n :getStaticBorderClass\n :name\n :proxyUrl\n :scheme />\n\n <!-- Flow selector tabs: shown when multiple flows are available -->\n <DataTableRow v-if=\"Object.keys(scheme.flows ?? {}).length > 1\">\n <div class=\"flex min-h-8 border-t text-base\">\n <div class=\"flex h-8 max-w-full gap-2.5 overflow-x-auto px-3\">\n <button\n v-for=\"(_, key, ind) in scheme.flows\"\n :key=\"key\"\n :class=\"getFlowTabClasses(key, ind)\"\n type=\"button\"\n @click=\"setActiveFlow(key)\">\n <span class=\"relative z-10\">{{ key }}</span>\n </button>\n </div>\n </div>\n </DataTableRow>\n\n <!-- OAuth2 flow configuration -->\n <template\n v-for=\"(_flow, key, ind) in scheme.flows\"\n :key=\"key\">\n <OAuth2\n v-if=\"scheme.flows && isFlowActive(key, ind)\"\n :environment\n :eventBus\n :flows=\"scheme.flows\"\n :name\n :options\n :proxyUrl\n :scheme\n :selectedScopes=\"scopes\"\n :server\n :type=\"key\"\n @update:selectedScopes=\"(event) => handleScopesUpdate(name, event)\" />\n </template>\n </template>\n\n <!-- Scheme is missing type -->\n <div\n v-else\n class=\"text-c-3 flex items-center justify-center border-t p-4 px-4 text-center text-xs text-balance\">\n The security scheme is missing a type, please double check your OpenAPI\n document or Authentication Configuration\n </div>\n </template>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DA,MAAM,QAAQ;;;;;EAWd,MAAM,WAAW,eACf,OAAO,QAAQ,QAAA,wBAAwB,CAAC,KAAK,CAAC,MAAM,SAAS,EAAE,OAAO;GACpE,QAAQ,eAAe,QAAA,gBAAgB,MAAM;GAC7C;GACA;GACD,EAAE,CACL;;EAGA,MAAM,aAAa,IAAY,GAAE;;EAGjC,MAAM,eAAe,eAAuB;AAS1C,UARqB,SAAS,MAAM,SAAS,EAAE,aAAa;AAC1D,QAAI,QAAQ,SAAS,YAAY,QAAQ,SAAS,gBAChD,QAAO,EAAC;AAGV,WAAO,OAAO,KAAK,OAAO,SAAS,EAAE,CAAA;KACtC,CAEmB,SAAS,WAAW,MAAM,GAAG,WAAW,QAAQ;IACrE;EAED,MAAM,iBAAiB,SAAuB;AAC5C,cAAW,QAAQ;;;EAIrB,MAAM,qBAAqB,eAAwB,SAAS,MAAM,SAAS,EAAC;;;;;;EAO5E,MAAM,iBACJ,MACA,WACW;GACX,MAAM,kBAAkB,WAAW,KAAI;AAEvC,WAAQ,OAAO,MAAf;IACE,KAAK,SACH,QAAO,GAAG,gBAAgB,IAAI,OAAO;IAEvC,KAAK;IACL,KAAK,UAAU;KACb,MAAM,YAAY,OAAO,KAAK,OAAO,SAAS,EAAE,CAAC,CAAC;KAClD,MAAM,cAAc,aAAa,SAAS;AAC1C,SAAI,CAAC,YACH,QAAO;AAET,YAAO,GAAG,gBAAgB,IAAI;;IAGhC,KAAK,OACH,QAAO,GAAG,gBAAgB,IAAI,OAAO;IAEvC,QACE,QAAO;;;;;;;EAQb,MAAM,gBAAgB,SAAiB,UACrC,aAAa,UAAU,WAAY,UAAU,KAAK,CAAC,aAAa;;EAGlE,MAAM,6BAA6C,QAAA,YAAY;EAE/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UAAK,WAAE,cAAc,IAAG;YACzB,mBAA4C,QAA5C,YAA4C,gBAAb,IAAG,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA;;;;wBAO1C,mBAgBW,UAAA,MAAA,WAfmB,OAAO,QAA3B,OAAO,KAAK,QAAG;0DACjB,KAAG,EAAA,CAED,OAAO,SAAS,aAAa,KAAK,IAAG,IAAA,WAAA,EAD7C,YAYwE,gBAAA;;QAVrE,aAAA,QAAA;QACA,UAAA,QAAA;QACA,OAAO,OAAO;QACd;QACA,SAAA,QAAA;QACA,UAAA,QAAA;QACA;QACA,gBAAgB;QAChB,QAAA,QAAA;QACA,MAAM;QACN,4BAAwB,UAAU,mBAAmB,MAAM,MAAK;;;;;;;;;;;;;;;6BAKvE,mBAKM,OALN,YAEuG,qHAGvG"}
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error';
|
|
1
2
|
import { type Static } from '@scalar/typebox';
|
|
2
|
-
import type { ErrorResponse } from '../../../../libs/errors.js';
|
|
3
3
|
/**
|
|
4
4
|
* OpenID Connect Discovery Document (subset)
|
|
5
5
|
* Represents the metadata fields consumed by the auth selector flow conversion.
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-openid-connect-discovery.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch-openid-connect-discovery.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAE3E,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,iBAAiB,CAAA;AAGnD;;;;;GAKG;AACH,QAAA,MAAM,4BAA4B;IAChC,kDAAkD;;IAElD,0CAA0C;;IAE1C,+DAA+D;;IAE/D,oEAAoE;;IAEpE,uDAAuD;;EAEvD,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GACtC,KAAK,MAAM,EACX,UAAU,MAAM,KACf,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,CA2C/C,CAAA"}
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-openid-connect-discovery.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts"],"sourcesContent":["import { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport { type Static, Type } from '@scalar/typebox'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\
|
|
1
|
+
{"version":3,"file":"fetch-openid-connect-discovery.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts"],"sourcesContent":["import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'\nimport { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport { type Static, Type } from '@scalar/typebox'\nimport { coerceValue } from '@scalar/workspace-store/schemas/typebox-coerce'\n\n/**\n * OpenID Connect Discovery Document (subset)\n * Represents the metadata fields consumed by the auth selector flow conversion.\n *\n * @see https://openid.net/specs/openid-connect-discovery-1_0.html\n */\nconst OpenIDConnectDiscoverySchema = Type.Object({\n /** URL of the OAuth 2.0 Authorization Endpoint */\n authorization_endpoint: Type.Optional(Type.String()),\n /** URL of the OAuth 2.0 Token Endpoint */\n token_endpoint: Type.Optional(Type.String()),\n /** List of OAuth 2.0 scope values that this server supports */\n scopes_supported: Type.Optional(Type.Array(Type.String())),\n /** List of OAuth 2.0 grant type values that this server supports */\n grant_types_supported: Type.Optional(Type.Array(Type.String())),\n /** Supported PKCE code challenge methods (RFC 7636) */\n code_challenge_methods_supported: Type.Optional(Type.Array(Type.String())),\n})\n\nexport type OpenIDConnectDiscovery = Static<typeof OpenIDConnectDiscoverySchema>\n\n/**\n * The required scope for OpenID Connect requests.\n * If this scope is present, the request is an OIDC request; otherwise, it is a standard OAuth 2.0 request.\n */\nexport const OPENID_SCOPE = 'openid'\n\n/**\n * Fetches the OpenID Connect discovery document from the specified URL.\n * Supports both full discovery URLs and issuer URLs.\n *\n * @param url - The OpenID Connect discovery URL or issuer URL\n * @returns The discovery document or an error\n */\nexport const fetchOpenIDConnectDiscovery = async (\n url: string,\n proxyUrl: string,\n): Promise<ErrorResponse<OpenIDConnectDiscovery>> => {\n try {\n // If the URL does not end with the well-known path, append it\n let discoveryUrl = url.trim()\n\n if (!discoveryUrl) {\n return [new Error('URL cannot be empty'), null]\n }\n\n // Remove trailing slash if present\n if (discoveryUrl.endsWith('/')) {\n discoveryUrl = discoveryUrl.slice(0, -1)\n }\n\n // If the URL does not already include the well-known path, append it\n if (!discoveryUrl.includes('/.well-known/openid-configuration')) {\n discoveryUrl = `${discoveryUrl}/.well-known/openid-configuration`\n }\n\n const proxiedUrl = redirectToProxy(proxyUrl, discoveryUrl)\n const response = await fetch(proxiedUrl)\n\n if (!response.ok) {\n return [\n new Error(`Failed to fetch OpenID Connect discovery document: ${response.status} ${response.statusText}`),\n null,\n ]\n }\n\n const data = coerceValue(OpenIDConnectDiscoverySchema, await response.json())\n\n // Validate that we have the essential fields\n if (!data.authorization_endpoint && !data.token_endpoint) {\n return [new Error('Invalid OpenID Connect discovery document: missing required endpoints'), null]\n }\n\n return [null, data]\n } catch (error) {\n if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|
1
|
+
import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error';
|
|
1
2
|
import type { OAuthFlowsObjectSecret } from '@scalar/workspace-store/request-example';
|
|
2
3
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
-
import type { ErrorResponse } from '../../../../libs/errors.js';
|
|
4
4
|
export type OAuth2Tokens = {
|
|
5
5
|
accessToken: string;
|
|
6
6
|
refreshToken?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAK3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAA;AAErF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAYhG,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AA4DD;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,OAAO,sBAAsB,EAC7B,MAAM,MAAM,sBAAsB,EAClC,gBAAgB,MAAM,EAAE;AACxB,wEAAwE;AACxE,cAAc,YAAY,GAAG,IAAI;AACjC,kCAAkC;AAClC,UAAU,MAAM;AAChB,6FAA6F;AAC7F,uBAAsB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,KAChD,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAwLrC,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { shouldUseProxy } from "@scalar/helpers/url/redirect-to-proxy";
|
|
1
|
+
import { makeUrlAbsolute } from "@scalar/helpers/url/make-url-absolute";
|
|
3
2
|
import { getServerVariables } from "@scalar/workspace-store/request-example";
|
|
3
|
+
import { encode, fromUint8Array } from "js-base64";
|
|
4
4
|
import { replaceEnvVariables, replacePathVariables } from "@scalar/helpers/regex/replace-variables";
|
|
5
5
|
import { isRelativePath } from "@scalar/helpers/url/is-relative-path";
|
|
6
|
-
import {
|
|
6
|
+
import { shouldUseProxy } from "@scalar/helpers/url/redirect-to-proxy";
|
|
7
7
|
//#region src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts
|
|
8
8
|
var getServerUrl = (activeServer, environmentVariables = {}) => {
|
|
9
9
|
return replaceEnvVariables(replacePathVariables(activeServer?.url ?? "", getServerVariables(activeServer)), environmentVariables);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"sourcesContent":["import { replaceEnvVariables, replacePathVariables } from '@scalar/helpers/regex/replace-variables'\nimport { isRelativePath } from '@scalar/helpers/url/is-relative-path'\nimport { makeUrlAbsolute } from '@scalar/helpers/url/make-url-absolute'\nimport { shouldUseProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { OAuthFlowsObjectSecret } from '@scalar/workspace-store/request-example'\nimport { getServerVariables } from '@scalar/workspace-store/request-example'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { encode, fromUint8Array } from 'js-base64'\n\nimport type { ErrorResponse } from '@/libs/errors'\n\n/** Oauth2 security schemes which are not implicit */\ntype NonImplicitFlows = Omit<OAuthFlowsObjectSecret, 'implicit'>\n\ntype PKCEState = {\n codeVerifier: string\n codeChallenge: string\n codeChallengeMethod: string\n}\n\nexport type OAuth2Tokens = {\n accessToken: string\n refreshToken?: string\n}\n\nconst getServerUrl = (activeServer: ServerObject | null, environmentVariables: Record<string, string> = {}) => {\n return replaceEnvVariables(\n replacePathVariables(activeServer?.url ?? '', getServerVariables(activeServer)),\n environmentVariables,\n )\n}\n\nconst getActiveServerBase = (activeServer: ServerObject | null, environmentVariables: Record<string, string> = {}) => {\n const serverUrl = getServerUrl(activeServer, environmentVariables)\n\n if (!serverUrl) {\n return {}\n }\n\n if (isRelativePath(serverUrl)) {\n return typeof window === 'undefined' ? {} : { basePath: serverUrl }\n }\n\n return { baseUrl: serverUrl }\n}\n\n/**\n * Generates a random string for PKCE code verifier\n *\n * @see https://www.rfc-editor.org/rfc/rfc7636#page-8\n */\nconst generateCodeVerifier = (): string => {\n // Generate 32 random bytes\n const buffer = new Uint8Array(32)\n crypto.getRandomValues(buffer)\n\n // Base64URL encode the bytes\n return fromUint8Array(buffer, true)\n}\n\n/**\n * Creates a code challenge from the code verifier\n */\nconst generateCodeChallenge = async (verifier: string, encoding: 'SHA-256' | 'plain'): Promise<string> => {\n if (encoding === 'plain') {\n return verifier\n }\n\n // If crypto.subtle.digest is not a function, we cannot use SHA-256\n if (typeof crypto?.subtle?.digest !== 'function') {\n console.warn('SHA-256 is only supported when using https, using a plain text code challenge instead.')\n return verifier\n }\n\n // ASCII encoding is just taking the lower 8 bits of each character\n const encoder = new TextEncoder()\n const data = encoder.encode(verifier)\n const digest = await crypto.subtle.digest('SHA-256', data)\n\n // Base64URL encode the bytes\n return fromUint8Array(new Uint8Array(digest), true)\n}\n\n/**\n * Authorize oauth2 flow\n *\n * @returns the resolved oauth2 tokens\n */\nexport const authorizeOauth2 = async (\n flows: OAuthFlowsObjectSecret,\n type: keyof OAuthFlowsObjectSecret,\n selectedScopes: string[],\n /** We use the active server to set a base for relative redirect uris */\n activeServer: ServerObject | null,\n /** If we want to use the proxy */\n proxyUrl: string,\n /** Flattened environment variables used to resolve server URL templates like `{protocol}` */\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n try {\n if (!flow) {\n return [new Error('Flow not found'), null]\n }\n\n const scopes = selectedScopes.join(' ')\n\n // Client Credentials or Password Flow\n if (type === 'clientCredentials' || type === 'password') {\n return authorizeServers(\n flows,\n type,\n scopes,\n {\n proxyUrl,\n },\n activeServer,\n environmentVariables,\n )\n }\n\n // Generate a random state string with the length of 8 characters\n const state = (Math.random() + 1).toString(36).substring(2, 10)\n\n const authorizationUrl = makeUrlAbsolute(\n flows[type]!['x-scalar-secret-auth-url'] ?? flows[type]!.authorizationUrl,\n getActiveServerBase(activeServer, environmentVariables),\n )\n\n const url = new URL(authorizationUrl)\n\n /** Special PKCE state */\n let pkce: PKCEState | null = null\n\n // Params unique to the flows\n if (type === 'implicit') {\n url.searchParams.set('response_type', 'token')\n } else if (type === 'authorizationCode') {\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n\n url.searchParams.set('response_type', 'code')\n\n // PKCE\n if (typedFlow['x-usePkce'] !== 'no') {\n const codeVerifier = generateCodeVerifier()\n const codeChallenge = await generateCodeChallenge(codeVerifier, typedFlow['x-usePkce'])\n\n // Set state for later verification\n pkce = {\n codeVerifier,\n codeChallenge,\n codeChallengeMethod: typedFlow['x-usePkce'] === 'SHA-256' ? 'S256' : 'plain',\n }\n\n // Set the code challenge and method on the url\n url.searchParams.set('code_challenge', codeChallenge)\n url.searchParams.set('code_challenge_method', pkce.codeChallengeMethod)\n }\n }\n\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n\n // Handle relative redirect uris\n if (typedFlow['x-scalar-secret-redirect-uri'].startsWith('/')) {\n const baseUrl =\n getServerUrl(activeServer, environmentVariables) || window.location.origin + window.location.pathname\n const redirectUri = new URL(typedFlow['x-scalar-secret-redirect-uri'], baseUrl).toString()\n\n url.searchParams.set('redirect_uri', redirectUri)\n } else {\n url.searchParams.set('redirect_uri', typedFlow['x-scalar-secret-redirect-uri'])\n }\n\n if (flow['x-scalar-security-query']) {\n Object.keys(flow['x-scalar-security-query']).forEach((key: string): void => {\n const value = flow['x-scalar-security-query']?.[key]\n if (!value) {\n return\n }\n url.searchParams.set(key, value)\n })\n }\n\n // Common to all flows\n url.searchParams.set('client_id', flow['x-scalar-secret-client-id'])\n url.searchParams.set('state', state)\n if (scopes) {\n url.searchParams.set('scope', scopes)\n }\n\n const windowFeatures = 'left=100,top=100,width=800,height=600'\n const authWindow = window.open(url, 'openAuth2Window', windowFeatures)\n\n // Open up a window and poll until closed or we have the data we want\n if (authWindow) {\n // We need to return a promise here due to the setInterval\n return new Promise<ErrorResponse<OAuth2Tokens>>((resolve) => {\n const checkWindowClosed = setInterval(() => {\n let accessToken: string | null = null\n let refreshToken: string | null = null\n let code: string | null = null\n let error: string | null = null\n let errorDescription: string | null = null\n\n try {\n const urlParams = new URL(authWindow.location.href).searchParams\n const tokenName = flow['x-tokenName'] || 'access_token'\n accessToken = urlParams.get(tokenName)\n refreshToken = urlParams.get('refresh_token')\n code = urlParams.get('code')\n\n error = urlParams.get('error')\n errorDescription = urlParams.get('error_description')\n\n // We may get the properties in a hash\n const hashParams = new URLSearchParams(authWindow.location.href.split('#')[1])\n accessToken ||= hashParams.get(tokenName)\n refreshToken ||= hashParams.get('refresh_token')\n code ||= hashParams.get('code')\n error ||= hashParams.get('error')\n errorDescription ||= hashParams.get('error_description')\n } catch (_e) {\n // Ignore CORS error from popup\n }\n\n // The window has closed OR we have what we are looking for so we stop polling\n if (authWindow.closed || accessToken || code || error) {\n clearInterval(checkWindowClosed)\n authWindow.close()\n\n if (error) {\n resolve([new Error(`OAuth error: ${error}${errorDescription ? ` (${errorDescription})` : ''}`), null])\n }\n\n // Implicit Flow\n else if (accessToken) {\n // State is a hash fragment and cannot be found through search params\n const _state = authWindow.location.href.match(/state=([^&]*)/)?.[1]\n\n if (_state === state) {\n resolve([null, { accessToken, ...(refreshToken ? { refreshToken } : {}) }])\n } else {\n resolve([new Error('State mismatch'), null])\n }\n }\n\n // Authorization Code Server Flow\n else if (code && type === 'authorizationCode') {\n const _state = new URL(authWindow.location.href).searchParams.get('state')\n\n if (_state === state) {\n // biome-ignore lint/nursery/noFloatingPromises: output of authorizeServers must be returned\n authorizeServers(\n flows,\n type,\n scopes,\n {\n code,\n pkce,\n proxyUrl,\n },\n activeServer,\n environmentVariables,\n ).then(resolve)\n } else {\n resolve([new Error('State mismatch'), null])\n }\n }\n // User closed window without authorizing\n else {\n clearInterval(checkWindowClosed)\n resolve([new Error('Window was closed without granting authorization'), null])\n }\n }\n }, 200)\n })\n }\n return [new Error('Failed to open auth window'), null]\n } catch (_) {\n return [new Error('Failed to authorize oauth2 flow'), null]\n }\n}\n\n/**\n * Makes the BE authorization call to grab the token server to server\n * Used for clientCredentials and authorizationCode\n */\nconst authorizeServers = async (\n flows: NonImplicitFlows,\n type: keyof NonImplicitFlows,\n scopes: string,\n {\n code,\n pkce,\n proxyUrl,\n }: {\n code?: string\n pkce?: PKCEState | null\n proxyUrl?: string\n } = {},\n activeServer: ServerObject | null,\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n if (!flow) {\n return [new Error('OAuth2 flow was not defined'), null]\n }\n\n const formData = new URLSearchParams()\n\n // Only client credentials and password flows support scopes in the token request\n if (scopes && (type === 'clientCredentials' || type === 'password')) {\n formData.set('scope', scopes)\n }\n\n /** Where to add the credentials */\n const addCredentialsToBody = flow['x-scalar-credentials-location'] === 'body'\n const hasClientSecret = Boolean(flow['x-scalar-secret-client-secret'])\n /**\n * Public authorization-code clients still need client_id in the token body.\n * We only send it implicitly for that case to avoid conflicting with Basic auth.\n */\n const shouldSendClientIdInBody = addCredentialsToBody || (type === 'authorizationCode' && !hasClientSecret)\n\n if (shouldSendClientIdInBody) {\n formData.set('client_id', flow['x-scalar-secret-client-id'])\n }\n if (addCredentialsToBody && hasClientSecret) {\n formData.set('client_secret', flow['x-scalar-secret-client-secret'])\n }\n if ('x-scalar-secret-redirect-uri' in flow && flow['x-scalar-secret-redirect-uri']) {\n formData.set('redirect_uri', flow['x-scalar-secret-redirect-uri'])\n }\n\n // Authorization Code\n if (code) {\n formData.set('code', code)\n formData.set('grant_type', 'authorization_code')\n\n // PKCE\n if (pkce) {\n formData.set('code_verifier', pkce.codeVerifier)\n }\n }\n // Password\n else if (type === 'password') {\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n formData.set('grant_type', 'password')\n formData.set('username', typedFlow['x-scalar-secret-username'])\n formData.set('password', typedFlow['x-scalar-secret-password'])\n }\n // Client Credentials\n else {\n formData.set('grant_type', 'client_credentials')\n }\n\n // Additional request body parameters\n if (flow['x-scalar-security-body']) {\n Object.entries(flow['x-scalar-security-body']).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n formData.set(key, String(value))\n }\n })\n }\n\n try {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n\n // Add client id + secret to headers for confidential clients.\n if (!addCredentialsToBody && hasClientSecret) {\n headers.Authorization = `Basic ${encode(`${flow['x-scalar-secret-client-id']}:${flow['x-scalar-secret-client-secret']}`)}`\n }\n\n // Check if we should use the proxy\n const tokenUrl = makeUrlAbsolute(\n flow['x-scalar-secret-token-url'] ?? flow.tokenUrl,\n getActiveServerBase(activeServer, environmentVariables),\n )\n const url = shouldUseProxy(proxyUrl, tokenUrl)\n ? `${proxyUrl}?${new URLSearchParams([['scalar_url', tokenUrl]]).toString()}`\n : tokenUrl\n\n // Make the call\n const resp = await fetch(url, {\n method: 'POST',\n headers,\n body: formData,\n })\n const responseData = await resp.json()\n\n // Use custom token name if specified, otherwise default to access_token\n const tokenName = flow['x-tokenName'] || 'access_token'\n const accessToken = responseData[tokenName]\n const refreshToken = responseData.refresh_token\n\n return [null, { accessToken, ...(typeof refreshToken === 'string' ? { refreshToken } : {}) }]\n } catch {\n return [new Error('Failed to get an access token. Please check your credentials.'), null]\n }\n}\n"],"mappings":";;;;;;;AAyBA,IAAM,gBAAgB,cAAmC,uBAA+C,EAAE,KAAK;AAC7G,QAAO,oBACL,qBAAqB,cAAc,OAAO,IAAI,mBAAmB,aAAa,CAAC,EAC/E,qBACD;;AAGH,IA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MAAM,CAAC;GAElC;AAGJ,KAAI;EACF,MAAM,UAAkC,EACtC,gBAAgB,qCACjB;AAGD,MAAI,CAAC,wBAAwB,gBAC3B,SAAQ,gBAAgB,SAAS,OAAO,GAAG,KAAK,6BAA6B,GAAG,KAAK,mCAAmC;EAI1H,MAAM,WAAW,gBACf,KAAK,gCAAgC,KAAK,UAC1C,oBAAoB,cAAc,qBAAqB,CACxD;EACD,MAAM,MAAM,eAAe,UAAU,SAAS,GAC1C,GAAG,SAAS,GAAG,IAAI,gBAAgB,CAAC,CAAC,cAAc,SAAS,CAAC,CAAC,CAAC,UAAU,KACzE;EAQJ,MAAM,eAAe,OALR,MAAM,MAAM,KAAK;GAC5B,QAAQ;GACR;GACA,MAAM;GACP,CAAC,EAC8B,MAAM;EAItC,MAAM,cAAc,aADF,KAAK,kBAAkB;EAEzC,MAAM,eAAe,aAAa;AAElC,SAAO,CAAC,MAAM;GAAE;GAAa,GAAI,OAAO,iBAAiB,WAAW,EAAE,cAAc,GAAG,EAAE;GAAG,CAAC;SACvF;AACN,SAAO,iBAAC,IAAI,MAAM,gEAAgE,EAAE,KAAK"}
|
|
1
|
+
{"version":3,"file":"oauth.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts"],"sourcesContent":["import type { ErrorResponse } from '@scalar/helpers/errors/normalize-error'\nimport { replaceEnvVariables, replacePathVariables } from '@scalar/helpers/regex/replace-variables'\nimport { isRelativePath } from '@scalar/helpers/url/is-relative-path'\nimport { makeUrlAbsolute } from '@scalar/helpers/url/make-url-absolute'\nimport { shouldUseProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { OAuthFlowsObjectSecret } from '@scalar/workspace-store/request-example'\nimport { getServerVariables } from '@scalar/workspace-store/request-example'\nimport type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document'\nimport { encode, fromUint8Array } from 'js-base64'\n\n/** Oauth2 security schemes which are not implicit */\ntype NonImplicitFlows = Omit<OAuthFlowsObjectSecret, 'implicit'>\n\ntype PKCEState = {\n codeVerifier: string\n codeChallenge: string\n codeChallengeMethod: string\n}\n\nexport type OAuth2Tokens = {\n accessToken: string\n refreshToken?: string\n}\n\nconst getServerUrl = (activeServer: ServerObject | null, environmentVariables: Record<string, string> = {}) => {\n return replaceEnvVariables(\n replacePathVariables(activeServer?.url ?? '', getServerVariables(activeServer)),\n environmentVariables,\n )\n}\n\nconst getActiveServerBase = (activeServer: ServerObject | null, environmentVariables: Record<string, string> = {}) => {\n const serverUrl = getServerUrl(activeServer, environmentVariables)\n\n if (!serverUrl) {\n return {}\n }\n\n if (isRelativePath(serverUrl)) {\n return typeof window === 'undefined' ? {} : { basePath: serverUrl }\n }\n\n return { baseUrl: serverUrl }\n}\n\n/**\n * Generates a random string for PKCE code verifier\n *\n * @see https://www.rfc-editor.org/rfc/rfc7636#page-8\n */\nconst generateCodeVerifier = (): string => {\n // Generate 32 random bytes\n const buffer = new Uint8Array(32)\n crypto.getRandomValues(buffer)\n\n // Base64URL encode the bytes\n return fromUint8Array(buffer, true)\n}\n\n/**\n * Creates a code challenge from the code verifier\n */\nconst generateCodeChallenge = async (verifier: string, encoding: 'SHA-256' | 'plain'): Promise<string> => {\n if (encoding === 'plain') {\n return verifier\n }\n\n // If crypto.subtle.digest is not a function, we cannot use SHA-256\n if (typeof crypto?.subtle?.digest !== 'function') {\n console.warn('SHA-256 is only supported when using https, using a plain text code challenge instead.')\n return verifier\n }\n\n // ASCII encoding is just taking the lower 8 bits of each character\n const encoder = new TextEncoder()\n const data = encoder.encode(verifier)\n const digest = await crypto.subtle.digest('SHA-256', data)\n\n // Base64URL encode the bytes\n return fromUint8Array(new Uint8Array(digest), true)\n}\n\n/**\n * Authorize oauth2 flow\n *\n * @returns the resolved oauth2 tokens\n */\nexport const authorizeOauth2 = async (\n flows: OAuthFlowsObjectSecret,\n type: keyof OAuthFlowsObjectSecret,\n selectedScopes: string[],\n /** We use the active server to set a base for relative redirect uris */\n activeServer: ServerObject | null,\n /** If we want to use the proxy */\n proxyUrl: string,\n /** Flattened environment variables used to resolve server URL templates like `{protocol}` */\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n try {\n if (!flow) {\n return [new Error('Flow not found'), null]\n }\n\n const scopes = selectedScopes.join(' ')\n\n // Client Credentials or Password Flow\n if (type === 'clientCredentials' || type === 'password') {\n return authorizeServers(\n flows,\n type,\n scopes,\n {\n proxyUrl,\n },\n activeServer,\n environmentVariables,\n )\n }\n\n // Generate a random state string with the length of 8 characters\n const state = (Math.random() + 1).toString(36).substring(2, 10)\n\n const authorizationUrl = makeUrlAbsolute(\n flows[type]!['x-scalar-secret-auth-url'] ?? flows[type]!.authorizationUrl,\n getActiveServerBase(activeServer, environmentVariables),\n )\n\n const url = new URL(authorizationUrl)\n\n /** Special PKCE state */\n let pkce: PKCEState | null = null\n\n // Params unique to the flows\n if (type === 'implicit') {\n url.searchParams.set('response_type', 'token')\n } else if (type === 'authorizationCode') {\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n\n url.searchParams.set('response_type', 'code')\n\n // PKCE\n if (typedFlow['x-usePkce'] !== 'no') {\n const codeVerifier = generateCodeVerifier()\n const codeChallenge = await generateCodeChallenge(codeVerifier, typedFlow['x-usePkce'])\n\n // Set state for later verification\n pkce = {\n codeVerifier,\n codeChallenge,\n codeChallengeMethod: typedFlow['x-usePkce'] === 'SHA-256' ? 'S256' : 'plain',\n }\n\n // Set the code challenge and method on the url\n url.searchParams.set('code_challenge', codeChallenge)\n url.searchParams.set('code_challenge_method', pkce.codeChallengeMethod)\n }\n }\n\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n\n // Handle relative redirect uris\n if (typedFlow['x-scalar-secret-redirect-uri'].startsWith('/')) {\n const baseUrl =\n getServerUrl(activeServer, environmentVariables) || window.location.origin + window.location.pathname\n const redirectUri = new URL(typedFlow['x-scalar-secret-redirect-uri'], baseUrl).toString()\n\n url.searchParams.set('redirect_uri', redirectUri)\n } else {\n url.searchParams.set('redirect_uri', typedFlow['x-scalar-secret-redirect-uri'])\n }\n\n if (flow['x-scalar-security-query']) {\n Object.keys(flow['x-scalar-security-query']).forEach((key: string): void => {\n const value = flow['x-scalar-security-query']?.[key]\n if (!value) {\n return\n }\n url.searchParams.set(key, value)\n })\n }\n\n // Common to all flows\n url.searchParams.set('client_id', flow['x-scalar-secret-client-id'])\n url.searchParams.set('state', state)\n if (scopes) {\n url.searchParams.set('scope', scopes)\n }\n\n const windowFeatures = 'left=100,top=100,width=800,height=600'\n const authWindow = window.open(url, 'openAuth2Window', windowFeatures)\n\n // Open up a window and poll until closed or we have the data we want\n if (authWindow) {\n // We need to return a promise here due to the setInterval\n return new Promise<ErrorResponse<OAuth2Tokens>>((resolve) => {\n const checkWindowClosed = setInterval(() => {\n let accessToken: string | null = null\n let refreshToken: string | null = null\n let code: string | null = null\n let error: string | null = null\n let errorDescription: string | null = null\n\n try {\n const urlParams = new URL(authWindow.location.href).searchParams\n const tokenName = flow['x-tokenName'] || 'access_token'\n accessToken = urlParams.get(tokenName)\n refreshToken = urlParams.get('refresh_token')\n code = urlParams.get('code')\n\n error = urlParams.get('error')\n errorDescription = urlParams.get('error_description')\n\n // We may get the properties in a hash\n const hashParams = new URLSearchParams(authWindow.location.href.split('#')[1])\n accessToken ||= hashParams.get(tokenName)\n refreshToken ||= hashParams.get('refresh_token')\n code ||= hashParams.get('code')\n error ||= hashParams.get('error')\n errorDescription ||= hashParams.get('error_description')\n } catch (_e) {\n // Ignore CORS error from popup\n }\n\n // The window has closed OR we have what we are looking for so we stop polling\n if (authWindow.closed || accessToken || code || error) {\n clearInterval(checkWindowClosed)\n authWindow.close()\n\n if (error) {\n resolve([new Error(`OAuth error: ${error}${errorDescription ? ` (${errorDescription})` : ''}`), null])\n }\n\n // Implicit Flow\n else if (accessToken) {\n // State is a hash fragment and cannot be found through search params\n const _state = authWindow.location.href.match(/state=([^&]*)/)?.[1]\n\n if (_state === state) {\n resolve([null, { accessToken, ...(refreshToken ? { refreshToken } : {}) }])\n } else {\n resolve([new Error('State mismatch'), null])\n }\n }\n\n // Authorization Code Server Flow\n else if (code && type === 'authorizationCode') {\n const _state = new URL(authWindow.location.href).searchParams.get('state')\n\n if (_state === state) {\n // biome-ignore lint/nursery/noFloatingPromises: output of authorizeServers must be returned\n authorizeServers(\n flows,\n type,\n scopes,\n {\n code,\n pkce,\n proxyUrl,\n },\n activeServer,\n environmentVariables,\n ).then(resolve)\n } else {\n resolve([new Error('State mismatch'), null])\n }\n }\n // User closed window without authorizing\n else {\n clearInterval(checkWindowClosed)\n resolve([new Error('Window was closed without granting authorization'), null])\n }\n }\n }, 200)\n })\n }\n return [new Error('Failed to open auth window'), null]\n } catch (_) {\n return [new Error('Failed to authorize oauth2 flow'), null]\n }\n}\n\n/**\n * Makes the BE authorization call to grab the token server to server\n * Used for clientCredentials and authorizationCode\n */\nconst authorizeServers = async (\n flows: NonImplicitFlows,\n type: keyof NonImplicitFlows,\n scopes: string,\n {\n code,\n pkce,\n proxyUrl,\n }: {\n code?: string\n pkce?: PKCEState | null\n proxyUrl?: string\n } = {},\n activeServer: ServerObject | null,\n environmentVariables: Record<string, string> = {},\n): Promise<ErrorResponse<OAuth2Tokens>> => {\n const flow = flows[type]\n\n if (!flow) {\n return [new Error('OAuth2 flow was not defined'), null]\n }\n\n const formData = new URLSearchParams()\n\n // Only client credentials and password flows support scopes in the token request\n if (scopes && (type === 'clientCredentials' || type === 'password')) {\n formData.set('scope', scopes)\n }\n\n /** Where to add the credentials */\n const addCredentialsToBody = flow['x-scalar-credentials-location'] === 'body'\n const hasClientSecret = Boolean(flow['x-scalar-secret-client-secret'])\n /**\n * Public authorization-code clients still need client_id in the token body.\n * We only send it implicitly for that case to avoid conflicting with Basic auth.\n */\n const shouldSendClientIdInBody = addCredentialsToBody || (type === 'authorizationCode' && !hasClientSecret)\n\n if (shouldSendClientIdInBody) {\n formData.set('client_id', flow['x-scalar-secret-client-id'])\n }\n if (addCredentialsToBody && hasClientSecret) {\n formData.set('client_secret', flow['x-scalar-secret-client-secret'])\n }\n if ('x-scalar-secret-redirect-uri' in flow && flow['x-scalar-secret-redirect-uri']) {\n formData.set('redirect_uri', flow['x-scalar-secret-redirect-uri'])\n }\n\n // Authorization Code\n if (code) {\n formData.set('code', code)\n formData.set('grant_type', 'authorization_code')\n\n // PKCE\n if (pkce) {\n formData.set('code_verifier', pkce.codeVerifier)\n }\n }\n // Password\n else if (type === 'password') {\n const typedFlow = flows[type]! // Safe to assert due to earlier check\n formData.set('grant_type', 'password')\n formData.set('username', typedFlow['x-scalar-secret-username'])\n formData.set('password', typedFlow['x-scalar-secret-password'])\n }\n // Client Credentials\n else {\n formData.set('grant_type', 'client_credentials')\n }\n\n // Additional request body parameters\n if (flow['x-scalar-security-body']) {\n Object.entries(flow['x-scalar-security-body']).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n formData.set(key, String(value))\n }\n })\n }\n\n try {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/x-www-form-urlencoded',\n }\n\n // Add client id + secret to headers for confidential clients.\n if (!addCredentialsToBody && hasClientSecret) {\n headers.Authorization = `Basic ${encode(`${flow['x-scalar-secret-client-id']}:${flow['x-scalar-secret-client-secret']}`)}`\n }\n\n // Check if we should use the proxy\n const tokenUrl = makeUrlAbsolute(\n flow['x-scalar-secret-token-url'] ?? flow.tokenUrl,\n getActiveServerBase(activeServer, environmentVariables),\n )\n const url = shouldUseProxy(proxyUrl, tokenUrl)\n ? `${proxyUrl}?${new URLSearchParams([['scalar_url', tokenUrl]]).toString()}`\n : tokenUrl\n\n // Make the call\n const resp = await fetch(url, {\n method: 'POST',\n headers,\n body: formData,\n })\n const responseData = await resp.json()\n\n // Use custom token name if specified, otherwise default to access_token\n const tokenName = flow['x-tokenName'] || 'access_token'\n const accessToken = responseData[tokenName]\n const refreshToken = responseData.refresh_token\n\n return [null, { accessToken, ...(typeof refreshToken === 'string' ? { refreshToken } : {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S,IAAI,YAAY,UAAU,4BAA4B;OAI/D,UAAS,IAAI,cAAc,qBAAqB;AAIlD,KAAI,KAAK,0BACP,QAAO,QAAQ,KAAK,0BAA0B,CAAC,SAAS,CAAC,KAAK,WAAW;AACvE,MAAI,UAAU,KAAA,KAAa,UAAU,KACnC,UAAS,IAAI,KAAK,OAAO,MAAM,CAAC;GAElC;AAGJ,KAAI;EACF,MAAM,UAAkC,EACtC,gBAAgB,qCACjB;AAGD,MAAI,CAAC,wBAAwB,gBAC3B,SAAQ,gBAAgB,SAAS,OAAO,GAAG,KAAK,6BAA6B,GAAG,KAAK,mCAAmC;EAI1H,MAAM,WAAW,gBACf,KAAK,gCAAgC,KAAK,UAC1C,oBAAoB,cAAc,qBAAqB,CACxD;EACD,MAAM,MAAM,eAAe,UAAU,SAAS,GAC1C,GAAG,SAAS,GAAG,IAAI,gBAAgB,CAAC,CAAC,cAAc,SAAS,CAAC,CAAC,CAAC,UAAU,KACzE;EAQJ,MAAM,eAAe,OALR,MAAM,MAAM,KAAK;GAC5B,QAAQ;GACR;GACA,MAAM;GACP,CAAC,EAC8B,MAAM;EAItC,MAAM,cAAc,aADF,KAAK,kBAAkB;EAEzC,MAAM,eAAe,aAAa;AAElC,SAAO,CAAC,MAAM;GAAE;GAAa,GAAI,OAAO,iBAAiB,WAAW,EAAE,cAAc,GAAG,EAAE;GAAG,CAAC;SACvF;AACN,SAAO,iBAAC,IAAI,MAAM,gEAAgE,EAAE,KAAK"}
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ApiClientConfiguration } from '@scalar/types/api-reference';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the default OAuth2 redirect URI.
|
|
4
|
+
*
|
|
5
|
+
* Priority:
|
|
6
|
+
* 1. Explicit oauth2RedirectUri config override.
|
|
7
|
+
* 2. Empty string in non-browser and file:// contexts.
|
|
8
|
+
* 3. Browser origin + pathname fallback.
|
|
9
|
+
*/
|
|
10
|
+
export declare const resolveDefaultOAuth2RedirectUri: (config: Pick<ApiClientConfiguration, "oauth2RedirectUri">) => string;
|
|
11
|
+
//# sourceMappingURL=resolve-default-oauth2-redirect-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-default-oauth2-redirect-url.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAAI,QAAQ,IAAI,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,KAAG,MAU3G,CAAA"}
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.ts
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the default OAuth2 redirect URI.
|
|
4
|
+
*
|
|
5
|
+
* Priority:
|
|
6
|
+
* 1. Explicit oauth2RedirectUri config override.
|
|
7
|
+
* 2. Empty string in non-browser and file:// contexts.
|
|
8
|
+
* 3. Browser origin + pathname fallback.
|
|
9
|
+
*/
|
|
10
|
+
var resolveDefaultOAuth2RedirectUri = (config) => {
|
|
11
|
+
if (config.oauth2RedirectUri) return config.oauth2RedirectUri;
|
|
12
|
+
if (typeof window === "undefined" || window.location.protocol === "file:") return "";
|
|
13
|
+
return window.location.origin + window.location.pathname;
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { resolveDefaultOAuth2RedirectUri };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=resolve-default-oauth2-redirect-url.js.map
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-default-oauth2-redirect-url.js","names":[],"sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/resolve-default-oauth2-redirect-url.ts"],"sourcesContent":["import type { ApiClientConfiguration } from '@scalar/types/api-reference'\n\n/**\n * Resolve the default OAuth2 redirect URI.\n *\n * Priority:\n * 1. Explicit oauth2RedirectUri config override.\n * 2. Empty string in non-browser and file:// contexts.\n * 3. Browser origin + pathname fallback.\n */\nexport const resolveDefaultOAuth2RedirectUri = (config: Pick<ApiClientConfiguration, 'oauth2RedirectUri'>): string => {\n if (config.oauth2RedirectUri) {\n return config.oauth2RedirectUri\n }\n\n if (typeof window === 'undefined' || window.location.protocol === 'file:') {\n return ''\n }\n\n return window.location.origin + window.location.pathname\n}\n"],"mappings":";;;;;;;;;AAUA,IAAa,mCAAmC,WAAsE;AACpH,KAAI,OAAO,kBACT,QAAO,OAAO;AAGhB,KAAI,OAAO,WAAW,eAAe,OAAO,SAAS,aAAa,QAChE,QAAO;AAGT,QAAO,OAAO,SAAS,SAAS,OAAO,SAAS"}
|
|
@@ -11,7 +11,8 @@ export type CodeInputModelValue = string | number | boolean | Array<string | num
|
|
|
11
11
|
* - Select mode: Dropdown for enums, booleans, or examples
|
|
12
12
|
* - Editor mode: CodeMirror with environment variable support
|
|
13
13
|
*
|
|
14
|
-
* Type `{{` to trigger
|
|
14
|
+
* Type `{{` to trigger autocomplete for environment variables and runtime context functions
|
|
15
|
+
* (for example `{{$guid}}`) when an environment is provided.
|
|
15
16
|
* It takes in any data but always will emit a string value,
|
|
16
17
|
* this string should then be parsed in accordance to the schema or content type.
|
|
17
18
|
*
|
|
@@ -102,7 +103,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
102
103
|
cursorPosition: () => number | undefined;
|
|
103
104
|
serializeValue: (value: CodeInputModelValue) => string;
|
|
104
105
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
105
|
-
submit: (value: string, event:
|
|
106
|
+
submit: (value: string, event: FocusEvent | KeyboardEvent) => any;
|
|
106
107
|
"update:modelValue": (value: string) => any;
|
|
107
108
|
blur: (value: string, event: FocusEvent) => any;
|
|
108
109
|
navigate: (route: {
|
|
@@ -164,7 +165,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
164
165
|
/** Put a linethrough on the input text */
|
|
165
166
|
linethrough?: boolean;
|
|
166
167
|
}> & Readonly<{
|
|
167
|
-
onSubmit?: ((value: string, event:
|
|
168
|
+
onSubmit?: ((value: string, event: FocusEvent | KeyboardEvent) => any) | undefined;
|
|
168
169
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
169
170
|
onBlur?: ((value: string, event: FocusEvent) => any) | undefined;
|
|
170
171
|
onNavigate?: ((route: {
|