@scalar/api-client 2.39.4 → 2.40.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 +22 -0
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.script.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue.script.js.map +1 -1
- package/dist/hooks/useClientConfig.d.ts +12 -0
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/hooks/useClientConfig.js +14 -1
- package/dist/hooks/useClientConfig.js.map +1 -1
- package/dist/libs/index.d.ts +0 -1
- package/dist/libs/index.d.ts.map +1 -1
- package/dist/libs/index.js +1 -2
- package/dist/style.css +207 -248
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +14 -10
- 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 +57 -35
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -5
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +18 -33
- package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +1 -1
- package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js.map +1 -1
- package/dist/v2/blocks/operation-block/index.d.ts +0 -3
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.js +1 -4
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js +3 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +4 -2
- 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 +3 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +7 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +4 -3
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +2 -3
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +3 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +5 -8
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts +0 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +2 -3
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +7 -9
- 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 +49 -42
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.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 -3
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +1 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +1 -1
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts +1 -1
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +2 -1
- package/dist/v2/blocks/request-block/helpers/is-param-disabled.js.map +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 +2 -2
- package/dist/v2/blocks/response-block/helpers/get-content-length.js.map +1 -1
- 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 +76 -25
- 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.d.ts.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 +1 -1
- 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 +1 -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/OAuth2.vue.d.ts +1 -1
- 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 +8 -4
- 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/RequestAuthDataTable.vue.d.ts +1 -1
- 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.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.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.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +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 +6 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +0 -3
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +1 -3
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +8 -6
- 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 +11 -9
- package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js.map +1 -1
- package/dist/v2/features/app/App.vue.script.js +1 -5
- package/dist/v2/features/app/App.vue.script.js.map +1 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +1 -1
- package/dist/v2/features/app/app-events.js.map +1 -1
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +2 -2
- package/dist/v2/features/app/app-state.js.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.script.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.script.js.map +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts +0 -3
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +1 -1
- package/dist/v2/features/app/helpers/routes.js.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.script.js +30 -52
- package/dist/v2/features/collection/DocumentCollection.vue.script.js.map +1 -1
- package/dist/v2/features/collection/OperationCollection.vue.script.js +0 -1
- package/dist/v2/features/collection/OperationCollection.vue.script.js.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.script.js +0 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue.script.js.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.script.js +6 -8
- package/dist/v2/features/collection/components/Authentication.vue.script.js.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.script.js +0 -1
- package/dist/v2/features/collection/components/Cookies.vue.script.js.map +1 -1
- package/dist/v2/features/collection/components/Editor/Editor.vue.script.js +0 -1
- package/dist/v2/features/collection/components/Editor/Editor.vue.script.js.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.script.js +0 -1
- package/dist/v2/features/collection/components/Environment.vue.script.js.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.script.js +0 -1
- package/dist/v2/features/collection/components/Overview.vue.script.js.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.script.js +0 -1
- package/dist/v2/features/collection/components/Servers.vue.script.js.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.script.js +2 -3
- package/dist/v2/features/collection/components/Settings.vue.script.js.map +1 -1
- package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +1 -1
- 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 +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
- 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 +3 -4
- package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
- package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +1 -1
- 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 +50 -84
- package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
- package/dist/v2/features/operation/index.d.ts +0 -4
- package/dist/v2/features/operation/index.d.ts.map +1 -1
- package/dist/v2/features/operation/index.js +1 -5
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js +11 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.script.js.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.script.js +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.script.js.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.script.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.script.js.map +1 -1
- package/dist/views/Request/libs/oauth2.js +1 -1
- package/dist/views/Request/libs/oauth2.js.map +1 -1
- package/package.json +24 -30
- package/dist/libs/formatters.d.ts +0 -12
- package/dist/libs/formatters.d.ts.map +0 -1
- package/dist/libs/formatters.js +0 -36
- package/dist/libs/formatters.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts +0 -6
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.js +0 -58
- package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +0 -12
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +0 -65
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +0 -31
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +0 -55
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +0 -27
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +0 -159
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +0 -25
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +0 -53
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +0 -46
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.js +0 -102
- package/dist/v2/blocks/operation-block/helpers/build-request.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.d.ts +0 -4
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +0 -41
- package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts +0 -14
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +0 -20
- package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.d.ts +0 -8
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.d.ts +0 -9
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +0 -17
- package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +0 -10
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +0 -41
- package/dist/v2/blocks/operation-block/helpers/get-example.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +0 -26
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +0 -32
- package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +0 -10
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +0 -15
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-server-url.d.ts +0 -3
- package/dist/v2/blocks/operation-block/helpers/get-server-url.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/get-server-url.js +0 -18
- package/dist/v2/blocks/operation-block/helpers/get-server-url.js.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts +0 -96
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts.map +0 -1
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +0 -160
- package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +0 -40
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +0 -437
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js.map +0 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +0 -6
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +0 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +0 -25
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +0 -141
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +0 -4
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +0 -10
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +0 -9
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +0 -27
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +0 -25
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +0 -1
- package/dist/v2/components/callout/Callout.vue.js +0 -9
- package/dist/v2/components/callout/Callout.vue.js.map +0 -1
- package/dist/v2/components/callout/Callout.vue.script.js +0 -35
- package/dist/v2/components/callout/Callout.vue.script.js.map +0 -1
- package/dist/v2/features/operation/helpers/combine-params.d.ts +0 -4
- package/dist/v2/features/operation/helpers/combine-params.d.ts.map +0 -1
- package/dist/v2/features/operation/helpers/combine-params.js +0 -20
- package/dist/v2/features/operation/helpers/combine-params.js.map +0 -1
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts +0 -17
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +0 -1
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +0 -12
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +0 -1
- package/dist/v2/features/operation/helpers/get-security-requirements.js +0 -17
- package/dist/v2/features/operation/helpers/get-security-requirements.js.map +0 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +0 -15
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +0 -1
- package/dist/v2/features/operation/helpers/get-selected-security.js +0 -41
- package/dist/v2/features/operation/helpers/get-selected-security.js.map +0 -1
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts +0 -13
- package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +0 -1
- package/dist/v2/features/operation/helpers/get-selected-server.js +0 -21
- package/dist/v2/features/operation/helpers/get-selected-server.js.map +0 -1
- package/dist/v2/helpers/get-active-environment.d.ts +0 -5
- package/dist/v2/helpers/get-active-environment.d.ts.map +0 -1
- package/dist/v2/helpers/get-active-environment.js +0 -19
- package/dist/v2/helpers/get-active-environment.js.map +0 -1
- package/dist/v2/helpers/get-active-proxy-url.d.ts +0 -18
- package/dist/v2/helpers/get-active-proxy-url.d.ts.map +0 -1
- package/dist/v2/helpers/get-active-proxy-url.js +0 -26
- package/dist/v2/helpers/get-active-proxy-url.js.map +0 -1
- package/dist/v2/helpers/get-servers.d.ts +0 -23
- package/dist/v2/helpers/get-servers.d.ts.map +0 -1
- package/dist/v2/helpers/get-servers.js +0 -106
- package/dist/v2/helpers/get-servers.js.map +0 -1
- package/dist/v2/helpers/index.d.ts +0 -3
- package/dist/v2/helpers/index.d.ts.map +0 -1
- package/dist/v2/helpers/index.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.40.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#8524](https://github.com/scalar/scalar/pull/8524): feat: move request logic on the store and generate a request builder
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#8692](https://github.com/scalar/scalar/pull/8692): feat: replace pretty-bytes dependency with internal helper
|
|
12
|
+
- [#8518](https://github.com/scalar/scalar/pull/8518): test(api-client): add regression coverage for oauth2 clientCredentials security body
|
|
13
|
+
|
|
14
|
+
Adds a regression test that exercises the full oauth2 merge + authorize path for
|
|
15
|
+
`clientCredentials` and verifies `x-scalar-security-body` fields (for example
|
|
16
|
+
`audience`) are preserved and sent in the token request body.
|
|
17
|
+
|
|
18
|
+
- [#8661](https://github.com/scalar/scalar/pull/8661): fix(api-client): support OAuth redirect callback override for Electron-friendly flows
|
|
19
|
+
- [#8634](https://github.com/scalar/scalar/pull/8634): feat: implement improved saving UI
|
|
20
|
+
- [#8647](https://github.com/scalar/scalar/pull/8647): feat: move addressBar path change from debounce to blur
|
|
21
|
+
- [#8713](https://github.com/scalar/scalar/pull/8713): feat: handle pasting and typing urls in the path box
|
|
22
|
+
- [#8698](https://github.com/scalar/scalar/pull/8698): fix: missing reference parameters by making skipping behavior opt-in
|
|
23
|
+
- [#8652](https://github.com/scalar/scalar/pull/8652): feat: keep form-data file delete action accessible on touch
|
|
24
|
+
|
|
3
25
|
## 2.39.4
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"names":[],"mappings":"AAsHA,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,iCAAiC,CAAA;AAS9E,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,SAAS,CAAA;IACpB,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf,CAAC;AA0QF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import AddressBarHistory_vue_vue_type_script_setup_true_lang_default from "./AddressBarHistory.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/AddressBar/AddressBarHistory.vue
|
|
5
|
-
var AddressBarHistory_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AddressBarHistory_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var AddressBarHistory_default = /* @__PURE__ */ _plugin_vue_export_helper_default(AddressBarHistory_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-7e9dbe2f"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AddressBarHistory_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.js","names":[],"sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport type { Operation, RequestEvent } from '@scalar/oas-utils/entities/spec'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\nimport { computed } from 'vue'\n\nimport {
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.js","names":[],"sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport { formatMilliseconds } from '@scalar/helpers/formatters/format-milliseconds'\nimport type { Operation, RequestEvent } from '@scalar/oas-utils/entities/spec'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\nimport { computed } from 'vue'\n\nimport { useWorkspace } from '@/store'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nconst { operation, target } = defineProps<{\n operation: Operation\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { requestHistory } = useWorkspace()\n\n/** Use a local copy to prevent mutation of the reactive object */\nconst history = computed(() =>\n requestHistory\n .filter((entry) => entry.request.requestUid === operation.uid)\n .slice()\n .reverse(),\n)\n\nfunction handleHistoryClick(requestHistoryItem: RequestEvent) {\n console.warn(\n \"Restoring from the request history doesn't work yet. Request History Item:\",\n requestHistoryItem,\n )\n // TODO: Restore the request data with the history item\n // TODO: Restore the response data with the history item\n}\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <ScalarFloating\n :offset=\"0\"\n resize\n :target=\"target\">\n <!-- History -->\n <MenuButton\n v-if=\"history?.length\"\n class=\"address-bar-history-button z-context-plus text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5\">\n <ScalarIcon\n icon=\"History\"\n size=\"sm\"\n thickness=\"2.25\" />\n <span class=\"sr-only\">Request History</span>\n </MenuButton>\n <!-- History shadow and placement-->\n <template\n v-if=\"open\"\n #floating=\"{ width }\">\n <!-- History Item -->\n <MenuItems\n class=\"custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center border-t p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"entry.timestamp\"\n as=\"button\"\n class=\"font-code ui-active:*:bg-b-2 text-c-2 contents text-sm font-medium *:flex *:h-8 *:cursor-pointer *:items-center *:rounded-none *:px-1.5 *:first:rounded-l *:last:rounded-r\"\n :value=\"index\"\n @click=\"handleHistoryClick(entry)\">\n <HttpMethod\n v-if=\"entry.response.method\"\n class=\"text-[11px]\"\n :method=\"entry.response.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.response.path }}\n </div>\n </div>\n <div>{{ formatMilliseconds(entry.response.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.response.status).color]\">\n {{ entry.response.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.response.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarFloating>\n </Menu>\n</template>\n<style scoped>\n.address-bar-history-button:hover {\n background: var(--scalar-background-3);\n}\n.address-bar-history-button:focus-within {\n background: var(--scalar-background-2);\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { formatMs } from "../../libs/formatters.js";
|
|
2
1
|
import { useWorkspace } from "../../store/store.js";
|
|
3
2
|
import HttpMethod_default from "../HttpMethod/HttpMethod.vue.js";
|
|
4
3
|
import { getStatusCodeColor } from "./httpStatusCodeColors.js";
|
|
@@ -6,6 +5,7 @@ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock
|
|
|
6
5
|
import { ScalarFloating, ScalarFloatingBackdrop, ScalarIcon } from "@scalar/components";
|
|
7
6
|
import { httpStatusCodes } from "@scalar/oas-utils/helpers";
|
|
8
7
|
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue";
|
|
8
|
+
import { formatMilliseconds } from "@scalar/helpers/formatters/format-milliseconds";
|
|
9
9
|
//#region src/components/AddressBar/AddressBarHistory.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var _hoisted_1 = { class: "min-w-0" };
|
|
11
11
|
var _hoisted_2 = { class: "text-c-1 min-w-0 truncate" };
|
|
@@ -63,7 +63,7 @@ var AddressBarHistory_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
|
|
|
63
63
|
method: entry.response.method
|
|
64
64
|
}, null, 8, ["method"])) : createCommentVNode("", true),
|
|
65
65
|
createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, toDisplayString(entry.response.path), 1)]),
|
|
66
|
-
createElementVNode("div", null, toDisplayString(unref(
|
|
66
|
+
createElementVNode("div", null, toDisplayString(unref(formatMilliseconds)(entry.response.duration)), 1),
|
|
67
67
|
createElementVNode("div", { class: normalizeClass([unref(getStatusCodeColor)(entry.response.status).color]) }, toDisplayString(entry.response.status), 3),
|
|
68
68
|
createElementVNode("div", null, toDisplayString(unref(httpStatusCodes)[entry.response.status]?.name), 1)
|
|
69
69
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBarHistory.vue.script.js","names":[],"sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport type { Operation, RequestEvent } from '@scalar/oas-utils/entities/spec'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\nimport { computed } from 'vue'\n\nimport {
|
|
1
|
+
{"version":3,"file":"AddressBarHistory.vue.script.js","names":[],"sources":["../../../src/components/AddressBar/AddressBarHistory.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'\nimport {\n ScalarFloating,\n ScalarFloatingBackdrop,\n ScalarIcon,\n} from '@scalar/components'\nimport { formatMilliseconds } from '@scalar/helpers/formatters/format-milliseconds'\nimport type { Operation, RequestEvent } from '@scalar/oas-utils/entities/spec'\nimport { httpStatusCodes } from '@scalar/oas-utils/helpers'\nimport { computed } from 'vue'\n\nimport { useWorkspace } from '@/store'\n\nimport HttpMethod from '../HttpMethod/HttpMethod.vue'\nimport { getStatusCodeColor } from './httpStatusCodeColors'\n\nconst { operation, target } = defineProps<{\n operation: Operation\n /** The id of the target to use for the popover (e.g. address bar) */\n target: string\n}>()\n\nconst { requestHistory } = useWorkspace()\n\n/** Use a local copy to prevent mutation of the reactive object */\nconst history = computed(() =>\n requestHistory\n .filter((entry) => entry.request.requestUid === operation.uid)\n .slice()\n .reverse(),\n)\n\nfunction handleHistoryClick(requestHistoryItem: RequestEvent) {\n console.warn(\n \"Restoring from the request history doesn't work yet. Request History Item:\",\n requestHistoryItem,\n )\n // TODO: Restore the request data with the history item\n // TODO: Restore the response data with the history item\n}\n</script>\n<template>\n <Menu\n v-slot=\"{ open }\"\n as=\"div\">\n <ScalarFloating\n :offset=\"0\"\n resize\n :target=\"target\">\n <!-- History -->\n <MenuButton\n v-if=\"history?.length\"\n class=\"address-bar-history-button z-context-plus text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5\">\n <ScalarIcon\n icon=\"History\"\n size=\"sm\"\n thickness=\"2.25\" />\n <span class=\"sr-only\">Request History</span>\n </MenuButton>\n <!-- History shadow and placement-->\n <template\n v-if=\"open\"\n #floating=\"{ width }\">\n <!-- History Item -->\n <MenuItems\n class=\"custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center border-t p-0.75\"\n static\n :style=\"{ width }\">\n <MenuItem\n v-for=\"(entry, index) in history\"\n :key=\"entry.timestamp\"\n as=\"button\"\n class=\"font-code ui-active:*:bg-b-2 text-c-2 contents text-sm font-medium *:flex *:h-8 *:cursor-pointer *:items-center *:rounded-none *:px-1.5 *:first:rounded-l *:last:rounded-r\"\n :value=\"index\"\n @click=\"handleHistoryClick(entry)\">\n <HttpMethod\n v-if=\"entry.response.method\"\n class=\"text-[11px]\"\n :method=\"entry.response.method\" />\n <div class=\"min-w-0\">\n <div class=\"text-c-1 min-w-0 truncate\">\n {{ entry.response.path }}\n </div>\n </div>\n <div>{{ formatMilliseconds(entry.response.duration) }}</div>\n <div :class=\"[getStatusCodeColor(entry.response.status).color]\">\n {{ entry.response.status }}\n </div>\n <div>\n {{ httpStatusCodes[entry.response.status]?.name }}\n </div>\n </MenuItem>\n </MenuItems>\n <ScalarFloatingBackdrop\n class=\"-top-(--scalar-address-bar-height) rounded-lg\" />\n </template>\n </ScalarFloating>\n </Menu>\n</template>\n<style scoped>\n.address-bar-history-button:hover {\n background: var(--scalar-background-3);\n}\n.address-bar-history-button:focus-within {\n background: var(--scalar-background-2);\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAuBA,MAAM,EAAE,mBAAmB,cAAa;;EAGxC,MAAM,UAAU,eACd,eACG,QAAQ,UAAU,MAAM,QAAQ,eAAe,QAAA,UAAU,IAAG,CAC5D,OAAM,CACN,SAAS,CACd;EAEA,SAAS,mBAAmB,oBAAkC;AAC5D,WAAQ,KACN,8EACA,mBACF;;;uBAMA,YAuDO,MAAA,KAAA,EAAA,EArDL,IAAG,OAAK,EAAA;sBAoDS,EArDP,WAAI,CAEd,YAmDiB,MAAA,eAAA,EAAA;KAlDd,QAAQ;KACT,QAAA;KACC,QAAQ,QAAA;;4BAUI,CAPL,QAAA,OAAS,UAAA,WAAA,EADjB,YAQa,MAAA,WAAA,EAAA;;MANX,OAAM;;6BAIe,CAHrB,YAGqB,MAAA,WAAA,EAAA;OAFnB,MAAK;OACL,MAAK;OACL,WAAU;oCACZ,mBAA4C,QAAA,EAAtC,OAAM,WAAS,EAAC,mBAAe,GAAA,EAAA,CAAA;;;;QAI/B,OAAA;WACL;kBA8BW,EA9BC,YAAK,CAElB,YA4BY,MAAA,UAAA,EAAA;MA3BV,OAAM;MACN,QAAA;MACC,OAAK,eAAA,EAAI,OAAK,CAAA;;6BAEoB,EAAA,UAAA,KAAA,EADnC,mBAuBW,UAAA,MAAA,WAtBgB,QAAA,QAAjB,OAAO,UAAK;2BADtB,YAuBW,MAAA,SAAA,EAAA;QArBR,KAAK,MAAM;QACZ,IAAG;QACH,OAAM;QACL,OAAO;QACP,UAAK,WAAE,mBAAmB,MAAK;;+BAII;SAF5B,MAAM,SAAS,UAAA,WAAA,EADvB,YAGoC,oBAAA;;UADlC,OAAM;UACL,QAAQ,MAAM,SAAS;;SAC1B,mBAIM,OAJN,YAIM,CAHJ,mBAEM,OAFN,YAEM,gBADD,MAAM,SAAS,KAAI,EAAA,EAAA,CAAA,CAAA;SAG1B,mBAA4D,OAAA,MAAA,gBAApD,MAAA,mBAAkB,CAAC,MAAM,SAAS,SAAQ,CAAA,EAAA,EAAA;SAClD,mBAEM,OAAA,EAFA,OAAK,eAAA,CAAG,MAAA,mBAAkB,CAAC,MAAM,SAAS,OAAM,CAAE,MAAK,CAAA,EAAA,EAAA,gBACxD,MAAM,SAAS,OAAM,EAAA,EAAA;SAE1B,mBAEM,OAAA,MAAA,gBADD,MAAA,gBAAe,CAAC,MAAM,SAAS,SAAS,KAAI,EAAA,EAAA;;;;;;uBAIrD,YAC0D,MAAA,uBAAA,EAAA,EAAxD,OAAM,iDAA+C,CAAA,CAAA,CAAA"}
|
|
@@ -20,6 +20,7 @@ export declare const useClientConfig: () => Ref<{
|
|
|
20
20
|
authentication?: any;
|
|
21
21
|
baseServerURL?: string | undefined;
|
|
22
22
|
proxyUrl?: string | undefined;
|
|
23
|
+
oauth2RedirectUri?: string | undefined;
|
|
23
24
|
searchHotKey?: "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
24
25
|
servers?: any[] | undefined;
|
|
25
26
|
_integration?: "elysiajs" | "fastify" | "adonisjs" | "astro" | "docusaurus" | "dotnet" | "express" | "fastapi" | "go" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "svelte" | "vue" | null | undefined;
|
|
@@ -80,6 +81,7 @@ export declare const useClientConfig: () => Ref<{
|
|
|
80
81
|
authentication?: any;
|
|
81
82
|
baseServerURL?: string | undefined;
|
|
82
83
|
proxyUrl?: string | undefined;
|
|
84
|
+
oauth2RedirectUri?: string | undefined;
|
|
83
85
|
searchHotKey?: "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
84
86
|
servers?: any[] | undefined;
|
|
85
87
|
_integration?: "elysiajs" | "fastify" | "adonisjs" | "astro" | "docusaurus" | "dotnet" | "express" | "fastapi" | "go" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "svelte" | "vue" | null | undefined;
|
|
@@ -140,6 +142,7 @@ export declare const useClientConfig: () => Ref<{
|
|
|
140
142
|
authentication?: any;
|
|
141
143
|
baseServerURL?: string | undefined;
|
|
142
144
|
proxyUrl?: string | undefined;
|
|
145
|
+
oauth2RedirectUri?: string | undefined;
|
|
143
146
|
searchHotKey?: "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
|
|
144
147
|
servers?: any[] | undefined;
|
|
145
148
|
_integration?: "elysiajs" | "fastify" | "adonisjs" | "astro" | "docusaurus" | "dotnet" | "express" | "fastapi" | "go" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "svelte" | "vue" | null | undefined;
|
|
@@ -183,4 +186,13 @@ export declare const useClientConfig: () => Ref<{
|
|
|
183
186
|
hideAddApi?: boolean | undefined;
|
|
184
187
|
} | undefined;
|
|
185
188
|
}>;
|
|
189
|
+
/**
|
|
190
|
+
* Resolve the default OAuth2 redirect URI.
|
|
191
|
+
*
|
|
192
|
+
* Priority:
|
|
193
|
+
* 1. Explicit oauth2RedirectUri config override.
|
|
194
|
+
* 2. Empty string in non-browser and file:// contexts.
|
|
195
|
+
* 3. Browser origin + pathname fallback.
|
|
196
|
+
*/
|
|
197
|
+
export declare const resolveDefaultOAuth2RedirectUri: (config: Pick<ApiClientConfiguration, "oauth2RedirectUri">) => string;
|
|
186
198
|
//# sourceMappingURL=useClientConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClientConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useClientConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAgC,MAAM,6BAA6B,CAAA;AACvG,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAe,MAAM,KAAK,CAAA;AAE9D,eAAO,MAAM,2BAA2B,EAAe,YAAY,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAA;AAEhG,0DAA0D;AAC1D,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"useClientConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useClientConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAgC,MAAM,6BAA6B,CAAA;AACvG,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAe,MAAM,KAAK,CAAA;AAE9D,eAAO,MAAM,2BAA2B,EAAe,YAAY,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAA;AAEhG,0DAA0D;AAC1D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAyF,CAAA;AAErH;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAAI,QAAQ,IAAI,CAAC,sBAAsB,EAAE,mBAAmB,CAAC,KAAG,MAU3G,CAAA"}
|
|
@@ -4,7 +4,20 @@ import { apiClientConfigurationSchema } from "@scalar/types/api-reference";
|
|
|
4
4
|
var CLIENT_CONFIGURATION_SYMBOL = Symbol();
|
|
5
5
|
/** Hook for easy access to the reference configuration */
|
|
6
6
|
var useClientConfig = () => inject(CLIENT_CONFIGURATION_SYMBOL, ref(apiClientConfigurationSchema.parse({})));
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the default OAuth2 redirect URI.
|
|
9
|
+
*
|
|
10
|
+
* Priority:
|
|
11
|
+
* 1. Explicit oauth2RedirectUri config override.
|
|
12
|
+
* 2. Empty string in non-browser and file:// contexts.
|
|
13
|
+
* 3. Browser origin + pathname fallback.
|
|
14
|
+
*/
|
|
15
|
+
var resolveDefaultOAuth2RedirectUri = (config) => {
|
|
16
|
+
if (config.oauth2RedirectUri) return config.oauth2RedirectUri;
|
|
17
|
+
if (typeof window === "undefined" || window.location.protocol === "file:") return "";
|
|
18
|
+
return window.location.origin + window.location.pathname;
|
|
19
|
+
};
|
|
7
20
|
//#endregion
|
|
8
|
-
export { CLIENT_CONFIGURATION_SYMBOL, useClientConfig };
|
|
21
|
+
export { CLIENT_CONFIGURATION_SYMBOL, resolveDefaultOAuth2RedirectUri, useClientConfig };
|
|
9
22
|
|
|
10
23
|
//# sourceMappingURL=useClientConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClientConfig.js","names":[],"sources":["../../src/hooks/useClientConfig.ts"],"sourcesContent":["import { type ApiClientConfiguration, apiClientConfigurationSchema } from '@scalar/types/api-reference'\nimport { type InjectionKey, type Ref, inject, ref } from 'vue'\n\nexport const CLIENT_CONFIGURATION_SYMBOL = Symbol() as InjectionKey<Ref<ApiClientConfiguration>>\n\n/** Hook for easy access to the reference configuration */\nexport const useClientConfig = () => inject(CLIENT_CONFIGURATION_SYMBOL, ref(apiClientConfigurationSchema.parse({})))\n"],"mappings":";;;AAGA,IAAa,8BAA8B,QAAQ;;AAGnD,IAAa,wBAAwB,OAAO,6BAA6B,IAAI,6BAA6B,MAAM,EAAE,CAAC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"useClientConfig.js","names":[],"sources":["../../src/hooks/useClientConfig.ts"],"sourcesContent":["import { type ApiClientConfiguration, apiClientConfigurationSchema } from '@scalar/types/api-reference'\nimport { type InjectionKey, type Ref, inject, ref } from 'vue'\n\nexport const CLIENT_CONFIGURATION_SYMBOL = Symbol() as InjectionKey<Ref<ApiClientConfiguration>>\n\n/** Hook for easy access to the reference configuration */\nexport const useClientConfig = () => inject(CLIENT_CONFIGURATION_SYMBOL, ref(apiClientConfigurationSchema.parse({})))\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":";;;AAGA,IAAa,8BAA8B,QAAQ;;AAGnD,IAAa,wBAAwB,OAAO,6BAA6B,IAAI,6BAA6B,MAAM,EAAE,CAAC,CAAC,CAAC;;;;;;;;;AAUrH,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"}
|
package/dist/libs/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export { parseEnvVariables } from './environment-parser.js';
|
|
|
4
4
|
export { ERRORS, type ErrorResponse, normalizeError, prettyErrorMessage } from './errors.js';
|
|
5
5
|
export { type EventBus, type EventBusListener, createEventBus } from './event-bus.js';
|
|
6
6
|
export { findRequestByPathMethod } from './find-request.js';
|
|
7
|
-
export { formatBytes, formatMs } from './formatters.js';
|
|
8
7
|
export { type OpenApiDocumentDetails, getOpenApiDocumentDetails } from './getOpenApiDocumentDetails.js';
|
|
9
8
|
export { DEFAULT_HOTKEYS, type HotKeyEvent, getModifiers, handleHotKeyDown, isInput } from './hot-keys.js';
|
|
10
9
|
export { isUrl } from './isUrl.js';
|
package/dist/libs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACrH,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AACzF,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/libs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACrH,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AACzF,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,KAAK,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACvG,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AACnG,OAAO,EAAE,KAAK,aAAa,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/libs/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import { createApiClient } from "./create-client.js";
|
|
|
5
5
|
import { getEnvColor } from "./env-helpers.js";
|
|
6
6
|
import { parseEnvVariables } from "./environment-parser.js";
|
|
7
7
|
import { ERRORS, normalizeError, prettyErrorMessage } from "./errors.js";
|
|
8
|
-
import { formatBytes, formatMs } from "./formatters.js";
|
|
9
8
|
import { isUrl } from "./isUrl.js";
|
|
10
9
|
import { getOpenApiDocumentDetails } from "./getOpenApiDocumentDetails.js";
|
|
11
10
|
import { DEFAULT_HOTKEYS, getModifiers, handleHotKeyDown, isInput } from "./hot-keys.js";
|
|
@@ -15,4 +14,4 @@ import { convertPostmanToOpenApi, getPostmanDocumentDetails, isPostmanCollection
|
|
|
15
14
|
import { buildRequestSecurity } from "./send-request/build-request-security.js";
|
|
16
15
|
import { decodeBuffer } from "./send-request/decode-buffer.js";
|
|
17
16
|
import { createRequestOperation } from "./send-request/create-request-operation.js";
|
|
18
|
-
export { DEFAULT_HOTKEYS, ERRORS, buildRequestSecurity, convertPostmanToOpenApi, createApiClient, createEventBus, createRequestOperation, decodeBuffer, findRequestByPathMethod,
|
|
17
|
+
export { DEFAULT_HOTKEYS, ERRORS, buildRequestSecurity, convertPostmanToOpenApi, createApiClient, createEventBus, createRequestOperation, decodeBuffer, findRequestByPathMethod, formatHeaderKey, getEnvColor, getModifiers, getOpenApiDocumentDetails, getPostmanDocumentDetails, handleHotKeyDown, isInput, isPostmanCollection, isUrl, loadAllResources, normalizeError, normalizeHeaders, parseCurlCommand, parseEnvVariables, prettyErrorMessage };
|