@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
|
@@ -7,17 +7,13 @@ export declare const formatScheme: ({ name, type, value, }: {
|
|
|
7
7
|
}) => {
|
|
8
8
|
id: string;
|
|
9
9
|
label: string;
|
|
10
|
-
value:
|
|
11
|
-
[x: string]: string[];
|
|
12
|
-
};
|
|
10
|
+
value: import("@scalar/workspace-store/schemas/v3.1/strict/security-requirement").SecurityRequirementObject;
|
|
13
11
|
};
|
|
14
12
|
/** Formats complex security schemes */
|
|
15
13
|
export declare const formatComplexScheme: (scheme: NonNullable<OpenApiDocument["security"]>[number]) => {
|
|
16
14
|
id: string;
|
|
17
15
|
label: string;
|
|
18
|
-
value:
|
|
19
|
-
[x: string]: string[];
|
|
20
|
-
};
|
|
16
|
+
value: import("@scalar/workspace-store/schemas/v3.1/strict/security-requirement").SecurityRequirementObject;
|
|
21
17
|
};
|
|
22
18
|
export type SecuritySchemeOption = {
|
|
23
19
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,mDAAmD;AACnD,eAAO,MAAM,YAAY,GAAI,wBAI1B;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAC9C,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;CAC1E
|
|
1
|
+
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACrB,MAAM,8DAA8D,CAAA;AAIrE,mDAAmD;AACnD,eAAO,MAAM,YAAY,GAAI,wBAI1B;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IAC9C,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;CAC1E;;;;CAIC,CAAA;AAEF,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,GAAI,QAAQ,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;;;;CASzF,CAAA;AAEH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACzE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,oBAAoB,EAAE,CAAA;CAChC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAClD,iBAAiB,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,EACjE,aAAY,OAAe,KAC1B,oBAAoB,EAAE,GAAG,mBAAmB,EA6D9C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationBlock.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBlock.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
|
+
import type { OpenApiDocument, OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
|
+
import type { ClientLayout } from '../../../../hooks/index.js';
|
|
5
|
+
import type { EnvVariable } from '../../../../store/index.js';
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/** Operation method */
|
|
8
|
+
method: HttpMethod;
|
|
9
|
+
/** Operation path */
|
|
10
|
+
path: string;
|
|
11
|
+
/** Operation object */
|
|
12
|
+
operation: OperationObject;
|
|
13
|
+
/** Currently selected example key for the current operation */
|
|
14
|
+
exampleKey: string;
|
|
15
|
+
/** Currently selected content type for the current operation example */
|
|
16
|
+
selectedContentType?: string;
|
|
17
|
+
/** Document defined security schemes */
|
|
18
|
+
securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
|
|
19
|
+
/** Currently selected security for the current operation */
|
|
20
|
+
selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
|
|
21
|
+
/** Required security for the operation/document */
|
|
22
|
+
security: OpenApiDocument['security'];
|
|
23
|
+
/** Currently selected server for the current operation/document/workspace */
|
|
24
|
+
server?: ServerObject;
|
|
25
|
+
/** Client layout */
|
|
26
|
+
layout: ClientLayout;
|
|
27
|
+
/** TODO: remove when we migrate */
|
|
28
|
+
environment: Environment;
|
|
29
|
+
envVariables: EnvVariable[];
|
|
30
|
+
};
|
|
31
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
[x: string]: any;
|
|
33
|
+
} & {
|
|
34
|
+
[x: string]: any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
36
|
+
[x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
export default _default;
|
|
39
|
+
//# sourceMappingURL=OperationBlock.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBlock.vue"],"names":[],"mappings":"AAmcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAGzE,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAGf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAO1C,KAAK,WAAW,GAAG;IACjB,uBAAuB;IACvB,MAAM,EAAE,UAAU,CAAA;IAClB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,uBAAuB;IACvB,SAAS,EAAE,eAAe,CAAA;IAC1B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,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,6EAA6E;IAC7E,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IAEpB,mCAAmC;IACnC,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;;;;;;AAyoBF,wBAOG"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { defineComponent as g, ref as D, computed as f, useId as q, watch as O, createBlock as U, openBlock as y, withCtx as k, withDirectives as p, createVNode as s, unref as o, vShow as m, createElementVNode as T, createElementBlock as b, createCommentVNode as N, toDisplayString as H } from "vue";
|
|
2
|
+
import { canMethodHaveBody as V, REGEX as K } from "@scalar/oas-utils/helpers";
|
|
3
|
+
import { getResolvedRef as R } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
|
+
import I from "../../../../components/SectionFilter.vue.js";
|
|
5
|
+
import E from "../../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
6
|
+
import P from "./OperationBody.vue.js";
|
|
7
|
+
import v from "./OperationParams.vue.js";
|
|
8
|
+
import { groupBy as Q } from "../helpers/group-by.js";
|
|
9
|
+
import $ from "../../scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
10
|
+
const j = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, z = ["for"], F = ["id", "placeholder", "value"], L = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "text-c-1 flex h-8 items-center"
|
|
13
|
+
}, _ = /* @__PURE__ */ g({
|
|
14
|
+
__name: "OperationBlock",
|
|
15
|
+
props: {
|
|
16
|
+
method: {},
|
|
17
|
+
path: {},
|
|
18
|
+
operation: {},
|
|
19
|
+
exampleKey: {},
|
|
20
|
+
selectedContentType: {},
|
|
21
|
+
securitySchemes: {},
|
|
22
|
+
selectedSecurity: {},
|
|
23
|
+
security: {},
|
|
24
|
+
server: {},
|
|
25
|
+
layout: {},
|
|
26
|
+
environment: {},
|
|
27
|
+
envVariables: {}
|
|
28
|
+
},
|
|
29
|
+
emits: ["operation:update:requestName", "auth:delete", "auth:update:securityScheme", "auth:update:selectedScopes", "auth:update:selectedSecurity", "parameters:add", "parameters:update", "parameters:delete", "parameters:deleteAll", "requestBody:update:contentType", "requestBody:update:value", "requestBody:add:formRow", "requestBody:update:formRow"],
|
|
30
|
+
setup(l, { emit: h }) {
|
|
31
|
+
const a = h, i = Q(
|
|
32
|
+
l.operation.parameters?.map((r) => R(r)) ?? [],
|
|
33
|
+
"in"
|
|
34
|
+
), w = [
|
|
35
|
+
"Auth",
|
|
36
|
+
"Variables",
|
|
37
|
+
"Cookies",
|
|
38
|
+
"Headers",
|
|
39
|
+
"Query",
|
|
40
|
+
"Body"
|
|
41
|
+
], d = D("All"), A = f(() => {
|
|
42
|
+
const r = /* @__PURE__ */ new Set(["All", ...w]);
|
|
43
|
+
return i.path?.length || r.delete("Variables"), V(l.method) || r.delete("Body"), S.value && r.delete("Auth"), [...r];
|
|
44
|
+
}), n = f(
|
|
45
|
+
() => Object.fromEntries(
|
|
46
|
+
A.value.map((r) => [r, q()])
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
O(
|
|
50
|
+
() => l.method,
|
|
51
|
+
(r) => {
|
|
52
|
+
d.value === "Body" && !V(r) && (d.value = "All");
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
const S = f(
|
|
56
|
+
() => l.layout === "modal" && !l.operation.security && !Object.keys(l.securitySchemes ?? {}).length
|
|
57
|
+
), C = () => l.operation.summary ? l.operation.summary : l.path.replace(K.PROTOCOL, "") ? l.path.replace(K.PROTOCOL, "") : "Request Name", u = (r) => d.value === "All" || d.value === r, B = q();
|
|
58
|
+
return (r, e) => (y(), U(E, {
|
|
59
|
+
"aria-label": `Request: ${r.operation.summary}`
|
|
60
|
+
}, {
|
|
61
|
+
title: k(() => [
|
|
62
|
+
T("div", j, [
|
|
63
|
+
r.layout !== "modal" ? (y(), b("label", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
|
|
66
|
+
for: o(B)
|
|
67
|
+
}, null, 8, z)) : N("", !0),
|
|
68
|
+
r.layout !== "modal" ? (y(), b("input", {
|
|
69
|
+
key: 1,
|
|
70
|
+
id: o(B),
|
|
71
|
+
class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
|
|
72
|
+
placeholder: C(),
|
|
73
|
+
value: r.operation.summary,
|
|
74
|
+
onInput: e[0] || (e[0] = (t) => a("operation:update:requestName", {
|
|
75
|
+
name: t.target.value
|
|
76
|
+
}))
|
|
77
|
+
}, null, 40, F)) : (y(), b("span", L, H(r.operation.summary), 1))
|
|
78
|
+
]),
|
|
79
|
+
s(I, {
|
|
80
|
+
modelValue: d.value,
|
|
81
|
+
"onUpdate:modelValue": e[1] || (e[1] = (t) => d.value = t),
|
|
82
|
+
filterIds: n.value,
|
|
83
|
+
filters: A.value
|
|
84
|
+
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
85
|
+
]),
|
|
86
|
+
default: k(() => [
|
|
87
|
+
p(s(o($), {
|
|
88
|
+
id: n.value.Auth,
|
|
89
|
+
envVariables: r.envVariables,
|
|
90
|
+
environment: r.environment,
|
|
91
|
+
layout: "client",
|
|
92
|
+
security: r.security,
|
|
93
|
+
securitySchemes: r.securitySchemes,
|
|
94
|
+
selectedSecurity: r.selectedSecurity,
|
|
95
|
+
server: r.server,
|
|
96
|
+
title: "Authorization",
|
|
97
|
+
onDeleteOperationAuth: e[2] || (e[2] = (t) => a("auth:delete", t)),
|
|
98
|
+
"onUpdate:securityScheme": e[3] || (e[3] = (t) => a("auth:update:securityScheme", t)),
|
|
99
|
+
"onUpdate:selectedScopes": e[4] || (e[4] = (t) => a("auth:update:selectedScopes", t)),
|
|
100
|
+
"onUpdate:selectedSecurity": e[5] || (e[5] = (t) => a("auth:update:selectedSecurity", t))
|
|
101
|
+
}, null, 8, ["id", "envVariables", "environment", "security", "securitySchemes", "selectedSecurity", "server"]), [
|
|
102
|
+
[m, u("Auth") && !S.value]
|
|
103
|
+
]),
|
|
104
|
+
p(s(v, {
|
|
105
|
+
id: n.value.Variables,
|
|
106
|
+
envVariables: r.envVariables,
|
|
107
|
+
environment: r.environment,
|
|
108
|
+
exampleKey: r.exampleKey,
|
|
109
|
+
parameters: o(i).path ?? [],
|
|
110
|
+
title: "Variables",
|
|
111
|
+
onAdd: e[6] || (e[6] = (t) => a("parameters:add", {
|
|
112
|
+
type: "path",
|
|
113
|
+
payload: t
|
|
114
|
+
})),
|
|
115
|
+
onDelete: e[7] || (e[7] = (t) => a("parameters:delete", {
|
|
116
|
+
type: "path",
|
|
117
|
+
...t
|
|
118
|
+
})),
|
|
119
|
+
onDeleteAll: e[8] || (e[8] = () => a("parameters:deleteAll", {
|
|
120
|
+
type: "path"
|
|
121
|
+
})),
|
|
122
|
+
onUpdate: e[9] || (e[9] = (t) => a("parameters:update", {
|
|
123
|
+
type: "path",
|
|
124
|
+
...t
|
|
125
|
+
}))
|
|
126
|
+
}, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
|
|
127
|
+
[m, u("Variables") && o(i).path?.length]
|
|
128
|
+
]),
|
|
129
|
+
p(s(v, {
|
|
130
|
+
id: n.value.Cookies,
|
|
131
|
+
envVariables: r.envVariables,
|
|
132
|
+
environment: r.environment,
|
|
133
|
+
exampleKey: r.exampleKey,
|
|
134
|
+
parameters: o(i).cookie ?? [],
|
|
135
|
+
title: "Cookies",
|
|
136
|
+
onAdd: e[10] || (e[10] = (t) => a("parameters:add", {
|
|
137
|
+
type: "cookie",
|
|
138
|
+
payload: t
|
|
139
|
+
})),
|
|
140
|
+
onDelete: e[11] || (e[11] = (t) => a("parameters:delete", {
|
|
141
|
+
type: "cookie",
|
|
142
|
+
...t
|
|
143
|
+
})),
|
|
144
|
+
onDeleteAll: e[12] || (e[12] = () => a("parameters:deleteAll", {
|
|
145
|
+
type: "cookie"
|
|
146
|
+
})),
|
|
147
|
+
onUpdate: e[13] || (e[13] = (t) => a("parameters:update", {
|
|
148
|
+
type: "cookie",
|
|
149
|
+
...t
|
|
150
|
+
}))
|
|
151
|
+
}, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
|
|
152
|
+
[m, u("Cookies")]
|
|
153
|
+
]),
|
|
154
|
+
p(s(v, {
|
|
155
|
+
id: n.value.Headers,
|
|
156
|
+
envVariables: r.envVariables,
|
|
157
|
+
environment: r.environment,
|
|
158
|
+
exampleKey: r.exampleKey,
|
|
159
|
+
parameters: o(i).header ?? [],
|
|
160
|
+
title: "Headers",
|
|
161
|
+
onAdd: e[14] || (e[14] = (t) => a("parameters:add", {
|
|
162
|
+
type: "header",
|
|
163
|
+
payload: t
|
|
164
|
+
})),
|
|
165
|
+
onDelete: e[15] || (e[15] = (t) => a("parameters:delete", {
|
|
166
|
+
type: "header",
|
|
167
|
+
...t
|
|
168
|
+
})),
|
|
169
|
+
onDeleteAll: e[16] || (e[16] = () => a("parameters:deleteAll", {
|
|
170
|
+
type: "header"
|
|
171
|
+
})),
|
|
172
|
+
onUpdate: e[17] || (e[17] = (t) => a("parameters:update", {
|
|
173
|
+
type: "header",
|
|
174
|
+
...t
|
|
175
|
+
}))
|
|
176
|
+
}, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
|
|
177
|
+
[m, u("Headers")]
|
|
178
|
+
]),
|
|
179
|
+
p(s(v, {
|
|
180
|
+
id: n.value.Query,
|
|
181
|
+
envVariables: r.envVariables,
|
|
182
|
+
environment: r.environment,
|
|
183
|
+
exampleKey: r.exampleKey,
|
|
184
|
+
parameters: o(i).query ?? [],
|
|
185
|
+
title: "Query Parameters",
|
|
186
|
+
onAdd: e[18] || (e[18] = (t) => a("parameters:add", {
|
|
187
|
+
type: "query",
|
|
188
|
+
payload: t
|
|
189
|
+
})),
|
|
190
|
+
onDelete: e[19] || (e[19] = (t) => a("parameters:delete", {
|
|
191
|
+
type: "query",
|
|
192
|
+
...t
|
|
193
|
+
})),
|
|
194
|
+
onDeleteAll: e[20] || (e[20] = () => a("parameters:deleteAll", {
|
|
195
|
+
type: "query"
|
|
196
|
+
})),
|
|
197
|
+
onUpdate: e[21] || (e[21] = (t) => a("parameters:update", {
|
|
198
|
+
type: "query",
|
|
199
|
+
...t
|
|
200
|
+
}))
|
|
201
|
+
}, null, 8, ["id", "envVariables", "environment", "exampleKey", "parameters"]), [
|
|
202
|
+
[m, u("Query")]
|
|
203
|
+
]),
|
|
204
|
+
p(s(P, {
|
|
205
|
+
id: n.value.Body,
|
|
206
|
+
envVariables: r.envVariables,
|
|
207
|
+
environment: r.environment,
|
|
208
|
+
exampleKey: r.exampleKey,
|
|
209
|
+
requestBody: o(R)(r.operation.requestBody),
|
|
210
|
+
selectedContentType: r.selectedContentType ?? "other",
|
|
211
|
+
title: "Request Body",
|
|
212
|
+
"onAdd:formRow": e[22] || (e[22] = (t) => a("requestBody:add:formRow", t)),
|
|
213
|
+
"onUpdate:contentType": e[23] || (e[23] = (t) => a("requestBody:update:contentType", t)),
|
|
214
|
+
"onUpdate:formRow": e[24] || (e[24] = (t) => a("requestBody:update:formRow", t)),
|
|
215
|
+
"onUpdate:value": e[25] || (e[25] = (t) => a("requestBody:update:value", t))
|
|
216
|
+
}, null, 8, ["id", "envVariables", "environment", "exampleKey", "requestBody", "selectedContentType"]), [
|
|
217
|
+
[m, u("Body") && o(V)(r.method)]
|
|
218
|
+
])
|
|
219
|
+
]),
|
|
220
|
+
_: 1
|
|
221
|
+
}, 8, ["aria-label"]));
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
export {
|
|
225
|
+
_ as default
|
|
226
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
2
|
+
import type { RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
import type { EnvVariable } from '../../../../store/active-entities.js';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
/** Request body */
|
|
6
|
+
requestBody?: RequestBodyObject;
|
|
7
|
+
/** Currently selected content type for the current operation */
|
|
8
|
+
selectedContentType: keyof typeof contentTypes | (string & {});
|
|
9
|
+
/** Currently selected example key for the current operation */
|
|
10
|
+
exampleKey: string;
|
|
11
|
+
/** Display title */
|
|
12
|
+
title: string;
|
|
13
|
+
/** TODO: remove when we do the migration */
|
|
14
|
+
environment: Environment;
|
|
15
|
+
envVariables: EnvVariable[];
|
|
16
|
+
};
|
|
17
|
+
declare const contentTypes: {
|
|
18
|
+
readonly 'multipart/form-data': "Multipart Form";
|
|
19
|
+
readonly 'application/x-www-form-urlencoded': "Form URL Encoded";
|
|
20
|
+
readonly 'application/octet-stream': "Binary File";
|
|
21
|
+
readonly 'application/json': "JSON";
|
|
22
|
+
readonly 'application/xml': "XML";
|
|
23
|
+
readonly 'application/yaml': "YAML";
|
|
24
|
+
readonly 'application/edn': "EDN";
|
|
25
|
+
readonly other: "Other";
|
|
26
|
+
readonly none: "None";
|
|
27
|
+
};
|
|
28
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
29
|
+
"update:contentType": (payload: {
|
|
30
|
+
value: string;
|
|
31
|
+
}) => any;
|
|
32
|
+
"update:value": (payload: {
|
|
33
|
+
value?: string | File;
|
|
34
|
+
}) => any;
|
|
35
|
+
"add:formRow": (payload: Partial<{
|
|
36
|
+
key: string;
|
|
37
|
+
value?: string | File;
|
|
38
|
+
}>) => any;
|
|
39
|
+
"update:formRow": (payload: {
|
|
40
|
+
index: number;
|
|
41
|
+
payload: Partial<{
|
|
42
|
+
key: string;
|
|
43
|
+
value?: string | File;
|
|
44
|
+
}>;
|
|
45
|
+
}) => any;
|
|
46
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
47
|
+
"onUpdate:contentType"?: ((payload: {
|
|
48
|
+
value: string;
|
|
49
|
+
}) => any) | undefined;
|
|
50
|
+
"onUpdate:value"?: ((payload: {
|
|
51
|
+
value?: string | File;
|
|
52
|
+
}) => any) | undefined;
|
|
53
|
+
"onAdd:formRow"?: ((payload: Partial<{
|
|
54
|
+
key: string;
|
|
55
|
+
value?: string | File;
|
|
56
|
+
}>) => any) | undefined;
|
|
57
|
+
"onUpdate:formRow"?: ((payload: {
|
|
58
|
+
index: number;
|
|
59
|
+
payload: Partial<{
|
|
60
|
+
key: string;
|
|
61
|
+
value?: string | File;
|
|
62
|
+
}>;
|
|
63
|
+
}) => any) | undefined;
|
|
64
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
65
|
+
export default _default;
|
|
66
|
+
//# sourceMappingURL=OperationBody.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBody.vue"],"names":[],"mappings":"AA6PA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAUrG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAK1D,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,gEAAgE;IAChE,mBAAmB,EAAE,MAAM,OAAO,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAC9D,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IAEb,4CAA4C;IAC5C,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;AAoCF,QAAA,MAAM,YAAY;;;;;;;;;;CAUR,CAAA;;;eAnCoC,MAAM;;;gBAEX,MAAM,GAAG,IAAI;;;aAI1B,MAAM;gBAAU,MAAM,GAAG,IAAI;;;eAK5C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;;;;eAZhB,MAAM;;;gBAEX,MAAM,GAAG,IAAI;;;aAI1B,MAAM;gBAAU,MAAM,GAAG,IAAI;;;eAK5C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;;;AA+c9D,wBAOG"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { defineComponent as j, computed as g, createBlock as u, openBlock as i, withCtx as a, createVNode as r, unref as l, createElementVNode as m, toDisplayString as f, createElementBlock as c, Fragment as F, createTextVNode as T } from "vue";
|
|
2
|
+
import { ScalarListbox as h, ScalarButton as y, ScalarIcon as x } from "@scalar/components";
|
|
3
|
+
import N from "../../../../components/CodeInput/CodeInput.vue.js";
|
|
4
|
+
import O from "../../../../components/DataTable/DataTable.vue.js";
|
|
5
|
+
import U from "../../../../components/DataTable/DataTableHeader.vue.js";
|
|
6
|
+
import D from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
7
|
+
import R from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
8
|
+
import V from "./OperationTable.vue.js";
|
|
9
|
+
import { getFileName as C } from "../helpers/files.js";
|
|
10
|
+
import { getExampleFromBody as S } from "../helpers/get-request-body-example.js";
|
|
11
|
+
import { useFileDialog as E } from "../../../../hooks/useFileDialog.js";
|
|
12
|
+
const L = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "text-c-3 flex min-h-10 w-full items-center justify-center border-t p-2 text-sm"
|
|
15
|
+
}, M = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "flex items-center justify-center overflow-hidden border-t p-1.5"
|
|
18
|
+
}, z = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, Q = /* @__PURE__ */ j({
|
|
19
|
+
__name: "OperationBody",
|
|
20
|
+
props: {
|
|
21
|
+
requestBody: {},
|
|
22
|
+
selectedContentType: {},
|
|
23
|
+
exampleKey: {},
|
|
24
|
+
title: {},
|
|
25
|
+
environment: {},
|
|
26
|
+
envVariables: {}
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:contentType", "update:value", "add:formRow", "update:formRow"],
|
|
29
|
+
setup(d, { emit: k }) {
|
|
30
|
+
const p = k, B = {
|
|
31
|
+
"application/json": "json",
|
|
32
|
+
"application/xml": "xml",
|
|
33
|
+
"application/yaml": "yaml"
|
|
34
|
+
}, v = Object.entries({
|
|
35
|
+
"multipart/form-data": "Multipart Form",
|
|
36
|
+
"application/x-www-form-urlencoded": "Form URL Encoded",
|
|
37
|
+
"application/octet-stream": "Binary File",
|
|
38
|
+
"application/json": "JSON",
|
|
39
|
+
"application/xml": "XML",
|
|
40
|
+
"application/yaml": "YAML",
|
|
41
|
+
"application/edn": "EDN",
|
|
42
|
+
other: "Other",
|
|
43
|
+
none: "None"
|
|
44
|
+
}).map(([t, e]) => ({
|
|
45
|
+
id: t,
|
|
46
|
+
label: e
|
|
47
|
+
})), b = g({
|
|
48
|
+
get: () => v.find((e) => e.id === d.selectedContentType) ?? v.at(-1),
|
|
49
|
+
set: (t) => {
|
|
50
|
+
p("update:contentType", { value: t.id });
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
function w(t) {
|
|
54
|
+
const { open: e } = E({
|
|
55
|
+
onChange: async (n) => {
|
|
56
|
+
const o = n?.[0];
|
|
57
|
+
o && t(o);
|
|
58
|
+
},
|
|
59
|
+
multiple: !1,
|
|
60
|
+
accept: "*/*"
|
|
61
|
+
});
|
|
62
|
+
e();
|
|
63
|
+
}
|
|
64
|
+
const s = g(
|
|
65
|
+
() => d.requestBody && S(d.requestBody, d.selectedContentType, d.exampleKey)
|
|
66
|
+
);
|
|
67
|
+
return (t, e) => (i(), u(R, null, {
|
|
68
|
+
title: a(() => [
|
|
69
|
+
T(f(t.title), 1)
|
|
70
|
+
]),
|
|
71
|
+
default: a(() => [
|
|
72
|
+
r(O, {
|
|
73
|
+
columns: [""],
|
|
74
|
+
presentational: ""
|
|
75
|
+
}, {
|
|
76
|
+
default: a(() => [
|
|
77
|
+
r(U, { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between !p-0" }, {
|
|
78
|
+
default: a(() => [
|
|
79
|
+
r(l(h), {
|
|
80
|
+
modelValue: b.value,
|
|
81
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => b.value = n),
|
|
82
|
+
options: l(v),
|
|
83
|
+
teleport: ""
|
|
84
|
+
}, {
|
|
85
|
+
default: a(() => [
|
|
86
|
+
r(l(y), {
|
|
87
|
+
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
|
|
88
|
+
fullWidth: "",
|
|
89
|
+
variant: "ghost"
|
|
90
|
+
}, {
|
|
91
|
+
default: a(() => [
|
|
92
|
+
m("span", null, f(t.selectedContentType), 1),
|
|
93
|
+
r(l(x), {
|
|
94
|
+
icon: "ChevronDown",
|
|
95
|
+
size: "md"
|
|
96
|
+
})
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
})
|
|
100
|
+
]),
|
|
101
|
+
_: 1
|
|
102
|
+
}, 8, ["modelValue", "options"])
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}),
|
|
106
|
+
r(D, null, {
|
|
107
|
+
default: a(() => [
|
|
108
|
+
t.selectedContentType === "none" ? (i(), c("div", L, e[5] || (e[5] = [
|
|
109
|
+
m("span", null, "No Body", -1)
|
|
110
|
+
]))) : t.selectedContentType === "application/octet-stream" ? (i(), c("div", M, [
|
|
111
|
+
l(C)(s.value?.value) !== void 0 ? (i(), c(F, { key: 0 }, [
|
|
112
|
+
m("span", z, f(l(C)(s.value?.value)), 1),
|
|
113
|
+
r(l(y), {
|
|
114
|
+
class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
|
|
115
|
+
size: "sm",
|
|
116
|
+
variant: "outlined",
|
|
117
|
+
onClick: e[1] || (e[1] = (n) => p("update:value", { value: void 0 }))
|
|
118
|
+
}, {
|
|
119
|
+
default: a(() => e[6] || (e[6] = [
|
|
120
|
+
T(" Delete ")
|
|
121
|
+
])),
|
|
122
|
+
_: 1,
|
|
123
|
+
__: [6]
|
|
124
|
+
})
|
|
125
|
+
], 64)) : (i(), u(l(y), {
|
|
126
|
+
key: 1,
|
|
127
|
+
class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
|
|
128
|
+
size: "sm",
|
|
129
|
+
variant: "outlined",
|
|
130
|
+
onClick: e[2] || (e[2] = () => w(
|
|
131
|
+
(n) => p("update:value", { value: n })
|
|
132
|
+
))
|
|
133
|
+
}, {
|
|
134
|
+
default: a(() => [
|
|
135
|
+
e[7] || (e[7] = m("span", null, "Upload File", -1)),
|
|
136
|
+
r(l(x), {
|
|
137
|
+
class: "ml-1",
|
|
138
|
+
icon: "Upload",
|
|
139
|
+
size: "xs",
|
|
140
|
+
thickness: "2.5"
|
|
141
|
+
})
|
|
142
|
+
]),
|
|
143
|
+
_: 1,
|
|
144
|
+
__: [7]
|
|
145
|
+
}))
|
|
146
|
+
])) : t.selectedContentType === "multipart/form-data" ? (i(), u(V, {
|
|
147
|
+
key: 2,
|
|
148
|
+
data: Object.entries(
|
|
149
|
+
typeof s.value?.value == "object" ? s.value.value ?? {} : {}
|
|
150
|
+
).map(([n, o]) => ({
|
|
151
|
+
name: n,
|
|
152
|
+
value: o
|
|
153
|
+
})),
|
|
154
|
+
envVariables: t.envVariables,
|
|
155
|
+
environment: t.environment,
|
|
156
|
+
showUploadButton: "",
|
|
157
|
+
onUploadFile: e[3] || (e[3] = (n) => w((o) => {
|
|
158
|
+
if (n !== void 0)
|
|
159
|
+
return p("update:formRow", {
|
|
160
|
+
index: n,
|
|
161
|
+
payload: { value: o ?? void 0 }
|
|
162
|
+
});
|
|
163
|
+
p("add:formRow", { value: o ?? void 0 });
|
|
164
|
+
}))
|
|
165
|
+
}, null, 8, ["data", "envVariables", "environment"])) : t.selectedContentType === "application/x-www-form-urlencoded" ? (i(), u(V, {
|
|
166
|
+
key: 3,
|
|
167
|
+
data: Object.entries(
|
|
168
|
+
typeof s.value?.value == "object" ? s.value.value : {}
|
|
169
|
+
).map(([n, o]) => ({
|
|
170
|
+
name: n,
|
|
171
|
+
value: String(o)
|
|
172
|
+
})),
|
|
173
|
+
envVariables: t.envVariables,
|
|
174
|
+
environment: t.environment
|
|
175
|
+
}, null, 8, ["data", "envVariables", "environment"])) : (i(), u(N, {
|
|
176
|
+
key: 4,
|
|
177
|
+
class: "border-t px-3",
|
|
178
|
+
content: "",
|
|
179
|
+
envVariables: t.envVariables,
|
|
180
|
+
environment: t.environment,
|
|
181
|
+
language: B[t.selectedContentType] ?? "plaintext",
|
|
182
|
+
lineNumbers: "",
|
|
183
|
+
lint: "",
|
|
184
|
+
modelValue: s.value?.value ?? "",
|
|
185
|
+
"onUpdate:modelValue": e[4] || (e[4] = (n) => p("update:value", { value: n }))
|
|
186
|
+
}, null, 8, ["envVariables", "environment", "language", "modelValue"]))
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
})
|
|
190
|
+
]),
|
|
191
|
+
_: 1
|
|
192
|
+
})
|
|
193
|
+
]),
|
|
194
|
+
_: 1
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
export {
|
|
199
|
+
Q as default
|
|
200
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationParams.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationParams.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
2
|
+
import type { ParameterObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
import type { EnvVariable } from '../../../../store/active-entities.js';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
parameters: ParameterObject[];
|
|
6
|
+
exampleKey: string;
|
|
7
|
+
title: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
invalidParams?: Set<string>;
|
|
10
|
+
globalRoute?: string;
|
|
11
|
+
/** TODO: remove as soon as we migrate to everything to the new store */
|
|
12
|
+
environment: Environment;
|
|
13
|
+
envVariables: EnvVariable[];
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
16
|
+
delete: (payload: {
|
|
17
|
+
index: number;
|
|
18
|
+
}) => any;
|
|
19
|
+
add: (payload: Partial<{
|
|
20
|
+
key: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}>) => any;
|
|
23
|
+
update: (payload: {
|
|
24
|
+
index: number;
|
|
25
|
+
payload: Partial<{
|
|
26
|
+
key: string;
|
|
27
|
+
value: string;
|
|
28
|
+
isEnabled: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
}) => any;
|
|
31
|
+
deleteAll: () => any;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
33
|
+
onDelete?: ((payload: {
|
|
34
|
+
index: number;
|
|
35
|
+
}) => any) | undefined;
|
|
36
|
+
onAdd?: ((payload: Partial<{
|
|
37
|
+
key: string;
|
|
38
|
+
value: string;
|
|
39
|
+
}>) => any) | undefined;
|
|
40
|
+
onUpdate?: ((payload: {
|
|
41
|
+
index: number;
|
|
42
|
+
payload: Partial<{
|
|
43
|
+
key: string;
|
|
44
|
+
value: string;
|
|
45
|
+
isEnabled: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
}) => any) | undefined;
|
|
48
|
+
onDeleteAll?: (() => any) | undefined;
|
|
49
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
|
+
export default _default;
|
|
51
|
+
//# sourceMappingURL=OperationParams.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationParams.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationParams.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAInG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAM1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wEAAwE;IACxE,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;eAmBgC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,OAAO,CAAA;SAAE,CAAC;;;;;eAGxC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,OAAO,CAAA;SAAE,CAAC;;;;AAoL1E,wBAOG"}
|