@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
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { isDefined as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { isDefined as v } from "@scalar/helpers/array/is-defined";
|
|
2
|
+
import { getRaw as S } from "@scalar/json-magic/magic-proxy";
|
|
3
|
+
import { getResolvedRef as m } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
4
|
+
import { unpackOverridesProxy as N } from "@scalar/workspace-store/helpers/overrides-proxy";
|
|
5
|
+
const T = 10, j = 10, D = "propertyName*", A = (/* @__PURE__ */ new Date()).toISOString(), q = A.split("T")[0], k = A.split("T")[1].split(".")[0], I = {
|
|
6
|
+
"date-time": A,
|
|
7
|
+
date: q,
|
|
6
8
|
email: "hello@example.com",
|
|
7
9
|
hostname: "example.com",
|
|
8
10
|
// https://tools.ietf.org/html/rfc6531#section-3.3
|
|
@@ -20,190 +22,255 @@ const N = 10, A = 10, E = "propertyName*", O = (/* @__PURE__ */ new Date()).toIS
|
|
|
20
22
|
// https://tools.ietf.org/html/draft-handrews-relative-json-pointer-01
|
|
21
23
|
"relative-json-pointer": "1/nested/objects",
|
|
22
24
|
// full-time in https://tools.ietf.org/html/rfc3339#section-5.6
|
|
23
|
-
time:
|
|
25
|
+
time: k,
|
|
24
26
|
// either a URI or relative-reference https://tools.ietf.org/html/rfc3986#section-4.1
|
|
25
27
|
"uri-reference": "../folder",
|
|
26
28
|
"uri-template": "https://example.com/{id}",
|
|
27
29
|
uri: "https://example.com",
|
|
28
30
|
uuid: "123e4567-e89b-12d3-a456-426614174000",
|
|
29
31
|
"object-id": "6592008029c8c3e4dc76256c"
|
|
30
|
-
},
|
|
31
|
-
if (!
|
|
32
|
+
}, E = (e, r = !1, l = "") => "type" in e && e.type === "string" && "format" in e && e.format === "binary" ? new File([""], "filename") : r && "format" in e && e.format ? I[e.format] ?? l : l, O = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), M = (e) => {
|
|
33
|
+
if (!e)
|
|
32
34
|
return;
|
|
33
|
-
const r =
|
|
35
|
+
const r = P.get(e);
|
|
34
36
|
if (r)
|
|
35
37
|
return r;
|
|
36
|
-
if ("required" in
|
|
37
|
-
const
|
|
38
|
-
if (Array.isArray(
|
|
39
|
-
const
|
|
40
|
-
return
|
|
38
|
+
if ("required" in e) {
|
|
39
|
+
const l = e.required;
|
|
40
|
+
if (Array.isArray(l) && l.length > 0) {
|
|
41
|
+
const a = new Set(l);
|
|
42
|
+
return P.set(e, a), a;
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
|
-
},
|
|
44
|
-
if (
|
|
45
|
+
}, d = (e, r) => (typeof r != "object" || r === null || O.set(S(N(e)), r), r), _ = (e) => !!(e.allOf || e.oneOf || e.anyOf), C = (e, r, l, a) => {
|
|
46
|
+
if (a?.omitEmptyAndOptionalProperties !== !0 || "type" in e && (e.type === "object" || e.type === "array") || _(e) || "examples" in e && Array.isArray(e.examples) && e.examples.length > 0 || "example" in e && e.example !== void 0 || "default" in e && e.default !== void 0 || "const" in e && e.const !== void 0 || "enum" in e && Array.isArray(e.enum) && e.enum.length > 0)
|
|
45
47
|
return !1;
|
|
46
|
-
const
|
|
47
|
-
return !(
|
|
48
|
-
},
|
|
49
|
-
const
|
|
50
|
-
if ("properties" in
|
|
51
|
-
const
|
|
52
|
-
for (let
|
|
53
|
-
const
|
|
54
|
-
if (!
|
|
48
|
+
const o = l ?? e.title ?? "", i = M(r);
|
|
49
|
+
return !(i ? i.has(o) : !1);
|
|
50
|
+
}, R = (e, r) => Array.isArray(e) && Array.isArray(r) ? [...e, ...r] : e && typeof e == "object" && r && typeof r == "object" ? { ...e, ...r } : r, F = (e, r, l, a) => {
|
|
51
|
+
const n = {};
|
|
52
|
+
if ("properties" in e && e.properties) {
|
|
53
|
+
const o = Object.keys(e.properties), i = l > 3 ? Math.min(j, o.length) : o.length;
|
|
54
|
+
for (let t = 0; t < i; t++) {
|
|
55
|
+
const p = o[t], u = m(e.properties[p]);
|
|
56
|
+
if (!u)
|
|
55
57
|
continue;
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
+
const c = r?.xml && "xml" in u ? u.xml?.name : void 0, y = s(u, r, {
|
|
59
|
+
level: l + 1,
|
|
60
|
+
parentSchema: e,
|
|
61
|
+
name: p,
|
|
62
|
+
seen: a
|
|
63
|
+
});
|
|
64
|
+
typeof y < "u" && (n[c ?? p] = y);
|
|
58
65
|
}
|
|
59
|
-
|
|
66
|
+
l > 3 && o.length > j && (n["..."] = "[Additional Properties Truncated]");
|
|
60
67
|
}
|
|
61
|
-
if ("patternProperties" in
|
|
62
|
-
for (const
|
|
63
|
-
const
|
|
64
|
-
|
|
68
|
+
if ("patternProperties" in e && e.patternProperties)
|
|
69
|
+
for (const o of Object.keys(e.patternProperties)) {
|
|
70
|
+
const i = m(e.patternProperties[o]);
|
|
71
|
+
i && (n[o] = s(i, r, {
|
|
72
|
+
level: l + 1,
|
|
73
|
+
parentSchema: e,
|
|
74
|
+
name: o,
|
|
75
|
+
seen: a
|
|
76
|
+
}));
|
|
65
77
|
}
|
|
66
|
-
if ("additionalProperties" in
|
|
67
|
-
const
|
|
68
|
-
|
|
78
|
+
if ("additionalProperties" in e && e.additionalProperties) {
|
|
79
|
+
const o = m(e.additionalProperties), i = e.additionalProperties === !0 || typeof e.additionalProperties == "object" && Object.keys(e.additionalProperties).length === 0, t = typeof o == "object" && "x-additionalPropertiesName" in o && typeof o["x-additionalPropertiesName"] == "string" && o["x-additionalPropertiesName"].trim().length > 0 ? `${o["x-additionalPropertiesName"].trim()}*` : D;
|
|
80
|
+
n[t] = i ? "anything" : typeof o == "object" ? s(o, r, {
|
|
81
|
+
level: l + 1,
|
|
82
|
+
seen: a
|
|
83
|
+
}) : "anything";
|
|
69
84
|
}
|
|
70
|
-
if (
|
|
71
|
-
Object.assign(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
if (e.oneOf?.[0])
|
|
86
|
+
Object.assign(
|
|
87
|
+
n,
|
|
88
|
+
s(m(e.oneOf[0]), r, {
|
|
89
|
+
level: l + 1,
|
|
90
|
+
seen: a
|
|
91
|
+
})
|
|
92
|
+
);
|
|
93
|
+
else if (e.anyOf?.[0])
|
|
94
|
+
Object.assign(
|
|
95
|
+
n,
|
|
96
|
+
s(m(e.anyOf[0]), r, {
|
|
97
|
+
level: l + 1,
|
|
98
|
+
seen: a
|
|
99
|
+
})
|
|
100
|
+
);
|
|
101
|
+
else if (Array.isArray(e.allOf) && e.allOf.length > 0) {
|
|
102
|
+
let o = n;
|
|
103
|
+
for (const i of e.allOf) {
|
|
104
|
+
const t = s(m(i), r, {
|
|
105
|
+
level: l + 1,
|
|
106
|
+
parentSchema: e,
|
|
107
|
+
seen: a
|
|
108
|
+
});
|
|
109
|
+
o = R(o, t);
|
|
79
110
|
}
|
|
80
|
-
|
|
111
|
+
o && typeof o == "object" && Object.assign(n, o);
|
|
81
112
|
}
|
|
82
|
-
if (r?.xml && "xml" in
|
|
83
|
-
const
|
|
84
|
-
return
|
|
113
|
+
if (r?.xml && "xml" in e && e.xml?.name && l === 0) {
|
|
114
|
+
const o = {};
|
|
115
|
+
return o[e.xml.name] = n, d(e, o);
|
|
85
116
|
}
|
|
86
|
-
return
|
|
87
|
-
},
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
return
|
|
91
|
-
if (
|
|
92
|
-
if (Array.isArray(
|
|
93
|
-
const
|
|
94
|
-
if (
|
|
95
|
-
const
|
|
96
|
-
|
|
117
|
+
return d(e, n);
|
|
118
|
+
}, L = (e, r, l, a) => {
|
|
119
|
+
const n = "items" in e ? m(e.items) : void 0, o = n && typeof n == "object" && "xml" in n ? n.xml?.name : void 0, i = !!(r?.xml && "xml" in e && e.xml?.wrapped && o);
|
|
120
|
+
if (e.example !== void 0)
|
|
121
|
+
return d(e, i ? { [o]: e.example } : e.example);
|
|
122
|
+
if (n && typeof n == "object") {
|
|
123
|
+
if (Array.isArray(n.allOf) && n.allOf.length > 0) {
|
|
124
|
+
const c = n.allOf.filter(v), y = m(c[0]);
|
|
125
|
+
if (y && typeof y == "object" && "type" in y && y.type === "object") {
|
|
126
|
+
const x = s({ type: "object", allOf: c }, r, {
|
|
127
|
+
level: l + 1,
|
|
128
|
+
parentSchema: e,
|
|
129
|
+
seen: a
|
|
130
|
+
});
|
|
131
|
+
return d(e, i ? [{ [o]: x }] : [x]);
|
|
97
132
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
133
|
+
const g = c.map(
|
|
134
|
+
(f) => s(m(f), r, {
|
|
135
|
+
level: l + 1,
|
|
136
|
+
parentSchema: e,
|
|
137
|
+
seen: a
|
|
138
|
+
})
|
|
139
|
+
).filter(v);
|
|
140
|
+
return d(
|
|
141
|
+
e,
|
|
142
|
+
i ? g.map((f) => ({ [o]: f })) : g
|
|
102
143
|
);
|
|
103
144
|
}
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
const
|
|
107
|
-
|
|
145
|
+
const u = n.anyOf || n.oneOf;
|
|
146
|
+
if (u && u.length > 0) {
|
|
147
|
+
const c = u[0], y = s(m(c), r, {
|
|
148
|
+
level: l + 1,
|
|
149
|
+
parentSchema: e,
|
|
150
|
+
seen: a
|
|
151
|
+
});
|
|
152
|
+
return d(e, i ? [{ [o]: y }] : [y]);
|
|
108
153
|
}
|
|
109
154
|
}
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
const
|
|
113
|
-
|
|
155
|
+
const t = n && typeof n == "object" && ("type" in n && n.type === "object" || "properties" in n), p = n && typeof n == "object" && ("type" in n && n.type === "array" || "items" in n);
|
|
156
|
+
if (n && typeof n == "object" && ("type" in n && n.type || t || p)) {
|
|
157
|
+
const u = s(n, r, {
|
|
158
|
+
level: l + 1,
|
|
159
|
+
seen: a
|
|
160
|
+
});
|
|
161
|
+
return d(e, i ? [{ [o]: u }] : [u]);
|
|
114
162
|
}
|
|
115
|
-
return
|
|
116
|
-
},
|
|
117
|
-
if ("type" in
|
|
118
|
-
switch (
|
|
163
|
+
return d(e, []);
|
|
164
|
+
}, X = (e, r, l) => {
|
|
165
|
+
if ("type" in e && e.type && !Array.isArray(e.type))
|
|
166
|
+
switch (e.type) {
|
|
119
167
|
case "string":
|
|
120
|
-
return
|
|
168
|
+
return E(e, r, l ?? "");
|
|
121
169
|
case "boolean":
|
|
122
170
|
return !0;
|
|
123
171
|
case "integer":
|
|
124
|
-
return "minimum" in
|
|
172
|
+
return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
|
|
125
173
|
case "number":
|
|
126
|
-
return "minimum" in
|
|
174
|
+
return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
|
|
127
175
|
case "array":
|
|
128
176
|
return [];
|
|
129
177
|
default:
|
|
130
178
|
return;
|
|
131
179
|
}
|
|
132
|
-
},
|
|
133
|
-
if ("type" in
|
|
134
|
-
if (
|
|
180
|
+
}, U = (e, r, l) => {
|
|
181
|
+
if ("type" in e && Array.isArray(e.type)) {
|
|
182
|
+
if (e.type.includes("null"))
|
|
135
183
|
return null;
|
|
136
|
-
const
|
|
137
|
-
if (
|
|
138
|
-
switch (
|
|
184
|
+
const a = e.type[0];
|
|
185
|
+
if (a)
|
|
186
|
+
switch (a) {
|
|
139
187
|
case "string":
|
|
140
|
-
return
|
|
188
|
+
return E(e, r, l ?? "");
|
|
141
189
|
case "boolean":
|
|
142
190
|
return !0;
|
|
143
191
|
case "integer":
|
|
144
|
-
return "minimum" in
|
|
192
|
+
return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
|
|
145
193
|
case "number":
|
|
146
|
-
return "minimum" in
|
|
194
|
+
return "minimum" in e && typeof e.minimum == "number" ? e.minimum : 1;
|
|
147
195
|
case "null":
|
|
148
196
|
return null;
|
|
149
197
|
default:
|
|
150
198
|
return;
|
|
151
199
|
}
|
|
152
200
|
}
|
|
153
|
-
},
|
|
154
|
-
const
|
|
155
|
-
if (!
|
|
201
|
+
}, s = (e, r, l) => {
|
|
202
|
+
const { level: a = 0, parentSchema: n, name: o, seen: i = /* @__PURE__ */ new WeakSet() } = l ?? {}, t = m(e);
|
|
203
|
+
if (!v(t))
|
|
156
204
|
return;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
205
|
+
const p = S(N(t));
|
|
206
|
+
if (i.has(p))
|
|
207
|
+
return "[Circular Reference]";
|
|
208
|
+
if (i.add(p), O.has(p))
|
|
209
|
+
return i.delete(p), O.get(p);
|
|
210
|
+
if (a > T)
|
|
211
|
+
return i.delete(p), "[Max Depth Exceeded]";
|
|
161
212
|
const u = !!r?.emptyString;
|
|
162
|
-
if (
|
|
213
|
+
if (t.deprecated || r?.mode === "write" && t.readOnly || r?.mode === "read" && t.writeOnly || C(t, n, o, r)) {
|
|
214
|
+
i.delete(p);
|
|
163
215
|
return;
|
|
164
|
-
|
|
165
|
-
|
|
216
|
+
}
|
|
217
|
+
if ("x-variable" in t && t["x-variable"]) {
|
|
218
|
+
const f = r?.variables?.[t["x-variable"]];
|
|
166
219
|
if (f !== void 0)
|
|
167
|
-
return "type" in
|
|
220
|
+
return "type" in t && (t.type === "number" || t.type === "integer") ? (i.delete(p), d(t, Number(f))) : (i.delete(p), d(t, f));
|
|
168
221
|
}
|
|
169
|
-
if (Array.isArray(
|
|
170
|
-
return p(
|
|
171
|
-
if (
|
|
172
|
-
return p(
|
|
173
|
-
if (
|
|
174
|
-
return p(
|
|
175
|
-
if (
|
|
176
|
-
return p(
|
|
177
|
-
if (Array.isArray(
|
|
178
|
-
return p(
|
|
179
|
-
if ("properties" in
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return p
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
222
|
+
if (Array.isArray(t.examples) && t.examples.length > 0)
|
|
223
|
+
return i.delete(p), d(t, t.examples[0]);
|
|
224
|
+
if (t.example !== void 0)
|
|
225
|
+
return i.delete(p), d(t, t.example);
|
|
226
|
+
if (t.default !== void 0)
|
|
227
|
+
return i.delete(p), d(t, t.default);
|
|
228
|
+
if (t.const !== void 0)
|
|
229
|
+
return i.delete(p), d(t, t.const);
|
|
230
|
+
if (Array.isArray(t.enum) && t.enum.length > 0)
|
|
231
|
+
return i.delete(p), d(t, t.enum[0]);
|
|
232
|
+
if ("properties" in t || "type" in t && t.type === "object") {
|
|
233
|
+
const f = F(t, r, a, i);
|
|
234
|
+
return i.delete(p), f;
|
|
235
|
+
}
|
|
236
|
+
if ("type" in t && t.type === "array" || "items" in t) {
|
|
237
|
+
const f = L(t, r, a, i);
|
|
238
|
+
return i.delete(p), f;
|
|
239
|
+
}
|
|
240
|
+
const c = X(t, u, r?.emptyString);
|
|
241
|
+
if (c !== void 0)
|
|
242
|
+
return i.delete(p), d(t, c);
|
|
243
|
+
const y = t.oneOf || t.anyOf;
|
|
244
|
+
if (Array.isArray(y) && y.length > 0) {
|
|
245
|
+
for (const f of y) {
|
|
246
|
+
const x = m(f);
|
|
247
|
+
if (x && (!("type" in x) || x.type !== "null"))
|
|
248
|
+
return i.delete(p), d(
|
|
249
|
+
t,
|
|
250
|
+
s(x, r, {
|
|
251
|
+
level: a + 1,
|
|
252
|
+
seen: i
|
|
253
|
+
})
|
|
254
|
+
);
|
|
192
255
|
}
|
|
193
|
-
return p(
|
|
256
|
+
return i.delete(p), d(t, null);
|
|
194
257
|
}
|
|
195
|
-
if (Array.isArray(
|
|
258
|
+
if (Array.isArray(t.allOf) && t.allOf.length > 0) {
|
|
196
259
|
let f;
|
|
197
|
-
const
|
|
198
|
-
for (const
|
|
199
|
-
const
|
|
200
|
-
|
|
260
|
+
const x = t.allOf;
|
|
261
|
+
for (const w of x) {
|
|
262
|
+
const b = s(w, r, {
|
|
263
|
+
level: a + 1,
|
|
264
|
+
parentSchema: t,
|
|
265
|
+
seen: i
|
|
266
|
+
});
|
|
267
|
+
f === void 0 ? f = b : f && typeof f == "object" && b && typeof b == "object" ? f = R(f, b) : b !== void 0 && (f = b);
|
|
201
268
|
}
|
|
202
|
-
return p(
|
|
269
|
+
return i.delete(p), d(t, f ?? null);
|
|
203
270
|
}
|
|
204
|
-
const
|
|
205
|
-
return
|
|
271
|
+
const g = U(t, u, r?.emptyString);
|
|
272
|
+
return g !== void 0 ? (i.delete(p), d(t, g)) : (i.delete(p), d(t, null));
|
|
206
273
|
};
|
|
207
274
|
export {
|
|
208
|
-
|
|
275
|
+
s as getExampleFromSchema
|
|
209
276
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-to-har.bench.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export { default as RequestExample } from './components/OperationCodeSample.vue.js';
|
|
2
1
|
export { default as ExamplePicker } from './components/ExamplePicker.vue.js';
|
|
2
|
+
export { default as OperationCodeSample } from './components/OperationCodeSample.vue.js';
|
|
3
|
+
export { DEFAULT_CLIENT, findClient, isClient } from './helpers/find-client.js';
|
|
4
|
+
export { generateClientOptions } from './helpers/generate-client-options.js';
|
|
5
|
+
export type { ClientOption, ClientOptionGroup } from './types';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-code-sample/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
1
|
+
import { default as o } from "./components/ExamplePicker.vue.js";
|
|
2
|
+
import { default as a } from "./components/OperationCodeSample.vue.js";
|
|
3
|
+
import { DEFAULT_CLIENT as p, findClient as f, isClient as l } from "./helpers/find-client.js";
|
|
4
|
+
import { generateClientOptions as m } from "./helpers/generate-client-options.js";
|
|
3
5
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
p as DEFAULT_CLIENT,
|
|
7
|
+
o as ExamplePicker,
|
|
8
|
+
a as OperationCodeSample,
|
|
9
|
+
f as findClient,
|
|
10
|
+
m as generateClientOptions,
|
|
11
|
+
l as isClient
|
|
6
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAwWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAGzE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAA;AACnG,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAIvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,gBAAgB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IAC7C,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;;;;;;;;YAiBiB,MAAM,EAAE;cAAQ,MAAM;gBAAU,MAAM,EAAE;;;;;eAK9C,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC;gBACzD,oBAAoB,EAAE;;;;YANjB,MAAM,EAAE;cAAQ,MAAM;gBAAU,MAAM,EAAE;;;;;eAK9C,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC;gBACzD,oBAAoB,EAAE;;;AA2epC,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AuthSelector.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9df56497"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as M, useId as N, ref as b, computed as S, createBlock as x, openBlock as r, unref as o, withCtx as u, createVNode as m, createCommentVNode as g, createElementVNode as i, createElementBlock as
|
|
2
|
-
import { useModal as z, ScalarComboboxMultiselect as E, ScalarButton as F, ScalarListboxCheckbox as P, ScalarIconButton as
|
|
3
|
-
import { ScalarIconCaretDown as
|
|
1
|
+
import { defineComponent as M, useId as N, ref as b, computed as S, createBlock as x, openBlock as r, unref as o, withCtx as u, createVNode as m, createCommentVNode as g, createElementVNode as i, createElementBlock as v, Fragment as k, createTextVNode as C, toDisplayString as h, withModifiers as U, normalizeClass as j } from "vue";
|
|
2
|
+
import { useModal as z, ScalarComboboxMultiselect as E, ScalarButton as F, ScalarListboxCheckbox as P, ScalarIconButton as G } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as H, ScalarIconTrash as J } from "@scalar/icons";
|
|
4
4
|
import { isDefined as B } from "@scalar/oas-utils/helpers";
|
|
5
|
-
import { getResolvedRef as
|
|
6
|
-
import
|
|
7
|
-
import { formatComplexScheme as
|
|
5
|
+
import { getResolvedRef as K } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
|
+
import Q from "./DeleteRequestAuthModal.vue.js";
|
|
7
|
+
import { formatComplexScheme as W, formatScheme as X, getSecuritySchemeOptions as Y } from "../helpers/security-scheme.js";
|
|
8
8
|
import Z from "./RequestAuthDataTable.vue.js";
|
|
9
9
|
import _ from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
10
10
|
import { useLayout as ee } from "../../../../hooks/useLayout.js";
|
|
@@ -22,7 +22,7 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["deleteOperationAuth", "update:securityScheme", "update:selectedScopes", "update:selectedSecurity"],
|
|
24
24
|
setup(n, { expose: I, emit: T }) {
|
|
25
|
-
const d = T, { layout: O } = ee(), V = N(),
|
|
25
|
+
const d = T, { layout: O } = ee(), V = N(), w = b(null), p = z(), a = b(null), A = b(!1), y = S(() => {
|
|
26
26
|
if (!n.security?.length)
|
|
27
27
|
return null;
|
|
28
28
|
const e = !n.security.some(
|
|
@@ -32,26 +32,26 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
32
32
|
}), s = S(() => n.selectedSecurity?.length ? n.selectedSecurity.map((t) => {
|
|
33
33
|
const e = Object.keys(t);
|
|
34
34
|
if (e.length > 1)
|
|
35
|
-
return
|
|
35
|
+
return W(t);
|
|
36
36
|
const l = e[0];
|
|
37
37
|
if (!l)
|
|
38
38
|
return;
|
|
39
|
-
const c =
|
|
39
|
+
const c = K(n.securitySchemes?.[l]);
|
|
40
40
|
if (c)
|
|
41
41
|
return X({ name: l, type: c.type, value: { [l]: [] } });
|
|
42
42
|
}).filter(B) : []);
|
|
43
|
-
function
|
|
43
|
+
function D({
|
|
44
44
|
label: t,
|
|
45
45
|
value: e
|
|
46
46
|
}) {
|
|
47
47
|
a.value = { label: t, payload: e }, p.show();
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const R = S(() => Y(
|
|
50
50
|
n.security ?? [],
|
|
51
51
|
n.securitySchemes ?? {},
|
|
52
52
|
O === "modal" || n.layout === "reference"
|
|
53
53
|
)), $ = (t) => {
|
|
54
|
-
|
|
54
|
+
A.value && t.stopPropagation(), w.value?.$el.click();
|
|
55
55
|
}, q = (t) => {
|
|
56
56
|
d("update:selectedSecurity", {
|
|
57
57
|
value: t.map((e) => e.value),
|
|
@@ -63,25 +63,25 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
63
63
|
return I({
|
|
64
64
|
authIndicator: y,
|
|
65
65
|
selectedSchemeOptions: s,
|
|
66
|
-
schemeOptions:
|
|
66
|
+
schemeOptions: R
|
|
67
67
|
}), (t, e) => (r(), x(o(_), {
|
|
68
68
|
class: "group/params relative",
|
|
69
69
|
itemCount: s.value.length,
|
|
70
70
|
layout: t.layout,
|
|
71
|
-
"onUpdate:modelValue": e[3] || (e[3] = (l) =>
|
|
71
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => A.value = l)
|
|
72
72
|
}, {
|
|
73
73
|
title: u(() => [
|
|
74
74
|
i("div", {
|
|
75
75
|
id: o(V),
|
|
76
76
|
class: "inline-flex items-center gap-0.5 leading-[20px]"
|
|
77
77
|
}, [
|
|
78
|
-
i("span", null,
|
|
79
|
-
y.value ? (r(),
|
|
78
|
+
i("span", null, h(t.title), 1),
|
|
79
|
+
y.value ? (r(), v("span", {
|
|
80
80
|
key: 0,
|
|
81
81
|
class: j(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]", { "text-c-1": y.value.text === "Required" }]),
|
|
82
82
|
"data-testid": "auth-indicator",
|
|
83
83
|
onClick: $
|
|
84
|
-
},
|
|
84
|
+
}, h(y.value.text), 3)) : g("", !0)
|
|
85
85
|
], 8, te)
|
|
86
86
|
]),
|
|
87
87
|
actions: u(() => [
|
|
@@ -90,10 +90,10 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
90
90
|
class: "w-72 text-xs",
|
|
91
91
|
modelValue: s.value,
|
|
92
92
|
multiple: "",
|
|
93
|
-
options:
|
|
93
|
+
options: R.value,
|
|
94
94
|
placement: "bottom-end",
|
|
95
95
|
teleport: "",
|
|
96
|
-
onDelete:
|
|
96
|
+
onDelete: D,
|
|
97
97
|
"onUpdate:modelValue": q
|
|
98
98
|
}, {
|
|
99
99
|
option: u(({ option: l, selected: c }) => [
|
|
@@ -101,37 +101,36 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
101
101
|
multiselect: "",
|
|
102
102
|
selected: c
|
|
103
103
|
}, null, 8, ["selected"]),
|
|
104
|
-
i("div", oe,
|
|
105
|
-
l.isDeletable ?? (o(O) !== "modal" && t.layout !== "reference") ? (r(), x(o(
|
|
104
|
+
i("div", oe, h(l.label), 1),
|
|
105
|
+
l.isDeletable ?? (o(O) !== "modal" && t.layout !== "reference") ? (r(), x(o(G), {
|
|
106
106
|
key: 0,
|
|
107
107
|
class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
|
|
108
|
-
icon: o(
|
|
108
|
+
icon: o(J),
|
|
109
109
|
label: `Delete ${l.label}`,
|
|
110
110
|
size: "xs",
|
|
111
|
-
onClick: U((f) =>
|
|
111
|
+
onClick: U((f) => D(l), ["stop"])
|
|
112
112
|
}, null, 8, ["icon", "label", "onClick"])) : g("", !0)
|
|
113
113
|
]),
|
|
114
114
|
default: u(() => [
|
|
115
115
|
m(o(F), {
|
|
116
116
|
ref_key: "comboboxButtonRef",
|
|
117
|
-
ref:
|
|
117
|
+
ref: w,
|
|
118
118
|
"aria-describedby": o(V),
|
|
119
|
-
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
|
|
120
|
-
fullWidth: "",
|
|
119
|
+
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
|
|
121
120
|
variant: "ghost"
|
|
122
121
|
}, {
|
|
123
122
|
default: u(() => [
|
|
124
|
-
s.value.length === 1 ? (r(),
|
|
123
|
+
s.value.length === 1 ? (r(), v(k, { key: 0 }, [
|
|
125
124
|
e[4] || (e[4] = i("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
126
|
-
C(" " +
|
|
127
|
-
], 64)) : s.value.length > 1 ? (r(),
|
|
125
|
+
C(" " + h(s.value[0]?.label), 1)
|
|
126
|
+
], 64)) : s.value.length > 1 ? (r(), v(k, { key: 1 }, [
|
|
128
127
|
e[5] || (e[5] = C(" Multiple ")),
|
|
129
128
|
e[6] || (e[6] = i("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
130
|
-
], 64)) : (r(),
|
|
129
|
+
], 64)) : (r(), v(k, { key: 2 }, [
|
|
131
130
|
e[7] || (e[7] = i("span", { class: "sr-only" }, "Select", -1)),
|
|
132
131
|
e[8] || (e[8] = C(" Auth Type "))
|
|
133
132
|
], 64)),
|
|
134
|
-
m(o(
|
|
133
|
+
m(o(H), {
|
|
135
134
|
class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
|
|
136
135
|
weight: "bold"
|
|
137
136
|
})
|
|
@@ -154,7 +153,7 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
154
153
|
"onUpdate:securityScheme": e[0] || (e[0] = (l) => d("update:securityScheme", l)),
|
|
155
154
|
"onUpdate:selectedScopes": e[1] || (e[1] = (l) => d("update:selectedScopes", l))
|
|
156
155
|
}, null, 8, ["envVariables", "environment", "layout", "securitySchemes", "selectedSchemeOptions", "server"]),
|
|
157
|
-
a.value ? (r(), x(
|
|
156
|
+
a.value ? (r(), x(Q, {
|
|
158
157
|
key: 0,
|
|
159
158
|
label: a.value.label,
|
|
160
159
|
scheme: a.value,
|