@scalar/api-client 2.9.1 → 2.10.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 +25 -0
- package/README.md +2 -2
- package/dist/libs/send-request/build-request-security.d.ts.map +1 -1
- package/dist/libs/send-request/build-request-security.js +1 -1
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +89 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +129 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue2.js +4 -0
- package/dist/v2/{features/operation → blocks/operation-block}/components/Header.vue.d.ts +8 -27
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/components/Header.vue.js +7 -0
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +93 -0
- package/dist/v2/blocks/operation-block/index.d.ts +2 -0
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/index.js +4 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +8 -24
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +60 -59
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +7 -28
- 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 +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +97 -87
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +7 -17
- 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 +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +46 -41
- 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 +4 -5
- 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 +47 -45
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +5 -5
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +7 -7
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +6 -9
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +255 -206
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +30 -25
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +140 -97
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +31 -29
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +32 -29
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +56 -51
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +2 -4
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +3 -3
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +39 -38
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +43 -42
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +62 -49
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
- package/dist/v2/features/app/helpers/routes.d.ts +5 -1
- 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/collection/DocumentCollection.vue2.js +27 -24
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +15 -12
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -25
- 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.vue2.js +27 -28
- package/dist/v2/features/collection/components/Environment.vue2.js +3 -0
- package/dist/v2/features/collection/components/Overview.vue2.js +24 -21
- package/dist/v2/features/operation/Operation.vue.d.ts +10 -77
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +56 -114
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +131 -18
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +8 -6
- package/package.json +17 -17
- package/dist/components/CodeInput/CodeInput.test.d.ts +0 -2
- package/dist/components/CodeInput/CodeInput.test.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts +0 -2
- package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/is-document.test.d.ts +0 -2
- package/dist/components/ImportCollection/utils/is-document.test.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/is-url.test.d.ts +0 -2
- package/dist/components/ImportCollection/utils/is-url.test.d.ts.map +0 -1
- package/dist/components/Search/useSearch.test.d.ts +0 -2
- package/dist/components/Search/useSearch.test.d.ts.map +0 -1
- package/dist/components/Server/ServerDropdown.test.d.ts +0 -2
- package/dist/components/Server/ServerDropdown.test.d.ts.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts +0 -2
- package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts.map +0 -1
- package/dist/hooks/useResponseBody.test.d.ts +0 -2
- package/dist/hooks/useResponseBody.test.d.ts.map +0 -1
- package/dist/hooks/useSidebar.test.d.ts +0 -2
- package/dist/hooks/useSidebar.test.d.ts.map +0 -1
- package/dist/layouts/App/create-api-client-app.test.d.ts +0 -2
- package/dist/layouts/App/create-api-client-app.test.d.ts.map +0 -1
- package/dist/layouts/Modal/create-api-client-modal.test.d.ts +0 -2
- package/dist/layouts/Modal/create-api-client-modal.test.d.ts.map +0 -1
- package/dist/layouts/Web/create-api-client-web.test.d.ts +0 -2
- package/dist/layouts/Web/create-api-client-web.test.d.ts.map +0 -1
- package/dist/libs/create-client.test.d.ts +0 -2
- package/dist/libs/create-client.test.d.ts.map +0 -1
- package/dist/libs/env-helpers.test.d.ts +0 -2
- package/dist/libs/env-helpers.test.d.ts.map +0 -1
- package/dist/libs/event-bus.test.d.ts +0 -2
- package/dist/libs/event-bus.test.d.ts.map +0 -1
- package/dist/libs/extractAttachmentFilename.test.d.ts +0 -2
- package/dist/libs/extractAttachmentFilename.test.d.ts.map +0 -1
- package/dist/libs/find-request.test.d.ts +0 -2
- package/dist/libs/find-request.test.d.ts.map +0 -1
- package/dist/libs/get-request-uid-by-path-method.test.d.ts +0 -2
- package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +0 -1
- package/dist/libs/hot-keys.test.d.ts +0 -2
- package/dist/libs/hot-keys.test.d.ts.map +0 -1
- package/dist/libs/importers/curl.test.d.ts +0 -2
- package/dist/libs/importers/curl.test.d.ts.map +0 -1
- package/dist/libs/normalize-headers.test.d.ts +0 -2
- package/dist/libs/normalize-headers.test.d.ts.map +0 -1
- package/dist/libs/parse-curl.test.d.ts +0 -2
- package/dist/libs/parse-curl.test.d.ts.map +0 -1
- package/dist/libs/send-request/build-request-security.test.d.ts +0 -2
- package/dist/libs/send-request/build-request-security.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-auth.test.d.ts +0 -2
- package/dist/libs/send-request/create-fetch-auth.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-body.test.d.ts +0 -2
- package/dist/libs/send-request/create-fetch-body.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-headers.test.d.ts +0 -2
- package/dist/libs/send-request/create-fetch-headers.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-query-params.test.d.ts +0 -2
- package/dist/libs/send-request/create-fetch-query-params.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-request-operation.test.d.ts +0 -191
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +0 -1
- package/dist/libs/send-request/decode-buffer.test.d.ts +0 -2
- package/dist/libs/send-request/decode-buffer.test.d.ts.map +0 -1
- package/dist/libs/send-request/set-request-cookies.test.d.ts +0 -2
- package/dist/libs/send-request/set-request-cookies.test.d.ts.map +0 -1
- package/dist/libs/string-template.test.d.ts +0 -2
- package/dist/libs/string-template.test.d.ts.map +0 -1
- package/dist/libs/validate-parameters.test.d.ts +0 -2
- package/dist/libs/validate-parameters.test.d.ts.map +0 -1
- package/dist/plugins/plugin-manager.test.d.ts +0 -2
- package/dist/plugins/plugin-manager.test.d.ts.map +0 -1
- package/dist/routes.test.d.ts +0 -2
- package/dist/routes.test.d.ts.map +0 -1
- package/dist/store/collections.test.d.ts +0 -2
- package/dist/store/collections.test.d.ts.map +0 -1
- package/dist/store/request.test.d.ts +0 -2
- package/dist/store/request.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +0 -1
- package/dist/v2/components/code-input/CodeInput.test.d.ts +0 -2
- package/dist/v2/components/code-input/CodeInput.test.d.ts.map +0 -1
- package/dist/v2/components/code-input/code-variable-widget.test.d.ts +0 -2
- package/dist/v2/components/code-input/code-variable-widget.test.d.ts.map +0 -1
- package/dist/v2/components/server/ServerDropdown.test.d.ts +0 -2
- package/dist/v2/components/server/ServerDropdown.test.d.ts.map +0 -1
- package/dist/v2/components/server/ServerDropdownItem.test.d.ts +0 -2
- package/dist/v2/components/server/ServerDropdownItem.test.d.ts.map +0 -1
- package/dist/v2/features/app/App.test.d.ts +0 -2
- package/dist/v2/features/app/App.test.d.ts.map +0 -1
- package/dist/v2/features/collection/DocumentCollection.test.d.ts +0 -2
- package/dist/v2/features/collection/DocumentCollection.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Authentication.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Authentication.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Environment.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Environment.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/LabelInput.test.d.ts +0 -2
- package/dist/v2/features/collection/components/LabelInput.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Overview.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Overview.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Servers.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Servers.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Settings.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Settings.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Tabs.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Tabs.test.d.ts.map +0 -1
- package/dist/v2/features/environments/EnvironmentsList.test.d.ts +0 -2
- package/dist/v2/features/environments/EnvironmentsList.test.d.ts.map +0 -1
- package/dist/v2/features/environments/components/Environment.test.d.ts +0 -2
- package/dist/v2/features/environments/components/Environment.test.d.ts.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts +0 -2
- package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts +0 -2
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts.map +0 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts +0 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts.map +0 -1
- package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts +0 -2
- package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts.map +0 -1
- package/dist/v2/features/operation/Operation.test.d.ts +0 -2
- package/dist/v2/features/operation/Operation.test.d.ts.map +0 -1
- package/dist/v2/features/operation/components/Header.test.d.ts +0 -2
- package/dist/v2/features/operation/components/Header.test.d.ts.map +0 -1
- package/dist/v2/features/operation/components/Header.vue.d.ts.map +0 -1
- package/dist/v2/features/operation/components/Header.vue.js +0 -7
- package/dist/v2/features/operation/components/Header.vue2.js +0 -97
- package/dist/v2/features/settings/Settings.test.d.ts +0 -2
- package/dist/v2/features/settings/Settings.test.d.ts.map +0 -1
- package/dist/v2/hooks/use-document-watcher.test.d.ts +0 -2
- package/dist/v2/hooks/use-document-watcher.test.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts +0 -2
- package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts +0 -2
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts +0 -2
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts +0 -2
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts.map +0 -1
- package/dist/views/Request/RequestRoot.test.d.ts +0 -2
- package/dist/views/Request/RequestRoot.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestBody.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestBody.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestSection.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestSection.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSubpageHeader.test.d.ts +0 -2
- package/dist/views/Request/RequestSubpageHeader.test.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts +0 -2
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts +0 -2
- package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts.map +0 -1
- package/dist/views/Request/consts/mediaTypes.test.d.ts +0 -2
- package/dist/views/Request/consts/mediaTypes.test.d.ts.map +0 -1
- package/dist/views/Request/libs/auth.test.d.ts +0 -2
- package/dist/views/Request/libs/auth.test.d.ts.map +0 -1
- package/dist/views/Request/libs/oauth2.test.d.ts +0 -2
- package/dist/views/Request/libs/oauth2.test.d.ts.map +0 -1
- package/dist/views/Request/libs/request.test.d.ts +0 -2
- package/dist/views/Request/libs/request.test.d.ts.map +0 -1
- package/dist/views/Request/libs/watch-mode.test.d.ts +0 -2
- package/dist/views/Request/libs/watch-mode.test.d.ts.map +0 -1
- package/dist/vitest.setup.d.ts +0 -34
- package/dist/vitest.setup.d.ts.map +0 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OperationBlock
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates the operation view by wiring together the Header, OperationBlock,
|
|
5
|
+
* and ResponseBlock. Forwards user interactions to the workspace event bus and
|
|
6
|
+
* passes through configuration such as auth, servers, plugins, and environment.
|
|
7
|
+
* This component keeps the Operation page lean by centralizing event emission
|
|
8
|
+
* and prop wiring between the blocks.
|
|
9
|
+
*
|
|
10
|
+
* Notable behavior:
|
|
11
|
+
* - Uses operation['x-scalar-method'] and operation['x-scalar-path'] to provide
|
|
12
|
+
* draft overrides for the UI when present.
|
|
13
|
+
*/
|
|
14
|
+
import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
|
|
15
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
16
|
+
import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
17
|
+
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
18
|
+
import type { AuthMeta } from '@scalar/workspace-store/mutators';
|
|
19
|
+
import type { OpenApiDocument } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
20
|
+
import type { OperationObject } from '@scalar/workspace-store/schemas/v3.1/strict/operation';
|
|
21
|
+
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
22
|
+
import type { ClientLayout } from '../../../hooks/index.js';
|
|
23
|
+
import type { EnvVariable } from '../../../store/index.js';
|
|
24
|
+
import { createStoreEvents } from '../../../store/events.js';
|
|
25
|
+
import { type History } from '../../../v2/blocks/scalar-address-bar-block/index.js';
|
|
26
|
+
import type { ClientPlugin } from '../../../v2/plugins';
|
|
27
|
+
type __VLS_Props = {
|
|
28
|
+
eventBus: WorkspaceEventBus;
|
|
29
|
+
/** Application version */
|
|
30
|
+
appVersion: string;
|
|
31
|
+
/** Current request path */
|
|
32
|
+
path: string;
|
|
33
|
+
/** Current request method */
|
|
34
|
+
method: HttpMethodType;
|
|
35
|
+
/** Client layout */
|
|
36
|
+
layout: ClientLayout;
|
|
37
|
+
/** Currently selected server */
|
|
38
|
+
server: ServerObject | undefined;
|
|
39
|
+
/** Server list available for operation/document */
|
|
40
|
+
servers: ServerObject[];
|
|
41
|
+
/** List of request history */
|
|
42
|
+
history: History[];
|
|
43
|
+
/**
|
|
44
|
+
* When the request is sent from the modal, this indicates the progress percentage
|
|
45
|
+
* of the request being sent.
|
|
46
|
+
*
|
|
47
|
+
* The amount remaining to load from 100 -> 0
|
|
48
|
+
*/
|
|
49
|
+
requestLoadingPercentage?: number;
|
|
50
|
+
/** Preprocessed response */
|
|
51
|
+
response?: ResponseInstance;
|
|
52
|
+
/** Original request instance */
|
|
53
|
+
request?: Request;
|
|
54
|
+
/** Total number of performed requests */
|
|
55
|
+
totalPerformedRequests: number;
|
|
56
|
+
/** Sidebar open state */
|
|
57
|
+
isSidebarOpen?: boolean;
|
|
58
|
+
/** Controls sidebar visibility */
|
|
59
|
+
showSidebar?: boolean;
|
|
60
|
+
/** Hides the client button on the header */
|
|
61
|
+
hideClientButton?: boolean;
|
|
62
|
+
/** Client integration */
|
|
63
|
+
integration?: string | null;
|
|
64
|
+
/** Openapi document url for `modal` mode to open the client app */
|
|
65
|
+
documentUrl?: string;
|
|
66
|
+
/** Client source */
|
|
67
|
+
source?: 'gitbook' | 'api-reference';
|
|
68
|
+
/** Operation object */
|
|
69
|
+
operation: OperationObject;
|
|
70
|
+
/** Currently selected example key for the current operation */
|
|
71
|
+
exampleKey: string;
|
|
72
|
+
/** Meta information for the auth update */
|
|
73
|
+
authMeta?: AuthMeta;
|
|
74
|
+
/** Document defined security schemes */
|
|
75
|
+
securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
|
|
76
|
+
/** Currently selected security for the current operation */
|
|
77
|
+
selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
|
|
78
|
+
/** Required security for the operation/document */
|
|
79
|
+
security: OpenApiDocument['security'];
|
|
80
|
+
/** Event bus */
|
|
81
|
+
events: ReturnType<typeof createStoreEvents>;
|
|
82
|
+
plugins?: ClientPlugin[];
|
|
83
|
+
/** TODO: to be removed once we fully migrate to the new store */
|
|
84
|
+
environment: Environment;
|
|
85
|
+
envVariables: EnvVariable[];
|
|
86
|
+
};
|
|
87
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
88
|
+
export default _default;
|
|
89
|
+
//# sourceMappingURL=OperationBlock.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"AAuMA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AAKtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAGnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAIhD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,iBAAiB,CAAA;IAE3B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAElB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IAEpB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IAEvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,yBAAyB;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oBAAoB;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,eAAe,CAAA;IAEpC,uBAAuB;IACvB,SAAS,EAAE,eAAe,CAAA;IAC1B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAElB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,wCAAwC;IACxC,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,4DAA4D;IAC5D,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,mDAAmD;IACnD,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAE5C,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IAExB,iEAAiE;IACjE,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;AAyOF,wBAMG"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { defineComponent as m, computed as s, createElementBlock as d, openBlock as h, createElementVNode as v, createVNode as o, withCtx as a, unref as i } from "vue";
|
|
2
|
+
import y from "../../../components/ViewLayout/ViewLayout.vue.js";
|
|
3
|
+
import f from "../../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
4
|
+
import B from "./components/Header.vue.js";
|
|
5
|
+
import g from "../scalar-operation-block/components/OperationBlock.vue.js";
|
|
6
|
+
import b from "../scalar-response-block/components/ResponseBlock.vue.js";
|
|
7
|
+
const S = { class: "bg-b-1 flex h-full flex-col" }, V = { class: "lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-1" }, R = /* @__PURE__ */ m({
|
|
8
|
+
__name: "OperationBlock",
|
|
9
|
+
props: {
|
|
10
|
+
eventBus: {},
|
|
11
|
+
appVersion: {},
|
|
12
|
+
path: {},
|
|
13
|
+
method: {},
|
|
14
|
+
layout: {},
|
|
15
|
+
server: {},
|
|
16
|
+
servers: {},
|
|
17
|
+
history: {},
|
|
18
|
+
requestLoadingPercentage: {},
|
|
19
|
+
response: {},
|
|
20
|
+
request: {},
|
|
21
|
+
totalPerformedRequests: {},
|
|
22
|
+
isSidebarOpen: { type: Boolean },
|
|
23
|
+
showSidebar: { type: Boolean },
|
|
24
|
+
hideClientButton: { type: Boolean },
|
|
25
|
+
integration: {},
|
|
26
|
+
documentUrl: {},
|
|
27
|
+
source: {},
|
|
28
|
+
operation: {},
|
|
29
|
+
exampleKey: {},
|
|
30
|
+
authMeta: {},
|
|
31
|
+
securitySchemes: {},
|
|
32
|
+
selectedSecurity: {},
|
|
33
|
+
security: {},
|
|
34
|
+
events: {},
|
|
35
|
+
plugins: {},
|
|
36
|
+
environment: {},
|
|
37
|
+
envVariables: {}
|
|
38
|
+
},
|
|
39
|
+
setup(u) {
|
|
40
|
+
const n = u, l = s(
|
|
41
|
+
() => n.operation["x-scalar-method"] ?? n.method
|
|
42
|
+
), p = s(() => n.operation["x-scalar-path"] ?? n.path);
|
|
43
|
+
return (e, t) => (h(), d("div", S, [
|
|
44
|
+
v("div", V, [
|
|
45
|
+
o(B, {
|
|
46
|
+
envVariables: e.envVariables,
|
|
47
|
+
environment: e.environment,
|
|
48
|
+
events: e.events,
|
|
49
|
+
history: e.history,
|
|
50
|
+
layout: e.layout,
|
|
51
|
+
method: l.value,
|
|
52
|
+
path: p.value,
|
|
53
|
+
percentage: e.requestLoadingPercentage,
|
|
54
|
+
server: e.server,
|
|
55
|
+
servers: e.servers,
|
|
56
|
+
isSidebarOpen: e.isSidebarOpen,
|
|
57
|
+
showSidebar: e.showSidebar,
|
|
58
|
+
hideClientButton: e.hideClientButton,
|
|
59
|
+
integration: e.integration,
|
|
60
|
+
documentUrl: e.documentUrl,
|
|
61
|
+
source: e.source,
|
|
62
|
+
eventBus: e.eventBus,
|
|
63
|
+
onExecute: t[0] || (t[0] = () => e.eventBus.emit("operation:send:request", {
|
|
64
|
+
meta: { path: e.path, method: e.method, exampleKey: e.exampleKey }
|
|
65
|
+
})),
|
|
66
|
+
"onUpdate:method": t[1] || (t[1] = (r) => e.eventBus.emit("operation:update:method", {
|
|
67
|
+
meta: {
|
|
68
|
+
method: e.method,
|
|
69
|
+
path: e.path
|
|
70
|
+
},
|
|
71
|
+
payload: {
|
|
72
|
+
method: r.value
|
|
73
|
+
}
|
|
74
|
+
})),
|
|
75
|
+
"onUpdate:path": t[2] || (t[2] = (r) => e.eventBus.emit("operation:update:path", {
|
|
76
|
+
meta: {
|
|
77
|
+
method: e.method,
|
|
78
|
+
path: e.path
|
|
79
|
+
},
|
|
80
|
+
payload: {
|
|
81
|
+
path: r.value
|
|
82
|
+
}
|
|
83
|
+
}))
|
|
84
|
+
}, null, 8, ["envVariables", "environment", "events", "history", "layout", "method", "path", "percentage", "server", "servers", "isSidebarOpen", "showSidebar", "hideClientButton", "integration", "documentUrl", "source", "eventBus"])
|
|
85
|
+
]),
|
|
86
|
+
o(y, null, {
|
|
87
|
+
default: a(() => [
|
|
88
|
+
o(f, { class: "flex flex-1" }, {
|
|
89
|
+
default: a(() => [
|
|
90
|
+
o(i(g), {
|
|
91
|
+
envVariables: e.envVariables,
|
|
92
|
+
environment: e.environment,
|
|
93
|
+
exampleKey: e.exampleKey,
|
|
94
|
+
layout: e.layout,
|
|
95
|
+
method: e.method,
|
|
96
|
+
operation: e.operation,
|
|
97
|
+
path: e.path,
|
|
98
|
+
authMeta: e.authMeta,
|
|
99
|
+
security: e.security,
|
|
100
|
+
eventBus: e.eventBus,
|
|
101
|
+
securitySchemes: e.securitySchemes,
|
|
102
|
+
selectedSecurity: e.selectedSecurity,
|
|
103
|
+
plugins: e.plugins
|
|
104
|
+
}, null, 8, ["envVariables", "environment", "exampleKey", "layout", "method", "operation", "path", "authMeta", "security", "eventBus", "securitySchemes", "selectedSecurity", "plugins"]),
|
|
105
|
+
o(i(b), {
|
|
106
|
+
appVersion: e.appVersion,
|
|
107
|
+
events: e.events,
|
|
108
|
+
layout: e.layout,
|
|
109
|
+
request: e.request,
|
|
110
|
+
response: e.response,
|
|
111
|
+
plugins: e.plugins,
|
|
112
|
+
eventBus: e.eventBus,
|
|
113
|
+
totalPerformedRequests: e.totalPerformedRequests,
|
|
114
|
+
onSendRequest: t[3] || (t[3] = (r) => e.eventBus.emit("operation:send:request", {
|
|
115
|
+
meta: { path: e.path, method: e.method, exampleKey: e.exampleKey }
|
|
116
|
+
}))
|
|
117
|
+
}, null, 8, ["appVersion", "events", "layout", "request", "response", "plugins", "eventBus", "totalPerformedRequests"])
|
|
118
|
+
]),
|
|
119
|
+
_: 1
|
|
120
|
+
})
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
})
|
|
124
|
+
]));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
export {
|
|
128
|
+
R as default
|
|
129
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
|
+
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
4
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/server';
|
|
4
5
|
import type { ClientLayout } from '../../../../hooks/index.js';
|
|
5
6
|
import type { EnvVariable } from '../../../../store/index.js';
|
|
@@ -37,49 +38,29 @@ type __VLS_Props = {
|
|
|
37
38
|
* The amount remaining to load from 100 -> 0
|
|
38
39
|
*/
|
|
39
40
|
requestLoadingPercentage?: number;
|
|
40
|
-
/**
|
|
41
41
|
/** Event bus */
|
|
42
42
|
events: ReturnType<typeof createStoreEvents>;
|
|
43
|
+
eventBus: WorkspaceEventBus;
|
|
43
44
|
/** TODO: to be removed once we fully migrate to the new store */
|
|
44
45
|
environment: Environment;
|
|
45
46
|
envVariables: EnvVariable[];
|
|
46
47
|
};
|
|
47
48
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
48
|
-
importCurl: (value: string) => any;
|
|
49
|
-
"update:variable": (payload: {
|
|
50
|
-
key: string;
|
|
51
|
-
value: string;
|
|
52
|
-
}) => any;
|
|
53
49
|
execute: () => any;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
id: string;
|
|
50
|
+
"update:path": (payload: {
|
|
51
|
+
value: string;
|
|
57
52
|
}) => any;
|
|
58
53
|
"update:method": (payload: {
|
|
59
|
-
|
|
60
|
-
}) => any;
|
|
61
|
-
"update:path": (payload: {
|
|
62
|
-
path: string;
|
|
54
|
+
value: HttpMethod;
|
|
63
55
|
}) => any;
|
|
64
|
-
"add:server": () => any;
|
|
65
56
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
66
|
-
onImportCurl?: ((value: string) => any) | undefined;
|
|
67
|
-
"onUpdate:variable"?: ((payload: {
|
|
68
|
-
key: string;
|
|
69
|
-
value: string;
|
|
70
|
-
}) => any) | undefined;
|
|
71
57
|
onExecute?: (() => any) | undefined;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
id: string;
|
|
58
|
+
"onUpdate:path"?: ((payload: {
|
|
59
|
+
value: string;
|
|
75
60
|
}) => any) | undefined;
|
|
76
61
|
"onUpdate:method"?: ((payload: {
|
|
77
|
-
|
|
78
|
-
}) => any) | undefined;
|
|
79
|
-
"onUpdate:path"?: ((payload: {
|
|
80
|
-
path: string;
|
|
62
|
+
value: HttpMethod;
|
|
81
63
|
}) => any) | undefined;
|
|
82
|
-
"onAdd:server"?: (() => any) | undefined;
|
|
83
64
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
84
65
|
export default _default;
|
|
85
66
|
//# sourceMappingURL=Header.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-block/components/Header.vue"],"names":[],"mappings":"AAyKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AAGtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAc,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAE/E,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,UAAU,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IAEpB,yBAAyB;IACzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oBAAoB;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,eAAe,CAAA;IAEpC,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IAEvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAE5C,QAAQ,EAAE,iBAAiB,CAAA;IAE3B,iEAAiE;IACjE,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;;eAQW,MAAM;;;eAMN,UAAU;;;;;eANV,MAAM;;;eAMN,UAAU;;;AAsOvB,wBAOG"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineComponent as m, createElementBlock as r, openBlock as n, createElementVNode as s, createVNode as d, createCommentVNode as l, normalizeClass as v, unref as i, createBlock as g } from "vue";
|
|
2
|
+
import { ScalarIcon as u } from "@scalar/components";
|
|
3
|
+
import f from "../../scalar-address-bar-block/components/AddressBar.vue.js";
|
|
4
|
+
import y from "../../../../components/OpenApiClientButton.vue.js";
|
|
5
|
+
const b = { class: "lg:min-h-header t-app__top-container flex w-full flex-wrap items-center justify-center border-b p-2 pt-2 lg:p-1 lg:pt-1" }, h = { class: "mb-2 flex w-1/2 flex-row items-center gap-1 lg:mb-0 lg:flex-1 lg:px-1" }, B = { class: "mb-2 flex w-1/2 flex-row items-center justify-end gap-1 lg:mb-0 lg:flex-1 lg:px-2.5" }, z = /* @__PURE__ */ m({
|
|
6
|
+
__name: "Header",
|
|
7
|
+
props: {
|
|
8
|
+
path: {},
|
|
9
|
+
method: {},
|
|
10
|
+
layout: {},
|
|
11
|
+
isSidebarOpen: { type: Boolean },
|
|
12
|
+
showSidebar: { type: Boolean, default: !0 },
|
|
13
|
+
hideClientButton: { type: Boolean, default: !1 },
|
|
14
|
+
integration: {},
|
|
15
|
+
documentUrl: {},
|
|
16
|
+
source: {},
|
|
17
|
+
server: {},
|
|
18
|
+
servers: {},
|
|
19
|
+
history: {},
|
|
20
|
+
requestLoadingPercentage: {},
|
|
21
|
+
events: {},
|
|
22
|
+
eventBus: {},
|
|
23
|
+
environment: {},
|
|
24
|
+
envVariables: {}
|
|
25
|
+
},
|
|
26
|
+
emits: ["execute", "update:path", "update:method"],
|
|
27
|
+
setup(C, { emit: p }) {
|
|
28
|
+
const a = p;
|
|
29
|
+
return (e, t) => (n(), r("div", b, [
|
|
30
|
+
s("div", h, [
|
|
31
|
+
e.showSidebar ? (n(), r("div", {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: v(["size-8", { hidden: e.layout === "modal" && !e.isSidebarOpen }])
|
|
34
|
+
}, null, 2)) : l("", !0)
|
|
35
|
+
]),
|
|
36
|
+
d(i(f), {
|
|
37
|
+
"onUpdate:method": t[0] || (t[0] = (o) => a("update:method", o)),
|
|
38
|
+
"onUpdate:path": t[1] || (t[1] = (o) => a("update:path", o)),
|
|
39
|
+
envVariables: e.envVariables,
|
|
40
|
+
environment: e.environment,
|
|
41
|
+
events: e.events,
|
|
42
|
+
history: e.history,
|
|
43
|
+
layout: e.layout,
|
|
44
|
+
method: e.method,
|
|
45
|
+
path: e.path,
|
|
46
|
+
percentage: e.requestLoadingPercentage,
|
|
47
|
+
server: e.server,
|
|
48
|
+
servers: e.servers,
|
|
49
|
+
eventBus: e.eventBus,
|
|
50
|
+
onExecute: t[2] || (t[2] = (o) => a("execute"))
|
|
51
|
+
}, null, 8, ["envVariables", "environment", "events", "history", "layout", "method", "path", "percentage", "server", "servers", "eventBus"]),
|
|
52
|
+
s("div", B, [
|
|
53
|
+
e.layout === "modal" && e.documentUrl && !e.hideClientButton ? (n(), g(i(y), {
|
|
54
|
+
key: 0,
|
|
55
|
+
buttonSource: "modal",
|
|
56
|
+
class: "!w-fit lg:-mr-1",
|
|
57
|
+
integration: e.integration ?? null,
|
|
58
|
+
source: e.source ?? "api-reference",
|
|
59
|
+
url: e.documentUrl
|
|
60
|
+
}, null, 8, ["integration", "source", "url"])) : l("", !0),
|
|
61
|
+
e.layout === "modal" ? (n(), r("button", {
|
|
62
|
+
key: 1,
|
|
63
|
+
class: "app-exit-button gitbook-hidden zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2",
|
|
64
|
+
type: "button",
|
|
65
|
+
onClick: t[3] || (t[3] = (o) => e.eventBus.emit("hide:modal"))
|
|
66
|
+
}, [
|
|
67
|
+
d(i(u), {
|
|
68
|
+
icon: "Close",
|
|
69
|
+
size: "lg",
|
|
70
|
+
thickness: "2"
|
|
71
|
+
}),
|
|
72
|
+
t[5] || (t[5] = s("span", { class: "sr-only" }, "Close Client", -1))
|
|
73
|
+
])) : l("", !0),
|
|
74
|
+
e.layout === "modal" ? (n(), r("button", {
|
|
75
|
+
key: 2,
|
|
76
|
+
class: "text-c-1 hover:bg-b-2 active:text-c-1 gitbook-show -mr-1.5 rounded p-2",
|
|
77
|
+
type: "button",
|
|
78
|
+
onClick: t[4] || (t[4] = (o) => e.eventBus.emit("hide:modal"))
|
|
79
|
+
}, [
|
|
80
|
+
d(i(u), {
|
|
81
|
+
icon: "Close",
|
|
82
|
+
size: "md",
|
|
83
|
+
thickness: "1.75"
|
|
84
|
+
}),
|
|
85
|
+
t[6] || (t[6] = s("span", { class: "sr-only" }, "Close Client", -1))
|
|
86
|
+
])) : l("", !0)
|
|
87
|
+
])
|
|
88
|
+
]));
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
export {
|
|
92
|
+
z as default
|
|
93
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HttpMethod as HttpMethodType } from '@scalar/helpers/http/http-methods';
|
|
2
2
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
|
+
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
4
|
import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
5
|
import { type ClientLayout } from '../../../../hooks/index.js';
|
|
5
6
|
import type { EnvVariable } from '../../../../store/active-entities.js';
|
|
@@ -22,43 +23,26 @@ type __VLS_Props = {
|
|
|
22
23
|
percentage?: number;
|
|
23
24
|
/** Event bus */
|
|
24
25
|
events: ReturnType<typeof createStoreEvents>;
|
|
26
|
+
eventBus: WorkspaceEventBus;
|
|
25
27
|
/** TODO: to be removed once we fully migrate to the new store */
|
|
26
28
|
environment: Environment;
|
|
27
29
|
envVariables: EnvVariable[];
|
|
28
30
|
};
|
|
29
31
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
30
|
-
addServer: () => any;
|
|
31
|
-
importCurl: (value: string) => any;
|
|
32
|
-
"update:variable": (payload: {
|
|
33
|
-
key: string;
|
|
34
|
-
value: string;
|
|
35
|
-
}) => any;
|
|
36
32
|
execute: () => any;
|
|
37
|
-
"update:
|
|
38
|
-
|
|
33
|
+
"update:path": (payload: {
|
|
34
|
+
value: string;
|
|
39
35
|
}) => any;
|
|
40
36
|
"update:method": (payload: {
|
|
41
|
-
|
|
42
|
-
}) => any;
|
|
43
|
-
"update:path": (payload: {
|
|
44
|
-
path: string;
|
|
37
|
+
value: HttpMethodType;
|
|
45
38
|
}) => any;
|
|
46
39
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
47
|
-
onAddServer?: (() => any) | undefined;
|
|
48
|
-
onImportCurl?: ((value: string) => any) | undefined;
|
|
49
|
-
"onUpdate:variable"?: ((payload: {
|
|
50
|
-
key: string;
|
|
51
|
-
value: string;
|
|
52
|
-
}) => any) | undefined;
|
|
53
40
|
onExecute?: (() => any) | undefined;
|
|
54
|
-
"onUpdate:
|
|
55
|
-
|
|
41
|
+
"onUpdate:path"?: ((payload: {
|
|
42
|
+
value: string;
|
|
56
43
|
}) => any) | undefined;
|
|
57
44
|
"onUpdate:method"?: ((payload: {
|
|
58
|
-
|
|
59
|
-
}) => any) | undefined;
|
|
60
|
-
"onUpdate:path"?: ((payload: {
|
|
61
|
-
path: string;
|
|
45
|
+
value: HttpMethodType;
|
|
62
46
|
}) => any) | undefined;
|
|
63
47
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
64
48
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"AAoTA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAKhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGvD,OAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IAE5C,QAAQ,EAAE,iBAAiB,CAAA;IAE3B,iEAAiE;IACjE,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;;eAmBW,MAAM;;;eAMN,cAAc;;;;;eANd,MAAM;;;eAMN,cAAc;;;AAsY3B,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AddressBar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-bc246159"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|