@scalar/api-client 2.6.1 → 2.8.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 +77 -0
- package/README.md +1 -1
- package/dist/analytics.d.ts +2 -18
- package/dist/analytics.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +66 -42
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +21 -22
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +4 -5
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +13 -14
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +0 -1
- package/dist/hooks/useAnalytics.d.ts +2 -18
- package/dist/hooks/useAnalytics.d.ts.map +1 -1
- package/dist/hooks/useClientConfig.d.ts +114 -120
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.js +6 -6
- package/dist/layouts/App/create-api-client-app.d.ts +1379 -1307
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +2754 -2610
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +1379 -1307
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +1379 -1307
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/find-request.d.ts +17 -17
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/send-request/build-request-security.d.ts +1 -1
- package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +2 -2
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +19 -19
- package/dist/libs/send-request/create-request-operation.test.d.ts +82 -82
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/plugins/plugin-manager.d.ts +3 -3
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +118 -118
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/collections.d.ts +127 -127
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +14 -14
- package/dist/store/environment.d.ts +23 -23
- package/dist/store/request-example.d.ts +546 -546
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/requests.d.ts +194 -194
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +281 -281
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/servers.d.ts +45 -45
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +1379 -1307
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +18 -18
- package/dist/store/tags.d.ts +35 -35
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +47 -47
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +2 -3
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.d.ts +25 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +30 -0
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue2.js +4 -0
- 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 +3 -3
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +104 -98
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +16 -14
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +31 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +6 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +198 -131
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts +4 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/index.js +10 -4
- 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 +31 -32
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -6
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +39 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +226 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +66 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +200 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +51 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +89 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue2.js +4 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +46 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +85 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +43 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +193 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue2.js +4 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue2.js +62 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts +8 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.js +9 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.js +12 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.js +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts +3 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.js +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts +11 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.js +32 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/index.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +20 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +98 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +47 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +182 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts +12 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +88 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.js +36 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts +13 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.js +14 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +64 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue2.js +41 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts +6 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +74 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.js +25 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts +11 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +52 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue3.js +5 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts +9 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +54 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts +23 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +88 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +41 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.js +61 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts +5 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.js +18 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts +4 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.js +12 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts +20 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.js +127 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts +17 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.js +16 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/index.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +54 -54
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +31 -32
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +54 -54
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +13 -14
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +5 -6
- package/dist/views/Request/libs/auth.d.ts +2 -2
- package/dist/views/Request/libs/watch-mode.d.ts +4 -4
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
- package/dist/views/Request/libs/watch-mode.js +241 -186
- package/package.json +21 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-parameter-content.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
/**
|
|
3
|
+
* Extract example from parameter object
|
|
4
|
+
*/
|
|
5
|
+
export declare const getParameterExample: (parameter: ParameterObject, exampleKey: string) => import("@scalar/workspace-store/schemas/v3.1/strict/example").ExampleObject | undefined;
|
|
6
|
+
//# sourceMappingURL=get-parameter-example.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-parameter-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAInG;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,WAAW,eAAe,EAAE,YAAY,MAAM,4FAYjF,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getResolvedRef as n } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
import { getParameterContentValue as r } from "./get-parameter-content.js";
|
|
3
|
+
const l = (e, t) => {
|
|
4
|
+
if ("examples" in e && e.examples)
|
|
5
|
+
return n(e.examples[t]);
|
|
6
|
+
const o = r(e);
|
|
7
|
+
if (o?.examples)
|
|
8
|
+
return n(o.examples[t]);
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
l as getParameterExample
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-parameter-example.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ParameterObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
/**
|
|
3
|
+
* Extract the schema from the parameter object
|
|
4
|
+
*/
|
|
5
|
+
export declare const getParameterSchema: (parameter: ParameterObject) => SchemaObject | undefined;
|
|
6
|
+
//# sourceMappingURL=get-parameter-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-parameter-schema.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIjH;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAW,eAAe,KAAG,YAAY,GAAG,SAM9E,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { getResolvedRef as t } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
import { getParameterContentValue as m } from "./get-parameter-content.js";
|
|
3
|
+
const c = (e) => "schema" in e && e.schema ? t(e.schema) : t(m(e)?.schema);
|
|
4
|
+
export {
|
|
5
|
+
c as getParameterSchema
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-parameter-schema.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
export declare const getExampleFromBody: (requestBody: RequestBodyObject, contentType: string, exampleKey: string) => import("@scalar/workspace-store/schemas/v3.1/strict/example").ExampleObject | undefined;
|
|
3
|
+
//# sourceMappingURL=get-request-body-example.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAErG,eAAO,MAAM,kBAAkB,GAAI,aAAa,iBAAiB,EAAE,aAAa,MAAM,EAAE,YAAY,MAAM,4FAEzG,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Group together array objects by a specific key
|
|
3
|
+
*/
|
|
4
|
+
export declare const groupBy: <T extends Record<string, unknown>, K extends keyof T, V extends string | number | symbol = Extract<T[K], string | number | symbol>>(arr: T[], key: K) => Record<V, T[]>;
|
|
5
|
+
//# sourceMappingURL=group-by.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-by.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/group-by.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,OAAO,GAClB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,CAAC,SAAS,MAAM,CAAC,EACjB,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EAE5E,KAAK,CAAC,EAAE,EACR,KAAK,CAAC,mBAQL,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-by.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/group-by.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the value of a example parameter is the expected type or format
|
|
4
|
+
*/
|
|
5
|
+
export declare const validateParameter: (schema?: SchemaObject, value?: string | File | null) => {
|
|
6
|
+
ok: true;
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=validate-parameter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-parameter.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/validate-parameter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,YAAY,EACrB,QAAQ,MAAM,GAAG,IAAI,GAAG,IAAI,KAC3B;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAgD7C,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const a = (e, t) => {
|
|
2
|
+
if (!e || !("type" in e) || typeof t != "string")
|
|
3
|
+
return { ok: !0 };
|
|
4
|
+
if (e.type === "integer" || e.type === "number") {
|
|
5
|
+
const r = Number(t);
|
|
6
|
+
if (isNaN(r))
|
|
7
|
+
return { ok: !1, message: "Value must be a number (e.g., 42.5)" };
|
|
8
|
+
if (e.type === "integer" && !Number.isInteger(r))
|
|
9
|
+
return { ok: !1, message: "Value must be a whole number (e.g., 42)" };
|
|
10
|
+
if (e.minimum !== void 0 && r < e.minimum)
|
|
11
|
+
return { ok: !1, message: `Value must be ${e.minimum} or greater` };
|
|
12
|
+
if (e.maximum !== void 0 && r > e.maximum)
|
|
13
|
+
return { ok: !1, message: `Value must be ${e.maximum} or less` };
|
|
14
|
+
}
|
|
15
|
+
if (e.type === "string" && e.format) {
|
|
16
|
+
if (e.format === "date" && !/^\d{4}-\d{2}-\d{2}$/.test(t ?? ""))
|
|
17
|
+
return { ok: !1, message: "Please enter a valid date in YYYY-MM-DD format (e.g., 2024-03-20)" };
|
|
18
|
+
if (e.format === "date-time" && !/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/.test(t ?? ""))
|
|
19
|
+
return {
|
|
20
|
+
ok: !1,
|
|
21
|
+
message: "Please enter a valid date and time in RFC 3339 format (e.g., 2024-03-20T13:45:30Z)"
|
|
22
|
+
};
|
|
23
|
+
if (e.format === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t ?? ""))
|
|
24
|
+
return { ok: !1, message: "Please enter a valid email address (e.g., user@example.com)" };
|
|
25
|
+
if (e.format === "uri" && !/^[a-zA-Z][a-zA-Z0-9+.-]*:.+$/.test(t ?? ""))
|
|
26
|
+
return { ok: !1, message: "Please enter a valid URI (e.g., https://example.com)" };
|
|
27
|
+
}
|
|
28
|
+
return { ok: !0 };
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
a as validateParameter
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-parameter.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/scalar-operation-block/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Headers.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/Headers.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Header = {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
headers: Header[];
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_5: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
title?: (props: typeof __VLS_5) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: 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>;
|
|
13
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=Headers.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Headers.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/Headers.vue"],"names":[],"mappings":"AA8EA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAC;AAsKF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA0B7C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { defineComponent as x, createBlock as f, openBlock as t, withCtx as e, createElementBlock as s, createVNode as n, unref as d, createTextVNode as l, Fragment as u, renderList as y, toDisplayString as i, renderSlot as h } from "vue";
|
|
2
|
+
import b from "../../../../components/DataTable/DataTable.vue.js";
|
|
3
|
+
import c from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
4
|
+
import _ from "../../../../components/DataTable/DataTableText.vue.js";
|
|
5
|
+
import g from "../../../../components/HelpfulLink.vue.js";
|
|
6
|
+
import k from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
7
|
+
import { httpHeaders as w } from "../../../../data/httpHeaders.js";
|
|
8
|
+
import p from "../../../../components/DataTable/DataTableHeader.vue.js";
|
|
9
|
+
const C = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "max-h-[calc(100%-32px)] overflow-y-auto"
|
|
12
|
+
}, H = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "text-c-3 bg-b-1 flex min-h-12 items-center justify-center rounded border px-4 text-base"
|
|
15
|
+
}, T = /* @__PURE__ */ x({
|
|
16
|
+
__name: "Headers",
|
|
17
|
+
props: {
|
|
18
|
+
headers: {}
|
|
19
|
+
},
|
|
20
|
+
setup($) {
|
|
21
|
+
const m = (r) => w.find(
|
|
22
|
+
(o) => o.name.toLowerCase() === r.toLowerCase()
|
|
23
|
+
);
|
|
24
|
+
return (r, o) => (t(), f(k, {
|
|
25
|
+
class: "overflow-auto",
|
|
26
|
+
defaultOpen: !1,
|
|
27
|
+
itemCount: r.headers.length
|
|
28
|
+
}, {
|
|
29
|
+
title: e(() => [
|
|
30
|
+
h(r.$slots, "title")
|
|
31
|
+
]),
|
|
32
|
+
default: e(() => [
|
|
33
|
+
r.headers.length ? (t(), s("div", C, [
|
|
34
|
+
n(b, {
|
|
35
|
+
columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
|
|
36
|
+
scroll: ""
|
|
37
|
+
}, {
|
|
38
|
+
default: e(() => [
|
|
39
|
+
n(c, { class: "sr-only !block" }, {
|
|
40
|
+
default: e(() => [
|
|
41
|
+
n(d(p), null, {
|
|
42
|
+
default: e(() => o[0] || (o[0] = [
|
|
43
|
+
l("Header Key")
|
|
44
|
+
])),
|
|
45
|
+
_: 1,
|
|
46
|
+
__: [0]
|
|
47
|
+
}),
|
|
48
|
+
n(d(p), null, {
|
|
49
|
+
default: e(() => o[1] || (o[1] = [
|
|
50
|
+
l("Header Value")
|
|
51
|
+
])),
|
|
52
|
+
_: 1,
|
|
53
|
+
__: [1]
|
|
54
|
+
})
|
|
55
|
+
]),
|
|
56
|
+
_: 1
|
|
57
|
+
}),
|
|
58
|
+
(t(!0), s(u, null, y(r.headers, (a) => (t(), f(c, {
|
|
59
|
+
key: a.name,
|
|
60
|
+
class: "group/row text-c-1"
|
|
61
|
+
}, {
|
|
62
|
+
default: e(() => [
|
|
63
|
+
n(_, { class: "bg-b-1 sticky left-0 z-1 max-w-full group-first/row:border-t-0" }, {
|
|
64
|
+
default: e(() => [
|
|
65
|
+
typeof m(a.name)?.url == "string" ? (t(), f(g, {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "decoration-c-3",
|
|
68
|
+
href: m(a.name).url
|
|
69
|
+
}, {
|
|
70
|
+
default: e(() => [
|
|
71
|
+
l(i(a.name), 1)
|
|
72
|
+
]),
|
|
73
|
+
_: 2
|
|
74
|
+
}, 1032, ["href"])) : (t(), s(u, { key: 1 }, [
|
|
75
|
+
l(i(a.name), 1)
|
|
76
|
+
], 64))
|
|
77
|
+
]),
|
|
78
|
+
_: 2
|
|
79
|
+
}, 1024),
|
|
80
|
+
n(_, {
|
|
81
|
+
class: "z-0 group-first/row:border-t-0",
|
|
82
|
+
text: a.value
|
|
83
|
+
}, null, 8, ["text"])
|
|
84
|
+
]),
|
|
85
|
+
_: 2
|
|
86
|
+
}, 1024))), 128))
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
})
|
|
90
|
+
])) : (t(), s("div", H, " No Headers "))
|
|
91
|
+
]),
|
|
92
|
+
_: 3
|
|
93
|
+
}, 8, ["itemCount"]));
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
export {
|
|
97
|
+
T as default
|
|
98
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBlock.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBlock.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ResponseInstance } from '@scalar/oas-utils/entities/spec';
|
|
2
|
+
import type { ClientLayout } from '../../../../hooks/index.js';
|
|
3
|
+
import type { createStoreEvents } from '../../../../store/events.js';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
/** Preprocessed response */
|
|
6
|
+
response?: ResponseInstance;
|
|
7
|
+
/** Original request instance */
|
|
8
|
+
request?: Request;
|
|
9
|
+
/** Client layout */
|
|
10
|
+
layout: ClientLayout;
|
|
11
|
+
/** Total number of performed requests */
|
|
12
|
+
totalPerformedRequests: number;
|
|
13
|
+
/** Application version */
|
|
14
|
+
appVersion: string;
|
|
15
|
+
/** Event bus */
|
|
16
|
+
events: ReturnType<typeof createStoreEvents>;
|
|
17
|
+
};
|
|
18
|
+
declare const responseSections: readonly ["Cookies", "Headers", "Body"];
|
|
19
|
+
type Filter = 'All' | (typeof responseSections)[number];
|
|
20
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
21
|
+
responseHeaders: import("vue").ComputedRef<{
|
|
22
|
+
name: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}[]>;
|
|
25
|
+
responseCookies: import("vue").ComputedRef<{
|
|
26
|
+
name: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}[]>;
|
|
29
|
+
requestHeaders: import("vue").ComputedRef<{
|
|
30
|
+
name: string;
|
|
31
|
+
value: string;
|
|
32
|
+
required: boolean;
|
|
33
|
+
}[]>;
|
|
34
|
+
shouldVirtualize: import("vue").ComputedRef<boolean>;
|
|
35
|
+
activeFilter: import("vue").Ref<Filter, Filter>;
|
|
36
|
+
filters: import("vue").ComputedRef<Filter[]>;
|
|
37
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
38
|
+
openCommandPalette: () => any;
|
|
39
|
+
sendRequest: () => any;
|
|
40
|
+
addRequest: () => any;
|
|
41
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
42
|
+
onOpenCommandPalette?: (() => any) | undefined;
|
|
43
|
+
onSendRequest?: (() => any) | undefined;
|
|
44
|
+
onAddRequest?: (() => any) | undefined;
|
|
45
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
export default _default;
|
|
47
|
+
//# sourceMappingURL=ResponseBlock.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBlock.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBlock.vue"],"names":[],"mappings":"AA+RA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAKvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAYvD,KAAK,WAAW,GAAG;IACjB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,yCAAyC;IACzC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,0BAA0B;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB;IAChB,MAAM,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;CAC7C,CAAC;AAwCF,QAAA,MAAM,gBAAgB,yCAA0C,CAAA;AAChE,KAAK,MAAM,GAAG,KAAK,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyYvD,wBAQG"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { defineComponent as S, computed as i, ref as I, useId as E, createBlock as a, openBlock as o, withCtx as d, createElementVNode as m, normalizeClass as V, createElementBlock as y, createVNode as A, Fragment as k, createCommentVNode as u, createTextVNode as g, renderList as O, unref as B, withDirectives as z, resolveDynamicComponent as M, mergeProps as N, vShow as L } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as j } from "@scalar/components";
|
|
3
|
+
import D from "../../../../components/SectionFilter.vue.js";
|
|
4
|
+
import F from "../../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
5
|
+
import C from "./Headers.vue.js";
|
|
6
|
+
import { textMediaTypes as w } from "../helpers/media-types.js";
|
|
7
|
+
import U from "./ResponseBody.vue.js";
|
|
8
|
+
import K from "./ResponseBodyStreaming.vue.js";
|
|
9
|
+
import Z from "./ResponseBodyVirtual.vue.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
import G from "./ResponseCookies.vue.js";
|
|
12
|
+
import J from "./ResponseEmpty.vue.js";
|
|
13
|
+
import Q from "./ResponseLoadingOverlay.vue.js";
|
|
14
|
+
import W from "./ResponseMetaInformation.vue.js";
|
|
15
|
+
import { usePluginManager as X } from "../../../../plugins/hooks/usePluginManager.js";
|
|
16
|
+
const Y = { class: "flex h-8 flex-1 items-center" }, x = ["id", "role"], b = 2e5, ce = /* @__PURE__ */ S({
|
|
17
|
+
__name: "ResponseBlock",
|
|
18
|
+
props: {
|
|
19
|
+
response: {},
|
|
20
|
+
request: {},
|
|
21
|
+
layout: {},
|
|
22
|
+
totalPerformedRequests: {},
|
|
23
|
+
appVersion: {},
|
|
24
|
+
events: {}
|
|
25
|
+
},
|
|
26
|
+
emits: ["addRequest", "sendRequest", "openCommandPalette"],
|
|
27
|
+
setup(t, { expose: H, emit: P }) {
|
|
28
|
+
const f = P, T = X().getViewComponents("response.section"), p = i(() => {
|
|
29
|
+
const e = t.response?.headers;
|
|
30
|
+
return e ? Object.keys(e).map((s) => ({
|
|
31
|
+
name: s,
|
|
32
|
+
value: e[s] ?? ""
|
|
33
|
+
})) : [];
|
|
34
|
+
}), R = i(
|
|
35
|
+
() => t.response?.cookieHeaderKeys.flatMap((e) => {
|
|
36
|
+
const s = t.response?.headers?.[e];
|
|
37
|
+
return s ? {
|
|
38
|
+
name: e,
|
|
39
|
+
value: s
|
|
40
|
+
} : [];
|
|
41
|
+
}) ?? []
|
|
42
|
+
), $ = ["Cookies", "Headers", "Body"], n = I("All"), v = i(() => ["All", ...$]), l = i(
|
|
43
|
+
() => Object.fromEntries(
|
|
44
|
+
v.value.map((e) => [e, E()])
|
|
45
|
+
)
|
|
46
|
+
), h = i(() => {
|
|
47
|
+
if (!t.response || !("size" in t.response))
|
|
48
|
+
return !1;
|
|
49
|
+
const e = t.response.headers?.["content-type"] || t.response.headers?.["Content-Type"];
|
|
50
|
+
return !e || (t.response.size ?? 0) <= b || e.includes("text/html") ? !1 : w.some((r) => e.includes(r)) && (t.response.size ?? 0) > b;
|
|
51
|
+
}), q = i(
|
|
52
|
+
() => t.request?.headers ? [...t.request.headers].map((e) => ({
|
|
53
|
+
name: e[0],
|
|
54
|
+
value: e[1],
|
|
55
|
+
required: !1
|
|
56
|
+
})) : []
|
|
57
|
+
), c = (e) => e === "All" || n.value === e;
|
|
58
|
+
return H({
|
|
59
|
+
responseHeaders: p,
|
|
60
|
+
responseCookies: R,
|
|
61
|
+
requestHeaders: q,
|
|
62
|
+
shouldVirtualize: h,
|
|
63
|
+
activeFilter: n,
|
|
64
|
+
filters: v
|
|
65
|
+
}), (e, s) => (o(), a(F, { "aria-label": "Response" }, {
|
|
66
|
+
title: d(() => [
|
|
67
|
+
m("div", Y, [
|
|
68
|
+
m("div", {
|
|
69
|
+
"aria-live": "polite",
|
|
70
|
+
class: V(["flex items-center", { "animate-response-heading": e.response }])
|
|
71
|
+
}, [
|
|
72
|
+
s[4] || (s[4] = m("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
|
|
73
|
+
e.response ? (o(), a(W, {
|
|
74
|
+
key: 0,
|
|
75
|
+
class: "animate-response-children",
|
|
76
|
+
events: e.events,
|
|
77
|
+
response: e.response
|
|
78
|
+
}, null, 8, ["events", "response"])) : u("", !0)
|
|
79
|
+
], 2),
|
|
80
|
+
A(D, {
|
|
81
|
+
modelValue: n.value,
|
|
82
|
+
"onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
|
|
83
|
+
filterIds: l.value,
|
|
84
|
+
filters: v.value
|
|
85
|
+
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
86
|
+
])
|
|
87
|
+
]),
|
|
88
|
+
default: d(() => [
|
|
89
|
+
m("div", {
|
|
90
|
+
id: l.value.All,
|
|
91
|
+
class: V(["custom-scroll response-section-content relative grid h-full justify-stretch", {
|
|
92
|
+
"content-start": e.response
|
|
93
|
+
}]),
|
|
94
|
+
role: n.value === "All" && e.response ? "tabpanel" : "none"
|
|
95
|
+
}, [
|
|
96
|
+
e.response ? (o(), y(k, { key: 1 }, [
|
|
97
|
+
c("Cookies") ? (o(), a(G, {
|
|
98
|
+
key: 0,
|
|
99
|
+
id: l.value.Cookies,
|
|
100
|
+
class: "response-section-content-cookies",
|
|
101
|
+
cookies: R.value,
|
|
102
|
+
role: n.value === "All" ? "none" : "tabpanel"
|
|
103
|
+
}, null, 8, ["id", "cookies", "role"])) : u("", !0),
|
|
104
|
+
c("Headers") ? (o(), a(C, {
|
|
105
|
+
key: 1,
|
|
106
|
+
id: l.value.Headers,
|
|
107
|
+
class: "response-section-content-headers",
|
|
108
|
+
headers: q.value,
|
|
109
|
+
role: n.value === "All" ? "none" : "tabpanel"
|
|
110
|
+
}, {
|
|
111
|
+
title: d(() => s[5] || (s[5] = [
|
|
112
|
+
g("Request Headers")
|
|
113
|
+
])),
|
|
114
|
+
_: 1
|
|
115
|
+
}, 8, ["id", "headers", "role"])) : u("", !0),
|
|
116
|
+
c("Headers") ? (o(), a(C, {
|
|
117
|
+
key: 2,
|
|
118
|
+
id: l.value.Headers,
|
|
119
|
+
class: "response-section-content-headers",
|
|
120
|
+
headers: p.value,
|
|
121
|
+
role: n.value === "All" ? "none" : "tabpanel"
|
|
122
|
+
}, {
|
|
123
|
+
title: d(() => s[6] || (s[6] = [
|
|
124
|
+
g("Response Headers")
|
|
125
|
+
])),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["id", "headers", "role"])) : u("", !0),
|
|
128
|
+
(o(!0), y(k, null, O(B(T), (r) => (o(), a(B(j), {
|
|
129
|
+
key: r.component
|
|
130
|
+
}, {
|
|
131
|
+
default: d(() => [
|
|
132
|
+
z((o(), a(M(r.component), N({ ref_for: !0 }, r.props ?? {}), null, 16)), [
|
|
133
|
+
[L, n.value === "All" || n.value === r.title]
|
|
134
|
+
])
|
|
135
|
+
]),
|
|
136
|
+
_: 2
|
|
137
|
+
}, 1024))), 128)),
|
|
138
|
+
n.value === "All" || n.value === "Body" ? (o(), y(k, { key: 3 }, [
|
|
139
|
+
"reader" in e.response ? (o(), a(K, {
|
|
140
|
+
key: 0,
|
|
141
|
+
id: l.value.Body,
|
|
142
|
+
class: "response-section-content-body",
|
|
143
|
+
reader: e.response.reader
|
|
144
|
+
}, null, 8, ["id", "reader"])) : h.value && typeof e.response?.data == "string" ? (o(), a(Z, {
|
|
145
|
+
key: 1,
|
|
146
|
+
id: l.value.Body,
|
|
147
|
+
content: e.response.data,
|
|
148
|
+
data: e.response?.data,
|
|
149
|
+
headers: p.value,
|
|
150
|
+
role: n.value === "All" ? "none" : "tabpanel"
|
|
151
|
+
}, null, 8, ["id", "content", "data", "headers", "role"])) : (o(), a(U, {
|
|
152
|
+
key: 2,
|
|
153
|
+
id: l.value.Body,
|
|
154
|
+
active: !0,
|
|
155
|
+
class: "response-section-content-body",
|
|
156
|
+
data: e.response?.data,
|
|
157
|
+
headers: p.value,
|
|
158
|
+
layout: "client",
|
|
159
|
+
role: n.value === "All" ? "none" : "tabpanel",
|
|
160
|
+
title: "Body"
|
|
161
|
+
}, null, 8, ["id", "data", "headers", "role"]))
|
|
162
|
+
], 64)) : u("", !0)
|
|
163
|
+
], 64)) : (o(), a(J, {
|
|
164
|
+
key: 0,
|
|
165
|
+
appVersion: e.appVersion,
|
|
166
|
+
events: e.events,
|
|
167
|
+
layout: e.layout,
|
|
168
|
+
totalPerformedRequests: e.totalPerformedRequests,
|
|
169
|
+
onAddRequest: s[1] || (s[1] = (r) => f("addRequest")),
|
|
170
|
+
onOpenCommandPalette: s[2] || (s[2] = (r) => f("openCommandPalette")),
|
|
171
|
+
onSendRequest: s[3] || (s[3] = (r) => f("sendRequest"))
|
|
172
|
+
}, null, 8, ["appVersion", "events", "layout", "totalPerformedRequests"])),
|
|
173
|
+
A(Q, { events: e.events }, null, 8, ["events"])
|
|
174
|
+
], 10, x)
|
|
175
|
+
]),
|
|
176
|
+
_: 1
|
|
177
|
+
}));
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
export {
|
|
181
|
+
ce as default
|
|
182
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
layout: 'client' | 'reference';
|
|
4
|
+
data: unknown;
|
|
5
|
+
headers: {
|
|
6
|
+
name: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
10
|
+
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>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=ResponseBody.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-response-block/components/ResponseBody.vue"],"names":[],"mappings":"AAuGA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC3C,CAAC;;AAuLF,wBAMG"}
|